From 51b8e2d12f4e4aa5cece162d95d9119ef79368f7 Mon Sep 17 00:00:00 2001 From: Ketan <73937490+devketanpro@users.noreply.github.com> Date: Tue, 12 Sep 2023 15:06:58 +0530 Subject: [PATCH 1/6] fix : Additional translations needed in profile management [SDCP-709] (#4325) --- scripts/apps/users/views/edit-form.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/apps/users/views/edit-form.html b/scripts/apps/users/views/edit-form.html index b9b5ed26ef..ebac0dcb82 100644 --- a/scripts/apps/users/views/edit-form.html +++ b/scripts/apps/users/views/edit-form.html @@ -199,17 +199,17 @@
Select the prefered default view format for specific areas of Superdesks interface. The sections will always open in the selected view format, but can be always changed using the view option dropdown in each section.
From d088323197911adadb613c4ea1263d4555da2343 Mon Sep 17 00:00:00 2001 From: Nikola Stojanovic <68916411+dzonidoo@users.noreply.github.com> Date: Thu, 14 Sep 2023 15:24:12 +0200 Subject: [PATCH 5/6] remove toggle button theme from header (#4312) --- .../apps/users/directives/UserPreferencesDirective.ts | 7 +++++++ scripts/core/menu/menu.ts | 9 --------- scripts/core/menu/views/menu.html | 4 ---- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/scripts/apps/users/directives/UserPreferencesDirective.ts b/scripts/apps/users/directives/UserPreferencesDirective.ts index 49fba616da..b53d0c3681 100644 --- a/scripts/apps/users/directives/UserPreferencesDirective.ts +++ b/scripts/apps/users/directives/UserPreferencesDirective.ts @@ -4,6 +4,8 @@ import {gettext} from 'core/utils'; import {appConfig, getUserInterfaceLanguage} from 'appConfig'; import {applyDefault} from 'core/helpers/typescript-helpers'; +const THEME_LIGHT = 'light-ui'; + /** * @ngdoc directive * @module superdesk.apps.users @@ -44,8 +46,13 @@ export function UserPreferencesDirective( const body = angular.element('body'); scope.activeNavigation = null; + scope.activeTheme = localStorage.getItem('theme'); + if (scope.activeTheme === '') { + scope.activeTheme = THEME_LIGHT; + } + scope.$watch('activeTheme', (val) => { if (!val) { return; diff --git a/scripts/core/menu/menu.ts b/scripts/core/menu/menu.ts index 28b3dbae7c..75c284f9f1 100644 --- a/scripts/core/menu/menu.ts +++ b/scripts/core/menu/menu.ts @@ -275,15 +275,6 @@ angular.module('superdesk.core.menu', [ }); } - scope.toggleTheme = function() { - scope.theme = scope.theme === 'dark-ui' ? '' : 'dark-ui'; - localStorage.setItem('theme', scope.theme); - - scope.theme ? - body.attr('data-theme', scope.theme) : - body.removeAttr('data-theme'); - }; - scope.toggleMenu = function() { ctrl.flags.menu = !ctrl.flags.menu; }; diff --git a/scripts/core/menu/views/menu.html b/scripts/core/menu/views/menu.html index 2fa9d11fcf..f5bcaddf45 100644 --- a/scripts/core/menu/views/menu.html +++ b/scripts/core/menu/views/menu.html @@ -29,10 +29,6 @@