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:
HJ 2025-03-11 09:23:46 +00:00
commit 68357fb890
10 changed files with 22 additions and 2 deletions

View file

@ -0,0 +1 @@
Enable mobile theme editing

View file

@ -22,7 +22,7 @@
<AppearanceTab />
</div>
<div
v-if="expertLevel > 0 && !isMobileLayout"
v-if="expertLevel > 0"
:label="$t('settings.style.themes3.editor.title')"
icon="palette"
data-tab-name="style"
@ -31,7 +31,7 @@
<StyleTab />
</div>
<div
v-if="expertLevel > 0 && !isMobileLayout"
v-if="expertLevel > 0"
:label="$t('settings.theme_old')"
icon="paint-brush"
data-tab-name="theme"

View file

@ -336,6 +336,15 @@
{{ $t('settings.show_scrollbars') }}
</BooleanSetting>
</li>
<li>
<UnitSetting
path="themeEditorMinWidth"
:units="['px', 'rem']"
expert="1"
>
{{ $t('settings.theme_editor_min_width') }}
</UnitSetting>
</li>
</ul>
</div>
<div class="setting-item">

View file

@ -1,4 +1,6 @@
.StyleTab {
min-width: var(--themeEditorMinWidth, fit-content);
.style-control {
display: flex;
flex-wrap: wrap;

View file

@ -1,4 +1,6 @@
.theme-tab {
min-width: var(--themeEditorMinWidth, fit-content);
.deprecation-warning {
padding: 0.5em;
margin: 2em;

View file

@ -709,6 +709,7 @@
"column_sizes_sidebar": "Sidebar",
"column_sizes_content": "Content",
"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_fade_ancestors": "Display ancestors of the current status in faint text",
"conversation_display_linear": "Linear-style",

View file

@ -13,6 +13,7 @@ const APPEARANCE_SETTINGS_KEYS = new Set([
'sidebarColumnWidth',
'contentColumnWidth',
'notifsColumnWidth',
'themeEditorMinWidth',
'textSize',
'navbarSize',
'panelHeaderSize',

View file

@ -121,6 +121,7 @@ export const defaultState = {
sidebarColumnWidth: '25rem',
contentColumnWidth: '45rem',
notifsColumnWidth: '25rem',
themeEditorMinWidth: undefined, // instance default
emojiReactionsScale: undefined,
textSize: undefined, // instance default
emojiSize: undefined, // instance default

View file

@ -112,6 +112,7 @@ const defaultState = {
emojiSize: '2.2rem',
navbarSize: '3.5rem',
panelHeaderSize: '3.2rem',
themeEditorMinWidth: '0rem',
forcedRoundness: -1,
fontsOverride: {},
virtualScrolling: true,

View file

@ -187,6 +187,7 @@ const extractStyleConfig = ({
sidebarColumnWidth,
contentColumnWidth,
notifsColumnWidth,
themeEditorMinWidth,
emojiReactionsScale,
emojiSize,
navbarSize,
@ -198,6 +199,7 @@ const extractStyleConfig = ({
sidebarColumnWidth,
contentColumnWidth,
notifsColumnWidth,
themeEditorMinWidth: parseInt(themeEditorMinWidth) === 0 ? 'fit-content' : themeEditorMinWidth,
emojiReactionsScale,
emojiSize,
navbarSize,