Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mod modified time format #1536

Merged
merged 7 commits into from
Sep 11, 2021
Merged

Conversation

Lilihx
Copy link
Contributor

@Lilihx Lilihx commented Sep 3, 2021

Description
Add setting for exact date format.

Default: previous "from now" format
After setting: display "YYYY-MM-DD HH:mm" format

截屏2021-09-07 下午1 53 14

#1525

@Lilihx Lilihx requested a review from o1egl as a code owner September 3, 2021 09:29
@o1egl
Copy link
Member

o1egl commented Sep 3, 2021

Some people like the current behavior. It must be set as a user config param

@@ -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",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicate of line 30

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I copy the feture "hit dot files" to implement the issue.
there are two "hit dot files" settings in en.json
I'll commit that

@@ -106,6 +106,9 @@ export default {
return filesize(this.size);
},
humanTime: function () {
if (this.user.dateFormat) {
return moment(this.modified).format("YYYY-MM-DD HH:mm");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return moment(this.modified).format("YYYY-MM-DD HH:mm");
return moment(this.modified).format("L LT");

FileBrowser supports multiples languages, dates should be displayed with a localized format.

@Lilihx
Copy link
Contributor Author

Lilihx commented Sep 9, 2021 via email

@o1egl o1egl merged commit 0426629 into filebrowser:master Sep 11, 2021
rahul-r pushed a commit to rahul-r/filebrowser that referenced this pull request Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants