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);
|
||||
|
||||
if (user.Id === apiClient.getCurrentUserId()) {
|
||||
|
||||
skinManager.setTheme(userSettingsInstance.theme());
|
||||
}
|
||||
|
||||
layoutManager.setLayout(context.querySelector('.selectLayout').value);
|
||||
|
||||
return apiClient.updateUserConfiguration(user.Id, user.Configuration);
|
||||
}
|
||||
|
||||
function save(instance, context, userId, userSettings, apiClient, enableSaveConfirmation) {
|
||||
|
||||
loading.show();
|
||||
|
||||
apiClient.getUser(userId).then(function (user) {
|
||||
|
||||
saveUser(context, user, userSettings, apiClient).then(function () {
|
||||
|
||||
loading.hide();
|
||||
if (enableSaveConfirmation) {
|
||||
require(['toast'], function (toast) {
|
||||
toast(globalize.translate('SettingsSaved'));
|
||||
});
|
||||
}
|
||||
|
||||
events.trigger(instance, 'saved');
|
||||
|
||||
}, function () {
|
||||
loading.hide();
|
||||
});
|
||||
|
@ -258,14 +251,12 @@ define(['require', 'browser', 'layoutManager', 'appSettings', 'pluginManager', '
|
|||
}
|
||||
|
||||
function onSubmit(e) {
|
||||
|
||||
var self = this;
|
||||
var apiClient = connectionManager.getApiClient(self.options.serverId);
|
||||
var userId = self.options.userId;
|
||||
var userSettings = self.options.userSettings;
|
||||
|
||||
userSettings.setUserInfo(userId, apiClient).then(function () {
|
||||
|
||||
var enableSaveConfirmation = self.options.enableSaveConfirmation;
|
||||
save(self, self.options.element, userId, userSettings, apiClient, enableSaveConfirmation);
|
||||
});
|
||||
|
@ -278,30 +269,22 @@ define(['require', 'browser', 'layoutManager', 'appSettings', 'pluginManager', '
|
|||
}
|
||||
|
||||
function embed(options, self) {
|
||||
|
||||
require(['text!./displaysettings.template.html'], function (template) {
|
||||
|
||||
options.element.innerHTML = globalize.translateDocument(template, 'core');
|
||||
|
||||
options.element.querySelector('form').addEventListener('submit', onSubmit.bind(self));
|
||||
|
||||
if (options.enableSaveButton) {
|
||||
options.element.querySelector('.btnSave').classList.remove('hide');
|
||||
}
|
||||
|
||||
self.loadData(options.autoFocus);
|
||||
});
|
||||
}
|
||||
|
||||
function DisplaySettings(options) {
|
||||
|
||||
this.options = options;
|
||||
|
||||
embed(options, this);
|
||||
}
|
||||
|
||||
DisplaySettings.prototype.loadData = function (autoFocus) {
|
||||
|
||||
var self = this;
|
||||
var context = self.options.element;
|
||||
|
||||
|
@ -312,13 +295,9 @@ define(['require', 'browser', 'layoutManager', 'appSettings', 'pluginManager', '
|
|||
var userSettings = self.options.userSettings;
|
||||
|
||||
return apiClient.getUser(userId).then(function (user) {
|
||||
|
||||
return userSettings.setUserInfo(userId, apiClient).then(function () {
|
||||
|
||||
self.dataLoaded = true;
|
||||
|
||||
loadForm(context, user, userSettings, apiClient);
|
||||
|
||||
if (autoFocus) {
|
||||
focusManager.autoFocus(context);
|
||||
}
|
||||
|
@ -331,7 +310,6 @@ define(['require', 'browser', 'layoutManager', 'appSettings', 'pluginManager', '
|
|||
};
|
||||
|
||||
DisplaySettings.prototype.destroy = function () {
|
||||
|
||||
this.options = null;
|
||||
};
|
||||
|
||||
|
|
|
@ -50,7 +50,3 @@
|
|||
</form>
|
||||
</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>";
|
||||
else {
|
||||
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>"
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ define(["controllers/userpasswordpage", "loading", "libraryMenu", "apphost", "em
|
|||
uploadUserImage.value = "";
|
||||
uploadUserImage.dispatchEvent(new CustomEvent("change", {}));
|
||||
libraryMenu.setTitle(user.Name);
|
||||
var imageUrl = "css/images/logindefault.png";
|
||||
var imageUrl = "img/logindefault.png";
|
||||
if (user.PrimaryImageTag) {
|
||||
imageUrl = ApiClient.getUserImageUrl(user.Id, {
|
||||
height: 200,
|
||||
|
|
|
@ -178,7 +178,7 @@
|
|||
.playlistIndexIndicatorImage {
|
||||
-webkit-background-size: initial initial !important;
|
||||
background-size: initial !important;
|
||||
background-image: url(images/ani_equalizer_white.gif) !important
|
||||
background-image: url(../img/equalizer.gif) !important
|
||||
}
|
||||
|
||||
.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) {
|
||||
var html = "";
|
||||
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 += toolsMenuHtml;
|
||||
navDrawerScrollContainer.innerHTML = html;
|
||||
|
|
|
@ -600,7 +600,7 @@ var AppInfo = {};
|
|||
} else {
|
||||
|
||||
if (browser.iOS) {
|
||||
require(['css!devices/ios/ios.css']);
|
||||
require(['css!css/ios.css']);
|
||||
}
|
||||
|
||||
window.Emby.Page = appRouter;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue