2018-02-12 15:18:13 +02:00
|
|
|
<template>
|
|
|
|
<div class="mk-settings">
|
|
|
|
<div class="nav">
|
2018-04-14 19:04:40 +03:00
|
|
|
<p :class="{ active: page == 'profile' }" @mousedown="page = 'profile'">%fa:user .fw%%i18n:@profile%</p>
|
2018-02-12 15:18:13 +02:00
|
|
|
<p :class="{ active: page == 'web' }" @mousedown="page = 'web'">%fa:desktop .fw%Web</p>
|
2018-04-15 01:51:56 +03:00
|
|
|
<p :class="{ active: page == 'notification' }" @mousedown="page = 'notification'">%fa:R bell .fw%%i18n:@notification%</p>
|
2018-04-14 19:04:40 +03:00
|
|
|
<p :class="{ active: page == 'drive' }" @mousedown="page = 'drive'">%fa:cloud .fw%%i18n:@drive%</p>
|
|
|
|
<p :class="{ active: page == 'mute' }" @mousedown="page = 'mute'">%fa:ban .fw%%i18n:@mute%</p>
|
2018-04-15 01:51:56 +03:00
|
|
|
<p :class="{ active: page == 'apps' }" @mousedown="page = 'apps'">%fa:puzzle-piece .fw%%i18n:@apps%</p>
|
2018-02-12 15:18:13 +02:00
|
|
|
<p :class="{ active: page == 'twitter' }" @mousedown="page = 'twitter'">%fa:B twitter .fw%Twitter</p>
|
2018-04-14 19:04:40 +03:00
|
|
|
<p :class="{ active: page == 'security' }" @mousedown="page = 'security'">%fa:unlock-alt .fw%%i18n:@security%</p>
|
2018-02-12 15:18:13 +02:00
|
|
|
<p :class="{ active: page == 'api' }" @mousedown="page = 'api'">%fa:key .fw%API</p>
|
2018-04-14 19:04:40 +03:00
|
|
|
<p :class="{ active: page == 'other' }" @mousedown="page = 'other'">%fa:cogs .fw%%i18n:@other%</p>
|
2018-02-12 15:18:13 +02:00
|
|
|
</div>
|
|
|
|
<div class="pages">
|
|
|
|
<section class="profile" v-show="page == 'profile'">
|
2018-04-14 19:04:40 +03:00
|
|
|
<h1>%i18n:@profile%</h1>
|
2018-02-20 16:22:19 +02:00
|
|
|
<x-profile/>
|
2018-02-12 15:18:13 +02:00
|
|
|
</section>
|
|
|
|
|
2018-03-05 13:09:26 +02:00
|
|
|
<section class="web" v-show="page == 'web'">
|
|
|
|
<h1>動作</h1>
|
2018-04-29 11:17:15 +03:00
|
|
|
<mk-switch v-model="clientSettings.fetchOnScroll" @change="onChangeFetchOnScroll" text="スクロールで自動読み込み">
|
2018-03-05 13:09:26 +02:00
|
|
|
<span>ページを下までスクロールしたときに自動で追加のコンテンツを読み込みます。</span>
|
|
|
|
</mk-switch>
|
2018-03-14 09:12:36 +02:00
|
|
|
<mk-switch v-model="autoPopout" text="ウィンドウの自動ポップアウト">
|
|
|
|
<span>ウィンドウが開かれるとき、ポップアウト(ブラウザ外に切り離す)可能なら自動でポップアウトします。この設定はブラウザに記憶されます。</span>
|
|
|
|
</mk-switch>
|
2018-04-12 00:18:55 +03:00
|
|
|
<details>
|
|
|
|
<summary>詳細設定</summary>
|
|
|
|
<mk-switch v-model="apiViaStream" text="ストリームを経由したAPIリクエスト">
|
|
|
|
<span>この設定をオンにすると、websocket接続を経由してAPIリクエストが行われます(パフォーマンス向上が期待できます)。オフにすると、ネイティブの fetch APIが利用されます。この設定はこのデバイスのみ有効です。</span>
|
|
|
|
</mk-switch>
|
|
|
|
</details>
|
2018-03-05 13:09:26 +02:00
|
|
|
</section>
|
|
|
|
|
2018-02-12 15:18:13 +02:00
|
|
|
<section class="web" v-show="page == 'web'">
|
2018-03-06 02:58:34 +02:00
|
|
|
<h1>デザインと表示</h1>
|
2018-03-02 11:46:08 +02:00
|
|
|
<div class="div">
|
2018-04-19 21:41:24 +03:00
|
|
|
<button class="ui button" @click="customizeHome" style="margin-bottom: 16px">ホームをカスタマイズ</button>
|
|
|
|
</div>
|
|
|
|
<div class="div">
|
2018-04-22 11:28:21 +03:00
|
|
|
<mk-switch v-model="darkmode" text="ダークモード"/>
|
2018-04-29 11:54:50 +03:00
|
|
|
<mk-switch v-model="clientSettings.circleIcons" @change="onChangeCircleIcons" text="円形のアイコンを使用"/>
|
2018-04-29 11:17:15 +03:00
|
|
|
<mk-switch v-model="clientSettings.gradientWindowHeader" @change="onChangeGradientWindowHeader" text="ウィンドウのタイトルバーにグラデーションを使用"/>
|
2018-02-22 19:06:35 +02:00
|
|
|
</div>
|
2018-04-29 11:17:15 +03:00
|
|
|
<mk-switch v-model="clientSettings.showPostFormOnTopOfTl" @change="onChangeShowPostFormOnTopOfTl" text="タイムライン上部に投稿フォームを表示する"/>
|
|
|
|
<mk-switch v-model="clientSettings.showReplyTarget" @change="onChangeShowReplyTarget" text="リプライ先を表示する"/>
|
|
|
|
<mk-switch v-model="clientSettings.showMyRenotes" @change="onChangeShowMyRenotes" text="自分の行ったRenoteをタイムラインに表示する"/>
|
|
|
|
<mk-switch v-model="clientSettings.showRenotedMyNotes" @change="onChangeShowRenotedMyNotes" text="Renoteされた自分の投稿をタイムラインに表示する"/>
|
|
|
|
<mk-switch v-model="clientSettings.showMaps" @change="onChangeShowMaps" text="マップの自動展開">
|
2018-03-06 01:35:25 +02:00
|
|
|
<span>位置情報が添付された投稿のマップを自動的に展開します。</span>
|
|
|
|
</mk-switch>
|
2018-03-03 02:49:47 +02:00
|
|
|
</section>
|
|
|
|
|
2018-03-04 11:50:30 +02:00
|
|
|
<section class="web" v-show="page == 'web'">
|
|
|
|
<h1>サウンド</h1>
|
|
|
|
<mk-switch v-model="enableSounds" text="サウンドを有効にする">
|
|
|
|
<span>投稿やメッセージを送受信したときなどにサウンドを再生します。この設定はブラウザに記憶されます。</span>
|
|
|
|
</mk-switch>
|
2018-03-06 11:06:45 +02:00
|
|
|
<label>ボリューム</label>
|
|
|
|
<el-slider
|
|
|
|
v-model="soundVolume"
|
|
|
|
:show-input="true"
|
|
|
|
:format-tooltip="v => `${v}%`"
|
|
|
|
:disabled="!enableSounds"
|
|
|
|
/>
|
|
|
|
<button class="ui button" @click="soundTest">%fa:volume-up% テスト</button>
|
2018-03-04 11:50:30 +02:00
|
|
|
</section>
|
|
|
|
|
2018-03-04 02:39:25 +02:00
|
|
|
<section class="web" v-show="page == 'web'">
|
|
|
|
<h1>モバイル</h1>
|
2018-04-29 11:17:15 +03:00
|
|
|
<mk-switch v-model="clientSettings.disableViaMobile" @change="onChangeDisableViaMobile" text="「モバイルからの投稿」フラグを付けない"/>
|
2018-03-04 02:39:25 +02:00
|
|
|
</section>
|
|
|
|
|
2018-03-03 02:49:47 +02:00
|
|
|
<section class="web" v-show="page == 'web'">
|
|
|
|
<h1>言語</h1>
|
|
|
|
<el-select v-model="lang" placeholder="言語を選択">
|
|
|
|
<el-option-group label="推奨">
|
|
|
|
<el-option label="自動" value=""/>
|
|
|
|
</el-option-group>
|
|
|
|
<el-option-group label="言語を指定">
|
|
|
|
<el-option label="ja-JP" value="ja"/>
|
|
|
|
<el-option label="en-US" value="en"/>
|
2018-04-15 23:59:21 +03:00
|
|
|
<el-option label="fr" value="fr"/>
|
2018-05-04 01:28:07 +03:00
|
|
|
<el-option label="pl" value="pl"/>
|
2018-03-03 02:49:47 +02:00
|
|
|
</el-option-group>
|
|
|
|
</el-select>
|
2018-03-03 04:13:28 +02:00
|
|
|
<div class="none ui info">
|
2018-03-03 07:25:36 +02:00
|
|
|
<p>%fa:info-circle%変更はページの再度読み込み後に反映されます。</p>
|
2018-03-03 04:13:28 +02:00
|
|
|
</div>
|
2018-03-02 11:46:08 +02:00
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class="web" v-show="page == 'web'">
|
|
|
|
<h1>キャッシュ</h1>
|
|
|
|
<button class="ui button" @click="clean">クリーンアップ</button>
|
2018-03-03 04:13:28 +02:00
|
|
|
<div class="none ui info warn">
|
|
|
|
<p>%fa:exclamation-triangle%クリーンアップを行うと、ブラウザに記憶されたアカウント情報のキャッシュ、書きかけの投稿・返信・メッセージ、およびその他のデータ(設定情報含む)が削除されます。クリーンアップを行った後はページを再度読み込みする必要があります。</p>
|
2018-03-02 11:46:08 +02:00
|
|
|
</div>
|
2018-02-12 15:18:13 +02:00
|
|
|
</section>
|
|
|
|
|
2018-03-05 01:07:09 +02:00
|
|
|
<section class="notification" v-show="page == 'notification'">
|
|
|
|
<h1>通知</h1>
|
2018-04-07 21:58:11 +03:00
|
|
|
<mk-switch v-model="os.i.settings.autoWatch" @change="onChangeAutoWatch" text="投稿の自動ウォッチ">
|
2018-03-05 01:07:09 +02:00
|
|
|
<span>リアクションしたり返信したりした投稿に関する通知を自動的に受け取るようにします。</span>
|
|
|
|
</mk-switch>
|
|
|
|
</section>
|
|
|
|
|
2018-02-12 15:18:13 +02:00
|
|
|
<section class="drive" v-show="page == 'drive'">
|
2018-04-14 19:04:40 +03:00
|
|
|
<h1>%i18n:@drive%</h1>
|
2018-03-05 11:37:12 +02:00
|
|
|
<x-drive/>
|
2018-02-12 15:18:13 +02:00
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class="mute" v-show="page == 'mute'">
|
2018-04-14 19:04:40 +03:00
|
|
|
<h1>%i18n:@mute%</h1>
|
2018-02-21 18:25:57 +02:00
|
|
|
<x-mute/>
|
2018-02-12 15:18:13 +02:00
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class="apps" v-show="page == 'apps'">
|
|
|
|
<h1>アプリケーション</h1>
|
2018-03-05 11:11:07 +02:00
|
|
|
<x-apps/>
|
2018-02-12 15:18:13 +02:00
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class="twitter" v-show="page == 'twitter'">
|
|
|
|
<h1>Twitter</h1>
|
|
|
|
<mk-twitter-setting/>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class="password" v-show="page == 'security'">
|
2018-04-14 19:04:40 +03:00
|
|
|
<h1>%i18n:@password%</h1>
|
2018-02-21 18:25:57 +02:00
|
|
|
<x-password/>
|
2018-02-12 15:18:13 +02:00
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class="2fa" v-show="page == 'security'">
|
2018-04-14 19:04:40 +03:00
|
|
|
<h1>%i18n:@2fa%</h1>
|
2018-02-21 18:25:57 +02:00
|
|
|
<x-2fa/>
|
2018-02-12 15:18:13 +02:00
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class="signin" v-show="page == 'security'">
|
|
|
|
<h1>サインイン履歴</h1>
|
2018-03-05 11:11:07 +02:00
|
|
|
<x-signins/>
|
2018-02-12 15:18:13 +02:00
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class="api" v-show="page == 'api'">
|
|
|
|
<h1>API</h1>
|
2018-02-22 14:15:24 +02:00
|
|
|
<x-api/>
|
2018-02-12 15:18:13 +02:00
|
|
|
</section>
|
|
|
|
|
2018-03-03 02:49:47 +02:00
|
|
|
<section class="other" v-show="page == 'other'">
|
|
|
|
<h1>Misskeyについて</h1>
|
|
|
|
<p v-if="meta">このサーバーの運営者: <i><a :href="meta.maintainer.url" target="_blank">{{ meta.maintainer.name }}</a></i></p>
|
|
|
|
</section>
|
|
|
|
|
2018-03-02 11:46:08 +02:00
|
|
|
<section class="other" v-show="page == 'other'">
|
|
|
|
<h1>Misskey Update</h1>
|
|
|
|
<p>
|
|
|
|
<span>バージョン: <i>{{ version }}</i></span>
|
|
|
|
<template v-if="latestVersion !== undefined">
|
|
|
|
<br>
|
|
|
|
<span>最新のバージョン: <i>{{ latestVersion ? latestVersion : version }}</i></span>
|
|
|
|
</template>
|
|
|
|
</p>
|
2018-03-04 07:10:14 +02:00
|
|
|
<button class="ui button block" @click="checkForUpdate" :disabled="checkingForUpdate">
|
2018-03-02 11:46:08 +02:00
|
|
|
<template v-if="checkingForUpdate">アップデートを確認中<mk-ellipsis/></template>
|
|
|
|
<template v-else>アップデートを確認</template>
|
|
|
|
</button>
|
2018-03-04 07:10:14 +02:00
|
|
|
<details>
|
|
|
|
<summary>詳細設定</summary>
|
|
|
|
<mk-switch v-model="preventUpdate" text="アップデートを延期する(非推奨)">
|
|
|
|
<span>この設定をオンにしてもアップデートが反映される場合があります。この設定はこのデバイスのみ有効です。</span>
|
|
|
|
</mk-switch>
|
|
|
|
</details>
|
2018-03-02 11:46:08 +02:00
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class="other" v-show="page == 'other'">
|
|
|
|
<h1>高度な設定</h1>
|
|
|
|
<mk-switch v-model="debug" text="デバッグモードを有効にする">
|
2018-03-15 05:56:50 +02:00
|
|
|
<span>この設定はブラウザに記憶されます。</span>
|
2018-03-02 11:46:08 +02:00
|
|
|
</mk-switch>
|
2018-03-15 06:11:31 +02:00
|
|
|
<template v-if="debug">
|
|
|
|
<mk-switch v-model="useRawScript" text="生のスクリプトを読み込む">
|
|
|
|
<span>圧縮されていない「生の」スクリプトを使用します。サイズが大きいため、読み込みに時間がかかる場合があります。この設定はブラウザに記憶されます。</span>
|
|
|
|
</mk-switch>
|
|
|
|
<div class="none ui info">
|
|
|
|
<p>%fa:info-circle%Misskeyはソースマップも提供しています。</p>
|
|
|
|
</div>
|
|
|
|
</template>
|
2018-03-03 00:32:18 +02:00
|
|
|
<mk-switch v-model="enableExperimental" text="実験的機能を有効にする">
|
2018-03-15 05:56:50 +02:00
|
|
|
<span>実験的機能を有効にするとMisskeyの動作が不安定になる可能性があります。この設定はブラウザに記憶されます。</span>
|
|
|
|
</mk-switch>
|
2018-03-15 12:53:46 +02:00
|
|
|
<details v-if="debug">
|
|
|
|
<summary>ツール</summary>
|
|
|
|
<button class="ui button block" @click="taskmngr">タスクマネージャ</button>
|
|
|
|
</details>
|
2018-03-02 11:46:08 +02:00
|
|
|
</section>
|
|
|
|
|
2018-02-12 15:18:13 +02:00
|
|
|
<section class="other" v-show="page == 'other'">
|
2018-04-14 19:04:40 +03:00
|
|
|
<h1>%i18n:@license%</h1>
|
2018-03-01 23:26:31 +02:00
|
|
|
<div v-html="license"></div>
|
|
|
|
<a :href="licenseUrl" target="_blank">サードパーティ</a>
|
2018-02-12 15:18:13 +02:00
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
2018-02-20 16:22:19 +02:00
|
|
|
import XProfile from './settings.profile.vue';
|
2018-02-21 18:25:57 +02:00
|
|
|
import XMute from './settings.mute.vue';
|
|
|
|
import XPassword from './settings.password.vue';
|
|
|
|
import X2fa from './settings.2fa.vue';
|
2018-02-22 14:15:24 +02:00
|
|
|
import XApi from './settings.api.vue';
|
2018-03-05 11:11:07 +02:00
|
|
|
import XApps from './settings.apps.vue';
|
|
|
|
import XSignins from './settings.signins.vue';
|
2018-03-05 11:37:12 +02:00
|
|
|
import XDrive from './settings.drive.vue';
|
2018-03-06 11:06:45 +02:00
|
|
|
import { url, docsUrl, license, lang, version } from '../../../config';
|
2018-03-02 11:46:08 +02:00
|
|
|
import checkForUpdate from '../../../common/scripts/check-for-update';
|
2018-03-15 12:53:46 +02:00
|
|
|
import MkTaskManager from './taskmanager.vue';
|
2018-02-19 09:58:37 +02:00
|
|
|
|
2018-02-12 15:18:13 +02:00
|
|
|
export default Vue.extend({
|
2018-02-19 09:58:37 +02:00
|
|
|
components: {
|
2018-02-21 18:25:57 +02:00
|
|
|
XProfile,
|
|
|
|
XMute,
|
|
|
|
XPassword,
|
2018-02-22 14:15:24 +02:00
|
|
|
X2fa,
|
2018-03-05 11:11:07 +02:00
|
|
|
XApi,
|
|
|
|
XApps,
|
2018-03-05 11:37:12 +02:00
|
|
|
XSignins,
|
|
|
|
XDrive
|
2018-02-19 09:58:37 +02:00
|
|
|
},
|
2018-02-12 15:18:13 +02:00
|
|
|
data() {
|
|
|
|
return {
|
2018-02-22 19:06:35 +02:00
|
|
|
page: 'profile',
|
2018-03-03 00:32:18 +02:00
|
|
|
meta: null,
|
2018-03-01 23:26:31 +02:00
|
|
|
license,
|
2018-03-02 11:46:08 +02:00
|
|
|
version,
|
|
|
|
latestVersion: undefined,
|
|
|
|
checkingForUpdate: false,
|
2018-04-22 11:28:21 +03:00
|
|
|
darkmode: localStorage.getItem('darkmode') == 'true',
|
2018-03-04 11:50:30 +02:00
|
|
|
enableSounds: localStorage.getItem('enableSounds') == 'true',
|
2018-03-14 09:12:36 +02:00
|
|
|
autoPopout: localStorage.getItem('autoPopout') == 'true',
|
2018-04-12 00:18:55 +03:00
|
|
|
apiViaStream: localStorage.getItem('apiViaStream') ? localStorage.getItem('apiViaStream') == 'true' : true,
|
2018-04-12 00:20:32 +03:00
|
|
|
soundVolume: localStorage.getItem('soundVolume') ? parseInt(localStorage.getItem('soundVolume'), 10) : 50,
|
2018-03-03 02:49:47 +02:00
|
|
|
lang: localStorage.getItem('lang') || '',
|
2018-03-04 07:10:14 +02:00
|
|
|
preventUpdate: localStorage.getItem('preventUpdate') == 'true',
|
2018-03-03 00:32:18 +02:00
|
|
|
debug: localStorage.getItem('debug') == 'true',
|
2018-03-15 05:56:50 +02:00
|
|
|
useRawScript: localStorage.getItem('useRawScript') == 'true',
|
2018-03-03 00:32:18 +02:00
|
|
|
enableExperimental: localStorage.getItem('enableExperimental') == 'true'
|
2018-02-12 15:18:13 +02:00
|
|
|
};
|
2018-02-22 19:06:35 +02:00
|
|
|
},
|
2018-03-15 12:53:46 +02:00
|
|
|
computed: {
|
|
|
|
licenseUrl(): string {
|
|
|
|
return `${docsUrl}/${lang}/license`;
|
|
|
|
}
|
|
|
|
},
|
2018-03-02 11:46:08 +02:00
|
|
|
watch: {
|
2018-03-14 09:12:36 +02:00
|
|
|
autoPopout() {
|
|
|
|
localStorage.setItem('autoPopout', this.autoPopout ? 'true' : 'false');
|
|
|
|
},
|
2018-04-12 00:18:55 +03:00
|
|
|
apiViaStream() {
|
|
|
|
localStorage.setItem('apiViaStream', this.apiViaStream ? 'true' : 'false');
|
|
|
|
},
|
2018-04-22 11:28:21 +03:00
|
|
|
darkmode() {
|
|
|
|
(this as any)._updateDarkmode_(this.darkmode);
|
|
|
|
},
|
2018-03-04 11:50:30 +02:00
|
|
|
enableSounds() {
|
|
|
|
localStorage.setItem('enableSounds', this.enableSounds ? 'true' : 'false');
|
|
|
|
},
|
2018-03-06 11:06:45 +02:00
|
|
|
soundVolume() {
|
|
|
|
localStorage.setItem('soundVolume', this.soundVolume.toString());
|
|
|
|
},
|
2018-03-03 02:49:47 +02:00
|
|
|
lang() {
|
|
|
|
localStorage.setItem('lang', this.lang);
|
|
|
|
},
|
2018-03-04 07:10:14 +02:00
|
|
|
preventUpdate() {
|
|
|
|
localStorage.setItem('preventUpdate', this.preventUpdate ? 'true' : 'false');
|
|
|
|
},
|
2018-03-02 11:46:08 +02:00
|
|
|
debug() {
|
|
|
|
localStorage.setItem('debug', this.debug ? 'true' : 'false');
|
2018-03-03 00:32:18 +02:00
|
|
|
},
|
2018-03-15 05:56:50 +02:00
|
|
|
useRawScript() {
|
|
|
|
localStorage.setItem('useRawScript', this.useRawScript ? 'true' : 'false');
|
|
|
|
},
|
2018-03-03 00:32:18 +02:00
|
|
|
enableExperimental() {
|
|
|
|
localStorage.setItem('enableExperimental', this.enableExperimental ? 'true' : 'false');
|
2018-03-02 11:46:08 +02:00
|
|
|
}
|
|
|
|
},
|
2018-02-22 19:06:35 +02:00
|
|
|
created() {
|
2018-03-03 02:49:47 +02:00
|
|
|
(this as any).os.getMeta().then(meta => {
|
|
|
|
this.meta = meta;
|
|
|
|
});
|
2018-02-22 19:06:35 +02:00
|
|
|
},
|
|
|
|
methods: {
|
2018-03-15 12:53:46 +02:00
|
|
|
taskmngr() {
|
|
|
|
(this as any).os.new(MkTaskManager);
|
|
|
|
},
|
2018-02-22 19:06:35 +02:00
|
|
|
customizeHome() {
|
|
|
|
this.$router.push('/i/customize-home');
|
|
|
|
this.$emit('done');
|
|
|
|
},
|
2018-03-05 13:09:26 +02:00
|
|
|
onChangeFetchOnScroll(v) {
|
2018-04-29 11:17:15 +03:00
|
|
|
this.$store.dispatch('settings/set', {
|
|
|
|
key: 'fetchOnScroll',
|
2018-03-05 13:09:26 +02:00
|
|
|
value: v
|
|
|
|
});
|
|
|
|
},
|
2018-03-05 01:07:09 +02:00
|
|
|
onChangeAutoWatch(v) {
|
|
|
|
(this as any).api('i/update', {
|
2018-03-29 08:48:47 +03:00
|
|
|
autoWatch: v
|
2018-03-05 01:07:09 +02:00
|
|
|
});
|
|
|
|
},
|
2018-04-19 21:41:24 +03:00
|
|
|
onChangeDark(v) {
|
2018-04-29 11:17:15 +03:00
|
|
|
this.$store.dispatch('settings/set', {
|
|
|
|
key: 'dark',
|
2018-04-19 21:41:24 +03:00
|
|
|
value: v
|
|
|
|
});
|
|
|
|
},
|
2018-03-03 02:49:47 +02:00
|
|
|
onChangeShowPostFormOnTopOfTl(v) {
|
2018-04-29 11:17:15 +03:00
|
|
|
this.$store.dispatch('settings/set', {
|
|
|
|
key: 'showPostFormOnTopOfTl',
|
2018-03-03 02:49:47 +02:00
|
|
|
value: v
|
2018-02-22 19:06:35 +02:00
|
|
|
});
|
2018-03-02 11:46:08 +02:00
|
|
|
},
|
2018-04-18 01:35:56 +03:00
|
|
|
onChangeShowReplyTarget(v) {
|
2018-04-29 11:17:15 +03:00
|
|
|
this.$store.dispatch('settings/set', {
|
|
|
|
key: 'showReplyTarget',
|
2018-04-18 01:35:56 +03:00
|
|
|
value: v
|
|
|
|
});
|
|
|
|
},
|
2018-04-21 05:42:38 +03:00
|
|
|
onChangeShowMyRenotes(v) {
|
2018-04-29 11:17:15 +03:00
|
|
|
this.$store.dispatch('settings/set', {
|
|
|
|
key: 'showMyRenotes',
|
2018-04-21 05:42:38 +03:00
|
|
|
value: v
|
|
|
|
});
|
|
|
|
},
|
|
|
|
onChangeShowRenotedMyNotes(v) {
|
2018-04-29 11:17:15 +03:00
|
|
|
this.$store.dispatch('settings/set', {
|
|
|
|
key: 'showRenotedMyNotes',
|
2018-04-21 05:42:38 +03:00
|
|
|
value: v
|
|
|
|
});
|
|
|
|
},
|
2018-03-06 01:35:25 +02:00
|
|
|
onChangeShowMaps(v) {
|
2018-04-29 11:17:15 +03:00
|
|
|
this.$store.dispatch('settings/set', {
|
|
|
|
key: 'showMaps',
|
|
|
|
value: v
|
|
|
|
});
|
|
|
|
},
|
|
|
|
onChangeCircleIcons(v) {
|
|
|
|
this.$store.dispatch('settings/set', {
|
|
|
|
key: 'circleIcons',
|
2018-03-06 01:35:25 +02:00
|
|
|
value: v
|
|
|
|
});
|
|
|
|
},
|
2018-03-06 07:33:01 +02:00
|
|
|
onChangeGradientWindowHeader(v) {
|
2018-04-29 11:17:15 +03:00
|
|
|
this.$store.dispatch('settings/set', {
|
|
|
|
key: 'gradientWindowHeader',
|
2018-03-06 07:33:01 +02:00
|
|
|
value: v
|
|
|
|
});
|
|
|
|
},
|
2018-03-04 02:39:25 +02:00
|
|
|
onChangeDisableViaMobile(v) {
|
2018-04-29 11:17:15 +03:00
|
|
|
this.$store.dispatch('settings/set', {
|
|
|
|
key: 'disableViaMobile',
|
2018-03-04 02:39:25 +02:00
|
|
|
value: v
|
|
|
|
});
|
|
|
|
},
|
2018-03-02 11:46:08 +02: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({
|
|
|
|
title: '利用可能な更新はありません',
|
|
|
|
text: 'お使いのMisskeyは最新です。'
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
(this as any).apis.dialog({
|
|
|
|
title: '新しいバージョンが利用可能です',
|
|
|
|
text: 'ページを再度読み込みすると更新が適用されます。'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
clean() {
|
|
|
|
localStorage.clear();
|
|
|
|
(this as any).apis.dialog({
|
|
|
|
title: 'キャッシュを削除しました',
|
|
|
|
text: 'ページを再度読み込みしてください。'
|
|
|
|
});
|
2018-03-06 11:06:45 +02:00
|
|
|
},
|
|
|
|
soundTest() {
|
|
|
|
const sound = new Audio(`${url}/assets/message.mp3`);
|
2018-04-12 00:20:32 +03:00
|
|
|
sound.volume = localStorage.getItem('soundVolume') ? parseInt(localStorage.getItem('soundVolume'), 10) / 100 : 0.5;
|
2018-03-06 11:06:45 +02:00
|
|
|
sound.play();
|
2018-02-22 19:06:35 +02:00
|
|
|
}
|
2018-02-12 15:18:13 +02:00
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="stylus" scoped>
|
2018-03-03 06:47:55 +02:00
|
|
|
@import '~const.styl'
|
|
|
|
|
2018-04-19 22:51:04 +03:00
|
|
|
root(isDark)
|
2018-02-12 15:18:13 +02:00
|
|
|
display flex
|
|
|
|
width 100%
|
|
|
|
height 100%
|
|
|
|
|
|
|
|
> .nav
|
|
|
|
flex 0 0 200px
|
|
|
|
width 100%
|
|
|
|
height 100%
|
|
|
|
padding 16px 0 0 0
|
|
|
|
overflow auto
|
2018-04-19 22:51:04 +03:00
|
|
|
border-right solid 1px isDark ? #1c2023 : #ddd
|
2018-02-12 15:18:13 +02:00
|
|
|
|
|
|
|
> p
|
|
|
|
display block
|
|
|
|
padding 10px 16px
|
|
|
|
margin 0
|
2018-04-19 22:51:04 +03:00
|
|
|
color isDark ? #9aa2a7 : #666
|
2018-02-12 15:18:13 +02:00
|
|
|
cursor pointer
|
|
|
|
user-select none
|
|
|
|
transition margin-left 0.2s ease
|
|
|
|
|
|
|
|
> [data-fa]
|
|
|
|
margin-right 4px
|
|
|
|
|
|
|
|
&:hover
|
2018-04-19 22:51:04 +03:00
|
|
|
color isDark ? #fff : #555
|
2018-02-12 15:18:13 +02:00
|
|
|
|
|
|
|
&.active
|
|
|
|
margin-left 8px
|
|
|
|
color $theme-color !important
|
|
|
|
|
|
|
|
> .pages
|
|
|
|
width 100%
|
|
|
|
height 100%
|
|
|
|
flex auto
|
|
|
|
overflow auto
|
|
|
|
|
|
|
|
> section
|
|
|
|
margin 32px
|
2018-04-19 22:51:04 +03:00
|
|
|
color isDark ? #c4ccd2 : #4a535a
|
2018-02-12 15:18:13 +02:00
|
|
|
|
|
|
|
> h1
|
|
|
|
margin 0 0 1em 0
|
|
|
|
padding 0 0 8px 0
|
|
|
|
font-size 1em
|
2018-04-19 22:51:04 +03:00
|
|
|
color isDark ? #e3e7ea : #555
|
|
|
|
border-bottom solid 1px isDark ? #1c2023 : #eee
|
2018-02-12 15:18:13 +02:00
|
|
|
|
2018-03-01 23:26:31 +02:00
|
|
|
&, >>> *
|
2018-03-04 07:10:14 +02:00
|
|
|
.ui.button.block
|
|
|
|
margin 16px 0
|
|
|
|
|
2018-03-01 23:26:31 +02:00
|
|
|
> section
|
|
|
|
margin 32px 0
|
|
|
|
|
|
|
|
> h2
|
|
|
|
margin 0 0 1em 0
|
|
|
|
padding 0 0 8px 0
|
|
|
|
font-size 1em
|
2018-04-20 01:45:37 +03:00
|
|
|
color isDark ? #e3e7ea : #555
|
|
|
|
border-bottom solid 1px isDark ? #1c2023 : #eee
|
2018-03-01 23:26:31 +02:00
|
|
|
|
2018-02-22 19:06:35 +02:00
|
|
|
> .web
|
2018-03-02 11:46:08 +02:00
|
|
|
> .div
|
2018-04-19 22:51:04 +03:00
|
|
|
border-bottom solid 1px isDark ? #1c2023 : #eee
|
2018-04-19 21:41:24 +03:00
|
|
|
margin 16px 0
|
2018-02-22 19:06:35 +02:00
|
|
|
|
2018-04-19 22:51:04 +03:00
|
|
|
.mk-settings[data-darkmode]
|
|
|
|
root(true)
|
|
|
|
|
|
|
|
.mk-settings:not([data-darkmode])
|
|
|
|
root(false)
|
|
|
|
|
2018-02-12 15:18:13 +02:00
|
|
|
</style>
|