add option to center the modal
This commit is contained in:
parent
1603193436
commit
b461fc1c4a
6 changed files with 18 additions and 1 deletions
|
@ -8,6 +8,11 @@ const DialogModal = {
|
||||||
default: () => {},
|
default: () => {},
|
||||||
type: Function
|
type: Function
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
mobileCenter () {
|
||||||
|
return this.$store.getters.mergedConfig.modalMobileCenter
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<span
|
<span
|
||||||
class="dialog-container"
|
class="dialog-container"
|
||||||
:class="{ 'dark-overlay': darkOverlay }"
|
:class="{ 'dark-overlay': darkOverlay, '-center-mobile': mobileCenter }"
|
||||||
@click.self.stop="onCancel()"
|
@click.self.stop="onCancel()"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
@ -100,6 +100,10 @@
|
||||||
justify-content: stretch;
|
justify-content: stretch;
|
||||||
align-items: end;
|
align-items: end;
|
||||||
justify-items: stretch;
|
justify-items: stretch;
|
||||||
|
|
||||||
|
&.-center-mobile {
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog-modal.panel {
|
.dialog-modal.panel {
|
||||||
|
|
|
@ -345,6 +345,11 @@
|
||||||
<div class="setting-item">
|
<div class="setting-item">
|
||||||
<h2>{{ $t('settings.visual_tweaks') }}</h2>
|
<h2>{{ $t('settings.visual_tweaks') }}</h2>
|
||||||
<ul class="setting-list">
|
<ul class="setting-list">
|
||||||
|
<li>
|
||||||
|
<BooleanSetting path="modalMobileCenter">
|
||||||
|
{{ $t('settings.mobile_center_dialog') }}
|
||||||
|
</BooleanSetting>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<ChoiceSetting
|
<ChoiceSetting
|
||||||
id="forcedRoundness"
|
id="forcedRoundness"
|
||||||
|
|
|
@ -381,6 +381,7 @@
|
||||||
"actor_type_Person": "a normal user",
|
"actor_type_Person": "a normal user",
|
||||||
"actor_type_Service": "a bot",
|
"actor_type_Service": "a bot",
|
||||||
"actor_type_Group": "a group",
|
"actor_type_Group": "a group",
|
||||||
|
"mobile_center_dialog": "Vertically center dialogs on mobile",
|
||||||
"app_name": "App name",
|
"app_name": "App name",
|
||||||
"expert_mode": "Show advanced",
|
"expert_mode": "Show advanced",
|
||||||
"save": "Save changes",
|
"save": "Save changes",
|
||||||
|
|
|
@ -142,6 +142,7 @@ export const defaultState = {
|
||||||
modalOnApproveFollow: undefined, // instance default
|
modalOnApproveFollow: undefined, // instance default
|
||||||
modalOnDenyFollow: undefined, // instance default
|
modalOnDenyFollow: undefined, // instance default
|
||||||
modalOnRemoveUserFromFollowers: undefined, // instance default
|
modalOnRemoveUserFromFollowers: undefined, // instance default
|
||||||
|
modalMobileCenter: undefined,
|
||||||
playVideosInModal: false,
|
playVideosInModal: false,
|
||||||
useOneClickNsfw: false,
|
useOneClickNsfw: false,
|
||||||
useContainFit: true,
|
useContainFit: true,
|
||||||
|
|
|
@ -82,6 +82,7 @@ const defaultState = {
|
||||||
modalOnApproveFollow: false,
|
modalOnApproveFollow: false,
|
||||||
modalOnDenyFollow: false,
|
modalOnDenyFollow: false,
|
||||||
modalOnRemoveUserFromFollowers: false,
|
modalOnRemoveUserFromFollowers: false,
|
||||||
|
modalMobileCenter: false,
|
||||||
loginMethod: 'password',
|
loginMethod: 'password',
|
||||||
logo: '/static/logo.svg',
|
logo: '/static/logo.svg',
|
||||||
logoMargin: '.2em',
|
logoMargin: '.2em',
|
||||||
|
|
Loading…
Add table
Reference in a new issue