diff --git a/.github/workflows/renovate.yaml b/.github/workflows/renovate.yaml new file mode 100644 index 000000000..29bdd0da8 --- /dev/null +++ b/.github/workflows/renovate.yaml @@ -0,0 +1,25 @@ +name: Renovate +on: + schedule: + # Run every day at 1 AM UTC (before the nightly build at 2 AM UTC) + - cron: '0 1 * * *' + # Allow manual triggering + workflow_dispatch: + +permissions: + contents: write + pull-requests: write + issues: write + +jobs: + renovate: + name: Run Renovate + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Self-hosted Renovate + uses: renovatebot/github-action@v41.0.3 + with: + configurationFile: renovate.json + token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/renovate.json b/renovate.json new file mode 100644 index 000000000..6321b1cb7 --- /dev/null +++ b/renovate.json @@ -0,0 +1,18 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:base" + ], + "schedule": ["before 3am"], + "packageRules": [ + { + "matchUpdateTypes": ["minor", "patch"], + "matchCurrentVersion": "!/^0/", + "automerge": false + } + ], + "labels": ["dependencies", "renovate"], + "prHourlyLimit": 0, + "prConcurrentLimit": 0, + "branchConcurrentLimit": 0 +} \ No newline at end of file diff --git a/src/public/app/widgets/buttons/attachments_actions.js b/src/public/app/widgets/buttons/attachments_actions.js index b0f0cc2fa..1580753c0 100644 --- a/src/public/app/widgets/buttons/attachments_actions.js +++ b/src/public/app/widgets/buttons/attachments_actions.js @@ -20,6 +20,13 @@ const TPL = ` width: 20em; } + .attachment-actions .dropdown-item .bx { + position: relative; + top: 3px; + font-size: 120%; + margin-right: 5px; + } + .attachment-actions .dropdown-item[disabled], .attachment-actions .dropdown-item[disabled]:hover { color: var(--muted-text-color) !important; background-color: transparent !important; @@ -32,16 +39,22 @@ const TPL = ` style="position: relative; top: 3px;"> diff --git a/src/public/app/widgets/buttons/note_actions.js b/src/public/app/widgets/buttons/note_actions.js index bf24a6705..7cb0c8c50 100644 --- a/src/public/app/widgets/buttons/note_actions.js +++ b/src/public/app/widgets/buttons/note_actions.js @@ -11,42 +11,63 @@ import { t } from "../../services/i18n.js"; const TPL = ` `; diff --git a/src/public/app/widgets/type_widgets/options/backup.js b/src/public/app/widgets/type_widgets/options/backup.js index fc3c070a4..35cd4b829 100644 --- a/src/public/app/widgets/type_widgets/options/backup.js +++ b/src/public/app/widgets/type_widgets/options/backup.js @@ -42,7 +42,21 @@ const TPL = `

${t('backup.existing_backups')}

