Load theme as a user setting; allow the user to change it; update tests.
This commit is contained in:
@@ -21,7 +21,7 @@ html(itemscope, itemtype='http://schema.org/Product')
|
||||
link(rel="mask-icon", href="/" + settings.brandPrefix + "mask-favicon.svg", color=settings.brandPrefix === 'ol-' ? "#4f9c45" : "#a93529")
|
||||
|
||||
//- Stylesheet
|
||||
link(rel='stylesheet', href=buildCssPath("/" + settings.brandPrefix + (settings.themeModifier != null ? settings.themeModifier : "") + "style.css", {hashedPath:true}))
|
||||
link(rel='stylesheet', href=buildCssPath(buildCssFileName(userSettings), {hashedPath:true}))
|
||||
|
||||
block _headLinks
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ div.full-size(
|
||||
ng-if="!editor.showRichText",
|
||||
ng-show="!!editor.sharejs_doc && !editor.opening",
|
||||
style=richTextEnabled ? "top: 32px" : "",
|
||||
theme="settings.theme",
|
||||
theme="settings.editorTheme",
|
||||
keybindings="settings.mode",
|
||||
font-size="settings.fontSize",
|
||||
auto-complete="settings.autoComplete",
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
) #{translate("restore_to_before_these_changes")}
|
||||
.diff-editor.hide-ace-cursor(
|
||||
ace-editor="history",
|
||||
theme="settings.theme",
|
||||
theme="settings.editorTheme",
|
||||
font-size="settings.fontSize",
|
||||
text="history.diff.text",
|
||||
highlights="history.diff.highlights",
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
.diff-editor.hide-ace-cursor(
|
||||
ng-if="!history.diff.binary"
|
||||
ace-editor="history",
|
||||
theme="settings.theme",
|
||||
theme="settings.editorTheme",
|
||||
font-size="settings.fontSize",
|
||||
text="history.diff.text",
|
||||
highlights="history.diff.highlights",
|
||||
@@ -66,7 +66,7 @@
|
||||
.hide-ace-cursor(
|
||||
ng-if="!history.selectedFile.binary"
|
||||
ace-editor="history-pointintime",
|
||||
theme="settings.theme",
|
||||
theme="settings.editorTheme",
|
||||
font-size="settings.fontSize",
|
||||
text="history.selectedFile.text",
|
||||
read-only="true",
|
||||
|
||||
@@ -131,13 +131,22 @@ aside#left-menu.full-size(
|
||||
)
|
||||
|
||||
.form-controls
|
||||
label(for="theme") #{translate("theme")}
|
||||
label(for="editorTheme") #{translate("theme")}
|
||||
select(
|
||||
name="theme"
|
||||
ng-model="settings.theme"
|
||||
name="editorTheme"
|
||||
ng-model="settings.editorTheme"
|
||||
)
|
||||
each theme in themes
|
||||
option(value=theme) #{theme.replace(/_/g, ' ')}
|
||||
each editorTheme in editorThemes
|
||||
option(value=editorTheme) #{editorTheme.replace(/_/g, ' ')}
|
||||
|
||||
- if (settings.overleaf != null)
|
||||
.form-controls
|
||||
label(for="overallTheme") overall theme
|
||||
select(
|
||||
name="overallTheme"
|
||||
ng-model="settings.overallTheme"
|
||||
ng-options="o.v as o.n for o in [{ n: 'Default', v: '' }, { n: 'Light', v: 'light-' }]"
|
||||
)
|
||||
|
||||
.form-controls(ng-show="!anonymous")
|
||||
label(for="mode") #{translate("keybindings")}
|
||||
|
||||
Reference in New Issue
Block a user