fix
This commit is contained in:
parent
a45fa21952
commit
796e956ff7
|
@ -86,8 +86,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</div>
|
</div>
|
||||||
<footer :class="$style.footer">
|
<footer :class="$style.footer">
|
||||||
<div :class="$style.footerLeft">
|
<div :class="$style.footerLeft">
|
||||||
<button v-tooltip="i18n.ts.attachFile + ' (' + i18n.ts.upload + ')'" class="_button" :class="$style.footerButton" @click="chooseFileFromPc"><i class="ti ti-photo-plus"></i></button>
|
<button v-if="$i.policies.noteFilesLimit > 0" v-tooltip="i18n.ts.attachFile + ' (' + i18n.ts.upload + ')'" class="_button" :class="$style.footerButton" @click="chooseFileFromPc"><i class="ti ti-photo-plus"></i></button>
|
||||||
<button v-tooltip="i18n.ts.attachFile + ' (' + i18n.ts.fromDrive + ')'" class="_button" :class="$style.footerButton" @click="chooseFileFromDrive"><i class="ti ti-cloud-download"></i></button>
|
<button v-if="$i.policies.noteFilesLimit > 0" v-tooltip="i18n.ts.attachFile + ' (' + i18n.ts.fromDrive + ')'" class="_button" :class="$style.footerButton" @click="chooseFileFromDrive"><i class="ti ti-cloud-download"></i></button>
|
||||||
<button v-tooltip="i18n.ts.poll" class="_button" :class="[$style.footerButton, { [$style.footerButtonActive]: poll }]" @click="togglePoll"><i class="ti ti-chart-arrows"></i></button>
|
<button v-tooltip="i18n.ts.poll" class="_button" :class="[$style.footerButton, { [$style.footerButtonActive]: poll }]" @click="togglePoll"><i class="ti ti-chart-arrows"></i></button>
|
||||||
<button v-tooltip="i18n.ts.useCw" class="_button" :class="[$style.footerButton, { [$style.footerButtonActive]: useCw }]" @click="useCw = !useCw"><i class="ti ti-eye-off"></i></button>
|
<button v-tooltip="i18n.ts.useCw" class="_button" :class="[$style.footerButton, { [$style.footerButtonActive]: useCw }]" @click="useCw = !useCw"><i class="ti ti-eye-off"></i></button>
|
||||||
<button v-tooltip="i18n.ts.hashtags" class="_button" :class="[$style.footerButton, { [$style.footerButtonActive]: withHashtags }]" @click="withHashtags = !withHashtags"><i class="ti ti-hash"></i></button>
|
<button v-tooltip="i18n.ts.hashtags" class="_button" :class="[$style.footerButton, { [$style.footerButtonActive]: withHashtags }]" @click="withHashtags = !withHashtags"><i class="ti ti-hash"></i></button>
|
||||||
|
|
|
@ -17,7 +17,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<i class="ti ti-pencil" :class="$style.fileNameEditIcon"></i>
|
<i class="ti ti-pencil" :class="$style.fileNameEditIcon"></i>
|
||||||
</button>
|
</button>
|
||||||
<div :class="$style.fileQuickActionsOthers">
|
<div :class="$style.fileQuickActionsOthers">
|
||||||
<button v-tooltip="i18n.ts.createNoteFromTheFile" class="_button" :class="$style.fileQuickActionsOthersButton" @click="postThis()">
|
<button v-if="$i.policies.noteFilesLimit > 0" v-tooltip="i18n.ts.createNoteFromTheFile" class="_button" :class="$style.fileQuickActionsOthersButton" @click="postThis()">
|
||||||
<i class="ti ti-pencil"></i>
|
<i class="ti ti-pencil"></i>
|
||||||
</button>
|
</button>
|
||||||
<button v-if="file.isSensitive" v-tooltip="i18n.ts.unmarkAsSensitive" class="_button" :class="$style.fileQuickActionsOthersButton" @click="toggleSensitive()">
|
<button v-if="file.isSensitive" v-tooltip="i18n.ts.unmarkAsSensitive" class="_button" :class="$style.fileQuickActionsOthersButton" @click="toggleSensitive()">
|
||||||
|
@ -76,6 +76,7 @@ import MkInfo from '@/components/MkInfo.vue';
|
||||||
import MkMediaList from '@/components/MkMediaList.vue';
|
import MkMediaList from '@/components/MkMediaList.vue';
|
||||||
import MkKeyValue from '@/components/MkKeyValue.vue';
|
import MkKeyValue from '@/components/MkKeyValue.vue';
|
||||||
import bytes from '@/filters/bytes.js';
|
import bytes from '@/filters/bytes.js';
|
||||||
|
import { ensureSignin } from '@/i.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||||
|
@ -85,6 +86,8 @@ import { globalEvents } from '@/events.js';
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
|
const $i = ensureSignin();
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
fileId: string;
|
fileId: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
|
@ -13,6 +13,7 @@ import * as os from '@/os.js';
|
||||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||||
import { prefer } from '@/preferences.js';
|
import { prefer } from '@/preferences.js';
|
||||||
import { globalEvents } from '@/events.js';
|
import { globalEvents } from '@/events.js';
|
||||||
|
import { $i } from '@/i.js';
|
||||||
|
|
||||||
function rename(file: Misskey.entities.DriveFile) {
|
function rename(file: Misskey.entities.DriveFile) {
|
||||||
os.inputText({
|
os.inputText({
|
||||||
|
@ -116,13 +117,19 @@ export function getDriveFileMenu(file: Misskey.entities.DriveFile, folder?: Miss
|
||||||
action: () => describe(file),
|
action: () => describe(file),
|
||||||
});
|
});
|
||||||
|
|
||||||
menuItems.push({ type: 'divider' }, {
|
menuItems.push({ type: 'divider' });
|
||||||
text: i18n.ts.createNoteFromTheFile,
|
|
||||||
icon: 'ti ti-pencil',
|
if ($i != null && $i.policies.noteFilesLimit > 0) {
|
||||||
action: () => os.post({
|
menuItems.push({
|
||||||
initialFiles: [file],
|
text: i18n.ts.createNoteFromTheFile,
|
||||||
}),
|
icon: 'ti ti-pencil',
|
||||||
}, {
|
action: () => os.post({
|
||||||
|
initialFiles: [file],
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
menuItems.push({
|
||||||
text: i18n.ts.copyUrl,
|
text: i18n.ts.copyUrl,
|
||||||
icon: 'ti ti-link',
|
icon: 'ti ti-link',
|
||||||
action: () => copyUrl(file),
|
action: () => copyUrl(file),
|
||||||
|
|
Loading…
Reference in New Issue