mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-13 13:37:31 -07:00
refactor: ♻️ Replace all $ts
with i18n
This commit is contained in:
parent
9a85894b20
commit
8b771b62c0
48 changed files with 306 additions and 262 deletions
|
@ -84,6 +84,7 @@
|
|||
- Phosphor icons instead of FontAwesome
|
||||
- Fully deprecate MkEmojiPickerWindow in favor of MkEmojiPickerDialog
|
||||
- Link hover effect
|
||||
- Replace all `$ts` with i18n
|
||||
- Obliteration of Ai-chan
|
||||
- [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)
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<div v-show="showBody" ref="content" class="content" :class="{ omitted }">
|
||||
<slot></slot>
|
||||
<button v-if="omitted" class="fade _button" @click="() => { ignoreOmit = true; omitted = false; }">
|
||||
<span>{{ $ts.showMore }}</span>
|
||||
<span>{{ i18n.ts.showMore }}</span>
|
||||
</button>
|
||||
</div>
|
||||
</transition>
|
||||
|
@ -29,6 +29,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
export default defineComponent({
|
||||
props: {
|
||||
|
|
|
@ -18,15 +18,15 @@
|
|||
<div class="xkpnjxcv _formRoot">
|
||||
<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">
|
||||
<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>
|
||||
</FormInput>
|
||||
<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>
|
||||
</FormInput>
|
||||
<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>
|
||||
</FormTextarea>
|
||||
<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>
|
||||
</FormSwitch>
|
||||
<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>
|
||||
</FormSelect>
|
||||
<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>
|
||||
</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">
|
||||
<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>
|
||||
</FormRange>
|
||||
<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 FormRadios from './form/radios.vue';
|
||||
import XModalWindow from '@/components/MkModalWindow.vue';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
<template>
|
||||
<div class="mk-google">
|
||||
<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>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
const props = defineProps<{
|
||||
q: string;
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
<div class="mk-media-banner">
|
||||
<div v-if="media.isSensitive && hide" class="sensitive" @click="hide = false">
|
||||
<span class="icon"><i class="ph-warning-bold ph-lg"></i></span>
|
||||
<b>{{ $ts.sensitive }}</b>
|
||||
<span>{{ $ts.clickToShow }}</span>
|
||||
<b>{{ i18n.ts.sensitive }}</b>
|
||||
<span>{{ i18n.ts.clickToShow }}</span>
|
||||
</div>
|
||||
<div v-else-if="media.type.startsWith('audio') && media.type !== 'audio/midi'" class="audio">
|
||||
<VuePlyr
|
||||
|
@ -49,6 +49,7 @@ import VuePlyr from 'vue-plyr';
|
|||
import type * as misskey from 'misskey-js';
|
||||
import { ColdDeviceStorage } from '@/store';
|
||||
import 'vue-plyr/dist/vue-plyr.css';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
media: misskey.entities.DriveFile;
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
</header>
|
||||
<textarea id="captioninput" v-model="inputValue" autofocus :placeholder="input.placeholder" @keydown="onInputKeydown"></textarea>
|
||||
<div v-if="(showOkButton || showCaptionButton || showCancelButton)" class="buttons">
|
||||
<MkButton inline primary :disabled="remainingLength < 0" @click="ok">{{ $ts.ok }}</MkButton>
|
||||
<MkButton inline @click="caption">{{ $ts.caption }}</MkButton>
|
||||
<MkButton inline @click="cancel">{{ $ts.cancel }}</MkButton>
|
||||
<MkButton inline primary :disabled="remainingLength < 0" @click="ok">{{ i18n.ts.ok }}</MkButton>
|
||||
<MkButton inline @click="caption">{{ i18n.ts.caption }}</MkButton>
|
||||
<MkButton inline @click="cancel">{{ i18n.ts.cancel }}</MkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -37,6 +37,7 @@ import MkModal from '@/components/MkModal.vue';
|
|||
import MkButton from '@/components/MkButton.vue';
|
||||
import bytes from '@/filters/bytes';
|
||||
import number from '@/filters/number';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
<ImgWithBlurhash class="bg" :hash="image.blurhash" :title="image.comment" :alt="image.comment"/>
|
||||
<div class="text">
|
||||
<div class="wrapper">
|
||||
<b style="display: block;"><i class="ph-warning-bold ph-lg"></i> {{ $ts.sensitive }}</b>
|
||||
<span style="display: block;">{{ $ts.clickToShow }}</span>
|
||||
<b style="display: block;"><i class="ph-warning-bold ph-lg"></i> {{ i18n.ts.sensitive }}</b>
|
||||
<span style="display: block;">{{ i18n.ts.clickToShow }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -16,7 +16,7 @@
|
|||
<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>
|
||||
</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>
|
||||
</template>
|
||||
|
||||
|
@ -26,6 +26,7 @@ import * as misskey from 'misskey-js';
|
|||
import { getStaticImageUrl } from '@/scripts/get-static-image-url';
|
||||
import ImgWithBlurhash from '@/components/MkImgWithBlurhash.vue';
|
||||
import { defaultStore } from '@/store';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
const props = defineProps<{
|
||||
image: misskey.entities.DriveFile;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<template>
|
||||
<div v-if="hide" class="icozogqfvdetwohsdglrbswgrejoxbdj" @click="hide = false">
|
||||
<div>
|
||||
<b><i class="ph-warning-bold ph-lg"></i> {{ $ts.sensitive }}</b>
|
||||
<span>{{ $ts.clickToShow }}</span>
|
||||
<b><i class="ph-warning-bold ph-lg"></i> {{ i18n.ts.sensitive }}</b>
|
||||
<span>{{ i18n.ts.clickToShow }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="kkjnbbplepmiyuadieoenjgutgcmtsvu">
|
||||
|
@ -46,6 +46,7 @@ import VuePlyr from 'vue-plyr';
|
|||
import type * as misskey from 'misskey-js';
|
||||
import { defaultStore } from '@/store';
|
||||
import 'vue-plyr/dist/vue-plyr.css';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
const props = defineProps<{
|
||||
video: misskey.entities.DriveFile;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<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 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-if="pageMetadata?.value" class="title">
|
||||
<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 { PageMetadata, provideMetadataReceiver, setPageMetadata } from '@/scripts/page-metadata';
|
||||
import { Router } from '@/nirax';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
const props = defineProps<{
|
||||
initialPath: string;
|
||||
|
@ -44,7 +45,7 @@ defineEmits<{
|
|||
const router = new Router(routes, props.initialPath);
|
||||
|
||||
router.addListener('push', ctx => {
|
||||
|
||||
|
||||
});
|
||||
|
||||
let pageMetadata = $ref<null | ComputedRef<PageMetadata>>();
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
import { defineComponent, defineAsyncComponent } from 'vue';
|
||||
import MkDriveFileThumbnail from '@/components/MkDriveFileThumbnail.vue';
|
||||
import * as os from '@/os';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
|
@ -73,7 +74,7 @@ export default defineComponent({
|
|||
},
|
||||
async rename(file) {
|
||||
const { canceled, result } = await os.inputText({
|
||||
title: this.$ts.enterFileName,
|
||||
title: this.i18n.ts.enterFileName,
|
||||
default: file.name,
|
||||
allowEmpty: false,
|
||||
});
|
||||
|
@ -89,9 +90,9 @@ export default defineComponent({
|
|||
|
||||
async describe(file) {
|
||||
os.popup(defineAsyncComponent(() => import('@/components/MkMediaCaption.vue')), {
|
||||
title: this.$ts.describeFile,
|
||||
title: this.i18n.ts.describeFile,
|
||||
input: {
|
||||
placeholder: this.$ts.inputNewDescription,
|
||||
placeholder: this.i18n.ts.inputNewDescription,
|
||||
default: file.comment !== null ? file.comment : '',
|
||||
},
|
||||
image: file,
|
||||
|
@ -112,19 +113,19 @@ export default defineComponent({
|
|||
showFileMenu(file, ev: MouseEvent) {
|
||||
if (this.menu) return;
|
||||
this.menu = os.popupMenu([{
|
||||
text: this.$ts.renameFile,
|
||||
text: this.i18n.ts.renameFile,
|
||||
icon: 'ph-cursor-text-bold ph-lg',
|
||||
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',
|
||||
action: () => { this.toggleSensitive(file); },
|
||||
}, {
|
||||
text: this.$ts.describeFile,
|
||||
text: this.i18n.ts.describeFile,
|
||||
icon: 'ph-cursor-text-bold ph-lg',
|
||||
action: () => { this.describe(file); },
|
||||
}, {
|
||||
text: this.$ts.attachCancel,
|
||||
text: this.i18n.ts.attachCancel,
|
||||
icon: 'ph-circle-wavy-warning-bold ph-lg',
|
||||
action: () => { this.detachMedia(file.id); },
|
||||
}], ev.currentTarget ?? ev.target).then(() => this.menu = null);
|
||||
|
|
|
@ -10,19 +10,19 @@
|
|||
@closed="$emit('closed')"
|
||||
@ok="ok()"
|
||||
>
|
||||
<template #header>{{ title || $ts.generateAccessToken }}</template>
|
||||
<template #header>{{ title || i18n.ts.generateAccessToken }}</template>
|
||||
<div v-if="information" class="_section">
|
||||
<MkInfo warn>{{ information }}</MkInfo>
|
||||
</div>
|
||||
<div class="_section">
|
||||
<MkInput v-model="name">
|
||||
<template #label>{{ $ts.name }}</template>
|
||||
<template #label>{{ i18n.ts.name }}</template>
|
||||
</MkInput>
|
||||
</div>
|
||||
<div class="_section">
|
||||
<div style="margin-bottom: 16px;"><b>{{ $ts.permission }}</b></div>
|
||||
<MkButton inline @click="disableAll">{{ $ts.disableAll }}</MkButton>
|
||||
<MkButton inline @click="enableAll">{{ $ts.enableAll }}</MkButton>
|
||||
<div style="margin-bottom: 16px;"><b>{{ i18n.ts.permission }}</b></div>
|
||||
<MkButton inline @click="disableAll">{{ i18n.ts.disableAll }}</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>
|
||||
</div>
|
||||
</XModalWindow>
|
||||
|
@ -36,6 +36,7 @@ import MkSwitch from './form/switch.vue';
|
|||
import MkButton from './MkButton.vue';
|
||||
import MkInfo from './MkInfo.vue';
|
||||
import XModalWindow from '@/components/MkModalWindow.vue';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
title?: string | null;
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
</div>
|
||||
<div v-else>
|
||||
<div class="wszdbhzo">
|
||||
<div><i class="ph-warning-bold ph-lg"></i> {{ $ts.somethingHappened }}</div>
|
||||
<MkButton inline class="retry" @click="retry"><i class="ph-arrow-clockwise-bold ph-lg"></i> {{ $ts.retry }}</MkButton>
|
||||
<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> {{ i18n.ts.retry }}</MkButton>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
|
@ -18,6 +18,7 @@
|
|||
<script lang="ts">
|
||||
import { defineComponent, PropType, ref, watch } from 'vue';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
<div v-else class="menu">
|
||||
<div class="body">
|
||||
<div>Ads by {{ host }}</div>
|
||||
<!--<MkButton class="button" primary>{{ $ts._ad.like }}</MkButton>-->
|
||||
<MkButton v-if="chosen.ratio !== 0" class="button" @click="reduceFrequency">{{ $ts._ad.reduceFrequencyOfThisAd }}</MkButton>
|
||||
<button class="_textButton" @click="toggleMenu">{{ $ts._ad.back }}</button>
|
||||
<!--<MkButton class="button" primary>{{ i18n.ts._ad.like }}</MkButton>-->
|
||||
<MkButton v-if="chosen.ratio !== 0" class="button" @click="reduceFrequency">{{ i18n.ts._ad.reduceFrequencyOfThisAd }}</MkButton>
|
||||
<button class="_textButton" @click="toggleMenu">{{ i18n.ts._ad.back }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -25,6 +25,7 @@ import { host } from '@/config';
|
|||
import MkButton from '@/components/MkButton.vue';
|
||||
import { defaultStore } from '@/store';
|
||||
import * as os from '@/os';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
type Ad = (typeof instance)['ads'][number];
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="driuhtrh">
|
||||
<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>
|
||||
</MkInput>
|
||||
|
||||
|
@ -13,14 +13,14 @@
|
|||
</div>
|
||||
|
||||
<MkFolder v-if="searchEmojis" class="emojis">
|
||||
<template #header>{{ $ts.searchResult }}</template>
|
||||
<template #header>{{ i18n.ts.searchResult }}</template>
|
||||
<div class="zuvgdzyt">
|
||||
<XEmoji v-for="emoji in searchEmojis" :key="emoji.name" class="emoji" :emoji="emoji"/>
|
||||
</div>
|
||||
</MkFolder>
|
||||
|
||||
|
||||
<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">
|
||||
<XEmoji v-for="emoji in customEmojis.filter(e => e.category === category)" :key="emoji.name" class="emoji" :emoji="emoji"/>
|
||||
</div>
|
||||
|
@ -38,6 +38,7 @@ import MkFolder from '@/components/MkFolder.vue';
|
|||
import MkTab from '@/components/MkTab.vue';
|
||||
import * as os from '@/os';
|
||||
import { emojiCategories, emojiTags } from '@/instance';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<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>
|
||||
<canvas :ref="cpumem"></canvas>
|
||||
|
@ -17,7 +17,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<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>
|
||||
<canvas :ref="disk"></canvas>
|
||||
|
@ -34,7 +34,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<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>
|
||||
<canvas :ref="net"></canvas>
|
||||
|
@ -53,43 +53,44 @@
|
|||
<script lang="ts">
|
||||
import { defineComponent, markRaw } from 'vue';
|
||||
import {
|
||||
Chart,
|
||||
ArcElement,
|
||||
LineElement,
|
||||
BarElement,
|
||||
PointElement,
|
||||
BarController,
|
||||
LineController,
|
||||
CategoryScale,
|
||||
LinearScale,
|
||||
Legend,
|
||||
Title,
|
||||
Tooltip,
|
||||
SubTitle
|
||||
Chart,
|
||||
ArcElement,
|
||||
LineElement,
|
||||
BarElement,
|
||||
PointElement,
|
||||
BarController,
|
||||
LineController,
|
||||
CategoryScale,
|
||||
LinearScale,
|
||||
Legend,
|
||||
Title,
|
||||
Tooltip,
|
||||
SubTitle,
|
||||
} from 'chart.js';
|
||||
import MkwFederation from '../../widgets/federation.vue';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import MkSelect from '@/components/form/select.vue';
|
||||
import MkInput from '@/components/form/input.vue';
|
||||
import MkContainer from '@/components/MkContainer.vue';
|
||||
import MkFolder from '@/components/MkFolder.vue';
|
||||
import MkwFederation from '../../widgets/federation.vue';
|
||||
import { version, url } from '@/config';
|
||||
import bytes from '@/filters/bytes';
|
||||
import number from '@/filters/number';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
Chart.register(
|
||||
ArcElement,
|
||||
LineElement,
|
||||
BarElement,
|
||||
PointElement,
|
||||
BarController,
|
||||
LineController,
|
||||
CategoryScale,
|
||||
LinearScale,
|
||||
Legend,
|
||||
Title,
|
||||
Tooltip,
|
||||
SubTitle
|
||||
ArcElement,
|
||||
LineElement,
|
||||
BarElement,
|
||||
PointElement,
|
||||
BarController,
|
||||
LineController,
|
||||
CategoryScale,
|
||||
LinearScale,
|
||||
Legend,
|
||||
Title,
|
||||
Tooltip,
|
||||
SubTitle,
|
||||
);
|
||||
|
||||
const alpha = (hex, a) => {
|
||||
|
@ -155,13 +156,13 @@ export default defineComponent({
|
|||
this.connection.on('statsLog', this.onStatsLog);
|
||||
this.connection.send('requestLog', {
|
||||
id: Math.random().toString().substr(2, 8),
|
||||
length: 150
|
||||
length: 150,
|
||||
});
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.queueConnection.send('requestLog', {
|
||||
id: Math.random().toString().substr(2, 8),
|
||||
length: 200
|
||||
length: 200,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -190,7 +191,7 @@ export default defineComponent({
|
|||
borderWidth: 2,
|
||||
borderColor: '#31748f',
|
||||
backgroundColor: alpha('#31748f', 0.1),
|
||||
data: []
|
||||
data: [],
|
||||
}, {
|
||||
label: 'MEM (active)',
|
||||
pointRadius: 0,
|
||||
|
@ -198,7 +199,7 @@ export default defineComponent({
|
|||
borderWidth: 2,
|
||||
borderColor: '#c4a7e7',
|
||||
backgroundColor: alpha('#c4a7e7', 0.02),
|
||||
data: []
|
||||
data: [],
|
||||
}, {
|
||||
label: 'MEM (used)',
|
||||
pointRadius: 0,
|
||||
|
@ -207,8 +208,8 @@ export default defineComponent({
|
|||
borderColor: '#935dbf',
|
||||
borderDash: [5, 5],
|
||||
fill: false,
|
||||
data: []
|
||||
}]
|
||||
data: [],
|
||||
}],
|
||||
},
|
||||
options: {
|
||||
aspectRatio: 3,
|
||||
|
@ -217,14 +218,14 @@ export default defineComponent({
|
|||
left: 16,
|
||||
right: 16,
|
||||
top: 16,
|
||||
bottom: 0
|
||||
}
|
||||
bottom: 0,
|
||||
},
|
||||
},
|
||||
legend: {
|
||||
position: 'bottom',
|
||||
labels: {
|
||||
boxWidth: 16,
|
||||
}
|
||||
},
|
||||
},
|
||||
scales: {
|
||||
x: {
|
||||
|
@ -235,7 +236,7 @@ export default defineComponent({
|
|||
},
|
||||
ticks: {
|
||||
display: false,
|
||||
}
|
||||
},
|
||||
},
|
||||
y: {
|
||||
position: 'right',
|
||||
|
@ -246,15 +247,15 @@ export default defineComponent({
|
|||
},
|
||||
ticks: {
|
||||
display: false,
|
||||
max: 100
|
||||
}
|
||||
}
|
||||
max: 100,
|
||||
},
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
intersect: false,
|
||||
mode: 'index',
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}));
|
||||
},
|
||||
|
||||
|
@ -271,7 +272,7 @@ export default defineComponent({
|
|||
borderWidth: 2,
|
||||
borderColor: '#94a029',
|
||||
backgroundColor: alpha('#94a029', 0.1),
|
||||
data: []
|
||||
data: [],
|
||||
}, {
|
||||
label: 'Out',
|
||||
pointRadius: 0,
|
||||
|
@ -279,8 +280,8 @@ export default defineComponent({
|
|||
borderWidth: 2,
|
||||
borderColor: '#ff9156',
|
||||
backgroundColor: alpha('#ff9156', 0.1),
|
||||
data: []
|
||||
}]
|
||||
data: [],
|
||||
}],
|
||||
},
|
||||
options: {
|
||||
aspectRatio: 3,
|
||||
|
@ -289,14 +290,14 @@ export default defineComponent({
|
|||
left: 16,
|
||||
right: 16,
|
||||
top: 16,
|
||||
bottom: 0
|
||||
}
|
||||
bottom: 0,
|
||||
},
|
||||
},
|
||||
legend: {
|
||||
position: 'bottom',
|
||||
labels: {
|
||||
boxWidth: 16,
|
||||
}
|
||||
},
|
||||
},
|
||||
scales: {
|
||||
x: {
|
||||
|
@ -306,8 +307,8 @@ export default defineComponent({
|
|||
zeroLineColor: this.gridColor,
|
||||
},
|
||||
ticks: {
|
||||
display: false
|
||||
}
|
||||
display: false,
|
||||
},
|
||||
},
|
||||
y: {
|
||||
position: 'right',
|
||||
|
@ -318,14 +319,14 @@ export default defineComponent({
|
|||
},
|
||||
ticks: {
|
||||
display: false,
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
intersect: false,
|
||||
mode: 'index',
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}));
|
||||
},
|
||||
|
||||
|
@ -342,7 +343,7 @@ export default defineComponent({
|
|||
borderWidth: 2,
|
||||
borderColor: '#94a029',
|
||||
backgroundColor: alpha('#94a029', 0.1),
|
||||
data: []
|
||||
data: [],
|
||||
}, {
|
||||
label: 'Write',
|
||||
pointRadius: 0,
|
||||
|
@ -350,8 +351,8 @@ export default defineComponent({
|
|||
borderWidth: 2,
|
||||
borderColor: '#ff9156',
|
||||
backgroundColor: alpha('#ff9156', 0.1),
|
||||
data: []
|
||||
}]
|
||||
data: [],
|
||||
}],
|
||||
},
|
||||
options: {
|
||||
aspectRatio: 3,
|
||||
|
@ -360,14 +361,14 @@ export default defineComponent({
|
|||
left: 16,
|
||||
right: 16,
|
||||
top: 16,
|
||||
bottom: 0
|
||||
}
|
||||
bottom: 0,
|
||||
},
|
||||
},
|
||||
legend: {
|
||||
position: 'bottom',
|
||||
labels: {
|
||||
boxWidth: 16,
|
||||
}
|
||||
},
|
||||
},
|
||||
scales: {
|
||||
x: {
|
||||
|
@ -377,8 +378,8 @@ export default defineComponent({
|
|||
zeroLineColor: this.gridColor,
|
||||
},
|
||||
ticks: {
|
||||
display: false
|
||||
}
|
||||
display: false,
|
||||
},
|
||||
},
|
||||
y: {
|
||||
position: 'right',
|
||||
|
@ -389,14 +390,14 @@ export default defineComponent({
|
|||
},
|
||||
ticks: {
|
||||
display: false,
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
intersect: false,
|
||||
mode: 'index',
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}));
|
||||
},
|
||||
|
||||
|
@ -458,7 +459,7 @@ export default defineComponent({
|
|||
resume() {
|
||||
this.paused = false;
|
||||
},
|
||||
}
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<img v-if="announcement.imageUrl" :src="announcement.imageUrl"/>
|
||||
</div>
|
||||
<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>
|
||||
</section>
|
||||
</MkPagination>
|
||||
|
@ -25,6 +25,7 @@ import MkButton from '@/components/MkButton.vue';
|
|||
import * as os from '@/os';
|
||||
import { i18n } from '@/i18n';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
const pagination = {
|
||||
endpoint: 'announcements' as const,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<MkStickyContainer>
|
||||
<template #header><MkPageHeader :actions="headerActions" :tabs="headerTabs"/></template>
|
||||
<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">
|
||||
<XTimeline
|
||||
ref="tlEl" :key="antennaId"
|
||||
|
|
|
@ -7,14 +7,14 @@
|
|||
<p class="description">{{ app.description }}</p>
|
||||
</div>
|
||||
<div class="_content">
|
||||
<h2>{{ $ts._auth.permissionAsk }}</h2>
|
||||
<h2>{{ i18n.ts._auth.permissionAsk }}</h2>
|
||||
<ul>
|
||||
<li v-for="p in app.permission" :key="p">{{ $t(`_permissions.${p}`) }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="_footer">
|
||||
<MkButton inline @click="cancel">{{ $ts.cancel }}</MkButton>
|
||||
<MkButton inline primary @click="accept">{{ $ts.accept }}</MkButton>
|
||||
<MkButton inline @click="cancel">{{ i18n.ts.cancel }}</MkButton>
|
||||
<MkButton inline primary @click="accept">{{ i18n.ts.accept }}</MkButton>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
@ -23,6 +23,7 @@
|
|||
import { defineComponent } from 'vue';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import * as os from '@/os';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
const emit = defineEmits<{
|
||||
(ev: 'denied'): void;
|
||||
|
|
|
@ -12,15 +12,15 @@
|
|||
@accepted="accepted"
|
||||
/>
|
||||
<div v-if="state == 'denied'" class="denied">
|
||||
<h1>{{ $ts._auth.denied }}</h1>
|
||||
<h1>{{ i18n.ts._auth.denied }}</h1>
|
||||
</div>
|
||||
<div v-if="state == 'accepted'" class="accepted">
|
||||
<h1>{{ session.app.isAuthorized ? $t('already-authorized') : $ts.allowed }}</h1>
|
||||
<p v-if="session.app.callbackUrl">{{ $ts._auth.callback }}<MkEllipsis/></p>
|
||||
<p v-if="!session.app.callbackUrl">{{ $ts._auth.pleaseGoBack }}</p>
|
||||
<h1>{{ session.app.isAuthorized ? $t('already-authorized') : i18n.ts.allowed }}</h1>
|
||||
<p v-if="session.app.callbackUrl">{{ i18n.ts._auth.callback }}<MkEllipsis/></p>
|
||||
<p v-if="!session.app.callbackUrl">{{ i18n.ts._auth.pleaseGoBack }}</p>
|
||||
</div>
|
||||
<div v-if="state == 'fetch-session-error'" class="error">
|
||||
<p>{{ $ts.somethingHappened }}</p>
|
||||
<p>{{ i18n.ts.somethingHappened }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="signin">
|
||||
|
@ -34,6 +34,7 @@ import XForm from './auth.form.vue';
|
|||
import MkSignin from '@/components/MkSignin.vue';
|
||||
import * as os from '@/os';
|
||||
import { login } from '@/account';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
export default defineComponent({
|
||||
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>
|
||||
<XUserList :pagination="pinnedUsers"/>
|
||||
</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>
|
||||
<XUserList :pagination="popularUsers"/>
|
||||
</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>
|
||||
<XUserList :pagination="recentlyUpdatedUsers"/>
|
||||
</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>
|
||||
<XUserList :pagination="recentlyRegisteredUsers"/>
|
||||
</MkFolder>
|
||||
|
@ -65,6 +65,7 @@ import MkTab from '@/components/MkTab.vue';
|
|||
import number from '@/filters/number';
|
||||
import * as os from '@/os';
|
||||
import { i18n } from '@/i18n';
|
||||
import { $i } from '@/account';
|
||||
import { instance } from '@/instance';
|
||||
|
||||
const props = defineProps<{
|
||||
|
|
|
@ -1,38 +1,38 @@
|
|||
<template>
|
||||
<!-- eslint-disable vue/no-mutating-props -->
|
||||
<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">
|
||||
<MkInput v-model="value.text"><template #label>{{ $ts._pages.blocks._button.text }}</template></MkInput>
|
||||
<MkSwitch v-model="value.primary"><span>{{ $ts._pages.blocks._button.colored }}</span></MkSwitch>
|
||||
<MkInput v-model="value.text"><template #label>{{ i18n.ts._pages.blocks._button.text }}</template></MkInput>
|
||||
<MkSwitch v-model="value.primary"><span>{{ i18n.ts._pages.blocks._button.colored }}</span></MkSwitch>
|
||||
<MkSelect v-model="value.action">
|
||||
<template #label>{{ $ts._pages.blocks._button.action }}</template>
|
||||
<option value="dialog">{{ $ts._pages.blocks._button._action.dialog }}</option>
|
||||
<option value="resetRandom">{{ $ts._pages.blocks._button._action.resetRandom }}</option>
|
||||
<option value="pushEvent">{{ $ts._pages.blocks._button._action.pushEvent }}</option>
|
||||
<option value="callAiScript">{{ $ts._pages.blocks._button._action.callAiScript }}</option>
|
||||
<template #label>{{ i18n.ts._pages.blocks._button.action }}</template>
|
||||
<option value="dialog">{{ i18n.ts._pages.blocks._button._action.dialog }}</option>
|
||||
<option value="resetRandom">{{ i18n.ts._pages.blocks._button._action.resetRandom }}</option>
|
||||
<option value="pushEvent">{{ i18n.ts._pages.blocks._button._action.pushEvent }}</option>
|
||||
<option value="callAiScript">{{ i18n.ts._pages.blocks._button._action.callAiScript }}</option>
|
||||
</MkSelect>
|
||||
<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 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.message"><template #label>{{ $ts._pages.blocks._button._action._pushEvent.message }}</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>{{ i18n.ts._pages.blocks._button._action._pushEvent.message }}</template></MkInput>
|
||||
<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 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>
|
||||
</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>
|
||||
</optgroup>
|
||||
</MkSelect>
|
||||
</template>
|
||||
<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>
|
||||
</section>
|
||||
</XContainer>
|
||||
|
@ -45,6 +45,7 @@ import XContainer from '../page-editor.container.vue';
|
|||
import MkSelect from '@/components/form/select.vue';
|
||||
import MkInput from '@/components/form/input.vue';
|
||||
import MkSwitch from '@/components/form/switch.vue';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
withDefaults(defineProps<{
|
||||
value: any,
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
<template>
|
||||
<!-- eslint-disable vue/no-mutating-props -->
|
||||
<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;">
|
||||
<MkInput v-model="value.name">
|
||||
<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 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>
|
||||
</MkInput>
|
||||
<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>
|
||||
</MkInput>
|
||||
</section>
|
||||
|
@ -25,6 +25,7 @@
|
|||
import { } from 'vue';
|
||||
import XContainer from '../page-editor.container.vue';
|
||||
import MkInput from '@/components/form/input.vue';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
withDefaults(defineProps<{
|
||||
value: any
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
<template>
|
||||
<!-- eslint-disable vue/no-mutating-props -->
|
||||
<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;">
|
||||
<MkInput v-model="value.name">
|
||||
<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 v-model="value.text">
|
||||
<template #label>{{ $ts._pages.blocks._counter.text }}</template>
|
||||
<template #label>{{ i18n.ts._pages.blocks._counter.text }}</template>
|
||||
</MkInput>
|
||||
<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>
|
||||
</section>
|
||||
</XContainer>
|
||||
|
@ -23,6 +23,7 @@
|
|||
import { } from 'vue';
|
||||
import XContainer from '../page-editor.container.vue';
|
||||
import MkInput from '@/components/form/input.vue';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
withDefaults(defineProps<{
|
||||
value: any
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<!-- eslint-disable vue/no-mutating-props -->
|
||||
<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>
|
||||
<button class="_button" @click="add()">
|
||||
<i class="ph-plus-bold ph-lg"></i>
|
||||
|
@ -10,12 +10,12 @@
|
|||
|
||||
<section class="romcojzs">
|
||||
<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>
|
||||
<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>
|
||||
</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>
|
||||
</optgroup>
|
||||
</MkSelect>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<!-- eslint-disable vue/no-mutating-props -->
|
||||
<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>
|
||||
<button @click="choose()">
|
||||
<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 MkDriveFileThumbnail from '@/components/MkDriveFileThumbnail.vue';
|
||||
import * as os from '@/os';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
value: any
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<template>
|
||||
<!-- eslint-disable vue/no-mutating-props -->
|
||||
<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;">
|
||||
<MkInput v-model="id">
|
||||
<template #label>{{ $ts._pages.blocks._note.id }}</template>
|
||||
<template #caption>{{ $ts._pages.blocks._note.idDescription }}</template>
|
||||
<template #label>{{ i18n.ts._pages.blocks._note.id }}</template>
|
||||
<template #caption>{{ i18n.ts._pages.blocks._note.idDescription }}</template>
|
||||
</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;"/>
|
||||
<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 XNoteDetailed from '@/components/MkNoteDetailed.vue';
|
||||
import * as os from '@/os';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
value: any
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
<template>
|
||||
<!-- eslint-disable vue/no-mutating-props -->
|
||||
<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;">
|
||||
<MkInput v-model="value.name">
|
||||
<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 v-model="value.text">
|
||||
<template #label>{{ $ts._pages.blocks._numberInput.text }}</template>
|
||||
<template #label>{{ i18n.ts._pages.blocks._numberInput.text }}</template>
|
||||
</MkInput>
|
||||
<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>
|
||||
</section>
|
||||
</XContainer>
|
||||
|
@ -23,6 +23,7 @@
|
|||
import { } from 'vue';
|
||||
import XContainer from '../page-editor.container.vue';
|
||||
import MkInput from '@/components/form/input.vue';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
withDefaults(defineProps<{
|
||||
value: any
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<template>
|
||||
<!-- eslint-disable vue/no-mutating-props -->
|
||||
<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;">
|
||||
<MkTextarea v-model="value.text"><template #label>{{ $ts._pages.blocks._post.text }}</template></MkTextarea>
|
||||
<MkSwitch v-model="value.attachCanvasImage"><span>{{ $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>
|
||||
<MkTextarea v-model="value.text"><template #label>{{ i18n.ts._pages.blocks._post.text }}</template></MkTextarea>
|
||||
<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>{{ i18n.ts._pages.blocks._post.canvasId }}</template></MkInput>
|
||||
</section>
|
||||
</XContainer>
|
||||
</template>
|
||||
|
@ -18,6 +18,7 @@ import XContainer from '../page-editor.container.vue';
|
|||
import MkTextarea from '@/components/form/textarea.vue';
|
||||
import MkInput from '@/components/form/input.vue';
|
||||
import MkSwitch from '@/components/form/switch.vue';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
withDefaults(defineProps<{
|
||||
value: any
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<template>
|
||||
<!-- eslint-disable vue/no-mutating-props -->
|
||||
<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;">
|
||||
<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.title"><template #label>{{ $ts._pages.blocks._radioButton.title }}</template></MkInput>
|
||||
<MkTextarea v-model="values"><template #label>{{ $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.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>{{ i18n.ts._pages.blocks._radioButton.title }}</template></MkInput>
|
||||
<MkTextarea v-model="values"><template #label>{{ i18n.ts._pages.blocks._radioButton.values }}</template></MkTextarea>
|
||||
<MkInput v-model="value.default"><template #label>{{ i18n.ts._pages.blocks._radioButton.default }}</template></MkInput>
|
||||
</section>
|
||||
</XContainer>
|
||||
</template>
|
||||
|
@ -18,6 +18,7 @@ import { watch } from 'vue';
|
|||
import XContainer from '../page-editor.container.vue';
|
||||
import MkTextarea from '@/components/form/textarea.vue';
|
||||
import MkInput from '@/components/form/input.vue';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
value: any
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<template>
|
||||
<!-- eslint-disable vue/no-mutating-props -->
|
||||
<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">
|
||||
<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.text"><template #label>{{ $ts._pages.blocks._switch.text }}</template></MkInput>
|
||||
<MkSwitch v-model="value.default"><span>{{ $ts._pages.blocks._switch.default }}</span></MkSwitch>
|
||||
<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>{{ i18n.ts._pages.blocks._switch.text }}</template></MkInput>
|
||||
<MkSwitch v-model="value.default"><span>{{ i18n.ts._pages.blocks._switch.default }}</span></MkSwitch>
|
||||
</section>
|
||||
</XContainer>
|
||||
</template>
|
||||
|
@ -17,6 +17,7 @@ import { } from 'vue';
|
|||
import XContainer from '../page-editor.container.vue';
|
||||
import MkSwitch from '@/components/form/switch.vue';
|
||||
import MkInput from '@/components/form/input.vue';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
withDefaults(defineProps<{
|
||||
value: any
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<template>
|
||||
<!-- eslint-disable vue/no-mutating-props -->
|
||||
<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;">
|
||||
<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.text"><template #label>{{ $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.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>{{ i18n.ts._pages.blocks._textInput.text }}</template></MkInput>
|
||||
<MkInput v-model="value.default" type="text"><template #label>{{ i18n.ts._pages.blocks._textInput.default }}</template></MkInput>
|
||||
</section>
|
||||
</XContainer>
|
||||
</template>
|
||||
|
@ -16,6 +16,7 @@
|
|||
import { } from 'vue';
|
||||
import XContainer from '../page-editor.container.vue';
|
||||
import MkInput from '@/components/form/input.vue';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
withDefaults(defineProps<{
|
||||
value: any
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<!-- eslint-disable vue/no-mutating-props -->
|
||||
<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">
|
||||
<textarea v-model="value.text"></textarea>
|
||||
|
@ -13,6 +13,7 @@
|
|||
/* eslint-disable vue/no-mutating-props */
|
||||
import { } from 'vue';
|
||||
import XContainer from '../page-editor.container.vue';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
withDefaults(defineProps<{
|
||||
value: any
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<template>
|
||||
<!-- eslint-disable vue/no-mutating-props -->
|
||||
<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;">
|
||||
<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.text"><template #label>{{ $ts._pages.blocks._textareaInput.text }}</template></MkInput>
|
||||
<MkTextarea v-model="value.default"><template #label>{{ $ts._pages.blocks._textareaInput.default }}</template></MkTextarea>
|
||||
<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>{{ i18n.ts._pages.blocks._textareaInput.text }}</template></MkInput>
|
||||
<MkTextarea v-model="value.default"><template #label>{{ i18n.ts._pages.blocks._textareaInput.default }}</template></MkTextarea>
|
||||
</section>
|
||||
</XContainer>
|
||||
</template>
|
||||
|
@ -17,6 +17,7 @@ import { } from 'vue';
|
|||
import XContainer from '../page-editor.container.vue';
|
||||
import MkTextarea from '@/components/form/textarea.vue';
|
||||
import MkInput from '@/components/form/input.vue';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
withDefaults(defineProps<{
|
||||
value: any
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<!-- eslint-disable vue/no-mutating-props -->
|
||||
<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">
|
||||
<textarea v-model="value.text"></textarea>
|
||||
|
@ -13,6 +13,7 @@
|
|||
/* eslint-disable vue/no-mutating-props */
|
||||
import { } from 'vue';
|
||||
import XContainer from '../page-editor.container.vue';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
withDefaults(defineProps<{
|
||||
value: any
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
</template>
|
||||
|
||||
<section v-if="modelValue.type === null" class="pbglfege" @click="changeType()">
|
||||
{{ $ts._pages.script.emptySlot }}
|
||||
{{ i18n.ts._pages.script.emptySlot }}
|
||||
</section>
|
||||
<section v-else-if="modelValue.type === 'text'" class="tbwccoaw">
|
||||
<input v-model="modelValue.value"/>
|
||||
|
@ -18,7 +18,7 @@
|
|||
<textarea v-model="modelValue.value"></textarea>
|
||||
</section>
|
||||
<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 v-else-if="modelValue.type === 'number'" class="tbwccoaw">
|
||||
<input v-model="modelValue.value" type="number"/>
|
||||
|
@ -26,13 +26,13 @@
|
|||
<section v-else-if="modelValue.type === 'ref'" class="hpdwcrvs">
|
||||
<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>
|
||||
<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>
|
||||
</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>
|
||||
</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>
|
||||
</optgroup>
|
||||
</select>
|
||||
|
@ -42,7 +42,7 @@
|
|||
</section>
|
||||
<section v-else-if="modelValue.type === 'fn'" class="" style="padding:0 16px 16px 16px;">
|
||||
<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>
|
||||
</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"/>
|
||||
|
@ -66,6 +66,7 @@ import { blockDefs } from '@/scripts/hpml/index';
|
|||
import * as os from '@/os';
|
||||
import { isLiteralValue } from '@/scripts/hpml/expr';
|
||||
import { funcDefs } from '@/scripts/hpml/lib';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
|
@ -215,7 +216,7 @@ export default defineComponent({
|
|||
methods: {
|
||||
async changeType() {
|
||||
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)
|
||||
});
|
||||
if (canceled) return;
|
||||
|
|
|
@ -3,42 +3,42 @@
|
|||
<template #header><MkPageHeader v-model:tab="tab" :actions="headerActions" :tabs="headerTabs"/></template>
|
||||
<MkSpacer :content-max="700">
|
||||
<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="!readonly" inline primary class="button" @click="save"><i class="ph-floppy-disk-back-bold ph-lg"></i> {{ $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 && !readonly" inline class="button" danger @click="del"><i class="ph-trash-bold ph-lg"></i> {{ $ts.delete }}</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> {{ i18n.ts.save }}</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> {{ i18n.ts.delete }}</MkButton>
|
||||
</div>
|
||||
|
||||
<div v-if="tab === 'settings'">
|
||||
<div class="_formRoot">
|
||||
<MkInput v-model="title" class="_formBlock">
|
||||
<template #label>{{ $ts._pages.title }}</template>
|
||||
<template #label>{{ i18n.ts._pages.title }}</template>
|
||||
</MkInput>
|
||||
|
||||
<MkInput v-model="summary" class="_formBlock">
|
||||
<template #label>{{ $ts._pages.summary }}</template>
|
||||
<template #label>{{ i18n.ts._pages.summary }}</template>
|
||||
</MkInput>
|
||||
|
||||
<MkInput v-model="name" class="_formBlock">
|
||||
<template #prefix>{{ url }}/@{{ author.username }}/pages/</template>
|
||||
<template #label>{{ $ts._pages.url }}</template>
|
||||
<template #label>{{ i18n.ts._pages.url }}</template>
|
||||
</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">
|
||||
<template #label>{{ $ts._pages.font }}</template>
|
||||
<option value="serif">{{ $ts._pages.fontSerif }}</option>
|
||||
<option value="sans-serif">{{ $ts._pages.fontSansSerif }}</option>
|
||||
<template #label>{{ i18n.ts._pages.font }}</template>
|
||||
<option value="serif">{{ i18n.ts._pages.fontSerif }}</option>
|
||||
<option value="sans-serif">{{ i18n.ts._pages.fontSansSerif }}</option>
|
||||
</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">
|
||||
<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">
|
||||
<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>
|
||||
|
@ -107,6 +107,8 @@ import { mainRouter } from '@/router';
|
|||
import { i18n } from '@/i18n';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata';
|
||||
import { $i } from '@/account';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
const XDraggable = defineAsyncComponent(() => import('vuedraggable').then(x => x.default));
|
||||
|
||||
const props = defineProps<{
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
</template>
|
||||
</I18n>
|
||||
</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>
|
||||
{{ 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>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<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>
|
||||
<button class="_button" @click="showMenu">
|
||||
<i class="ph-dots-three-outline-bold ph-lg"></i>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<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">
|
||||
<MkLoading v-if="fetching"/>
|
||||
<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"/>
|
||||
</MkA>
|
||||
</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>
|
||||
</MkContainer>
|
||||
</template>
|
||||
|
@ -27,6 +27,7 @@ import * as os from '@/os';
|
|||
import MkContainer from '@/components/MkContainer.vue';
|
||||
import ImgWithBlurhash from '@/components/MkImgWithBlurhash.vue';
|
||||
import { defaultStore } from '@/store';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
const props = defineProps<{
|
||||
user: misskey.entities.UserDetailed;
|
||||
|
|
|
@ -10,22 +10,22 @@
|
|||
</h1>
|
||||
<div class="about">
|
||||
<!-- 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 class="action">
|
||||
<MkButton class="signup" inline gradate @click="signup()">{{ $ts.signup }}</MkButton>
|
||||
<MkButton class="signin" inline @click="signin()">{{ $ts.login }}</MkButton>
|
||||
<MkButton class="signup" inline gradate @click="signup()">{{ i18n.ts.signup }}</MkButton>
|
||||
<MkButton class="signin" inline @click="signin()">{{ i18n.ts.login }}</MkButton>
|
||||
</div>
|
||||
<div v-if="onlineUsersCount && stats" class="status">
|
||||
<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>
|
||||
</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>
|
||||
</I18n>
|
||||
</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>
|
||||
</I18n>
|
||||
</div>
|
||||
|
@ -47,6 +47,7 @@ import XTimeline from './welcome.timeline.vue';
|
|||
import { host, instanceName } from '@/config';
|
||||
import * as os from '@/os';
|
||||
import number from '@/filters/number';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
|
@ -109,13 +110,13 @@ export default defineComponent({
|
|||
os.pageWindow('/about');
|
||||
}
|
||||
}, {
|
||||
text: this.$ts.aboutMisskey,
|
||||
text: this.i18n.ts.aboutMisskey,
|
||||
icon: 'ph-info-bold ph-lg',
|
||||
action: () => {
|
||||
os.pageWindow('/about-calckey');
|
||||
}
|
||||
}, null, {
|
||||
text: this.$ts.help,
|
||||
text: this.i18n.ts.help,
|
||||
icon: 'ph-question-bold ph-lg',
|
||||
action: () => {
|
||||
window.open(`https://misskey-hub.net/help.md`, '_blank');
|
||||
|
|
|
@ -22,22 +22,22 @@
|
|||
</h1>
|
||||
<div class="about">
|
||||
<!-- 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 class="action">
|
||||
<MkButton inline gradate @click="signup()">{{ $ts.signup }}</MkButton>
|
||||
<MkButton inline @click="signin()">{{ $ts.login }}</MkButton>
|
||||
<MkButton inline gradate @click="signup()">{{ i18n.ts.signup }}</MkButton>
|
||||
<MkButton inline @click="signin()">{{ i18n.ts.login }}</MkButton>
|
||||
</div>
|
||||
<div v-if="onlineUsersCount && stats" class="status">
|
||||
<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>
|
||||
</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>
|
||||
</I18n>
|
||||
</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>
|
||||
</I18n>
|
||||
</div>
|
||||
|
@ -45,10 +45,10 @@
|
|||
</div>
|
||||
</div>
|
||||
<nav class="nav">
|
||||
<MkA to="/announcements">{{ $ts.announcements }}</MkA>
|
||||
<MkA to="/explore">{{ $ts.explore }}</MkA>
|
||||
<MkA to="/channels">{{ $ts.channel }}</MkA>
|
||||
<MkA to="/featured">{{ $ts.featured }}</MkA>
|
||||
<MkA to="/announcements">{{ i18n.ts.announcements }}</MkA>
|
||||
<MkA to="/explore">{{ i18n.ts.explore }}</MkA>
|
||||
<MkA to="/channels">{{ i18n.ts.channel }}</MkA>
|
||||
<MkA to="/featured">{{ i18n.ts.featured }}</MkA>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -67,6 +67,7 @@ import XTimeline from './welcome.timeline.vue';
|
|||
import { host, instanceName } from '@/config';
|
||||
import * as os from '@/os';
|
||||
import number from '@/filters/number';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
|
@ -129,13 +130,13 @@ export default defineComponent({
|
|||
os.pageWindow('/about');
|
||||
}
|
||||
}, {
|
||||
text: this.$ts.aboutMisskey,
|
||||
text: this.i18n.ts.aboutMisskey,
|
||||
icon: 'ph-info-bold ph-lg',
|
||||
action: () => {
|
||||
os.pageWindow('/about-calckey');
|
||||
}
|
||||
}, null, {
|
||||
text: this.$ts.help,
|
||||
text: this.i18n.ts.help,
|
||||
icon: 'ph-question-bold ph-lg',
|
||||
action: () => {
|
||||
window.open(`https://misskey-hub.net/help.md`, '_blank');
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div class="azykntjl">
|
||||
<div class="body">
|
||||
<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>
|
||||
</MkA>
|
||||
<template v-for="item in menu">
|
||||
|
@ -13,7 +13,7 @@
|
|||
</component>
|
||||
</template>
|
||||
<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>
|
||||
</MkA>
|
||||
<button v-click-anime class="item _button" @click="more">
|
||||
|
@ -22,7 +22,7 @@
|
|||
</button>
|
||||
</div>
|
||||
<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>
|
||||
</MkA>
|
||||
<button v-click-anime class="item _button account" @click="openAccountMenu">
|
||||
|
@ -46,6 +46,7 @@ import * as os from '@/os';
|
|||
import { navbarItemDef } from '@/navbar';
|
||||
import { openAccountMenu } from '@/account';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
</button>
|
||||
<div class="post" data-cy-open-post-form @click="post">
|
||||
<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>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<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>
|
||||
<template v-for="item in menu">
|
||||
<div v-if="item === '-'" class="divider"></div>
|
||||
|
@ -21,14 +21,14 @@
|
|||
</template>
|
||||
<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">
|
||||
<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>
|
||||
<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>
|
||||
</button>
|
||||
<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>
|
||||
<div class="divider"></div>
|
||||
<div class="about">
|
||||
|
@ -50,6 +50,7 @@ import { openAccountMenu } from '@/account';
|
|||
import MkButton from '@/components/MkButton.vue';
|
||||
import { StickySidebar } from '@/scripts/sticky-sidebar';
|
||||
//import MisskeyLogo from '@assets/client/misskey.svg';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
export default defineComponent({
|
||||
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"/>
|
||||
<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-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-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> {{ i18n.ts.editWidgets }}</button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, defineAsyncComponent } from 'vue';
|
||||
import XWidgets from '@/components/MkWidgets.vue';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
export default defineComponent({
|
||||
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>
|
||||
<div v-if="meta" class="about">
|
||||
<!-- 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 class="action">
|
||||
<button class="_button primary" @click="signup()">{{ $ts.signup }}</button>
|
||||
<button class="_button" @click="signin()">{{ $ts.login }}</button>
|
||||
<button class="_button primary" @click="signup()">{{ i18n.ts.signup }}</button>
|
||||
<button class="_button" @click="signin()">{{ i18n.ts.login }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -46,6 +46,7 @@ import MkPagination from '@/components/MkPagination.vue';
|
|||
import MkButton from '@/components/MkButton.vue';
|
||||
import { ColdDeviceStorage } from '@/store';
|
||||
import { mainRouter } from '@/router';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
const DESKTOP_THRESHOLD = 1100;
|
||||
|
||||
|
|
|
@ -30,15 +30,14 @@
|
|||
|
||||
<transition :name="$store.state.animation ? 'tray' : ''">
|
||||
<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 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>{{ $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="/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>{{ $ts.gallery }}</MkA>
|
||||
<MkA to="/" class="link" active-class="active"><i class="ph-house-bold ph-lg icon"></i>{{ i18n.ts.home }}</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>{{ i18n.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="/gallery" class="link" active-class="active"><i class="ph-image-square-bold ph-lg icon"></i>{{ i18n.ts.gallery }}</MkA>
|
||||
<div class="action">
|
||||
<button class="_buttonPrimary" @click="signup()">{{ $ts.signup }}</button>
|
||||
<button class="_button" @click="signin()">{{ $ts.login }}</button>
|
||||
<button class="_buttonPrimary" @click="signup()">{{ i18n.ts.signup }}</button>
|
||||
<button class="_button" @click="signin()">{{ i18n.ts.login }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
|
@ -60,6 +59,7 @@ import MkButton from '@/components/MkButton.vue';
|
|||
import { ColdDeviceStorage, defaultStore } from '@/store';
|
||||
import { mainRouter } from '@/router';
|
||||
import { PageMetadata, provideMetadataReceiver, setPageMetadata } from '@/scripts/page-metadata';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
const DESKTOP_THRESHOLD = 1000;
|
||||
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
<div class="sqxihjet">
|
||||
<div v-if="narrow === false" class="wide">
|
||||
<div class="content">
|
||||
<MkA to="/" class="link" active-class="active"><i class="ph-house-bold ph-lg icon"></i>{{ $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>{{ $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="/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>{{ $ts.gallery }}</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>{{ i18n.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="/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>{{ i18n.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>
|
||||
<div v-if="info" class="page active link">
|
||||
<div class="title">
|
||||
<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>
|
||||
</div>
|
||||
<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="_buttonPrimary signup" @click="signup()">{{ $ts.signup }}</button>
|
||||
<button class="_button login" @click="signin()">{{ $ts.login }}</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()">{{ i18n.ts.signup }}</button>
|
||||
<button class="_button login" @click="signin()">{{ i18n.ts.login }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -48,6 +48,7 @@ import XSignupDialog from '@/components/MkSignupDialog.vue';
|
|||
import * as os from '@/os';
|
||||
import { instance } from '@/instance';
|
||||
import { search } from '@/scripts/search';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
export default defineComponent({
|
||||
props: {
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
</h1>
|
||||
<template v-if="full">
|
||||
<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 class="action">
|
||||
<button class="_buttonPrimary" @click="signup()">{{ $ts.signup }}</button>
|
||||
<button class="_button" @click="signin()">{{ $ts.login }}</button>
|
||||
<button class="_buttonPrimary" @click="signup()">{{ i18n.ts.signup }}</button>
|
||||
<button class="_button" @click="signin()">{{ i18n.ts.login }}</button>
|
||||
</div>
|
||||
<div class="announcements panel">
|
||||
<header>{{ $ts.announcements }}</header>
|
||||
<header>{{ i18n.ts.announcements }}</header>
|
||||
<MkPagination v-slot="{items}" :pagination="announcements" class="list">
|
||||
<section v-for="announcement in items" :key="announcement.id" class="item">
|
||||
<div class="title">{{ announcement.title }}</div>
|
||||
|
@ -33,7 +33,7 @@
|
|||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -45,6 +45,7 @@ import MkPagination from '@/components/MkPagination.vue';
|
|||
import XSigninDialog from '@/components/MkSigninDialog.vue';
|
||||
import XSignupDialog from '@/components/MkSignupDialog.vue';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
|
|
Loading…
Reference in a new issue