refactor(client): i18n.locale -> i18n.ts
This commit is contained in:
parent
6ebab5f577
commit
57ec04d9ec
74 changed files with 424 additions and 424 deletions
|
|
@ -3,15 +3,15 @@
|
|||
<transition :name="$store.state.animation ? 'zoom' : ''" appear>
|
||||
<div v-show="loaded" class="mjndxjch">
|
||||
<img src="https://xn--931a.moe/assets/error.jpg" class="_ghost"/>
|
||||
<p><b><i class="fas fa-exclamation-triangle"></i> {{ i18n.locale.pageLoadError }}</b></p>
|
||||
<p v-if="meta && (version === meta.version)">{{ i18n.locale.pageLoadErrorDescription }}</p>
|
||||
<p v-else-if="serverIsDead">{{ i18n.locale.serverIsDead }}</p>
|
||||
<p><b><i class="fas fa-exclamation-triangle"></i> {{ i18n.ts.pageLoadError }}</b></p>
|
||||
<p v-if="meta && (version === meta.version)">{{ i18n.ts.pageLoadErrorDescription }}</p>
|
||||
<p v-else-if="serverIsDead">{{ i18n.ts.serverIsDead }}</p>
|
||||
<template v-else>
|
||||
<p>{{ i18n.locale.newVersionOfClientAvailable }}</p>
|
||||
<p>{{ i18n.locale.youShouldUpgradeClient }}</p>
|
||||
<MkButton class="button primary" @click="reload">{{ i18n.locale.reload }}</MkButton>
|
||||
<p>{{ i18n.ts.newVersionOfClientAvailable }}</p>
|
||||
<p>{{ i18n.ts.youShouldUpgradeClient }}</p>
|
||||
<MkButton class="button primary" @click="reload">{{ i18n.ts.reload }}</MkButton>
|
||||
</template>
|
||||
<p><MkA to="/docs/general/troubleshooting" class="_link">{{ i18n.locale.troubleshooting }}</MkA></p>
|
||||
<p><MkA to="/docs/general/troubleshooting" class="_link">{{ i18n.ts.troubleshooting }}</MkA></p>
|
||||
<p v-if="error" class="error">ERROR: {{ error }}</p>
|
||||
</div>
|
||||
</transition>
|
||||
|
|
@ -54,7 +54,7 @@ function reload() {
|
|||
|
||||
defineExpose({
|
||||
[symbols.PAGE_INFO]: {
|
||||
title: i18n.locale.error,
|
||||
title: i18n.ts.error,
|
||||
icon: 'fas fa-exclamation-triangle',
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<span v-for="emoji in easterEggEmojis" :key="emoji.id" class="emoji" :data-physics-x="emoji.left" :data-physics-y="emoji.top" :class="{ _physics_circle_: !emoji.emoji.startsWith(':') }"><MkEmoji class="emoji" :emoji="emoji.emoji" :custom-emojis="$instance.emojis" :is-reaction="false" :normal="true" :no-style="true"/></span>
|
||||
</div>
|
||||
<div class="_formBlock" style="text-align: center;">
|
||||
{{ i18n.locale._aboutMisskey.about }}<br><a href="https://misskey-hub.net/docs/misskey.html" target="_blank" class="_link">{{ i18n.locale.learnMore }}</a>
|
||||
{{ i18n.ts._aboutMisskey.about }}<br><a href="https://misskey-hub.net/docs/misskey.html" target="_blank" class="_link">{{ i18n.ts.learnMore }}</a>
|
||||
</div>
|
||||
<div class="_formBlock" style="text-align: center;">
|
||||
<MkButton primary rounded inline @click="iLoveMisskey">I <Mfm text="$[jelly ❤]"/> #Misskey</MkButton>
|
||||
|
|
@ -19,23 +19,23 @@
|
|||
<div class="_formLinks">
|
||||
<FormLink to="https://github.com/misskey-dev/misskey" external>
|
||||
<template #icon><i class="fas fa-code"></i></template>
|
||||
{{ i18n.locale._aboutMisskey.source }}
|
||||
{{ i18n.ts._aboutMisskey.source }}
|
||||
<template #suffix>GitHub</template>
|
||||
</FormLink>
|
||||
<FormLink to="https://crowdin.com/project/misskey" external>
|
||||
<template #icon><i class="fas fa-language"></i></template>
|
||||
{{ i18n.locale._aboutMisskey.translation }}
|
||||
{{ i18n.ts._aboutMisskey.translation }}
|
||||
<template #suffix>Crowdin</template>
|
||||
</FormLink>
|
||||
<FormLink to="https://www.patreon.com/syuilo" external>
|
||||
<template #icon><i class="fas fa-hand-holding-medical"></i></template>
|
||||
{{ i18n.locale._aboutMisskey.donate }}
|
||||
{{ i18n.ts._aboutMisskey.donate }}
|
||||
<template #suffix>Patreon</template>
|
||||
</FormLink>
|
||||
</div>
|
||||
</FormSection>
|
||||
<FormSection>
|
||||
<template #label>{{ i18n.locale._aboutMisskey.contributors }}</template>
|
||||
<template #label>{{ i18n.ts._aboutMisskey.contributors }}</template>
|
||||
<div class="_formLinks">
|
||||
<FormLink to="https://github.com/syuilo" external>@syuilo</FormLink>
|
||||
<FormLink to="https://github.com/AyaMorisawa" external>@AyaMorisawa</FormLink>
|
||||
|
|
@ -47,12 +47,12 @@
|
|||
<FormLink to="https://github.com/u1-liquid" external>@u1-liquid</FormLink>
|
||||
<FormLink to="https://github.com/marihachi" external>@marihachi</FormLink>
|
||||
</div>
|
||||
<template #caption><MkLink url="https://github.com/misskey-dev/misskey/graphs/contributors">{{ i18n.locale._aboutMisskey.allContributors }}</MkLink></template>
|
||||
<template #caption><MkLink url="https://github.com/misskey-dev/misskey/graphs/contributors">{{ i18n.ts._aboutMisskey.allContributors }}</MkLink></template>
|
||||
</FormSection>
|
||||
<FormSection>
|
||||
<template #label><Mfm text="$[jelly ❤]"/> {{ i18n.locale._aboutMisskey.patrons }}</template>
|
||||
<template #label><Mfm text="$[jelly ❤]"/> {{ i18n.ts._aboutMisskey.patrons }}</template>
|
||||
<div v-for="patron in patrons" :key="patron">{{ patron }}</div>
|
||||
<template #caption>{{ i18n.locale._aboutMisskey.morePatrons }}</template>
|
||||
<template #caption>{{ i18n.ts._aboutMisskey.morePatrons }}</template>
|
||||
</FormSection>
|
||||
</div>
|
||||
</MkSpacer>
|
||||
|
|
@ -194,7 +194,7 @@ onBeforeUnmount(() => {
|
|||
|
||||
defineExpose({
|
||||
[symbols.PAGE_INFO]: {
|
||||
title: i18n.locale.aboutMisskey,
|
||||
title: i18n.ts.aboutMisskey,
|
||||
icon: null,
|
||||
bg: 'var(--bg)',
|
||||
},
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ const initStats = () => os.api('stats', {
|
|||
|
||||
defineExpose({
|
||||
[symbols.PAGE_INFO]: {
|
||||
title: i18n.locale.instanceInfo,
|
||||
title: i18n.ts.instanceInfo,
|
||||
icon: 'fas fa-info-circle',
|
||||
bg: 'var(--bg)',
|
||||
},
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ const remoteMenu = (emoji, ev: MouseEvent) => {
|
|||
type: 'label',
|
||||
text: ':' + emoji.name + ':',
|
||||
}, {
|
||||
text: i18n.locale.import,
|
||||
text: i18n.ts.import,
|
||||
icon: 'fas fa-plus',
|
||||
action: () => { im(emoji) }
|
||||
}], ev.currentTarget || ev.target);
|
||||
|
|
@ -166,14 +166,14 @@ const remoteMenu = (emoji, ev: MouseEvent) => {
|
|||
const menu = (ev: MouseEvent) => {
|
||||
os.popupMenu([{
|
||||
icon: 'fas fa-download',
|
||||
text: i18n.locale.export,
|
||||
text: i18n.ts.export,
|
||||
action: async () => {
|
||||
os.api('export-custom-emojis', {
|
||||
})
|
||||
.then(() => {
|
||||
os.alert({
|
||||
type: 'info',
|
||||
text: i18n.locale.exportRequested,
|
||||
text: i18n.ts.exportRequested,
|
||||
});
|
||||
}).catch((e) => {
|
||||
os.alert({
|
||||
|
|
@ -184,7 +184,7 @@ const menu = (ev: MouseEvent) => {
|
|||
}
|
||||
}, {
|
||||
icon: 'fas fa-upload',
|
||||
text: i18n.locale.import,
|
||||
text: i18n.ts.import,
|
||||
action: async () => {
|
||||
const file = await selectFile(ev.currentTarget || ev.target);
|
||||
os.api('admin/emoji/import-zip', {
|
||||
|
|
@ -193,7 +193,7 @@ const menu = (ev: MouseEvent) => {
|
|||
.then(() => {
|
||||
os.alert({
|
||||
type: 'info',
|
||||
text: i18n.locale.importRequested,
|
||||
text: i18n.ts.importRequested,
|
||||
});
|
||||
}).catch((e) => {
|
||||
os.alert({
|
||||
|
|
@ -256,7 +256,7 @@ const setTagBulk = async () => {
|
|||
const delBulk = async () => {
|
||||
const { canceled } = await os.confirm({
|
||||
type: 'warning',
|
||||
text: i18n.locale.deleteConfirm,
|
||||
text: i18n.ts.deleteConfirm,
|
||||
});
|
||||
if (canceled) return;
|
||||
await os.apiWithDialog('admin/emoji/delete-bulk', {
|
||||
|
|
@ -267,13 +267,13 @@ const delBulk = async () => {
|
|||
|
||||
defineExpose({
|
||||
[symbols.PAGE_INFO]: computed(() => ({
|
||||
title: i18n.locale.customEmojis,
|
||||
title: i18n.ts.customEmojis,
|
||||
icon: 'fas fa-laugh',
|
||||
bg: 'var(--bg)',
|
||||
actions: [{
|
||||
asFullButton: true,
|
||||
icon: 'fas fa-plus',
|
||||
text: i18n.locale.addEmoji,
|
||||
text: i18n.ts.addEmoji,
|
||||
handler: add,
|
||||
}, {
|
||||
icon: 'fas fa-ellipsis-h',
|
||||
|
|
@ -281,11 +281,11 @@ defineExpose({
|
|||
}],
|
||||
tabs: [{
|
||||
active: tab.value === 'local',
|
||||
title: i18n.locale.local,
|
||||
title: i18n.ts.local,
|
||||
onClick: () => { tab.value = 'local'; },
|
||||
}, {
|
||||
active: tab.value === 'remote',
|
||||
title: i18n.locale.remote,
|
||||
title: i18n.ts.remote,
|
||||
onClick: () => { tab.value = 'remote'; },
|
||||
},]
|
||||
})),
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ export default defineComponent({
|
|||
|
||||
setup(props, context) {
|
||||
const indexInfo = {
|
||||
title: i18n.locale.controlPanel,
|
||||
title: i18n.ts.controlPanel,
|
||||
icon: 'fas fa-cog',
|
||||
bg: 'var(--bg)',
|
||||
hideHeader: true,
|
||||
|
|
@ -91,119 +91,119 @@ export default defineComponent({
|
|||
});
|
||||
|
||||
const menuDef = computed(() => [{
|
||||
title: i18n.locale.quickAction,
|
||||
title: i18n.ts.quickAction,
|
||||
items: [{
|
||||
type: 'button',
|
||||
icon: 'fas fa-search',
|
||||
text: i18n.locale.lookup,
|
||||
text: i18n.ts.lookup,
|
||||
action: lookup,
|
||||
}, ...(instance.disableRegistration ? [{
|
||||
type: 'button',
|
||||
icon: 'fas fa-user',
|
||||
text: i18n.locale.invite,
|
||||
text: i18n.ts.invite,
|
||||
action: invite,
|
||||
}] : [])],
|
||||
}, {
|
||||
title: i18n.locale.administration,
|
||||
title: i18n.ts.administration,
|
||||
items: [{
|
||||
icon: 'fas fa-tachometer-alt',
|
||||
text: i18n.locale.dashboard,
|
||||
text: i18n.ts.dashboard,
|
||||
to: '/admin/overview',
|
||||
active: page.value === 'overview',
|
||||
}, {
|
||||
icon: 'fas fa-users',
|
||||
text: i18n.locale.users,
|
||||
text: i18n.ts.users,
|
||||
to: '/admin/users',
|
||||
active: page.value === 'users',
|
||||
}, {
|
||||
icon: 'fas fa-laugh',
|
||||
text: i18n.locale.customEmojis,
|
||||
text: i18n.ts.customEmojis,
|
||||
to: '/admin/emojis',
|
||||
active: page.value === 'emojis',
|
||||
}, {
|
||||
icon: 'fas fa-globe',
|
||||
text: i18n.locale.federation,
|
||||
text: i18n.ts.federation,
|
||||
to: '/admin/federation',
|
||||
active: page.value === 'federation',
|
||||
}, {
|
||||
icon: 'fas fa-clipboard-list',
|
||||
text: i18n.locale.jobQueue,
|
||||
text: i18n.ts.jobQueue,
|
||||
to: '/admin/queue',
|
||||
active: page.value === 'queue',
|
||||
}, {
|
||||
icon: 'fas fa-cloud',
|
||||
text: i18n.locale.files,
|
||||
text: i18n.ts.files,
|
||||
to: '/admin/files',
|
||||
active: page.value === 'files',
|
||||
}, {
|
||||
icon: 'fas fa-broadcast-tower',
|
||||
text: i18n.locale.announcements,
|
||||
text: i18n.ts.announcements,
|
||||
to: '/admin/announcements',
|
||||
active: page.value === 'announcements',
|
||||
}, {
|
||||
icon: 'fas fa-audio-description',
|
||||
text: i18n.locale.ads,
|
||||
text: i18n.ts.ads,
|
||||
to: '/admin/ads',
|
||||
active: page.value === 'ads',
|
||||
}, {
|
||||
icon: 'fas fa-exclamation-circle',
|
||||
text: i18n.locale.abuseReports,
|
||||
text: i18n.ts.abuseReports,
|
||||
to: '/admin/abuses',
|
||||
active: page.value === 'abuses',
|
||||
}],
|
||||
}, {
|
||||
title: i18n.locale.settings,
|
||||
title: i18n.ts.settings,
|
||||
items: [{
|
||||
icon: 'fas fa-cog',
|
||||
text: i18n.locale.general,
|
||||
text: i18n.ts.general,
|
||||
to: '/admin/settings',
|
||||
active: page.value === 'settings',
|
||||
}, {
|
||||
icon: 'fas fa-envelope',
|
||||
text: i18n.locale.emailServer,
|
||||
text: i18n.ts.emailServer,
|
||||
to: '/admin/email-settings',
|
||||
active: page.value === 'email-settings',
|
||||
}, {
|
||||
icon: 'fas fa-cloud',
|
||||
text: i18n.locale.objectStorage,
|
||||
text: i18n.ts.objectStorage,
|
||||
to: '/admin/object-storage',
|
||||
active: page.value === 'object-storage',
|
||||
}, {
|
||||
icon: 'fas fa-lock',
|
||||
text: i18n.locale.security,
|
||||
text: i18n.ts.security,
|
||||
to: '/admin/security',
|
||||
active: page.value === 'security',
|
||||
}, {
|
||||
icon: 'fas fa-globe',
|
||||
text: i18n.locale.relays,
|
||||
text: i18n.ts.relays,
|
||||
to: '/admin/relays',
|
||||
active: page.value === 'relays',
|
||||
}, {
|
||||
icon: 'fas fa-share-alt',
|
||||
text: i18n.locale.integration,
|
||||
text: i18n.ts.integration,
|
||||
to: '/admin/integrations',
|
||||
active: page.value === 'integrations',
|
||||
}, {
|
||||
icon: 'fas fa-ban',
|
||||
text: i18n.locale.instanceBlocking,
|
||||
text: i18n.ts.instanceBlocking,
|
||||
to: '/admin/instance-block',
|
||||
active: page.value === 'instance-block',
|
||||
}, {
|
||||
icon: 'fas fa-ghost',
|
||||
text: i18n.locale.proxyAccount,
|
||||
text: i18n.ts.proxyAccount,
|
||||
to: '/admin/proxy-account',
|
||||
active: page.value === 'proxy-account',
|
||||
}, {
|
||||
icon: 'fas fa-cogs',
|
||||
text: i18n.locale.other,
|
||||
text: i18n.ts.other,
|
||||
to: '/admin/other-settings',
|
||||
active: page.value === 'other-settings',
|
||||
}],
|
||||
}, {
|
||||
title: i18n.locale.info,
|
||||
title: i18n.ts.info,
|
||||
items: [{
|
||||
icon: 'fas fa-database',
|
||||
text: i18n.locale.database,
|
||||
text: i18n.ts.database,
|
||||
to: '/admin/database',
|
||||
active: page.value === 'database',
|
||||
}],
|
||||
|
|
@ -275,25 +275,25 @@ export default defineComponent({
|
|||
|
||||
const lookup = (ev) => {
|
||||
os.popupMenu([{
|
||||
text: i18n.locale.user,
|
||||
text: i18n.ts.user,
|
||||
icon: 'fas fa-user',
|
||||
action: () => {
|
||||
lookupUser();
|
||||
}
|
||||
}, {
|
||||
text: i18n.locale.note,
|
||||
text: i18n.ts.note,
|
||||
icon: 'fas fa-pencil-alt',
|
||||
action: () => {
|
||||
alert('TODO');
|
||||
}
|
||||
}, {
|
||||
text: i18n.locale.file,
|
||||
text: i18n.ts.file,
|
||||
icon: 'fas fa-cloud',
|
||||
action: () => {
|
||||
alert('TODO');
|
||||
}
|
||||
}, {
|
||||
text: i18n.locale.instance,
|
||||
text: i18n.ts.instance,
|
||||
icon: 'fas fa-globe',
|
||||
action: () => {
|
||||
alert('TODO');
|
||||
|
|
@ -305,7 +305,7 @@ export default defineComponent({
|
|||
[symbols.PAGE_INFO]: INFO,
|
||||
menuDef,
|
||||
header: {
|
||||
title: i18n.locale.controlPanel,
|
||||
title: i18n.ts.controlPanel,
|
||||
},
|
||||
noMaintainerInformation,
|
||||
noBotProtection,
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ let folder = $ref(null);
|
|||
|
||||
defineExpose({
|
||||
[symbols.PAGE_INFO]: computed(() => ({
|
||||
title: folder ? folder.name : i18n.locale.drive,
|
||||
title: folder ? folder.name : i18n.ts.drive,
|
||||
icon: 'fas fa-cloud',
|
||||
bg: 'var(--bg)',
|
||||
hideHeader: true,
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ function menu(ev) {
|
|||
type: 'label',
|
||||
text: ':' + props.emoji.name + ':',
|
||||
}, {
|
||||
text: i18n.locale.copy,
|
||||
text: i18n.ts.copy,
|
||||
icon: 'fas fa-copy',
|
||||
action: () => {
|
||||
copyToClipboard(`:${props.emoji.name}:`);
|
||||
|
|
|
|||
|
|
@ -16,14 +16,14 @@ const tab = ref('category');
|
|||
function menu(ev) {
|
||||
os.popupMenu([{
|
||||
icon: 'fas fa-download',
|
||||
text: i18n.locale.export,
|
||||
text: i18n.ts.export,
|
||||
action: async () => {
|
||||
os.api('export-custom-emojis', {
|
||||
})
|
||||
.then(() => {
|
||||
os.alert({
|
||||
type: 'info',
|
||||
text: i18n.locale.exportRequested,
|
||||
text: i18n.ts.exportRequested,
|
||||
});
|
||||
}).catch((e) => {
|
||||
os.alert({
|
||||
|
|
@ -37,7 +37,7 @@ function menu(ev) {
|
|||
|
||||
defineExpose({
|
||||
[symbols.PAGE_INFO]: {
|
||||
title: i18n.locale.customEmojis,
|
||||
title: i18n.ts.customEmojis,
|
||||
icon: 'fas fa-laugh',
|
||||
bg: 'var(--bg)',
|
||||
actions: [{
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ const pagingComponent = ref<InstanceType<typeof MkPagination>>();
|
|||
|
||||
defineExpose({
|
||||
[symbols.PAGE_INFO]: {
|
||||
title: i18n.locale.favorites,
|
||||
title: i18n.ts.favorites,
|
||||
icon: 'fas fa-star',
|
||||
bg: 'var(--bg)',
|
||||
},
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ const pagination = {
|
|||
|
||||
defineExpose({
|
||||
[symbols.PAGE_INFO]: {
|
||||
title: i18n.locale.featured,
|
||||
title: i18n.ts.featured,
|
||||
icon: 'fas fa-fire-alt',
|
||||
bg: 'var(--bg)',
|
||||
},
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ function getStatus(instance) {
|
|||
|
||||
defineExpose({
|
||||
[symbols.PAGE_INFO]: {
|
||||
title: i18n.locale.federation,
|
||||
title: i18n.ts.federation,
|
||||
icon: 'fas fa-globe',
|
||||
bg: 'var(--bg)',
|
||||
},
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ function reject(user) {
|
|||
|
||||
defineExpose({
|
||||
[symbols.PAGE_INFO]: computed(() => ({
|
||||
title: i18n.locale.followRequests,
|
||||
title: i18n.ts.followRequests,
|
||||
icon: 'fas fa-user-clock',
|
||||
bg: 'var(--bg)',
|
||||
})),
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ const pagination = {
|
|||
|
||||
defineExpose({
|
||||
[symbols.PAGE_INFO]: {
|
||||
title: i18n.locale.mentions,
|
||||
title: i18n.ts.mentions,
|
||||
icon: 'fas fa-at',
|
||||
bg: 'var(--bg)',
|
||||
},
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ const pagination = {
|
|||
|
||||
defineExpose({
|
||||
[symbols.PAGE_INFO]: {
|
||||
title: i18n.locale.directNotes,
|
||||
title: i18n.ts.directNotes,
|
||||
icon: 'fas fa-envelope',
|
||||
bg: 'var(--bg)',
|
||||
},
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ function onAntennaCreated() {
|
|||
|
||||
defineExpose({
|
||||
[symbols.PAGE_INFO]: {
|
||||
title: i18n.locale.manageAntennas,
|
||||
title: i18n.ts.manageAntennas,
|
||||
icon: 'fas fa-satellite',
|
||||
bg: 'var(--bg)',
|
||||
},
|
||||
|
|
|
|||
|
|
@ -29,20 +29,20 @@ const pagination = {
|
|||
const pagingComponent = $ref<InstanceType<typeof MkPagination>>();
|
||||
|
||||
async function create() {
|
||||
const { canceled, result } = await os.form(i18n.locale.createNewClip, {
|
||||
const { canceled, result } = await os.form(i18n.ts.createNewClip, {
|
||||
name: {
|
||||
type: 'string',
|
||||
label: i18n.locale.name,
|
||||
label: i18n.ts.name,
|
||||
},
|
||||
description: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
multiline: true,
|
||||
label: i18n.locale.description,
|
||||
label: i18n.ts.description,
|
||||
},
|
||||
isPublic: {
|
||||
type: 'boolean',
|
||||
label: i18n.locale.public,
|
||||
label: i18n.ts.public,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
|
|
@ -63,7 +63,7 @@ function onClipDeleted() {
|
|||
|
||||
defineExpose({
|
||||
[symbols.PAGE_INFO]: {
|
||||
title: i18n.locale.clip,
|
||||
title: i18n.ts.clip,
|
||||
icon: 'fas fa-paperclip',
|
||||
bg: 'var(--bg)',
|
||||
action: {
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ const pagination = {
|
|||
|
||||
async function create() {
|
||||
const { canceled, result: name } = await os.inputText({
|
||||
title: i18n.locale.enterListName,
|
||||
title: i18n.ts.enterListName,
|
||||
});
|
||||
if (canceled) return;
|
||||
await os.apiWithDialog('users/lists/create', { name: name });
|
||||
|
|
@ -40,7 +40,7 @@ async function create() {
|
|||
|
||||
defineExpose({
|
||||
[symbols.PAGE_INFO]: {
|
||||
title: i18n.locale.manageLists,
|
||||
title: i18n.ts.manageLists,
|
||||
icon: 'fas fa-list-ul',
|
||||
bg: 'var(--bg)',
|
||||
action: {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import { i18n } from '@/i18n';
|
|||
|
||||
defineExpose({
|
||||
[symbols.PAGE_INFO]: {
|
||||
title: i18n.locale.notFound,
|
||||
title: i18n.ts.notFound,
|
||||
icon: 'fas fa-exclamation-triangle',
|
||||
bg: 'var(--bg)',
|
||||
},
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ function setFilter(ev) {
|
|||
}));
|
||||
const items = includeTypes != null ? [{
|
||||
icon: 'fas fa-times',
|
||||
text: i18n.locale.clear,
|
||||
text: i18n.ts.clear,
|
||||
action: () => {
|
||||
includeTypes = null;
|
||||
}
|
||||
|
|
@ -37,16 +37,16 @@ function setFilter(ev) {
|
|||
|
||||
defineExpose({
|
||||
[symbols.PAGE_INFO]: computed(() => ({
|
||||
title: i18n.locale.notifications,
|
||||
title: i18n.ts.notifications,
|
||||
icon: 'fas fa-bell',
|
||||
bg: 'var(--bg)',
|
||||
actions: [{
|
||||
text: i18n.locale.filter,
|
||||
text: i18n.ts.filter,
|
||||
icon: 'fas fa-filter',
|
||||
highlighted: includeTypes != null,
|
||||
handler: setFilter,
|
||||
}, {
|
||||
text: i18n.locale.markAllAsRead,
|
||||
text: i18n.ts.markAllAsRead,
|
||||
icon: 'fas fa-check',
|
||||
handler: () => {
|
||||
os.apiWithDialog('notifications/mark-all-as-read');
|
||||
|
|
@ -54,11 +54,11 @@ defineExpose({
|
|||
}],
|
||||
tabs: [{
|
||||
active: tab === 'all',
|
||||
title: i18n.locale.all,
|
||||
title: i18n.ts.all,
|
||||
onClick: () => { tab = 'all'; },
|
||||
}, {
|
||||
active: tab === 'unread',
|
||||
title: i18n.locale.unread,
|
||||
title: i18n.ts.unread,
|
||||
onClick: () => { tab = 'unread'; },
|
||||
},]
|
||||
})),
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import { i18n } from '@/i18n';
|
|||
|
||||
defineExpose({
|
||||
[symbols.PAGE_INFO]: computed(() => ({
|
||||
title: i18n.locale.preview,
|
||||
title: i18n.ts.preview,
|
||||
icon: 'fas fa-eye',
|
||||
bg: 'var(--bg)',
|
||||
})),
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@
|
|||
<div class="_formRoot">
|
||||
<FormInput v-model="password" type="password" class="_formBlock">
|
||||
<template #prefix><i class="fas fa-lock"></i></template>
|
||||
<template #label>{{ i18n.locale.newPassword }}</template>
|
||||
<template #label>{{ i18n.ts.newPassword }}</template>
|
||||
</FormInput>
|
||||
|
||||
<FormButton primary class="_formBlock" @click="save">{{ i18n.locale.save }}</FormButton>
|
||||
<FormButton primary class="_formBlock" @click="save">{{ i18n.ts.save }}</FormButton>
|
||||
</div>
|
||||
</MkSpacer>
|
||||
</template>
|
||||
|
|
@ -43,7 +43,7 @@ onMounted(() => {
|
|||
|
||||
defineExpose({
|
||||
[symbols.PAGE_INFO]: {
|
||||
title: i18n.locale.resetPassword,
|
||||
title: i18n.ts.resetPassword,
|
||||
icon: 'fas fa-lock',
|
||||
bg: 'var(--bg)',
|
||||
},
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ export default defineComponent({
|
|||
const emailAddress = ref($i.email);
|
||||
|
||||
const INFO = {
|
||||
title: i18n.locale.email,
|
||||
title: i18n.ts.email,
|
||||
icon: 'fas fa-envelope',
|
||||
bg: 'var(--bg)',
|
||||
};
|
||||
|
|
@ -75,7 +75,7 @@ export default defineComponent({
|
|||
|
||||
const saveEmailAddress = () => {
|
||||
os.inputText({
|
||||
title: i18n.locale.password,
|
||||
title: i18n.ts.password,
|
||||
type: 'password'
|
||||
}).then(({ canceled, result: password }) => {
|
||||
if (canceled) return;
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ export default defineComponent({
|
|||
|
||||
setup(props, context) {
|
||||
const INFO = {
|
||||
title: i18n.locale.importAndExport,
|
||||
title: i18n.ts.importAndExport,
|
||||
icon: 'fas fa-boxes',
|
||||
bg: 'var(--bg)',
|
||||
};
|
||||
|
|
@ -71,14 +71,14 @@ export default defineComponent({
|
|||
const onExportSuccess = () => {
|
||||
os.alert({
|
||||
type: 'info',
|
||||
text: i18n.locale.exportRequested,
|
||||
text: i18n.ts.exportRequested,
|
||||
});
|
||||
};
|
||||
|
||||
const onImportSuccess = () => {
|
||||
os.alert({
|
||||
type: 'info',
|
||||
text: i18n.locale.importRequested,
|
||||
text: i18n.ts.importRequested,
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ export default defineComponent({
|
|||
|
||||
setup(props, context) {
|
||||
const indexInfo = {
|
||||
title: i18n.locale.settings,
|
||||
title: i18n.ts.settings,
|
||||
icon: 'fas fa-cog',
|
||||
bg: 'var(--bg)',
|
||||
hideHeader: true,
|
||||
|
|
@ -61,96 +61,96 @@ export default defineComponent({
|
|||
const el = ref(null);
|
||||
const childInfo = ref(null);
|
||||
const menuDef = computed(() => [{
|
||||
title: i18n.locale.basicSettings,
|
||||
title: i18n.ts.basicSettings,
|
||||
items: [{
|
||||
icon: 'fas fa-user',
|
||||
text: i18n.locale.profile,
|
||||
text: i18n.ts.profile,
|
||||
to: '/settings/profile',
|
||||
active: page.value === 'profile',
|
||||
}, {
|
||||
icon: 'fas fa-lock-open',
|
||||
text: i18n.locale.privacy,
|
||||
text: i18n.ts.privacy,
|
||||
to: '/settings/privacy',
|
||||
active: page.value === 'privacy',
|
||||
}, {
|
||||
icon: 'fas fa-laugh',
|
||||
text: i18n.locale.reaction,
|
||||
text: i18n.ts.reaction,
|
||||
to: '/settings/reaction',
|
||||
active: page.value === 'reaction',
|
||||
}, {
|
||||
icon: 'fas fa-cloud',
|
||||
text: i18n.locale.drive,
|
||||
text: i18n.ts.drive,
|
||||
to: '/settings/drive',
|
||||
active: page.value === 'drive',
|
||||
}, {
|
||||
icon: 'fas fa-bell',
|
||||
text: i18n.locale.notifications,
|
||||
text: i18n.ts.notifications,
|
||||
to: '/settings/notifications',
|
||||
active: page.value === 'notifications',
|
||||
}, {
|
||||
icon: 'fas fa-envelope',
|
||||
text: i18n.locale.email,
|
||||
text: i18n.ts.email,
|
||||
to: '/settings/email',
|
||||
active: page.value === 'email',
|
||||
}, {
|
||||
icon: 'fas fa-share-alt',
|
||||
text: i18n.locale.integration,
|
||||
text: i18n.ts.integration,
|
||||
to: '/settings/integration',
|
||||
active: page.value === 'integration',
|
||||
}, {
|
||||
icon: 'fas fa-lock',
|
||||
text: i18n.locale.security,
|
||||
text: i18n.ts.security,
|
||||
to: '/settings/security',
|
||||
active: page.value === 'security',
|
||||
}],
|
||||
}, {
|
||||
title: i18n.locale.clientSettings,
|
||||
title: i18n.ts.clientSettings,
|
||||
items: [{
|
||||
icon: 'fas fa-cogs',
|
||||
text: i18n.locale.general,
|
||||
text: i18n.ts.general,
|
||||
to: '/settings/general',
|
||||
active: page.value === 'general',
|
||||
}, {
|
||||
icon: 'fas fa-palette',
|
||||
text: i18n.locale.theme,
|
||||
text: i18n.ts.theme,
|
||||
to: '/settings/theme',
|
||||
active: page.value === 'theme',
|
||||
}, {
|
||||
icon: 'fas fa-list-ul',
|
||||
text: i18n.locale.menu,
|
||||
text: i18n.ts.menu,
|
||||
to: '/settings/menu',
|
||||
active: page.value === 'menu',
|
||||
}, {
|
||||
icon: 'fas fa-music',
|
||||
text: i18n.locale.sounds,
|
||||
text: i18n.ts.sounds,
|
||||
to: '/settings/sounds',
|
||||
active: page.value === 'sounds',
|
||||
}, {
|
||||
icon: 'fas fa-plug',
|
||||
text: i18n.locale.plugins,
|
||||
text: i18n.ts.plugins,
|
||||
to: '/settings/plugin',
|
||||
active: page.value === 'plugin',
|
||||
}],
|
||||
}, {
|
||||
title: i18n.locale.otherSettings,
|
||||
title: i18n.ts.otherSettings,
|
||||
items: [{
|
||||
icon: 'fas fa-boxes',
|
||||
text: i18n.locale.importAndExport,
|
||||
text: i18n.ts.importAndExport,
|
||||
to: '/settings/import-export',
|
||||
active: page.value === 'import-export',
|
||||
}, {
|
||||
icon: 'fas fa-volume-mute',
|
||||
text: i18n.locale.instanceMute,
|
||||
text: i18n.ts.instanceMute,
|
||||
to: '/settings/instance-mute',
|
||||
active: page.value === 'instance-mute',
|
||||
}, {
|
||||
icon: 'fas fa-ban',
|
||||
text: i18n.locale.muteAndBlock,
|
||||
text: i18n.ts.muteAndBlock,
|
||||
to: '/settings/mute-block',
|
||||
active: page.value === 'mute-block',
|
||||
}, {
|
||||
icon: 'fas fa-comment-slash',
|
||||
text: i18n.locale.wordMute,
|
||||
text: i18n.ts.wordMute,
|
||||
to: '/settings/word-mute',
|
||||
active: page.value === 'word-mute',
|
||||
}, {
|
||||
|
|
@ -160,7 +160,7 @@ export default defineComponent({
|
|||
active: page.value === 'api',
|
||||
}, {
|
||||
icon: 'fas fa-ellipsis-h',
|
||||
text: i18n.locale.other,
|
||||
text: i18n.ts.other,
|
||||
to: '/settings/other',
|
||||
active: page.value === 'other',
|
||||
}],
|
||||
|
|
@ -168,7 +168,7 @@ export default defineComponent({
|
|||
items: [{
|
||||
type: 'button',
|
||||
icon: 'fas fa-trash',
|
||||
text: i18n.locale.clearCache,
|
||||
text: i18n.ts.clearCache,
|
||||
action: () => {
|
||||
localStorage.removeItem('locale');
|
||||
localStorage.removeItem('theme');
|
||||
|
|
@ -177,7 +177,7 @@ export default defineComponent({
|
|||
}, {
|
||||
type: 'button',
|
||||
icon: 'fas fa-sign-in-alt fa-flip-horizontal',
|
||||
text: i18n.locale.logout,
|
||||
text: i18n.ts.logout,
|
||||
action: () => {
|
||||
signout();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ const blockingPagination = {
|
|||
|
||||
defineExpose({
|
||||
[symbols.PAGE_INFO]: {
|
||||
title: i18n.locale.muteAndBlock,
|
||||
title: i18n.ts.muteAndBlock,
|
||||
icon: 'fas fa-ban',
|
||||
bg: 'var(--bg)',
|
||||
},
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ function save() {
|
|||
|
||||
defineExpose({
|
||||
[symbols.PAGE_INFO]: {
|
||||
title: i18n.locale.privacy,
|
||||
title: i18n.ts.privacy,
|
||||
icon: 'fas fa-lock-open',
|
||||
bg: 'var(--bg)',
|
||||
},
|
||||
|
|
|
|||
|
|
@ -3,45 +3,45 @@
|
|||
<div class="llvierxe" :style="{ backgroundImage: $i.bannerUrl ? `url(${ $i.bannerUrl })` : null }">
|
||||
<div class="avatar _acrylic">
|
||||
<MkAvatar class="avatar" :user="$i" :disable-link="true" @click="changeAvatar"/>
|
||||
<MkButton primary class="avatarEdit" @click="changeAvatar">{{ i18n.locale._profile.changeAvatar }}</MkButton>
|
||||
<MkButton primary class="avatarEdit" @click="changeAvatar">{{ i18n.ts._profile.changeAvatar }}</MkButton>
|
||||
</div>
|
||||
<MkButton primary class="bannerEdit" @click="changeBanner">{{ i18n.locale._profile.changeBanner }}</MkButton>
|
||||
<MkButton primary class="bannerEdit" @click="changeBanner">{{ i18n.ts._profile.changeBanner }}</MkButton>
|
||||
</div>
|
||||
|
||||
<FormInput v-model="profile.name" :max="30" manual-save class="_formBlock">
|
||||
<template #label>{{ i18n.locale._profile.name }}</template>
|
||||
<template #label>{{ i18n.ts._profile.name }}</template>
|
||||
</FormInput>
|
||||
|
||||
<FormTextarea v-model="profile.description" :max="500" tall manual-save class="_formBlock">
|
||||
<template #label>{{ i18n.locale._profile.description }}</template>
|
||||
<template #caption>{{ i18n.locale._profile.youCanIncludeHashtags }}</template>
|
||||
<template #label>{{ i18n.ts._profile.description }}</template>
|
||||
<template #caption>{{ i18n.ts._profile.youCanIncludeHashtags }}</template>
|
||||
</FormTextarea>
|
||||
|
||||
<FormInput v-model="profile.location" manual-save class="_formBlock">
|
||||
<template #label>{{ i18n.locale.location }}</template>
|
||||
<template #label>{{ i18n.ts.location }}</template>
|
||||
<template #prefix><i class="fas fa-map-marker-alt"></i></template>
|
||||
</FormInput>
|
||||
|
||||
<FormInput v-model="profile.birthday" type="date" manual-save class="_formBlock">
|
||||
<template #label>{{ i18n.locale.birthday }}</template>
|
||||
<template #label>{{ i18n.ts.birthday }}</template>
|
||||
<template #prefix><i class="fas fa-birthday-cake"></i></template>
|
||||
</FormInput>
|
||||
|
||||
<FormSelect v-model="profile.lang" class="_formBlock">
|
||||
<template #label>{{ i18n.locale.language }}</template>
|
||||
<template #label>{{ i18n.ts.language }}</template>
|
||||
<option v-for="x in langs" :key="x[0]" :value="x[0]">{{ x[1] }}</option>
|
||||
</FormSelect>
|
||||
|
||||
<FormSlot>
|
||||
<MkButton @click="editMetadata">{{ i18n.locale._profile.metadataEdit }}</MkButton>
|
||||
<template #caption>{{ i18n.locale._profile.metadataDescription }}</template>
|
||||
<MkButton @click="editMetadata">{{ i18n.ts._profile.metadataEdit }}</MkButton>
|
||||
<template #caption>{{ i18n.ts._profile.metadataDescription }}</template>
|
||||
</FormSlot>
|
||||
|
||||
<FormSwitch v-model="profile.isCat" class="_formBlock">{{ i18n.locale.flagAsCat }}<template #caption>{{ i18n.locale.flagAsCatDescription }}</template></FormSwitch>
|
||||
<FormSwitch v-model="profile.isCat" class="_formBlock">{{ i18n.ts.flagAsCat }}<template #caption>{{ i18n.ts.flagAsCatDescription }}</template></FormSwitch>
|
||||
|
||||
<FormSwitch v-model="profile.isBot" class="_formBlock">{{ i18n.locale.flagAsBot }}<template #caption>{{ i18n.locale.flagAsBotDescription }}</template></FormSwitch>
|
||||
<FormSwitch v-model="profile.isBot" class="_formBlock">{{ i18n.ts.flagAsBot }}<template #caption>{{ i18n.ts.flagAsBotDescription }}</template></FormSwitch>
|
||||
|
||||
<FormSwitch v-model="profile.alwaysMarkNsfw" class="_formBlock">{{ i18n.locale.alwaysMarkSensitive }}</FormSwitch>
|
||||
<FormSwitch v-model="profile.alwaysMarkNsfw" class="_formBlock">{{ i18n.ts.alwaysMarkSensitive }}</FormSwitch>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -102,7 +102,7 @@ function save() {
|
|||
}
|
||||
|
||||
function changeAvatar(ev) {
|
||||
selectFile(ev.currentTarget || ev.target, i18n.locale.avatar).then(async (file) => {
|
||||
selectFile(ev.currentTarget || ev.target, i18n.ts.avatar).then(async (file) => {
|
||||
const i = await os.apiWithDialog('i/update', {
|
||||
avatarId: file.id,
|
||||
});
|
||||
|
|
@ -112,7 +112,7 @@ function changeAvatar(ev) {
|
|||
}
|
||||
|
||||
function changeBanner(ev) {
|
||||
selectFile(ev.currentTarget || ev.target, i18n.locale.banner).then(async (file) => {
|
||||
selectFile(ev.currentTarget || ev.target, i18n.ts.banner).then(async (file) => {
|
||||
const i = await os.apiWithDialog('i/update', {
|
||||
bannerId: file.id,
|
||||
});
|
||||
|
|
@ -122,45 +122,45 @@ function changeBanner(ev) {
|
|||
}
|
||||
|
||||
async function editMetadata() {
|
||||
const { canceled, result } = await os.form(i18n.locale._profile.metadata, {
|
||||
const { canceled, result } = await os.form(i18n.ts._profile.metadata, {
|
||||
fieldName0: {
|
||||
type: 'string',
|
||||
label: i18n.locale._profile.metadataLabel + ' 1',
|
||||
label: i18n.ts._profile.metadataLabel + ' 1',
|
||||
default: additionalFields.fieldName0,
|
||||
},
|
||||
fieldValue0: {
|
||||
type: 'string',
|
||||
label: i18n.locale._profile.metadataContent + ' 1',
|
||||
label: i18n.ts._profile.metadataContent + ' 1',
|
||||
default: additionalFields.fieldValue0,
|
||||
},
|
||||
fieldName1: {
|
||||
type: 'string',
|
||||
label: i18n.locale._profile.metadataLabel + ' 2',
|
||||
label: i18n.ts._profile.metadataLabel + ' 2',
|
||||
default: additionalFields.fieldName1,
|
||||
},
|
||||
fieldValue1: {
|
||||
type: 'string',
|
||||
label: i18n.locale._profile.metadataContent + ' 2',
|
||||
label: i18n.ts._profile.metadataContent + ' 2',
|
||||
default: additionalFields.fieldValue1,
|
||||
},
|
||||
fieldName2: {
|
||||
type: 'string',
|
||||
label: i18n.locale._profile.metadataLabel + ' 3',
|
||||
label: i18n.ts._profile.metadataLabel + ' 3',
|
||||
default: additionalFields.fieldName2,
|
||||
},
|
||||
fieldValue2: {
|
||||
type: 'string',
|
||||
label: i18n.locale._profile.metadataContent + ' 3',
|
||||
label: i18n.ts._profile.metadataContent + ' 3',
|
||||
default: additionalFields.fieldValue2,
|
||||
},
|
||||
fieldName3: {
|
||||
type: 'string',
|
||||
label: i18n.locale._profile.metadataLabel + ' 4',
|
||||
label: i18n.ts._profile.metadataLabel + ' 4',
|
||||
default: additionalFields.fieldName3,
|
||||
},
|
||||
fieldValue3: {
|
||||
type: 'string',
|
||||
label: i18n.locale._profile.metadataContent + ' 4',
|
||||
label: i18n.ts._profile.metadataContent + ' 4',
|
||||
default: additionalFields.fieldValue3,
|
||||
},
|
||||
});
|
||||
|
|
@ -196,7 +196,7 @@ async function editMetadata() {
|
|||
|
||||
defineExpose({
|
||||
[symbols.PAGE_INFO]: {
|
||||
title: i18n.locale.profile,
|
||||
title: i18n.ts.profile,
|
||||
icon: 'fas fa-user',
|
||||
bg: 'var(--bg)',
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
<template>
|
||||
<div class="_formRoot">
|
||||
<FormTextarea v-model="installThemeCode" class="_formBlock">
|
||||
<template #label>{{ i18n.locale._theme.code }}</template>
|
||||
<template #label>{{ i18n.ts._theme.code }}</template>
|
||||
</FormTextarea>
|
||||
|
||||
<div class="_formBlock" style="display: flex; gap: var(--margin); flex-wrap: wrap;">
|
||||
<FormButton :disabled="installThemeCode == null" inline @click="() => preview(installThemeCode)"><i class="fas fa-eye"></i> {{ i18n.locale.preview }}</FormButton>
|
||||
<FormButton :disabled="installThemeCode == null" primary inline @click="() => install(installThemeCode)"><i class="fas fa-check"></i> {{ i18n.locale.install }}</FormButton>
|
||||
<FormButton :disabled="installThemeCode == null" inline @click="() => preview(installThemeCode)"><i class="fas fa-eye"></i> {{ i18n.ts.preview }}</FormButton>
|
||||
<FormButton :disabled="installThemeCode == null" primary inline @click="() => install(installThemeCode)"><i class="fas fa-check"></i> {{ i18n.ts.install }}</FormButton>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -32,21 +32,21 @@ function parseThemeCode(code: string) {
|
|||
} catch (e) {
|
||||
os.alert({
|
||||
type: 'error',
|
||||
text: i18n.locale._theme.invalid
|
||||
text: i18n.ts._theme.invalid
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (!validateTheme(theme)) {
|
||||
os.alert({
|
||||
type: 'error',
|
||||
text: i18n.locale._theme.invalid
|
||||
text: i18n.ts._theme.invalid
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (getThemes().some(t => t.id === theme.id)) {
|
||||
os.alert({
|
||||
type: 'info',
|
||||
text: i18n.locale._theme.alreadyInstalled
|
||||
text: i18n.ts._theme.alreadyInstalled
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
|
@ -71,7 +71,7 @@ async function install(code: string): Promise<void> {
|
|||
|
||||
defineExpose({
|
||||
[symbols.PAGE_INFO]: {
|
||||
title: i18n.locale._theme.install,
|
||||
title: i18n.ts._theme.install,
|
||||
icon: 'fas fa-download',
|
||||
bg: 'var(--bg)',
|
||||
},
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ export default defineComponent({
|
|||
|
||||
setup(props, { emit }) {
|
||||
const INFO = {
|
||||
title: i18n.locale.theme,
|
||||
title: i18n.ts.theme,
|
||||
icon: 'fas fa-palette',
|
||||
bg: 'var(--bg)',
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div>
|
||||
{{ i18n.locale.processing }}
|
||||
{{ i18n.ts.processing }}
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -18,7 +18,7 @@ const props = defineProps<{
|
|||
onMounted(async () => {
|
||||
await os.alert({
|
||||
type: 'info',
|
||||
text: i18n.t('clickToFinishEmailVerification', { ok: i18n.locale.gotIt }),
|
||||
text: i18n.t('clickToFinishEmailVerification', { ok: i18n.ts.gotIt }),
|
||||
});
|
||||
const res = await os.apiWithDialog('signup-pending', {
|
||||
code: props.code,
|
||||
|
|
@ -28,7 +28,7 @@ onMounted(async () => {
|
|||
|
||||
defineExpose({
|
||||
[symbols.PAGE_INFO]: {
|
||||
title: i18n.locale.signup,
|
||||
title: i18n.ts.signup,
|
||||
icon: 'fas fa-user',
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<MkSpacer :content-max="800" :margin-min="16" :margin-max="32">
|
||||
<div class="cwepdizn _formRoot">
|
||||
<FormFolder :default-open="true" class="_formBlock">
|
||||
<template #label>{{ i18n.locale.backgroundColor }}</template>
|
||||
<template #label>{{ i18n.ts.backgroundColor }}</template>
|
||||
<div class="cwepdizn-colors">
|
||||
<div class="row">
|
||||
<button v-for="color in bgColors.filter(x => x.kind === 'light')" :key="color.color" class="color _button" :class="{ active: theme.props.bg === color.color }" @click="setBgColor(color)">
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
</FormFolder>
|
||||
|
||||
<FormFolder :default-open="true" class="_formBlock">
|
||||
<template #label>{{ i18n.locale.accentColor }}</template>
|
||||
<template #label>{{ i18n.ts.accentColor }}</template>
|
||||
<div class="cwepdizn-colors">
|
||||
<div class="row">
|
||||
<button v-for="color in accentColors" :key="color" class="color rounded _button" :class="{ active: theme.props.accent === color }" @click="setAccentColor(color)">
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
</FormFolder>
|
||||
|
||||
<FormFolder :default-open="true" class="_formBlock">
|
||||
<template #label>{{ i18n.locale.textColor }}</template>
|
||||
<template #label>{{ i18n.ts.textColor }}</template>
|
||||
<div class="cwepdizn-colors">
|
||||
<div class="row">
|
||||
<button v-for="color in fgColors" :key="color" class="color char _button" :class="{ active: (theme.props.fg === color.forLight) || (theme.props.fg === color.forDark) }" @click="setFgColor(color)">
|
||||
|
|
@ -41,22 +41,22 @@
|
|||
|
||||
<FormFolder :default-open="false" class="_formBlock">
|
||||
<template #icon><i class="fas fa-code"></i></template>
|
||||
<template #label>{{ i18n.locale.editCode }}</template>
|
||||
<template #label>{{ i18n.ts.editCode }}</template>
|
||||
|
||||
<div class="_formRoot">
|
||||
<FormTextarea v-model="themeCode" tall class="_formBlock">
|
||||
<template #label>{{ i18n.locale._theme.code }}</template>
|
||||
<template #label>{{ i18n.ts._theme.code }}</template>
|
||||
</FormTextarea>
|
||||
<FormButton primary class="_formBlock" @click="applyThemeCode">{{ i18n.locale.apply }}</FormButton>
|
||||
<FormButton primary class="_formBlock" @click="applyThemeCode">{{ i18n.ts.apply }}</FormButton>
|
||||
</div>
|
||||
</FormFolder>
|
||||
|
||||
<FormFolder :default-open="false" class="_formBlock">
|
||||
<template #label>{{ i18n.locale.addDescription }}</template>
|
||||
<template #label>{{ i18n.ts.addDescription }}</template>
|
||||
|
||||
<div class="_formRoot">
|
||||
<FormTextarea v-model="description">
|
||||
<template #label>{{ i18n.locale._theme.description }}</template>
|
||||
<template #label>{{ i18n.ts._theme.description }}</template>
|
||||
</FormTextarea>
|
||||
</div>
|
||||
</FormFolder>
|
||||
|
|
@ -167,7 +167,7 @@ function applyThemeCode() {
|
|||
} catch (err) {
|
||||
os.alert({
|
||||
type: 'error',
|
||||
text: i18n.locale._theme.invalid,
|
||||
text: i18n.ts._theme.invalid,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
|
@ -177,7 +177,7 @@ function applyThemeCode() {
|
|||
|
||||
async function saveAs() {
|
||||
const { canceled, result: name } = await os.inputText({
|
||||
title: i18n.locale.name,
|
||||
title: i18n.ts.name,
|
||||
allowEmpty: false,
|
||||
});
|
||||
if (canceled) return;
|
||||
|
|
@ -204,18 +204,18 @@ watch($$(theme), apply, { deep: true });
|
|||
|
||||
defineExpose({
|
||||
[symbols.PAGE_INFO]: {
|
||||
title: i18n.locale.themeEditor,
|
||||
title: i18n.ts.themeEditor,
|
||||
icon: 'fas fa-palette',
|
||||
bg: 'var(--bg)',
|
||||
actions: [{
|
||||
asFullButton: true,
|
||||
icon: 'fas fa-eye',
|
||||
text: i18n.locale.preview,
|
||||
text: i18n.ts.preview,
|
||||
handler: showPreview,
|
||||
}, {
|
||||
asFullButton: true,
|
||||
icon: 'fas fa-check',
|
||||
text: i18n.locale.saveAs,
|
||||
text: i18n.ts.saveAs,
|
||||
handler: saveAs,
|
||||
}],
|
||||
},
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ function saveSrc(): void {
|
|||
|
||||
async function timetravel(): Promise<void> {
|
||||
const { canceled, result: date } = await os.inputDate({
|
||||
title: i18n.locale.date,
|
||||
title: i18n.ts.date,
|
||||
});
|
||||
if (canceled) return;
|
||||
|
||||
|
|
@ -110,47 +110,47 @@ function focus(): void {
|
|||
|
||||
defineExpose({
|
||||
[symbols.PAGE_INFO]: computed(() => ({
|
||||
title: i18n.locale.timeline,
|
||||
title: i18n.ts.timeline,
|
||||
icon: src === 'local' ? 'fas fa-comments' : src === 'social' ? 'fas fa-share-alt' : src === 'global' ? 'fas fa-globe' : 'fas fa-home',
|
||||
bg: 'var(--bg)',
|
||||
actions: [{
|
||||
icon: 'fas fa-list-ul',
|
||||
text: i18n.locale.lists,
|
||||
text: i18n.ts.lists,
|
||||
handler: chooseList,
|
||||
}, {
|
||||
icon: 'fas fa-satellite',
|
||||
text: i18n.locale.antennas,
|
||||
text: i18n.ts.antennas,
|
||||
handler: chooseAntenna,
|
||||
}, {
|
||||
icon: 'fas fa-satellite-dish',
|
||||
text: i18n.locale.channel,
|
||||
text: i18n.ts.channel,
|
||||
handler: chooseChannel,
|
||||
}, {
|
||||
icon: 'fas fa-calendar-alt',
|
||||
text: i18n.locale.jumpToSpecifiedDate,
|
||||
text: i18n.ts.jumpToSpecifiedDate,
|
||||
handler: timetravel,
|
||||
}],
|
||||
tabs: [{
|
||||
active: src === 'home',
|
||||
title: i18n.locale._timelines.home,
|
||||
title: i18n.ts._timelines.home,
|
||||
icon: 'fas fa-home',
|
||||
iconOnly: true,
|
||||
onClick: () => { src = 'home'; saveSrc(); },
|
||||
}, ...(isLocalTimelineAvailable ? [{
|
||||
active: src === 'local',
|
||||
title: i18n.locale._timelines.local,
|
||||
title: i18n.ts._timelines.local,
|
||||
icon: 'fas fa-comments',
|
||||
iconOnly: true,
|
||||
onClick: () => { src = 'local'; saveSrc(); },
|
||||
}, {
|
||||
active: src === 'social',
|
||||
title: i18n.locale._timelines.social,
|
||||
title: i18n.ts._timelines.social,
|
||||
icon: 'fas fa-share-alt',
|
||||
iconOnly: true,
|
||||
onClick: () => { src = 'social'; saveSrc(); },
|
||||
}] : []), ...(isGlobalTimelineAvailable ? [{
|
||||
active: src === 'global',
|
||||
title: i18n.locale._timelines.global,
|
||||
title: i18n.ts._timelines.global,
|
||||
icon: 'fas fa-globe',
|
||||
iconOnly: true,
|
||||
onClick: () => { src = 'global'; saveSrc(); },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue