2018-03-14 01:14:57 +01:00
|
|
|
<SettingsLayout page='settings/general' label="General">
|
|
|
|
<h1>General Settings</h1>
|
|
|
|
|
2018-12-01 23:09:08 +01:00
|
|
|
<h2>Preferences</h2>
|
2018-03-14 01:14:57 +01:00
|
|
|
<form class="ui-settings" aria-label="UI settings">
|
|
|
|
<div class="setting-group">
|
|
|
|
<input type="checkbox" id="choice-mark-media-sensitive"
|
2018-12-01 23:09:08 +01:00
|
|
|
bind:checked="$markMediaAsSensitive" on:change="onChange(event)">
|
2018-03-14 01:14:57 +01:00
|
|
|
<label for="choice-mark-media-sensitive">Always mark media as sensitive</label>
|
|
|
|
</div>
|
2018-12-01 23:09:08 +01:00
|
|
|
<div class="setting-group">
|
|
|
|
<input type="checkbox" id="choice-never-mark-media-sensitive"
|
|
|
|
bind:checked="$neverMarkMediaAsSensitive" on:change="onChange(event)">
|
|
|
|
<label for="choice-never-mark-media-sensitive">Never mark media as sensitive</label>
|
|
|
|
</div>
|
|
|
|
<div class="setting-group">
|
|
|
|
<input type="checkbox" id="choice-disable-custom-scrollbars"
|
|
|
|
bind:checked="$disableCustomScrollbars" on:change="onChange(event)">
|
|
|
|
<label for="choice-disable-custom-scrollbars">Disable custom scrollbars</label>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
<h2>Accessibility</h2>
|
|
|
|
<form class="ui-settings" aria-label="UI settings">
|
|
|
|
<div class="setting-group">
|
|
|
|
<input type="checkbox" id="choice-autoplay-gif"
|
|
|
|
bind:checked="$autoplayGifs" on:change="onChange(event)">
|
|
|
|
<label for="choice-autoplay-gif">Autoplay GIFs</label>
|
|
|
|
</div>
|
2018-03-23 04:23:00 +01:00
|
|
|
<div class="setting-group">
|
|
|
|
<input type="checkbox" id="choice-reduce-motion"
|
2018-12-01 23:09:08 +01:00
|
|
|
bind:checked="$reduceMotion" on:change="onChange(event)">
|
2018-03-23 04:23:00 +01:00
|
|
|
<label for="choice-reduce-motion">Reduce motion in UI animations</label>
|
|
|
|
</div>
|
2018-08-20 03:03:26 +02:00
|
|
|
<div class="setting-group">
|
|
|
|
<input type="checkbox" id="choice-omit-emoji-in-display-names"
|
2018-12-01 23:09:08 +01:00
|
|
|
bind:checked="$omitEmojiInDisplayNames" on:change="onChange(event)">
|
2018-08-20 03:03:26 +02:00
|
|
|
<label for="choice-omit-emoji-in-display-names">Remove emoji from user display names</label>
|
|
|
|
</div>
|
2018-12-01 20:53:20 +01:00
|
|
|
<div class="setting-group">
|
|
|
|
<input type="checkbox" id="choice-disable-long-aria-labels"
|
2018-12-01 23:09:08 +01:00
|
|
|
bind:checked="$disableLongAriaLabels" on:change="onChange(event)">
|
2018-12-01 20:53:20 +01:00
|
|
|
<label for="choice-disable-long-aria-labels">Use short article ARIA labels</label>
|
|
|
|
</div>
|
2018-03-14 01:14:57 +01:00
|
|
|
</form>
|
2018-11-05 00:57:05 +01:00
|
|
|
|
2018-12-01 21:57:00 +01:00
|
|
|
<h2>{themeTitle}</h2>
|
|
|
|
<ThemeSettings instanceName={$currentInstance} />
|
2018-03-14 01:14:57 +01:00
|
|
|
</SettingsLayout>
|
|
|
|
<style>
|
|
|
|
.ui-settings {
|
|
|
|
background: var(--form-bg);
|
|
|
|
border: 1px solid var(--main-border);
|
|
|
|
border-radius: 4px;
|
|
|
|
padding: 20px;
|
|
|
|
line-height: 2em;
|
|
|
|
}
|
|
|
|
.setting-group {
|
|
|
|
padding: 5px 0;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
<script>
|
|
|
|
import SettingsLayout from '../../_components/settings/SettingsLayout.html'
|
2018-12-01 21:57:00 +01:00
|
|
|
import ThemeSettings from '../../_components/settings/instance/ThemeSettings.html'
|
2018-03-14 01:14:57 +01:00
|
|
|
import { store } from '../../_store/store'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
2018-12-01 21:57:00 +01:00
|
|
|
SettingsLayout,
|
|
|
|
ThemeSettings
|
2018-03-14 01:14:57 +01:00
|
|
|
},
|
2018-12-01 23:09:08 +01:00
|
|
|
methods: {
|
|
|
|
onChange (event) {
|
|
|
|
// these two are mutually exclusive
|
|
|
|
let { markMediaAsSensitive, neverMarkMediaAsSensitive } = this.store.get()
|
|
|
|
if (markMediaAsSensitive && neverMarkMediaAsSensitive) {
|
|
|
|
if (event.target.id === 'choice-mark-media-sensitive') {
|
|
|
|
this.store.set({ neverMarkMediaAsSensitive: false })
|
|
|
|
} else {
|
|
|
|
this.store.set({ markMediaAsSensitive: false })
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
this.store.save()
|
|
|
|
}
|
|
|
|
},
|
2018-12-01 21:57:00 +01:00
|
|
|
store: () => store,
|
|
|
|
computed: {
|
|
|
|
themeTitle: ({ $loggedInInstancesInOrder, $currentInstance }) => (
|
|
|
|
$loggedInInstancesInOrder.length > 1 ? `Theme for ${$currentInstance}` : 'Theme'
|
|
|
|
)
|
|
|
|
}
|
2018-04-20 06:38:01 +02:00
|
|
|
}
|
2018-11-05 00:57:05 +01:00
|
|
|
</script>
|