mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-09-03 22:30:51 +08:00
Replace the "Existing backups" bulleted list with a table
This commit is contained in:
parent
5b050410cb
commit
75941de449
@ -42,7 +42,17 @@ const TPL = `
|
|||||||
<div class="options-section">
|
<div class="options-section">
|
||||||
<h4>${t('backup.existing_backups')}</h4>
|
<h4>${t('backup.existing_backups')}</h4>
|
||||||
|
|
||||||
<ul class="existing-backup-list"></ul>
|
<table class="table table-stripped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Date and time</th>
|
||||||
|
<th>Path</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody class="existing-backup-list-items">
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@ -73,7 +83,7 @@ export default class BackupOptions extends OptionsWidget {
|
|||||||
this.$monthlyBackupEnabled.on('change', () =>
|
this.$monthlyBackupEnabled.on('change', () =>
|
||||||
this.updateCheckboxOption('monthlyBackupEnabled', this.$monthlyBackupEnabled));
|
this.updateCheckboxOption('monthlyBackupEnabled', this.$monthlyBackupEnabled));
|
||||||
|
|
||||||
this.$existingBackupList = this.$widget.find(".existing-backup-list");
|
this.$existingBackupList = this.$widget.find(".existing-backup-list-items");
|
||||||
}
|
}
|
||||||
|
|
||||||
optionsLoaded(options) {
|
optionsLoaded(options) {
|
||||||
@ -89,7 +99,12 @@ export default class BackupOptions extends OptionsWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (const {filePath, mtime} of backupFiles) {
|
for (const {filePath, mtime} of backupFiles) {
|
||||||
this.$existingBackupList.append($("<li>").text(`${filePath} ${mtime ? ` - ${mtime}` : ''}`));
|
this.$existingBackupList.append($(`
|
||||||
|
<tr>
|
||||||
|
<td>${(mtime) ? mtime : "-"}</td>
|
||||||
|
<td>${filePath}</td>
|
||||||
|
</tr>
|
||||||
|
`));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user