fix: deduplicate settings styles (#1564)
This commit is contained in:
parent
7dde0a833b
commit
138fe83082
20
src/routes/_components/settings/UISettingsStyles.html
Normal file
20
src/routes/_components/settings/UISettingsStyles.html
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
<style>
|
||||||
|
:global(.ui-settings) {
|
||||||
|
background: var(--form-bg);
|
||||||
|
border: 1px solid var(--main-border);
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 20px;
|
||||||
|
line-height: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
:global(.setting-group) {
|
||||||
|
display: block;
|
||||||
|
padding: 5px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 240px) {
|
||||||
|
:global(.ui-settings) {
|
||||||
|
padding: 20px 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -90,36 +90,20 @@
|
||||||
<ThemeSettings instanceName={$currentInstance} />
|
<ThemeSettings instanceName={$currentInstance} />
|
||||||
{/if}
|
{/if}
|
||||||
</SettingsLayout>
|
</SettingsLayout>
|
||||||
<style>
|
<UISettingsStyles />
|
||||||
.ui-settings {
|
|
||||||
background: var(--form-bg);
|
|
||||||
border: 1px solid var(--main-border);
|
|
||||||
border-radius: 4px;
|
|
||||||
padding: 20px;
|
|
||||||
line-height: 2em;
|
|
||||||
}
|
|
||||||
.setting-group {
|
|
||||||
display: block;
|
|
||||||
padding: 5px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 240px) {
|
|
||||||
.ui-settings {
|
|
||||||
padding: 20px 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<script>
|
<script>
|
||||||
import SettingsLayout from '../../_components/settings/SettingsLayout.html'
|
import SettingsLayout from '../../_components/settings/SettingsLayout.html'
|
||||||
import ThemeSettings from '../../_components/settings/instance/ThemeSettings.html'
|
import ThemeSettings from '../../_components/settings/instance/ThemeSettings.html'
|
||||||
import { store } from '../../_store/store'
|
import { store } from '../../_store/store'
|
||||||
import Tooltip from '../../_components/Tooltip.html'
|
import Tooltip from '../../_components/Tooltip.html'
|
||||||
|
import UISettingsStyles from '../../_components/settings/UISettingsStyles.html'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
SettingsLayout,
|
SettingsLayout,
|
||||||
ThemeSettings,
|
ThemeSettings,
|
||||||
Tooltip
|
Tooltip,
|
||||||
|
UISettingsStyles
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onChange (event) {
|
onChange (event) {
|
||||||
|
|
|
@ -25,35 +25,22 @@
|
||||||
|
|
||||||
<ShortcutHelpInfo />
|
<ShortcutHelpInfo />
|
||||||
</SettingsLayout>
|
</SettingsLayout>
|
||||||
|
<UISettingsStyles />
|
||||||
<style>
|
<style>
|
||||||
.ui-settings {
|
.ui-settings {
|
||||||
background: var(--form-bg);
|
|
||||||
border: 1px solid var(--main-border);
|
|
||||||
border-radius: 4px;
|
|
||||||
padding: 20px;
|
|
||||||
line-height: 2em;
|
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
.setting-group {
|
|
||||||
display: block;
|
|
||||||
padding: 5px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
label.disabled-style {
|
label.disabled-style {
|
||||||
color: var(--deemphasized-text-color);
|
color: var(--deemphasized-text-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 240px) {
|
|
||||||
.ui-settings {
|
|
||||||
padding: 20px 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import SettingsLayout from '../../_components/settings/SettingsLayout.html'
|
import SettingsLayout from '../../_components/settings/SettingsLayout.html'
|
||||||
import ShortcutHelpInfo from '../../_components/ShortcutHelpInfo.html'
|
import ShortcutHelpInfo from '../../_components/ShortcutHelpInfo.html'
|
||||||
import { store } from '../../_store/store'
|
import { store } from '../../_store/store'
|
||||||
import { isKaiOS } from '../../_utils/userAgent'
|
import { isKaiOS } from '../../_utils/userAgent'
|
||||||
|
import UISettingsStyles from '../../_components/settings/UISettingsStyles.html'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
store: () => store,
|
store: () => store,
|
||||||
|
@ -72,7 +59,8 @@
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
SettingsLayout,
|
SettingsLayout,
|
||||||
ShortcutHelpInfo
|
ShortcutHelpInfo,
|
||||||
|
UISettingsStyles
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -63,33 +63,18 @@
|
||||||
<ExternalLink href="https://humanetech.com">Center for Humane Technology</ExternalLink>.
|
<ExternalLink href="https://humanetech.com">Center for Humane Technology</ExternalLink>.
|
||||||
</p>
|
</p>
|
||||||
</SettingsLayout>
|
</SettingsLayout>
|
||||||
|
<UISettingsStyles />
|
||||||
<style>
|
<style>
|
||||||
.ui-settings {
|
|
||||||
background: var(--form-bg);
|
|
||||||
border: 1px solid var(--main-border);
|
|
||||||
border-radius: 4px;
|
|
||||||
padding: 20px;
|
|
||||||
line-height: 2em;
|
|
||||||
}
|
|
||||||
.setting-group {
|
|
||||||
display: block;
|
|
||||||
padding: 5px 0;
|
|
||||||
}
|
|
||||||
:global(.wellness-aside) {
|
:global(.wellness-aside) {
|
||||||
margin: 20px 10px 0px 10px;
|
margin: 20px 10px 0px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 240px) {
|
|
||||||
.ui-settings {
|
|
||||||
padding: 20px 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import SettingsLayout from '../../_components/settings/SettingsLayout.html'
|
import SettingsLayout from '../../_components/settings/SettingsLayout.html'
|
||||||
import { store } from '../../_store/store'
|
import { store } from '../../_store/store'
|
||||||
import ExternalLink from '../../_components/ExternalLink.html'
|
import ExternalLink from '../../_components/ExternalLink.html'
|
||||||
import InfoAside from '../../_components/InfoAside.html'
|
import InfoAside from '../../_components/InfoAside.html'
|
||||||
|
import UISettingsStyles from '../../_components/settings/UISettingsStyles.html'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
oncreate () {
|
oncreate () {
|
||||||
|
@ -98,7 +83,8 @@
|
||||||
components: {
|
components: {
|
||||||
SettingsLayout,
|
SettingsLayout,
|
||||||
ExternalLink,
|
ExternalLink,
|
||||||
InfoAside
|
InfoAside,
|
||||||
|
UISettingsStyles
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
flushChangesToCheckAll () {
|
flushChangesToCheckAll () {
|
||||||
|
|
Loading…
Reference in a new issue