summaryrefslogtreecommitdiffstats
path: root/apps/theming
diff options
context:
space:
mode:
Diffstat (limited to 'apps/theming')
-rw-r--r--apps/theming/css/default.css4
-rw-r--r--apps/theming/img/default-source.svg13
-rw-r--r--apps/theming/img/default.jpgbin391078 -> 57394 bytes
-rw-r--r--apps/theming/img/light.jpgbin0 -> 391078 bytes
-rw-r--r--apps/theming/l10n/bg.js6
-rw-r--r--apps/theming/l10n/bg.json6
-rw-r--r--apps/theming/l10n/cs.js8
-rw-r--r--apps/theming/l10n/cs.json8
-rw-r--r--apps/theming/l10n/de.js6
-rw-r--r--apps/theming/l10n/de.json6
-rw-r--r--apps/theming/l10n/de_DE.js12
-rw-r--r--apps/theming/l10n/de_DE.json12
-rw-r--r--apps/theming/l10n/fi.js6
-rw-r--r--apps/theming/l10n/fi.json6
-rw-r--r--apps/theming/l10n/hu.js6
-rw-r--r--apps/theming/l10n/hu.json6
-rw-r--r--apps/theming/l10n/it.js6
-rw-r--r--apps/theming/l10n/it.json6
-rw-r--r--apps/theming/l10n/pl.js10
-rw-r--r--apps/theming/l10n/pl.json10
-rw-r--r--apps/theming/l10n/tr.js10
-rw-r--r--apps/theming/l10n/tr.json10
-rw-r--r--apps/theming/l10n/zh_HK.js10
-rw-r--r--apps/theming/l10n/zh_HK.json10
-rw-r--r--apps/theming/l10n/zh_TW.js10
-rw-r--r--apps/theming/l10n/zh_TW.json10
-rw-r--r--apps/theming/lib/Controller/UserThemeController.php42
-rw-r--r--apps/theming/lib/Service/ThemesService.php13
-rw-r--r--apps/theming/lib/Settings/Personal.php10
-rw-r--r--apps/theming/lib/Themes/DarkTheme.php2
-rw-r--r--apps/theming/lib/Themes/DefaultTheme.php21
-rw-r--r--apps/theming/lib/Themes/LightTheme.php61
-rw-r--r--apps/theming/src/UserThemes.vue16
-rw-r--r--apps/theming/src/components/ItemPreview.vue56
-rw-r--r--apps/theming/tests/Controller/UserThemeControllerTest.php3
-rw-r--r--apps/theming/tests/Service/ThemesServiceTest.php89
-rw-r--r--apps/theming/tests/Settings/AdminSectionTest.php (renamed from apps/theming/tests/Settings/SectionTest.php)2
-rw-r--r--apps/theming/tests/Settings/PersonalTest.php209
-rw-r--r--apps/theming/tests/Themes/DefaultThemeTest.php6
39 files changed, 611 insertions, 116 deletions
diff --git a/apps/theming/css/default.css b/apps/theming/css/default.css
index 4bd9fb13bb8..a2b4b4c7b60 100644
--- a/apps/theming/css/default.css
+++ b/apps/theming/css/default.css
@@ -52,6 +52,6 @@
--header-menu-item-height: 44px;
--header-menu-profile-item-height: 66px;
--breakpoint-mobile: 1024px;
- --primary-invert-if-bright: unset;
- --background-invert-if-dark: unset;
+ --primary-invert-if-bright: no;
+ --background-invert-if-dark: no;
}
diff --git a/apps/theming/img/default-source.svg b/apps/theming/img/default-source.svg
new file mode 100644
index 00000000000..89711e2a0c8
--- /dev/null
+++ b/apps/theming/img/default-source.svg
@@ -0,0 +1,13 @@
+<svg width="800" height="500" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg">
+ <!-- Use this file to generate the default.jpg theme preview -->
+
+ <!-- Half rectangle light mask -->
+ <defs><mask id="a"><path d="M0 0h800L0 500Z" fill="#fff"/></mask></defs>
+ <!-- Dark and light images link -->
+ <image width="800" height="500" xlink:href="dark.jpg"/>
+ <image width="800" height="500" xlink:href="light.jpg" mask="url(#a)" fill="#fff"/>
+ <!-- White opacity layer -->
+ <path fill="#fff" opacity=".35" d="M0 0h800v500H0z"/>
+ <!-- Moon/sun icon -->
+ <path d="M358.82 162.36a58 58 0 0 0-26.63 48.81c0 20.6 10.74 38.6 26.9 48.81A48.85 48.85 0 0 1 310 211.17a48.82 48.81 0 0 1 48.82-48.81m102.69 13.3 12.7 12.7L336 326.55l-12.7-12.7 138.2-138.18m-54.85 21.57-13.14-8.26-12.78 8.88 3.73-15.1-12.34-9.4 15.53-1.06 5.15-14.65 5.95 14.47 15.35.27-11.98 10.02 4.53 14.83m-29.3 32.04-10.29-6.48-9.94 6.92 3.02-11.72-9.68-7.36 12.07-.8 4-11.45 4.53 11.27 12.07.27-9.32 7.72 3.55 11.63m83.52 35.14a48.82 48.81 0 0 1-48.82 48.82 48.7 48.7 0 0 1-28.93-9.5l68.25-68.25a48.7 48.7 0 0 1 9.5 28.93m-39.06 58.4 24.59-10.2-2.13 29.73-22.46-19.53m38.44-23.96 10.2-24.59L490 296.82l-29.73 2.04m10.2-44.02-10.11-24.68L490 232.3l-19.53 22.55m-92.75 57.78 24.59 10.2-22.46 19.44z" stroke="#000"/>
+</svg>
diff --git a/apps/theming/img/default.jpg b/apps/theming/img/default.jpg
index ad3fafd96f2..bbea0e905b9 100644
--- a/apps/theming/img/default.jpg
+++ b/apps/theming/img/default.jpg
Binary files differ
diff --git a/apps/theming/img/light.jpg b/apps/theming/img/light.jpg
new file mode 100644
index 00000000000..ad3fafd96f2
--- /dev/null
+++ b/apps/theming/img/light.jpg
Binary files differ
diff --git a/apps/theming/l10n/bg.js b/apps/theming/l10n/bg.js
index 68b4ab93be1..cbb75f66af4 100644
--- a/apps/theming/l10n/bg.js
+++ b/apps/theming/l10n/bg.js
@@ -33,15 +33,15 @@ OC.L10N.register(
"Dark theme" : "Tъмна Tема",
"Enable dark theme" : "Активиране на тъмна тема",
"A dark theme to ease your eyes by reducing the overall luminosity and brightness. It is still under development, so please report any issues you may find." : "Тъмна тема, която облекчава очите ви, като намалява яркостта. Все още е в процес на разработка, затова, моля, докладвайте за всички проблеми, които откриете.",
- "Light theme" : "Светла тема",
- "Enable the default light theme" : "Активиране на светлата тема по подразбиране",
- "The default light appearance." : "Светъл изглед по подразбиране.",
"Dyslexia font" : "Шрифт за дислексия",
"Enable dyslexia font" : "Активирай шрифт за дислексия",
"OpenDyslexic is a free typeface/font designed to mitigate some of the common reading errors caused by dyslexia." : "OpenDyslexic е безплатен шрифт, предназначен за смекчаване на някои от често срещаните грешки при четенето, причинени от дислексия.",
"High contrast mode" : "Висок контраст",
"Enable high contrast mode" : "Активиране на режим с висок контраст",
"A high contrast mode to ease your navigation. Visual quality will be reduced but clarity will be increased." : "Режим с висок контраст за улесняване на навигацията ви. Визуалното качество ще бъде намалено, но яснотата ще се увеличи.",
+ "Light theme" : "Светла тема",
+ "Enable the default light theme" : "Активиране на светлата тема по подразбиране",
+ "The default light appearance." : "Светъл изглед по подразбиране.",
"Legal notice" : "Правна информация",
"Privacy policy" : "Политика за поверителност",
"Adjust the Nextcloud theme" : "Коригиране на темата на Nextcloud",
diff --git a/apps/theming/l10n/bg.json b/apps/theming/l10n/bg.json
index 92347b4a4a1..81bf9dba945 100644
--- a/apps/theming/l10n/bg.json
+++ b/apps/theming/l10n/bg.json
@@ -31,15 +31,15 @@
"Dark theme" : "Tъмна Tема",
"Enable dark theme" : "Активиране на тъмна тема",
"A dark theme to ease your eyes by reducing the overall luminosity and brightness. It is still under development, so please report any issues you may find." : "Тъмна тема, която облекчава очите ви, като намалява яркостта. Все още е в процес на разработка, затова, моля, докладвайте за всички проблеми, които откриете.",
- "Light theme" : "Светла тема",
- "Enable the default light theme" : "Активиране на светлата тема по подразбиране",
- "The default light appearance." : "Светъл изглед по подразбиране.",
"Dyslexia font" : "Шрифт за дислексия",
"Enable dyslexia font" : "Активирай шрифт за дислексия",
"OpenDyslexic is a free typeface/font designed to mitigate some of the common reading errors caused by dyslexia." : "OpenDyslexic е безплатен шрифт, предназначен за смекчаване на някои от често срещаните грешки при четенето, причинени от дислексия.",
"High contrast mode" : "Висок контраст",
"Enable high contrast mode" : "Активиране на режим с висок контраст",
"A high contrast mode to ease your navigation. Visual quality will be reduced but clarity will be increased." : "Режим с висок контраст за улесняване на навигацията ви. Визуалното качество ще бъде намалено, но яснотата ще се увеличи.",
+ "Light theme" : "Светла тема",
+ "Enable the default light theme" : "Активиране на светлата тема по подразбиране",
+ "The default light appearance." : "Светъл изглед по подразбиране.",
"Legal notice" : "Правна информация",
"Privacy policy" : "Политика за поверителност",
"Adjust the Nextcloud theme" : "Коригиране на темата на Nextcloud",
diff --git a/apps/theming/l10n/cs.js b/apps/theming/l10n/cs.js
index 6f1f3688707..fbac6d62636 100644
--- a/apps/theming/l10n/cs.js
+++ b/apps/theming/l10n/cs.js
@@ -33,15 +33,17 @@ OC.L10N.register(
"Dark theme" : "Tmavý motiv vzhledu",
"Enable dark theme" : "Používat tmavý motiv vzhledu",
"A dark theme to ease your eyes by reducing the overall luminosity and brightness. It is still under development, so please report any issues you may find." : "Tmavý motiv vzhledu pro ulevení vašim očím snížením celkové svítivosti a jasu. Jeho vývoj zatím ještě není zcela dokončen, proto prosíme hlaste jakékoli problémy, se kterými se setkáte.",
- "Light theme" : "Světlý motiv vzhledu",
- "Enable the default light theme" : "Používat výchozí světlý vzhled",
- "The default light appearance." : "Výchozí světlý vzhled.",
+ "System default theme" : "Výchozí systémový vzhled",
+ "Enable the system default" : "Použít systémový výchozí",
"Dyslexia font" : "Písmo pro dyslektiky",
"Enable dyslexia font" : "Používat písmo pro dyslektiky",
"OpenDyslexic is a free typeface/font designed to mitigate some of the common reading errors caused by dyslexia." : "OpenDyslexic je bezplatné písmo (font) navržené tak, aby odpomáhalo od některých běžných chybování při čtení, způsobených dyslexií.",
"High contrast mode" : "Režim s vysokým kontrastem",
"Enable high contrast mode" : "Zapnout režim s vysokým kontrastem",
"A high contrast mode to ease your navigation. Visual quality will be reduced but clarity will be increased." : "Režim s vysokým kontrastem pro usnadnění orientace při pohybu po aplikaci. Vizuální kvalita bude snížena, zato zřetelnost se zlepší.",
+ "Light theme" : "Světlý motiv vzhledu",
+ "Enable the default light theme" : "Používat výchozí světlý vzhled",
+ "The default light appearance." : "Výchozí světlý vzhled.",
"Legal notice" : "Právní upozornění",
"Privacy policy" : "Zásady ochrany soukromí",
"Adjust the Nextcloud theme" : "Upravit motiv vzhledu Nextcloud",
diff --git a/apps/theming/l10n/cs.json b/apps/theming/l10n/cs.json
index 2b41777bfa5..34dfac4ef9d 100644
--- a/apps/theming/l10n/cs.json
+++ b/apps/theming/l10n/cs.json
@@ -31,15 +31,17 @@
"Dark theme" : "Tmavý motiv vzhledu",
"Enable dark theme" : "Používat tmavý motiv vzhledu",
"A dark theme to ease your eyes by reducing the overall luminosity and brightness. It is still under development, so please report any issues you may find." : "Tmavý motiv vzhledu pro ulevení vašim očím snížením celkové svítivosti a jasu. Jeho vývoj zatím ještě není zcela dokončen, proto prosíme hlaste jakékoli problémy, se kterými se setkáte.",
- "Light theme" : "Světlý motiv vzhledu",
- "Enable the default light theme" : "Používat výchozí světlý vzhled",
- "The default light appearance." : "Výchozí světlý vzhled.",
+ "System default theme" : "Výchozí systémový vzhled",
+ "Enable the system default" : "Použít systémový výchozí",
"Dyslexia font" : "Písmo pro dyslektiky",
"Enable dyslexia font" : "Používat písmo pro dyslektiky",
"OpenDyslexic is a free typeface/font designed to mitigate some of the common reading errors caused by dyslexia." : "OpenDyslexic je bezplatné písmo (font) navržené tak, aby odpomáhalo od některých běžných chybování při čtení, způsobených dyslexií.",
"High contrast mode" : "Režim s vysokým kontrastem",
"Enable high contrast mode" : "Zapnout režim s vysokým kontrastem",
"A high contrast mode to ease your navigation. Visual quality will be reduced but clarity will be increased." : "Režim s vysokým kontrastem pro usnadnění orientace při pohybu po aplikaci. Vizuální kvalita bude snížena, zato zřetelnost se zlepší.",
+ "Light theme" : "Světlý motiv vzhledu",
+ "Enable the default light theme" : "Používat výchozí světlý vzhled",
+ "The default light appearance." : "Výchozí světlý vzhled.",
"Legal notice" : "Právní upozornění",
"Privacy policy" : "Zásady ochrany soukromí",
"Adjust the Nextcloud theme" : "Upravit motiv vzhledu Nextcloud",
diff --git a/apps/theming/l10n/de.js b/apps/theming/l10n/de.js
index 712e05bd6b3..93cbafbeb93 100644
--- a/apps/theming/l10n/de.js
+++ b/apps/theming/l10n/de.js
@@ -33,15 +33,15 @@ OC.L10N.register(
"Dark theme" : "Dunkles Design",
"Enable dark theme" : "Dunkles Design aktivieren",
"A dark theme to ease your eyes by reducing the overall luminosity and brightness. It is still under development, so please report any issues you may find." : "Ein dunkles Design, das die Augen entspannt, indem es die allgemeine Lichtstärke und Helligkeit reduziert. Es befindet sich noch in der Entwicklung, also melde bitte alle Probleme, die Du findest.",
- "Light theme" : "Helles Design",
- "Enable the default light theme" : "Helles Standarddesign aktivieren",
- "The default light appearance." : "Das helle Standard-Erscheinungsbild",
"Dyslexia font" : "Legasthenie-Schriftart",
"Enable dyslexia font" : "Legasthenie-Schriftart aktivieren",
"OpenDyslexic is a free typeface/font designed to mitigate some of the common reading errors caused by dyslexia." : "OpenDyslexic ist eine freie Schriftart, die entwickelt wurde, um einige der häufigsten Lesefehler, die durch Legasthenie verursacht werden, zu reduzieren.",
"High contrast mode" : "Kontrastreicher Modus",
"Enable high contrast mode" : "Kontrastreichen Modus aktivieren",
"A high contrast mode to ease your navigation. Visual quality will be reduced but clarity will be increased." : "Ein kontrastreicher Modus, der die Navigation erleichtert. Die Bildqualität wird reduziert, die Klarheit jedoch erhöht.",
+ "Light theme" : "Helles Design",
+ "Enable the default light theme" : "Helles Standarddesign aktivieren",
+ "The default light appearance." : "Das helle Standard-Erscheinungsbild",
"Legal notice" : "Impressum",
"Privacy policy" : "Datenschutzerklärung ",
"Adjust the Nextcloud theme" : "Passe das Design von Nextcloud an",
diff --git a/apps/theming/l10n/de.json b/apps/theming/l10n/de.json
index a353de60f3c..6b0f4118e58 100644
--- a/apps/theming/l10n/de.json
+++ b/apps/theming/l10n/de.json
@@ -31,15 +31,15 @@
"Dark theme" : "Dunkles Design",
"Enable dark theme" : "Dunkles Design aktivieren",
"A dark theme to ease your eyes by reducing the overall luminosity and brightness. It is still under development, so please report any issues you may find." : "Ein dunkles Design, das die Augen entspannt, indem es die allgemeine Lichtstärke und Helligkeit reduziert. Es befindet sich noch in der Entwicklung, also melde bitte alle Probleme, die Du findest.",
- "Light theme" : "Helles Design",
- "Enable the default light theme" : "Helles Standarddesign aktivieren",
- "The default light appearance." : "Das helle Standard-Erscheinungsbild",
"Dyslexia font" : "Legasthenie-Schriftart",
"Enable dyslexia font" : "Legasthenie-Schriftart aktivieren",
"OpenDyslexic is a free typeface/font designed to mitigate some of the common reading errors caused by dyslexia." : "OpenDyslexic ist eine freie Schriftart, die entwickelt wurde, um einige der häufigsten Lesefehler, die durch Legasthenie verursacht werden, zu reduzieren.",
"High contrast mode" : "Kontrastreicher Modus",
"Enable high contrast mode" : "Kontrastreichen Modus aktivieren",
"A high contrast mode to ease your navigation. Visual quality will be reduced but clarity will be increased." : "Ein kontrastreicher Modus, der die Navigation erleichtert. Die Bildqualität wird reduziert, die Klarheit jedoch erhöht.",
+ "Light theme" : "Helles Design",
+ "Enable the default light theme" : "Helles Standarddesign aktivieren",
+ "The default light appearance." : "Das helle Standard-Erscheinungsbild",
"Legal notice" : "Impressum",
"Privacy policy" : "Datenschutzerklärung ",
"Adjust the Nextcloud theme" : "Passe das Design von Nextcloud an",
diff --git a/apps/theming/l10n/de_DE.js b/apps/theming/l10n/de_DE.js
index 027472830ea..ad3e1c0e3a3 100644
--- a/apps/theming/l10n/de_DE.js
+++ b/apps/theming/l10n/de_DE.js
@@ -2,7 +2,7 @@ OC.L10N.register(
"theming",
{
"Loading preview…" : "Lade Vorschau…",
- "Admin" : "Administrator",
+ "Admin" : "Administration",
"Saved" : "Gespeichert",
"a safe home for all your data" : "Ein sicheres Zuhause für Ihre Daten",
"Name cannot be empty" : "Der Name darf nicht leer sein",
@@ -33,20 +33,24 @@ OC.L10N.register(
"Dark theme" : "Dunkles Design",
"Enable dark theme" : "Dunkles Design aktivieren",
"A dark theme to ease your eyes by reducing the overall luminosity and brightness. It is still under development, so please report any issues you may find." : "Ein dunkles Design, das die Augen entspannt, indem es die Gesamthelligkeit und -helligkeit reduziert. Es befindet sich noch in der Entwicklung, also melden Sie bitte alle Probleme, die Sie finden.",
- "Light theme" : "Helles Design",
- "Enable the default light theme" : "Helles Standarddesign aktivieren",
- "The default light appearance." : "Das Standard helle Aussehen.",
+ "System default theme" : "Standard-System-Design",
+ "Enable the system default" : "Systemstandard aktivieren",
+ "Using the default system appearance." : "Das Standard-System-Erscheinungsbild verwenden.",
"Dyslexia font" : "Legasthenie-Schriftart",
"Enable dyslexia font" : "Legasthenie-Schriftart aktivieren",
"OpenDyslexic is a free typeface/font designed to mitigate some of the common reading errors caused by dyslexia." : "OpenDyslexic ist eine freie Schriftart, die entwickelt wurde, um einige der häufigsten Lesefehler, die durch Legasthenie verursacht werden, zu reduzieren.",
"High contrast mode" : "Kontrastreicher Modus",
"Enable high contrast mode" : "Kontrastreichen Modus aktivieren",
"A high contrast mode to ease your navigation. Visual quality will be reduced but clarity will be increased." : "Ein kontrastreicher Modus, der die Navigation erleichtert. Die Bildqualität wird reduziert, die Übersichtlichkeit jedoch erhöht.",
+ "Light theme" : "Helles Design",
+ "Enable the default light theme" : "Helles Standarddesign aktivieren",
+ "The default light appearance." : "Das Standard helle Aussehen.",
"Legal notice" : "Impressum",
"Privacy policy" : "Datenschutzbestimmungen",
"Adjust the Nextcloud theme" : "Passe das Design von Nextcloud an",
"Universal access is very important to us. We follow web standards and check to make everything usable also without mouse, and assistive software such as screenreaders. We aim to be compliant with the {guidelines}Web Content Accessibility Guidelines{linkend} 2.1 on AA level, with the high contrast theme even on AAA level." : "Der universelle Zugang ist für uns sehr wichtig. Wir halten uns an Webstandards und prüfen, ob alles auch ohne Maus und unterstützende Software wie Screenreader nutzbar ist. Wir streben die Einhaltung der {guidelines}Web Content Accessibility Guidelines{linkend} 2.1 auf AA-Niveau an, mit dem kontrastreichen Design sogar auf AAA-Niveau.",
"If you find any issues, don’t hesitate to report them on {issuetracker}our issue tracker{linkend}. And if you want to get involved, come join {designteam}our design team{linkend}!" : "Wenn Sie Fehler finden, melden Sie diese bitte in {issuetracker}unserem Issue Tracker{linkend}. Und wenn Sie mithelfen möchten, treten Sie dem {designteam}Designteam{linkend} bei!",
+ "Theme selection is enforced" : "Designauswahl wird erzwungen",
"Open documentation" : "Dokumentation öffnen",
"Theming makes it possible to easily customize the look and feel of your instance and supported clients. This will be visible for all users." : "Das Ändern des Designs ermöglicht es auf einfache Weise das Aussehen Ihrer Installation und Clients anzupassen. Die Änderungen wirken sich auf alle Benutzer aus.",
"Name" : "Name",
diff --git a/apps/theming/l10n/de_DE.json b/apps/theming/l10n/de_DE.json
index 6e0ebd146cb..d1c468aa1be 100644
--- a/apps/theming/l10n/de_DE.json
+++ b/apps/theming/l10n/de_DE.json
@@ -1,6 +1,6 @@
{ "translations": {
"Loading preview…" : "Lade Vorschau…",
- "Admin" : "Administrator",
+ "Admin" : "Administration",
"Saved" : "Gespeichert",
"a safe home for all your data" : "Ein sicheres Zuhause für Ihre Daten",
"Name cannot be empty" : "Der Name darf nicht leer sein",
@@ -31,20 +31,24 @@
"Dark theme" : "Dunkles Design",
"Enable dark theme" : "Dunkles Design aktivieren",
"A dark theme to ease your eyes by reducing the overall luminosity and brightness. It is still under development, so please report any issues you may find." : "Ein dunkles Design, das die Augen entspannt, indem es die Gesamthelligkeit und -helligkeit reduziert. Es befindet sich noch in der Entwicklung, also melden Sie bitte alle Probleme, die Sie finden.",
- "Light theme" : "Helles Design",
- "Enable the default light theme" : "Helles Standarddesign aktivieren",
- "The default light appearance." : "Das Standard helle Aussehen.",
+ "System default theme" : "Standard-System-Design",
+ "Enable the system default" : "Systemstandard aktivieren",
+ "Using the default system appearance." : "Das Standard-System-Erscheinungsbild verwenden.",
"Dyslexia font" : "Legasthenie-Schriftart",
"Enable dyslexia font" : "Legasthenie-Schriftart aktivieren",
"OpenDyslexic is a free typeface/font designed to mitigate some of the common reading errors caused by dyslexia." : "OpenDyslexic ist eine freie Schriftart, die entwickelt wurde, um einige der häufigsten Lesefehler, die durch Legasthenie verursacht werden, zu reduzieren.",
"High contrast mode" : "Kontrastreicher Modus",
"Enable high contrast mode" : "Kontrastreichen Modus aktivieren",
"A high contrast mode to ease your navigation. Visual quality will be reduced but clarity will be increased." : "Ein kontrastreicher Modus, der die Navigation erleichtert. Die Bildqualität wird reduziert, die Übersichtlichkeit jedoch erhöht.",
+ "Light theme" : "Helles Design",
+ "Enable the default light theme" : "Helles Standarddesign aktivieren",
+ "The default light appearance." : "Das Standard helle Aussehen.",
"Legal notice" : "Impressum",
"Privacy policy" : "Datenschutzbestimmungen",
"Adjust the Nextcloud theme" : "Passe das Design von Nextcloud an",
"Universal access is very important to us. We follow web standards and check to make everything usable also without mouse, and assistive software such as screenreaders. We aim to be compliant with the {guidelines}Web Content Accessibility Guidelines{linkend} 2.1 on AA level, with the high contrast theme even on AAA level." : "Der universelle Zugang ist für uns sehr wichtig. Wir halten uns an Webstandards und prüfen, ob alles auch ohne Maus und unterstützende Software wie Screenreader nutzbar ist. Wir streben die Einhaltung der {guidelines}Web Content Accessibility Guidelines{linkend} 2.1 auf AA-Niveau an, mit dem kontrastreichen Design sogar auf AAA-Niveau.",
"If you find any issues, don’t hesitate to report them on {issuetracker}our issue tracker{linkend}. And if you want to get involved, come join {designteam}our design team{linkend}!" : "Wenn Sie Fehler finden, melden Sie diese bitte in {issuetracker}unserem Issue Tracker{linkend}. Und wenn Sie mithelfen möchten, treten Sie dem {designteam}Designteam{linkend} bei!",
+ "Theme selection is enforced" : "Designauswahl wird erzwungen",
"Open documentation" : "Dokumentation öffnen",
"Theming makes it possible to easily customize the look and feel of your instance and supported clients. This will be visible for all users." : "Das Ändern des Designs ermöglicht es auf einfache Weise das Aussehen Ihrer Installation und Clients anzupassen. Die Änderungen wirken sich auf alle Benutzer aus.",
"Name" : "Name",
diff --git a/apps/theming/l10n/fi.js b/apps/theming/l10n/fi.js
index 8bbee26ed27..6123acdb863 100644
--- a/apps/theming/l10n/fi.js
+++ b/apps/theming/l10n/fi.js
@@ -33,15 +33,15 @@ OC.L10N.register(
"Dark theme" : "Tumma teema",
"Enable dark theme" : "Käytä tummaa teemaa",
"A dark theme to ease your eyes by reducing the overall luminosity and brightness. It is still under development, so please report any issues you may find." : "Tumma teema helpottaa silmien rasitusta vähentämällä kokonaiskirkkautta. Teemaa kehitetään edelleen, joten ilmoitathan mahdollisesti kohtaamasi ongelmat.",
- "Light theme" : "Vaalea teema",
- "Enable the default light theme" : "Ota käyttöön oletusarvoinen vaalea teema",
- "The default light appearance." : "Oletusarvoinen vaalea ulkoasu.",
"Dyslexia font" : "Lukihäiriökirjasin",
"Enable dyslexia font" : "Käytä lukihäiriökirjasinta",
"OpenDyslexic is a free typeface/font designed to mitigate some of the common reading errors caused by dyslexia." : "OpenDyslexic on vapaa kirjasin, joka on suunniteltu lieventämään lukihäiriön aiheuttamia lukuvirheitä.",
"High contrast mode" : "Suuren kontrastin tila",
"Enable high contrast mode" : "Käytä suuren kontrastin tilaa",
"A high contrast mode to ease your navigation. Visual quality will be reduced but clarity will be increased." : "Suuren kontrasin tila helpottaa liikkumista. Visuaalista näyttävyyttä karsitaan hieman, jotta käyttöliittymä olisi jopa aiempaa selkeämpi.",
+ "Light theme" : "Vaalea teema",
+ "Enable the default light theme" : "Ota käyttöön oletusarvoinen vaalea teema",
+ "The default light appearance." : "Oletusarvoinen vaalea ulkoasu.",
"Legal notice" : "Lainopillinen huomautus",
"Privacy policy" : "Yksityisyyskäytäntö",
"Adjust the Nextcloud theme" : "Mukauta Nextcloudin teemaa",
diff --git a/apps/theming/l10n/fi.json b/apps/theming/l10n/fi.json
index 87b9662bd9c..e3d5015e4f8 100644
--- a/apps/theming/l10n/fi.json
+++ b/apps/theming/l10n/fi.json
@@ -31,15 +31,15 @@
"Dark theme" : "Tumma teema",
"Enable dark theme" : "Käytä tummaa teemaa",
"A dark theme to ease your eyes by reducing the overall luminosity and brightness. It is still under development, so please report any issues you may find." : "Tumma teema helpottaa silmien rasitusta vähentämällä kokonaiskirkkautta. Teemaa kehitetään edelleen, joten ilmoitathan mahdollisesti kohtaamasi ongelmat.",
- "Light theme" : "Vaalea teema",
- "Enable the default light theme" : "Ota käyttöön oletusarvoinen vaalea teema",
- "The default light appearance." : "Oletusarvoinen vaalea ulkoasu.",
"Dyslexia font" : "Lukihäiriökirjasin",
"Enable dyslexia font" : "Käytä lukihäiriökirjasinta",
"OpenDyslexic is a free typeface/font designed to mitigate some of the common reading errors caused by dyslexia." : "OpenDyslexic on vapaa kirjasin, joka on suunniteltu lieventämään lukihäiriön aiheuttamia lukuvirheitä.",
"High contrast mode" : "Suuren kontrastin tila",
"Enable high contrast mode" : "Käytä suuren kontrastin tilaa",
"A high contrast mode to ease your navigation. Visual quality will be reduced but clarity will be increased." : "Suuren kontrasin tila helpottaa liikkumista. Visuaalista näyttävyyttä karsitaan hieman, jotta käyttöliittymä olisi jopa aiempaa selkeämpi.",
+ "Light theme" : "Vaalea teema",
+ "Enable the default light theme" : "Ota käyttöön oletusarvoinen vaalea teema",
+ "The default light appearance." : "Oletusarvoinen vaalea ulkoasu.",
"Legal notice" : "Lainopillinen huomautus",
"Privacy policy" : "Yksityisyyskäytäntö",
"Adjust the Nextcloud theme" : "Mukauta Nextcloudin teemaa",
diff --git a/apps/theming/l10n/hu.js b/apps/theming/l10n/hu.js
index a7068117cb5..4086d01a8c7 100644
--- a/apps/theming/l10n/hu.js
+++ b/apps/theming/l10n/hu.js
@@ -33,15 +33,15 @@ OC.L10N.register(
"Dark theme" : "Sötét téma",
"Enable dark theme" : "Sötét téma engedélyezése",
"A dark theme to ease your eyes by reducing the overall luminosity and brightness. It is still under development, so please report any issues you may find." : "A sötét téma csökkenti a szemek terhelését az átlagos fényesség és fényerő csökkentésével. Még mindig fejlesztés alatt áll, így jelentse ha problémát talál.",
- "Light theme" : "Világos téma",
- "Enable the default light theme" : "Alapértelmezett világos téma engedélyezése",
- "The default light appearance." : "Az alapértelmezett világos megjelenés.",
"Dyslexia font" : "Diszlexia betűkészlet",
"Enable dyslexia font" : "Diszlexia betűkészlet engedélyezése",
"OpenDyslexic is a free typeface/font designed to mitigate some of the common reading errors caused by dyslexia." : "Az OpenDyslexic egy szabad betűkészlet, amely egyes, diszlexia által okozott, gyakori olvasási hibák csökkentésére lett tervezve.",
"High contrast mode" : "Magas kontrasztú mód",
"Enable high contrast mode" : "Magas kontrasztú mód engedélyezése",
"A high contrast mode to ease your navigation. Visual quality will be reduced but clarity will be increased." : "A magas kontrasztú téma megkönnyíti a navigációt. A képi minőség csökken, de az olvashatóság javul.",
+ "Light theme" : "Világos téma",
+ "Enable the default light theme" : "Alapértelmezett világos téma engedélyezése",
+ "The default light appearance." : "Az alapértelmezett világos megjelenés.",
"Legal notice" : "Jogi nyilatkozat",
"Privacy policy" : "Adatvédelmi irányelvek",
"Adjust the Nextcloud theme" : "A Nextcloud téma módosítása",
diff --git a/apps/theming/l10n/hu.json b/apps/theming/l10n/hu.json
index 3e0c08ba237..701283d1132 100644
--- a/apps/theming/l10n/hu.json
+++ b/apps/theming/l10n/hu.json
@@ -31,15 +31,15 @@
"Dark theme" : "Sötét téma",
"Enable dark theme" : "Sötét téma engedélyezése",
"A dark theme to ease your eyes by reducing the overall luminosity and brightness. It is still under development, so please report any issues you may find." : "A sötét téma csökkenti a szemek terhelését az átlagos fényesség és fényerő csökkentésével. Még mindig fejlesztés alatt áll, így jelentse ha problémát talál.",
- "Light theme" : "Világos téma",
- "Enable the default light theme" : "Alapértelmezett világos téma engedélyezése",
- "The default light appearance." : "Az alapértelmezett világos megjelenés.",
"Dyslexia font" : "Diszlexia betűkészlet",
"Enable dyslexia font" : "Diszlexia betűkészlet engedélyezése",
"OpenDyslexic is a free typeface/font designed to mitigate some of the common reading errors caused by dyslexia." : "Az OpenDyslexic egy szabad betűkészlet, amely egyes, diszlexia által okozott, gyakori olvasási hibák csökkentésére lett tervezve.",
"High contrast mode" : "Magas kontrasztú mód",
"Enable high contrast mode" : "Magas kontrasztú mód engedélyezése",
"A high contrast mode to ease your navigation. Visual quality will be reduced but clarity will be increased." : "A magas kontrasztú téma megkönnyíti a navigációt. A képi minőség csökken, de az olvashatóság javul.",
+ "Light theme" : "Világos téma",
+ "Enable the default light theme" : "Alapértelmezett világos téma engedélyezése",
+ "The default light appearance." : "Az alapértelmezett világos megjelenés.",
"Legal notice" : "Jogi nyilatkozat",
"Privacy policy" : "Adatvédelmi irányelvek",
"Adjust the Nextcloud theme" : "A Nextcloud téma módosítása",
diff --git a/apps/theming/l10n/it.js b/apps/theming/l10n/it.js
index 022d69dc0fc..969955a7252 100644
--- a/apps/theming/l10n/it.js
+++ b/apps/theming/l10n/it.js
@@ -33,15 +33,15 @@ OC.L10N.register(
"Dark theme" : "Tema scuro",
"Enable dark theme" : "Abilita il tema scuro",
"A dark theme to ease your eyes by reducing the overall luminosity and brightness. It is still under development, so please report any issues you may find." : "Un tema scuro per facilitare i tuoi occhi riducendo la luminosità complessiva. È ancora in fase di sviluppo, per cui ti chiediamo di segnalare qualsiasi problema tu possa trovare.",
- "Light theme" : "Tema leggero",
- "Enable the default light theme" : "Abilita il tema leggero predefinito",
- "The default light appearance." : "L'aspetto predefinito del tema leggero.",
"Dyslexia font" : "Carattere per dislessici",
"Enable dyslexia font" : "Abilita il carattere per dislessici",
"OpenDyslexic is a free typeface/font designed to mitigate some of the common reading errors caused by dyslexia." : "OpenDyslexic è un carattere libero progettato per mitigare alcuni dei comuni errori di lettura causati dalla dislessia.",
"High contrast mode" : "Modalità ad alto contrasto",
"Enable high contrast mode" : "Abilita la modalità ad alto contrasto",
"A high contrast mode to ease your navigation. Visual quality will be reduced but clarity will be increased." : "Una modalità ad alto contrasto per semplificare la tua navigazione. La qualità visiva sarà ridotta per incrementare la chiarezza.",
+ "Light theme" : "Tema leggero",
+ "Enable the default light theme" : "Abilita il tema leggero predefinito",
+ "The default light appearance." : "L'aspetto predefinito del tema leggero.",
"Legal notice" : "Avviso legale",
"Privacy policy" : "Criterio di riservatezza",
"Adjust the Nextcloud theme" : "Modifica il tema di Nextcloud",
diff --git a/apps/theming/l10n/it.json b/apps/theming/l10n/it.json
index 9879e68c0cd..3c163941076 100644
--- a/apps/theming/l10n/it.json
+++ b/apps/theming/l10n/it.json
@@ -31,15 +31,15 @@
"Dark theme" : "Tema scuro",
"Enable dark theme" : "Abilita il tema scuro",
"A dark theme to ease your eyes by reducing the overall luminosity and brightness. It is still under development, so please report any issues you may find." : "Un tema scuro per facilitare i tuoi occhi riducendo la luminosità complessiva. È ancora in fase di sviluppo, per cui ti chiediamo di segnalare qualsiasi problema tu possa trovare.",
- "Light theme" : "Tema leggero",
- "Enable the default light theme" : "Abilita il tema leggero predefinito",
- "The default light appearance." : "L'aspetto predefinito del tema leggero.",
"Dyslexia font" : "Carattere per dislessici",
"Enable dyslexia font" : "Abilita il carattere per dislessici",
"OpenDyslexic is a free typeface/font designed to mitigate some of the common reading errors caused by dyslexia." : "OpenDyslexic è un carattere libero progettato per mitigare alcuni dei comuni errori di lettura causati dalla dislessia.",
"High contrast mode" : "Modalità ad alto contrasto",
"Enable high contrast mode" : "Abilita la modalità ad alto contrasto",
"A high contrast mode to ease your navigation. Visual quality will be reduced but clarity will be increased." : "Una modalità ad alto contrasto per semplificare la tua navigazione. La qualità visiva sarà ridotta per incrementare la chiarezza.",
+ "Light theme" : "Tema leggero",
+ "Enable the default light theme" : "Abilita il tema leggero predefinito",
+ "The default light appearance." : "L'aspetto predefinito del tema leggero.",
"Legal notice" : "Avviso legale",
"Privacy policy" : "Criterio di riservatezza",
"Adjust the Nextcloud theme" : "Modifica il tema di Nextcloud",
diff --git a/apps/theming/l10n/pl.js b/apps/theming/l10n/pl.js
index 360178b9092..46f90a5266d 100644
--- a/apps/theming/l10n/pl.js
+++ b/apps/theming/l10n/pl.js
@@ -33,20 +33,24 @@ OC.L10N.register(
"Dark theme" : "Ciemny motyw",
"Enable dark theme" : "Włącz ciemny motyw",
"A dark theme to ease your eyes by reducing the overall luminosity and brightness. It is still under development, so please report any issues you may find." : "Ciemny motyw, który łagodzi zmęczenie oczu, zmniejszając ogólną jasność. Nadal jest w fazie rozwoju, więc zgłaszaj wszelkie zauważone błędy.",
- "Light theme" : "Jasny motyw",
- "Enable the default light theme" : "Włącz domyślny jasny motyw",
- "The default light appearance." : "Domyślny jasny wygląd.",
+ "System default theme" : "Domyślny motyw systemu",
+ "Enable the system default" : "Włącz domyślne ustawienia systemu",
+ "Using the default system appearance." : "Korzystanie z domyślnego wyglądu systemu.",
"Dyslexia font" : "Czcionka dla dyslektyków",
"Enable dyslexia font" : "Włącz czcionkę dla dyslektyków",
"OpenDyslexic is a free typeface/font designed to mitigate some of the common reading errors caused by dyslexia." : "OpenDyslexic to darmowa czcionka zaprojektowana w celu zmniejszenia niektórych typowych błędów w czytaniu spowodowanych dysleksją.",
"High contrast mode" : "Tryb wysokiego kontrastu",
"Enable high contrast mode" : "Włącz tryb wysokiego kontrastu",
"A high contrast mode to ease your navigation. Visual quality will be reduced but clarity will be increased." : "Tryb wysokiego kontrastu ułatwiający nawigację. Jakość obrazu zostanie zmniejszona, celem poprawy przejrzystości.",
+ "Light theme" : "Jasny motyw",
+ "Enable the default light theme" : "Włącz domyślny jasny motyw",
+ "The default light appearance." : "Domyślny jasny wygląd.",
"Legal notice" : "Nota prawna",
"Privacy policy" : "Polityka prywatności",
"Adjust the Nextcloud theme" : "Dostosuj motyw Nextcloud",
"Universal access is very important to us. We follow web standards and check to make everything usable also without mouse, and assistive software such as screenreaders. We aim to be compliant with the {guidelines}Web Content Accessibility Guidelines{linkend} 2.1 on AA level, with the high contrast theme even on AAA level." : "Uniwersalny dostęp jest dla nas bardzo ważny. Przestrzegamy standardów internetowych i sprawdzamy, aby wszystko było użyteczne również bez myszy i oprogramowania pomocniczego, takiego jak czytniki ekranu. Naszym celem jest zgodność z {guidelines}Web Content Accessibility Guidelines{linkend} 2.1 na poziomie AA, z motywem o wysokim kontraście nawet na poziomie AAA.",
"If you find any issues, don’t hesitate to report them on {issuetracker}our issue tracker{linkend}. And if you want to get involved, come join {designteam}our design team{linkend}!" : "Jeśli znajdziesz jakieś problemy, nie wahaj się zgłosić je na {issuetracker}listę błędów{linkend}. A jeśli chcesz się zaangażować, dołącz do {designteam}naszego zespołu projektowego{linkend}!",
+ "Theme selection is enforced" : "Wybór motywu jest wymuszony",
"Open documentation" : "Otwórz dokumentację",
"Theming makes it possible to easily customize the look and feel of your instance and supported clients. This will be visible for all users." : "Motyw umożliwia na łatwą personalizację wyglądu instancji i wspieranych klientów. Ustawiony wygląd będzie widoczny dla wszystkich użytkowników.",
"Name" : "Nazwa",
diff --git a/apps/theming/l10n/pl.json b/apps/theming/l10n/pl.json
index b10824a9a00..4a03c1a9b5d 100644
--- a/apps/theming/l10n/pl.json
+++ b/apps/theming/l10n/pl.json
@@ -31,20 +31,24 @@
"Dark theme" : "Ciemny motyw",
"Enable dark theme" : "Włącz ciemny motyw",
"A dark theme to ease your eyes by reducing the overall luminosity and brightness. It is still under development, so please report any issues you may find." : "Ciemny motyw, który łagodzi zmęczenie oczu, zmniejszając ogólną jasność. Nadal jest w fazie rozwoju, więc zgłaszaj wszelkie zauważone błędy.",
- "Light theme" : "Jasny motyw",
- "Enable the default light theme" : "Włącz domyślny jasny motyw",
- "The default light appearance." : "Domyślny jasny wygląd.",
+ "System default theme" : "Domyślny motyw systemu",
+ "Enable the system default" : "Włącz domyślne ustawienia systemu",
+ "Using the default system appearance." : "Korzystanie z domyślnego wyglądu systemu.",
"Dyslexia font" : "Czcionka dla dyslektyków",
"Enable dyslexia font" : "Włącz czcionkę dla dyslektyków",
"OpenDyslexic is a free typeface/font designed to mitigate some of the common reading errors caused by dyslexia." : "OpenDyslexic to darmowa czcionka zaprojektowana w celu zmniejszenia niektórych typowych błędów w czytaniu spowodowanych dysleksją.",
"High contrast mode" : "Tryb wysokiego kontrastu",
"Enable high contrast mode" : "Włącz tryb wysokiego kontrastu",
"A high contrast mode to ease your navigation. Visual quality will be reduced but clarity will be increased." : "Tryb wysokiego kontrastu ułatwiający nawigację. Jakość obrazu zostanie zmniejszona, celem poprawy przejrzystości.",
+ "Light theme" : "Jasny motyw",
+ "Enable the default light theme" : "Włącz domyślny jasny motyw",
+ "The default light appearance." : "Domyślny jasny wygląd.",
"Legal notice" : "Nota prawna",
"Privacy policy" : "Polityka prywatności",
"Adjust the Nextcloud theme" : "Dostosuj motyw Nextcloud",
"Universal access is very important to us. We follow web standards and check to make everything usable also without mouse, and assistive software such as screenreaders. We aim to be compliant with the {guidelines}Web Content Accessibility Guidelines{linkend} 2.1 on AA level, with the high contrast theme even on AAA level." : "Uniwersalny dostęp jest dla nas bardzo ważny. Przestrzegamy standardów internetowych i sprawdzamy, aby wszystko było użyteczne również bez myszy i oprogramowania pomocniczego, takiego jak czytniki ekranu. Naszym celem jest zgodność z {guidelines}Web Content Accessibility Guidelines{linkend} 2.1 na poziomie AA, z motywem o wysokim kontraście nawet na poziomie AAA.",
"If you find any issues, don’t hesitate to report them on {issuetracker}our issue tracker{linkend}. And if you want to get involved, come join {designteam}our design team{linkend}!" : "Jeśli znajdziesz jakieś problemy, nie wahaj się zgłosić je na {issuetracker}listę błędów{linkend}. A jeśli chcesz się zaangażować, dołącz do {designteam}naszego zespołu projektowego{linkend}!",
+ "Theme selection is enforced" : "Wybór motywu jest wymuszony",
"Open documentation" : "Otwórz dokumentację",
"Theming makes it possible to easily customize the look and feel of your instance and supported clients. This will be visible for all users." : "Motyw umożliwia na łatwą personalizację wyglądu instancji i wspieranych klientów. Ustawiony wygląd będzie widoczny dla wszystkich użytkowników.",
"Name" : "Nazwa",
diff --git a/apps/theming/l10n/tr.js b/apps/theming/l10n/tr.js
index bde73700a81..d56a3d272d4 100644
--- a/apps/theming/l10n/tr.js
+++ b/apps/theming/l10n/tr.js
@@ -33,20 +33,24 @@ OC.L10N.register(
"Dark theme" : "Koyu tema",
"Enable dark theme" : "Koyu tema kullanılsın",
"A dark theme to ease your eyes by reducing the overall luminosity and brightness. It is still under development, so please report any issues you may find." : "Koyu tema genel parlaklık ve canlılığı zayıflatarak göz yorgunluğunu azaltır. Bu tema henüz geliştirme aşamasında olduğundan karşılaşabileceğiniz sorunları bize iletmenizi rica ediyoruz.",
- "Light theme" : "Açık tema",
- "Enable the default light theme" : "Varsayılan açık tema kullanılsın",
- "The default light appearance." : "Varsayılan açık renkli görünüm.",
+ "System default theme" : "Varsayılan sistem teması",
+ "Enable the system default" : "Sistem varsayılanı kullanılsın",
+ "Using the default system appearance." : "Varsayılan sistem görünümü kullanılıyor.",
"Dyslexia font" : "Disleksik yazı türü",
"Enable dyslexia font" : "Disleksik yazı türü kullanılsın",
"OpenDyslexic is a free typeface/font designed to mitigate some of the common reading errors caused by dyslexia." : "OpenDyslexic, disleksi nedeniyle sık karşılaşılan sorunları aşmak için geliştirilmiş ücretsiz bir yazı türüdür.",
"High contrast mode" : "Yüksek renk karşıtlığı kipi",
"Enable high contrast mode" : "Yüksek renk karşıtlığı kipi kullanılsın",
"A high contrast mode to ease your navigation. Visual quality will be reduced but clarity will be increased." : "Yüksek renk karşıtlığı kipi gezinmeyi kolaylaştırır. Görsel kalite azalır ancak netlik artar.",
+ "Light theme" : "Açık tema",
+ "Enable the default light theme" : "Varsayılan açık tema kullanılsın",
+ "The default light appearance." : "Varsayılan açık renkli görünüm.",
"Legal notice" : "Yasal bildirim",
"Privacy policy" : "Kişisel gizliliğin korunması ilkesi",
"Adjust the Nextcloud theme" : "Nextcloud temasını ayarla",
"Universal access is very important to us. We follow web standards and check to make everything usable also without mouse, and assistive software such as screenreaders. We aim to be compliant with the {guidelines}Web Content Accessibility Guidelines{linkend} 2.1 on AA level, with the high contrast theme even on AAA level." : "Uygulamalarımızı herkesin kullanabilmesini çok önemsiyoruz. Web standartlarını izleyerek, işlemlerin fare olmadan da yapılabilmesini ve ekran okuyucular gibi yardımcı yazılımların kullanılabilmesini sağlıyoruz. AAA düzeyinde yüksek renk karşıtlığı teması ile AA düzeyinde {guidelines}Web İçeriği Erişilebilirlik Kuralları{linkend} 2.1 ile uyumlu olmayı amaçladık.",
"If you find any issues, don’t hesitate to report them on {issuetracker}our issue tracker{linkend}. And if you want to get involved, come join {designteam}our design team{linkend}!" : "Bir sorunla karşılaşırsanız, bunları {issuetracker}sorun izleyicimiz{linkend} üzerinden bildirmekten çekinmeyin. Katkıda bulunmak istiyorsanız {designteam}tasarım ekibimize{linkend} katılın!",
+ "Theme selection is enforced" : "Tema seçimi zorunludur",
"Open documentation" : "Belgeleri aç",
"Theming makes it possible to easily customize the look and feel of your instance and supported clients. This will be visible for all users." : "Temalar kullandığınız kopyanın ve desteklenen istemcilerin genel görünümün kolayca değiştirilmesini sağlar. Tüm kullanıcılara görüntülenir.",
"Name" : "Ad",
diff --git a/apps/theming/l10n/tr.json b/apps/theming/l10n/tr.json
index 1dc56584efd..0a360110aa4 100644
--- a/apps/theming/l10n/tr.json
+++ b/apps/theming/l10n/tr.json
@@ -31,20 +31,24 @@
"Dark theme" : "Koyu tema",
"Enable dark theme" : "Koyu tema kullanılsın",
"A dark theme to ease your eyes by reducing the overall luminosity and brightness. It is still under development, so please report any issues you may find." : "Koyu tema genel parlaklık ve canlılığı zayıflatarak göz yorgunluğunu azaltır. Bu tema henüz geliştirme aşamasında olduğundan karşılaşabileceğiniz sorunları bize iletmenizi rica ediyoruz.",
- "Light theme" : "Açık tema",
- "Enable the default light theme" : "Varsayılan açık tema kullanılsın",
- "The default light appearance." : "Varsayılan açık renkli görünüm.",
+ "System default theme" : "Varsayılan sistem teması",
+ "Enable the system default" : "Sistem varsayılanı kullanılsın",
+ "Using the default system appearance." : "Varsayılan sistem görünümü kullanılıyor.",
"Dyslexia font" : "Disleksik yazı türü",
"Enable dyslexia font" : "Disleksik yazı türü kullanılsın",
"OpenDyslexic is a free typeface/font designed to mitigate some of the common reading errors caused by dyslexia." : "OpenDyslexic, disleksi nedeniyle sık karşılaşılan sorunları aşmak için geliştirilmiş ücretsiz bir yazı türüdür.",
"High contrast mode" : "Yüksek renk karşıtlığı kipi",
"Enable high contrast mode" : "Yüksek renk karşıtlığı kipi kullanılsın",
"A high contrast mode to ease your navigation. Visual quality will be reduced but clarity will be increased." : "Yüksek renk karşıtlığı kipi gezinmeyi kolaylaştırır. Görsel kalite azalır ancak netlik artar.",
+ "Light theme" : "Açık tema",
+ "Enable the default light theme" : "Varsayılan açık tema kullanılsın",
+ "The default light appearance." : "Varsayılan açık renkli görünüm.",
"Legal notice" : "Yasal bildirim",
"Privacy policy" : "Kişisel gizliliğin korunması ilkesi",
"Adjust the Nextcloud theme" : "Nextcloud temasını ayarla",
"Universal access is very important to us. We follow web standards and check to make everything usable also without mouse, and assistive software such as screenreaders. We aim to be compliant with the {guidelines}Web Content Accessibility Guidelines{linkend} 2.1 on AA level, with the high contrast theme even on AAA level." : "Uygulamalarımızı herkesin kullanabilmesini çok önemsiyoruz. Web standartlarını izleyerek, işlemlerin fare olmadan da yapılabilmesini ve ekran okuyucular gibi yardımcı yazılımların kullanılabilmesini sağlıyoruz. AAA düzeyinde yüksek renk karşıtlığı teması ile AA düzeyinde {guidelines}Web İçeriği Erişilebilirlik Kuralları{linkend} 2.1 ile uyumlu olmayı amaçladık.",
"If you find any issues, don’t hesitate to report them on {issuetracker}our issue tracker{linkend}. And if you want to get involved, come join {designteam}our design team{linkend}!" : "Bir sorunla karşılaşırsanız, bunları {issuetracker}sorun izleyicimiz{linkend} üzerinden bildirmekten çekinmeyin. Katkıda bulunmak istiyorsanız {designteam}tasarım ekibimize{linkend} katılın!",
+ "Theme selection is enforced" : "Tema seçimi zorunludur",
"Open documentation" : "Belgeleri aç",
"Theming makes it possible to easily customize the look and feel of your instance and supported clients. This will be visible for all users." : "Temalar kullandığınız kopyanın ve desteklenen istemcilerin genel görünümün kolayca değiştirilmesini sağlar. Tüm kullanıcılara görüntülenir.",
"Name" : "Ad",
diff --git a/apps/theming/l10n/zh_HK.js b/apps/theming/l10n/zh_HK.js
index ad74c256201..2b49e5ef65c 100644
--- a/apps/theming/l10n/zh_HK.js
+++ b/apps/theming/l10n/zh_HK.js
@@ -33,20 +33,24 @@ OC.L10N.register(
"Dark theme" : "深色主題",
"Enable dark theme" : "啟用深色主題",
"A dark theme to ease your eyes by reducing the overall luminosity and brightness. It is still under development, so please report any issues you may find." : "深色主題將降低整體光度與亮度,以舒緩眼睛疲勞。此功能仍在發展當中,請報告任何您遇上的問題。",
- "Light theme" : "淺色主題",
- "Enable the default light theme" : "啟用默認淺色主題",
- "The default light appearance." : "默認的淺色外觀。",
+ "System default theme" : "系統默認主題",
+ "Enable the system default" : "啟用系統默認值",
+ "Using the default system appearance." : "使用默認系統外觀。",
"Dyslexia font" : "閱讀困難症字體",
"Enable dyslexia font" : "啟用閱讀困難症字體",
"OpenDyslexic is a free typeface/font designed to mitigate some of the common reading errors caused by dyslexia." : "OpenDyslexic 是一種免費的字體,目的在降低因拼音文字閱讀困難引起的一些常見閱讀錯誤。",
"High contrast mode" : "高對比模式",
"Enable high contrast mode" : "啟用高對比模式",
"A high contrast mode to ease your navigation. Visual quality will be reduced but clarity will be increased." : "高對比模式能使您的瀏覽更容易。視覺品質將被降低,但清晰度將被提高。",
+ "Light theme" : "淺色主題",
+ "Enable the default light theme" : "啟用默認淺色主題",
+ "The default light appearance." : "默認的淺色外觀。",
"Legal notice" : "法律聲明",
"Privacy policy" : "隱私權政策",
"Adjust the Nextcloud theme" : "調整 Nextcloud 佈景主題",
"Universal access is very important to us. We follow web standards and check to make everything usable also without mouse, and assistive software such as screenreaders. We aim to be compliant with the {guidelines}Web Content Accessibility Guidelines{linkend} 2.1 on AA level, with the high contrast theme even on AAA level." : "我們非常重視無障礙使用。我們遵循網路標準,並透過檢查來確保所有內容皆可在沒有滑鼠或輔助軟體(例如螢幕閱讀器)的情況下使用。我們目標是能達到 {guidelines} 網頁內容可及性指引{linkend} 2.1 版的 AA 等級,加上高對比度主題甚至還能到 AAA 等級。",
"If you find any issues, don’t hesitate to report them on {issuetracker}our issue tracker{linkend}. And if you want to get involved, come join {designteam}our design team{linkend}!" : "如果您發現任何問題,請在 {issuetracker}我們的問題追蹤系統{linkend} 舉報。而如果您想參與,歡迎加入 {designteam}我們的設計團隊{linked}!",
+ "Theme selection is enforced" : "主題選擇已實施",
"Open documentation" : "開啟說明文件",
"Theming makes it possible to easily customize the look and feel of your instance and supported clients. This will be visible for all users." : "使用佈景主題來客製化網頁界面和客戶端程式的外觀(並非所有客戶端程式都支援佈景主題),外觀將會套用至所有用戶。",
"Name" : "名稱",
diff --git a/apps/theming/l10n/zh_HK.json b/apps/theming/l10n/zh_HK.json
index 9eb28c2caea..3abe7d0a618 100644
--- a/apps/theming/l10n/zh_HK.json
+++ b/apps/theming/l10n/zh_HK.json
@@ -31,20 +31,24 @@
"Dark theme" : "深色主題",
"Enable dark theme" : "啟用深色主題",
"A dark theme to ease your eyes by reducing the overall luminosity and brightness. It is still under development, so please report any issues you may find." : "深色主題將降低整體光度與亮度,以舒緩眼睛疲勞。此功能仍在發展當中,請報告任何您遇上的問題。",
- "Light theme" : "淺色主題",
- "Enable the default light theme" : "啟用默認淺色主題",
- "The default light appearance." : "默認的淺色外觀。",
+ "System default theme" : "系統默認主題",
+ "Enable the system default" : "啟用系統默認值",
+ "Using the default system appearance." : "使用默認系統外觀。",
"Dyslexia font" : "閱讀困難症字體",
"Enable dyslexia font" : "啟用閱讀困難症字體",
"OpenDyslexic is a free typeface/font designed to mitigate some of the common reading errors caused by dyslexia." : "OpenDyslexic 是一種免費的字體,目的在降低因拼音文字閱讀困難引起的一些常見閱讀錯誤。",
"High contrast mode" : "高對比模式",
"Enable high contrast mode" : "啟用高對比模式",
"A high contrast mode to ease your navigation. Visual quality will be reduced but clarity will be increased." : "高對比模式能使您的瀏覽更容易。視覺品質將被降低,但清晰度將被提高。",
+ "Light theme" : "淺色主題",
+ "Enable the default light theme" : "啟用默認淺色主題",
+ "The default light appearance." : "默認的淺色外觀。",
"Legal notice" : "法律聲明",
"Privacy policy" : "隱私權政策",
"Adjust the Nextcloud theme" : "調整 Nextcloud 佈景主題",
"Universal access is very important to us. We follow web standards and check to make everything usable also without mouse, and assistive software such as screenreaders. We aim to be compliant with the {guidelines}Web Content Accessibility Guidelines{linkend} 2.1 on AA level, with the high contrast theme even on AAA level." : "我們非常重視無障礙使用。我們遵循網路標準,並透過檢查來確保所有內容皆可在沒有滑鼠或輔助軟體(例如螢幕閱讀器)的情況下使用。我們目標是能達到 {guidelines} 網頁內容可及性指引{linkend} 2.1 版的 AA 等級,加上高對比度主題甚至還能到 AAA 等級。",
"If you find any issues, don’t hesitate to report them on {issuetracker}our issue tracker{linkend}. And if you want to get involved, come join {designteam}our design team{linkend}!" : "如果您發現任何問題,請在 {issuetracker}我們的問題追蹤系統{linkend} 舉報。而如果您想參與,歡迎加入 {designteam}我們的設計團隊{linked}!",
+ "Theme selection is enforced" : "主題選擇已實施",
"Open documentation" : "開啟說明文件",
"Theming makes it possible to easily customize the look and feel of your instance and supported clients. This will be visible for all users." : "使用佈景主題來客製化網頁界面和客戶端程式的外觀(並非所有客戶端程式都支援佈景主題),外觀將會套用至所有用戶。",
"Name" : "名稱",
diff --git a/apps/theming/l10n/zh_TW.js b/apps/theming/l10n/zh_TW.js
index 515ab376714..007c2496ab9 100644
--- a/apps/theming/l10n/zh_TW.js
+++ b/apps/theming/l10n/zh_TW.js
@@ -33,20 +33,24 @@ OC.L10N.register(
"Dark theme" : "深色主題",
"Enable dark theme" : "啟用深色主題",
"A dark theme to ease your eyes by reducing the overall luminosity and brightness. It is still under development, so please report any issues you may find." : "黑暗風格的主題,通過降低整體亮度來舒緩對您眼睛的刺激。深色主題仍在開發中,如發現任何問題,煩請報告。",
- "Light theme" : "淺色佈景主題",
- "Enable the default light theme" : "啟用預設的淺色佈景主題",
- "The default light appearance." : "預設的淺色外觀。",
+ "System default theme" : "系統預設佈景主題",
+ "Enable the system default" : "啟用系統預設值",
+ "Using the default system appearance." : "使用預設的系統外觀。",
"Dyslexia font" : "閱讀障礙字型",
"Enable dyslexia font" : "啟用閱讀障礙字型",
"OpenDyslexic is a free typeface/font designed to mitigate some of the common reading errors caused by dyslexia." : "OpenDyslexic 是一種免費的字型,目的在降低因拼音文字閱讀障礙引起的一些常見閱讀錯誤。",
"High contrast mode" : "高對比度模式",
"Enable high contrast mode" : "開啟高對比度模式",
"A high contrast mode to ease your navigation. Visual quality will be reduced but clarity will be increased." : "高對比度模式會降低介面品質,但會提高清晰度,有助您瀏覽。",
+ "Light theme" : "淺色佈景主題",
+ "Enable the default light theme" : "啟用預設的淺色佈景主題",
+ "The default light appearance." : "預設的淺色外觀。",
"Legal notice" : "法律聲明",
"Privacy policy" : "隱私權政策",
"Adjust the Nextcloud theme" : "調整 Nextcloud 佈景主題",
"Universal access is very important to us. We follow web standards and check to make everything usable also without mouse, and assistive software such as screenreaders. We aim to be compliant with the {guidelines}Web Content Accessibility Guidelines{linkend} 2.1 on AA level, with the high contrast theme even on AAA level." : "我們非常重視無障礙存取。我們遵循網路標準,並透過檢查來確保所有內容皆可在沒有滑鼠或輔助軟體(例如螢幕閱讀器)的情況下使用。我們目標是能達到{guidelines}網頁內容可及性指引{linkend} 2.1 版的 AA 等級,加上高對比度主題甚至還能到 AAA 等級。",
"If you find any issues, don’t hesitate to report them on {issuetracker}our issue tracker{linkend}. And if you want to get involved, come join {designteam}our design team{linkend}!" : "如果您發現任何一個問題,請不要猶豫並請在{issuetracker}我們的問題追蹤系統{linkend}回報。而如果您想參與,歡迎加入{designteam}我們的設計團隊{linkend}!",
+ "Theme selection is enforced" : "強制佈景主題選取",
"Open documentation" : "開啟說明文件",
"Theming makes it possible to easily customize the look and feel of your instance and supported clients. This will be visible for all users." : "使用佈景主題來客製化網頁界面和客戶端程式的外觀(並非所有客戶端程式都支援佈景主題),外觀將會套用至所有使用者。",
"Name" : "名稱",
diff --git a/apps/theming/l10n/zh_TW.json b/apps/theming/l10n/zh_TW.json
index 4ced46098e8..3755d63b29f 100644
--- a/apps/theming/l10n/zh_TW.json
+++ b/apps/theming/l10n/zh_TW.json
@@ -31,20 +31,24 @@
"Dark theme" : "深色主題",
"Enable dark theme" : "啟用深色主題",
"A dark theme to ease your eyes by reducing the overall luminosity and brightness. It is still under development, so please report any issues you may find." : "黑暗風格的主題,通過降低整體亮度來舒緩對您眼睛的刺激。深色主題仍在開發中,如發現任何問題,煩請報告。",
- "Light theme" : "淺色佈景主題",
- "Enable the default light theme" : "啟用預設的淺色佈景主題",
- "The default light appearance." : "預設的淺色外觀。",
+ "System default theme" : "系統預設佈景主題",
+ "Enable the system default" : "啟用系統預設值",
+ "Using the default system appearance." : "使用預設的系統外觀。",
"Dyslexia font" : "閱讀障礙字型",
"Enable dyslexia font" : "啟用閱讀障礙字型",
"OpenDyslexic is a free typeface/font designed to mitigate some of the common reading errors caused by dyslexia." : "OpenDyslexic 是一種免費的字型,目的在降低因拼音文字閱讀障礙引起的一些常見閱讀錯誤。",
"High contrast mode" : "高對比度模式",
"Enable high contrast mode" : "開啟高對比度模式",
"A high contrast mode to ease your navigation. Visual quality will be reduced but clarity will be increased." : "高對比度模式會降低介面品質,但會提高清晰度,有助您瀏覽。",
+ "Light theme" : "淺色佈景主題",
+ "Enable the default light theme" : "啟用預設的淺色佈景主題",
+ "The default light appearance." : "預設的淺色外觀。",
"Legal notice" : "法律聲明",
"Privacy policy" : "隱私權政策",
"Adjust the Nextcloud theme" : "調整 Nextcloud 佈景主題",
"Universal access is very important to us. We follow web standards and check to make everything usable also without mouse, and assistive software such as screenreaders. We aim to be compliant with the {guidelines}Web Content Accessibility Guidelines{linkend} 2.1 on AA level, with the high contrast theme even on AAA level." : "我們非常重視無障礙存取。我們遵循網路標準,並透過檢查來確保所有內容皆可在沒有滑鼠或輔助軟體(例如螢幕閱讀器)的情況下使用。我們目標是能達到{guidelines}網頁內容可及性指引{linkend} 2.1 版的 AA 等級,加上高對比度主題甚至還能到 AAA 等級。",
"If you find any issues, don’t hesitate to report them on {issuetracker}our issue tracker{linkend}. And if you want to get involved, come join {designteam}our design team{linkend}!" : "如果您發現任何一個問題,請不要猶豫並請在{issuetracker}我們的問題追蹤系統{linkend}回報。而如果您想參與,歡迎加入{designteam}我們的設計團隊{linkend}!",
+ "Theme selection is enforced" : "強制佈景主題選取",
"Open documentation" : "開啟說明文件",
"Theming makes it possible to easily customize the look and feel of your instance and supported clients. This will be visible for all users." : "使用佈景主題來客製化網頁界面和客戶端程式的外觀(並非所有客戶端程式都支援佈景主題),外觀將會套用至所有使用者。",
"Name" : "名稱",
diff --git a/apps/theming/lib/Controller/UserThemeController.php b/apps/theming/lib/Controller/UserThemeController.php
index ec379d2e6fa..71d78db4b3d 100644
--- a/apps/theming/lib/Controller/UserThemeController.php
+++ b/apps/theming/lib/Controller/UserThemeController.php
@@ -30,9 +30,11 @@ declare(strict_types=1);
*/
namespace OCA\Theming\Controller;
+use OCA\Theming\ITheme;
use OCA\Theming\Service\ThemesService;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\OCS\OCSBadRequestException;
+use OCP\AppFramework\OCS\OCSForbiddenException;
use OCP\AppFramework\OCSController;
use OCP\IConfig;
use OCP\IRequest;
@@ -71,17 +73,10 @@ class UserThemeController extends OCSController {
* @throws OCSBadRequestException|PreConditionNotMetException
*/
public function enableTheme(string $themeId): DataResponse {
- if ($themeId === '' || !$themeId) {
- throw new OCSBadRequestException('Invalid theme id: ' . $themeId);
- }
+ $theme = $this->validateTheme($themeId);
- $themes = $this->themesService->getThemes();
- if (!isset($themes[$themeId])) {
- throw new OCSBadRequestException('Invalid theme id: ' . $themeId);
- }
-
// Enable selected theme
- $this->themesService->enableTheme($themes[$themeId]);
+ $this->themesService->enableTheme($theme);
return new DataResponse();
}
@@ -95,6 +90,23 @@ class UserThemeController extends OCSController {
* @throws OCSBadRequestException|PreConditionNotMetException
*/
public function disableTheme(string $themeId): DataResponse {
+ $theme = $this->validateTheme($themeId);
+
+ // Enable selected theme
+ $this->themesService->disableTheme($theme);
+ return new DataResponse();
+ }
+
+ /**
+ * Validate and return the matching ITheme
+ *
+ * Disable theme
+ *
+ * @param string $themeId the theme ID
+ * @return ITheme
+ * @throws OCSBadRequestException|PreConditionNotMetException
+ */
+ private function validateTheme(string $themeId): ITheme {
if ($themeId === '' || !$themeId) {
throw new OCSBadRequestException('Invalid theme id: ' . $themeId);
}
@@ -103,9 +115,13 @@ class UserThemeController extends OCSController {
if (!isset($themes[$themeId])) {
throw new OCSBadRequestException('Invalid theme id: ' . $themeId);
}
-
- // Enable selected theme
- $this->themesService->disableTheme($themes[$themeId]);
- return new DataResponse();
+
+ // If trying to toggle another theme but this is enforced
+ if ($this->config->getSystemValueString('enforce_theme', '') !== ''
+ && $themes[$themeId]->getType() === ITheme::TYPE_THEME) {
+ throw new OCSForbiddenException('Theme switching is disabled');
+ }
+
+ return $themes[$themeId];
}
}
diff --git a/apps/theming/lib/Service/ThemesService.php b/apps/theming/lib/Service/ThemesService.php
index 01ebc3fb504..26dcbfed0d5 100644
--- a/apps/theming/lib/Service/ThemesService.php
+++ b/apps/theming/lib/Service/ThemesService.php
@@ -29,6 +29,7 @@ use OCA\Theming\Themes\DarkTheme;
use OCA\Theming\Themes\DefaultTheme;
use OCA\Theming\Themes\DyslexiaFont;
use OCA\Theming\Themes\HighContrastTheme;
+use OCA\Theming\Themes\LightTheme;
use OCP\IConfig;
use OCP\IUser;
use OCP\IUserSession;
@@ -43,6 +44,7 @@ class ThemesService {
public function __construct(IUserSession $userSession,
IConfig $config,
DefaultTheme $defaultTheme,
+ LightTheme $lightTheme,
DarkTheme $darkTheme,
HighContrastTheme $highContrastTheme,
DarkHighContrastTheme $darkHighContrastTheme,
@@ -53,6 +55,7 @@ class ThemesService {
// Register themes
$this->themesProviders = [
$defaultTheme->getId() => $defaultTheme,
+ $lightTheme->getId() => $lightTheme,
$darkTheme->getId() => $darkTheme,
$highContrastTheme->getId() => $highContrastTheme,
$darkHighContrastTheme->getId() => $darkHighContrastTheme,
@@ -152,8 +155,14 @@ class ThemesService {
return [];
}
+ $enforcedTheme = $this->config->getSystemValueString('enforce_theme', '');
+ $enabledThemes = json_decode($this->config->getUserValue($user->getUID(), Application::APP_ID, 'enabled-themes', '[]'));
+ if ($enforcedTheme !== '') {
+ return array_merge([$enforcedTheme], $enabledThemes);
+ }
+
try {
- return json_decode($this->config->getUserValue($user->getUID(), Application::APP_ID, 'enabled-themes', '[]'));
+ return $enabledThemes;
} catch (\Exception $e) {
return [];
}
@@ -167,6 +176,6 @@ class ThemesService {
*/
private function setEnabledThemes(array $themes): void {
$user = $this->userSession->getUser();
- $this->config->setUserValue($user->getUID(), Application::APP_ID, 'enabled-themes', json_encode(array_unique(array_values($themes))));
+ $this->config->setUserValue($user->getUID(), Application::APP_ID, 'enabled-themes', json_encode(array_values(array_unique($themes))));
}
}
diff --git a/apps/theming/lib/Settings/Personal.php b/apps/theming/lib/Settings/Personal.php
index 6dd865b9cf6..790c0fd7f39 100644
--- a/apps/theming/lib/Settings/Personal.php
+++ b/apps/theming/lib/Settings/Personal.php
@@ -25,6 +25,7 @@
*/
namespace OCA\Theming\Settings;
+use OCA\Theming\ITheme;
use OCA\Theming\Service\ThemesService;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\AppFramework\Services\IInitialState;
@@ -54,6 +55,8 @@ class Personal implements ISettings {
}
public function getForm(): TemplateResponse {
+ $enforcedTheme = $this->config->getSystemValueString('enforce_theme', '');
+
$themes = array_map(function($theme) {
return [
'id' => $theme->getId(),
@@ -65,7 +68,14 @@ class Personal implements ISettings {
];
}, $this->themesService->getThemes());
+ if ($enforcedTheme !== '') {
+ $themes = array_filter($themes, function($theme) use ($enforcedTheme) {
+ return $theme['type'] !== ITheme::TYPE_THEME || $theme['id'] === $enforcedTheme;
+ });
+ }
+
$this->initialStateService->provideInitialState('themes', array_values($themes));
+ $this->initialStateService->provideInitialState('enforceTheme', $enforcedTheme);
Util::addScript($this->appName, 'theming-settings');
return new TemplateResponse($this->appName, 'settings-personal');
diff --git a/apps/theming/lib/Themes/DarkTheme.php b/apps/theming/lib/Themes/DarkTheme.php
index b2dc1dcea72..f5463d94fc4 100644
--- a/apps/theming/lib/Themes/DarkTheme.php
+++ b/apps/theming/lib/Themes/DarkTheme.php
@@ -45,7 +45,7 @@ class DarkTheme extends DefaultTheme implements ITheme {
}
public function getDescription(): string {
- return $this->l->t('A dark theme to ease your eyes by reducing the overall luminosity and brightness. It is still under development, so please report any issues you may find.');
+ return $this->l->t('A dark theme to ease your eyes by reducing the overall luminosity and brightness.');
}
public function getCSSVariables(): array {
diff --git a/apps/theming/lib/Themes/DefaultTheme.php b/apps/theming/lib/Themes/DefaultTheme.php
index 191cb5814af..a98d9099d95 100644
--- a/apps/theming/lib/Themes/DefaultTheme.php
+++ b/apps/theming/lib/Themes/DefaultTheme.php
@@ -67,15 +67,15 @@ class DefaultTheme implements ITheme {
}
public function getTitle(): string {
- return $this->l->t('Light theme');
+ return $this->l->t('System default theme');
}
public function getEnableLabel(): string {
- return $this->l->t('Enable the default light theme');
+ return $this->l->t('Enable the system default');
}
public function getDescription(): string {
- return $this->l->t('The default light appearance.');
+ return $this->l->t('Using the default system appearance.');
}
public function getMediaQuery(): string {
@@ -89,6 +89,8 @@ class DefaultTheme implements ITheme {
$colorBoxShadow = $this->util->darken($colorMainBackground, 70);
$colorBoxShadowRGB = join(',', $this->util->hexToRGB($colorBoxShadow));
+ $hasCustomLogoHeader = $this->imageManager->hasImage('logo') || $this->imageManager->hasImage('logoheader');
+
$variables = [
'--color-main-background' => $colorMainBackground,
'--color-main-background-rgb' => $colorMainBackgroundRGB,
@@ -175,8 +177,11 @@ class DefaultTheme implements ITheme {
// to be used for legacy reasons only. Use inline
// svg with proper css variable instead or material
// design icons.
- '--primary-invert-if-bright' => $this->util->invertTextColor($this->primaryColor) ? 'invert(100%)' : 'unset',
- '--background-invert-if-dark' => 'unset',
+ // ⚠️ Using 'no' as a value to make sure we specify an
+ // invalid one with no fallback. 'unset' could here fallback to some
+ // other theme with media queries
+ '--primary-invert-if-bright' => $this->util->invertTextColor($this->primaryColor) ? 'invert(100%)' : 'no',
+ '--background-invert-if-dark' => 'no',
];
// Register image variables only if custom-defined
@@ -185,7 +190,7 @@ class DefaultTheme implements ITheme {
if ($this->imageManager->hasImage($image)) {
// If primary as background has been request, let's not define the background image
if ($image === 'background' && $backgroundDeleted) {
- $variables["--image-background-plain"] = true;
+ $variables["--image-background-plain"] = 'true';
continue;
} else if ($image === 'background') {
$variables['--image-background-size'] = 'cover';
@@ -194,6 +199,10 @@ class DefaultTheme implements ITheme {
}
}
+ if ($hasCustomLogoHeader) {
+ $variables["--image-logoheader-custom"] = 'true';
+ }
+
return $variables;
}
diff --git a/apps/theming/lib/Themes/LightTheme.php b/apps/theming/lib/Themes/LightTheme.php
new file mode 100644
index 00000000000..e988f612226
--- /dev/null
+++ b/apps/theming/lib/Themes/LightTheme.php
@@ -0,0 +1,61 @@
+<?php
+declare(strict_types=1);
+/**
+ * @copyright Copyright (c) 2022 Joas Schilling <coding@schilljs.com>
+ *
+ * @author Joas Schilling <coding@schilljs.com>
+ * @author John Molakvoæ <skjnldsv@protonmail.com>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+namespace OCA\Theming\Themes;
+
+use OCA\Theming\ImageManager;
+use OCA\Theming\ThemingDefaults;
+use OCA\Theming\Util;
+use OCA\Theming\ITheme;
+use OCA\Theming\Themes\DefaultTheme;
+use OCP\IConfig;
+use OCP\IL10N;
+use OCP\IURLGenerator;
+
+class LightTheme extends DefaultTheme implements ITheme {
+
+ public function getId(): string {
+ return 'light';
+ }
+
+ public function getType(): int {
+ return ITheme::TYPE_THEME;
+ }
+
+ public function getTitle(): string {
+ return $this->l->t('Light theme');
+ }
+
+ public function getEnableLabel(): string {
+ return $this->l->t('Enable the default light theme');
+ }
+
+ public function getDescription(): string {
+ return $this->l->t('The default light appearance.');
+ }
+
+ public function getMediaQuery(): string {
+ return '(prefers-color-scheme: light)';
+ }
+}
diff --git a/apps/theming/src/UserThemes.vue b/apps/theming/src/UserThemes.vue
index 1fd6cb20866..5128e2c6c8d 100644
--- a/apps/theming/src/UserThemes.vue
+++ b/apps/theming/src/UserThemes.vue
@@ -6,16 +6,20 @@
<div class="theming__preview-list">
<ItemPreview v-for="theme in themes"
:key="theme.id"
- :theme="theme"
+ :enforced="theme.id === enforceTheme"
:selected="selectedTheme.id === theme.id"
- :themes="themes"
+ :theme="theme"
+ :unique="themes.length === 1"
type="theme"
@change="changeTheme" />
+ </div>
+
+ <div class="theming__preview-list">
<ItemPreview v-for="theme in fonts"
:key="theme.id"
- :theme="theme"
:selected="theme.enabled"
- :themes="fonts"
+ :theme="theme"
+ :unique="fonts.length === 1"
type="font"
@change="changeFont" />
</div>
@@ -31,6 +35,7 @@ import SettingsSection from '@nextcloud/vue/dist/Components/SettingsSection'
import ItemPreview from './components/ItemPreview'
const availableThemes = loadState('theming', 'themes', [])
+const enforceTheme = loadState('theming', 'enforceTheme', '')
console.debug('Available themes', availableThemes)
@@ -44,6 +49,7 @@ export default {
data() {
return {
availableThemes,
+ enforceTheme,
}
},
@@ -147,8 +153,8 @@ export default {
},
}
</script>
-<style lang="scss" scoped>
+<style lang="scss" scoped>
.theming {
// Limit width of settings sections for readability
p {
diff --git a/apps/theming/src/components/ItemPreview.vue b/apps/theming/src/components/ItemPreview.vue
index 82d588059a2..fac25ac7ae7 100644
--- a/apps/theming/src/components/ItemPreview.vue
+++ b/apps/theming/src/components/ItemPreview.vue
@@ -1,11 +1,15 @@
<template>
- <div class="theming__preview">
- <div class="theming__preview-image" :style="{ backgroundImage: 'url(' + img + ')' }" />
+ <div :class="'theming__preview--' + theme.id" class="theming__preview">
+ <div class="theming__preview-image" :style="{ backgroundImage: 'url(' + img + ')' }" @click="onToggle" />
<div class="theming__preview-description">
<h3>{{ theme.title }}</h3>
<p>{{ theme.description }}</p>
+ <span v-if="enforced" class="theming__preview-warning" role="note">
+ {{ t('theming', 'Theme selection is enforced') }}
+ </span>
<CheckboxRadioSwitch class="theming__preview-toggle"
:checked.sync="checked"
+ :disabled="enforced"
:name="name"
:type="switchType">
{{ theme.enableLabel }}
@@ -24,30 +28,34 @@ export default {
CheckboxRadioSwitch,
},
props: {
- theme: {
- type: Object,
- required: true,
+ enforced: {
+ type: Boolean,
+ default: false,
},
selected: {
type: Boolean,
default: false,
},
+ theme: {
+ type: Object,
+ required: true,
+ },
type: {
type: String,
default: '',
},
- themes: {
- type: Array,
- default: () => [],
+ unique: {
+ type: Boolean,
+ default: false,
},
},
computed: {
switchType() {
- return this.themes.length === 1 ? 'switch' : 'radio'
+ return this.unique ? 'switch' : 'radio'
},
name() {
- return this.switchType === 'radio' ? this.type : null
+ return !this.unique ? this.type : null
},
img() {
@@ -62,7 +70,7 @@ export default {
console.debug('Selecting theme', this.theme, checked)
// If this is a radio, we can only enable
- if (this.switchType === 'radio') {
+ if (!this.unique) {
this.$emit('change', { enabled: true, id: this.theme.id })
return
}
@@ -72,14 +80,25 @@ export default {
},
},
},
+
+ methods: {
+ onToggle() {
+ if (this.switchType === 'radio') {
+ this.checked = true
+ return
+ }
+
+ // Invert state
+ this.checked = !this.checked
+ },
+ },
}
</script>
<style lang="scss" scoped>
-// We make previews on 16/10 screens
-$ratio: 16;
-
.theming__preview {
+ // We make previews on 16/10 screens
--ratio: 16;
+
position: relative;
display: flex;
justify-content: flex-start;
@@ -95,6 +114,7 @@ $ratio: 16;
flex-shrink: 0;
height: calc(10px * var(--ratio));
margin-right: var(--gap);
+ cursor: pointer;
border-radius: var(--border-radius);
background-repeat: no-repeat;
background-position: top left;
@@ -109,6 +129,14 @@ $ratio: 16;
padding: 12px 0;
}
}
+
+ &--default {
+ grid-column: span 2;
+ }
+
+ &-warning {
+ color: var(--color-warning);
+ }
}
@media (max-width: (1024px / 1.5)) {
diff --git a/apps/theming/tests/Controller/UserThemeControllerTest.php b/apps/theming/tests/Controller/UserThemeControllerTest.php
index b925085bf41..952cd012210 100644
--- a/apps/theming/tests/Controller/UserThemeControllerTest.php
+++ b/apps/theming/tests/Controller/UserThemeControllerTest.php
@@ -30,6 +30,7 @@ use OCA\Theming\Themes\DefaultTheme;
use OCA\Theming\Themes\DyslexiaFont;
use OCA\Theming\Themes\HighContrastTheme;
use OCA\Theming\Service\ThemesService;
+use OCA\Theming\Themes\LightTheme;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\OCS\OCSBadRequestException;
use OCP\IConfig;
@@ -63,6 +64,7 @@ class UserThemeControllerTest extends TestCase {
$this->themes = [
'default' => $this->createMock(DefaultTheme::class),
+ 'light' => $this->createMock(LightTheme::class),
'dark' => $this->createMock(DarkTheme::class),
'highcontrast' => $this->createMock(HighContrastTheme::class),
'dark-highcontrast' => $this->createMock(DarkHighContrastTheme::class),
@@ -91,6 +93,7 @@ class UserThemeControllerTest extends TestCase {
public function dataTestThemes() {
return [
['default'],
+ ['light'],
['dark'],
['highcontrast'],
['dark-highcontrast'],
diff --git a/apps/theming/tests/Service/ThemesServiceTest.php b/apps/theming/tests/Service/ThemesServiceTest.php
index 56f96d29637..90816ae2328 100644
--- a/apps/theming/tests/Service/ThemesServiceTest.php
+++ b/apps/theming/tests/Service/ThemesServiceTest.php
@@ -31,6 +31,7 @@ use OCA\Theming\Themes\DefaultTheme;
use OCA\Theming\Themes\DyslexiaFont;
use OCA\Theming\Themes\HighContrastTheme;
use OCA\Theming\Service\ThemesService;
+use OCA\Theming\Themes\LightTheme;
use OCA\Theming\ThemingDefaults;
use OCA\Theming\Util;
use OCP\AppFramework\Http\DataResponse;
@@ -81,6 +82,7 @@ class ThemesServiceTest extends TestCase {
public function testGetThemes() {
$expected = [
'default',
+ 'light',
'dark',
'highcontrast',
'dark-highcontrast',
@@ -92,6 +94,7 @@ class ThemesServiceTest extends TestCase {
public function dataTestEnableTheme() {
return [
+ ['default', [], ['default']],
['dark', [], ['dark']],
['dark', ['dark'], ['dark']],
['opendyslexic', ['dark'], ['dark', 'opendyslexic']],
@@ -174,7 +177,7 @@ class ThemesServiceTest extends TestCase {
* @param string $toEnable
* @param string[] $enabledThemes
*/
- public function testisEnabled(string $themeId, array $enabledThemes, $expected) {
+ public function testIsEnabled(string $themeId, array $enabledThemes, $expected) {
$user = $this->createMock(IUser::class);
$this->userSession->expects($this->any())
->method('getUser')
@@ -192,6 +195,82 @@ class ThemesServiceTest extends TestCase {
$this->assertEquals($expected, $this->themesService->isEnabled($this->themes[$themeId]));
}
+ public function testGetEnabledThemes() {
+ $user = $this->createMock(IUser::class);
+ $this->userSession->expects($this->any())
+ ->method('getUser')
+ ->willReturn($user);
+ $user->expects($this->any())
+ ->method('getUID')
+ ->willReturn('user');
+
+
+ $this->config->expects($this->once())
+ ->method('getUserValue')
+ ->with('user', Application::APP_ID, 'enabled-themes', '[]')
+ ->willReturn(json_encode([]));
+ $this->config->expects($this->once())
+ ->method('getSystemValueString')
+ ->with('enforce_theme', '')
+ ->willReturn('');
+
+ $this->assertEquals([], $this->themesService->getEnabledThemes());
+ }
+
+ public function testGetEnabledThemesEnforced() {
+ $user = $this->createMock(IUser::class);
+ $this->userSession->expects($this->any())
+ ->method('getUser')
+ ->willReturn($user);
+ $user->expects($this->any())
+ ->method('getUID')
+ ->willReturn('user');
+
+
+ $this->config->expects($this->once())
+ ->method('getUserValue')
+ ->with('user', Application::APP_ID, 'enabled-themes', '[]')
+ ->willReturn(json_encode([]));
+ $this->config->expects($this->once())
+ ->method('getSystemValueString')
+ ->with('enforce_theme', '')
+ ->willReturn('light');
+
+ $this->assertEquals(['light'], $this->themesService->getEnabledThemes());
+ }
+
+
+ public function dataTestSetEnabledThemes() {
+ return [
+ [[], []],
+ [['light'], ['light']],
+ [['dark'], ['dark']],
+ [['dark', 'dark', 'opendyslexic'], ['dark', 'opendyslexic']],
+ ];
+ }
+
+ /**
+ * @dataProvider dataTestSetEnabledThemes
+ *
+ * @param string[] $enabledThemes
+ * @param string[] $expected
+ */
+ public function testSetEnabledThemes(array $enabledThemes, array $expected) {
+ $user = $this->createMock(IUser::class);
+ $this->userSession->expects($this->any())
+ ->method('getUser')
+ ->willReturn($user);
+ $user->expects($this->any())
+ ->method('getUID')
+ ->willReturn('user');
+
+ $this->config->expects($this->once())
+ ->method('setUserValue')
+ ->with('user', Application::APP_ID, 'enabled-themes', json_encode($expected));
+
+ $this->invokePrivate($this->themesService, 'setEnabledThemes', [$enabledThemes]);
+ }
+
private function initThemes() {
$util = $this->createMock(Util::class);
$urlGenerator = $this->createMock(IURLGenerator::class);
@@ -207,6 +286,14 @@ class ThemesServiceTest extends TestCase {
$this->config,
$l10n,
),
+ 'light' => new LightTheme(
+ $util,
+ $this->themingDefaults,
+ $urlGenerator,
+ $imageManager,
+ $this->config,
+ $l10n,
+ ),
'dark' => new DarkTheme(
$util,
$this->themingDefaults,
diff --git a/apps/theming/tests/Settings/SectionTest.php b/apps/theming/tests/Settings/AdminSectionTest.php
index c168f13728d..80223664ce4 100644
--- a/apps/theming/tests/Settings/SectionTest.php
+++ b/apps/theming/tests/Settings/AdminSectionTest.php
@@ -29,7 +29,7 @@ use OCP\IL10N;
use OCP\IURLGenerator;
use Test\TestCase;
-class SectionTest extends TestCase {
+class AdminSectionTest extends TestCase {
/** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
private $url;
/** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */
diff --git a/apps/theming/tests/Settings/PersonalTest.php b/apps/theming/tests/Settings/PersonalTest.php
new file mode 100644
index 00000000000..5f0585911bb
--- /dev/null
+++ b/apps/theming/tests/Settings/PersonalTest.php
@@ -0,0 +1,209 @@
+<?php
+/**
+ * @copyright Copyright (c) 2016 Lukas Reschke <lukas@statuscode.ch>
+ *
+ * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
+ * @author Jan-Christoph Borchardt <hey@jancborchardt.net>
+ * @author Julius Härtl <jus@bitgrid.net>
+ * @author Lukas Reschke <lukas@statuscode.ch>
+ * @author Morris Jobke <hey@morrisjobke.de>
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+namespace OCA\Theming\Tests\Settings;
+
+use OCA\Theming\AppInfo\Application;
+use OCA\Theming\ImageManager;
+use OCA\Theming\Service\ThemesService;
+use OCA\Theming\Settings\Personal;
+use OCA\Theming\Themes\DarkHighContrastTheme;
+use OCA\Theming\Themes\DarkTheme;
+use OCA\Theming\Themes\DefaultTheme;
+use OCA\Theming\Themes\DyslexiaFont;
+use OCA\Theming\Themes\HighContrastTheme;
+use OCA\Theming\Themes\LightTheme;
+use OCA\Theming\ThemingDefaults;
+use OCA\Theming\Util;
+use OCA\Theming\ITheme;
+use OCP\AppFramework\Http\TemplateResponse;
+use OCP\AppFramework\Services\IInitialState;
+use OCP\IConfig;
+use OCP\IL10N;
+use OCP\IURLGenerator;
+use OCP\IUserSession;
+use Test\TestCase;
+
+class PersonalTest extends TestCase {
+ private IConfig $config;
+ private IUserSession $userSession;
+ private ThemesService $themesService;
+ private IInitialState $initialStateService;
+
+ /** @var ITheme[] */
+ private $themes;
+
+ protected function setUp(): void {
+ parent::setUp();
+ $this->config = $this->createMock(IConfig::class);
+ $this->userSession = $this->createMock(IUserSession::class);
+ $this->themesService = $this->createMock(ThemesService::class);
+ $this->initialStateService = $this->createMock(IInitialState::class);
+
+ $this->initThemes();
+
+ $this->themesService
+ ->expects($this->any())
+ ->method('getThemes')
+ ->willReturn($this->themes);
+
+ $this->admin = new Personal(
+ Application::APP_ID,
+ $this->config,
+ $this->userSession,
+ $this->themesService,
+ $this->initialStateService
+ );
+ }
+
+
+ public function dataTestGetForm() {
+ return [
+ ['', [
+ $this->formatThemeForm('default'),
+ $this->formatThemeForm('light'),
+ $this->formatThemeForm('dark'),
+ $this->formatThemeForm('highcontrast'),
+ $this->formatThemeForm('dark-highcontrast'),
+ $this->formatThemeForm('opendyslexic'),
+ ]],
+ ['dark', [
+ $this->formatThemeForm('dark'),
+ $this->formatThemeForm('opendyslexic'),
+ ]],
+ ];
+ }
+
+ /**
+ * @dataProvider dataTestGetForm
+ *
+ * @param string $toEnable
+ * @param string[] $enabledThemes
+ */
+ public function testGetForm(string $enforcedTheme, $themesState) {
+ $this->config->expects($this->once())
+ ->method('getSystemValueString')
+ ->with('enforce_theme', '')
+ ->willReturn($enforcedTheme);
+
+ $this->initialStateService->expects($this->at(0))
+ ->method('provideInitialState')
+ ->with('themes', $themesState);
+ $this->initialStateService->expects($this->at(1))
+ ->method('provideInitialState')
+ ->with('enforceTheme', $enforcedTheme);
+
+ $expected = new TemplateResponse('theming', 'settings-personal');
+ $this->assertEquals($expected, $this->admin->getForm());
+ }
+
+ public function testGetSection() {
+ $this->assertSame('theming', $this->admin->getSection());
+ }
+
+ public function testGetPriority() {
+ $this->assertSame(40, $this->admin->getPriority());
+ }
+
+ private function initThemes() {
+ $util = $this->createMock(Util::class);
+ $themingDefaults = $this->createMock(ThemingDefaults::class);
+ $urlGenerator = $this->createMock(IURLGenerator::class);
+ $imageManager = $this->createMock(ImageManager::class);
+ $config = $this->createMock(IConfig::class);
+ $l10n = $this->createMock(IL10N::class);
+
+ $themingDefaults->expects($this->any())
+ ->method('getColorPrimary')
+ ->willReturn('#0082c9');
+
+ $this->themes = [
+ 'default' => new DefaultTheme(
+ $util,
+ $themingDefaults,
+ $urlGenerator,
+ $imageManager,
+ $config,
+ $l10n,
+ ),
+ 'light' => new LightTheme(
+ $util,
+ $themingDefaults,
+ $urlGenerator,
+ $imageManager,
+ $config,
+ $l10n,
+ ),
+ 'dark' => new DarkTheme(
+ $util,
+ $themingDefaults,
+ $urlGenerator,
+ $imageManager,
+ $config,
+ $l10n,
+ ),
+ 'highcontrast' => new HighContrastTheme(
+ $util,
+ $themingDefaults,
+ $urlGenerator,
+ $imageManager,
+ $config,
+ $l10n,
+ ),
+ 'dark-highcontrast' => new DarkHighContrastTheme(
+ $util,
+ $themingDefaults,
+ $urlGenerator,
+ $imageManager,
+ $config,
+ $l10n,
+ ),
+ 'opendyslexic' => new DyslexiaFont(
+ $util,
+ $themingDefaults,
+ $urlGenerator,
+ $imageManager,
+ $config,
+ $l10n,
+ ),
+ ];
+ }
+
+ private function formatThemeForm(string $themeId): array {
+ $this->initThemes();
+
+ $theme = $this->themes[$themeId];
+ return [
+ 'id' => $theme->getId(),
+ 'type' => $theme->getType(),
+ 'title' => $theme->getTitle(),
+ 'enableLabel' => $theme->getEnableLabel(),
+ 'description' => $theme->getDescription(),
+ 'enabled' => false,
+ ];
+ }
+}
diff --git a/apps/theming/tests/Themes/DefaultThemeTest.php b/apps/theming/tests/Themes/DefaultThemeTest.php
index b9302bb4c95..160efdba142 100644
--- a/apps/theming/tests/Themes/DefaultThemeTest.php
+++ b/apps/theming/tests/Themes/DefaultThemeTest.php
@@ -97,15 +97,15 @@ class DefaultThemeTest extends TestCase {
}
public function testGetTitle() {
- $this->assertEquals('Light theme', $this->defaultTheme->getTitle());
+ $this->assertEquals('System default theme', $this->defaultTheme->getTitle());
}
public function testGetEnableLabel() {
- $this->assertEquals('Enable the default light theme', $this->defaultTheme->getEnableLabel());
+ $this->assertEquals('Enable the system default', $this->defaultTheme->getEnableLabel());
}
public function testGetDescription() {
- $this->assertEquals('The default light appearance.', $this->defaultTheme->getDescription());
+ $this->assertEquals('Using the default system appearance.', $this->defaultTheme->getDescription());
}
public function testGetMediaQuery() {