chore(options/other): merge note revisions

This commit is contained in:
Elian Doran
2026-04-13 15:22:52 +03:00
parent 1f6c88dcc1
commit 4a9e7c843e
2 changed files with 8 additions and 12 deletions

View File

@@ -1324,6 +1324,9 @@
"erase_deleted_notes_now": "Erase deleted notes now",
"deleted_notes_erased": "Deleted notes have been erased."
},
"revisions": {
"title": "Note Revisions"
},
"revisions_snapshot_interval": {
"note_revisions_snapshot_interval_title": "Note Revision Snapshot Interval",
"note_revisions_snapshot_description": "The Note revision snapshot interval is the time after which a new note revision will be created for the note. See <doc>wiki</doc> for more info.",

View File

@@ -27,8 +27,7 @@ export default function OtherSettings() {
</>}
<NoteErasureTimeout />
<AttachmentErasureTimeout />
<RevisionSnapshotInterval />
<RevisionSnapshotLimit />
<RevisionSettings />
<HtmlImportTags />
<ShareSettings />
<NetworkSettings />
@@ -173,9 +172,11 @@ function AttachmentErasureTimeout() {
);
}
function RevisionSnapshotInterval() {
function RevisionSettings() {
const [ revisionSnapshotNumberLimit, setRevisionSnapshotNumberLimit ] = useTriliumOption("revisionSnapshotNumberLimit");
return (
<OptionsSection title={t("revisions_snapshot_interval.note_revisions_snapshot_interval_title")}>
<OptionsSection title={t("revisions.title")}>
<OptionsRow name="revision-snapshot-time-interval" label={t("revisions_snapshot_interval.snapshot_time_interval_label")} description={t("revisions_snapshot_interval.note_revisions_snapshot_description_short")}>
<TimeSelector
name="revision-snapshot-time-interval"
@@ -183,15 +184,7 @@ function RevisionSnapshotInterval() {
minimumSeconds={10}
/>
</OptionsRow>
</OptionsSection>
);
}
function RevisionSnapshotLimit() {
const [ revisionSnapshotNumberLimit, setRevisionSnapshotNumberLimit ] = useTriliumOption("revisionSnapshotNumberLimit");
return (
<OptionsSection title={t("revisions_snapshot_limit.note_revisions_snapshot_limit_title")}>
<OptionsRow name="revision-snapshot-number-limit" label={t("revisions_snapshot_limit.snapshot_number_limit_label")} description={t("revisions_snapshot_limit.note_revisions_snapshot_limit_description_short")}>
<FormTextBoxWithUnit
type="number" min={-1}