akkoma-fe/src/components/settings_modal/tabs/general_tab.vue

268 lines
8.1 KiB
Vue
Raw Normal View History

<template>
2020-05-25 00:43:55 +00:00
<div :label="$t('settings.general')">
<div class="setting-item">
<h2>{{ $t('settings.interface') }}</h2>
<ul class="setting-list">
<li>
<interface-language-switcher />
</li>
<li v-if="instanceSpecificPanelPresent">
<BooleanSetting path="hideISP">
2020-05-25 00:43:55 +00:00
{{ $t('settings.hide_isp') }}
</BooleanSetting>
2020-05-25 00:43:55 +00:00
</li>
</ul>
</div>
<div class="setting-item">
<h2>{{ $t('nav.timeline') }}</h2>
<ul class="setting-list">
<li>
<BooleanSetting path="hideMutedPosts">
{{ $t('settings.hide_muted_posts') }}
</BooleanSetting>
2020-05-25 00:43:55 +00:00
</li>
<li>
<BooleanSetting path="collapseMessageWithSubject">
{{ $t('settings.collapse_subject') }}
</BooleanSetting>
2020-05-25 00:43:55 +00:00
</li>
<li>
<BooleanSetting path="streaming">
2020-05-25 00:43:55 +00:00
{{ $t('settings.streaming') }}
</BooleanSetting>
2020-05-25 00:43:55 +00:00
<ul
class="setting-list suboptions"
:class="[{disabled: !streaming}]"
>
2020-05-25 00:43:55 +00:00
<li>
<BooleanSetting
path="pauseOnUnfocused"
2020-05-25 00:43:55 +00:00
:disabled="!streaming"
>
2020-05-25 00:43:55 +00:00
{{ $t('settings.pause_on_unfocused') }}
</BooleanSetting>
2020-05-25 00:43:55 +00:00
</li>
</ul>
</li>
<li>
<BooleanSetting path="useStreamingApi">
2020-05-25 00:43:55 +00:00
{{ $t('settings.useStreamingApi') }}
<br>
<small>
{{ $t('settings.useStreamingApiWarning') }}
</small>
</BooleanSetting>
2020-05-25 00:43:55 +00:00
</li>
<li>
<BooleanSetting path="emojiReactionsOnTimeline">
2020-05-25 00:43:55 +00:00
{{ $t('settings.emoji_reactions_on_timeline') }}
</BooleanSetting>
2020-05-25 00:43:55 +00:00
</li>
2020-09-29 10:18:37 +00:00
<li>
<Checkbox v-model="virtualScrolling">
{{ $t('settings.virtual_scrolling') }}
</Checkbox>
</li>
2020-05-25 00:43:55 +00:00
</ul>
</div>
2020-05-25 00:43:55 +00:00
<div class="setting-item">
<h2>{{ $t('settings.composing') }}</h2>
<ul class="setting-list">
<li>
<BooleanSetting path="scopeCopy">
{{ $t('settings.scope_copy') }}
</BooleanSetting>
2020-05-25 00:43:55 +00:00
</li>
<li>
<BooleanSetting path="alwaysShowSubjectInput">
{{ $t('settings.subject_input_always_show') }}
</BooleanSetting>
2020-05-25 00:43:55 +00:00
</li>
<li>
<div>
{{ $t('settings.subject_line_behavior') }}
<label
for="subjectLineBehavior"
class="select"
>
2020-05-25 00:43:55 +00:00
<select
id="subjectLineBehavior"
v-model="subjectLineBehavior"
>
2020-05-25 00:43:55 +00:00
<option value="email">
{{ $t('settings.subject_line_email') }}
{{ subjectLineBehaviorDefaultValue == 'email' ? $t('settings.instance_default_simple') : '' }}
</option>
<option value="masto">
{{ $t('settings.subject_line_mastodon') }}
{{ subjectLineBehaviorDefaultValue == 'mastodon' ? $t('settings.instance_default_simple') : '' }}
</option>
<option value="noop">
{{ $t('settings.subject_line_noop') }}
{{ subjectLineBehaviorDefaultValue == 'noop' ? $t('settings.instance_default_simple') : '' }}
</option>
</select>
<i class="icon-down-open" />
</label>
</div>
</li>
<li v-if="postFormats.length > 0">
<div>
{{ $t('settings.post_status_content_type') }}
<label
for="postContentType"
class="select"
>
2020-05-25 00:43:55 +00:00
<select
id="postContentType"
v-model="postContentType"
>
2020-05-25 00:43:55 +00:00
<option
v-for="postFormat in postFormats"
:key="postFormat"
:value="postFormat"
>
2020-05-25 00:43:55 +00:00
{{ $t(`post_status.content_type["${postFormat}"]`) }}
{{ postContentTypeDefaultValue === postFormat ? $t('settings.instance_default_simple') : '' }}
</option>
</select>
<i class="icon-down-open" />
</label>
</div>
</li>
<li>
<BooleanSetting path="minimalScopesMode">
{{ $t('settings.minimal_scopes_mode') }} {{ minimalScopesModeDefaultValue }}
</BooleanSetting>
2020-05-25 00:43:55 +00:00
</li>
<li>
<BooleanSetting path="autohideFloatingPostButton">
2020-05-25 00:43:55 +00:00
{{ $t('settings.autohide_floating_post_button') }}
</BooleanSetting>
2020-05-25 00:43:55 +00:00
</li>
<li>
<BooleanSetting path="padEmoji">
2020-05-25 00:43:55 +00:00
{{ $t('settings.pad_emoji') }}
</BooleanSetting>
2020-05-25 00:43:55 +00:00
</li>
</ul>
</div>
2020-05-25 00:43:55 +00:00
<div class="setting-item">
<h2>{{ $t('settings.attachments') }}</h2>
<ul class="setting-list">
<li>
<BooleanSetting path="hideAttachments">
{{ $t('settings.hide_attachments_in_tl') }}
</BooleanSetting>
</li>
<li>
<BooleanSetting path="hideAttachmentsInConv">
{{ $t('settings.hide_attachments_in_convo') }}
</BooleanSetting>
</li>
<li>
<label for="maxThumbnails">
{{ $t('settings.max_thumbnails') }}
</label>
<input
id="maxThumbnails"
path.number="maxThumbnails"
class="number-input"
type="number"
min="0"
step="1"
2020-05-25 00:43:55 +00:00
>
</li>
<li>
<BooleanSetting path="hideNsfw">
{{ $t('settings.nsfw_clickthrough') }}
</BooleanSetting>
</li>
<ul class="setting-list suboptions">
<li>
<BooleanSetting
path="preloadImage"
:disabled="!hideNsfw"
2020-05-25 00:43:55 +00:00
>
{{ $t('settings.preload_images') }}
</BooleanSetting>
</li>
<li>
<BooleanSetting
path="useOneClickNsfw"
:disabled="!hideNsfw"
2020-05-25 00:43:55 +00:00
>
{{ $t('settings.use_one_click_nsfw') }}
</BooleanSetting>
</li>
</ul>
<li>
<BooleanSetting path="stopGifs">
{{ $t('settings.stop_gifs') }}
</BooleanSetting>
</li>
<li>
<BooleanSetting path="loopVideo">
{{ $t('settings.loop_video') }}
</BooleanSetting>
<ul
class="setting-list suboptions"
:class="[{disabled: !streaming}]"
2020-05-25 00:43:55 +00:00
>
<li>
<BooleanSetting
path="loopVideoSilentOnly"
:disabled="!loopVideo || !loopSilentAvailable"
2020-05-25 00:43:55 +00:00
>
{{ $t('settings.loop_video_silent_only') }}
</BooleanSetting>
<div
v-if="!loopSilentAvailable"
class="unavailable"
2020-05-25 00:43:55 +00:00
>
<i class="icon-globe" />! {{ $t('settings.limited_availability') }}
</div>
</li>
</ul>
</li>
<li>
<BooleanSetting path="playVideosInModal">
{{ $t('settings.play_videos_in_modal') }}
</BooleanSetting>
</li>
<li>
<BooleanSetting path="useContainFit">
{{ $t('settings.use_contain_fit') }}
</BooleanSetting>
</li>
</ul>
</div>
<div class="setting-item">
<h2>{{ $t('settings.notifications') }}</h2>
<ul class="setting-list">
<li>
<BooleanSetting path="webPushNotifications">
{{ $t('settings.enable_web_push_notifications') }}
</BooleanSetting>
</li>
</ul>
</div>
<div class="setting-item">
<h2>{{ $t('settings.fun') }}</h2>
<ul class="setting-list">
<li>
<BooleanSetting path="greentext">
{{ $t('settings.greentext') }}
</BooleanSetting>
</li>
</ul>
</div>
</div>
</template>
<script src="./general_tab.js"></script>