2018-02-12 14:18:13 +01:00
|
|
|
<template>
|
|
|
|
<div class="mk-settings">
|
|
|
|
<div class="nav">
|
2018-11-08 19:44:35 +01:00
|
|
|
<p :class="{ active: page == 'profile' }" @mousedown="page = 'profile'"><fa icon="user" fixed-width/>{{ $t('profile') }}</p>
|
|
|
|
<p :class="{ active: page == 'theme' }" @mousedown="page = 'theme'"><fa icon="palette" fixed-width/>{{ $t('theme') }}</p>
|
2018-11-05 17:40:11 +01:00
|
|
|
<p :class="{ active: page == 'web' }" @mousedown="page = 'web'"><fa icon="desktop" fixed-width/>Web</p>
|
2018-11-08 19:44:35 +01:00
|
|
|
<p :class="{ active: page == 'notification' }" @mousedown="page = 'notification'"><fa :icon="['far', 'bell']" fixed-width/>{{ $t('notification') }}</p>
|
|
|
|
<p :class="{ active: page == 'drive' }" @mousedown="page = 'drive'"><fa icon="cloud" fixed-width/>{{ $t('@.drive') }}</p>
|
|
|
|
<p :class="{ active: page == 'hashtags' }" @mousedown="page = 'hashtags'"><fa icon="hashtag" fixed-width/>{{ $t('tags') }}</p>
|
|
|
|
<p :class="{ active: page == 'muteAndBlock' }" @mousedown="page = 'muteAndBlock'"><fa icon="ban" fixed-width/>{{ $t('mute-and-block') }}</p>
|
|
|
|
<p :class="{ active: page == 'apps' }" @mousedown="page = 'apps'"><fa icon="puzzle-piece" fixed-width/>{{ $t('apps') }}</p>
|
|
|
|
<p :class="{ active: page == 'security' }" @mousedown="page = 'security'"><fa icon="unlock-alt" fixed-width/>{{ $t('security') }}</p>
|
2018-11-05 17:40:11 +01:00
|
|
|
<p :class="{ active: page == 'api' }" @mousedown="page = 'api'"><fa icon="key" fixed-width/>API</p>
|
2018-11-08 19:44:35 +01:00
|
|
|
<p :class="{ active: page == 'other' }" @mousedown="page = 'other'"><fa icon="cogs" fixed-width/>{{ $t('other') }}</p>
|
2018-02-12 14:18:13 +01:00
|
|
|
</div>
|
|
|
|
<div class="pages">
|
2018-10-18 23:18:33 +02:00
|
|
|
<div class="profile" v-show="page == 'profile'">
|
|
|
|
<mk-profile-editor/>
|
|
|
|
|
|
|
|
<ui-card>
|
2018-11-08 19:44:35 +01:00
|
|
|
<div slot="title"><fa :icon="['fab', 'twitter']"/> {{ $t('twitter') }}</div>
|
2018-10-18 23:18:33 +02:00
|
|
|
<section>
|
|
|
|
<mk-twitter-setting/>
|
|
|
|
</section>
|
|
|
|
</ui-card>
|
2018-11-04 14:03:55 +01:00
|
|
|
|
|
|
|
<ui-card>
|
2018-11-08 19:44:35 +01:00
|
|
|
<div slot="title"><fa :icon="['fab', 'github']"/> {{ $t('github') }}</div>
|
2018-11-04 14:03:55 +01:00
|
|
|
<section>
|
|
|
|
<mk-github-setting/>
|
|
|
|
</section>
|
|
|
|
</ui-card>
|
2018-10-18 23:18:33 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<ui-card class="theme" v-show="page == 'theme'">
|
2018-11-08 19:44:35 +01:00
|
|
|
<div slot="title"><fa icon="palette"/> {{ $t('theme') }}</div>
|
2018-10-18 23:18:33 +02:00
|
|
|
|
|
|
|
<section>
|
|
|
|
<mk-theme/>
|
|
|
|
</section>
|
|
|
|
</ui-card>
|
|
|
|
|
|
|
|
<ui-card class="web" v-show="page == 'web'">
|
2018-11-08 19:44:35 +01:00
|
|
|
<div slot="title"><fa icon="sliders-h"/> {{ $t('behaviour') }}</div>
|
2018-10-18 23:18:33 +02:00
|
|
|
|
|
|
|
<section>
|
2018-11-08 19:44:35 +01:00
|
|
|
<ui-switch v-model="fetchOnScroll">{{ $t('fetch-on-scroll') }}
|
|
|
|
<span slot="desc">{{ $t('fetch-on-scroll-desc') }}</span>
|
2018-10-18 23:18:33 +02:00
|
|
|
</ui-switch>
|
2018-11-08 19:44:35 +01:00
|
|
|
<ui-switch v-model="autoPopout">{{ $t('auto-popout') }}
|
|
|
|
<span slot="desc">{{ $t('auto-popout-desc') }}</span>
|
2018-10-18 23:18:33 +02:00
|
|
|
</ui-switch>
|
2018-11-08 19:44:35 +01:00
|
|
|
<ui-switch v-model="deckNav">{{ $t('deck-nav') }}<span slot="desc">{{ $t('deck-nav-desc') }}</span></ui-switch>
|
2018-10-18 23:18:33 +02:00
|
|
|
|
|
|
|
<details>
|
2018-11-08 19:44:35 +01:00
|
|
|
<summary>{{ $t('advanced') }}</summary>
|
|
|
|
<ui-switch v-model="apiViaStream">{{ $t('api-via-stream') }}
|
|
|
|
<span slot="desc">{{ $t('api-via-stream-desc') }}</span>
|
2018-10-18 23:18:33 +02:00
|
|
|
</ui-switch>
|
|
|
|
</details>
|
|
|
|
</section>
|
2018-09-07 14:13:15 +02:00
|
|
|
|
2018-10-19 00:03:29 +02:00
|
|
|
<section>
|
2018-11-08 19:44:35 +01:00
|
|
|
<header>{{ $t('timeline') }}</header>
|
|
|
|
<ui-switch v-model="showMyRenotes">{{ $t('show-my-renotes') }}</ui-switch>
|
|
|
|
<ui-switch v-model="showRenotedMyNotes">{{ $t('show-renoted-my-notes') }}</ui-switch>
|
|
|
|
<ui-switch v-model="showLocalRenotes">{{ $t('show-local-renotes') }}</ui-switch>
|
2018-10-19 00:03:29 +02:00
|
|
|
</section>
|
|
|
|
|
2018-09-07 14:13:15 +02:00
|
|
|
<section>
|
2018-11-08 19:44:35 +01:00
|
|
|
<header>{{ $t('note-visibility') }}</header>
|
|
|
|
<ui-switch v-model="rememberNoteVisibility">{{ $t('remember-note-visibility') }}</ui-switch>
|
2018-09-07 14:13:15 +02:00
|
|
|
<section>
|
2018-11-08 19:44:35 +01:00
|
|
|
<header>{{ $t('default-note-visibility') }}</header>
|
2018-09-07 14:13:15 +02:00
|
|
|
<ui-select v-model="defaultNoteVisibility">
|
2018-11-08 19:44:35 +01:00
|
|
|
<option value="public">{{ $t('@.note-visibility.public') }}</option>
|
|
|
|
<option value="home">{{ $t('@.note-visibility.home') }}</option>
|
|
|
|
<option value="followers">{{ $t('@.note-visibility.followers') }}</option>
|
|
|
|
<option value="specified">{{ $t('@.note-visibility.specified') }}</option>
|
|
|
|
<option value="private">{{ $t('@.note-visibility.private') }}</option>
|
2018-09-07 14:13:15 +02:00
|
|
|
</ui-select>
|
|
|
|
</section>
|
|
|
|
</section>
|
2018-10-18 23:18:33 +02:00
|
|
|
</ui-card>
|
2018-09-07 14:13:15 +02:00
|
|
|
|
2018-10-18 23:18:33 +02:00
|
|
|
<ui-card class="web" v-show="page == 'web'">
|
2018-11-08 19:44:35 +01:00
|
|
|
<div slot="title"><fa icon="desktop"/> {{ $t('display') }}</div>
|
2018-10-18 23:18:33 +02:00
|
|
|
|
|
|
|
<section>
|
2018-11-08 19:44:35 +01:00
|
|
|
<ui-switch v-model="showPostFormOnTopOfTl">{{ $t('post-form-on-timeline') }}</ui-switch>
|
|
|
|
<ui-button @click="customizeHome">{{ $t('customize') }}</ui-button>
|
2018-10-18 23:18:33 +02:00
|
|
|
</section>
|
|
|
|
<section>
|
2018-11-08 19:44:35 +01:00
|
|
|
<header>{{ $t('wallpaper') }}</header>
|
|
|
|
<ui-button @click="updateWallpaper">{{ $t('choose-wallpaper') }}</ui-button>
|
|
|
|
<ui-button @click="deleteWallpaper">{{ $t('delete-wallpaper') }}</ui-button>
|
2018-10-18 23:18:33 +02:00
|
|
|
</section>
|
|
|
|
<section>
|
2018-11-08 19:44:35 +01:00
|
|
|
<header>{{ $t('navbar-position') }}</header>
|
|
|
|
<ui-radio v-model="navbar" value="top">{{ $t('navbar-position-top') }}</ui-radio>
|
|
|
|
<ui-radio v-model="navbar" value="left">{{ $t('navbar-position-left') }}</ui-radio>
|
|
|
|
<ui-radio v-model="navbar" value="right">{{ $t('navbar-position-right') }}</ui-radio>
|
2018-10-18 23:18:33 +02:00
|
|
|
</section>
|
2018-10-19 04:10:49 +02:00
|
|
|
<section>
|
2018-11-08 19:44:35 +01:00
|
|
|
<ui-switch v-model="deckDefault">{{ $t('deck-default') }}</ui-switch>
|
2018-10-19 04:10:49 +02:00
|
|
|
</section>
|
2018-10-18 23:18:33 +02:00
|
|
|
<section>
|
2018-11-08 19:44:35 +01:00
|
|
|
<ui-switch v-model="darkmode">{{ $t('dark-mode') }}</ui-switch>
|
|
|
|
<ui-switch v-model="useShadow">{{ $t('use-shadow') }}</ui-switch>
|
|
|
|
<ui-switch v-model="roundedCorners">{{ $t('rounded-corners') }}</ui-switch>
|
|
|
|
<ui-switch v-model="circleIcons">{{ $t('circle-icons') }}</ui-switch>
|
|
|
|
<ui-switch v-model="reduceMotion">{{ $t('@.reduce-motion') }}</ui-switch>
|
|
|
|
<ui-switch v-model="contrastedAcct">{{ $t('contrasted-acct') }}</ui-switch>
|
|
|
|
<ui-switch v-model="showFullAcct">{{ $t('@.show-full-acct') }}</ui-switch>
|
|
|
|
<ui-switch v-model="useOsDefaultEmojis">{{ $t('@.use-os-default-emojis') }}</ui-switch>
|
|
|
|
<ui-switch v-model="iLikeSushi">{{ $t('@.i-like-sushi') }}</ui-switch>
|
2018-10-18 23:18:33 +02:00
|
|
|
</section>
|
|
|
|
<section>
|
2018-11-08 19:44:35 +01:00
|
|
|
<ui-switch v-model="suggestRecentHashtags">{{ $t('suggest-recent-hashtags') }}</ui-switch>
|
|
|
|
<ui-switch v-model="showClockOnHeader">{{ $t('show-clock-on-header') }}</ui-switch>
|
|
|
|
<ui-switch v-model="alwaysShowNsfw">{{ $t('@.always-show-nsfw') }}</ui-switch>
|
|
|
|
<ui-switch v-model="showReplyTarget">{{ $t('show-reply-target') }}</ui-switch>
|
|
|
|
<ui-switch v-model="showMaps">{{ $t('show-maps') }}</ui-switch>
|
|
|
|
<ui-switch v-model="disableAnimatedMfm">{{ $t('@.disable-animated-mfm') }}</ui-switch>
|
2018-10-18 23:18:33 +02:00
|
|
|
</section>
|
2018-10-18 23:47:55 +02:00
|
|
|
<section>
|
2018-11-08 19:44:35 +01:00
|
|
|
<header>{{ $t('deck-column-align') }}</header>
|
|
|
|
<ui-radio v-model="deckColumnAlign" value="center">{{ $t('deck-column-align-center') }}</ui-radio>
|
|
|
|
<ui-radio v-model="deckColumnAlign" value="left">{{ $t('deck-column-align-left') }}</ui-radio>
|
2018-10-18 23:47:55 +02:00
|
|
|
</section>
|
2018-10-19 00:03:29 +02:00
|
|
|
<section>
|
2018-11-08 19:44:35 +01:00
|
|
|
<ui-switch v-model="games_reversi_showBoardLabels">{{ $t('@.show-reversi-board-labels') }}</ui-switch>
|
|
|
|
<ui-switch v-model="games_reversi_useContrastStones">{{ $t('@.use-contrast-reversi-stones') }}</ui-switch>
|
2018-10-19 00:03:29 +02:00
|
|
|
</section>
|
2018-10-18 23:18:33 +02:00
|
|
|
</ui-card>
|
|
|
|
|
|
|
|
<ui-card class="web" v-show="page == 'web'">
|
2018-11-08 19:44:35 +01:00
|
|
|
<div slot="title"><fa icon="volume-up"/> {{ $t('sound') }}</div>
|
2018-10-14 12:44:30 +02:00
|
|
|
|
|
|
|
<section>
|
2018-11-08 19:44:35 +01:00
|
|
|
<ui-switch v-model="enableSounds">{{ $t('enable-sounds') }}
|
|
|
|
<span slot="desc">{{ $t('enable-sounds-desc') }}</span>
|
2018-10-18 23:18:33 +02:00
|
|
|
</ui-switch>
|
2018-11-08 19:44:35 +01:00
|
|
|
<label>{{ $t('volume') }}</label>
|
2018-10-18 23:18:33 +02:00
|
|
|
<input type="range"
|
|
|
|
v-model="soundVolume"
|
|
|
|
:disabled="!enableSounds"
|
|
|
|
max="1"
|
|
|
|
step="0.1"
|
|
|
|
/>
|
2018-11-08 19:44:35 +01:00
|
|
|
<ui-button @click="soundTest"><fa icon="volume-up"/> {{ $t('test') }}</ui-button>
|
2018-10-18 23:18:33 +02:00
|
|
|
</section>
|
|
|
|
</ui-card>
|
|
|
|
|
|
|
|
<ui-card class="web" v-show="page == 'web'">
|
2018-11-08 19:44:35 +01:00
|
|
|
<div slot="title"><fa icon="language"/> {{ $t('language') }}</div>
|
2018-10-18 23:18:33 +02:00
|
|
|
<section class="fit-top">
|
2018-11-08 19:44:35 +01:00
|
|
|
<ui-select v-model="lang" :placeholder="$t('placeholder')">
|
|
|
|
<optgroup :label="$t('label')">
|
|
|
|
<option value="">{{ $t('auto') }}</option>
|
2018-10-18 23:18:33 +02:00
|
|
|
</optgroup>
|
|
|
|
|
2018-11-08 19:44:35 +01:00
|
|
|
<optgroup :label="$t('label')">
|
2018-10-18 23:18:33 +02:00
|
|
|
<option v-for="x in langs" :value="x[0]" :key="x[0]">{{ x[1] }}</option>
|
|
|
|
</optgroup>
|
|
|
|
</ui-select>
|
|
|
|
<div class="none ui info">
|
2018-11-08 19:44:35 +01:00
|
|
|
<p><fa icon="info-circle"/>{{ $t('language-desc') }}</p>
|
2018-10-18 23:18:33 +02:00
|
|
|
</div>
|
2018-10-14 12:44:30 +02:00
|
|
|
</section>
|
2018-10-18 23:18:33 +02:00
|
|
|
</ui-card>
|
|
|
|
|
|
|
|
<ui-card class="web" v-show="page == 'web'">
|
2018-11-08 19:44:35 +01:00
|
|
|
<div slot="title"><fa :icon="['far', 'trash-alt']"/> {{ $t('cache') }}</div>
|
2018-10-18 23:18:33 +02:00
|
|
|
<section>
|
2018-11-08 19:44:35 +01:00
|
|
|
<ui-button @click="clean">{{ $t('clean-cache') }}</ui-button>
|
2018-10-18 23:18:33 +02:00
|
|
|
<div class="none ui info warn">
|
2018-11-08 19:44:35 +01:00
|
|
|
<p><fa icon="exclamation-triangle"/>{{ $t('cache-warn') }}</p>
|
2018-10-18 23:18:33 +02:00
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</ui-card>
|
|
|
|
|
|
|
|
<ui-card class="notification" v-show="page == 'notification'">
|
2018-11-08 19:44:35 +01:00
|
|
|
<div slot="title"><fa :icon="['far', 'bell']"/> {{ $t('notification') }}</div>
|
2018-10-18 23:18:33 +02:00
|
|
|
<section>
|
|
|
|
<ui-switch v-model="$store.state.i.settings.autoWatch" @change="onChangeAutoWatch">
|
2018-11-08 19:44:35 +01:00
|
|
|
{{ $t('auto-watch') }}<span slot="desc">{{ $t('auto-watch-desc') }}</span>
|
2018-09-28 14:48:53 +02:00
|
|
|
</ui-switch>
|
2018-10-18 23:36:59 +02:00
|
|
|
<section>
|
2018-11-08 19:44:35 +01:00
|
|
|
<ui-button @click="readAllUnreadNotes">{{ $t('mark-as-read-all-unread-notes') }}</ui-button>
|
2018-10-18 23:36:59 +02:00
|
|
|
</section>
|
2018-10-18 23:18:33 +02:00
|
|
|
</section>
|
|
|
|
</ui-card>
|
|
|
|
|
2018-10-25 04:30:30 +02:00
|
|
|
<div class="drive" v-if="page == 'drive'">
|
|
|
|
<mk-drive-settings/>
|
|
|
|
</div>
|
2018-10-18 23:18:33 +02:00
|
|
|
|
|
|
|
<ui-card class="hashtags" v-show="page == 'hashtags'">
|
2018-11-08 19:44:35 +01:00
|
|
|
<div slot="title"><fa icon="hashtag"/> {{ $t('tags') }}</div>
|
2018-10-18 23:18:33 +02:00
|
|
|
<section>
|
|
|
|
<x-tags/>
|
|
|
|
</section>
|
|
|
|
</ui-card>
|
|
|
|
|
2018-10-31 03:16:13 +01:00
|
|
|
<div class="muteAndBlock" v-show="page == 'muteAndBlock'">
|
|
|
|
<mk-mute-and-block/>
|
|
|
|
</div>
|
2018-10-30 20:59:01 +01:00
|
|
|
|
2018-10-18 23:18:33 +02:00
|
|
|
<ui-card class="apps" v-show="page == 'apps'">
|
2018-11-08 19:44:35 +01:00
|
|
|
<div slot="title"><fa icon="puzzle-piece"/> {{ $t('apps') }}</div>
|
2018-10-18 23:18:33 +02:00
|
|
|
<section>
|
|
|
|
<x-apps/>
|
|
|
|
</section>
|
|
|
|
</ui-card>
|
|
|
|
|
|
|
|
<ui-card class="password" v-show="page == 'security'">
|
2018-11-08 19:44:35 +01:00
|
|
|
<div slot="title"><fa icon="unlock-alt"/> {{ $t('password') }}</div>
|
2018-10-18 23:18:33 +02:00
|
|
|
<section>
|
2018-11-03 13:53:03 +01:00
|
|
|
<mk-password-settings/>
|
2018-10-18 23:18:33 +02:00
|
|
|
</section>
|
|
|
|
</ui-card>
|
|
|
|
|
|
|
|
<ui-card class="2fa" v-show="page == 'security'">
|
2018-11-08 19:44:35 +01:00
|
|
|
<div slot="title"><fa icon="mobile-alt"/> {{ $t('2fa') }}</div>
|
2018-10-18 23:18:33 +02:00
|
|
|
<section>
|
|
|
|
<x-2fa/>
|
|
|
|
</section>
|
|
|
|
</ui-card>
|
|
|
|
|
|
|
|
<ui-card class="signin" v-show="page == 'security'">
|
2018-11-08 19:44:35 +01:00
|
|
|
<div slot="title"><fa icon="sign-in-alt"/> {{ $t('signin') }}</div>
|
2018-10-18 23:18:33 +02:00
|
|
|
<section>
|
|
|
|
<x-signins/>
|
|
|
|
</section>
|
|
|
|
</ui-card>
|
|
|
|
|
2018-10-26 01:37:30 +02:00
|
|
|
<div class="api" v-show="page == 'api'">
|
|
|
|
<mk-api-settings/>
|
|
|
|
</div>
|
2018-10-18 23:18:33 +02:00
|
|
|
|
|
|
|
<ui-card class="other" v-show="page == 'other'">
|
2018-11-08 19:44:35 +01:00
|
|
|
<div slot="title"><fa icon="info-circle"/> {{ $t('about') }}</div>
|
2018-10-18 23:18:33 +02:00
|
|
|
<section>
|
2018-11-08 19:44:35 +01:00
|
|
|
<p v-if="meta">{{ $t('operator') }}: <i><a :href="'mailto:' + meta.maintainer.email" target="_blank">{{ meta.maintainer.name }}</a></i></p>
|
2018-10-18 23:18:33 +02:00
|
|
|
</section>
|
|
|
|
</ui-card>
|
|
|
|
|
|
|
|
<ui-card class="other" v-show="page == 'other'">
|
2018-11-08 19:44:35 +01:00
|
|
|
<div slot="title"><fa icon="sync-alt"/> {{ $t('update') }}</div>
|
2018-10-18 23:18:33 +02:00
|
|
|
<section>
|
|
|
|
<p>
|
2018-11-08 19:44:35 +01:00
|
|
|
<span>{{ $t('version') }} <i>{{ version }}</i></span>
|
2018-10-18 23:18:33 +02:00
|
|
|
<template v-if="latestVersion !== undefined">
|
|
|
|
<br>
|
2018-11-08 19:44:35 +01:00
|
|
|
<span>{{ $t('latest-version') }} <i>{{ latestVersion ? latestVersion : version }}</i></span>
|
2018-10-18 23:18:33 +02:00
|
|
|
</template>
|
|
|
|
</p>
|
|
|
|
<button class="ui button block" @click="checkForUpdate" :disabled="checkingForUpdate">
|
2018-11-08 19:44:35 +01:00
|
|
|
<template v-if="checkingForUpdate">{{ $t('update-checking') }}<mk-ellipsis/></template>
|
|
|
|
<template v-else>{{ $t('do-update') }}</template>
|
2018-10-18 23:18:33 +02:00
|
|
|
</button>
|
|
|
|
<details>
|
2018-11-08 19:44:35 +01:00
|
|
|
<summary>{{ $t('update-settings') }}</summary>
|
2018-10-18 23:18:33 +02:00
|
|
|
<ui-switch v-model="preventUpdate">
|
2018-11-08 19:44:35 +01:00
|
|
|
{{ $t('prevent-update') }}<span slot="desc">{{ $t('prevent-update-desc') }}</span>
|
2018-10-18 23:18:33 +02:00
|
|
|
</ui-switch>
|
|
|
|
</details>
|
|
|
|
</section>
|
|
|
|
</ui-card>
|
|
|
|
|
|
|
|
<ui-card class="other" v-show="page == 'other'">
|
2018-11-08 19:44:35 +01:00
|
|
|
<div slot="title"><fa icon="cogs"/> {{ $t('advanced-settings') }}</div>
|
2018-10-18 23:18:33 +02:00
|
|
|
<section>
|
|
|
|
<ui-switch v-model="debug">
|
2018-11-08 19:44:35 +01:00
|
|
|
{{ $t('debug-mode') }}<span slot="desc">{{ $t('debug-mode-desc') }}</span>
|
2018-10-18 23:18:33 +02:00
|
|
|
</ui-switch>
|
|
|
|
<ui-switch v-model="enableExperimentalFeatures">
|
2018-11-08 19:44:35 +01:00
|
|
|
{{ $t('experimental') }}<span slot="desc">{{ $t('experimental-desc') }}</span>
|
2018-10-18 23:18:33 +02:00
|
|
|
</ui-switch>
|
|
|
|
</section>
|
|
|
|
</ui-card>
|
2018-02-12 14:18:13 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
2018-11-08 19:44:35 +01:00
|
|
|
import i18n from '../../../i18n';
|
2018-02-21 17:25:57 +01:00
|
|
|
import X2fa from './settings.2fa.vue';
|
2018-03-05 10:11:07 +01:00
|
|
|
import XApps from './settings.apps.vue';
|
|
|
|
import XSignins from './settings.signins.vue';
|
2018-09-17 02:00:20 +02:00
|
|
|
import XTags from './settings.tags.vue';
|
2018-11-03 09:04:33 +01:00
|
|
|
import { url, langs, clientVersion as version } from '../../../config';
|
2018-03-02 10:46:08 +01:00
|
|
|
import checkForUpdate from '../../../common/scripts/check-for-update';
|
2018-02-19 08:58:37 +01:00
|
|
|
|
2018-02-12 14:18:13 +01:00
|
|
|
export default Vue.extend({
|
2018-11-08 19:44:35 +01:00
|
|
|
i18n: i18n('desktop/views/components/settings.vue'),
|
2018-02-19 08:58:37 +01:00
|
|
|
components: {
|
2018-02-22 13:15:24 +01:00
|
|
|
X2fa,
|
2018-03-05 10:11:07 +01:00
|
|
|
XApps,
|
2018-03-05 10:37:12 +01:00
|
|
|
XSignins,
|
2018-09-17 02:00:20 +02:00
|
|
|
XTags
|
|
|
|
},
|
|
|
|
props: {
|
|
|
|
initialPage: {
|
|
|
|
type: String,
|
|
|
|
required: false
|
|
|
|
}
|
2018-02-19 08:58:37 +01:00
|
|
|
},
|
2018-02-12 14:18:13 +01:00
|
|
|
data() {
|
|
|
|
return {
|
2018-09-17 02:00:20 +02:00
|
|
|
page: this.initialPage || 'profile',
|
2018-03-02 23:32:18 +01:00
|
|
|
meta: null,
|
2018-03-02 10:46:08 +01:00
|
|
|
version,
|
2018-05-20 19:13:39 +02:00
|
|
|
langs,
|
2018-03-02 10:46:08 +01:00
|
|
|
latestVersion: undefined,
|
2018-05-23 22:28:46 +02:00
|
|
|
checkingForUpdate: false
|
2018-02-12 14:18:13 +01:00
|
|
|
};
|
2018-02-22 18:06:35 +01:00
|
|
|
},
|
2018-03-15 11:53:46 +01:00
|
|
|
computed: {
|
2018-11-05 11:20:35 +01:00
|
|
|
useOsDefaultEmojis: {
|
|
|
|
get() { return this.$store.state.device.useOsDefaultEmojis; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'useOsDefaultEmojis', value }); }
|
|
|
|
},
|
|
|
|
|
2018-09-16 14:40:48 +02:00
|
|
|
reduceMotion: {
|
|
|
|
get() { return this.$store.state.device.reduceMotion; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'reduceMotion', value }); }
|
2018-09-15 20:46:53 +02:00
|
|
|
},
|
|
|
|
|
2018-05-20 19:13:39 +02:00
|
|
|
apiViaStream: {
|
|
|
|
get() { return this.$store.state.device.apiViaStream; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'apiViaStream', value }); }
|
2018-04-22 10:28:21 +02:00
|
|
|
},
|
2018-05-20 19:13:39 +02:00
|
|
|
|
|
|
|
autoPopout: {
|
|
|
|
get() { return this.$store.state.device.autoPopout; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'autoPopout', value }); }
|
2018-03-04 10:50:30 +01:00
|
|
|
},
|
2018-05-20 19:13:39 +02:00
|
|
|
|
2018-10-18 23:18:33 +02:00
|
|
|
deckNav: {
|
|
|
|
get() { return this.$store.state.settings.deckNav; },
|
|
|
|
set(value) { this.$store.commit('settings/set', { key: 'deckNav', value }); }
|
|
|
|
},
|
|
|
|
|
2018-05-23 22:28:46 +02:00
|
|
|
darkmode: {
|
|
|
|
get() { return this.$store.state.device.darkmode; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'darkmode', value }); }
|
|
|
|
},
|
|
|
|
|
2018-10-14 12:44:30 +02:00
|
|
|
navbar: {
|
|
|
|
get() { return this.$store.state.device.navbar; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'navbar', value }); }
|
|
|
|
},
|
|
|
|
|
2018-10-18 23:47:55 +02:00
|
|
|
deckColumnAlign: {
|
|
|
|
get() { return this.$store.state.device.deckColumnAlign; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'deckColumnAlign', value }); }
|
|
|
|
},
|
|
|
|
|
2018-10-19 04:10:49 +02:00
|
|
|
deckDefault: {
|
|
|
|
get() { return this.$store.state.device.deckDefault; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'deckDefault', value }); }
|
|
|
|
},
|
|
|
|
|
2018-05-20 19:13:39 +02:00
|
|
|
enableSounds: {
|
|
|
|
get() { return this.$store.state.device.enableSounds; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'enableSounds', value }); }
|
2018-03-06 10:06:45 +01:00
|
|
|
},
|
2018-05-20 19:13:39 +02:00
|
|
|
|
|
|
|
soundVolume: {
|
|
|
|
get() { return this.$store.state.device.soundVolume; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'soundVolume', value }); }
|
2018-03-03 01:49:47 +01:00
|
|
|
},
|
2018-05-20 19:13:39 +02:00
|
|
|
|
|
|
|
lang: {
|
|
|
|
get() { return this.$store.state.device.lang; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'lang', value }); }
|
2018-03-04 06:10:14 +01:00
|
|
|
},
|
2018-05-20 19:13:39 +02:00
|
|
|
|
|
|
|
preventUpdate: {
|
|
|
|
get() { return this.$store.state.device.preventUpdate; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'preventUpdate', value }); }
|
2018-03-02 23:32:18 +01:00
|
|
|
},
|
2018-05-20 19:13:39 +02:00
|
|
|
|
|
|
|
debug: {
|
|
|
|
get() { return this.$store.state.device.debug; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'debug', value }); }
|
2018-03-15 04:56:50 +01:00
|
|
|
},
|
2018-05-20 19:13:39 +02:00
|
|
|
|
|
|
|
enableExperimentalFeatures: {
|
|
|
|
get() { return this.$store.state.device.enableExperimentalFeatures; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'enableExperimentalFeatures', value }); }
|
2018-09-14 08:14:59 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
alwaysShowNsfw: {
|
|
|
|
get() { return this.$store.state.device.alwaysShowNsfw; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'alwaysShowNsfw', value }); }
|
|
|
|
},
|
|
|
|
|
2018-09-22 13:39:12 +02:00
|
|
|
useShadow: {
|
|
|
|
get() { return this.$store.state.settings.useShadow; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'useShadow', value }); }
|
|
|
|
},
|
|
|
|
|
|
|
|
roundedCorners: {
|
|
|
|
get() { return this.$store.state.settings.roundedCorners; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'roundedCorners', value }); }
|
|
|
|
},
|
|
|
|
|
2018-09-14 08:14:59 +02:00
|
|
|
fetchOnScroll: {
|
|
|
|
get() { return this.$store.state.settings.fetchOnScroll; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'fetchOnScroll', value }); }
|
|
|
|
},
|
|
|
|
|
|
|
|
rememberNoteVisibility: {
|
|
|
|
get() { return this.$store.state.settings.rememberNoteVisibility; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'rememberNoteVisibility', value }); }
|
|
|
|
},
|
|
|
|
|
|
|
|
defaultNoteVisibility: {
|
|
|
|
get() { return this.$store.state.settings.defaultNoteVisibility; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'defaultNoteVisibility', value }); }
|
|
|
|
},
|
|
|
|
|
|
|
|
showReplyTarget: {
|
|
|
|
get() { return this.$store.state.settings.showReplyTarget; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'showReplyTarget', value }); }
|
|
|
|
},
|
|
|
|
|
|
|
|
showMyRenotes: {
|
|
|
|
get() { return this.$store.state.settings.showMyRenotes; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'showMyRenotes', value }); }
|
|
|
|
},
|
|
|
|
|
|
|
|
showRenotedMyNotes: {
|
|
|
|
get() { return this.$store.state.settings.showRenotedMyNotes; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'showRenotedMyNotes', value }); }
|
|
|
|
},
|
|
|
|
|
|
|
|
showLocalRenotes: {
|
|
|
|
get() { return this.$store.state.settings.showLocalRenotes; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'showLocalRenotes', value }); }
|
|
|
|
},
|
|
|
|
|
|
|
|
showPostFormOnTopOfTl: {
|
|
|
|
get() { return this.$store.state.settings.showPostFormOnTopOfTl; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'showPostFormOnTopOfTl', value }); }
|
|
|
|
},
|
|
|
|
|
|
|
|
suggestRecentHashtags: {
|
|
|
|
get() { return this.$store.state.settings.suggestRecentHashtags; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'suggestRecentHashtags', value }); }
|
|
|
|
},
|
|
|
|
|
|
|
|
showClockOnHeader: {
|
|
|
|
get() { return this.$store.state.settings.showClockOnHeader; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'showClockOnHeader', value }); }
|
|
|
|
},
|
|
|
|
|
|
|
|
showMaps: {
|
|
|
|
get() { return this.$store.state.settings.showMaps; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'showMaps', value }); }
|
|
|
|
},
|
|
|
|
|
|
|
|
circleIcons: {
|
|
|
|
get() { return this.$store.state.settings.circleIcons; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'circleIcons', value }); }
|
|
|
|
},
|
|
|
|
|
|
|
|
contrastedAcct: {
|
|
|
|
get() { return this.$store.state.settings.contrastedAcct; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'contrastedAcct', value }); }
|
|
|
|
},
|
|
|
|
|
2018-09-14 13:33:27 +02:00
|
|
|
showFullAcct: {
|
|
|
|
get() { return this.$store.state.settings.showFullAcct; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'showFullAcct', value }); }
|
|
|
|
},
|
|
|
|
|
2018-09-14 08:14:59 +02:00
|
|
|
iLikeSushi: {
|
|
|
|
get() { return this.$store.state.settings.iLikeSushi; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'iLikeSushi', value }); }
|
|
|
|
},
|
|
|
|
|
|
|
|
games_reversi_showBoardLabels: {
|
|
|
|
get() { return this.$store.state.settings.games.reversi.showBoardLabels; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'games.reversi.showBoardLabels', value }); }
|
|
|
|
},
|
|
|
|
|
|
|
|
games_reversi_useContrastStones: {
|
|
|
|
get() { return this.$store.state.settings.games.reversi.useContrastStones; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'games.reversi.useContrastStones', value }); }
|
|
|
|
},
|
|
|
|
|
|
|
|
disableAnimatedMfm: {
|
|
|
|
get() { return this.$store.state.settings.disableAnimatedMfm; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'disableAnimatedMfm', value }); }
|
2018-09-27 07:52:10 +02:00
|
|
|
}
|
2018-05-20 19:13:39 +02:00
|
|
|
},
|
2018-02-22 18:06:35 +01:00
|
|
|
created() {
|
2018-03-03 01:49:47 +01:00
|
|
|
(this as any).os.getMeta().then(meta => {
|
|
|
|
this.meta = meta;
|
|
|
|
});
|
2018-02-22 18:06:35 +01:00
|
|
|
},
|
|
|
|
methods: {
|
2018-10-18 23:36:59 +02:00
|
|
|
readAllUnreadNotes() {
|
|
|
|
(this as any).api('i/read_all_unread_notes');
|
|
|
|
},
|
2018-02-22 18:06:35 +01:00
|
|
|
customizeHome() {
|
|
|
|
this.$router.push('/i/customize-home');
|
|
|
|
this.$emit('done');
|
|
|
|
},
|
2018-06-06 22:14:37 +02:00
|
|
|
updateWallpaper() {
|
|
|
|
(this as any).apis.chooseDriveFile({
|
|
|
|
multiple: false
|
|
|
|
}).then(file => {
|
|
|
|
(this as any).api('i/update', {
|
|
|
|
wallpaperId: file.id
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
2018-06-06 23:15:57 +02:00
|
|
|
deleteWallpaper() {
|
|
|
|
(this as any).api('i/update', {
|
|
|
|
wallpaperId: null
|
|
|
|
});
|
|
|
|
},
|
2018-03-05 00:07:09 +01:00
|
|
|
onChangeAutoWatch(v) {
|
|
|
|
(this as any).api('i/update', {
|
2018-03-29 07:48:47 +02:00
|
|
|
autoWatch: v
|
2018-03-05 00:07:09 +01:00
|
|
|
});
|
|
|
|
},
|
2018-03-02 10:46:08 +01:00
|
|
|
checkForUpdate() {
|
|
|
|
this.checkingForUpdate = true;
|
|
|
|
checkForUpdate((this as any).os, true, true).then(newer => {
|
|
|
|
this.checkingForUpdate = false;
|
|
|
|
this.latestVersion = newer;
|
|
|
|
if (newer == null) {
|
|
|
|
(this as any).apis.dialog({
|
2018-11-08 19:44:35 +01:00
|
|
|
title: this.$t('no-updates'),
|
|
|
|
text: this.$t('no-updates-desc')
|
2018-03-02 10:46:08 +01:00
|
|
|
});
|
|
|
|
} else {
|
|
|
|
(this as any).apis.dialog({
|
2018-11-08 19:44:35 +01:00
|
|
|
title: this.$t('update-available'),
|
|
|
|
text: this.$t('update-available-desc')
|
2018-03-02 10:46:08 +01:00
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
clean() {
|
|
|
|
localStorage.clear();
|
|
|
|
(this as any).apis.dialog({
|
2018-11-08 19:44:35 +01:00
|
|
|
title: this.$t('cache-cleared'),
|
|
|
|
text: this.$t('cache-cleared-desc')
|
2018-03-02 10:46:08 +01:00
|
|
|
});
|
2018-03-06 10:06:45 +01:00
|
|
|
},
|
|
|
|
soundTest() {
|
|
|
|
const sound = new Audio(`${url}/assets/message.mp3`);
|
2018-05-20 19:13:39 +02:00
|
|
|
sound.volume = this.$store.state.device.soundVolume;
|
2018-03-06 10:06:45 +01:00
|
|
|
sound.play();
|
2018-02-22 18:06:35 +01:00
|
|
|
}
|
2018-02-12 14:18:13 +01:00
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="stylus" scoped>
|
2018-09-27 15:25:10 +02:00
|
|
|
.mk-settings
|
2018-02-12 14:18:13 +01:00
|
|
|
display flex
|
|
|
|
width 100%
|
|
|
|
height 100%
|
|
|
|
|
|
|
|
> .nav
|
|
|
|
flex 0 0 200px
|
|
|
|
width 100%
|
|
|
|
height 100%
|
|
|
|
padding 16px 0 0 0
|
|
|
|
overflow auto
|
2018-10-18 23:57:57 +02:00
|
|
|
box-shadow var(--shadowRight)
|
|
|
|
z-index 1
|
2018-02-12 14:18:13 +01:00
|
|
|
|
|
|
|
> p
|
|
|
|
display block
|
|
|
|
padding 10px 16px
|
|
|
|
margin 0
|
2018-09-27 15:25:10 +02:00
|
|
|
color var(--desktopSettingsNavItem)
|
2018-02-12 14:18:13 +01:00
|
|
|
cursor pointer
|
|
|
|
user-select none
|
|
|
|
transition margin-left 0.2s ease
|
|
|
|
|
2018-11-05 17:40:11 +01:00
|
|
|
> [data-icon]
|
2018-02-12 14:18:13 +01:00
|
|
|
margin-right 4px
|
|
|
|
|
|
|
|
&:hover
|
2018-09-27 15:25:10 +02:00
|
|
|
color var(--desktopSettingsNavItemHover)
|
2018-02-12 14:18:13 +01:00
|
|
|
|
|
|
|
&.active
|
|
|
|
margin-left 8px
|
2018-09-26 13:19:35 +02:00
|
|
|
color var(--primary) !important
|
2018-02-12 14:18:13 +01:00
|
|
|
|
|
|
|
> .pages
|
|
|
|
width 100%
|
|
|
|
height 100%
|
|
|
|
flex auto
|
|
|
|
overflow auto
|
2018-10-18 23:18:33 +02:00
|
|
|
background var(--bg)
|
2018-02-12 14:18:13 +01:00
|
|
|
|
|
|
|
> section
|
|
|
|
margin 32px
|
2018-09-27 15:25:10 +02:00
|
|
|
color var(--text)
|
2018-02-12 14:18:13 +01:00
|
|
|
|
|
|
|
</style>
|