- + + + + + + + + + + + + + +
${t("backup.date-and-time")}${t("backup.path")}
+
`; @@ -73,7 +87,7 @@ export default class BackupOptions extends OptionsWidget { this.$monthlyBackupEnabled.on('change', () => this.updateCheckboxOption('monthlyBackupEnabled', this.$monthlyBackupEnabled)); - this.$existingBackupList = this.$widget.find(".existing-backup-list"); + this.$existingBackupList = this.$widget.find(".existing-backup-list-items"); } optionsLoaded(options) { @@ -85,11 +99,34 @@ export default class BackupOptions extends OptionsWidget { this.$existingBackupList.empty(); if (!backupFiles.length) { - backupFiles = [{filePath: t('backup.no_backup_yet'), mtime: ''}]; + this.$existingBackupList.append($(` + + ${t('backup.no_backup_yet')} + + `)); + + return; } + // Sort the backup files by modification date & time in a desceding order + backupFiles.sort((a, b) => { + if (a.mtime < b.mtime) return 1; + if (a.mtime > b.mtime) return -1; + return 0; + }); + + const dateTimeFormatter = new Intl.DateTimeFormat(navigator.language, { + dateStyle: "medium", + timeStyle: "medium" + }); + for (const {filePath, mtime} of backupFiles) { - this.$existingBackupList.append($("
  • ").text(`${filePath} ${mtime ? ` - ${mtime}` : ''}`)); + this.$existingBackupList.append($(` + + ${(mtime) ? dateTimeFormatter.format(new Date(mtime)) : "-"} + ${filePath} + + `)); } }); } diff --git a/src/public/stylesheets/style.css b/src/public/stylesheets/style.css index bddf82876..65b996e5d 100644 --- a/src/public/stylesheets/style.css +++ b/src/public/stylesheets/style.css @@ -1237,4 +1237,9 @@ textarea { .jump-to-note-results .aa-suggestions { padding: 1rem; +} + +.empty-table-placeholder { + text-align: center; + color: var(--muted-text-color); } \ No newline at end of file diff --git a/src/public/translations/en/translation.json b/src/public/translations/en/translation.json index 9847b0e24..1c5809120 100644 --- a/src/public/translations/en/translation.json +++ b/src/public/translations/en/translation.json @@ -238,23 +238,23 @@ "confirm_undelete": "Do you want to undelete this note and its sub-notes?" }, "revisions": { - "note_revisions": "Note revisions", + "note_revisions": "Note Revisions", "delete_all_revisions": "Delete all revisions of this note", "delete_all_button": "Delete all revisions", - "help_title": "Help on Note revisions", + "help_title": "Help on Note Revisions", "revision_last_edited": "This revision was last edited on {{date}}", - "confirm_delete_all": "Do you want to delete all revisions of this note? This action will erase revision title and content, but still preserve revision metadata.", + "confirm_delete_all": "Do you want to delete all revisions of this note? This action will erase the revision title and content, but still preserve the revision metadata.", "no_revisions": "No revisions for this note yet...", "restore_button": "Restore this revision", - "confirm_restore": "Do you want to restore this revision? This will overwrite current title and content of the note with this revision.", + "confirm_restore": "Do you want to restore this revision? This will overwrite the current title and content of the note with this revision.", "delete_button": "Delete this revision", - "confirm_delete": "Do you want to delete this revision? This action will delete revision title and content, but still preserve revision metadata.", - "revisions_deleted": "Note revisions has been deleted.", + "confirm_delete": "Do you want to delete this revision? This action will delete the revision title and content, but still preserve the revision metadata.", + "revisions_deleted": "Note revisions have been deleted.", "revision_restored": "Note revision has been restored.", "revision_deleted": "Note revision has been deleted.", - "snapshot_interval": "Note Revisions Snapshot Interval: {{seconds}}s.", - "maximum_revisions": "Maximum revisions for current note: {{number}}.", - "settings": "Settings for Note revisions", + "snapshot_interval": "Note Revision Snapshot Interval: {{seconds}}s.", + "maximum_revisions": "Note Revision Snapshot Limit: {{number}}.", + "settings": "Note Revision Settings", "download_button": "Download", "mime": "MIME: ", "file_size": "File size:", @@ -1108,12 +1108,12 @@ "deleted_notes_erased": "Deleted notes have been erased." }, "revisions_snapshot_interval": { - "note_revisions_snapshot_interval_title": "Note Revisions Snapshot Interval", - "note_revisions_snapshot_description": "Note revision snapshot time interval is time in seconds after which a new note revision will be created for the note. See wiki for more info.", + "note_revisions_snapshot_interval_title": "Note Revision Snapshot Interval", + "note_revisions_snapshot_description": "The Note revision snapshot interval is the time in seconds after which a new note revision will be created for the note. See wiki for more info.", "snapshot_time_interval_label": "Note revision snapshot time interval (in seconds):" }, "revisions_snapshot_limit": { - "note_revisions_snapshot_limit_title": "Note Revision Snapshots Limit", + "note_revisions_snapshot_limit_title": "Note Revision Snapshot Limit", "note_revisions_snapshot_limit_description": "The note revision snapshot number limit refers to the maximum number of revisions that can be saved for each note. Where -1 means no limit, 0 means delete all revisions. You can set the maximum revisions for a single note through the #versioningLimit label.", "snapshot_number_limit_label": "Note revision snapshot number limit:", "erase_excess_revision_snapshots": "Erase excess revision snapshots now", @@ -1183,6 +1183,8 @@ "backup_now": "Backup now", "backup_database_now": "Backup database now", "existing_backups": "Existing backups", + "date-and-time": "Date & time", + "path": "Path", "database_backed_up_to": "Database has been backed up to", "no_backup_yet": "no backup yet" }, diff --git a/src/public/translations/ro/translation.json b/src/public/translations/ro/translation.json index 9bd9b0ccf..13d0ea3cf 100644 --- a/src/public/translations/ro/translation.json +++ b/src/public/translations/ro/translation.json @@ -254,6 +254,8 @@ "enable_monthly_backup": "Activează copia de siguranță lunară", "enable_weekly_backup": "Activează copia de siguranță săptămânală", "existing_backups": "Copii de siguranță existente", + "date-and-time": "Data și ora", + "path": "Calea fișierului", "no_backup_yet": "nu există încă nicio copie de siguranță" }, "basic_properties": {