Merge branch 'develop' of https://github.com/misskey-dev/misskey into storybook
This commit is contained in:
commit
3f1a87d1ad
62 changed files with 214 additions and 186 deletions
13
packages/frontend/@types/vue.d.ts
vendored
13
packages/frontend/@types/vue.d.ts
vendored
|
@ -1,13 +0,0 @@
|
||||||
/// <reference types="vue/macros-global" />
|
|
||||||
|
|
||||||
import type { $i } from '@/account';
|
|
||||||
import type { instance } from '@/instance';
|
|
||||||
import type { i18n } from '@/i18n';
|
|
||||||
|
|
||||||
declare module 'vue' {
|
|
||||||
interface ComponentCustomProperties {
|
|
||||||
$i: typeof $i;
|
|
||||||
$t: typeof i18n['t'];
|
|
||||||
$ts: typeof i18n['ts'];
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -26,7 +26,7 @@
|
||||||
<div v-show="showBody" ref="content" :class="[$style.content, { [$style.omitted]: omitted }]">
|
<div v-show="showBody" ref="content" :class="[$style.content, { [$style.omitted]: omitted }]">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
<button v-if="omitted" :class="$style.fade" class="_button" @click="() => { ignoreOmit = true; omitted = false; }">
|
<button v-if="omitted" :class="$style.fade" class="_button" @click="() => { ignoreOmit = true; omitted = false; }">
|
||||||
<span :class="$style.fadeLabel">{{ $ts.showMore }}</span>
|
<span :class="$style.fadeLabel">{{ i18n.ts.showMore }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</Transition>
|
</Transition>
|
||||||
|
@ -36,6 +36,7 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
import { defaultStore } from '@/store';
|
import { defaultStore } from '@/store';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
props: {
|
props: {
|
||||||
|
|
|
@ -18,15 +18,15 @@
|
||||||
<div class="_gaps_m">
|
<div class="_gaps_m">
|
||||||
<template v-for="item in Object.keys(form).filter(item => !form[item].hidden)">
|
<template v-for="item in Object.keys(form).filter(item => !form[item].hidden)">
|
||||||
<MkInput v-if="form[item].type === 'number'" v-model="values[item]" type="number" :step="form[item].step || 1">
|
<MkInput v-if="form[item].type === 'number'" v-model="values[item]" type="number" :step="form[item].step || 1">
|
||||||
<template #label><span v-text="form[item].label || item"></span><span v-if="form[item].required === false"> ({{ $ts.optional }})</span></template>
|
<template #label><span v-text="form[item].label || item"></span><span v-if="form[item].required === false"> ({{ i18n.ts.optional }})</span></template>
|
||||||
<template v-if="form[item].description" #caption>{{ form[item].description }}</template>
|
<template v-if="form[item].description" #caption>{{ form[item].description }}</template>
|
||||||
</MkInput>
|
</MkInput>
|
||||||
<MkInput v-else-if="form[item].type === 'string' && !form[item].multiline" v-model="values[item]" type="text">
|
<MkInput v-else-if="form[item].type === 'string' && !form[item].multiline" v-model="values[item]" type="text">
|
||||||
<template #label><span v-text="form[item].label || item"></span><span v-if="form[item].required === false"> ({{ $ts.optional }})</span></template>
|
<template #label><span v-text="form[item].label || item"></span><span v-if="form[item].required === false"> ({{ i18n.ts.optional }})</span></template>
|
||||||
<template v-if="form[item].description" #caption>{{ form[item].description }}</template>
|
<template v-if="form[item].description" #caption>{{ form[item].description }}</template>
|
||||||
</MkInput>
|
</MkInput>
|
||||||
<MkTextarea v-else-if="form[item].type === 'string' && form[item].multiline" v-model="values[item]">
|
<MkTextarea v-else-if="form[item].type === 'string' && form[item].multiline" v-model="values[item]">
|
||||||
<template #label><span v-text="form[item].label || item"></span><span v-if="form[item].required === false"> ({{ $ts.optional }})</span></template>
|
<template #label><span v-text="form[item].label || item"></span><span v-if="form[item].required === false"> ({{ i18n.ts.optional }})</span></template>
|
||||||
<template v-if="form[item].description" #caption>{{ form[item].description }}</template>
|
<template v-if="form[item].description" #caption>{{ form[item].description }}</template>
|
||||||
</MkTextarea>
|
</MkTextarea>
|
||||||
<MkSwitch v-else-if="form[item].type === 'boolean'" v-model="values[item]">
|
<MkSwitch v-else-if="form[item].type === 'boolean'" v-model="values[item]">
|
||||||
|
@ -34,15 +34,15 @@
|
||||||
<template v-if="form[item].description" #caption>{{ form[item].description }}</template>
|
<template v-if="form[item].description" #caption>{{ form[item].description }}</template>
|
||||||
</MkSwitch>
|
</MkSwitch>
|
||||||
<MkSelect v-else-if="form[item].type === 'enum'" v-model="values[item]">
|
<MkSelect v-else-if="form[item].type === 'enum'" v-model="values[item]">
|
||||||
<template #label><span v-text="form[item].label || item"></span><span v-if="form[item].required === false"> ({{ $ts.optional }})</span></template>
|
<template #label><span v-text="form[item].label || item"></span><span v-if="form[item].required === false"> ({{ i18n.ts.optional }})</span></template>
|
||||||
<option v-for="item in form[item].enum" :key="item.value" :value="item.value">{{ item.label }}</option>
|
<option v-for="item in form[item].enum" :key="item.value" :value="item.value">{{ item.label }}</option>
|
||||||
</MkSelect>
|
</MkSelect>
|
||||||
<MkRadios v-else-if="form[item].type === 'radio'" v-model="values[item]">
|
<MkRadios v-else-if="form[item].type === 'radio'" v-model="values[item]">
|
||||||
<template #label><span v-text="form[item].label || item"></span><span v-if="form[item].required === false"> ({{ $ts.optional }})</span></template>
|
<template #label><span v-text="form[item].label || item"></span><span v-if="form[item].required === false"> ({{ i18n.ts.optional }})</span></template>
|
||||||
<option v-for="item in form[item].options" :key="item.value" :value="item.value">{{ item.label }}</option>
|
<option v-for="item in form[item].options" :key="item.value" :value="item.value">{{ item.label }}</option>
|
||||||
</MkRadios>
|
</MkRadios>
|
||||||
<MkRange v-else-if="form[item].type === 'range'" v-model="values[item]" :min="form[item].min" :max="form[item].max" :step="form[item].step" :text-converter="form[item].textConverter">
|
<MkRange v-else-if="form[item].type === 'range'" v-model="values[item]" :min="form[item].min" :max="form[item].max" :step="form[item].step" :text-converter="form[item].textConverter">
|
||||||
<template #label><span v-text="form[item].label || item"></span><span v-if="form[item].required === false"> ({{ $ts.optional }})</span></template>
|
<template #label><span v-text="form[item].label || item"></span><span v-if="form[item].required === false"> ({{ i18n.ts.optional }})</span></template>
|
||||||
<template v-if="form[item].description" #caption>{{ form[item].description }}</template>
|
<template v-if="form[item].description" #caption>{{ form[item].description }}</template>
|
||||||
</MkRange>
|
</MkRange>
|
||||||
<MkButton v-else-if="form[item].type === 'button'" @click="form[item].action($event, values)">
|
<MkButton v-else-if="form[item].type === 'button'" @click="form[item].action($event, values)">
|
||||||
|
@ -64,6 +64,7 @@ import MkRange from './MkRange.vue';
|
||||||
import MkButton from './MkButton.vue';
|
import MkButton from './MkButton.vue';
|
||||||
import MkRadios from './MkRadios.vue';
|
import MkRadios from './MkRadios.vue';
|
||||||
import MkModalWindow from '@/components/MkModalWindow.vue';
|
import MkModalWindow from '@/components/MkModalWindow.vue';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
|
@ -93,6 +94,7 @@ export default defineComponent({
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
values: {},
|
values: {},
|
||||||
|
i18n,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
<template>
|
<template>
|
||||||
<div :class="$style.root">
|
<div :class="$style.root">
|
||||||
<input v-model="query" :class="$style.input" type="search" :placeholder="q">
|
<input v-model="query" :class="$style.input" type="search" :placeholder="q">
|
||||||
<button :class="$style.button" @click="search"><i class="ti ti-search"></i> {{ $ts.searchByGoogle }}</button>
|
<button :class="$style.button" @click="search"><i class="ti ti-search"></i> {{ i18n.ts.searchByGoogle }}</button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
q: string;
|
q: string;
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
<div class="mk-media-banner">
|
<div class="mk-media-banner">
|
||||||
<div v-if="media.isSensitive && hide" class="sensitive" @click="hide = false">
|
<div v-if="media.isSensitive && hide" class="sensitive" @click="hide = false">
|
||||||
<span class="icon"><i class="ti ti-alert-triangle"></i></span>
|
<span class="icon"><i class="ti ti-alert-triangle"></i></span>
|
||||||
<b>{{ $ts.sensitive }}</b>
|
<b>{{ i18n.ts.sensitive }}</b>
|
||||||
<span>{{ $ts.clickToShow }}</span>
|
<span>{{ i18n.ts.clickToShow }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="media.type.startsWith('audio') && media.type !== 'audio/midi'" class="audio">
|
<div v-else-if="media.type.startsWith('audio') && media.type !== 'audio/midi'" class="audio">
|
||||||
<VuePlyr :options="{ volume: 0.5 }">
|
<VuePlyr :options="{ volume: 0.5 }">
|
||||||
|
@ -33,6 +33,7 @@ import * as misskey from 'misskey-js';
|
||||||
import VuePlyr from 'vue-plyr';
|
import VuePlyr from 'vue-plyr';
|
||||||
import { ColdDeviceStorage } from '@/store';
|
import { ColdDeviceStorage } from '@/store';
|
||||||
import 'vue-plyr/dist/vue-plyr.css';
|
import 'vue-plyr/dist/vue-plyr.css';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
media: misskey.entities.DriveFile;
|
media: misskey.entities.DriveFile;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<div v-if="hide" class="icozogqfvdetwohsdglrbswgrejoxbdj" @click="hide = false">
|
<div v-if="hide" class="icozogqfvdetwohsdglrbswgrejoxbdj" @click="hide = false">
|
||||||
<div>
|
<div>
|
||||||
<b><i class="ti ti-alert-triangle"></i> {{ $ts.sensitive }}</b>
|
<b><i class="ti ti-alert-triangle"></i> {{ i18n.ts.sensitive }}</b>
|
||||||
<span>{{ $ts.clickToShow }}</span>
|
<span>{{ i18n.ts.clickToShow }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="kkjnbbplepmiyuadieoenjgutgcmtsvu">
|
<div v-else class="kkjnbbplepmiyuadieoenjgutgcmtsvu">
|
||||||
|
@ -28,6 +28,7 @@ import * as misskey from 'misskey-js';
|
||||||
import VuePlyr from 'vue-plyr';
|
import VuePlyr from 'vue-plyr';
|
||||||
import { defaultStore } from '@/store';
|
import { defaultStore } from '@/store';
|
||||||
import 'vue-plyr/dist/vue-plyr.css';
|
import 'vue-plyr/dist/vue-plyr.css';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
video: misskey.entities.DriveFile;
|
video: misskey.entities.DriveFile;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<MkModal ref="modal" @click="$emit('click')" @closed="$emit('closed')">
|
<MkModal ref="modal" @click="$emit('click')" @closed="$emit('closed')">
|
||||||
<div ref="rootEl" class="hrmcaedk" :style="{ width: `${width}px`, height: (height ? `min(${height}px, 100%)` : '100%') }">
|
<div ref="rootEl" class="hrmcaedk" :style="{ width: `${width}px`, height: (height ? `min(${height}px, 100%)` : '100%') }">
|
||||||
<div class="header" @contextmenu="onContextmenu">
|
<div class="header" @contextmenu="onContextmenu">
|
||||||
<button v-if="history.length > 0" v-tooltip="$ts.goBack" class="_button" @click="back()"><i class="ti ti-arrow-left"></i></button>
|
<button v-if="history.length > 0" v-tooltip="i18n.ts.goBack" class="_button" @click="back()"><i class="ti ti-arrow-left"></i></button>
|
||||||
<span v-else style="display: inline-block; width: 20px"></span>
|
<span v-else style="display: inline-block; width: 20px"></span>
|
||||||
<span v-if="pageMetadata?.value" class="title">
|
<span v-if="pageMetadata?.value" class="title">
|
||||||
<i v-if="pageMetadata?.value.icon" class="icon" :class="pageMetadata?.value.icon"></i>
|
<i v-if="pageMetadata?.value.icon" class="icon" :class="pageMetadata?.value.icon"></i>
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div v-if="translating || translation" :class="$style.translation">
|
<div v-if="translating || translation" :class="$style.translation">
|
||||||
<MkLoading v-if="translating" mini/>
|
<MkLoading v-if="translating" mini/>
|
||||||
<div v-else :class="$style.translated">
|
<div v-else :class="$style.translated">
|
||||||
<b>{{ $t('translatedFrom', { x: translation.sourceLang }) }}: </b>
|
<b>{{ i18n.t('translatedFrom', { x: translation.sourceLang }) }}: </b>
|
||||||
<Mfm :text="translation.text" :author="appearNote.user" :i="$i" :emoji-urls="appearNote.emojis"/>
|
<Mfm :text="translation.text" :author="appearNote.user" :i="$i" :emoji-urls="appearNote.emojis"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -70,7 +70,7 @@
|
||||||
<div v-if="translating || translation" class="translation">
|
<div v-if="translating || translation" class="translation">
|
||||||
<MkLoading v-if="translating" mini/>
|
<MkLoading v-if="translating" mini/>
|
||||||
<div v-else class="translated">
|
<div v-else class="translated">
|
||||||
<b>{{ $t('translatedFrom', { x: translation.sourceLang }) }}: </b>
|
<b>{{ i18n.t('translatedFrom', { x: translation.sourceLang }) }}: </b>
|
||||||
<Mfm :text="translation.text" :author="appearNote.user" :i="$i" :emoji-urls="appearNote.emojis"/>
|
<Mfm :text="translation.text" :author="appearNote.user" :i="$i" :emoji-urls="appearNote.emojis"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { } from 'vue';
|
import { } from 'vue';
|
||||||
|
import { $i } from '@/account';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
text: string;
|
text: string;
|
||||||
|
|
|
@ -22,6 +22,7 @@ import * as misskey from 'misskey-js';
|
||||||
import MkNoteHeader from '@/components/MkNoteHeader.vue';
|
import MkNoteHeader from '@/components/MkNoteHeader.vue';
|
||||||
import MkSubNoteContent from '@/components/MkSubNoteContent.vue';
|
import MkSubNoteContent from '@/components/MkSubNoteContent.vue';
|
||||||
import MkCwButton from '@/components/MkCwButton.vue';
|
import MkCwButton from '@/components/MkCwButton.vue';
|
||||||
|
import { $i } from '@/account';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
note: misskey.entities.Note;
|
note: misskey.entities.Note;
|
||||||
|
|
|
@ -33,6 +33,7 @@ import MkCwButton from '@/components/MkCwButton.vue';
|
||||||
import { notePage } from '@/filters/note';
|
import { notePage } from '@/filters/note';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
|
import { $i } from '@/account';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
note: misskey.entities.Note;
|
note: misskey.entities.Note;
|
||||||
|
|
|
@ -2,13 +2,14 @@
|
||||||
<div ref="content" :class="[$style.content, { [$style.omitted]: omitted }]">
|
<div ref="content" :class="[$style.content, { [$style.omitted]: omitted }]">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
<button v-if="omitted" :class="$style.fade" class="_button" @click="() => { ignoreOmit = true; omitted = false; }">
|
<button v-if="omitted" :class="$style.fade" class="_button" @click="() => { ignoreOmit = true; omitted = false; }">
|
||||||
<span :class="$style.fadeLabel">{{ $ts.showMore }}</span>
|
<span :class="$style.fadeLabel">{{ i18n.ts.showMore }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted } from 'vue';
|
import { onMounted } from 'vue';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
maxHeight: number;
|
maxHeight: number;
|
||||||
|
|
|
@ -6,12 +6,12 @@
|
||||||
<span>
|
<span>
|
||||||
<template v-if="choice.isVoted"><i class="ti ti-check"></i></template>
|
<template v-if="choice.isVoted"><i class="ti ti-check"></i></template>
|
||||||
<Mfm :text="choice.text" :plain="true"/>
|
<Mfm :text="choice.text" :plain="true"/>
|
||||||
<span v-if="showResult" class="votes">({{ $t('_poll.votesCount', { n: choice.votes }) }})</span>
|
<span v-if="showResult" class="votes">({{ i18n.t('_poll.votesCount', { n: choice.votes }) }})</span>
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p v-if="!readOnly">
|
<p v-if="!readOnly">
|
||||||
<span>{{ $t('_poll.totalVotes', { n: total }) }}</span>
|
<span>{{ i18n.t('_poll.totalVotes', { n: total }) }}</span>
|
||||||
<span> · </span>
|
<span> · </span>
|
||||||
<a v-if="!closed && !isVoted" @click="showResult = !showResult">{{ showResult ? i18n.ts._poll.vote : i18n.ts._poll.showResult }}</a>
|
<a v-if="!closed && !isVoted" @click="showResult = !showResult">{{ showResult ? i18n.ts._poll.vote : i18n.ts._poll.showResult }}</a>
|
||||||
<span v-if="isVoted">{{ i18n.ts._poll.voted }}</span>
|
<span v-if="isVoted">{{ i18n.ts._poll.voted }}</span>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
</p>
|
</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li v-for="(choice, i) in choices" :key="i">
|
<li v-for="(choice, i) in choices" :key="i">
|
||||||
<MkInput class="input" small :model-value="choice" :placeholder="$t('_poll.choiceN', { n: i + 1 })" @update:model-value="onInput(i, $event)">
|
<MkInput class="input" small :model-value="choice" :placeholder="i18n.t('_poll.choiceN', { n: i + 1 })" @update:model-value="onInput(i, $event)">
|
||||||
</MkInput>
|
</MkInput>
|
||||||
<button class="_button" @click="remove(i)">
|
<button class="_button" @click="remove(i)">
|
||||||
<i class="ti ti-x"></i>
|
<i class="ti ti-x"></i>
|
||||||
|
|
|
@ -36,6 +36,7 @@ import MkTextarea from '@/components/MkTextarea.vue';
|
||||||
import MkRadio from '@/components/MkRadio.vue';
|
import MkRadio from '@/components/MkRadio.vue';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import * as config from '@/config';
|
import * as config from '@/config';
|
||||||
|
import { $i } from '@/account';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
|
@ -51,6 +52,7 @@ export default defineComponent({
|
||||||
text: '',
|
text: '',
|
||||||
flag: true,
|
flag: true,
|
||||||
radio: 'misskey',
|
radio: 'misskey',
|
||||||
|
$i,
|
||||||
mfm: `Hello world! This is an @example mention. BTW you are @${this.$i ? this.$i.username : 'guest'}.\nAlso, here is ${config.url} and [example link](${config.url}). for more details, see https://example.com.\nAs you know #misskey is open-source software.`,
|
mfm: `Hello world! This is an @example mention. BTW you are @${this.$i ? this.$i.username : 'guest'}.\nAlso, here is ${config.url} and [example link](${config.url}). for more details, see https://example.com.\nAs you know #misskey is open-source software.`,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<MkA v-if="note.renoteId" :class="$style.rp" :to="`/notes/${note.renoteId}`">RN: ...</MkA>
|
<MkA v-if="note.renoteId" :class="$style.rp" :to="`/notes/${note.renoteId}`">RN: ...</MkA>
|
||||||
</div>
|
</div>
|
||||||
<details v-if="note.files.length > 0">
|
<details v-if="note.files.length > 0">
|
||||||
<summary>({{ $t('withNFiles', { n: note.files.length }) }})</summary>
|
<summary>({{ i18n.t('withNFiles', { n: note.files.length }) }})</summary>
|
||||||
<MkMediaList :media-list="note.files"/>
|
<MkMediaList :media-list="note.files"/>
|
||||||
</details>
|
</details>
|
||||||
<details v-if="note.poll">
|
<details v-if="note.poll">
|
||||||
|
@ -27,6 +27,7 @@ import * as misskey from 'misskey-js';
|
||||||
import MkMediaList from '@/components/MkMediaList.vue';
|
import MkMediaList from '@/components/MkMediaList.vue';
|
||||||
import MkPoll from '@/components/MkPoll.vue';
|
import MkPoll from '@/components/MkPoll.vue';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
|
import { $i } from '@/account';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
note: misskey.entities.Note;
|
note: misskey.entities.Note;
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
@closed="$emit('closed')"
|
@closed="$emit('closed')"
|
||||||
@ok="ok()"
|
@ok="ok()"
|
||||||
>
|
>
|
||||||
<template #header>{{ title || $ts.generateAccessToken }}</template>
|
<template #header>{{ title || i18n.ts.generateAccessToken }}</template>
|
||||||
|
|
||||||
<MkSpacer :margin-min="20" :margin-max="28">
|
<MkSpacer :margin-min="20" :margin-max="28">
|
||||||
<div class="_gaps_m">
|
<div class="_gaps_m">
|
||||||
|
@ -19,15 +19,15 @@
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<MkInput v-model="name">
|
<MkInput v-model="name">
|
||||||
<template #label>{{ $ts.name }}</template>
|
<template #label>{{ i18n.ts.name }}</template>
|
||||||
</MkInput>
|
</MkInput>
|
||||||
</div>
|
</div>
|
||||||
<div><b>{{ $ts.permission }}</b></div>
|
<div><b>{{ i18n.ts.permission }}</b></div>
|
||||||
<div class="_buttons">
|
<div class="_buttons">
|
||||||
<MkButton inline @click="disableAll">{{ i18n.ts.disableAll }}</MkButton>
|
<MkButton inline @click="disableAll">{{ i18n.ts.disableAll }}</MkButton>
|
||||||
<MkButton inline @click="enableAll">{{ i18n.ts.enableAll }}</MkButton>
|
<MkButton inline @click="enableAll">{{ i18n.ts.enableAll }}</MkButton>
|
||||||
</div>
|
</div>
|
||||||
<MkSwitch v-for="kind in (initialPermissions || kinds)" :key="kind" v-model="permissions[kind]">{{ $t(`_permissions.${kind}`) }}</MkSwitch>
|
<MkSwitch v-for="kind in (initialPermissions || kinds)" :key="kind" v-model="permissions[kind]">{{ i18n.t(`_permissions.${kind}`) }}</MkSwitch>
|
||||||
</div>
|
</div>
|
||||||
</MkSpacer>
|
</MkSpacer>
|
||||||
</MkModalWindow>
|
</MkModalWindow>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<MkA class="name" :to="userPage(user)"><MkUserName :user="user" :nowrap="false"/></MkA>
|
<MkA class="name" :to="userPage(user)"><MkUserName :user="user" :nowrap="false"/></MkA>
|
||||||
<p class="username"><MkAcct :user="user"/></p>
|
<p class="username"><MkAcct :user="user"/></p>
|
||||||
</div>
|
</div>
|
||||||
<span v-if="$i && $i.id !== user.id && user.isFollowed" class="followed">{{ $ts.followsYou }}</span>
|
<span v-if="$i && $i.id !== user.id && user.isFollowed" class="followed">{{ i18n.ts.followsYou }}</span>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<div v-if="user.description" class="mfm">
|
<div v-if="user.description" class="mfm">
|
||||||
<Mfm :text="user.description" :author="user" :i="$i"/>
|
<Mfm :text="user.description" :author="user" :i="$i"/>
|
||||||
|
@ -33,6 +33,7 @@ import * as misskey from 'misskey-js';
|
||||||
import MkFollowButton from '@/components/MkFollowButton.vue';
|
import MkFollowButton from '@/components/MkFollowButton.vue';
|
||||||
import { userPage } from '@/filters/user';
|
import { userPage } from '@/filters/user';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
|
import { $i } from '@/account';
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
user: misskey.entities.UserDetailed;
|
user: misskey.entities.UserDetailed;
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<div v-if="showing" :class="$style.root" class="_popup _shadow" :style="{ zIndex, top: top + 'px', left: left + 'px' }" @mouseover="() => { emit('mouseover'); }" @mouseleave="() => { emit('mouseleave'); }">
|
<div v-if="showing" :class="$style.root" class="_popup _shadow" :style="{ zIndex, top: top + 'px', left: left + 'px' }" @mouseover="() => { emit('mouseover'); }" @mouseleave="() => { emit('mouseleave'); }">
|
||||||
<div v-if="user != null">
|
<div v-if="user != null">
|
||||||
<div :class="$style.banner" :style="user.bannerUrl ? `background-image: url(${user.bannerUrl})` : ''">
|
<div :class="$style.banner" :style="user.bannerUrl ? `background-image: url(${user.bannerUrl})` : ''">
|
||||||
<span v-if="$i && $i.id != user.id && user.isFollowed" :class="$style.followed">{{ $ts.followsYou }}</span>
|
<span v-if="$i && $i.id != user.id && user.isFollowed" :class="$style.followed">{{ i18n.ts.followsYou }}</span>
|
||||||
</div>
|
</div>
|
||||||
<svg viewBox="0 0 128 128" :class="$style.avatarBack">
|
<svg viewBox="0 0 128 128" :class="$style.avatarBack">
|
||||||
<g transform="matrix(1.6,0,0,1.6,-38.4,-51.2)">
|
<g transform="matrix(1.6,0,0,1.6,-38.4,-51.2)">
|
||||||
|
@ -27,15 +27,15 @@
|
||||||
</div>
|
</div>
|
||||||
<div :class="$style.status">
|
<div :class="$style.status">
|
||||||
<div :class="$style.statusItem">
|
<div :class="$style.statusItem">
|
||||||
<div :class="$style.statusItemLabel">{{ $ts.notes }}</div>
|
<div :class="$style.statusItemLabel">{{ i18n.ts.notes }}</div>
|
||||||
<div>{{ number(user.notesCount) }}</div>
|
<div>{{ number(user.notesCount) }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div :class="$style.statusItem">
|
<div :class="$style.statusItem">
|
||||||
<div :class="$style.statusItemLabel">{{ $ts.following }}</div>
|
<div :class="$style.statusItemLabel">{{ i18n.ts.following }}</div>
|
||||||
<div>{{ number(user.followingCount) }}</div>
|
<div>{{ number(user.followingCount) }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div :class="$style.statusItem">
|
<div :class="$style.statusItem">
|
||||||
<div :class="$style.statusItemLabel">{{ $ts.followers }}</div>
|
<div :class="$style.statusItemLabel">{{ i18n.ts.followers }}</div>
|
||||||
<div>{{ number(user.followersCount) }}</div>
|
<div>{{ number(user.followersCount) }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -60,6 +60,7 @@ import { getUserMenu } from '@/scripts/get-user-menu';
|
||||||
import number from '@/filters/number';
|
import number from '@/filters/number';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
import { defaultStore } from '@/store';
|
import { defaultStore } from '@/store';
|
||||||
|
import { $i } from '@/account';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
showing: boolean;
|
showing: boolean;
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<div class="wszdbhzo">
|
<div class="wszdbhzo">
|
||||||
<div><i class="ti ti-alert-triangle"></i> {{ $ts.somethingHappened }}</div>
|
<div><i class="ti ti-alert-triangle"></i> {{ i18n.ts.somethingHappened }}</div>
|
||||||
<MkButton inline class="retry" @click="retry"><i class="ti ti-reload"></i> {{ $ts.retry }}</MkButton>
|
<MkButton inline class="retry" @click="retry"><i class="ti ti-reload"></i> {{ i18n.ts.retry }}</MkButton>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Transition>
|
</Transition>
|
||||||
|
@ -19,6 +19,7 @@
|
||||||
import { defineComponent, PropType, ref, watch } from 'vue';
|
import { defineComponent, PropType, ref, watch } from 'vue';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import { defaultStore } from '@/store';
|
import { defaultStore } from '@/store';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
|
@ -74,6 +75,7 @@ export default defineComponent({
|
||||||
result,
|
result,
|
||||||
retry,
|
retry,
|
||||||
defaultStore,
|
defaultStore,
|
||||||
|
i18n,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<div v-else :class="$style.menu">
|
<div v-else :class="$style.menu">
|
||||||
<div :class="$style.menuContainer">
|
<div :class="$style.menuContainer">
|
||||||
<div>Ads by {{ host }}</div>
|
<div>Ads by {{ host }}</div>
|
||||||
<!--<MkButton class="button" primary>{{ $ts._ad.like }}</MkButton>-->
|
<!--<MkButton class="button" primary>{{ i18n.ts._ad.like }}</MkButton>-->
|
||||||
<MkButton v-if="chosen.ratio !== 0" :class="$style.menuButton" @click="reduceFrequency">{{ i18n.ts._ad.reduceFrequencyOfThisAd }}</MkButton>
|
<MkButton v-if="chosen.ratio !== 0" :class="$style.menuButton" @click="reduceFrequency">{{ i18n.ts._ad.reduceFrequencyOfThisAd }}</MkButton>
|
||||||
<button class="_textButton" @click="toggleMenu">{{ i18n.ts._ad.back }}</button>
|
<button class="_textButton" @click="toggleMenu">{{ i18n.ts._ad.back }}</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -17,6 +17,7 @@ import * as os from '@/os';
|
||||||
import { PostBlock } from '@/scripts/hpml/block';
|
import { PostBlock } from '@/scripts/hpml/block';
|
||||||
import { Hpml } from '@/scripts/hpml/evaluator';
|
import { Hpml } from '@/scripts/hpml/evaluator';
|
||||||
import { defaultStore } from '@/store';
|
import { defaultStore } from '@/store';
|
||||||
|
import { $i } from '@/account';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
|
@ -55,7 +56,7 @@ export default defineComponent({
|
||||||
canvas.toBlob(blob => {
|
canvas.toBlob(blob => {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('file', blob);
|
formData.append('file', blob);
|
||||||
formData.append('i', this.$i.token);
|
formData.append('i', $i.token);
|
||||||
if (defaultStore.state.uploadFolder) {
|
if (defaultStore.state.uploadFolder) {
|
||||||
formData.append('folderId', defaultStore.state.uploadFolder);
|
formData.append('folderId', defaultStore.state.uploadFolder);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,11 +6,12 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { TextBlock } from '@/scripts/hpml/block';
|
|
||||||
import { Hpml } from '@/scripts/hpml/evaluator';
|
|
||||||
import { defineAsyncComponent, defineComponent, PropType } from 'vue';
|
import { defineAsyncComponent, defineComponent, PropType } from 'vue';
|
||||||
import * as mfm from 'mfm-js';
|
import * as mfm from 'mfm-js';
|
||||||
|
import { TextBlock } from '@/scripts/hpml/block';
|
||||||
|
import { Hpml } from '@/scripts/hpml/evaluator';
|
||||||
import { extractUrlFromMfm } from '@/scripts/extract-url-from-mfm';
|
import { extractUrlFromMfm } from '@/scripts/extract-url-from-mfm';
|
||||||
|
import { $i } from '@/account';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
|
@ -29,6 +30,7 @@ export default defineComponent({
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
text: this.hpml.interpolate(this.block.text),
|
text: this.hpml.interpolate(this.block.text),
|
||||||
|
$i,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
|
@ -198,13 +198,6 @@ if (_DEV_) {
|
||||||
app.config.performance = true;
|
app.config.performance = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: 廃止
|
|
||||||
app.config.globalProperties = {
|
|
||||||
$i,
|
|
||||||
$t: i18n.t,
|
|
||||||
$ts: i18n.ts,
|
|
||||||
};
|
|
||||||
|
|
||||||
widgets(app);
|
widgets(app);
|
||||||
directives(app);
|
directives(app);
|
||||||
components(app);
|
components(app);
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<MkButton v-if="$i && ($i.isModerator || $i.policies.canManageCustomEmojis)" primary link to="/custom-emojis-manager">{{ i18n.ts.manageCustomEmojis }}</MkButton>
|
<MkButton v-if="$i && ($i.isModerator || $i.policies.canManageCustomEmojis)" primary link to="/custom-emojis-manager">{{ i18n.ts.manageCustomEmojis }}</MkButton>
|
||||||
|
|
||||||
<div class="query">
|
<div class="query">
|
||||||
<MkInput v-model="q" class="" :placeholder="$ts.search">
|
<MkInput v-model="q" class="" :placeholder="i18n.ts.search">
|
||||||
<template #prefix><i class="ti ti-search"></i></template>
|
<template #prefix><i class="ti ti-search"></i></template>
|
||||||
</MkInput>
|
</MkInput>
|
||||||
|
|
||||||
|
@ -15,14 +15,14 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<MkFoldableSection v-if="searchEmojis" class="emojis">
|
<MkFoldableSection v-if="searchEmojis" class="emojis">
|
||||||
<template #header>{{ $ts.searchResult }}</template>
|
<template #header>{{ i18n.ts.searchResult }}</template>
|
||||||
<div class="zuvgdzyt">
|
<div class="zuvgdzyt">
|
||||||
<XEmoji v-for="emoji in searchEmojis" :key="emoji.name" class="emoji" :emoji="emoji"/>
|
<XEmoji v-for="emoji in searchEmojis" :key="emoji.name" class="emoji" :emoji="emoji"/>
|
||||||
</div>
|
</div>
|
||||||
</MkFoldableSection>
|
</MkFoldableSection>
|
||||||
|
|
||||||
<MkFoldableSection v-for="category in customEmojiCategories" v-once :key="category" class="emojis">
|
<MkFoldableSection v-for="category in customEmojiCategories" v-once :key="category" class="emojis">
|
||||||
<template #header>{{ category || $ts.other }}</template>
|
<template #header>{{ category || i18n.ts.other }}</template>
|
||||||
<div class="zuvgdzyt">
|
<div class="zuvgdzyt">
|
||||||
<XEmoji v-for="emoji in customEmojis.filter(e => e.category === category)" :key="emoji.name" class="emoji" :emoji="emoji"/>
|
<XEmoji v-for="emoji in customEmojis.filter(e => e.category === category)" :key="emoji.name" class="emoji" :emoji="emoji"/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -32,13 +32,14 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { watch } from 'vue';
|
import { watch } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import XEmoji from './emojis.emoji.vue';
|
import XEmoji from './emojis.emoji.vue';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import MkInput from '@/components/MkInput.vue';
|
import MkInput from '@/components/MkInput.vue';
|
||||||
import MkFoldableSection from '@/components/MkFoldableSection.vue';
|
import MkFoldableSection from '@/components/MkFoldableSection.vue';
|
||||||
import { customEmojis, customEmojiCategories, getCustomEmojiTags } from '@/custom-emojis';
|
import { customEmojis, customEmojiCategories, getCustomEmojiTags } from '@/custom-emojis';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
import * as Misskey from 'misskey-js';
|
import { $i } from '@/account';
|
||||||
|
|
||||||
const customEmojiTags = getCustomEmojiTags();
|
const customEmojiTags = getCustomEmojiTags();
|
||||||
let q = $ref('');
|
let q = $ref('');
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<i v-if="relay.status === 'accepted'" class="ti ti-check icon accepted"></i>
|
<i v-if="relay.status === 'accepted'" class="ti ti-check icon accepted"></i>
|
||||||
<i v-else-if="relay.status === 'rejected'" class="ti ti-ban icon rejected"></i>
|
<i v-else-if="relay.status === 'rejected'" class="ti ti-ban icon rejected"></i>
|
||||||
<i v-else class="ti ti-clock icon requesting"></i>
|
<i v-else class="ti ti-clock icon requesting"></i>
|
||||||
<span>{{ $t(`_relayStatus.${relay.status}`) }}</span>
|
<span>{{ i18n.t(`_relayStatus.${relay.status}`) }}</span>
|
||||||
</div>
|
</div>
|
||||||
<MkButton class="button" inline danger @click="remove(relay.inbox)"><i class="ti ti-trash"></i> {{ i18n.ts.remove }}</MkButton>
|
<MkButton class="button" inline danger @click="remove(relay.inbox)"><i class="ti ti-trash"></i> {{ i18n.ts.remove }}</MkButton>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<img v-if="announcement.imageUrl" :src="announcement.imageUrl"/>
|
<img v-if="announcement.imageUrl" :src="announcement.imageUrl"/>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="$i && !announcement.isRead" class="footer">
|
<div v-if="$i && !announcement.isRead" class="footer">
|
||||||
<MkButton primary @click="read(items, announcement, i)"><i class="ti ti-check"></i> {{ $ts.gotIt }}</MkButton>
|
<MkButton primary @click="read(items, announcement, i)"><i class="ti ti-check"></i> {{ i18n.ts.gotIt }}</MkButton>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</MkPagination>
|
</MkPagination>
|
||||||
|
@ -25,6 +25,7 @@ import MkButton from '@/components/MkButton.vue';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
import { definePageMetadata } from '@/scripts/page-metadata';
|
import { definePageMetadata } from '@/scripts/page-metadata';
|
||||||
|
import { $i } from '@/account';
|
||||||
|
|
||||||
const pagination = {
|
const pagination = {
|
||||||
endpoint: 'announcements' as const,
|
endpoint: 'announcements' as const,
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<MkStickyContainer>
|
<MkStickyContainer>
|
||||||
<template #header><MkPageHeader :actions="headerActions" :tabs="headerTabs"/></template>
|
<template #header><MkPageHeader :actions="headerActions" :tabs="headerTabs"/></template>
|
||||||
<div ref="rootEl" v-hotkey.global="keymap" class="tqmomfks">
|
<div ref="rootEl" v-hotkey.global="keymap" class="tqmomfks">
|
||||||
<div v-if="queue > 0" class="new"><button class="_buttonPrimary" @click="top()">{{ $ts.newNoteRecived }}</button></div>
|
<div v-if="queue > 0" class="new"><button class="_buttonPrimary" @click="top()">{{ i18n.ts.newNoteRecived }}</button></div>
|
||||||
<div class="tl">
|
<div class="tl">
|
||||||
<MkTimeline
|
<MkTimeline
|
||||||
ref="tlEl" :key="antennaId"
|
ref="tlEl" :key="antennaId"
|
||||||
|
|
|
@ -1,25 +1,25 @@
|
||||||
<template>
|
<template>
|
||||||
<section>
|
<section>
|
||||||
<div v-if="app.permission.length > 0">
|
<div v-if="app.permission.length > 0">
|
||||||
<p>{{ $t('_auth.permission', { name }) }}</p>
|
<p>{{ i18n.t('_auth.permission', { name }) }}</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li v-for="p in app.permission" :key="p">{{ $t(`_permissions.${p}`) }}</li>
|
<li v-for="p in app.permission" :key="p">{{ i18n.t(`_permissions.${p}`) }}</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div>{{ i18n.t('_auth.shareAccess', { name: `${name} (${app.id})` }) }}</div>
|
<div>{{ i18n.t('_auth.shareAccess', { name: `${name} (${app.id})` }) }}</div>
|
||||||
<div :class="$style.buttons">
|
<div :class="$style.buttons">
|
||||||
<MkButton inline @click="cancel">{{ i18n.ts.cancel }}</MkButton>
|
<MkButton inline @click="cancel">{{ i18n.ts.cancel }}</MkButton>
|
||||||
<MkButton inline primary @click="accept">{{ i18n.ts.accept }}</MkButton>
|
<MkButton inline primary @click="accept">{{ i18n.ts.accept }}</MkButton>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { } from 'vue';
|
import { } from 'vue';
|
||||||
|
import { AuthSession } from 'misskey-js/built/entities';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
import { AuthSession } from 'misskey-js/built/entities';
|
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
session: AuthSession;
|
session: AuthSession;
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
<h1>{{ i18n.ts._auth.denied }}</h1>
|
<h1>{{ i18n.ts._auth.denied }}</h1>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="state == 'accepted' && session">
|
<div v-if="state == 'accepted' && session">
|
||||||
<h1>{{ session.app.isAuthorized ? $t('already-authorized') : i18n.ts.allowed }}</h1>
|
<h1>{{ session.app.isAuthorized ? i18n.t('already-authorized') : i18n.ts.allowed }}</h1>
|
||||||
<p v-if="session.app.callbackUrl">
|
<p v-if="session.app.callbackUrl">
|
||||||
{{ i18n.ts._auth.callback }}
|
{{ i18n.ts._auth.callback }}
|
||||||
<MkEllipsis/>
|
<MkEllipsis/>
|
||||||
|
|
|
@ -64,6 +64,7 @@ import { createAiScriptEnv } from '@/scripts/aiscript/api';
|
||||||
import MkFolder from '@/components/MkFolder.vue';
|
import MkFolder from '@/components/MkFolder.vue';
|
||||||
import MkCode from '@/components/MkCode.vue';
|
import MkCode from '@/components/MkCode.vue';
|
||||||
import { defaultStore } from '@/store';
|
import { defaultStore } from '@/store';
|
||||||
|
import { $i } from '@/account';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
id: string;
|
id: string;
|
||||||
|
|
|
@ -68,6 +68,7 @@ import { useRouter } from '@/router';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
import { definePageMetadata } from '@/scripts/page-metadata';
|
import { definePageMetadata } from '@/scripts/page-metadata';
|
||||||
import { defaultStore } from '@/store';
|
import { defaultStore } from '@/store';
|
||||||
|
import { $i } from '@/account';
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<MkStickyContainer>
|
<MkStickyContainer>
|
||||||
<template #header><MkPageHeader :actions="headerActions" :tabs="headerTabs" /></template>
|
<template #header><MkPageHeader :actions="headerActions" :tabs="headerTabs"/></template>
|
||||||
<MkSpacer :content-max="800">
|
<MkSpacer :content-max="800">
|
||||||
<div v-if="$i">
|
<div v-if="$i">
|
||||||
<div v-if="state == 'waiting'">
|
<div v-if="state == 'waiting'">
|
||||||
|
@ -15,13 +15,13 @@
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<div v-if="_permissions.length > 0">
|
<div v-if="_permissions.length > 0">
|
||||||
<p v-if="name">{{ $t('_auth.permission', { name }) }}</p>
|
<p v-if="name">{{ i18n.t('_auth.permission', { name }) }}</p>
|
||||||
<p v-else>{{ i18n.ts._auth.permissionAsk }}</p>
|
<p v-else>{{ i18n.ts._auth.permissionAsk }}</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li v-for="p in _permissions" :key="p">{{ $t(`_permissions.${p}`) }}</li>
|
<li v-for="p in _permissions" :key="p">{{ i18n.t(`_permissions.${p}`) }}</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="name">{{ $t('_auth.shareAccess', { name }) }}</div>
|
<div v-if="name">{{ i18n.t('_auth.shareAccess', { name }) }}</div>
|
||||||
<div v-else>{{ i18n.ts._auth.shareAccessAsk }}</div>
|
<div v-else>{{ i18n.ts._auth.shareAccessAsk }}</div>
|
||||||
<div :class="$style.buttons">
|
<div :class="$style.buttons">
|
||||||
<MkButton inline @click="deny">{{ i18n.ts.cancel }}</MkButton>
|
<MkButton inline @click="deny">{{ i18n.ts.cancel }}</MkButton>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<!-- eslint-disable vue/no-mutating-props -->
|
<!-- eslint-disable vue/no-mutating-props -->
|
||||||
<XContainer :draggable="true" @remove="() => $emit('remove')">
|
<XContainer :draggable="true" @remove="() => $emit('remove')">
|
||||||
<template #header><i class="ti ti-photo"></i> {{ $ts._pages.blocks.image }}</template>
|
<template #header><i class="ti ti-photo"></i> {{ i18n.ts._pages.blocks.image }}</template>
|
||||||
<template #func>
|
<template #func>
|
||||||
<button @click="choose()">
|
<button @click="choose()">
|
||||||
<i class="ti ti-folder"></i>
|
<i class="ti ti-folder"></i>
|
||||||
|
@ -20,6 +20,7 @@ import { onMounted } from 'vue';
|
||||||
import XContainer from '../page-editor.container.vue';
|
import XContainer from '../page-editor.container.vue';
|
||||||
import MkDriveFileThumbnail from '@/components/MkDriveFileThumbnail.vue';
|
import MkDriveFileThumbnail from '@/components/MkDriveFileThumbnail.vue';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
modelValue: any
|
modelValue: any
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
<template>
|
<template>
|
||||||
<!-- eslint-disable vue/no-mutating-props -->
|
<!-- eslint-disable vue/no-mutating-props -->
|
||||||
<XContainer :draggable="true" @remove="() => $emit('remove')">
|
<XContainer :draggable="true" @remove="() => $emit('remove')">
|
||||||
<template #header><i class="ti ti-note"></i> {{ $ts._pages.blocks.note }}</template>
|
<template #header><i class="ti ti-note"></i> {{ i18n.ts._pages.blocks.note }}</template>
|
||||||
|
|
||||||
<section style="padding: 0 16px 0 16px;">
|
<section style="padding: 0 16px 0 16px;">
|
||||||
<MkInput v-model="id">
|
<MkInput v-model="id">
|
||||||
<template #label>{{ $ts._pages.blocks._note.id }}</template>
|
<template #label>{{ i18n.ts._pages.blocks._note.id }}</template>
|
||||||
<template #caption>{{ $ts._pages.blocks._note.idDescription }}</template>
|
<template #caption>{{ i18n.ts._pages.blocks._note.idDescription }}</template>
|
||||||
</MkInput>
|
</MkInput>
|
||||||
<MkSwitch v-model="props.modelValue.detailed"><span>{{ $ts._pages.blocks._note.detailed }}</span></MkSwitch>
|
<MkSwitch v-model="props.modelValue.detailed"><span>{{ i18n.ts._pages.blocks._note.detailed }}</span></MkSwitch>
|
||||||
|
|
||||||
<MkNote v-if="note && !props.modelValue.detailed" :key="note.id + ':normal'" v-model:note="note" style="margin-bottom: 16px;"/>
|
<MkNote v-if="note && !props.modelValue.detailed" :key="note.id + ':normal'" v-model:note="note" style="margin-bottom: 16px;"/>
|
||||||
<MkNoteDetailed v-if="note && props.modelValue.detailed" :key="note.id + ':detail'" v-model:note="note" style="margin-bottom: 16px;"/>
|
<MkNoteDetailed v-if="note && props.modelValue.detailed" :key="note.id + ':detail'" v-model:note="note" style="margin-bottom: 16px;"/>
|
||||||
|
@ -25,6 +25,7 @@ import MkSwitch from '@/components/MkSwitch.vue';
|
||||||
import MkNote from '@/components/MkNote.vue';
|
import MkNote from '@/components/MkNote.vue';
|
||||||
import MkNoteDetailed from '@/components/MkNoteDetailed.vue';
|
import MkNoteDetailed from '@/components/MkNoteDetailed.vue';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
modelValue: any
|
modelValue: any
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<!-- eslint-disable vue/no-mutating-props -->
|
<!-- eslint-disable vue/no-mutating-props -->
|
||||||
<XContainer :draggable="true" @remove="() => $emit('remove')">
|
<XContainer :draggable="true" @remove="() => $emit('remove')">
|
||||||
<template #header><i class="ti ti-align-left"></i> {{ $ts._pages.blocks.text }}</template>
|
<template #header><i class="ti ti-align-left"></i> {{ i18n.ts._pages.blocks.text }}</template>
|
||||||
|
|
||||||
<section class="vckmsadr">
|
<section class="vckmsadr">
|
||||||
<textarea v-model="text"></textarea>
|
<textarea v-model="text"></textarea>
|
||||||
|
@ -13,6 +13,7 @@
|
||||||
/* eslint-disable vue/no-mutating-props */
|
/* eslint-disable vue/no-mutating-props */
|
||||||
import { watch } from 'vue';
|
import { watch } from 'vue';
|
||||||
import XContainer from '../page-editor.container.vue';
|
import XContainer from '../page-editor.container.vue';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
modelValue: any
|
modelValue: any
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<p v-show="showBody" v-if="error != null" class="error">{{ $t('_pages.script.typeError', { slot: error.arg + 1, expect: $t(`script.types.${error.expect}`), actual: $t(`script.types.${error.actual}`) }) }}</p>
|
<p v-show="showBody" v-if="error != null" class="error">{{ i18n.t('_pages.script.typeError', { slot: error.arg + 1, expect: i18n.t(`script.types.${error.expect}`), actual: i18n.t(`script.types.${error.actual}`) }) }}</p>
|
||||||
<p v-show="showBody" v-if="warn != null" class="warn">{{ $t('_pages.script.thereIsEmptySlot', { slot: warn.slot + 1 }) }}</p>
|
<p v-show="showBody" v-if="warn != null" class="warn">{{ i18n.t('_pages.script.thereIsEmptySlot', { slot: warn.slot + 1 }) }}</p>
|
||||||
<div v-show="showBody" class="body">
|
<div v-show="showBody" class="body">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</div>
|
</div>
|
||||||
|
@ -26,6 +26,7 @@
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
props: {
|
props: {
|
||||||
|
@ -54,6 +55,7 @@ export default defineComponent({
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
showBody: this.expanded,
|
showBody: this.expanded,
|
||||||
|
i18n,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -3,42 +3,42 @@
|
||||||
<template #header><MkPageHeader v-model:tab="tab" :actions="headerActions" :tabs="headerTabs"/></template>
|
<template #header><MkPageHeader v-model:tab="tab" :actions="headerActions" :tabs="headerTabs"/></template>
|
||||||
<MkSpacer :content-max="700">
|
<MkSpacer :content-max="700">
|
||||||
<div class="jqqmcavi">
|
<div class="jqqmcavi">
|
||||||
<MkButton v-if="pageId" class="button" inline link :to="`/@${ author.username }/pages/${ currentName }`"><i class="ti ti-external-link"></i> {{ $ts._pages.viewPage }}</MkButton>
|
<MkButton v-if="pageId" class="button" inline link :to="`/@${ author.username }/pages/${ currentName }`"><i class="ti ti-external-link"></i> {{ i18n.ts._pages.viewPage }}</MkButton>
|
||||||
<MkButton v-if="!readonly" inline primary class="button" @click="save"><i class="ti ti-device-floppy"></i> {{ $ts.save }}</MkButton>
|
<MkButton v-if="!readonly" inline primary class="button" @click="save"><i class="ti ti-device-floppy"></i> {{ i18n.ts.save }}</MkButton>
|
||||||
<MkButton v-if="pageId" inline class="button" @click="duplicate"><i class="ti ti-copy"></i> {{ $ts.duplicate }}</MkButton>
|
<MkButton v-if="pageId" inline class="button" @click="duplicate"><i class="ti ti-copy"></i> {{ i18n.ts.duplicate }}</MkButton>
|
||||||
<MkButton v-if="pageId && !readonly" inline class="button" danger @click="del"><i class="ti ti-trash"></i> {{ $ts.delete }}</MkButton>
|
<MkButton v-if="pageId && !readonly" inline class="button" danger @click="del"><i class="ti ti-trash"></i> {{ i18n.ts.delete }}</MkButton>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="tab === 'settings'">
|
<div v-if="tab === 'settings'">
|
||||||
<div class="_gaps_m">
|
<div class="_gaps_m">
|
||||||
<MkInput v-model="title">
|
<MkInput v-model="title">
|
||||||
<template #label>{{ $ts._pages.title }}</template>
|
<template #label>{{ i18n.ts._pages.title }}</template>
|
||||||
</MkInput>
|
</MkInput>
|
||||||
|
|
||||||
<MkInput v-model="summary">
|
<MkInput v-model="summary">
|
||||||
<template #label>{{ $ts._pages.summary }}</template>
|
<template #label>{{ i18n.ts._pages.summary }}</template>
|
||||||
</MkInput>
|
</MkInput>
|
||||||
|
|
||||||
<MkInput v-model="name">
|
<MkInput v-model="name">
|
||||||
<template #prefix>{{ url }}/@{{ author.username }}/pages/</template>
|
<template #prefix>{{ url }}/@{{ author.username }}/pages/</template>
|
||||||
<template #label>{{ $ts._pages.url }}</template>
|
<template #label>{{ i18n.ts._pages.url }}</template>
|
||||||
</MkInput>
|
</MkInput>
|
||||||
|
|
||||||
<MkSwitch v-model="alignCenter">{{ $ts._pages.alignCenter }}</MkSwitch>
|
<MkSwitch v-model="alignCenter">{{ i18n.ts._pages.alignCenter }}</MkSwitch>
|
||||||
|
|
||||||
<MkSelect v-model="font">
|
<MkSelect v-model="font">
|
||||||
<template #label>{{ $ts._pages.font }}</template>
|
<template #label>{{ i18n.ts._pages.font }}</template>
|
||||||
<option value="serif">{{ $ts._pages.fontSerif }}</option>
|
<option value="serif">{{ i18n.ts._pages.fontSerif }}</option>
|
||||||
<option value="sans-serif">{{ $ts._pages.fontSansSerif }}</option>
|
<option value="sans-serif">{{ i18n.ts._pages.fontSansSerif }}</option>
|
||||||
</MkSelect>
|
</MkSelect>
|
||||||
|
|
||||||
<MkSwitch v-model="hideTitleWhenPinned">{{ $ts._pages.hideTitleWhenPinned }}</MkSwitch>
|
<MkSwitch v-model="hideTitleWhenPinned">{{ i18n.ts._pages.hideTitleWhenPinned }}</MkSwitch>
|
||||||
|
|
||||||
<div class="eyeCatch">
|
<div class="eyeCatch">
|
||||||
<MkButton v-if="eyeCatchingImageId == null && !readonly" @click="setEyeCatchingImage"><i class="ti ti-plus"></i> {{ $ts._pages.eyeCatchingImageSet }}</MkButton>
|
<MkButton v-if="eyeCatchingImageId == null && !readonly" @click="setEyeCatchingImage"><i class="ti ti-plus"></i> {{ i18n.ts._pages.eyeCatchingImageSet }}</MkButton>
|
||||||
<div v-else-if="eyeCatchingImage">
|
<div v-else-if="eyeCatchingImage">
|
||||||
<img :src="eyeCatchingImage.url" :alt="eyeCatchingImage.name" style="max-width: 100%;"/>
|
<img :src="eyeCatchingImage.url" :alt="eyeCatchingImage.name" style="max-width: 100%;"/>
|
||||||
<MkButton v-if="!readonly" @click="removeEyeCatchingImage()"><i class="ti ti-trash"></i> {{ $ts._pages.eyeCatchingImageRemove }}</MkButton>
|
<MkButton v-if="!readonly" @click="removeEyeCatchingImage()"><i class="ti ti-trash"></i> {{ i18n.ts._pages.eyeCatchingImageRemove }}</MkButton>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -77,6 +77,7 @@ import { i18n } from '@/i18n';
|
||||||
import { definePageMetadata } from '@/scripts/page-metadata';
|
import { definePageMetadata } from '@/scripts/page-metadata';
|
||||||
import { pageViewInterruptors, defaultStore } from '@/store';
|
import { pageViewInterruptors, defaultStore } from '@/store';
|
||||||
import { deepClone } from '@/scripts/clone';
|
import { deepClone } from '@/scripts/clone';
|
||||||
|
import { $i } from '@/account';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
pageName: string;
|
pageName: string;
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
<details>
|
<details>
|
||||||
<summary>{{ i18n.ts.details }}</summary>
|
<summary>{{ i18n.ts.details }}</summary>
|
||||||
<ul>
|
<ul>
|
||||||
<li v-for="p in token.permission" :key="p">{{ $t(`_permissions.${p}`) }}</li>
|
<li v-for="p in token.permission" :key="p">{{ i18n.t(`_permissions.${p}`) }}</li>
|
||||||
</ul>
|
</ul>
|
||||||
</details>
|
</details>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
import FormInfo from '@/components/MkInfo.vue';
|
import FormInfo from '@/components/MkInfo.vue';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { signout } from '@/account';
|
import { signout, $i } from '@/account';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
import { definePageMetadata } from '@/scripts/page-metadata';
|
import { definePageMetadata } from '@/scripts/page-metadata';
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<template #label>{{ i18n.ts.sounds }}</template>
|
<template #label>{{ i18n.ts.sounds }}</template>
|
||||||
<div class="_gaps_s">
|
<div class="_gaps_s">
|
||||||
<MkFolder v-for="type in Object.keys(sounds)" :key="type">
|
<MkFolder v-for="type in Object.keys(sounds)" :key="type">
|
||||||
<template #label>{{ $t('_sfx.' + type) }}</template>
|
<template #label>{{ i18n.t('_sfx.' + type) }}</template>
|
||||||
<template #suffix>{{ sounds[type].type ?? i18n.ts.none }}</template>
|
<template #suffix>{{ sounds[type].type ?? i18n.ts.none }}</template>
|
||||||
|
|
||||||
<XSound :type="sounds[type].type" :volume="sounds[type].volume" @update="(res) => updated(type, res)"/>
|
<XSound :type="sounds[type].type" :volume="sounds[type].volume" @update="(res) => updated(type, res)"/>
|
||||||
|
|
|
@ -192,7 +192,7 @@ import { url } from '@/config';
|
||||||
import { userPage, acct } from '@/filters/user';
|
import { userPage, acct } from '@/filters/user';
|
||||||
import { definePageMetadata } from '@/scripts/page-metadata';
|
import { definePageMetadata } from '@/scripts/page-metadata';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
import { iAmAdmin, iAmModerator } from '@/account';
|
import { iAmAdmin, iAmModerator, $i } from '@/account';
|
||||||
import MkRolePreview from '@/components/MkRolePreview.vue';
|
import MkRolePreview from '@/components/MkRolePreview.vue';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
</dl>
|
</dl>
|
||||||
<dl v-if="user.birthday" class="field">
|
<dl v-if="user.birthday" class="field">
|
||||||
<dt class="name"><i class="ti ti-cake ti-fw"></i> {{ i18n.ts.birthday }}</dt>
|
<dt class="name"><i class="ti ti-cake ti-fw"></i> {{ i18n.ts.birthday }}</dt>
|
||||||
<dd class="value">{{ user.birthday.replace('-', '/').replace('-', '/') }} ({{ $t('yearsOld', { age }) }})</dd>
|
<dd class="value">{{ user.birthday.replace('-', '/').replace('-', '/') }} ({{ i18n.t('yearsOld', { age }) }})</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="field">
|
<dl class="field">
|
||||||
<dt class="name"><i class="ti ti-calendar ti-fw"></i> {{ i18n.ts.registeredDate }}</dt>
|
<dt class="name"><i class="ti ti-calendar ti-fw"></i> {{ i18n.ts.registeredDate }}</dt>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<MkContainer>
|
<MkContainer>
|
||||||
<template #icon><i class="ti ti-chart-line"></i></template>
|
<template #icon><i class="ti ti-chart-line"></i></template>
|
||||||
<template #header>{{ $ts.activity }}</template>
|
<template #header>{{ i18n.ts.activity }}</template>
|
||||||
<template #func="{ buttonStyleClass }">
|
<template #func="{ buttonStyleClass }">
|
||||||
<button class="_button" :class="buttonStyleClass" @click="showMenu">
|
<button class="_button" :class="buttonStyleClass" @click="showMenu">
|
||||||
<i class="ti ti-dots"></i>
|
<i class="ti ti-dots"></i>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<MkContainer :max-height="300" :foldable="true">
|
<MkContainer :max-height="300" :foldable="true">
|
||||||
<template #icon><i class="ti ti-photo"></i></template>
|
<template #icon><i class="ti ti-photo"></i></template>
|
||||||
<template #header>{{ $ts.images }}</template>
|
<template #header>{{ i18n.ts.images }}</template>
|
||||||
<div :class="$style.root">
|
<div :class="$style.root">
|
||||||
<MkLoading v-if="fetching"/>
|
<MkLoading v-if="fetching"/>
|
||||||
<div v-if="!fetching && images.length > 0" :class="$style.stream">
|
<div v-if="!fetching && images.length > 0" :class="$style.stream">
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
<ImgWithBlurhash :hash="image.file.blurhash" :src="thumbnail(image.file)" :title="image.file.name"/>
|
<ImgWithBlurhash :hash="image.file.blurhash" :src="thumbnail(image.file)" :title="image.file.name"/>
|
||||||
</MkA>
|
</MkA>
|
||||||
</div>
|
</div>
|
||||||
<p v-if="!fetching && images.length == 0" :class="$style.empty">{{ $ts.nothing }}</p>
|
<p v-if="!fetching && images.length == 0" :class="$style.empty">{{ i18n.ts.nothing }}</p>
|
||||||
</div>
|
</div>
|
||||||
</MkContainer>
|
</MkContainer>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -10,22 +10,22 @@
|
||||||
</h1>
|
</h1>
|
||||||
<div class="about">
|
<div class="about">
|
||||||
<!-- eslint-disable-next-line vue/no-v-html -->
|
<!-- eslint-disable-next-line vue/no-v-html -->
|
||||||
<div class="desc" v-html="meta.description || $ts.headlineMisskey"></div>
|
<div class="desc" v-html="meta.description || i18n.ts.headlineMisskey"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="action">
|
<div class="action">
|
||||||
<MkButton class="signup" inline gradate @click="signup()">{{ $ts.signup }}</MkButton>
|
<MkButton class="signup" inline gradate @click="signup()">{{ i18n.ts.signup }}</MkButton>
|
||||||
<MkButton class="signin" inline @click="signin()">{{ $ts.login }}</MkButton>
|
<MkButton class="signin" inline @click="signin()">{{ i18n.ts.login }}</MkButton>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="onlineUsersCount && stats" class="status">
|
<div v-if="onlineUsersCount && stats" class="status">
|
||||||
<div>
|
<div>
|
||||||
<I18n :src="$ts.nUsers" text-tag="span" class="users">
|
<I18n :src="i18n.ts.nUsers" text-tag="span" class="users">
|
||||||
<template #n><b>{{ number(stats.originalUsersCount) }}</b></template>
|
<template #n><b>{{ number(stats.originalUsersCount) }}</b></template>
|
||||||
</I18n>
|
</I18n>
|
||||||
<I18n :src="$ts.nNotes" text-tag="span" class="notes">
|
<I18n :src="i18n.ts.nNotes" text-tag="span" class="notes">
|
||||||
<template #n><b>{{ number(stats.originalNotesCount) }}</b></template>
|
<template #n><b>{{ number(stats.originalNotesCount) }}</b></template>
|
||||||
</I18n>
|
</I18n>
|
||||||
</div>
|
</div>
|
||||||
<I18n :src="$ts.onlineUsersCount" text-tag="span" class="online">
|
<I18n :src="i18n.ts.onlineUsersCount" text-tag="span" class="online">
|
||||||
<template #n><b>{{ onlineUsersCount }}</b></template>
|
<template #n><b>{{ onlineUsersCount }}</b></template>
|
||||||
</I18n>
|
</I18n>
|
||||||
</div>
|
</div>
|
||||||
|
@ -47,6 +47,7 @@ import MkFeaturedPhotos from '@/components/MkFeaturedPhotos.vue';
|
||||||
import { host, instanceName } from '@/config';
|
import { host, instanceName } from '@/config';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import number from '@/filters/number';
|
import number from '@/filters/number';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
|
@ -64,6 +65,7 @@ export default defineComponent({
|
||||||
stats: null,
|
stats: null,
|
||||||
tags: [],
|
tags: [],
|
||||||
onlineUsersCount: null,
|
onlineUsersCount: null,
|
||||||
|
i18n,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -103,19 +105,19 @@ export default defineComponent({
|
||||||
|
|
||||||
showMenu(ev) {
|
showMenu(ev) {
|
||||||
os.popupMenu([{
|
os.popupMenu([{
|
||||||
text: this.$t('aboutX', { x: instanceName }),
|
text: i18n.t('aboutX', { x: instanceName }),
|
||||||
icon: 'ti ti-info-circle',
|
icon: 'ti ti-info-circle',
|
||||||
action: () => {
|
action: () => {
|
||||||
os.pageWindow('/about');
|
os.pageWindow('/about');
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
text: this.$ts.aboutMisskey,
|
text: i18n.ts.aboutMisskey,
|
||||||
icon: 'ti ti-info-circle',
|
icon: 'ti ti-info-circle',
|
||||||
action: () => {
|
action: () => {
|
||||||
os.pageWindow('/about-misskey');
|
os.pageWindow('/about-misskey');
|
||||||
},
|
},
|
||||||
}, null, {
|
}, null, {
|
||||||
text: this.$ts.help,
|
text: i18n.ts.help,
|
||||||
icon: 'ti ti-question-circle',
|
icon: 'ti ti-question-circle',
|
||||||
action: () => {
|
action: () => {
|
||||||
window.open('https://misskey-hub.net/help.md', '_blank');
|
window.open('https://misskey-hub.net/help.md', '_blank');
|
||||||
|
|
|
@ -22,22 +22,22 @@
|
||||||
</h1>
|
</h1>
|
||||||
<div class="about">
|
<div class="about">
|
||||||
<!-- eslint-disable-next-line vue/no-v-html -->
|
<!-- eslint-disable-next-line vue/no-v-html -->
|
||||||
<div class="desc" v-html="meta.description || $ts.headlineMisskey"></div>
|
<div class="desc" v-html="meta.description || i18n.ts.headlineMisskey"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="action">
|
<div class="action">
|
||||||
<MkButton inline gradate @click="signup()">{{ $ts.signup }}</MkButton>
|
<MkButton inline gradate @click="signup()">{{ i18n.ts.signup }}</MkButton>
|
||||||
<MkButton inline @click="signin()">{{ $ts.login }}</MkButton>
|
<MkButton inline @click="signin()">{{ i18n.ts.login }}</MkButton>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="onlineUsersCount && stats" class="status">
|
<div v-if="onlineUsersCount && stats" class="status">
|
||||||
<div>
|
<div>
|
||||||
<I18n :src="$ts.nUsers" text-tag="span" class="users">
|
<I18n :src="i18n.ts.nUsers" text-tag="span" class="users">
|
||||||
<template #n><b>{{ number(stats.originalUsersCount) }}</b></template>
|
<template #n><b>{{ number(stats.originalUsersCount) }}</b></template>
|
||||||
</I18n>
|
</I18n>
|
||||||
<I18n :src="$ts.nNotes" text-tag="span" class="notes">
|
<I18n :src="i18n.ts.nNotes" text-tag="span" class="notes">
|
||||||
<template #n><b>{{ number(stats.originalNotesCount) }}</b></template>
|
<template #n><b>{{ number(stats.originalNotesCount) }}</b></template>
|
||||||
</I18n>
|
</I18n>
|
||||||
</div>
|
</div>
|
||||||
<I18n :src="$ts.onlineUsersCount" text-tag="span" class="online">
|
<I18n :src="i18n.ts.onlineUsersCount" text-tag="span" class="online">
|
||||||
<template #n><b>{{ onlineUsersCount }}</b></template>
|
<template #n><b>{{ onlineUsersCount }}</b></template>
|
||||||
</I18n>
|
</I18n>
|
||||||
</div>
|
</div>
|
||||||
|
@ -45,10 +45,10 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<nav class="nav">
|
<nav class="nav">
|
||||||
<MkA to="/announcements">{{ $ts.announcements }}</MkA>
|
<MkA to="/announcements">{{ i18n.ts.announcements }}</MkA>
|
||||||
<MkA to="/explore">{{ $ts.explore }}</MkA>
|
<MkA to="/explore">{{ i18n.ts.explore }}</MkA>
|
||||||
<MkA to="/channels">{{ $ts.channel }}</MkA>
|
<MkA to="/channels">{{ i18n.ts.channel }}</MkA>
|
||||||
<MkA to="/featured">{{ $ts.featured }}</MkA>
|
<MkA to="/featured">{{ i18n.ts.featured }}</MkA>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -58,15 +58,16 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
import { toUnicode } from 'punycode/';
|
import { toUnicode } from 'punycode/';
|
||||||
|
import XTimeline from './welcome.timeline.vue';
|
||||||
import XSigninDialog from '@/components/MkSigninDialog.vue';
|
import XSigninDialog from '@/components/MkSigninDialog.vue';
|
||||||
import XSignupDialog from '@/components/MkSignupDialog.vue';
|
import XSignupDialog from '@/components/MkSignupDialog.vue';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import MkNote from '@/components/MkNote.vue';
|
import MkNote from '@/components/MkNote.vue';
|
||||||
import MkFeaturedPhotos from '@/components/MkFeaturedPhotos.vue';
|
import MkFeaturedPhotos from '@/components/MkFeaturedPhotos.vue';
|
||||||
import XTimeline from './welcome.timeline.vue';
|
|
||||||
import { host, instanceName } from '@/config';
|
import { host, instanceName } from '@/config';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import number from '@/filters/number';
|
import number from '@/filters/number';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
|
@ -84,6 +85,7 @@ export default defineComponent({
|
||||||
stats: null,
|
stats: null,
|
||||||
tags: [],
|
tags: [],
|
||||||
onlineUsersCount: null,
|
onlineUsersCount: null,
|
||||||
|
i18n,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -123,22 +125,22 @@ export default defineComponent({
|
||||||
|
|
||||||
showMenu(ev) {
|
showMenu(ev) {
|
||||||
os.popupMenu([{
|
os.popupMenu([{
|
||||||
text: this.$t('aboutX', { x: instanceName }),
|
text: i18n.t('aboutX', { x: instanceName }),
|
||||||
icon: 'ti ti-info-circle',
|
icon: 'ti ti-info-circle',
|
||||||
action: () => {
|
action: () => {
|
||||||
os.pageWindow('/about');
|
os.pageWindow('/about');
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
text: this.$ts.aboutMisskey,
|
text: i18n.ts.aboutMisskey,
|
||||||
icon: 'ti ti-info-circle',
|
icon: 'ti ti-info-circle',
|
||||||
action: () => {
|
action: () => {
|
||||||
os.pageWindow('/about-misskey');
|
os.pageWindow('/about-misskey');
|
||||||
},
|
},
|
||||||
}, null, {
|
}, null, {
|
||||||
text: this.$ts.help,
|
text: i18n.ts.help,
|
||||||
icon: 'ti ti-question-circle',
|
icon: 'ti ti-question-circle',
|
||||||
action: () => {
|
action: () => {
|
||||||
window.open(`https://misskey-hub.net/help.md`, '_blank');
|
window.open('https://misskey-hub.net/help.md', '_blank');
|
||||||
},
|
},
|
||||||
}], ev.currentTarget ?? ev.target);
|
}], ev.currentTarget ?? ev.target);
|
||||||
},
|
},
|
||||||
|
|
|
@ -2,19 +2,19 @@
|
||||||
<form class="mk-setup" @submit.prevent="submit()">
|
<form class="mk-setup" @submit.prevent="submit()">
|
||||||
<h1>Welcome to Misskey!</h1>
|
<h1>Welcome to Misskey!</h1>
|
||||||
<div class="_gaps_m">
|
<div class="_gaps_m">
|
||||||
<p>{{ $ts.intro }}</p>
|
<p>{{ i18n.ts.intro }}</p>
|
||||||
<MkInput v-model="username" pattern="^[a-zA-Z0-9_]{1,20}$" :spellcheck="false" required data-cy-admin-username>
|
<MkInput v-model="username" pattern="^[a-zA-Z0-9_]{1,20}$" :spellcheck="false" required data-cy-admin-username>
|
||||||
<template #label>{{ $ts.username }}</template>
|
<template #label>{{ i18n.ts.username }}</template>
|
||||||
<template #prefix>@</template>
|
<template #prefix>@</template>
|
||||||
<template #suffix>@{{ host }}</template>
|
<template #suffix>@{{ host }}</template>
|
||||||
</MkInput>
|
</MkInput>
|
||||||
<MkInput v-model="password" type="password" data-cy-admin-password>
|
<MkInput v-model="password" type="password" data-cy-admin-password>
|
||||||
<template #label>{{ $ts.password }}</template>
|
<template #label>{{ i18n.ts.password }}</template>
|
||||||
<template #prefix><i class="ti ti-lock"></i></template>
|
<template #prefix><i class="ti ti-lock"></i></template>
|
||||||
</MkInput>
|
</MkInput>
|
||||||
<div class="bottom">
|
<div class="bottom">
|
||||||
<MkButton gradate type="submit" :disabled="submitting" data-cy-admin-ok>
|
<MkButton gradate type="submit" :disabled="submitting" data-cy-admin-ok>
|
||||||
{{ submitting ? $ts.processing : $ts.done }}<MkEllipsis v-if="submitting"/>
|
{{ submitting ? i18n.ts.processing : i18n.ts.done }}<MkEllipsis v-if="submitting"/>
|
||||||
</MkButton>
|
</MkButton>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -5,30 +5,31 @@
|
||||||
<div class="_panel" :class="$style.content">
|
<div class="_panel" :class="$style.content">
|
||||||
<div :class="$style.body">
|
<div :class="$style.body">
|
||||||
<MkA v-if="note.replyId" class="reply" :to="`/notes/${note.replyId}`"><i class="ti ti-arrow-back-up"></i></MkA>
|
<MkA v-if="note.replyId" class="reply" :to="`/notes/${note.replyId}`"><i class="ti ti-arrow-back-up"></i></MkA>
|
||||||
<Mfm v-if="note.text" :text="note.text" :author="note.user" :i="$i" />
|
<Mfm v-if="note.text" :text="note.text" :author="note.user" :i="$i"/>
|
||||||
<MkA v-if="note.renoteId" class="rp" :to="`/notes/${note.renoteId}`">RN: ...</MkA>
|
<MkA v-if="note.renoteId" class="rp" :to="`/notes/${note.renoteId}`">RN: ...</MkA>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="note.files.length > 0" :class="$style.richcontent">
|
<div v-if="note.files.length > 0" :class="$style.richcontent">
|
||||||
<MkMediaList :media-list="note.files" />
|
<MkMediaList :media-list="note.files"/>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="note.poll">
|
<div v-if="note.poll">
|
||||||
<MkPoll :note="note" :readOnly="true" />
|
<MkPoll :note="note" :read-only="true"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<MkReactionsViewer ref="reactionsViewer" :note="note" />
|
<MkReactionsViewer ref="reactionsViewer" :note="note"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import { Note } from 'misskey-js/built/entities';
|
||||||
|
import { onUpdated } from 'vue';
|
||||||
import MkReactionsViewer from '@/components/MkReactionsViewer.vue';
|
import MkReactionsViewer from '@/components/MkReactionsViewer.vue';
|
||||||
import MkMediaList from '@/components/MkMediaList.vue';
|
import MkMediaList from '@/components/MkMediaList.vue';
|
||||||
import MkPoll from '@/components/MkPoll.vue';
|
import MkPoll from '@/components/MkPoll.vue';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { Note } from 'misskey-js/built/entities';
|
|
||||||
import { onUpdated } from 'vue';
|
|
||||||
import { getScrollContainer } from '@/scripts/scroll';
|
import { getScrollContainer } from '@/scripts/scroll';
|
||||||
|
import { $i } from '@/account';
|
||||||
|
|
||||||
let notes = $ref<Note[]>([]);
|
let notes = $ref<Note[]>([]);
|
||||||
let isScrolling = $ref(false);
|
let isScrolling = $ref(false);
|
||||||
|
|
|
@ -47,7 +47,7 @@ import { computed, defineAsyncComponent, toRef } from 'vue';
|
||||||
import { openInstanceMenu } from './common';
|
import { openInstanceMenu } from './common';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { navbarItemDef } from '@/navbar';
|
import { navbarItemDef } from '@/navbar';
|
||||||
import { openAccountMenu as openAccountMenu_ } from '@/account';
|
import { $i, openAccountMenu as openAccountMenu_ } from '@/account';
|
||||||
import { defaultStore } from '@/store';
|
import { defaultStore } from '@/store';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
import { instance } from '@/instance';
|
import { instance } from '@/instance';
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<button v-click-anime class="item _button instance" @click="openInstanceMenu">
|
<button v-click-anime class="item _button instance" @click="openInstanceMenu">
|
||||||
<img :src="instance.iconUrl ?? instance.faviconUrl ?? '/favicon.ico'" class="_ghost"/>
|
<img :src="instance.iconUrl ?? instance.faviconUrl ?? '/favicon.ico'" class="_ghost"/>
|
||||||
</button>
|
</button>
|
||||||
<MkA v-click-anime v-tooltip="$ts.timeline" class="item index" active-class="active" to="/" exact>
|
<MkA v-click-anime v-tooltip="i18n.ts.timeline" class="item index" active-class="active" to="/" exact>
|
||||||
<i class="ti ti-home ti-fw"></i>
|
<i class="ti ti-home ti-fw"></i>
|
||||||
</MkA>
|
</MkA>
|
||||||
<template v-for="item in menu">
|
<template v-for="item in menu">
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
</component>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
<MkA v-if="$i.isAdmin || $i.isModerator" v-click-anime v-tooltip="$ts.controlPanel" class="item" active-class="active" to="/admin" :behavior="settingsWindowed ? 'modalWindow' : null">
|
<MkA v-if="$i.isAdmin || $i.isModerator" v-click-anime v-tooltip="i18n.ts.controlPanel" class="item" active-class="active" to="/admin" :behavior="settingsWindowed ? 'modalWindow' : null">
|
||||||
<i class="ti ti-dashboard ti-fw"></i>
|
<i class="ti ti-dashboard ti-fw"></i>
|
||||||
</MkA>
|
</MkA>
|
||||||
<button v-click-anime class="item _button" @click="more">
|
<button v-click-anime class="item _button" @click="more">
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<MkA v-click-anime v-tooltip="$ts.settings" class="item" active-class="active" to="/settings" :behavior="settingsWindowed ? 'modalWindow' : null">
|
<MkA v-click-anime v-tooltip="i18n.ts.settings" class="item" active-class="active" to="/settings" :behavior="settingsWindowed ? 'modalWindow' : null">
|
||||||
<i class="ti ti-settings ti-fw"></i>
|
<i class="ti ti-settings ti-fw"></i>
|
||||||
</MkA>
|
</MkA>
|
||||||
<button v-click-anime class="item _button account" @click="openAccountMenu">
|
<button v-click-anime class="item _button account" @click="openAccountMenu">
|
||||||
|
@ -47,11 +47,12 @@ import { openInstanceMenu } from './_common_/common';
|
||||||
import { host } from '@/config';
|
import { host } from '@/config';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { navbarItemDef } from '@/navbar';
|
import { navbarItemDef } from '@/navbar';
|
||||||
import { openAccountMenu } from '@/account';
|
import { openAccountMenu, $i } from '@/account';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import { mainRouter } from '@/router';
|
import { mainRouter } from '@/router';
|
||||||
import { defaultStore } from '@/store';
|
import { defaultStore } from '@/store';
|
||||||
import { instance } from '@/instance';
|
import { instance } from '@/instance';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
|
@ -67,6 +68,8 @@ export default defineComponent({
|
||||||
settingsWindowed: false,
|
settingsWindowed: false,
|
||||||
defaultStore,
|
defaultStore,
|
||||||
instance,
|
instance,
|
||||||
|
$i,
|
||||||
|
i18n,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
</button>
|
</button>
|
||||||
<div class="post" data-cy-open-post-form @click="post">
|
<div class="post" data-cy-open-post-form @click="post">
|
||||||
<MkButton class="button" gradate full rounded>
|
<MkButton class="button" gradate full rounded>
|
||||||
<i class="ti ti-pencil ti-fw"></i><span v-if="!iconOnly" class="text">{{ $ts.note }}</span>
|
<i class="ti ti-pencil ti-fw"></i><span v-if="!iconOnly" class="text">{{ i18n.ts.note }}</span>
|
||||||
</MkButton>
|
</MkButton>
|
||||||
</div>
|
</div>
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
<MkA v-click-anime class="item index" active-class="active" to="/" exact>
|
<MkA v-click-anime class="item index" active-class="active" to="/" exact>
|
||||||
<i class="ti ti-home ti-fw"></i><span class="text">{{ $ts.timeline }}</span>
|
<i class="ti ti-home ti-fw"></i><span class="text">{{ i18n.ts.timeline }}</span>
|
||||||
</MkA>
|
</MkA>
|
||||||
<template v-for="item in menu">
|
<template v-for="item in menu">
|
||||||
<div v-if="item === '-'" class="divider"></div>
|
<div v-if="item === '-'" class="divider"></div>
|
||||||
|
@ -21,14 +21,14 @@
|
||||||
</template>
|
</template>
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
<MkA v-if="$i.isAdmin || $i.isModerator" v-click-anime class="item" active-class="active" to="/admin" :behavior="settingsWindowed ? 'modalWindow' : null">
|
<MkA v-if="$i.isAdmin || $i.isModerator" v-click-anime class="item" active-class="active" to="/admin" :behavior="settingsWindowed ? 'modalWindow' : null">
|
||||||
<i class="ti ti-dashboard ti-fw"></i><span class="text">{{ $ts.controlPanel }}</span>
|
<i class="ti ti-dashboard ti-fw"></i><span class="text">{{ i18n.ts.controlPanel }}</span>
|
||||||
</MkA>
|
</MkA>
|
||||||
<button v-click-anime class="item _button" @click="more">
|
<button v-click-anime class="item _button" @click="more">
|
||||||
<i class="ti ti-dots ti-fw"></i><span class="text">{{ $ts.more }}</span>
|
<i class="ti ti-dots ti-fw"></i><span class="text">{{ i18n.ts.more }}</span>
|
||||||
<span v-if="otherNavItemIndicated" class="indicator"><i class="_indicatorCircle"></i></span>
|
<span v-if="otherNavItemIndicated" class="indicator"><i class="_indicatorCircle"></i></span>
|
||||||
</button>
|
</button>
|
||||||
<MkA v-click-anime class="item" active-class="active" to="/settings" :behavior="settingsWindowed ? 'modalWindow' : null">
|
<MkA v-click-anime class="item" active-class="active" to="/settings" :behavior="settingsWindowed ? 'modalWindow' : null">
|
||||||
<i class="ti ti-settings ti-fw"></i><span class="text">{{ $ts.settings }}</span>
|
<i class="ti ti-settings ti-fw"></i><span class="text">{{ i18n.ts.settings }}</span>
|
||||||
</MkA>
|
</MkA>
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
<div class="about">
|
<div class="about">
|
||||||
|
@ -46,13 +46,14 @@ import { openInstanceMenu } from './_common_/common';
|
||||||
import { host } from '@/config';
|
import { host } from '@/config';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { navbarItemDef } from '@/navbar';
|
import { navbarItemDef } from '@/navbar';
|
||||||
import { openAccountMenu } from '@/account';
|
import { openAccountMenu, $i } from '@/account';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import { StickySidebar } from '@/scripts/sticky-sidebar';
|
import { StickySidebar } from '@/scripts/sticky-sidebar';
|
||||||
import { mainRouter } from '@/router';
|
import { mainRouter } from '@/router';
|
||||||
//import MisskeyLogo from '@assets/client/misskey.svg';
|
//import MisskeyLogo from '@assets/client/misskey.svg';
|
||||||
import { defaultStore } from '@/store';
|
import { defaultStore } from '@/store';
|
||||||
import { instance } from '@/instance';
|
import { instance } from '@/instance';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
|
@ -70,6 +71,8 @@ export default defineComponent({
|
||||||
settingsWindowed: false,
|
settingsWindowed: false,
|
||||||
defaultStore,
|
defaultStore,
|
||||||
instance,
|
instance,
|
||||||
|
$i,
|
||||||
|
i18n,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -5,11 +5,11 @@
|
||||||
<h1 v-if="meta"><img v-if="meta.logoImageUrl" class="logo" :src="meta.logoImageUrl"><span v-else class="text">{{ instanceName }}</span></h1>
|
<h1 v-if="meta"><img v-if="meta.logoImageUrl" class="logo" :src="meta.logoImageUrl"><span v-else class="text">{{ instanceName }}</span></h1>
|
||||||
<div v-if="meta" class="about">
|
<div v-if="meta" class="about">
|
||||||
<!-- eslint-disable-next-line vue/no-v-html -->
|
<!-- eslint-disable-next-line vue/no-v-html -->
|
||||||
<div class="desc" v-html="meta.description || $ts.introMisskey"></div>
|
<div class="desc" v-html="meta.description || i18n.ts.introMisskey"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="action">
|
<div class="action">
|
||||||
<button class="_button primary" @click="signup()">{{ $ts.signup }}</button>
|
<button class="_button primary" @click="signup()">{{ i18n.ts.signup }}</button>
|
||||||
<button class="_button" @click="signin()">{{ $ts.login }}</button>
|
<button class="_button" @click="signin()">{{ i18n.ts.login }}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -45,6 +45,7 @@ import MkButton from '@/components/MkButton.vue';
|
||||||
import { defaultStore, ColdDeviceStorage } from '@/store';
|
import { defaultStore, ColdDeviceStorage } from '@/store';
|
||||||
import { mainRouter } from '@/router';
|
import { mainRouter } from '@/router';
|
||||||
import { instance } from '@/instance';
|
import { instance } from '@/instance';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const DESKTOP_THRESHOLD = 1100;
|
const DESKTOP_THRESHOLD = 1100;
|
||||||
|
|
||||||
|
@ -69,6 +70,7 @@ export default defineComponent({
|
||||||
isDesktop: window.innerWidth >= DESKTOP_THRESHOLD,
|
isDesktop: window.innerWidth >= DESKTOP_THRESHOLD,
|
||||||
defaultStore,
|
defaultStore,
|
||||||
instance,
|
instance,
|
||||||
|
i18n,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -35,18 +35,18 @@
|
||||||
|
|
||||||
<Transition :name="'tray'">
|
<Transition :name="'tray'">
|
||||||
<div v-if="showMenu" class="menu">
|
<div v-if="showMenu" class="menu">
|
||||||
<MkA to="/" class="link" active-class="active"><i class="ti ti-home icon"></i>{{ $ts.home }}</MkA>
|
<MkA to="/" class="link" active-class="active"><i class="ti ti-home icon"></i>{{ i18n.ts.home }}</MkA>
|
||||||
<MkA v-if="isTimelineAvailable" to="/timeline" class="link" active-class="active"><i class="ti ti-message icon"></i>{{ $ts.timeline }}</MkA>
|
<MkA v-if="isTimelineAvailable" to="/timeline" class="link" active-class="active"><i class="ti ti-message icon"></i>{{ i18n.ts.timeline }}</MkA>
|
||||||
<MkA to="/explore" class="link" active-class="active"><i class="ti ti-hash icon"></i>{{ $ts.explore }}</MkA>
|
<MkA to="/explore" class="link" active-class="active"><i class="ti ti-hash icon"></i>{{ i18n.ts.explore }}</MkA>
|
||||||
<MkA to="/announcements" class="link" active-class="active"><i class="ti ti-speakerphone icon"></i>{{ $ts.announcements }}</MkA>
|
<MkA to="/announcements" class="link" active-class="active"><i class="ti ti-speakerphone icon"></i>{{ i18n.ts.announcements }}</MkA>
|
||||||
<MkA to="/channels" class="link" active-class="active"><i class="ti ti-device-tv icon"></i>{{ $ts.channel }}</MkA>
|
<MkA to="/channels" class="link" active-class="active"><i class="ti ti-device-tv icon"></i>{{ i18n.ts.channel }}</MkA>
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
<MkA to="/pages" class="link" active-class="active"><i class="ti ti-news icon"></i>{{ $ts.pages }}</MkA>
|
<MkA to="/pages" class="link" active-class="active"><i class="ti ti-news icon"></i>{{ i18n.ts.pages }}</MkA>
|
||||||
<MkA to="/play" class="link" active-class="active"><i class="ti ti-player-play icon"></i>Play</MkA>
|
<MkA to="/play" class="link" active-class="active"><i class="ti ti-player-play icon"></i>Play</MkA>
|
||||||
<MkA to="/gallery" class="link" active-class="active"><i class="ti ti-icons icon"></i>{{ $ts.gallery }}</MkA>
|
<MkA to="/gallery" class="link" active-class="active"><i class="ti ti-icons icon"></i>{{ i18n.ts.gallery }}</MkA>
|
||||||
<div class="action">
|
<div class="action">
|
||||||
<button class="_buttonPrimary" @click="signup()">{{ $ts.signup }}</button>
|
<button class="_buttonPrimary" @click="signup()">{{ i18n.ts.signup }}</button>
|
||||||
<button class="_button" @click="signin()">{{ $ts.login }}</button>
|
<button class="_button" @click="signin()">{{ i18n.ts.login }}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Transition>
|
</Transition>
|
||||||
|
@ -65,6 +65,7 @@ import XSignupDialog from '@/components/MkSignupDialog.vue';
|
||||||
import { ColdDeviceStorage, defaultStore } from '@/store';
|
import { ColdDeviceStorage, defaultStore } from '@/store';
|
||||||
import { mainRouter } from '@/router';
|
import { mainRouter } from '@/router';
|
||||||
import { PageMetadata, provideMetadataReceiver } from '@/scripts/page-metadata';
|
import { PageMetadata, provideMetadataReceiver } from '@/scripts/page-metadata';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const DESKTOP_THRESHOLD = 1100;
|
const DESKTOP_THRESHOLD = 1100;
|
||||||
|
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
<div class="sqxihjet">
|
<div class="sqxihjet">
|
||||||
<div v-if="narrow === false" class="wide">
|
<div v-if="narrow === false" class="wide">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<MkA to="/" class="link" active-class="active"><i class="ti ti-home icon"></i>{{ $ts.home }}</MkA>
|
<MkA to="/" class="link" active-class="active"><i class="ti ti-home icon"></i>{{ i18n.ts.home }}</MkA>
|
||||||
<MkA v-if="isTimelineAvailable" to="/timeline" class="link" active-class="active"><i class="ti ti-message icon"></i>{{ $ts.timeline }}</MkA>
|
<MkA v-if="isTimelineAvailable" to="/timeline" class="link" active-class="active"><i class="ti ti-message icon"></i>{{ i18n.ts.timeline }}</MkA>
|
||||||
<MkA to="/explore" class="link" active-class="active"><i class="ti ti-hash icon"></i>{{ $ts.explore }}</MkA>
|
<MkA to="/explore" class="link" active-class="active"><i class="ti ti-hash icon"></i>{{ i18n.ts.explore }}</MkA>
|
||||||
<MkA to="/channels" class="link" active-class="active"><i class="ti ti-device-tv icon"></i>{{ $ts.channel }}</MkA>
|
<MkA to="/channels" class="link" active-class="active"><i class="ti ti-device-tv icon"></i>{{ i18n.ts.channel }}</MkA>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<button class="_button search" @click="search()"><i class="ti ti-search icon"></i><span>{{ $ts.search }}</span></button>
|
<button class="_button search" @click="search()"><i class="ti ti-search icon"></i><span>{{ i18n.ts.search }}</span></button>
|
||||||
<button class="_buttonPrimary signup" @click="signup()">{{ $ts.signup }}</button>
|
<button class="_buttonPrimary signup" @click="signup()">{{ i18n.ts.signup }}</button>
|
||||||
<button class="_button login" @click="signin()">{{ $ts.login }}</button>
|
<button class="_button login" @click="signin()">{{ i18n.ts.login }}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -28,6 +28,7 @@ import XSignupDialog from '@/components/MkSignupDialog.vue';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { instance } from '@/instance';
|
import { instance } from '@/instance';
|
||||||
import { mainRouter } from '@/router';
|
import { mainRouter } from '@/router';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
data() {
|
data() {
|
||||||
|
@ -35,6 +36,7 @@ export default defineComponent({
|
||||||
narrow: null,
|
narrow: null,
|
||||||
showMenu: false,
|
showMenu: false,
|
||||||
isTimelineAvailable: instance.policies.ltlAvailable || instance.policies.gtlAvailable,
|
isTimelineAvailable: instance.policies.ltlAvailable || instance.policies.gtlAvailable,
|
||||||
|
i18n,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -9,14 +9,14 @@
|
||||||
</h1>
|
</h1>
|
||||||
<template v-if="full">
|
<template v-if="full">
|
||||||
<div v-if="meta" class="about">
|
<div v-if="meta" class="about">
|
||||||
<div class="desc" v-html="meta.description || $ts.introMisskey"></div>
|
<div class="desc" v-html="meta.description || i18n.ts.introMisskey"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="action">
|
<div class="action">
|
||||||
<button class="_buttonPrimary" @click="signup()">{{ $ts.signup }}</button>
|
<button class="_buttonPrimary" @click="signup()">{{ i18n.ts.signup }}</button>
|
||||||
<button class="_button" @click="signin()">{{ $ts.login }}</button>
|
<button class="_button" @click="signin()">{{ i18n.ts.login }}</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="announcements panel">
|
<div class="announcements panel">
|
||||||
<header>{{ $ts.announcements }}</header>
|
<header>{{ i18n.ts.announcements }}</header>
|
||||||
<MkPagination v-slot="{items}" :pagination="announcements" class="list">
|
<MkPagination v-slot="{items}" :pagination="announcements" class="list">
|
||||||
<section v-for="announcement in items" :key="announcement.id" class="item">
|
<section v-for="announcement in items" :key="announcement.id" class="item">
|
||||||
<div class="title">{{ announcement.title }}</div>
|
<div class="title">{{ announcement.title }}</div>
|
||||||
|
@ -46,6 +46,7 @@ import XSigninDialog from '@/components/MkSigninDialog.vue';
|
||||||
import XSignupDialog from '@/components/MkSignupDialog.vue';
|
import XSignupDialog from '@/components/MkSignupDialog.vue';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import { instance } from '@/instance';
|
import { instance } from '@/instance';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
|
@ -83,6 +84,7 @@ export default defineComponent({
|
||||||
limit: 10,
|
limit: 10,
|
||||||
},
|
},
|
||||||
instance,
|
instance,
|
||||||
|
i18n,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
<div :class="[$style.root, { _panel: !widgetProps.transparent }]" data-cy-mkw-calendar>
|
<div :class="[$style.root, { _panel: !widgetProps.transparent }]" data-cy-mkw-calendar>
|
||||||
<div :class="[$style.calendar, { [$style.isHoliday]: isHoliday }]">
|
<div :class="[$style.calendar, { [$style.isHoliday]: isHoliday }]">
|
||||||
<p :class="$style.monthAndYear">
|
<p :class="$style.monthAndYear">
|
||||||
<span :class="$style.year">{{ $t('yearX', { year }) }}</span>
|
<span :class="$style.year">{{ i18n.t('yearX', { year }) }}</span>
|
||||||
<span :class="$style.month">{{ $t('monthX', { month }) }}</span>
|
<span :class="$style.month">{{ i18n.t('monthX', { month }) }}</span>
|
||||||
</p>
|
</p>
|
||||||
<p v-if="month === 1 && day === 1" class="day">🎉{{ $t('dayX', { day }) }}<span style="display: inline-block; transform: scaleX(-1);">🎉</span></p>
|
<p v-if="month === 1 && day === 1" class="day">🎉{{ i18n.t('dayX', { day }) }}<span style="display: inline-block; transform: scaleX(-1);">🎉</span></p>
|
||||||
<p v-else :class="$style.day">{{ $t('dayX', { day }) }}</p>
|
<p v-else :class="$style.day">{{ i18n.t('dayX', { day }) }}</p>
|
||||||
<p :class="$style.weekDay">{{ weekDay }}</p>
|
<p :class="$style.weekDay">{{ weekDay }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div :class="$style.info">
|
<div :class="$style.info">
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<p v-if="widgetProps.folderId == null">
|
<p v-if="widgetProps.folderId == null">
|
||||||
{{ i18n.ts.folder }}
|
{{ i18n.ts.folder }}
|
||||||
</p>
|
</p>
|
||||||
<p v-if="widgetProps.folderId != null && images.length === 0 && !fetching">{{ $t('no-image') }}</p>
|
<p v-if="widgetProps.folderId != null && images.length === 0 && !fetching">{{ i18n.t('no-image') }}</p>
|
||||||
<div ref="slideA" class="slide a"></div>
|
<div ref="slideA" class="slide a"></div>
|
||||||
<div ref="slideB" class="slide b"></div>
|
<div ref="slideB" class="slide b"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
</template>
|
</template>
|
||||||
<template #header>
|
<template #header>
|
||||||
<button class="_button" @click="choose">
|
<button class="_button" @click="choose">
|
||||||
<span>{{ widgetProps.src === 'list' ? widgetProps.list.name : widgetProps.src === 'antenna' ? widgetProps.antenna.name : $t('_timelines.' + widgetProps.src) }}</span>
|
<span>{{ widgetProps.src === 'list' ? widgetProps.list.name : widgetProps.src === 'antenna' ? widgetProps.antenna.name : i18n.t('_timelines.' + widgetProps.src) }}</span>
|
||||||
<i :class="menuOpened ? 'ti ti-chevron-up' : 'ti ti-chevron-down'" style="margin-left: 8px;"></i>
|
<i :class="menuOpened ? 'ti ti-chevron-up' : 'ti ti-chevron-down'" style="margin-left: 8px;"></i>
|
||||||
</button>
|
</button>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<div v-for="stat in stats" :key="stat.tag">
|
<div v-for="stat in stats" :key="stat.tag">
|
||||||
<div class="tag">
|
<div class="tag">
|
||||||
<MkA class="a" :to="`/tags/${ encodeURIComponent(stat.tag) }`" :title="stat.tag">#{{ stat.tag }}</MkA>
|
<MkA class="a" :to="`/tags/${ encodeURIComponent(stat.tag) }`" :title="stat.tag">#{{ stat.tag }}</MkA>
|
||||||
<p>{{ $t('nUsersMentioned', { n: stat.usersCount }) }}</p>
|
<p>{{ i18n.t('nUsersMentioned', { n: stat.usersCount }) }}</p>
|
||||||
</div>
|
</div>
|
||||||
<MkMiniChart class="chart" :src="stat.chart"/>
|
<MkMiniChart class="chart" :src="stat.chart"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue