summaryrefslogtreecommitdiff
path: root/packages/client/src/components/MkDrive.file.vue
diff options
context:
space:
mode:
Diffstat (limited to 'packages/client/src/components/MkDrive.file.vue')
-rw-r--r--packages/client/src/components/MkDrive.file.vue18
1 files changed, 6 insertions, 12 deletions
diff --git a/packages/client/src/components/MkDrive.file.vue b/packages/client/src/components/MkDrive.file.vue
index 11bd9e9e3b..8c17c0530a 100644
--- a/packages/client/src/components/MkDrive.file.vue
+++ b/packages/client/src/components/MkDrive.file.vue
@@ -71,7 +71,7 @@ function getMenu() {
action: toggleSensitive,
}, {
text: i18n.ts.describeFile,
- icon: 'ti ti-forms',
+ icon: 'ti ti-text-caption',
action: describe,
}, null, {
text: i18n.ts.copyUrl,
@@ -134,20 +134,14 @@ function rename() {
}
function describe() {
- os.popup(defineAsyncComponent(() => import('@/components/MkMediaCaption.vue')), {
- title: i18n.ts.describeFile,
- input: {
- placeholder: i18n.ts.inputNewDescription,
- default: props.file.comment != null ? props.file.comment : '',
- },
- image: props.file,
+ os.popup(defineAsyncComponent(() => import('@/components/MkFileCaptionEditWindow.vue')), {
+ default: props.file.comment != null ? props.file.comment : '',
+ file: props.file,
}, {
- done: result => {
- if (!result || result.canceled) return;
- let comment = result.result;
+ done: caption => {
os.api('drive/files/update', {
fileId: props.file.id,
- comment: comment.length === 0 ? null : comment,
+ comment: caption.length === 0 ? null : caption,
});
},
}, 'closed');