mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-31 12:12:28 +08:00
client: format dates and times in the "Note Info" widget
This commit is contained in:
parent
83e1ce2bc4
commit
19e40bf46b
@ -1,7 +1,9 @@
|
||||
import { formatDate } from "../../utils/formatters.js"
|
||||
import { t } from "../../services/i18n.js";
|
||||
import NoteContextAwareWidget from "../note_context_aware_widget.js";
|
||||
import server from "../../services/server.js";
|
||||
import utils from "../../services/utils.js";
|
||||
import { t } from "../../services/i18n.js";
|
||||
|
||||
|
||||
const TPL = `
|
||||
<div class="note-info-widget">
|
||||
@ -121,11 +123,11 @@ export default class NoteInfoWidget extends NoteContextAwareWidget {
|
||||
|
||||
this.$noteId.text(note.noteId);
|
||||
this.$dateCreated
|
||||
.text(metadata.dateCreated.substr(0, 16))
|
||||
.text(formatDate(new Date(metadata.dateCreated)))
|
||||
.attr("title", metadata.dateCreated);
|
||||
|
||||
this.$dateModified
|
||||
.text(metadata.dateModified.substr(0, 16))
|
||||
.text(formatDate(new Date(metadata.dateModified)))
|
||||
.attr("title", metadata.dateModified);
|
||||
|
||||
this.$type.text(note.type);
|
||||
|
Loading…
x
Reference in New Issue
Block a user