diff --git a/packages/frontend/src/components/MkDriveFileThumbnail.vue b/packages/frontend/src/components/MkDriveFileThumbnail.vue
index 706c9a55c..86a7485a2 100644
--- a/packages/frontend/src/components/MkDriveFileThumbnail.vue
+++ b/packages/frontend/src/components/MkDriveFileThumbnail.vue
@@ -5,17 +5,25 @@ SPDX-License-Identifier: AGPL-3.0-only
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -56,6 +64,21 @@ const isThumbnailAvailable = computed(() => {
? (is.value === 'image' as const || is.value === 'video')
: false;
});
+
+const getTrimmedAltText = () => {
+ if (props.file.comment == null) {
+ return '';
+ }
+ const maxCharacters = 40;
+
+ const alt = props.file.comment as unknown as string;
+ if (alt.length > maxCharacters) {
+ return alt.substring(0, maxCharacters) + '...';
+ }
+
+ return alt;
+};
+
diff --git a/packages/frontend/src/components/MkInput.vue b/packages/frontend/src/components/MkInput.vue
index cef041800..26f264ca5 100644
--- a/packages/frontend/src/components/MkInput.vue
+++ b/packages/frontend/src/components/MkInput.vue
@@ -111,7 +111,7 @@ const onKeydown = (ev: KeyboardEvent) => {
emit('keydown', ev);
- if (ev.code === 'Enter') {
+ if (ev.key === 'Enter') {
emit('enter');
}
};