This commit is contained in:
ThatOneCalculator 2022-11-11 00:22:00 -08:00
commit b2aa574429
7 changed files with 19 additions and 15 deletions

View File

@ -1,6 +1,6 @@
{
"name": "calckey",
"version": "12.119.0-calc.12.6",
"version": "12.119.0-calc.12.7",
"codename": "aqua",
"repository": {
"type": "git",

View File

@ -74,7 +74,7 @@ export default defineComponent({
},
async rename(file) {
const { canceled, result } = await os.inputText({
title: this.i18n.ts.enterFileName,
title: i18n.ts.enterFileName,
default: file.name,
allowEmpty: false,
});
@ -90,9 +90,9 @@ export default defineComponent({
async describe(file) {
os.popup(defineAsyncComponent(() => import('@/components/MkMediaCaption.vue')), {
title: this.i18n.ts.describeFile,
title: i18n.ts.describeFile,
input: {
placeholder: this.i18n.ts.inputNewDescription,
placeholder: i18n.ts.inputNewDescription,
default: file.comment !== null ? file.comment : '',
},
image: file,
@ -113,19 +113,19 @@ export default defineComponent({
showFileMenu(file, ev: MouseEvent) {
if (this.menu) return;
this.menu = os.popupMenu([{
text: this.i18n.ts.renameFile,
text: i18n.ts.renameFile,
icon: 'ph-cursor-text-bold ph-lg',
action: () => { this.rename(file); },
}, {
text: file.isSensitive ? this.i18n.ts.unmarkAsSensitive : this.i18n.ts.markAsSensitive,
text: file.isSensitive ? i18n.ts.unmarkAsSensitive : i18n.ts.markAsSensitive,
icon: file.isSensitive ? 'ph-eye-slash-bold ph-lg' : 'ph-eye-bold ph-lg',
action: () => { this.toggleSensitive(file); },
}, {
text: this.i18n.ts.describeFile,
text: i18n.ts.describeFile,
icon: 'ph-cursor-text-bold ph-lg',
action: () => { this.describe(file); },
}, {
text: this.i18n.ts.attachCancel,
text: i18n.ts.attachCancel,
icon: 'ph-circle-wavy-warning-bold ph-lg',
action: () => { this.detachMedia(file.id); },
}], ev.currentTarget ?? ev.target).then(() => this.menu = null);

View File

@ -216,7 +216,7 @@ export default defineComponent({
methods: {
async changeType() {
const { canceled, result: type } = await os.select({
title: this.i18n.ts._pages.selectType,
title: i18n.ts._pages.selectType,
groupedItems: this.getScriptBlockList(this.getExpectedType ? this.getExpectedType() : null)
});
if (canceled) return;

View File

@ -1,5 +1,5 @@
<template>
<MkContainer :max-height="300" :foldable="true">
<MkContainer id="photos-container" :max-height="300" :foldable="true">
<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"/>
@ -73,6 +73,10 @@ onMounted(() => {
</script>
<style lang="scss" scoped>
#photos-container {
--stickyTop: 0;
}
.ujigsodd {
padding: 8px;

View File

@ -110,13 +110,13 @@ export default defineComponent({
os.pageWindow('/about');
}
}, {
text: this.i18n.ts.aboutMisskey,
text: i18n.ts.aboutMisskey,
icon: 'ph-info-bold ph-lg',
action: () => {
os.pageWindow('/about-calckey');
}
}, null, {
text: this.i18n.ts.help,
text: i18n.ts.help,
icon: 'ph-question-bold ph-lg',
action: () => {
window.open(`https://misskey-hub.net/help.md`, '_blank');

View File

@ -130,13 +130,13 @@ export default defineComponent({
os.pageWindow('/about');
}
}, {
text: this.i18n.ts.aboutMisskey,
text: i18n.ts.aboutMisskey,
icon: 'ph-info-bold ph-lg',
action: () => {
os.pageWindow('/about-calckey');
}
}, null, {
text: this.i18n.ts.help,
text: i18n.ts.help,
icon: 'ph-question-bold ph-lg',
action: () => {
window.open(`https://misskey-hub.net/help.md`, '_blank');

View File

@ -23,7 +23,7 @@ class SwLang {
public i18n: Promise<I18n<any>> | null = null;
public fetchLocale() {
return this.i18n = this._fetch();
return i18n = this._fetch();
}
private async _fetch() {