mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-10 10:22:29 +08:00
client: refactor
This commit is contained in:
parent
b097a8fc37
commit
56b6dae447
@ -1,7 +1,8 @@
|
||||
import { formatDate } from "../../../utils/formatters.js"
|
||||
import { t } from "../../../services/i18n.js";
|
||||
import OptionsWidget from "./options_widget.js";
|
||||
import server from "../../../services/server.js";
|
||||
import toastService from "../../../services/toast.js";
|
||||
import OptionsWidget from "./options_widget.js";
|
||||
|
||||
const TPL = `
|
||||
<div class="options-section">
|
||||
@ -115,15 +116,10 @@ export default class BackupOptions extends OptionsWidget {
|
||||
return 0;
|
||||
});
|
||||
|
||||
const dateTimeFormatter = new Intl.DateTimeFormat(navigator.language, {
|
||||
dateStyle: "medium",
|
||||
timeStyle: "medium"
|
||||
});
|
||||
|
||||
for (const {filePath, mtime} of backupFiles) {
|
||||
this.$existingBackupList.append($(`
|
||||
<tr>
|
||||
<td>${(mtime) ? dateTimeFormatter.format(new Date(mtime)) : "-"}</td>
|
||||
<td>${(mtime) ? formatDate(new Date(mtime)) : "-"}</td>
|
||||
<td>${filePath}</td>
|
||||
</tr>
|
||||
`));
|
||||
|
Loading…
x
Reference in New Issue
Block a user