diff --git a/frontend/src/components/files/ListingItem.vue b/frontend/src/components/files/ListingItem.vue index c7ab60db..e71558de 100644 --- a/frontend/src/components/files/ListingItem.vue +++ b/frontend/src/components/files/ListingItem.vue @@ -106,7 +106,11 @@ export default { return filesize(this.size); }, humanTime: function () { - return moment(this.modified).format("YYYY-MM-DD HH:mm"); + // TODO: 根据 setting 来自行设定 + if (this.user.dateFormat) { + return moment(this.modified).format("YYYY-MM-DD HH:mm"); + } + return moment(this.modified).fromNow(); }, dragStart: function () { if (this.selectedCount === 0) { diff --git a/frontend/src/i18n/en.json b/frontend/src/i18n/en.json index 38e3a42e..c6f88377 100644 --- a/frontend/src/i18n/en.json +++ b/frontend/src/i18n/en.json @@ -27,6 +27,7 @@ "search": "Search", "select": "Select", "selectMultiple": "Select multiple", + "setDateFormat": "Set exact date format", "share": "Share", "shell": "Toggle shell", "submit": "Submit", @@ -214,6 +215,7 @@ "rules": "Rules", "rulesHelp": "Here you can define a set of allow and disallow rules for this specific user. The blocked files won't show up in the listings and they wont be accessible to the user. We support regex and paths relative to the users scope.\n", "scope": "Scope", + "setDateFormat": "Set exact date format", "settingsUpdated": "Settings updated!", "shareDuration": "Share Duration", "shareManagement": "Share Management", diff --git a/frontend/src/views/settings/Profile.vue b/frontend/src/views/settings/Profile.vue index 3c57791e..82f1b43b 100644 --- a/frontend/src/views/settings/Profile.vue +++ b/frontend/src/views/settings/Profile.vue @@ -15,6 +15,10 @@ {{ $t("settings.singleClick") }}
++ + {{ $t("settings.setDateFormat") }} +