Merge branch 'tusooa/enable-mobile-theme-edit' into 'develop'
Enable mobile theme editing See merge request pleroma/pleroma-fe!2075
This commit is contained in:
commit
68357fb890
10 changed files with 22 additions and 2 deletions
changelog.d
src
components/settings_modal
i18n
modules
services/style_setter
1
changelog.d/mobile-theme-editing.fix
Normal file
1
changelog.d/mobile-theme-editing.fix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Enable mobile theme editing
|
|
@ -22,7 +22,7 @@
|
||||||
<AppearanceTab />
|
<AppearanceTab />
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="expertLevel > 0 && !isMobileLayout"
|
v-if="expertLevel > 0"
|
||||||
:label="$t('settings.style.themes3.editor.title')"
|
:label="$t('settings.style.themes3.editor.title')"
|
||||||
icon="palette"
|
icon="palette"
|
||||||
data-tab-name="style"
|
data-tab-name="style"
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
<StyleTab />
|
<StyleTab />
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="expertLevel > 0 && !isMobileLayout"
|
v-if="expertLevel > 0"
|
||||||
:label="$t('settings.theme_old')"
|
:label="$t('settings.theme_old')"
|
||||||
icon="paint-brush"
|
icon="paint-brush"
|
||||||
data-tab-name="theme"
|
data-tab-name="theme"
|
||||||
|
|
|
@ -336,6 +336,15 @@
|
||||||
{{ $t('settings.show_scrollbars') }}
|
{{ $t('settings.show_scrollbars') }}
|
||||||
</BooleanSetting>
|
</BooleanSetting>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<UnitSetting
|
||||||
|
path="themeEditorMinWidth"
|
||||||
|
:units="['px', 'rem']"
|
||||||
|
expert="1"
|
||||||
|
>
|
||||||
|
{{ $t('settings.theme_editor_min_width') }}
|
||||||
|
</UnitSetting>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting-item">
|
<div class="setting-item">
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
.StyleTab {
|
.StyleTab {
|
||||||
|
min-width: var(--themeEditorMinWidth, fit-content);
|
||||||
|
|
||||||
.style-control {
|
.style-control {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
.theme-tab {
|
.theme-tab {
|
||||||
|
min-width: var(--themeEditorMinWidth, fit-content);
|
||||||
|
|
||||||
.deprecation-warning {
|
.deprecation-warning {
|
||||||
padding: 0.5em;
|
padding: 0.5em;
|
||||||
margin: 2em;
|
margin: 2em;
|
||||||
|
|
|
@ -709,6 +709,7 @@
|
||||||
"column_sizes_sidebar": "Sidebar",
|
"column_sizes_sidebar": "Sidebar",
|
||||||
"column_sizes_content": "Content",
|
"column_sizes_content": "Content",
|
||||||
"column_sizes_notifs": "Notifications",
|
"column_sizes_notifs": "Notifications",
|
||||||
|
"theme_editor_min_width": "Minimum width of theme editor (0 for \"fit-content\")",
|
||||||
"tree_advanced": "Allow more flexible navigation in tree view",
|
"tree_advanced": "Allow more flexible navigation in tree view",
|
||||||
"tree_fade_ancestors": "Display ancestors of the current status in faint text",
|
"tree_fade_ancestors": "Display ancestors of the current status in faint text",
|
||||||
"conversation_display_linear": "Linear-style",
|
"conversation_display_linear": "Linear-style",
|
||||||
|
|
|
@ -13,6 +13,7 @@ const APPEARANCE_SETTINGS_KEYS = new Set([
|
||||||
'sidebarColumnWidth',
|
'sidebarColumnWidth',
|
||||||
'contentColumnWidth',
|
'contentColumnWidth',
|
||||||
'notifsColumnWidth',
|
'notifsColumnWidth',
|
||||||
|
'themeEditorMinWidth',
|
||||||
'textSize',
|
'textSize',
|
||||||
'navbarSize',
|
'navbarSize',
|
||||||
'panelHeaderSize',
|
'panelHeaderSize',
|
||||||
|
|
|
@ -121,6 +121,7 @@ export const defaultState = {
|
||||||
sidebarColumnWidth: '25rem',
|
sidebarColumnWidth: '25rem',
|
||||||
contentColumnWidth: '45rem',
|
contentColumnWidth: '45rem',
|
||||||
notifsColumnWidth: '25rem',
|
notifsColumnWidth: '25rem',
|
||||||
|
themeEditorMinWidth: undefined, // instance default
|
||||||
emojiReactionsScale: undefined,
|
emojiReactionsScale: undefined,
|
||||||
textSize: undefined, // instance default
|
textSize: undefined, // instance default
|
||||||
emojiSize: undefined, // instance default
|
emojiSize: undefined, // instance default
|
||||||
|
|
|
@ -112,6 +112,7 @@ const defaultState = {
|
||||||
emojiSize: '2.2rem',
|
emojiSize: '2.2rem',
|
||||||
navbarSize: '3.5rem',
|
navbarSize: '3.5rem',
|
||||||
panelHeaderSize: '3.2rem',
|
panelHeaderSize: '3.2rem',
|
||||||
|
themeEditorMinWidth: '0rem',
|
||||||
forcedRoundness: -1,
|
forcedRoundness: -1,
|
||||||
fontsOverride: {},
|
fontsOverride: {},
|
||||||
virtualScrolling: true,
|
virtualScrolling: true,
|
||||||
|
|
|
@ -187,6 +187,7 @@ const extractStyleConfig = ({
|
||||||
sidebarColumnWidth,
|
sidebarColumnWidth,
|
||||||
contentColumnWidth,
|
contentColumnWidth,
|
||||||
notifsColumnWidth,
|
notifsColumnWidth,
|
||||||
|
themeEditorMinWidth,
|
||||||
emojiReactionsScale,
|
emojiReactionsScale,
|
||||||
emojiSize,
|
emojiSize,
|
||||||
navbarSize,
|
navbarSize,
|
||||||
|
@ -198,6 +199,7 @@ const extractStyleConfig = ({
|
||||||
sidebarColumnWidth,
|
sidebarColumnWidth,
|
||||||
contentColumnWidth,
|
contentColumnWidth,
|
||||||
notifsColumnWidth,
|
notifsColumnWidth,
|
||||||
|
themeEditorMinWidth: parseInt(themeEditorMinWidth) === 0 ? 'fit-content' : themeEditorMinWidth,
|
||||||
emojiReactionsScale,
|
emojiReactionsScale,
|
||||||
emojiSize,
|
emojiSize,
|
||||||
navbarSize,
|
navbarSize,
|
||||||
|
|
Loading…
Add table
Reference in a new issue