refactor: ♻️ Replace all $ts
with i18n
This commit is contained in:
parent
134048b1fb
commit
ca1b1c9321
48 changed files with 306 additions and 262 deletions
|
@ -84,6 +84,7 @@
|
||||||
- Phosphor icons instead of FontAwesome
|
- Phosphor icons instead of FontAwesome
|
||||||
- Fully deprecate MkEmojiPickerWindow in favor of MkEmojiPickerDialog
|
- Fully deprecate MkEmojiPickerWindow in favor of MkEmojiPickerDialog
|
||||||
- Link hover effect
|
- Link hover effect
|
||||||
|
- Replace all `$ts` with i18n
|
||||||
- Obliteration of Ai-chan
|
- Obliteration of Ai-chan
|
||||||
- [Make showing ads optional](https://github.com/misskey-dev/misskey/pull/8996)
|
- [Make showing ads optional](https://github.com/misskey-dev/misskey/pull/8996)
|
||||||
- [Tapping avatar in mobile opens account modal](https://github.com/misskey-dev/misskey/pull/9056)
|
- [Tapping avatar in mobile opens account modal](https://github.com/misskey-dev/misskey/pull/9056)
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
<div v-show="showBody" ref="content" class="content" :class="{ omitted }">
|
<div v-show="showBody" ref="content" class="content" :class="{ omitted }">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
<button v-if="omitted" class="fade _button" @click="() => { ignoreOmit = true; omitted = false; }">
|
<button v-if="omitted" class="fade _button" @click="() => { ignoreOmit = true; omitted = false; }">
|
||||||
<span>{{ $ts.showMore }}</span>
|
<span>{{ i18n.ts.showMore }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</transition>
|
||||||
|
@ -29,6 +29,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: {
|
||||||
|
|
|
@ -18,15 +18,15 @@
|
||||||
<div class="xkpnjxcv _formRoot">
|
<div class="xkpnjxcv _formRoot">
|
||||||
<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)">
|
||||||
<FormInput v-if="form[item].type === 'number'" v-model="values[item]" type="number" :step="form[item].step || 1" class="_formBlock">
|
<FormInput v-if="form[item].type === 'number'" v-model="values[item]" type="number" :step="form[item].step || 1" class="_formBlock">
|
||||||
<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>
|
||||||
</FormInput>
|
</FormInput>
|
||||||
<FormInput v-else-if="form[item].type === 'string' && !form[item].multiline" v-model="values[item]" type="text" class="_formBlock">
|
<FormInput v-else-if="form[item].type === 'string' && !form[item].multiline" v-model="values[item]" type="text" class="_formBlock">
|
||||||
<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>
|
||||||
</FormInput>
|
</FormInput>
|
||||||
<FormTextarea v-else-if="form[item].type === 'string' && form[item].multiline" v-model="values[item]" class="_formBlock">
|
<FormTextarea v-else-if="form[item].type === 'string' && form[item].multiline" v-model="values[item]" class="_formBlock">
|
||||||
<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>
|
||||||
</FormTextarea>
|
</FormTextarea>
|
||||||
<FormSwitch v-else-if="form[item].type === 'boolean'" v-model="values[item]" class="_formBlock">
|
<FormSwitch v-else-if="form[item].type === 'boolean'" v-model="values[item]" class="_formBlock">
|
||||||
|
@ -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>
|
||||||
</FormSwitch>
|
</FormSwitch>
|
||||||
<FormSelect v-else-if="form[item].type === 'enum'" v-model="values[item]" class="_formBlock">
|
<FormSelect v-else-if="form[item].type === 'enum'" v-model="values[item]" class="_formBlock">
|
||||||
<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>
|
||||||
</FormSelect>
|
</FormSelect>
|
||||||
<FormRadios v-else-if="form[item].type === 'radio'" v-model="values[item]" class="_formBlock">
|
<FormRadios v-else-if="form[item].type === 'radio'" v-model="values[item]" class="_formBlock">
|
||||||
<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>
|
||||||
</FormRadios>
|
</FormRadios>
|
||||||
<FormRange 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" class="_formBlock">
|
<FormRange 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" class="_formBlock">
|
||||||
<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>
|
||||||
</FormRange>
|
</FormRange>
|
||||||
<MkButton v-else-if="form[item].type === 'button'" class="_formBlock" @click="form[item].action($event, values)">
|
<MkButton v-else-if="form[item].type === 'button'" class="_formBlock" @click="form[item].action($event, values)">
|
||||||
|
@ -64,6 +64,7 @@ import FormRange from './form/range.vue';
|
||||||
import MkButton from './MkButton.vue';
|
import MkButton from './MkButton.vue';
|
||||||
import FormRadios from './form/radios.vue';
|
import FormRadios from './form/radios.vue';
|
||||||
import XModalWindow from '@/components/MkModalWindow.vue';
|
import XModalWindow from '@/components/MkModalWindow.vue';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="mk-google">
|
<div class="mk-google">
|
||||||
<input v-model="query" type="search" :placeholder="q">
|
<input v-model="query" type="search" :placeholder="q">
|
||||||
<button @click="search"><i class="ph-magnifying-glass-bold ph-lg"></i> {{ $ts.searchByGoogle }}</button>
|
<button @click="search"><i class="ph-magnifying-glass-bold ph-lg"></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="ph-warning-bold ph-lg"></i></span>
|
<span class="icon"><i class="ph-warning-bold ph-lg"></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
|
<VuePlyr
|
||||||
|
@ -49,6 +49,7 @@ import VuePlyr from 'vue-plyr';
|
||||||
import type * as misskey from 'misskey-js';
|
import type * as misskey from 'misskey-js';
|
||||||
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;
|
||||||
|
|
|
@ -10,9 +10,9 @@
|
||||||
</header>
|
</header>
|
||||||
<textarea id="captioninput" v-model="inputValue" autofocus :placeholder="input.placeholder" @keydown="onInputKeydown"></textarea>
|
<textarea id="captioninput" v-model="inputValue" autofocus :placeholder="input.placeholder" @keydown="onInputKeydown"></textarea>
|
||||||
<div v-if="(showOkButton || showCaptionButton || showCancelButton)" class="buttons">
|
<div v-if="(showOkButton || showCaptionButton || showCancelButton)" class="buttons">
|
||||||
<MkButton inline primary :disabled="remainingLength < 0" @click="ok">{{ $ts.ok }}</MkButton>
|
<MkButton inline primary :disabled="remainingLength < 0" @click="ok">{{ i18n.ts.ok }}</MkButton>
|
||||||
<MkButton inline @click="caption">{{ $ts.caption }}</MkButton>
|
<MkButton inline @click="caption">{{ i18n.ts.caption }}</MkButton>
|
||||||
<MkButton inline @click="cancel">{{ $ts.cancel }}</MkButton>
|
<MkButton inline @click="cancel">{{ i18n.ts.cancel }}</MkButton>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -37,6 +37,7 @@ import MkModal from '@/components/MkModal.vue';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import bytes from '@/filters/bytes';
|
import bytes from '@/filters/bytes';
|
||||||
import number from '@/filters/number';
|
import number from '@/filters/number';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
<ImgWithBlurhash class="bg" :hash="image.blurhash" :title="image.comment" :alt="image.comment"/>
|
<ImgWithBlurhash class="bg" :hash="image.blurhash" :title="image.comment" :alt="image.comment"/>
|
||||||
<div class="text">
|
<div class="text">
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<b style="display: block;"><i class="ph-warning-bold ph-lg"></i> {{ $ts.sensitive }}</b>
|
<b style="display: block;"><i class="ph-warning-bold ph-lg"></i> {{ i18n.ts.sensitive }}</b>
|
||||||
<span style="display: block;">{{ $ts.clickToShow }}</span>
|
<span style="display: block;">{{ i18n.ts.clickToShow }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
<ImgWithBlurhash :hash="image.blurhash" :src="url" :alt="image.comment" :title="image.comment" :cover="false"/>
|
<ImgWithBlurhash :hash="image.blurhash" :src="url" :alt="image.comment" :title="image.comment" :cover="false"/>
|
||||||
<div v-if="image.type === 'image/gif'" class="gif">GIF</div>
|
<div v-if="image.type === 'image/gif'" class="gif">GIF</div>
|
||||||
</a>
|
</a>
|
||||||
<button v-tooltip="$ts.hide" class="_button hide" @click="hide = true"><i class="ph-eye-slash-bold ph-lg"></i></button>
|
<button v-tooltip="i18n.ts.hide" class="_button hide" @click="hide = true"><i class="ph-eye-slash-bold ph-lg"></i></button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ import * as misskey from 'misskey-js';
|
||||||
import { getStaticImageUrl } from '@/scripts/get-static-image-url';
|
import { getStaticImageUrl } from '@/scripts/get-static-image-url';
|
||||||
import ImgWithBlurhash from '@/components/MkImgWithBlurhash.vue';
|
import ImgWithBlurhash from '@/components/MkImgWithBlurhash.vue';
|
||||||
import { defaultStore } from '@/store';
|
import { defaultStore } from '@/store';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
image: misskey.entities.DriveFile;
|
image: 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="ph-warning-bold ph-lg"></i> {{ $ts.sensitive }}</b>
|
<b><i class="ph-warning-bold ph-lg"></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">
|
||||||
|
@ -46,6 +46,7 @@ import VuePlyr from 'vue-plyr';
|
||||||
import type * as misskey from 'misskey-js';
|
import type * as misskey from 'misskey-js';
|
||||||
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 _narrow_" :style="{ width: `${width}px`, height: (height ? `min(${height}px, 100%)` : '100%') }">
|
<div ref="rootEl" class="hrmcaedk _narrow_" :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="ph--left-bold ph-lg"></i></button>
|
<button v-if="history.length > 0" v-tooltip="i18n.ts.goBack" class="_button" @click="back()"><i class="ph--left-bold ph-lg"></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>
|
||||||
|
@ -31,6 +31,7 @@ import { mainRouter, routes } from '@/router';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
import { PageMetadata, provideMetadataReceiver, setPageMetadata } from '@/scripts/page-metadata';
|
import { PageMetadata, provideMetadataReceiver, setPageMetadata } from '@/scripts/page-metadata';
|
||||||
import { Router } from '@/nirax';
|
import { Router } from '@/nirax';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
initialPath: string;
|
initialPath: string;
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
import { defineComponent, defineAsyncComponent } from 'vue';
|
import { defineComponent, defineAsyncComponent } from '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';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
|
@ -73,7 +74,7 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
async rename(file) {
|
async rename(file) {
|
||||||
const { canceled, result } = await os.inputText({
|
const { canceled, result } = await os.inputText({
|
||||||
title: this.$ts.enterFileName,
|
title: this.i18n.ts.enterFileName,
|
||||||
default: file.name,
|
default: file.name,
|
||||||
allowEmpty: false,
|
allowEmpty: false,
|
||||||
});
|
});
|
||||||
|
@ -89,9 +90,9 @@ export default defineComponent({
|
||||||
|
|
||||||
async describe(file) {
|
async describe(file) {
|
||||||
os.popup(defineAsyncComponent(() => import('@/components/MkMediaCaption.vue')), {
|
os.popup(defineAsyncComponent(() => import('@/components/MkMediaCaption.vue')), {
|
||||||
title: this.$ts.describeFile,
|
title: this.i18n.ts.describeFile,
|
||||||
input: {
|
input: {
|
||||||
placeholder: this.$ts.inputNewDescription,
|
placeholder: this.i18n.ts.inputNewDescription,
|
||||||
default: file.comment !== null ? file.comment : '',
|
default: file.comment !== null ? file.comment : '',
|
||||||
},
|
},
|
||||||
image: file,
|
image: file,
|
||||||
|
@ -112,19 +113,19 @@ export default defineComponent({
|
||||||
showFileMenu(file, ev: MouseEvent) {
|
showFileMenu(file, ev: MouseEvent) {
|
||||||
if (this.menu) return;
|
if (this.menu) return;
|
||||||
this.menu = os.popupMenu([{
|
this.menu = os.popupMenu([{
|
||||||
text: this.$ts.renameFile,
|
text: this.i18n.ts.renameFile,
|
||||||
icon: 'ph-cursor-text-bold ph-lg',
|
icon: 'ph-cursor-text-bold ph-lg',
|
||||||
action: () => { this.rename(file); },
|
action: () => { this.rename(file); },
|
||||||
}, {
|
}, {
|
||||||
text: file.isSensitive ? this.$ts.unmarkAsSensitive : this.$ts.markAsSensitive,
|
text: file.isSensitive ? this.i18n.ts.unmarkAsSensitive : this.i18n.ts.markAsSensitive,
|
||||||
icon: file.isSensitive ? 'ph-eye-slash-bold ph-lg' : 'ph-eye-bold ph-lg',
|
icon: file.isSensitive ? 'ph-eye-slash-bold ph-lg' : 'ph-eye-bold ph-lg',
|
||||||
action: () => { this.toggleSensitive(file); },
|
action: () => { this.toggleSensitive(file); },
|
||||||
}, {
|
}, {
|
||||||
text: this.$ts.describeFile,
|
text: this.i18n.ts.describeFile,
|
||||||
icon: 'ph-cursor-text-bold ph-lg',
|
icon: 'ph-cursor-text-bold ph-lg',
|
||||||
action: () => { this.describe(file); },
|
action: () => { this.describe(file); },
|
||||||
}, {
|
}, {
|
||||||
text: this.$ts.attachCancel,
|
text: this.i18n.ts.attachCancel,
|
||||||
icon: 'ph-circle-wavy-warning-bold ph-lg',
|
icon: 'ph-circle-wavy-warning-bold ph-lg',
|
||||||
action: () => { this.detachMedia(file.id); },
|
action: () => { this.detachMedia(file.id); },
|
||||||
}], ev.currentTarget ?? ev.target).then(() => this.menu = null);
|
}], ev.currentTarget ?? ev.target).then(() => this.menu = null);
|
||||||
|
|
|
@ -10,19 +10,19 @@
|
||||||
@closed="$emit('closed')"
|
@closed="$emit('closed')"
|
||||||
@ok="ok()"
|
@ok="ok()"
|
||||||
>
|
>
|
||||||
<template #header>{{ title || $ts.generateAccessToken }}</template>
|
<template #header>{{ title || i18n.ts.generateAccessToken }}</template>
|
||||||
<div v-if="information" class="_section">
|
<div v-if="information" class="_section">
|
||||||
<MkInfo warn>{{ information }}</MkInfo>
|
<MkInfo warn>{{ information }}</MkInfo>
|
||||||
</div>
|
</div>
|
||||||
<div class="_section">
|
<div class="_section">
|
||||||
<MkInput v-model="name">
|
<MkInput v-model="name">
|
||||||
<template #label>{{ $ts.name }}</template>
|
<template #label>{{ i18n.ts.name }}</template>
|
||||||
</MkInput>
|
</MkInput>
|
||||||
</div>
|
</div>
|
||||||
<div class="_section">
|
<div class="_section">
|
||||||
<div style="margin-bottom: 16px;"><b>{{ $ts.permission }}</b></div>
|
<div style="margin-bottom: 16px;"><b>{{ i18n.ts.permission }}</b></div>
|
||||||
<MkButton inline @click="disableAll">{{ $ts.disableAll }}</MkButton>
|
<MkButton inline @click="disableAll">{{ i18n.ts.disableAll }}</MkButton>
|
||||||
<MkButton inline @click="enableAll">{{ $ts.enableAll }}</MkButton>
|
<MkButton inline @click="enableAll">{{ i18n.ts.enableAll }}</MkButton>
|
||||||
<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]">{{ $t(`_permissions.${kind}`) }}</MkSwitch>
|
||||||
</div>
|
</div>
|
||||||
</XModalWindow>
|
</XModalWindow>
|
||||||
|
@ -36,6 +36,7 @@ import MkSwitch from './form/switch.vue';
|
||||||
import MkButton from './MkButton.vue';
|
import MkButton from './MkButton.vue';
|
||||||
import MkInfo from './MkInfo.vue';
|
import MkInfo from './MkInfo.vue';
|
||||||
import XModalWindow from '@/components/MkModalWindow.vue';
|
import XModalWindow from '@/components/MkModalWindow.vue';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
title?: string | null;
|
title?: string | null;
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<div class="wszdbhzo">
|
<div class="wszdbhzo">
|
||||||
<div><i class="ph-warning-bold ph-lg"></i> {{ $ts.somethingHappened }}</div>
|
<div><i class="ph-warning-bold ph-lg"></i> {{ i18n.ts.somethingHappened }}</div>
|
||||||
<MkButton inline class="retry" @click="retry"><i class="ph-arrow-clockwise-bold ph-lg"></i> {{ $ts.retry }}</MkButton>
|
<MkButton inline class="retry" @click="retry"><i class="ph-arrow-clockwise-bold ph-lg"></i> {{ i18n.ts.retry }}</MkButton>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</transition>
|
||||||
|
@ -18,6 +18,7 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
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 { i18n } from '@/i18n';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
|
|
|
@ -9,9 +9,9 @@
|
||||||
<div v-else class="menu">
|
<div v-else class="menu">
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<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="button" @click="reduceFrequency">{{ $ts._ad.reduceFrequencyOfThisAd }}</MkButton>
|
<MkButton v-if="chosen.ratio !== 0" class="button" @click="reduceFrequency">{{ i18n.ts._ad.reduceFrequencyOfThisAd }}</MkButton>
|
||||||
<button class="_textButton" @click="toggleMenu">{{ $ts._ad.back }}</button>
|
<button class="_textButton" @click="toggleMenu">{{ i18n.ts._ad.back }}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -25,6 +25,7 @@ import { host } from '@/config';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import { defaultStore } from '@/store';
|
import { defaultStore } from '@/store';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
type Ad = (typeof instance)['ads'][number];
|
type Ad = (typeof instance)['ads'][number];
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="driuhtrh">
|
<div class="driuhtrh">
|
||||||
<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="ph-magnifying-glass-bold ph-lg"></i></template>
|
<template #prefix><i class="ph-magnifying-glass-bold ph-lg"></i></template>
|
||||||
</MkInput>
|
</MkInput>
|
||||||
|
|
||||||
|
@ -13,14 +13,14 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<MkFolder v-if="searchEmojis" class="emojis">
|
<MkFolder 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>
|
||||||
</MkFolder>
|
</MkFolder>
|
||||||
|
|
||||||
<MkFolder v-for="category in customEmojiCategories" :key="category" class="emojis">
|
<MkFolder v-for="category in customEmojiCategories" :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>
|
||||||
|
@ -38,6 +38,7 @@ import MkFolder from '@/components/MkFolder.vue';
|
||||||
import MkTab from '@/components/MkTab.vue';
|
import MkTab from '@/components/MkTab.vue';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { emojiCategories, emojiTags } from '@/instance';
|
import { emojiCategories, emojiTags } from '@/instance';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="_debobigegoItem">
|
<div class="_debobigegoItem">
|
||||||
<div class="_debobigegoLabel"><i class="ph-microchip-bold ph-lg"></i> {{ $ts.cpuAndMemory }}</div>
|
<div class="_debobigegoLabel"><i class="ph-microchip-bold ph-lg"></i> {{ i18n.ts.cpuAndMemory }}</div>
|
||||||
<div class="_debobigegoPanel xhexznfu">
|
<div class="_debobigegoPanel xhexznfu">
|
||||||
<div>
|
<div>
|
||||||
<canvas :ref="cpumem"></canvas>
|
<canvas :ref="cpumem"></canvas>
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="_debobigegoItem">
|
<div class="_debobigegoItem">
|
||||||
<div class="_debobigegoLabel"><i class="ph-hard-drives-bold ph-lg"></i> {{ $ts.disk }}</div>
|
<div class="_debobigegoLabel"><i class="ph-hard-drives-bold ph-lg"></i> {{ i18n.ts.disk }}</div>
|
||||||
<div class="_debobigegoPanel xhexznfu">
|
<div class="_debobigegoPanel xhexznfu">
|
||||||
<div>
|
<div>
|
||||||
<canvas :ref="disk"></canvas>
|
<canvas :ref="disk"></canvas>
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="_debobigegoItem">
|
<div class="_debobigegoItem">
|
||||||
<div class="_debobigegoLabel"><i class="ph-swap-bold ph-lg"></i> {{ $ts.network }}</div>
|
<div class="_debobigegoLabel"><i class="ph-swap-bold ph-lg"></i> {{ i18n.ts.network }}</div>
|
||||||
<div class="_debobigegoPanel xhexznfu">
|
<div class="_debobigegoPanel xhexznfu">
|
||||||
<div>
|
<div>
|
||||||
<canvas :ref="net"></canvas>
|
<canvas :ref="net"></canvas>
|
||||||
|
@ -53,43 +53,44 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent, markRaw } from 'vue';
|
import { defineComponent, markRaw } from 'vue';
|
||||||
import {
|
import {
|
||||||
Chart,
|
Chart,
|
||||||
ArcElement,
|
ArcElement,
|
||||||
LineElement,
|
LineElement,
|
||||||
BarElement,
|
BarElement,
|
||||||
PointElement,
|
PointElement,
|
||||||
BarController,
|
BarController,
|
||||||
LineController,
|
LineController,
|
||||||
CategoryScale,
|
CategoryScale,
|
||||||
LinearScale,
|
LinearScale,
|
||||||
Legend,
|
Legend,
|
||||||
Title,
|
Title,
|
||||||
Tooltip,
|
Tooltip,
|
||||||
SubTitle
|
SubTitle,
|
||||||
} from 'chart.js';
|
} from 'chart.js';
|
||||||
|
import MkwFederation from '../../widgets/federation.vue';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import MkSelect from '@/components/form/select.vue';
|
import MkSelect from '@/components/form/select.vue';
|
||||||
import MkInput from '@/components/form/input.vue';
|
import MkInput from '@/components/form/input.vue';
|
||||||
import MkContainer from '@/components/MkContainer.vue';
|
import MkContainer from '@/components/MkContainer.vue';
|
||||||
import MkFolder from '@/components/MkFolder.vue';
|
import MkFolder from '@/components/MkFolder.vue';
|
||||||
import MkwFederation from '../../widgets/federation.vue';
|
|
||||||
import { version, url } from '@/config';
|
import { version, url } from '@/config';
|
||||||
import bytes from '@/filters/bytes';
|
import bytes from '@/filters/bytes';
|
||||||
import number from '@/filters/number';
|
import number from '@/filters/number';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
Chart.register(
|
Chart.register(
|
||||||
ArcElement,
|
ArcElement,
|
||||||
LineElement,
|
LineElement,
|
||||||
BarElement,
|
BarElement,
|
||||||
PointElement,
|
PointElement,
|
||||||
BarController,
|
BarController,
|
||||||
LineController,
|
LineController,
|
||||||
CategoryScale,
|
CategoryScale,
|
||||||
LinearScale,
|
LinearScale,
|
||||||
Legend,
|
Legend,
|
||||||
Title,
|
Title,
|
||||||
Tooltip,
|
Tooltip,
|
||||||
SubTitle
|
SubTitle,
|
||||||
);
|
);
|
||||||
|
|
||||||
const alpha = (hex, a) => {
|
const alpha = (hex, a) => {
|
||||||
|
@ -155,13 +156,13 @@ export default defineComponent({
|
||||||
this.connection.on('statsLog', this.onStatsLog);
|
this.connection.on('statsLog', this.onStatsLog);
|
||||||
this.connection.send('requestLog', {
|
this.connection.send('requestLog', {
|
||||||
id: Math.random().toString().substr(2, 8),
|
id: Math.random().toString().substr(2, 8),
|
||||||
length: 150
|
length: 150,
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.queueConnection.send('requestLog', {
|
this.queueConnection.send('requestLog', {
|
||||||
id: Math.random().toString().substr(2, 8),
|
id: Math.random().toString().substr(2, 8),
|
||||||
length: 200
|
length: 200,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -190,7 +191,7 @@ export default defineComponent({
|
||||||
borderWidth: 2,
|
borderWidth: 2,
|
||||||
borderColor: '#31748f',
|
borderColor: '#31748f',
|
||||||
backgroundColor: alpha('#31748f', 0.1),
|
backgroundColor: alpha('#31748f', 0.1),
|
||||||
data: []
|
data: [],
|
||||||
}, {
|
}, {
|
||||||
label: 'MEM (active)',
|
label: 'MEM (active)',
|
||||||
pointRadius: 0,
|
pointRadius: 0,
|
||||||
|
@ -198,7 +199,7 @@ export default defineComponent({
|
||||||
borderWidth: 2,
|
borderWidth: 2,
|
||||||
borderColor: '#c4a7e7',
|
borderColor: '#c4a7e7',
|
||||||
backgroundColor: alpha('#c4a7e7', 0.02),
|
backgroundColor: alpha('#c4a7e7', 0.02),
|
||||||
data: []
|
data: [],
|
||||||
}, {
|
}, {
|
||||||
label: 'MEM (used)',
|
label: 'MEM (used)',
|
||||||
pointRadius: 0,
|
pointRadius: 0,
|
||||||
|
@ -207,8 +208,8 @@ export default defineComponent({
|
||||||
borderColor: '#935dbf',
|
borderColor: '#935dbf',
|
||||||
borderDash: [5, 5],
|
borderDash: [5, 5],
|
||||||
fill: false,
|
fill: false,
|
||||||
data: []
|
data: [],
|
||||||
}]
|
}],
|
||||||
},
|
},
|
||||||
options: {
|
options: {
|
||||||
aspectRatio: 3,
|
aspectRatio: 3,
|
||||||
|
@ -217,14 +218,14 @@ export default defineComponent({
|
||||||
left: 16,
|
left: 16,
|
||||||
right: 16,
|
right: 16,
|
||||||
top: 16,
|
top: 16,
|
||||||
bottom: 0
|
bottom: 0,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
position: 'bottom',
|
position: 'bottom',
|
||||||
labels: {
|
labels: {
|
||||||
boxWidth: 16,
|
boxWidth: 16,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
scales: {
|
scales: {
|
||||||
x: {
|
x: {
|
||||||
|
@ -235,7 +236,7 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
ticks: {
|
ticks: {
|
||||||
display: false,
|
display: false,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
y: {
|
y: {
|
||||||
position: 'right',
|
position: 'right',
|
||||||
|
@ -246,15 +247,15 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
ticks: {
|
ticks: {
|
||||||
display: false,
|
display: false,
|
||||||
max: 100
|
max: 100,
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
tooltips: {
|
tooltips: {
|
||||||
intersect: false,
|
intersect: false,
|
||||||
mode: 'index',
|
mode: 'index',
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -271,7 +272,7 @@ export default defineComponent({
|
||||||
borderWidth: 2,
|
borderWidth: 2,
|
||||||
borderColor: '#94a029',
|
borderColor: '#94a029',
|
||||||
backgroundColor: alpha('#94a029', 0.1),
|
backgroundColor: alpha('#94a029', 0.1),
|
||||||
data: []
|
data: [],
|
||||||
}, {
|
}, {
|
||||||
label: 'Out',
|
label: 'Out',
|
||||||
pointRadius: 0,
|
pointRadius: 0,
|
||||||
|
@ -279,8 +280,8 @@ export default defineComponent({
|
||||||
borderWidth: 2,
|
borderWidth: 2,
|
||||||
borderColor: '#ff9156',
|
borderColor: '#ff9156',
|
||||||
backgroundColor: alpha('#ff9156', 0.1),
|
backgroundColor: alpha('#ff9156', 0.1),
|
||||||
data: []
|
data: [],
|
||||||
}]
|
}],
|
||||||
},
|
},
|
||||||
options: {
|
options: {
|
||||||
aspectRatio: 3,
|
aspectRatio: 3,
|
||||||
|
@ -289,14 +290,14 @@ export default defineComponent({
|
||||||
left: 16,
|
left: 16,
|
||||||
right: 16,
|
right: 16,
|
||||||
top: 16,
|
top: 16,
|
||||||
bottom: 0
|
bottom: 0,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
position: 'bottom',
|
position: 'bottom',
|
||||||
labels: {
|
labels: {
|
||||||
boxWidth: 16,
|
boxWidth: 16,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
scales: {
|
scales: {
|
||||||
x: {
|
x: {
|
||||||
|
@ -306,8 +307,8 @@ export default defineComponent({
|
||||||
zeroLineColor: this.gridColor,
|
zeroLineColor: this.gridColor,
|
||||||
},
|
},
|
||||||
ticks: {
|
ticks: {
|
||||||
display: false
|
display: false,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
y: {
|
y: {
|
||||||
position: 'right',
|
position: 'right',
|
||||||
|
@ -318,14 +319,14 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
ticks: {
|
ticks: {
|
||||||
display: false,
|
display: false,
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
tooltips: {
|
tooltips: {
|
||||||
intersect: false,
|
intersect: false,
|
||||||
mode: 'index',
|
mode: 'index',
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -342,7 +343,7 @@ export default defineComponent({
|
||||||
borderWidth: 2,
|
borderWidth: 2,
|
||||||
borderColor: '#94a029',
|
borderColor: '#94a029',
|
||||||
backgroundColor: alpha('#94a029', 0.1),
|
backgroundColor: alpha('#94a029', 0.1),
|
||||||
data: []
|
data: [],
|
||||||
}, {
|
}, {
|
||||||
label: 'Write',
|
label: 'Write',
|
||||||
pointRadius: 0,
|
pointRadius: 0,
|
||||||
|
@ -350,8 +351,8 @@ export default defineComponent({
|
||||||
borderWidth: 2,
|
borderWidth: 2,
|
||||||
borderColor: '#ff9156',
|
borderColor: '#ff9156',
|
||||||
backgroundColor: alpha('#ff9156', 0.1),
|
backgroundColor: alpha('#ff9156', 0.1),
|
||||||
data: []
|
data: [],
|
||||||
}]
|
}],
|
||||||
},
|
},
|
||||||
options: {
|
options: {
|
||||||
aspectRatio: 3,
|
aspectRatio: 3,
|
||||||
|
@ -360,14 +361,14 @@ export default defineComponent({
|
||||||
left: 16,
|
left: 16,
|
||||||
right: 16,
|
right: 16,
|
||||||
top: 16,
|
top: 16,
|
||||||
bottom: 0
|
bottom: 0,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
position: 'bottom',
|
position: 'bottom',
|
||||||
labels: {
|
labels: {
|
||||||
boxWidth: 16,
|
boxWidth: 16,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
scales: {
|
scales: {
|
||||||
x: {
|
x: {
|
||||||
|
@ -377,8 +378,8 @@ export default defineComponent({
|
||||||
zeroLineColor: this.gridColor,
|
zeroLineColor: this.gridColor,
|
||||||
},
|
},
|
||||||
ticks: {
|
ticks: {
|
||||||
display: false
|
display: false,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
y: {
|
y: {
|
||||||
position: 'right',
|
position: 'right',
|
||||||
|
@ -389,14 +390,14 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
ticks: {
|
ticks: {
|
||||||
display: false,
|
display: false,
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
tooltips: {
|
tooltips: {
|
||||||
intersect: false,
|
intersect: false,
|
||||||
mode: 'index',
|
mode: 'index',
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -458,7 +459,7 @@ export default defineComponent({
|
||||||
resume() {
|
resume() {
|
||||||
this.paused = false;
|
this.paused = false;
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -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="ph-check-bold ph-lg"></i> {{ $ts.gotIt }}</MkButton>
|
<MkButton primary @click="read(items, announcement, i)"><i class="ph-check-bold ph-lg"></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 { i18n } from '@/i18n';
|
||||||
|
|
||||||
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" v-size="{ min: [800] }" class="tqmomfks">
|
<div ref="rootEl" v-hotkey.global="keymap" v-size="{ min: [800] }" 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 _block">
|
<div class="tl _block">
|
||||||
<XTimeline
|
<XTimeline
|
||||||
ref="tlEl" :key="antennaId"
|
ref="tlEl" :key="antennaId"
|
||||||
|
|
|
@ -7,14 +7,14 @@
|
||||||
<p class="description">{{ app.description }}</p>
|
<p class="description">{{ app.description }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="_content">
|
<div class="_content">
|
||||||
<h2>{{ $ts._auth.permissionAsk }}</h2>
|
<h2>{{ i18n.ts._auth.permissionAsk }}</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li v-for="p in app.permission" :key="p">{{ $t(`_permissions.${p}`) }}</li>
|
<li v-for="p in app.permission" :key="p">{{ $t(`_permissions.${p}`) }}</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="_footer">
|
<div class="_footer">
|
||||||
<MkButton inline @click="cancel">{{ $ts.cancel }}</MkButton>
|
<MkButton inline @click="cancel">{{ i18n.ts.cancel }}</MkButton>
|
||||||
<MkButton inline primary @click="accept">{{ $ts.accept }}</MkButton>
|
<MkButton inline primary @click="accept">{{ i18n.ts.accept }}</MkButton>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
@ -23,6 +23,7 @@
|
||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
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';
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(ev: 'denied'): void;
|
(ev: 'denied'): void;
|
||||||
|
|
|
@ -12,15 +12,15 @@
|
||||||
@accepted="accepted"
|
@accepted="accepted"
|
||||||
/>
|
/>
|
||||||
<div v-if="state == 'denied'" class="denied">
|
<div v-if="state == 'denied'" class="denied">
|
||||||
<h1>{{ $ts._auth.denied }}</h1>
|
<h1>{{ i18n.ts._auth.denied }}</h1>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="state == 'accepted'" class="accepted">
|
<div v-if="state == 'accepted'" class="accepted">
|
||||||
<h1>{{ session.app.isAuthorized ? $t('already-authorized') : $ts.allowed }}</h1>
|
<h1>{{ session.app.isAuthorized ? $t('already-authorized') : i18n.ts.allowed }}</h1>
|
||||||
<p v-if="session.app.callbackUrl">{{ $ts._auth.callback }}<MkEllipsis/></p>
|
<p v-if="session.app.callbackUrl">{{ i18n.ts._auth.callback }}<MkEllipsis/></p>
|
||||||
<p v-if="!session.app.callbackUrl">{{ $ts._auth.pleaseGoBack }}</p>
|
<p v-if="!session.app.callbackUrl">{{ i18n.ts._auth.pleaseGoBack }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="state == 'fetch-session-error'" class="error">
|
<div v-if="state == 'fetch-session-error'" class="error">
|
||||||
<p>{{ $ts.somethingHappened }}</p>
|
<p>{{ i18n.ts.somethingHappened }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="signin">
|
<div v-else class="signin">
|
||||||
|
@ -34,6 +34,7 @@ import XForm from './auth.form.vue';
|
||||||
import MkSignin from '@/components/MkSignin.vue';
|
import MkSignin from '@/components/MkSignin.vue';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { login } from '@/account';
|
import { login } from '@/account';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
|
|
|
@ -10,15 +10,15 @@
|
||||||
<template #header><i class="ph-bookmark-simple-bold ph-lg ph-fw ph-lg" style="margin-right: 0.5em;"></i>{{ i18n.ts.pinnedUsers }}</template>
|
<template #header><i class="ph-bookmark-simple-bold ph-lg ph-fw ph-lg" style="margin-right: 0.5em;"></i>{{ i18n.ts.pinnedUsers }}</template>
|
||||||
<XUserList :pagination="pinnedUsers"/>
|
<XUserList :pagination="pinnedUsers"/>
|
||||||
</MkFolder>
|
</MkFolder>
|
||||||
<MkFolder class="_gap" persist-key="explore-popular-users">
|
<MkFolder v-if="$i != null" class="_gap" persist-key="explore-popular-users">
|
||||||
<template #header><i class="ph-chart-line-up-bold ph-lg ph-fw ph-lg" style="margin-right: 0.5em;"></i>{{ i18n.ts.popularUsers }}</template>
|
<template #header><i class="ph-chart-line-up-bold ph-lg ph-fw ph-lg" style="margin-right: 0.5em;"></i>{{ i18n.ts.popularUsers }}</template>
|
||||||
<XUserList :pagination="popularUsers"/>
|
<XUserList :pagination="popularUsers"/>
|
||||||
</MkFolder>
|
</MkFolder>
|
||||||
<MkFolder class="_gap" persist-key="explore-recently-updated-users">
|
<MkFolder v-if="$i != null" class="_gap" persist-key="explore-recently-updated-users">
|
||||||
<template #header><i class="ph-chat-bold ph-lg ph-fw ph-lg" style="margin-right: 0.5em;"></i>{{ i18n.ts.recentlyUpdatedUsers }}</template>
|
<template #header><i class="ph-chat-bold ph-lg ph-fw ph-lg" style="margin-right: 0.5em;"></i>{{ i18n.ts.recentlyUpdatedUsers }}</template>
|
||||||
<XUserList :pagination="recentlyUpdatedUsers"/>
|
<XUserList :pagination="recentlyUpdatedUsers"/>
|
||||||
</MkFolder>
|
</MkFolder>
|
||||||
<MkFolder class="_gap" persist-key="explore-recently-registered-users">
|
<MkFolder v-if="$i != null" class="_gap" persist-key="explore-recently-registered-users">
|
||||||
<template #header><i class="ph-plus-bold ph-lg ph-fw ph-lg" style="margin-right: 0.5em;"></i>{{ i18n.ts.recentlyRegisteredUsers }}</template>
|
<template #header><i class="ph-plus-bold ph-lg ph-fw ph-lg" style="margin-right: 0.5em;"></i>{{ i18n.ts.recentlyRegisteredUsers }}</template>
|
||||||
<XUserList :pagination="recentlyRegisteredUsers"/>
|
<XUserList :pagination="recentlyRegisteredUsers"/>
|
||||||
</MkFolder>
|
</MkFolder>
|
||||||
|
@ -65,6 +65,7 @@ import MkTab from '@/components/MkTab.vue';
|
||||||
import number from '@/filters/number';
|
import number from '@/filters/number';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
|
import { $i } from '@/account';
|
||||||
import { instance } from '@/instance';
|
import { instance } from '@/instance';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
|
|
|
@ -1,38 +1,38 @@
|
||||||
<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="ph-lightning-bold ph-lg"></i> {{ $ts._pages.blocks.button }}</template>
|
<template #header><i class="ph-lightning-bold ph-lg"></i> {{ i18n.ts._pages.blocks.button }}</template>
|
||||||
|
|
||||||
<section class="xfhsjczc">
|
<section class="xfhsjczc">
|
||||||
<MkInput v-model="value.text"><template #label>{{ $ts._pages.blocks._button.text }}</template></MkInput>
|
<MkInput v-model="value.text"><template #label>{{ i18n.ts._pages.blocks._button.text }}</template></MkInput>
|
||||||
<MkSwitch v-model="value.primary"><span>{{ $ts._pages.blocks._button.colored }}</span></MkSwitch>
|
<MkSwitch v-model="value.primary"><span>{{ i18n.ts._pages.blocks._button.colored }}</span></MkSwitch>
|
||||||
<MkSelect v-model="value.action">
|
<MkSelect v-model="value.action">
|
||||||
<template #label>{{ $ts._pages.blocks._button.action }}</template>
|
<template #label>{{ i18n.ts._pages.blocks._button.action }}</template>
|
||||||
<option value="dialog">{{ $ts._pages.blocks._button._action.dialog }}</option>
|
<option value="dialog">{{ i18n.ts._pages.blocks._button._action.dialog }}</option>
|
||||||
<option value="resetRandom">{{ $ts._pages.blocks._button._action.resetRandom }}</option>
|
<option value="resetRandom">{{ i18n.ts._pages.blocks._button._action.resetRandom }}</option>
|
||||||
<option value="pushEvent">{{ $ts._pages.blocks._button._action.pushEvent }}</option>
|
<option value="pushEvent">{{ i18n.ts._pages.blocks._button._action.pushEvent }}</option>
|
||||||
<option value="callAiScript">{{ $ts._pages.blocks._button._action.callAiScript }}</option>
|
<option value="callAiScript">{{ i18n.ts._pages.blocks._button._action.callAiScript }}</option>
|
||||||
</MkSelect>
|
</MkSelect>
|
||||||
<template v-if="value.action === 'dialog'">
|
<template v-if="value.action === 'dialog'">
|
||||||
<MkInput v-model="value.content"><template #label>{{ $ts._pages.blocks._button._action._dialog.content }}</template></MkInput>
|
<MkInput v-model="value.content"><template #label>{{ i18n.ts._pages.blocks._button._action._dialog.content }}</template></MkInput>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="value.action === 'pushEvent'">
|
<template v-else-if="value.action === 'pushEvent'">
|
||||||
<MkInput v-model="value.event"><template #label>{{ $ts._pages.blocks._button._action._pushEvent.event }}</template></MkInput>
|
<MkInput v-model="value.event"><template #label>{{ i18n.ts._pages.blocks._button._action._pushEvent.event }}</template></MkInput>
|
||||||
<MkInput v-model="value.message"><template #label>{{ $ts._pages.blocks._button._action._pushEvent.message }}</template></MkInput>
|
<MkInput v-model="value.message"><template #label>{{ i18n.ts._pages.blocks._button._action._pushEvent.message }}</template></MkInput>
|
||||||
<MkSelect v-model="value.var">
|
<MkSelect v-model="value.var">
|
||||||
<template #label>{{ $ts._pages.blocks._button._action._pushEvent.variable }}</template>
|
<template #label>{{ i18n.ts._pages.blocks._button._action._pushEvent.variable }}</template>
|
||||||
<option :value="null">{{ $t('_pages.blocks._button._action._pushEvent.no-variable') }}</option>
|
<option :value="null">{{ $t('_pages.blocks._button._action._pushEvent.no-variable') }}</option>
|
||||||
<option v-for="v in hpml.getVarsByType()" :value="v.name">{{ v.name }}</option>
|
<option v-for="v in hpml.getVarsByType()" :value="v.name">{{ v.name }}</option>
|
||||||
<optgroup :label="$ts._pages.script.pageVariables">
|
<optgroup :label="i18n.ts._pages.script.pageVariables">
|
||||||
<option v-for="v in hpml.getPageVarsByType()" :value="v">{{ v }}</option>
|
<option v-for="v in hpml.getPageVarsByType()" :value="v">{{ v }}</option>
|
||||||
</optgroup>
|
</optgroup>
|
||||||
<optgroup :label="$ts._pages.script.enviromentVariables">
|
<optgroup :label="i18n.ts._pages.script.enviromentVariables">
|
||||||
<option v-for="v in hpml.getEnvVarsByType()" :value="v">{{ v }}</option>
|
<option v-for="v in hpml.getEnvVarsByType()" :value="v">{{ v }}</option>
|
||||||
</optgroup>
|
</optgroup>
|
||||||
</MkSelect>
|
</MkSelect>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="value.action === 'callAiScript'">
|
<template v-else-if="value.action === 'callAiScript'">
|
||||||
<MkInput v-model="value.fn"><template #label>{{ $ts._pages.blocks._button._action._callAiScript.functionName }}</template></MkInput>
|
<MkInput v-model="value.fn"><template #label>{{ i18n.ts._pages.blocks._button._action._callAiScript.functionName }}</template></MkInput>
|
||||||
</template>
|
</template>
|
||||||
</section>
|
</section>
|
||||||
</XContainer>
|
</XContainer>
|
||||||
|
@ -45,6 +45,7 @@ import XContainer from '../page-editor.container.vue';
|
||||||
import MkSelect from '@/components/form/select.vue';
|
import MkSelect from '@/components/form/select.vue';
|
||||||
import MkInput from '@/components/form/input.vue';
|
import MkInput from '@/components/form/input.vue';
|
||||||
import MkSwitch from '@/components/form/switch.vue';
|
import MkSwitch from '@/components/form/switch.vue';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
withDefaults(defineProps<{
|
withDefaults(defineProps<{
|
||||||
value: any,
|
value: any,
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
<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="ph-paint-brush-household-bold ph-lg"></i> {{ $ts._pages.blocks.canvas }}</template>
|
<template #header><i class="ph-paint-brush-household-bold ph-lg"></i> {{ i18n.ts._pages.blocks.canvas }}</template>
|
||||||
|
|
||||||
<section style="padding: 0 16px 0 16px;">
|
<section style="padding: 0 16px 0 16px;">
|
||||||
<MkInput v-model="value.name">
|
<MkInput v-model="value.name">
|
||||||
<template #prefix><i class="ph-magic-wand-bold ph-lg"></i></template>
|
<template #prefix><i class="ph-magic-wand-bold ph-lg"></i></template>
|
||||||
<template #label>{{ $ts._pages.blocks._canvas.id }}</template>
|
<template #label>{{ i18n.ts._pages.blocks._canvas.id }}</template>
|
||||||
</MkInput>
|
</MkInput>
|
||||||
<MkInput v-model="value.width" type="number">
|
<MkInput v-model="value.width" type="number">
|
||||||
<template #label>{{ $ts._pages.blocks._canvas.width }}</template>
|
<template #label>{{ i18n.ts._pages.blocks._canvas.width }}</template>
|
||||||
<template #suffix>px</template>
|
<template #suffix>px</template>
|
||||||
</MkInput>
|
</MkInput>
|
||||||
<MkInput v-model="value.height" type="number">
|
<MkInput v-model="value.height" type="number">
|
||||||
<template #label>{{ $ts._pages.blocks._canvas.height }}</template>
|
<template #label>{{ i18n.ts._pages.blocks._canvas.height }}</template>
|
||||||
<template #suffix>px</template>
|
<template #suffix>px</template>
|
||||||
</MkInput>
|
</MkInput>
|
||||||
</section>
|
</section>
|
||||||
|
@ -25,6 +25,7 @@
|
||||||
import { } from 'vue';
|
import { } from 'vue';
|
||||||
import XContainer from '../page-editor.container.vue';
|
import XContainer from '../page-editor.container.vue';
|
||||||
import MkInput from '@/components/form/input.vue';
|
import MkInput from '@/components/form/input.vue';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
withDefaults(defineProps<{
|
withDefaults(defineProps<{
|
||||||
value: any
|
value: any
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
<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="ph-lightning-bold ph-lg"></i> {{ $ts._pages.blocks.counter }}</template>
|
<template #header><i class="ph-lightning-bold ph-lg"></i> {{ i18n.ts._pages.blocks.counter }}</template>
|
||||||
|
|
||||||
<section style="padding: 0 16px 0 16px;">
|
<section style="padding: 0 16px 0 16px;">
|
||||||
<MkInput v-model="value.name">
|
<MkInput v-model="value.name">
|
||||||
<template #prefix><i class="ph-magic-wand-bold ph-lg"></i></template>
|
<template #prefix><i class="ph-magic-wand-bold ph-lg"></i></template>
|
||||||
<template #label>{{ $ts._pages.blocks._counter.name }}</template>
|
<template #label>{{ i18n.ts._pages.blocks._counter.name }}</template>
|
||||||
</MkInput>
|
</MkInput>
|
||||||
<MkInput v-model="value.text">
|
<MkInput v-model="value.text">
|
||||||
<template #label>{{ $ts._pages.blocks._counter.text }}</template>
|
<template #label>{{ i18n.ts._pages.blocks._counter.text }}</template>
|
||||||
</MkInput>
|
</MkInput>
|
||||||
<MkInput v-model="value.inc" type="number">
|
<MkInput v-model="value.inc" type="number">
|
||||||
<template #label>{{ $ts._pages.blocks._counter.inc }}</template>
|
<template #label>{{ i18n.ts._pages.blocks._counter.inc }}</template>
|
||||||
</MkInput>
|
</MkInput>
|
||||||
</section>
|
</section>
|
||||||
</XContainer>
|
</XContainer>
|
||||||
|
@ -23,6 +23,7 @@
|
||||||
import { } from 'vue';
|
import { } from 'vue';
|
||||||
import XContainer from '../page-editor.container.vue';
|
import XContainer from '../page-editor.container.vue';
|
||||||
import MkInput from '@/components/form/input.vue';
|
import MkInput from '@/components/form/input.vue';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
withDefaults(defineProps<{
|
withDefaults(defineProps<{
|
||||||
value: any
|
value: 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="ph-question-bold ph-lg"></i> {{ $ts._pages.blocks.if }}</template>
|
<template #header><i class="ph-question-bold ph-lg"></i> {{ i18n.ts._pages.blocks.if }}</template>
|
||||||
<template #func>
|
<template #func>
|
||||||
<button class="_button" @click="add()">
|
<button class="_button" @click="add()">
|
||||||
<i class="ph-plus-bold ph-lg"></i>
|
<i class="ph-plus-bold ph-lg"></i>
|
||||||
|
@ -10,12 +10,12 @@
|
||||||
|
|
||||||
<section class="romcojzs">
|
<section class="romcojzs">
|
||||||
<MkSelect v-model="value.var">
|
<MkSelect v-model="value.var">
|
||||||
<template #label>{{ $ts._pages.blocks._if.variable }}</template>
|
<template #label>{{ i18n.ts._pages.blocks._if.variable }}</template>
|
||||||
<option v-for="v in hpml.getVarsByType('boolean')" :value="v.name">{{ v.name }}</option>
|
<option v-for="v in hpml.getVarsByType('boolean')" :value="v.name">{{ v.name }}</option>
|
||||||
<optgroup :label="$ts._pages.script.pageVariables">
|
<optgroup :label="i18n.ts._pages.script.pageVariables">
|
||||||
<option v-for="v in hpml.getPageVarsByType('boolean')" :value="v">{{ v }}</option>
|
<option v-for="v in hpml.getPageVarsByType('boolean')" :value="v">{{ v }}</option>
|
||||||
</optgroup>
|
</optgroup>
|
||||||
<optgroup :label="$ts._pages.script.enviromentVariables">
|
<optgroup :label="i18n.ts._pages.script.enviromentVariables">
|
||||||
<option v-for="v in hpml.getEnvVarsByType('boolean')" :value="v">{{ v }}</option>
|
<option v-for="v in hpml.getEnvVarsByType('boolean')" :value="v">{{ v }}</option>
|
||||||
</optgroup>
|
</optgroup>
|
||||||
</MkSelect>
|
</MkSelect>
|
||||||
|
|
|
@ -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="ph-image-bold ph-lg"></i> {{ $ts._pages.blocks.image }}</template>
|
<template #header><i class="ph-image-bold ph-lg"></i> {{ i18n.ts._pages.blocks.image }}</template>
|
||||||
<template #func>
|
<template #func>
|
||||||
<button @click="choose()">
|
<button @click="choose()">
|
||||||
<i class="ph-folder-notch-open-bold ph-lg"></i>
|
<i class="ph-folder-notch-open-bold ph-lg"></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 = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
value: any
|
value: 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="ph-sticker-bold ph-lg"></i> {{ $ts._pages.blocks.note }}</template>
|
<template #header><i class="ph-sticker-bold ph-lg"></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="value.detailed"><span>{{ $ts._pages.blocks._note.detailed }}</span></MkSwitch>
|
<MkSwitch v-model="value.detailed"><span>{{ i18n.ts._pages.blocks._note.detailed }}</span></MkSwitch>
|
||||||
|
|
||||||
<XNote v-if="note && !value.detailed" :key="note.id + ':normal'" v-model:note="note" style="margin-bottom: 16px;"/>
|
<XNote v-if="note && !value.detailed" :key="note.id + ':normal'" v-model:note="note" style="margin-bottom: 16px;"/>
|
||||||
<XNoteDetailed v-if="note && value.detailed" :key="note.id + ':detail'" v-model:note="note" style="margin-bottom: 16px;"/>
|
<XNoteDetailed v-if="note && value.detailed" :key="note.id + ':detail'" v-model:note="note" style="margin-bottom: 16px;"/>
|
||||||
|
@ -25,6 +25,7 @@ import MkSwitch from '@/components/form/switch.vue';
|
||||||
import XNote from '@/components/MkNote.vue';
|
import XNote from '@/components/MkNote.vue';
|
||||||
import XNoteDetailed from '@/components/MkNoteDetailed.vue';
|
import XNoteDetailed from '@/components/MkNoteDetailed.vue';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
value: any
|
value: any
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
<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="ph-lightning-bold ph-lg"></i> {{ $ts._pages.blocks.numberInput }}</template>
|
<template #header><i class="ph-lightning-bold ph-lg"></i> {{ i18n.ts._pages.blocks.numberInput }}</template>
|
||||||
|
|
||||||
<section style="padding: 0 16px 0 16px;">
|
<section style="padding: 0 16px 0 16px;">
|
||||||
<MkInput v-model="value.name">
|
<MkInput v-model="value.name">
|
||||||
<template #prefix><i class="ph-magic-wand-bold ph-lg"></i></template>
|
<template #prefix><i class="ph-magic-wand-bold ph-lg"></i></template>
|
||||||
<template #label>{{ $ts._pages.blocks._numberInput.name }}</template>
|
<template #label>{{ i18n.ts._pages.blocks._numberInput.name }}</template>
|
||||||
</MkInput>
|
</MkInput>
|
||||||
<MkInput v-model="value.text">
|
<MkInput v-model="value.text">
|
||||||
<template #label>{{ $ts._pages.blocks._numberInput.text }}</template>
|
<template #label>{{ i18n.ts._pages.blocks._numberInput.text }}</template>
|
||||||
</MkInput>
|
</MkInput>
|
||||||
<MkInput v-model="value.default" type="number">
|
<MkInput v-model="value.default" type="number">
|
||||||
<template #label>{{ $ts._pages.blocks._numberInput.default }}</template>
|
<template #label>{{ i18n.ts._pages.blocks._numberInput.default }}</template>
|
||||||
</MkInput>
|
</MkInput>
|
||||||
</section>
|
</section>
|
||||||
</XContainer>
|
</XContainer>
|
||||||
|
@ -23,6 +23,7 @@
|
||||||
import { } from 'vue';
|
import { } from 'vue';
|
||||||
import XContainer from '../page-editor.container.vue';
|
import XContainer from '../page-editor.container.vue';
|
||||||
import MkInput from '@/components/form/input.vue';
|
import MkInput from '@/components/form/input.vue';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
withDefaults(defineProps<{
|
withDefaults(defineProps<{
|
||||||
value: any
|
value: any
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<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="ph-paper-plane-tilt-bold ph-lg"></i> {{ $ts._pages.blocks.post }}</template>
|
<template #header><i class="ph-paper-plane-tilt-bold ph-lg"></i> {{ i18n.ts._pages.blocks.post }}</template>
|
||||||
|
|
||||||
<section style="padding: 16px;">
|
<section style="padding: 16px;">
|
||||||
<MkTextarea v-model="value.text"><template #label>{{ $ts._pages.blocks._post.text }}</template></MkTextarea>
|
<MkTextarea v-model="value.text"><template #label>{{ i18n.ts._pages.blocks._post.text }}</template></MkTextarea>
|
||||||
<MkSwitch v-model="value.attachCanvasImage"><span>{{ $ts._pages.blocks._post.attachCanvasImage }}</span></MkSwitch>
|
<MkSwitch v-model="value.attachCanvasImage"><span>{{ i18n.ts._pages.blocks._post.attachCanvasImage }}</span></MkSwitch>
|
||||||
<MkInput v-if="value.attachCanvasImage" v-model="value.canvasId"><template #label>{{ $ts._pages.blocks._post.canvasId }}</template></MkInput>
|
<MkInput v-if="value.attachCanvasImage" v-model="value.canvasId"><template #label>{{ i18n.ts._pages.blocks._post.canvasId }}</template></MkInput>
|
||||||
</section>
|
</section>
|
||||||
</XContainer>
|
</XContainer>
|
||||||
</template>
|
</template>
|
||||||
|
@ -18,6 +18,7 @@ import XContainer from '../page-editor.container.vue';
|
||||||
import MkTextarea from '@/components/form/textarea.vue';
|
import MkTextarea from '@/components/form/textarea.vue';
|
||||||
import MkInput from '@/components/form/input.vue';
|
import MkInput from '@/components/form/input.vue';
|
||||||
import MkSwitch from '@/components/form/switch.vue';
|
import MkSwitch from '@/components/form/switch.vue';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
withDefaults(defineProps<{
|
withDefaults(defineProps<{
|
||||||
value: any
|
value: any
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
<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="ph-lightning-bold ph-lg"></i> {{ $ts._pages.blocks.radioButton }}</template>
|
<template #header><i class="ph-lightning-bold ph-lg"></i> {{ i18n.ts._pages.blocks.radioButton }}</template>
|
||||||
|
|
||||||
<section style="padding: 0 16px 16px 16px;">
|
<section style="padding: 0 16px 16px 16px;">
|
||||||
<MkInput v-model="value.name"><template #prefix><i class="ph-magic-wand-bold ph-lg"></i></template><template #label>{{ $ts._pages.blocks._radioButton.name }}</template></MkInput>
|
<MkInput v-model="value.name"><template #prefix><i class="ph-magic-wand-bold ph-lg"></i></template><template #label>{{ i18n.ts._pages.blocks._radioButton.name }}</template></MkInput>
|
||||||
<MkInput v-model="value.title"><template #label>{{ $ts._pages.blocks._radioButton.title }}</template></MkInput>
|
<MkInput v-model="value.title"><template #label>{{ i18n.ts._pages.blocks._radioButton.title }}</template></MkInput>
|
||||||
<MkTextarea v-model="values"><template #label>{{ $ts._pages.blocks._radioButton.values }}</template></MkTextarea>
|
<MkTextarea v-model="values"><template #label>{{ i18n.ts._pages.blocks._radioButton.values }}</template></MkTextarea>
|
||||||
<MkInput v-model="value.default"><template #label>{{ $ts._pages.blocks._radioButton.default }}</template></MkInput>
|
<MkInput v-model="value.default"><template #label>{{ i18n.ts._pages.blocks._radioButton.default }}</template></MkInput>
|
||||||
</section>
|
</section>
|
||||||
</XContainer>
|
</XContainer>
|
||||||
</template>
|
</template>
|
||||||
|
@ -18,6 +18,7 @@ import { watch } from 'vue';
|
||||||
import XContainer from '../page-editor.container.vue';
|
import XContainer from '../page-editor.container.vue';
|
||||||
import MkTextarea from '@/components/form/textarea.vue';
|
import MkTextarea from '@/components/form/textarea.vue';
|
||||||
import MkInput from '@/components/form/input.vue';
|
import MkInput from '@/components/form/input.vue';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
value: any
|
value: any
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<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="ph-lightning-bold ph-lg"></i> {{ $ts._pages.blocks.switch }}</template>
|
<template #header><i class="ph-lightning-bold ph-lg"></i> {{ i18n.ts._pages.blocks.switch }}</template>
|
||||||
|
|
||||||
<section class="kjuadyyj">
|
<section class="kjuadyyj">
|
||||||
<MkInput v-model="value.name"><template #prefix><i class="ph-magic-wand-bold ph-lg"></i></template><template #label>{{ $ts._pages.blocks._switch.name }}</template></MkInput>
|
<MkInput v-model="value.name"><template #prefix><i class="ph-magic-wand-bold ph-lg"></i></template><template #label>{{ i18n.ts._pages.blocks._switch.name }}</template></MkInput>
|
||||||
<MkInput v-model="value.text"><template #label>{{ $ts._pages.blocks._switch.text }}</template></MkInput>
|
<MkInput v-model="value.text"><template #label>{{ i18n.ts._pages.blocks._switch.text }}</template></MkInput>
|
||||||
<MkSwitch v-model="value.default"><span>{{ $ts._pages.blocks._switch.default }}</span></MkSwitch>
|
<MkSwitch v-model="value.default"><span>{{ i18n.ts._pages.blocks._switch.default }}</span></MkSwitch>
|
||||||
</section>
|
</section>
|
||||||
</XContainer>
|
</XContainer>
|
||||||
</template>
|
</template>
|
||||||
|
@ -17,6 +17,7 @@ import { } from 'vue';
|
||||||
import XContainer from '../page-editor.container.vue';
|
import XContainer from '../page-editor.container.vue';
|
||||||
import MkSwitch from '@/components/form/switch.vue';
|
import MkSwitch from '@/components/form/switch.vue';
|
||||||
import MkInput from '@/components/form/input.vue';
|
import MkInput from '@/components/form/input.vue';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
withDefaults(defineProps<{
|
withDefaults(defineProps<{
|
||||||
value: any
|
value: any
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<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="ph-lightning-bold ph-lg"></i> {{ $ts._pages.blocks.textInput }}</template>
|
<template #header><i class="ph-lightning-bold ph-lg"></i> {{ i18n.ts._pages.blocks.textInput }}</template>
|
||||||
|
|
||||||
<section style="padding: 0 16px 0 16px;">
|
<section style="padding: 0 16px 0 16px;">
|
||||||
<MkInput v-model="value.name"><template #prefix><i class="ph-magic-wand-bold ph-lg"></i></template><template #label>{{ $ts._pages.blocks._textInput.name }}</template></MkInput>
|
<MkInput v-model="value.name"><template #prefix><i class="ph-magic-wand-bold ph-lg"></i></template><template #label>{{ i18n.ts._pages.blocks._textInput.name }}</template></MkInput>
|
||||||
<MkInput v-model="value.text"><template #label>{{ $ts._pages.blocks._textInput.text }}</template></MkInput>
|
<MkInput v-model="value.text"><template #label>{{ i18n.ts._pages.blocks._textInput.text }}</template></MkInput>
|
||||||
<MkInput v-model="value.default" type="text"><template #label>{{ $ts._pages.blocks._textInput.default }}</template></MkInput>
|
<MkInput v-model="value.default" type="text"><template #label>{{ i18n.ts._pages.blocks._textInput.default }}</template></MkInput>
|
||||||
</section>
|
</section>
|
||||||
</XContainer>
|
</XContainer>
|
||||||
</template>
|
</template>
|
||||||
|
@ -16,6 +16,7 @@
|
||||||
import { } from 'vue';
|
import { } from 'vue';
|
||||||
import XContainer from '../page-editor.container.vue';
|
import XContainer from '../page-editor.container.vue';
|
||||||
import MkInput from '@/components/form/input.vue';
|
import MkInput from '@/components/form/input.vue';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
withDefaults(defineProps<{
|
withDefaults(defineProps<{
|
||||||
value: any
|
value: 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="ph-align-left-bold ph-lg"></i> {{ $ts._pages.blocks.text }}</template>
|
<template #header><i class="ph-align-left-bold ph-lg"></i> {{ i18n.ts._pages.blocks.text }}</template>
|
||||||
|
|
||||||
<section class="vckmsadr">
|
<section class="vckmsadr">
|
||||||
<textarea v-model="value.text"></textarea>
|
<textarea v-model="value.text"></textarea>
|
||||||
|
@ -13,6 +13,7 @@
|
||||||
/* eslint-disable vue/no-mutating-props */
|
/* eslint-disable vue/no-mutating-props */
|
||||||
import { } from 'vue';
|
import { } from 'vue';
|
||||||
import XContainer from '../page-editor.container.vue';
|
import XContainer from '../page-editor.container.vue';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
withDefaults(defineProps<{
|
withDefaults(defineProps<{
|
||||||
value: any
|
value: any
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<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="ph-lightning-bold ph-lg"></i> {{ $ts._pages.blocks.textareaInput }}</template>
|
<template #header><i class="ph-lightning-bold ph-lg"></i> {{ i18n.ts._pages.blocks.textareaInput }}</template>
|
||||||
|
|
||||||
<section style="padding: 0 16px 16px 16px;">
|
<section style="padding: 0 16px 16px 16px;">
|
||||||
<MkInput v-model="value.name"><template #prefix><i class="ph-magic-wand-bold ph-lg"></i></template><template #label>{{ $ts._pages.blocks._textareaInput.name }}</template></MkInput>
|
<MkInput v-model="value.name"><template #prefix><i class="ph-magic-wand-bold ph-lg"></i></template><template #label>{{ i18n.ts._pages.blocks._textareaInput.name }}</template></MkInput>
|
||||||
<MkInput v-model="value.text"><template #label>{{ $ts._pages.blocks._textareaInput.text }}</template></MkInput>
|
<MkInput v-model="value.text"><template #label>{{ i18n.ts._pages.blocks._textareaInput.text }}</template></MkInput>
|
||||||
<MkTextarea v-model="value.default"><template #label>{{ $ts._pages.blocks._textareaInput.default }}</template></MkTextarea>
|
<MkTextarea v-model="value.default"><template #label>{{ i18n.ts._pages.blocks._textareaInput.default }}</template></MkTextarea>
|
||||||
</section>
|
</section>
|
||||||
</XContainer>
|
</XContainer>
|
||||||
</template>
|
</template>
|
||||||
|
@ -17,6 +17,7 @@ import { } from 'vue';
|
||||||
import XContainer from '../page-editor.container.vue';
|
import XContainer from '../page-editor.container.vue';
|
||||||
import MkTextarea from '@/components/form/textarea.vue';
|
import MkTextarea from '@/components/form/textarea.vue';
|
||||||
import MkInput from '@/components/form/input.vue';
|
import MkInput from '@/components/form/input.vue';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
withDefaults(defineProps<{
|
withDefaults(defineProps<{
|
||||||
value: any
|
value: 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="ph-align-left-bold ph-lg"></i> {{ $ts._pages.blocks.textarea }}</template>
|
<template #header><i class="ph-align-left-bold ph-lg"></i> {{ i18n.ts._pages.blocks.textarea }}</template>
|
||||||
|
|
||||||
<section class="ihymsbbe">
|
<section class="ihymsbbe">
|
||||||
<textarea v-model="value.text"></textarea>
|
<textarea v-model="value.text"></textarea>
|
||||||
|
@ -13,6 +13,7 @@
|
||||||
/* eslint-disable vue/no-mutating-props */
|
/* eslint-disable vue/no-mutating-props */
|
||||||
import { } from 'vue';
|
import { } from 'vue';
|
||||||
import XContainer from '../page-editor.container.vue';
|
import XContainer from '../page-editor.container.vue';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
withDefaults(defineProps<{
|
withDefaults(defineProps<{
|
||||||
value: any
|
value: any
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<section v-if="modelValue.type === null" class="pbglfege" @click="changeType()">
|
<section v-if="modelValue.type === null" class="pbglfege" @click="changeType()">
|
||||||
{{ $ts._pages.script.emptySlot }}
|
{{ i18n.ts._pages.script.emptySlot }}
|
||||||
</section>
|
</section>
|
||||||
<section v-else-if="modelValue.type === 'text'" class="tbwccoaw">
|
<section v-else-if="modelValue.type === 'text'" class="tbwccoaw">
|
||||||
<input v-model="modelValue.value"/>
|
<input v-model="modelValue.value"/>
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
<textarea v-model="modelValue.value"></textarea>
|
<textarea v-model="modelValue.value"></textarea>
|
||||||
</section>
|
</section>
|
||||||
<section v-else-if="modelValue.type === 'textList'" class="tbwccoaw">
|
<section v-else-if="modelValue.type === 'textList'" class="tbwccoaw">
|
||||||
<textarea v-model="modelValue.value" :placeholder="$ts._pages.script.blocks._textList.info"></textarea>
|
<textarea v-model="modelValue.value" :placeholder="i18n.ts._pages.script.blocks._textList.info"></textarea>
|
||||||
</section>
|
</section>
|
||||||
<section v-else-if="modelValue.type === 'number'" class="tbwccoaw">
|
<section v-else-if="modelValue.type === 'number'" class="tbwccoaw">
|
||||||
<input v-model="modelValue.value" type="number"/>
|
<input v-model="modelValue.value" type="number"/>
|
||||||
|
@ -26,13 +26,13 @@
|
||||||
<section v-else-if="modelValue.type === 'ref'" class="hpdwcrvs">
|
<section v-else-if="modelValue.type === 'ref'" class="hpdwcrvs">
|
||||||
<select v-model="modelValue.value">
|
<select v-model="modelValue.value">
|
||||||
<option v-for="v in hpml.getVarsByType(getExpectedType ? getExpectedType() : null).filter(x => x.name !== name)" :value="v.name">{{ v.name }}</option>
|
<option v-for="v in hpml.getVarsByType(getExpectedType ? getExpectedType() : null).filter(x => x.name !== name)" :value="v.name">{{ v.name }}</option>
|
||||||
<optgroup :label="$ts._pages.script.argVariables">
|
<optgroup :label="i18n.ts._pages.script.argVariables">
|
||||||
<option v-for="v in fnSlots" :value="v.name">{{ v.name }}</option>
|
<option v-for="v in fnSlots" :value="v.name">{{ v.name }}</option>
|
||||||
</optgroup>
|
</optgroup>
|
||||||
<optgroup :label="$ts._pages.script.pageVariables">
|
<optgroup :label="i18n.ts._pages.script.pageVariables">
|
||||||
<option v-for="v in hpml.getPageVarsByType(getExpectedType ? getExpectedType() : null)" :value="v">{{ v }}</option>
|
<option v-for="v in hpml.getPageVarsByType(getExpectedType ? getExpectedType() : null)" :value="v">{{ v }}</option>
|
||||||
</optgroup>
|
</optgroup>
|
||||||
<optgroup :label="$ts._pages.script.enviromentVariables">
|
<optgroup :label="i18n.ts._pages.script.enviromentVariables">
|
||||||
<option v-for="v in hpml.getEnvVarsByType(getExpectedType ? getExpectedType() : null)" :value="v">{{ v }}</option>
|
<option v-for="v in hpml.getEnvVarsByType(getExpectedType ? getExpectedType() : null)" :value="v">{{ v }}</option>
|
||||||
</optgroup>
|
</optgroup>
|
||||||
</select>
|
</select>
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
</section>
|
</section>
|
||||||
<section v-else-if="modelValue.type === 'fn'" class="" style="padding:0 16px 16px 16px;">
|
<section v-else-if="modelValue.type === 'fn'" class="" style="padding:0 16px 16px 16px;">
|
||||||
<MkTextarea v-model="slots">
|
<MkTextarea v-model="slots">
|
||||||
<template #label>{{ $ts._pages.script.blocks._fn.slots }}</template>
|
<template #label>{{ i18n.ts._pages.script.blocks._fn.slots }}</template>
|
||||||
<template #caption>{{ $t('_pages.script.blocks._fn.slots-info') }}</template>
|
<template #caption>{{ $t('_pages.script.blocks._fn.slots-info') }}</template>
|
||||||
</MkTextarea>
|
</MkTextarea>
|
||||||
<XV v-if="modelValue.value.expression" v-model="modelValue.value.expression" :title="$t(`_pages.script.blocks._fn.arg1`)" :get-expected-type="() => null" :hpml="hpml" :fn-slots="modelValue.value.slots" :name="name"/>
|
<XV v-if="modelValue.value.expression" v-model="modelValue.value.expression" :title="$t(`_pages.script.blocks._fn.arg1`)" :get-expected-type="() => null" :hpml="hpml" :fn-slots="modelValue.value.slots" :name="name"/>
|
||||||
|
@ -66,6 +66,7 @@ import { blockDefs } from '@/scripts/hpml/index';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { isLiteralValue } from '@/scripts/hpml/expr';
|
import { isLiteralValue } from '@/scripts/hpml/expr';
|
||||||
import { funcDefs } from '@/scripts/hpml/lib';
|
import { funcDefs } from '@/scripts/hpml/lib';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
|
@ -215,7 +216,7 @@ export default defineComponent({
|
||||||
methods: {
|
methods: {
|
||||||
async changeType() {
|
async changeType() {
|
||||||
const { canceled, result: type } = await os.select({
|
const { canceled, result: type } = await os.select({
|
||||||
title: this.$ts._pages.selectType,
|
title: this.i18n.ts._pages.selectType,
|
||||||
groupedItems: this.getScriptBlockList(this.getExpectedType ? this.getExpectedType() : null)
|
groupedItems: this.getScriptBlockList(this.getExpectedType ? this.getExpectedType() : null)
|
||||||
});
|
});
|
||||||
if (canceled) return;
|
if (canceled) return;
|
||||||
|
|
|
@ -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="ph-arrow-square-out-bold ph-lg"></i> {{ $ts._pages.viewPage }}</MkButton>
|
<MkButton v-if="pageId" class="button" inline link :to="`/@${ author.username }/pages/${ currentName }`"><i class="ph-arrow-square-out-bold ph-lg"></i> {{ i18n.ts._pages.viewPage }}</MkButton>
|
||||||
<MkButton v-if="!readonly" inline primary class="button" @click="save"><i class="ph-floppy-disk-back-bold ph-lg"></i> {{ $ts.save }}</MkButton>
|
<MkButton v-if="!readonly" inline primary class="button" @click="save"><i class="ph-floppy-disk-back-bold ph-lg"></i> {{ i18n.ts.save }}</MkButton>
|
||||||
<MkButton v-if="pageId" inline class="button" @click="duplicate"><i class="ph-clipboard-text-bold ph-lg"></i> {{ $ts.duplicate }}</MkButton>
|
<MkButton v-if="pageId" inline class="button" @click="duplicate"><i class="ph-clipboard-text-bold ph-lg"></i> {{ i18n.ts.duplicate }}</MkButton>
|
||||||
<MkButton v-if="pageId && !readonly" inline class="button" danger @click="del"><i class="ph-trash-bold ph-lg"></i> {{ $ts.delete }}</MkButton>
|
<MkButton v-if="pageId && !readonly" inline class="button" danger @click="del"><i class="ph-trash-bold ph-lg"></i> {{ i18n.ts.delete }}</MkButton>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="tab === 'settings'">
|
<div v-if="tab === 'settings'">
|
||||||
<div class="_formRoot">
|
<div class="_formRoot">
|
||||||
<MkInput v-model="title" class="_formBlock">
|
<MkInput v-model="title" class="_formBlock">
|
||||||
<template #label>{{ $ts._pages.title }}</template>
|
<template #label>{{ i18n.ts._pages.title }}</template>
|
||||||
</MkInput>
|
</MkInput>
|
||||||
|
|
||||||
<MkInput v-model="summary" class="_formBlock">
|
<MkInput v-model="summary" class="_formBlock">
|
||||||
<template #label>{{ $ts._pages.summary }}</template>
|
<template #label>{{ i18n.ts._pages.summary }}</template>
|
||||||
</MkInput>
|
</MkInput>
|
||||||
|
|
||||||
<MkInput v-model="name" class="_formBlock">
|
<MkInput v-model="name" class="_formBlock">
|
||||||
<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" class="_formBlock">{{ $ts._pages.alignCenter }}</MkSwitch>
|
<MkSwitch v-model="alignCenter" class="_formBlock">{{ i18n.ts._pages.alignCenter }}</MkSwitch>
|
||||||
|
|
||||||
<MkSelect v-model="font" class="_formBlock">
|
<MkSelect v-model="font" class="_formBlock">
|
||||||
<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" class="_formBlock">{{ $ts._pages.hideTitleWhenPinned }}</MkSwitch>
|
<MkSwitch v-model="hideTitleWhenPinned" class="_formBlock">{{ i18n.ts._pages.hideTitleWhenPinned }}</MkSwitch>
|
||||||
|
|
||||||
<div class="eyeCatch">
|
<div class="eyeCatch">
|
||||||
<MkButton v-if="eyeCatchingImageId == null && !readonly" @click="setEyeCatchingImage"><i class="ph-plus-bold ph-lg"></i> {{ $ts._pages.eyeCatchingImageSet }}</MkButton>
|
<MkButton v-if="eyeCatchingImageId == null && !readonly" @click="setEyeCatchingImage"><i class="ph-plus-bold ph-lg"></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="ph-trash-bold ph-lg"></i> {{ $ts._pages.eyeCatchingImageRemove }}</MkButton>
|
<MkButton v-if="!readonly" @click="removeEyeCatchingImage()"><i class="ph-trash-bold ph-lg"></i> {{ i18n.ts._pages.eyeCatchingImageRemove }}</MkButton>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -107,6 +107,8 @@ import { mainRouter } from '@/router';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
import { definePageMetadata } from '@/scripts/page-metadata';
|
import { definePageMetadata } from '@/scripts/page-metadata';
|
||||||
import { $i } from '@/account';
|
import { $i } from '@/account';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const XDraggable = defineAsyncComponent(() => import('vuedraggable').then(x => x.default));
|
const XDraggable = defineAsyncComponent(() => import('vuedraggable').then(x => x.default));
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
</template>
|
</template>
|
||||||
</I18n>
|
</I18n>
|
||||||
</li>
|
</li>
|
||||||
<li>{{ i18n.ts._2fa.step2 }}<br><img :src="twoFactorData.qr"><p>{{ $ts._2fa.step2Url }}<br>{{ twoFactorData.url }}</p></li>
|
<li>{{ i18n.ts._2fa.step2 }}<br><img :src="twoFactorData.qr"><p>{{ i18n.ts._2fa.step2Url }}<br>{{ twoFactorData.url }}</p></li>
|
||||||
<li>
|
<li>
|
||||||
{{ i18n.ts._2fa.step3 }}<br>
|
{{ i18n.ts._2fa.step3 }}<br>
|
||||||
<MkInput v-model="token" type="text" pattern="^[0-9]{6}$" autocomplete="off" :spellcheck="false"><template #label>{{ i18n.ts.token }}</template></MkInput>
|
<MkInput v-model="token" type="text" pattern="^[0-9]{6}$" autocomplete="off" :spellcheck="false"><template #label>{{ i18n.ts.token }}</template></MkInput>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<MkContainer>
|
<MkContainer>
|
||||||
<template #header><i class="ph-chart-bar-bold ph-lg" style="margin-right: 0.5em;"></i>{{ $ts.activity }}</template>
|
<template #header><i class="ph-chart-bar-bold ph-lg" style="margin-right: 0.5em;"></i>{{ i18n.ts.activity }}</template>
|
||||||
<template #func>
|
<template #func>
|
||||||
<button class="_button" @click="showMenu">
|
<button class="_button" @click="showMenu">
|
||||||
<i class="ph-dots-three-outline-bold ph-lg"></i>
|
<i class="ph-dots-three-outline-bold ph-lg"></i>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<MkContainer :max-height="300" :foldable="true">
|
<MkContainer :max-height="300" :foldable="true">
|
||||||
<template #header><i class="ph-image-bold ph-lg" style="margin-right: 0.5em;"></i>{{ $ts.images }}</template>
|
<template #header><i class="ph-image-bold ph-lg" style="margin-right: 0.5em;"></i>{{ i18n.ts.images }}</template>
|
||||||
<div class="ujigsodd">
|
<div class="ujigsodd">
|
||||||
<MkLoading v-if="fetching"/>
|
<MkLoading v-if="fetching"/>
|
||||||
<div v-if="!fetching && images.length > 0" class="stream">
|
<div v-if="!fetching && images.length > 0" class="stream">
|
||||||
|
@ -13,7 +13,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="empty">{{ $ts.nothing }}</p>
|
<p v-if="!fetching && images.length == 0" class="empty">{{ i18n.ts.nothing }}</p>
|
||||||
</div>
|
</div>
|
||||||
</MkContainer>
|
</MkContainer>
|
||||||
</template>
|
</template>
|
||||||
|
@ -27,6 +27,7 @@ import * as os from '@/os';
|
||||||
import MkContainer from '@/components/MkContainer.vue';
|
import MkContainer from '@/components/MkContainer.vue';
|
||||||
import ImgWithBlurhash from '@/components/MkImgWithBlurhash.vue';
|
import ImgWithBlurhash from '@/components/MkImgWithBlurhash.vue';
|
||||||
import { defaultStore } from '@/store';
|
import { defaultStore } from '@/store';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
user: misskey.entities.UserDetailed;
|
user: misskey.entities.UserDetailed;
|
||||||
|
|
|
@ -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 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: {
|
||||||
|
@ -109,13 +110,13 @@ export default defineComponent({
|
||||||
os.pageWindow('/about');
|
os.pageWindow('/about');
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
text: this.$ts.aboutMisskey,
|
text: this.i18n.ts.aboutMisskey,
|
||||||
icon: 'ph-info-bold ph-lg',
|
icon: 'ph-info-bold ph-lg',
|
||||||
action: () => {
|
action: () => {
|
||||||
os.pageWindow('/about-calckey');
|
os.pageWindow('/about-calckey');
|
||||||
}
|
}
|
||||||
}, null, {
|
}, null, {
|
||||||
text: this.$ts.help,
|
text: this.i18n.ts.help,
|
||||||
icon: 'ph-question-bold ph-lg',
|
icon: 'ph-question-bold ph-lg',
|
||||||
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>
|
||||||
|
@ -67,6 +67,7 @@ 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: {
|
||||||
|
@ -129,13 +130,13 @@ export default defineComponent({
|
||||||
os.pageWindow('/about');
|
os.pageWindow('/about');
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
text: this.$ts.aboutMisskey,
|
text: this.i18n.ts.aboutMisskey,
|
||||||
icon: 'ph-info-bold ph-lg',
|
icon: 'ph-info-bold ph-lg',
|
||||||
action: () => {
|
action: () => {
|
||||||
os.pageWindow('/about-calckey');
|
os.pageWindow('/about-calckey');
|
||||||
}
|
}
|
||||||
}, null, {
|
}, null, {
|
||||||
text: this.$ts.help,
|
text: this.i18n.ts.help,
|
||||||
icon: 'ph-question-bold ph-lg',
|
icon: 'ph-question-bold ph-lg',
|
||||||
action: () => {
|
action: () => {
|
||||||
window.open(`https://misskey-hub.net/help.md`, '_blank');
|
window.open(`https://misskey-hub.net/help.md`, '_blank');
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="azykntjl">
|
<div class="azykntjl">
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<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="ph-house-bold ph-lg ph-fw ph-lg"></i>
|
<i class="ph-house-bold ph-lg ph-fw ph-lg"></i>
|
||||||
</MkA>
|
</MkA>
|
||||||
<template v-for="item in menu">
|
<template v-for="item in menu">
|
||||||
|
@ -13,7 +13,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="ph-door-bold ph-lg ph-fw ph-lg"></i>
|
<i class="ph-door-bold ph-lg ph-fw ph-lg"></i>
|
||||||
</MkA>
|
</MkA>
|
||||||
<button v-click-anime class="item _button" @click="more">
|
<button v-click-anime class="item _button" @click="more">
|
||||||
|
@ -22,7 +22,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="ph-gear-six-bold ph-lg ph-fw ph-lg"></i>
|
<i class="ph-gear-six-bold ph-lg ph-fw ph-lg"></i>
|
||||||
</MkA>
|
</MkA>
|
||||||
<button v-click-anime class="item _button account" @click="openAccountMenu">
|
<button v-click-anime class="item _button account" @click="openAccountMenu">
|
||||||
|
@ -46,6 +46,7 @@ import * as os from '@/os';
|
||||||
import { navbarItemDef } from '@/navbar';
|
import { navbarItemDef } from '@/navbar';
|
||||||
import { openAccountMenu } from '@/account';
|
import { openAccountMenu } from '@/account';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
|
|
|
@ -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="ph-pencil-bold ph-lg ph-fw ph-lg"></i><span v-if="!iconOnly" class="text">{{ $ts.note }}</span>
|
<i class="ph-pencil-bold ph-lg ph-fw ph-lg"></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="ph-house-bold ph-lg ph-fw ph-lg"></i><span class="text">{{ $ts.timeline }}</span>
|
<i class="ph-house-bold ph-lg ph-fw ph-lg"></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="ph-door-bold ph-lg ph-fw ph-lg"></i><span class="text">{{ $ts.controlPanel }}</span>
|
<i class="ph-door-bold ph-lg ph-fw ph-lg"></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="ph-dots-three-outline-bold ph-lg ph-fw ph-lg"></i><span class="text">{{ $ts.more }}</span>
|
<i class="ph-dots-three-outline-bold ph-lg ph-fw ph-lg"></i><span class="text">{{ i18n.ts.more }}</span>
|
||||||
<span v-if="otherNavItemIndicated" class="indicator"><i class="ph-circle-fill"></i></span>
|
<span v-if="otherNavItemIndicated" class="indicator"><i class="ph-circle-fill"></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="ph-gear-six-bold ph-lg ph-fw ph-lg"></i><span class="text">{{ $ts.settings }}</span>
|
<i class="ph-gear-six-bold ph-lg ph-fw ph-lg"></i><span class="text">{{ i18n.ts.settings }}</span>
|
||||||
</MkA>
|
</MkA>
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
<div class="about">
|
<div class="about">
|
||||||
|
@ -50,6 +50,7 @@ import { openAccountMenu } 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 MisskeyLogo from '@assets/client/misskey.svg';
|
//import MisskeyLogo from '@assets/client/misskey.svg';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
|
|
|
@ -3,14 +3,15 @@
|
||||||
<XWidgets class="widgets" :edit="editMode" :widgets="$store.reactiveState.widgets.value.filter(w => w.place === place)" @add-widget="addWidget" @remove-widget="removeWidget" @update-widget="updateWidget" @update-widgets="updateWidgets" @exit="editMode = false"/>
|
<XWidgets class="widgets" :edit="editMode" :widgets="$store.reactiveState.widgets.value.filter(w => w.place === place)" @add-widget="addWidget" @remove-widget="removeWidget" @update-widget="updateWidget" @update-widgets="updateWidgets" @exit="editMode = false"/>
|
||||||
<MkAd class="a" :prefer="['square']"/>
|
<MkAd class="a" :prefer="['square']"/>
|
||||||
|
|
||||||
<button v-if="editMode" class="_textButton edit" style="font-size: 0.9em;" @click="editMode = false"><i class="ph-check-bold ph-lg"></i> {{ $ts.editWidgetsExit }}</button>
|
<button v-if="editMode" class="_textButton edit" style="font-size: 0.9em;" @click="editMode = false"><i class="ph-check-bold ph-lg"></i> {{ i18n.ts.editWidgetsExit }}</button>
|
||||||
<button v-else class="_textButton edit" style="font-size: 0.9em;" @click="editMode = true"><i class="ph-pencil-bold ph-lg"></i> {{ $ts.editWidgets }}</button>
|
<button v-else class="_textButton edit" style="font-size: 0.9em;" @click="editMode = true"><i class="ph-pencil-bold ph-lg"></i> {{ i18n.ts.editWidgets }}</button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent, defineAsyncComponent } from 'vue';
|
import { defineComponent, defineAsyncComponent } from 'vue';
|
||||||
import XWidgets from '@/components/MkWidgets.vue';
|
import XWidgets from '@/components/MkWidgets.vue';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
|
|
|
@ -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>
|
||||||
|
@ -46,6 +46,7 @@ import MkPagination from '@/components/MkPagination.vue';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import { ColdDeviceStorage } from '@/store';
|
import { ColdDeviceStorage } from '@/store';
|
||||||
import { mainRouter } from '@/router';
|
import { mainRouter } from '@/router';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const DESKTOP_THRESHOLD = 1100;
|
const DESKTOP_THRESHOLD = 1100;
|
||||||
|
|
||||||
|
|
|
@ -30,15 +30,14 @@
|
||||||
|
|
||||||
<transition :name="$store.state.animation ? 'tray' : ''">
|
<transition :name="$store.state.animation ? 'tray' : ''">
|
||||||
<div v-if="showMenu" class="menu">
|
<div v-if="showMenu" class="menu">
|
||||||
<MkA to="/" class="link" active-class="active"><i class="ph-house-bold ph-lg icon"></i>{{ $ts.home }}</MkA>
|
<MkA to="/" class="link" active-class="active"><i class="ph-house-bold ph-lg icon"></i>{{ i18n.ts.home }}</MkA>
|
||||||
<MkA v-if="isTimelineAvailable" to="/timeline" class="link" active-class="active"><i class="ph-chats-circle-bold ph-lg icon"></i>{{ $ts.timeline }}</MkA>
|
<MkA to="/explore" class="link" active-class="active"><i class="ph-hash-bold ph-lg icon"></i>{{ i18n.ts.explore }}</MkA>
|
||||||
<MkA to="/explore" class="link" active-class="active"><i class="ph-hash-bold ph-lg icon"></i>{{ $ts.explore }}</MkA>
|
<MkA to="/channels" class="link" active-class="active"><i class="ph-television-bold ph-lg icon"></i>{{ i18n.ts.channel }}</MkA>
|
||||||
<MkA to="/channels" class="link" active-class="active"><i class="ph-television-bold ph-lg icon"></i>{{ $ts.channel }}</MkA>
|
<MkA to="/pages" class="link" active-class="active"><i class="ph-file-text-bold ph-lg icon"></i>{{ i18n.ts.pages }}</MkA>
|
||||||
<MkA to="/pages" class="link" active-class="active"><i class="ph-file-text-bold ph-lg icon"></i>{{ $ts.pages }}</MkA>
|
<MkA to="/gallery" class="link" active-class="active"><i class="ph-image-square-bold ph-lg icon"></i>{{ i18n.ts.gallery }}</MkA>
|
||||||
<MkA to="/gallery" class="link" active-class="active"><i class="ph-image-square-bold ph-lg icon"></i>{{ $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>
|
||||||
|
@ -60,6 +59,7 @@ import MkButton from '@/components/MkButton.vue';
|
||||||
import { ColdDeviceStorage, defaultStore } from '@/store';
|
import { ColdDeviceStorage, defaultStore } from '@/store';
|
||||||
import { mainRouter } from '@/router';
|
import { mainRouter } from '@/router';
|
||||||
import { PageMetadata, provideMetadataReceiver, setPageMetadata } from '@/scripts/page-metadata';
|
import { PageMetadata, provideMetadataReceiver, setPageMetadata } from '@/scripts/page-metadata';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const DESKTOP_THRESHOLD = 1000;
|
const DESKTOP_THRESHOLD = 1000;
|
||||||
|
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
<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="ph-house-bold ph-lg icon"></i>{{ $ts.home }}</MkA>
|
<MkA to="/" class="link" active-class="active"><i class="ph-house-bold ph-lg icon"></i>{{ i18n.ts.home }}</MkA>
|
||||||
<MkA v-if="isTimelineAvailable" to="/timeline" class="link" active-class="active"><i class="ph-chats-circle-bold ph-lg icon"></i>{{ $ts.timeline }}</MkA>
|
<MkA v-if="isTimelineAvailable" to="/timeline" class="link" active-class="active"><i class="ph-chats-circle-bold ph-lg icon"></i>{{ i18n.ts.timeline }}</MkA>
|
||||||
<MkA to="/explore" class="link" active-class="active"><i class="ph-hash-bold ph-lg icon"></i>{{ $ts.explore }}</MkA>
|
<MkA to="/explore" class="link" active-class="active"><i class="ph-hash-bold ph-lg icon"></i>{{ i18n.ts.explore }}</MkA>
|
||||||
<MkA to="/channels" class="link" active-class="active"><i class="ph-television-bold ph-lg icon"></i>{{ $ts.channel }}</MkA>
|
<MkA to="/channels" class="link" active-class="active"><i class="ph-television-bold ph-lg icon"></i>{{ i18n.ts.channel }}</MkA>
|
||||||
<MkA to="/pages" class="link" active-class="active"><i class="ph-file-text-bold ph-lg icon"></i>{{ $ts.pages }}</MkA>
|
<MkA to="/pages" class="link" active-class="active"><i class="ph-file-text-bold ph-lg icon"></i>{{ i18n.ts.pages }}</MkA>
|
||||||
<MkA to="/gallery" class="link" active-class="active"><i class="ph-image-square-bold ph-lg icon"></i>{{ $ts.gallery }}</MkA>
|
<MkA to="/gallery" class="link" active-class="active"><i class="ph-image-square-bold ph-lg icon"></i>{{ i18n.ts.gallery }}</MkA>
|
||||||
<div v-if="info" class="page active link">
|
<div v-if="info" class="page active link">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<i v-if="info.icon" class="icon" :class="info.icon"></i>
|
<i v-if="info.icon" class="icon" :class="info.icon"></i>
|
||||||
|
@ -18,9 +18,9 @@
|
||||||
<button v-if="info.action" class="_button action" @click.stop="info.action.handler"><!-- TODO --></button>
|
<button v-if="info.action" class="_button action" @click.stop="info.action.handler"><!-- TODO --></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<button class="_button search" @click="search()"><i class="ph-magnifying-glass-bold ph-lg icon"></i><span>{{ $ts.search }}</span></button>
|
<button class="_button search" @click="search()"><i class="ph-magnifying-glass-bold ph-lg 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>
|
||||||
|
@ -48,6 +48,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 { search } from '@/scripts/search';
|
import { search } from '@/scripts/search';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
props: {
|
props: {
|
||||||
|
|
|
@ -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>
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -45,6 +45,7 @@ import MkPagination from '@/components/MkPagination.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 { i18n } from '@/i18n';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
|
|
Loading…
Reference in a new issue