better settings on mobile

This commit is contained in:
Henry Jameson 2024-12-01 22:20:13 +02:00
parent 13c482ea2a
commit 51b62be34d
4 changed files with 51 additions and 25 deletions

View file

@ -67,6 +67,9 @@ export default {
themeApplied () { themeApplied () {
return this.$store.state.interface.themeApplied return this.$store.state.interface.themeApplied
}, },
layoutModalClass () {
return '-' + this.layoutType
},
classes () { classes () {
return [ return [
{ {

View file

@ -70,7 +70,7 @@
<PostStatusModal /> <PostStatusModal />
<EditStatusModal v-if="editingAvailable" /> <EditStatusModal v-if="editingAvailable" />
<StatusHistoryModal v-if="editingAvailable" /> <StatusHistoryModal v-if="editingAvailable" />
<SettingsModal /> <SettingsModal :class="layoutModalClass"/>
<UpdateNotification /> <UpdateNotification />
<GlobalNoticeList /> <GlobalNoticeList />
</div> </div>

View file

@ -10,31 +10,33 @@
<slot /> <slot />
</label> </label>
{{ ' ' }} {{ ' ' }}
<input <span class="no-break">
:id="path" <input
class="input number-input" :id="path"
type="number" class="input number-input"
:step="step" type="number"
:disabled="disabled" :step="step"
:min="min || 0" :disabled="disabled"
:value="stateValue" :min="min || 0"
@change="updateValue" :value="stateValue"
> @change="updateValue"
<Select
:id="path"
:model-value="stateUnit"
:disabled="disabled"
class="unit-input unstyled"
@change="updateUnit"
>
<option
v-for="option in units"
:key="option"
:value="option"
> >
{{ getUnitString(option) }} <Select
</option> :id="path"
</Select> :model-value="stateUnit"
:disabled="disabled"
class="unit-input unstyled"
@change="updateUnit"
>
<option
v-for="option in units"
:key="option"
:value="option"
>
{{ getUnitString(option) }}
</option>
</Select>
</span>
{{ ' ' }} {{ ' ' }}
<ModifiedIndicator <ModifiedIndicator
:changed="isChanged" :changed="isChanged"
@ -47,6 +49,10 @@
<style lang="scss"> <style lang="scss">
.UnitSetting { .UnitSetting {
.no-break {
display: inline-block;
}
.number-input { .number-input {
max-width: 6.5em; max-width: 6.5em;
text-align: right; text-align: right;

View file

@ -76,6 +76,23 @@
} }
} }
&.-mobile {
.setting-list,
.option-list {
padding-left: 0.25em;
> li {
margin: 1em 0;
line-height: 1.5em;
vertical-align: center;
}
&.two-column {
column-count: 1;
}
}
}
&.peek { &.peek {
.settings-modal-panel { .settings-modal-panel {
/* Explanation: /* Explanation: