mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
create new directory for image assets
This commit is contained in:
parent
9aa027dcfb
commit
161892a54e
11 changed files with 5 additions and 31 deletions
|
@ -225,32 +225,25 @@ define(['require', 'browser', 'layoutManager', 'appSettings', 'pluginManager', '
|
||||||
userSettingsInstance.enableBackdrops(context.querySelector('#chkBackdrops').checked);
|
userSettingsInstance.enableBackdrops(context.querySelector('#chkBackdrops').checked);
|
||||||
|
|
||||||
if (user.Id === apiClient.getCurrentUserId()) {
|
if (user.Id === apiClient.getCurrentUserId()) {
|
||||||
|
|
||||||
skinManager.setTheme(userSettingsInstance.theme());
|
skinManager.setTheme(userSettingsInstance.theme());
|
||||||
}
|
}
|
||||||
|
|
||||||
layoutManager.setLayout(context.querySelector('.selectLayout').value);
|
layoutManager.setLayout(context.querySelector('.selectLayout').value);
|
||||||
|
|
||||||
return apiClient.updateUserConfiguration(user.Id, user.Configuration);
|
return apiClient.updateUserConfiguration(user.Id, user.Configuration);
|
||||||
}
|
}
|
||||||
|
|
||||||
function save(instance, context, userId, userSettings, apiClient, enableSaveConfirmation) {
|
function save(instance, context, userId, userSettings, apiClient, enableSaveConfirmation) {
|
||||||
|
|
||||||
loading.show();
|
loading.show();
|
||||||
|
|
||||||
apiClient.getUser(userId).then(function (user) {
|
apiClient.getUser(userId).then(function (user) {
|
||||||
|
|
||||||
saveUser(context, user, userSettings, apiClient).then(function () {
|
saveUser(context, user, userSettings, apiClient).then(function () {
|
||||||
|
|
||||||
loading.hide();
|
loading.hide();
|
||||||
if (enableSaveConfirmation) {
|
if (enableSaveConfirmation) {
|
||||||
require(['toast'], function (toast) {
|
require(['toast'], function (toast) {
|
||||||
toast(globalize.translate('SettingsSaved'));
|
toast(globalize.translate('SettingsSaved'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
events.trigger(instance, 'saved');
|
events.trigger(instance, 'saved');
|
||||||
|
|
||||||
}, function () {
|
}, function () {
|
||||||
loading.hide();
|
loading.hide();
|
||||||
});
|
});
|
||||||
|
@ -258,14 +251,12 @@ define(['require', 'browser', 'layoutManager', 'appSettings', 'pluginManager', '
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSubmit(e) {
|
function onSubmit(e) {
|
||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
var apiClient = connectionManager.getApiClient(self.options.serverId);
|
var apiClient = connectionManager.getApiClient(self.options.serverId);
|
||||||
var userId = self.options.userId;
|
var userId = self.options.userId;
|
||||||
var userSettings = self.options.userSettings;
|
var userSettings = self.options.userSettings;
|
||||||
|
|
||||||
userSettings.setUserInfo(userId, apiClient).then(function () {
|
userSettings.setUserInfo(userId, apiClient).then(function () {
|
||||||
|
|
||||||
var enableSaveConfirmation = self.options.enableSaveConfirmation;
|
var enableSaveConfirmation = self.options.enableSaveConfirmation;
|
||||||
save(self, self.options.element, userId, userSettings, apiClient, enableSaveConfirmation);
|
save(self, self.options.element, userId, userSettings, apiClient, enableSaveConfirmation);
|
||||||
});
|
});
|
||||||
|
@ -278,30 +269,22 @@ define(['require', 'browser', 'layoutManager', 'appSettings', 'pluginManager', '
|
||||||
}
|
}
|
||||||
|
|
||||||
function embed(options, self) {
|
function embed(options, self) {
|
||||||
|
|
||||||
require(['text!./displaysettings.template.html'], function (template) {
|
require(['text!./displaysettings.template.html'], function (template) {
|
||||||
|
|
||||||
options.element.innerHTML = globalize.translateDocument(template, 'core');
|
options.element.innerHTML = globalize.translateDocument(template, 'core');
|
||||||
|
|
||||||
options.element.querySelector('form').addEventListener('submit', onSubmit.bind(self));
|
options.element.querySelector('form').addEventListener('submit', onSubmit.bind(self));
|
||||||
|
|
||||||
if (options.enableSaveButton) {
|
if (options.enableSaveButton) {
|
||||||
options.element.querySelector('.btnSave').classList.remove('hide');
|
options.element.querySelector('.btnSave').classList.remove('hide');
|
||||||
}
|
}
|
||||||
|
|
||||||
self.loadData(options.autoFocus);
|
self.loadData(options.autoFocus);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function DisplaySettings(options) {
|
function DisplaySettings(options) {
|
||||||
|
|
||||||
this.options = options;
|
this.options = options;
|
||||||
|
|
||||||
embed(options, this);
|
embed(options, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
DisplaySettings.prototype.loadData = function (autoFocus) {
|
DisplaySettings.prototype.loadData = function (autoFocus) {
|
||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
var context = self.options.element;
|
var context = self.options.element;
|
||||||
|
|
||||||
|
@ -312,13 +295,9 @@ define(['require', 'browser', 'layoutManager', 'appSettings', 'pluginManager', '
|
||||||
var userSettings = self.options.userSettings;
|
var userSettings = self.options.userSettings;
|
||||||
|
|
||||||
return apiClient.getUser(userId).then(function (user) {
|
return apiClient.getUser(userId).then(function (user) {
|
||||||
|
|
||||||
return userSettings.setUserInfo(userId, apiClient).then(function () {
|
return userSettings.setUserInfo(userId, apiClient).then(function () {
|
||||||
|
|
||||||
self.dataLoaded = true;
|
self.dataLoaded = true;
|
||||||
|
|
||||||
loadForm(context, user, userSettings, apiClient);
|
loadForm(context, user, userSettings, apiClient);
|
||||||
|
|
||||||
if (autoFocus) {
|
if (autoFocus) {
|
||||||
focusManager.autoFocus(context);
|
focusManager.autoFocus(context);
|
||||||
}
|
}
|
||||||
|
@ -331,7 +310,6 @@ define(['require', 'browser', 'layoutManager', 'appSettings', 'pluginManager', '
|
||||||
};
|
};
|
||||||
|
|
||||||
DisplaySettings.prototype.destroy = function () {
|
DisplaySettings.prototype.destroy = function () {
|
||||||
|
|
||||||
this.options = null;
|
this.options = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,3 @@
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ define(["appSettings", "dom", "connectionManager", "loading", "cardStyle", "emby
|
||||||
}), html += '<div class="cardImageContainer coveredImage coveredImage-noScale" style="background-image:url(\'' + imgUrl + "');\"></div>";
|
}), html += '<div class="cardImageContainer coveredImage coveredImage-noScale" style="background-image:url(\'' + imgUrl + "');\"></div>";
|
||||||
else {
|
else {
|
||||||
var background = getMetroColor(user.Id);
|
var background = getMetroColor(user.Id);
|
||||||
imgUrl = "css/images/logindefault.png", html += '<div class="cardImageContainer coveredImage coveredImage-noScale" style="background-image:url(\'' + imgUrl + "');background-color:" + background + ';"></div>'
|
imgUrl = "img/logindefault.png", html += '<div class="cardImageContainer coveredImage coveredImage-noScale" style="background-image:url(\'' + imgUrl + "');background-color:" + background + ';"></div>'
|
||||||
}
|
}
|
||||||
html += "</div>", html += "</div>", html += '<div class="cardFooter visualCardBox-cardFooter">', html += '<div class="cardText singleCardText cardTextCentered">' + user.Name + "</div>", html += "</div>", html += "</div>", html += "</button>"
|
html += "</div>", html += "</div>", html += '<div class="cardFooter visualCardBox-cardFooter">', html += '<div class="cardText singleCardText cardTextCentered">' + user.Name + "</div>", html += "</div>", html += "</div>", html += "</button>"
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ define(["controllers/userpasswordpage", "loading", "libraryMenu", "apphost", "em
|
||||||
uploadUserImage.value = "";
|
uploadUserImage.value = "";
|
||||||
uploadUserImage.dispatchEvent(new CustomEvent("change", {}));
|
uploadUserImage.dispatchEvent(new CustomEvent("change", {}));
|
||||||
libraryMenu.setTitle(user.Name);
|
libraryMenu.setTitle(user.Name);
|
||||||
var imageUrl = "css/images/logindefault.png";
|
var imageUrl = "img/logindefault.png";
|
||||||
if (user.PrimaryImageTag) {
|
if (user.PrimaryImageTag) {
|
||||||
imageUrl = ApiClient.getUserImageUrl(user.Id, {
|
imageUrl = ApiClient.getUserImageUrl(user.Id, {
|
||||||
height: 200,
|
height: 200,
|
||||||
|
|
|
@ -178,7 +178,7 @@
|
||||||
.playlistIndexIndicatorImage {
|
.playlistIndexIndicatorImage {
|
||||||
-webkit-background-size: initial initial !important;
|
-webkit-background-size: initial initial !important;
|
||||||
background-size: initial !important;
|
background-size: initial !important;
|
||||||
background-image: url(images/ani_equalizer_white.gif) !important
|
background-image: url(../img/equalizer.gif) !important
|
||||||
}
|
}
|
||||||
|
|
||||||
.hideVideoButtons .videoButton {
|
.hideVideoButtons .videoButton {
|
||||||
|
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
|
@ -440,7 +440,7 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", "
|
||||||
return getToolsMenuHtml(apiClient).then(function (toolsMenuHtml) {
|
return getToolsMenuHtml(apiClient).then(function (toolsMenuHtml) {
|
||||||
var html = "";
|
var html = "";
|
||||||
html += '<a class="adminDrawerLogo clearLink" is="emby-linkbutton" href="home.html" style="text-align:left;">';
|
html += '<a class="adminDrawerLogo clearLink" is="emby-linkbutton" href="home.html" style="text-align:left;">';
|
||||||
html += '<img src="css/images/logoblack.png" />';
|
html += '<img src="img/logoblack.png" />';
|
||||||
html += "</a>";
|
html += "</a>";
|
||||||
html += toolsMenuHtml;
|
html += toolsMenuHtml;
|
||||||
navDrawerScrollContainer.innerHTML = html;
|
navDrawerScrollContainer.innerHTML = html;
|
||||||
|
|
|
@ -600,7 +600,7 @@ var AppInfo = {};
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (browser.iOS) {
|
if (browser.iOS) {
|
||||||
require(['css!devices/ios/ios.css']);
|
require(['css!css/ios.css']);
|
||||||
}
|
}
|
||||||
|
|
||||||
window.Emby.Page = appRouter;
|
window.Emby.Page = appRouter;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue