mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-31 19:51:36 +08:00
Merge branch 'develop' of https://github.com/TriliumNext/Notes into feat/tweak-menus
This commit is contained in:
commit
fd5412b715
25
.github/workflows/renovate.yaml
vendored
Normal file
25
.github/workflows/renovate.yaml
vendored
Normal file
@ -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 }}
|
18
renovate.json
Normal file
18
renovate.json
Normal file
@ -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
|
||||
}
|
@ -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;"></button>
|
||||
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
<a data-trigger-command="openAttachment" class="dropdown-item"
|
||||
title="${t('attachments_actions.open_externally_title')}">${t('attachments_actions.open_externally')}</a>
|
||||
<a data-trigger-command="openAttachmentCustom" class="dropdown-item"
|
||||
title="${t('attachments_actions.open_custom_title')}">${t('attachments_actions.open_custom')}</a>
|
||||
<a data-trigger-command="downloadAttachment" class="dropdown-item">${t('attachments_actions.download')}</a>
|
||||
<a data-trigger-command="renameAttachment" class="dropdown-item">${t('attachments_actions.rename_attachment')}</a>
|
||||
<a data-trigger-command="uploadNewAttachmentRevision" class="dropdown-item">${t('attachments_actions.upload_new_revision')}</a>
|
||||
<a data-trigger-command="copyAttachmentLinkToClipboard" class="dropdown-item">${t('attachments_actions.copy_link_to_clipboard')}</a>
|
||||
<a data-trigger-command="convertAttachmentIntoNote" class="dropdown-item">${t('attachments_actions.convert_attachment_into_note')}</a>
|
||||
<a data-trigger-command="deleteAttachment" class="dropdown-item">${t('attachments_actions.delete_attachment')}</a>
|
||||
<li data-trigger-command="openAttachment" class="dropdown-item"
|
||||
title="${t('attachments_actions.open_externally_title')}"><span class="bx bx-link-external"></span> ${t('attachments_actions.open_externally')}</li>
|
||||
<li data-trigger-command="openAttachmentCustom" class="dropdown-item"
|
||||
title="${t('attachments_actions.open_custom_title')}"><span class="bx bx-customize"></span> ${t('attachments_actions.open_custom')}</li>
|
||||
<li data-trigger-command="renameAttachment" class="dropdown-item">
|
||||
<span class="bx bx-rename"></span> ${t('attachments_actions.rename_attachment')}</li>
|
||||
<li data-trigger-command="copyAttachmentLinkToClipboard" class="dropdown-item"><span class="bx bx-copy">
|
||||
</span> ${t('attachments_actions.copy_link_to_clipboard')}</li>
|
||||
<li data-trigger-command="downloadAttachment" class="dropdown-item">
|
||||
<span class="bx bx-download"></span> ${t('attachments_actions.download')}</li>
|
||||
<li data-trigger-command="uploadNewAttachmentRevision" class="dropdown-item"><span class="bx bx-upload">
|
||||
</span> ${t('attachments_actions.upload_new_revision')}</li>
|
||||
<li data-trigger-command="convertAttachmentIntoNote" class="dropdown-item"><span class="bx bx-note">
|
||||
</span> ${t('attachments_actions.convert_attachment_into_note')}</li>
|
||||
<li data-trigger-command="deleteAttachment" class="dropdown-item">
|
||||
<span class="bx bx-trash"></span> ${t('attachments_actions.delete_attachment')}</li>
|
||||
</div>
|
||||
|
||||
<input type="file" class="attachment-upload-new-revision-input" style="display: none">
|
||||
|
@ -11,42 +11,63 @@ import { t } from "../../services/i18n.js";
|
||||
const TPL = `
|
||||
<div class="dropdown note-actions">
|
||||
<style>
|
||||
.note-actions {
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
}
|
||||
|
||||
.note-actions .dropdown-menu {
|
||||
min-width: 15em;
|
||||
}
|
||||
|
||||
.note-actions .dropdown-item[disabled], .note-actions .dropdown-item[disabled]:hover {
|
||||
color: var(--muted-text-color) !important;
|
||||
background-color: transparent !important;
|
||||
pointer-events: none; /* makes it unclickable */
|
||||
}
|
||||
.note-actions {
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
}
|
||||
|
||||
.note-actions .dropdown-menu {
|
||||
min-width: 15em;
|
||||
}
|
||||
|
||||
.note-actions .dropdown-item .bx {
|
||||
position: relative;
|
||||
top: 3px;
|
||||
font-size: 120%;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.note-actions .dropdown-item[disabled], .note-actions .dropdown-item[disabled]:hover {
|
||||
color: var(--muted-text-color) !important;
|
||||
background-color: transparent !important;
|
||||
pointer-events: none; /* makes it unclickable */
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<button type="button" data-bs-toggle="dropdown" aria-haspopup="true"
|
||||
aria-expanded="false" class="icon-action bx bx-dots-vertical-rounded"></button>
|
||||
<button type="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"
|
||||
class="icon-action bx bx-dots-vertical-rounded"></button>
|
||||
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
<a data-trigger-command="convertNoteIntoAttachment" class="dropdown-item">${t('note_actions.convert_into_attachment')}</a>
|
||||
<a data-trigger-command="renderActiveNote" class="dropdown-item render-note-button"><kbd data-command="renderActiveNote"></kbd> ${t('note_actions.re_render_note')}</a>
|
||||
<a data-trigger-command="findInText" class="dropdown-item find-in-text-button">${t('note_actions.search_in_note')} <kbd data-command="findInText"></kbd></a>
|
||||
<a data-trigger-command="showNoteSource" class="dropdown-item show-source-button"><kbd data-command="showNoteSource"></kbd> ${t('note_actions.note_source')}</a>
|
||||
<a data-trigger-command="showAttachments" class="dropdown-item show-attachments-button"><kbd data-command="showAttachments"></kbd> ${t('note_actions.note_attachments')}</a>
|
||||
<a data-trigger-command="openNoteExternally" class="dropdown-item open-note-externally-button"
|
||||
title="${t('note_actions.open_note_externally_title')}">
|
||||
<kbd data-command="openNoteExternally"></kbd>
|
||||
${t('note_actions.open_note_externally')}
|
||||
</a>
|
||||
<a data-trigger-command="openNoteCustom" class="dropdown-item open-note-custom-button"><kbd data-command="openNoteCustom"></kbd> ${t('note_actions.open_note_custom')}</a>
|
||||
<a class="dropdown-item import-files-button">${t('note_actions.import_files')}</a>
|
||||
<a class="dropdown-item export-note-button">${t('note_actions.export_note')}</a>
|
||||
<a class="dropdown-item delete-note-button">${t('note_actions.delete_note')}</a>
|
||||
<a data-trigger-command="printActiveNote" class="dropdown-item print-active-note-button"><kbd data-command="printActiveNote"></kbd> ${t('note_actions.print_note')}</a>
|
||||
<a data-trigger-command="forceSaveRevision" class="dropdown-item save-revision-button"><kbd data-command="forceSaveRevision"></kbd> ${t('note_actions.save_revision')}</a>
|
||||
<li data-trigger-command="convertNoteIntoAttachment" class="dropdown-item">
|
||||
<span class="bx bx-paperclip"></span> ${t('note_actions.convert_into_attachment')}
|
||||
</li>
|
||||
<li data-trigger-command="renderActiveNote" class="dropdown-item render-note-button">
|
||||
<span class="bx bx-extension"></span> ${t('note_actions.re_render_note')}<kbd data-command="renderActiveNote"></kbd>
|
||||
</li>
|
||||
<li data-trigger-command="findInText" class="dropdown-item find-in-text-button">
|
||||
<span class='bx bx-search'></span> ${t('note_actions.search_in_note')}<kbd data-command="findInText"></kbd>
|
||||
</li>
|
||||
<li data-trigger-command="showNoteSource" class="dropdown-item show-source-button">
|
||||
<span class="bx bx-code"></span> ${t('note_actions.note_source')}<kbd data-command="showNoteSource"></kbd>
|
||||
</li>
|
||||
<li data-trigger-command="showAttachments" class="dropdown-item show-attachments-button">
|
||||
<span class="bx bx-paperclip"></span> ${t('note_actions.note_attachments')}<kbd data-command="showAttachments"></kbd>
|
||||
</li>
|
||||
<li data-trigger-command="openNoteExternally" class="dropdown-item open-note-externally-button" title="${t('note_actions.open_note_externally_title')}">
|
||||
<span class="bx bx-link-external"></span> ${t('note_actions.open_note_externally')}<kbd data-command="openNoteExternally"></kbd>
|
||||
</li>
|
||||
<li data-trigger-command="openNoteCustom" class="dropdown-item open-note-custom-button">
|
||||
<span class="bx bx-customize"></span> ${t('note_actions.open_note_custom')}<kbd data-command="openNoteCustom"></kbd>
|
||||
</li>
|
||||
<li class="dropdown-item import-files-button"><span class="bx bx-import"></span> ${t('note_actions.import_files')}</li>
|
||||
<li class="dropdown-item export-note-button"><span class="bx bx-export"></span> ${t('note_actions.export_note')}</li>
|
||||
<li class="dropdown-item delete-note-button"><span class="bx bx-trash"></span> ${t('note_actions.delete_note')}</li>
|
||||
<li data-trigger-command="printActiveNote" class="dropdown-item print-active-note-button">
|
||||
<span class="bx bx-printer"></span> ${t('note_actions.print_note')}<kbd data-command="printActiveNote"></kbd></li>
|
||||
<li data-trigger-command="forceSaveRevision" class="dropdown-item save-revision-button">
|
||||
<span class="bx bx-save"></span> ${t('note_actions.save_revision')}<kbd data-command="forceSaveRevision"></kbd>
|
||||
</li>
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
|
@ -42,7 +42,21 @@ const TPL = `
|
||||
<div class="options-section">
|
||||
<h4>${t('backup.existing_backups')}</h4>
|
||||
|
||||
<ul class="existing-backup-list"></ul>
|
||||
<table class="table table-stripped">
|
||||
<colgroup>
|
||||
<col width="33%" />
|
||||
<col />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>${t("backup.date-and-time")}</th>
|
||||
<th>${t("backup.path")}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="existing-backup-list-items">
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
`;
|
||||
|
||||
@ -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($(`
|
||||
<tr>
|
||||
<td class="empty-table-placeholder" colspan="2">${t('backup.no_backup_yet')}</td>
|
||||
</tr>
|
||||
`));
|
||||
|
||||
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($("<li>").text(`${filePath} ${mtime ? ` - ${mtime}` : ''}`));
|
||||
this.$existingBackupList.append($(`
|
||||
<tr>
|
||||
<td>${(mtime) ? dateTimeFormatter.format(new Date(mtime)) : "-"}</td>
|
||||
<td>${filePath}</td>
|
||||
</tr>
|
||||
`));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -1237,4 +1237,9 @@ textarea {
|
||||
|
||||
.jump-to-note-results .aa-suggestions {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.empty-table-placeholder {
|
||||
text-align: center;
|
||||
color: var(--muted-text-color);
|
||||
}
|
@ -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 <a href=\"https://triliumnext.github.io/Docs/Wiki/note-revisions.html\" class=\"external\">wiki</a> 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 <a href=\"https://triliumnext.github.io/Docs/Wiki/note-revisions.html\" class=\"external\">wiki</a> 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"
|
||||
},
|
||||
|
@ -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": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user