mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-28 08:53:09 +02:00
✌️
This commit is contained in:
parent
beb8da9283
commit
0d6ccd489d
6 changed files with 173 additions and 50 deletions
|
@ -43,6 +43,28 @@ common:
|
|||
update-available: "Misskeyの新しいバージョンがあります({newer}。現在{current}を利用中)。ページを再度読み込みすると更新が適用されます。"
|
||||
my-token-regenerated: "あなたのトークンが更新されたのでサインアウトします。"
|
||||
|
||||
widgets:
|
||||
profile: "プロフィール"
|
||||
calendar: "カレンダー"
|
||||
timemachine: "カレンダー(タイムマシン)"
|
||||
activity: "アクティビティ"
|
||||
rss: "RSSリーダー"
|
||||
memo: "メモ"
|
||||
trends: "トレンド"
|
||||
photo-stream: "フォトストリーム"
|
||||
slideshow: "スライドショー"
|
||||
version: "バージョン"
|
||||
broadcast: "ブロードキャスト"
|
||||
notifications: "通知"
|
||||
users: "おすすめユーザー"
|
||||
polls: "投票"
|
||||
post-form: "投稿フォーム"
|
||||
messaging: "メッセージ"
|
||||
server: "サーバー情報"
|
||||
donation: "寄付のお願い"
|
||||
nav: "ナビゲーション"
|
||||
tips: "ヒント"
|
||||
|
||||
common/views/components/connect-failed.vue:
|
||||
title: "サーバーに接続できません"
|
||||
description: "インターネット回線に問題があるか、サーバーがダウンまたはメンテナンスしている可能性があります。しばらくしてから{再度お試し}ください。"
|
||||
|
@ -201,6 +223,11 @@ common/views/widgets/server.vue:
|
|||
title: "サーバー情報"
|
||||
toggle: "表示を切り替え"
|
||||
|
||||
common/views/widgets/memo.vue:
|
||||
title: "メモ"
|
||||
memo: "ここに書いて!"
|
||||
save: "保存"
|
||||
|
||||
desktop/views/components/activity.chart.vue:
|
||||
total: "Black ... Total"
|
||||
notes: "Blue ... Notes"
|
||||
|
@ -319,25 +346,6 @@ desktop/views/components/game-window.vue:
|
|||
desktop/views/components/home.vue:
|
||||
done: "完了"
|
||||
add-widget: "ウィジェットを追加:"
|
||||
profile: "プロフィール"
|
||||
calendar: "カレンダー"
|
||||
timemachine: "カレンダー(タイムマシン)"
|
||||
activity: "アクティビティ"
|
||||
rss: "RSSリーダー"
|
||||
trends: "トレンド"
|
||||
photostream: "フォトストリーム"
|
||||
slideshow: "スライドショー"
|
||||
version: "バージョン"
|
||||
broadcast: "ブロードキャスト"
|
||||
notifications: "通知"
|
||||
users: "おすすめユーザー"
|
||||
polls: "投票"
|
||||
post-form: "投稿フォーム"
|
||||
messaging: "メッセージ"
|
||||
server: "サーバー情報"
|
||||
donation: "寄付のお願い"
|
||||
nav: "ナビゲーション"
|
||||
tips: "ヒント"
|
||||
add: "追加"
|
||||
|
||||
desktop/views/input-dialog.vue:
|
||||
|
|
|
@ -3,6 +3,7 @@ import Vue from 'vue';
|
|||
import wVersion from './version.vue';
|
||||
import wRss from './rss.vue';
|
||||
import wServer from './server.vue';
|
||||
import wMemo from './memo.vue';
|
||||
import wBroadcast from './broadcast.vue';
|
||||
import wCalendar from './calendar.vue';
|
||||
import wPhotoStream from './photo-stream.vue';
|
||||
|
@ -19,5 +20,6 @@ Vue.component('mkw-tips', wTips);
|
|||
Vue.component('mkw-donation', wDonation);
|
||||
Vue.component('mkw-broadcast', wBroadcast);
|
||||
Vue.component('mkw-server', wServer);
|
||||
Vue.component('mkw-memo', wMemo);
|
||||
Vue.component('mkw-rss', wRss);
|
||||
Vue.component('mkw-version', wVersion);
|
||||
|
|
110
src/client/app/common/views/widgets/memo.vue
Normal file
110
src/client/app/common/views/widgets/memo.vue
Normal file
|
@ -0,0 +1,110 @@
|
|||
<template>
|
||||
<div class="mkw-memo">
|
||||
<mk-widget-container :show-header="!props.compact">
|
||||
<template slot="header">%fa:R sticky-note%%i18n:@title%</template>
|
||||
|
||||
<div class="mkw-memo--body">
|
||||
<textarea v-model="text" placeholder="%i18n:@memo%" @input="onChange"></textarea>
|
||||
<button @click="saveMemo" :disabled="!changed">%i18n:@save%</button>
|
||||
</div>
|
||||
</mk-widget-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import define from '../../define-widget';
|
||||
|
||||
export default define({
|
||||
name: 'memo',
|
||||
props: () => ({
|
||||
compact: false
|
||||
})
|
||||
}).extend({
|
||||
data() {
|
||||
return {
|
||||
text: null,
|
||||
changed: false
|
||||
};
|
||||
},
|
||||
|
||||
created() {
|
||||
this.text = this.$store.state.settings.memo;
|
||||
|
||||
this.$watch('$store.state.settings.memo', text => {
|
||||
this.text = text;
|
||||
});
|
||||
},
|
||||
|
||||
methods: {
|
||||
func() {
|
||||
this.props.compact = !this.props.compact;
|
||||
this.save();
|
||||
},
|
||||
|
||||
onChange() {
|
||||
this.changed = true;
|
||||
},
|
||||
|
||||
saveMemo() {
|
||||
this.$store.dispatch('settings/set', {
|
||||
key: 'memo',
|
||||
value: this.text
|
||||
});
|
||||
this.changed = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import '~const.styl'
|
||||
|
||||
root(isDark)
|
||||
.mkw-memo--body
|
||||
padding-bottom 28px + 16px
|
||||
|
||||
> textarea
|
||||
display block
|
||||
width 100%
|
||||
max-width 100%
|
||||
min-width 100%
|
||||
padding 16px
|
||||
color isDark ? #fff : #222
|
||||
background isDark ? #282c37 : #fff
|
||||
border none
|
||||
border-bottom solid 1px isDark ? #1c2023 : #eee
|
||||
|
||||
> button
|
||||
display block
|
||||
position absolute
|
||||
bottom 8px
|
||||
right 8px
|
||||
margin 0
|
||||
padding 0 10px
|
||||
height 28px
|
||||
color $theme-color-foreground
|
||||
background $theme-color !important
|
||||
outline none
|
||||
border none
|
||||
border-radius 4px
|
||||
transition background 0.1s ease
|
||||
cursor pointer
|
||||
|
||||
&:hover
|
||||
background lighten($theme-color, 10%) !important
|
||||
|
||||
&:active
|
||||
background darken($theme-color, 10%) !important
|
||||
transition background 0s ease
|
||||
|
||||
&:disabled
|
||||
opacity 0.7
|
||||
cursor default
|
||||
|
||||
.mkw-memo[data-darkmode]
|
||||
root(true)
|
||||
|
||||
.mkw-memo:not([data-darkmode])
|
||||
root(false)
|
||||
|
||||
</style>
|
|
@ -6,25 +6,26 @@
|
|||
<div class="adder">
|
||||
<p>%i18n:@add-widget%</p>
|
||||
<select v-model="widgetAdderSelected">
|
||||
<option value="profile">%i18n:@profile%</option>
|
||||
<option value="calendar">%i18n:@calendar%</option>
|
||||
<option value="timemachine">%i18n:@timemachine%</option>
|
||||
<option value="activity">%i18n:@activity%</option>
|
||||
<option value="rss">%i18n:@rss%</option>
|
||||
<option value="trends">%i18n:@trends%</option>
|
||||
<option value="photo-stream">%i18n:@photo-stream%</option>
|
||||
<option value="slideshow">%i18n:@slideshow%</option>
|
||||
<option value="version">%i18n:@version%</option>
|
||||
<option value="broadcast">%i18n:@broadcast%</option>
|
||||
<option value="notifications">%i18n:@notifications%</option>
|
||||
<option value="users">%i18n:@users%</option>
|
||||
<option value="polls">%i18n:@polls%</option>
|
||||
<option value="post-form">%i18n:@post-form%</option>
|
||||
<option value="messaging">%i18n:@messaging%</option>
|
||||
<option value="server">%i18n:@server%</option>
|
||||
<option value="donation">%i18n:@donation%</option>
|
||||
<option value="nav">%i18n:@nav%</option>
|
||||
<option value="tips">%i18n:@tips%</option>
|
||||
<option value="profile">%i18n:common.widgets.profile%</option>
|
||||
<option value="calendar">%i18n:common.widgets.calendar%</option>
|
||||
<option value="timemachine">%i18n:common.widgets.timemachine%</option>
|
||||
<option value="activity">%i18n:common.widgets.activity%</option>
|
||||
<option value="rss">%i18n:common.widgets.rss%</option>
|
||||
<option value="trends">%i18n:common.widgets.trends%</option>
|
||||
<option value="photo-stream">%i18n:common.widgets.photo-stream%</option>
|
||||
<option value="slideshow">%i18n:common.widgets.slideshow%</option>
|
||||
<option value="version">%i18n:common.widgets.version%</option>
|
||||
<option value="broadcast">%i18n:common.widgets.broadcast%</option>
|
||||
<option value="notifications">%i18n:common.widgets.notifications%</option>
|
||||
<option value="users">%i18n:common.widgets.users%</option>
|
||||
<option value="polls">%i18n:common.widgets.polls%</option>
|
||||
<option value="post-form">%i18n:common.widgets.post-form%</option>
|
||||
<option value="messaging">%i18n:common.widgets.messaging%</option>
|
||||
<option value="memo">%i18n:common.widgets.memo%</option>
|
||||
<option value="server">%i18n:common.widgets.server%</option>
|
||||
<option value="donation">%i18n:common.widgets.donation%</option>
|
||||
<option value="nav">%i18n:common.widgets.nav%</option>
|
||||
<option value="tips">%i18n:common.widgets.tips%</option>
|
||||
</select>
|
||||
<button @click="addWidget">%i18n:@add%</button>
|
||||
</div>
|
||||
|
|
|
@ -8,17 +8,18 @@
|
|||
<template v-if="customizing">
|
||||
<header>
|
||||
<select v-model="widgetAdderSelected">
|
||||
<option value="profile">プロフィール</option>
|
||||
<option value="calendar">カレンダー</option>
|
||||
<option value="activity">アクティビティ</option>
|
||||
<option value="rss">RSSリーダー</option>
|
||||
<option value="photo-stream">フォトストリーム</option>
|
||||
<option value="slideshow">スライドショー</option>
|
||||
<option value="version">バージョン</option>
|
||||
<option value="server">サーバー情報</option>
|
||||
<option value="donation">寄付のお願い</option>
|
||||
<option value="nav">ナビゲーション</option>
|
||||
<option value="tips">ヒント</option>
|
||||
<option value="profile">%i18n:common.widgets.profile%</option>
|
||||
<option value="calendar">%i18n:common.widgets.calendar%</option>
|
||||
<option value="activity">%i18n:common.widgets.activity%</option>
|
||||
<option value="rss">%i18n:common.widgets.rss%</option>
|
||||
<option value="photo-stream">%i18n:common.widgets.photo-stream%</option>
|
||||
<option value="slideshow">%i18n:common.widgets.slideshow%</option>
|
||||
<option value="version">%i18n:common.widgets.version%</option>
|
||||
<option value="server">%i18n:common.widgets.server%</option>
|
||||
<option value="memo">%i18n:common.widgets.memo%</option>
|
||||
<option value="donation">%i18n:common.widgets.donation%</option>
|
||||
<option value="nav">%i18n:common.widgets.nav%</option>
|
||||
<option value="tips">%i18n:common.widgets.tips%</option>
|
||||
</select>
|
||||
<button @click="addWidget">追加</button>
|
||||
<p><a @click="hint">カスタマイズのヒント</a></p>
|
||||
|
|
|
@ -16,7 +16,8 @@ const defaultSettings = {
|
|||
showMyRenotes: true,
|
||||
showRenotedMyNotes: true,
|
||||
loadRemoteMedia: true,
|
||||
disableViaMobile: false
|
||||
disableViaMobile: false,
|
||||
memo: null
|
||||
};
|
||||
|
||||
const defaultDeviceSettings = {
|
||||
|
|
Loading…
Reference in a new issue