fix for ui
This commit is contained in:
parent
5a7618aaba
commit
a20f5b8b33
3 changed files with 108 additions and 87 deletions
File diff suppressed because one or more lines are too long
2
cmd/telesrv-admin/web/dist/index.html
vendored
2
cmd/telesrv-admin/web/dist/index.html
vendored
|
|
@ -23,7 +23,7 @@
|
|||
})();
|
||||
</script>
|
||||
|
||||
<script type="module" crossorigin src="/assets/index-DL3krfqb.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-_FsSjZOI.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-B7j2PW0q.css">
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
|||
|
|
@ -661,6 +661,10 @@ function LimitsRetentionSection() {
|
|||
{!loaded ? (
|
||||
<p style={{ color: "var(--muted)" }}>{"Loading current settings..."}</p>
|
||||
) : (
|
||||
<div className="card-body">
|
||||
<div className="action-groups">
|
||||
<section className="section-block">
|
||||
<SectionHead title={"Size limits"} />
|
||||
<div className="card-body">
|
||||
<div className="attr-block">
|
||||
<ByteSizeField
|
||||
|
|
@ -687,8 +691,20 @@ function LimitsRetentionSection() {
|
|||
<Alert>{"This exceeds the protocol's own ~4GB upload ceiling and will be refused when the server restarts."}</Alert>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div className="attr-block" style={{ marginTop: "1.5em" }}>
|
||||
<section className="section-block">
|
||||
<SectionHead
|
||||
title={"Retention"}
|
||||
action={
|
||||
<button className="btn compact-btn icon-text" type="button" onClick={() => setCategoryModalOpen(true)}>
|
||||
<Settings2 size={14} /> {"Per-category..."}
|
||||
</button>
|
||||
}
|
||||
/>
|
||||
<div className="card-body">
|
||||
<div className="attr-block">
|
||||
<label className="duration-field">
|
||||
<span>{"Retention mode"}</span>
|
||||
<select value={retentionMode} onChange={(event) => setRetentionMode(event.target.value)}>
|
||||
|
|
@ -711,32 +727,20 @@ function LimitsRetentionSection() {
|
|||
(retentionMode === "hard"
|
||||
? "How old the media itself must be, counted from when it was uploaded, before its bytes are purged."
|
||||
: "How long a document or photo must have had zero references before its file is deleted.") +
|
||||
" Set to 0 to disable the sweep by default and only clean up categories you explicitly override below."
|
||||
" Set to 0 to disable the sweep by default and only clean up categories you explicitly override via Per-category."
|
||||
}
|
||||
minutes={retentionAgeMinutes}
|
||||
disabled={retentionMode === "off"}
|
||||
onChange={setRetentionAgeMinutes}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="attr-block" style={{ marginTop: "1.5em" }}>
|
||||
<button className="btn icon-text" type="button" onClick={() => setCategoryModalOpen(true)}>
|
||||
<Settings2 size={15} /> {"Per-category overrides..."}
|
||||
</button>
|
||||
<span className="env-field-desc">
|
||||
{"Optional -- give Photo/Video/GIF/Music/Voice/File/Avatar their own retention age instead of the shared one above."}
|
||||
</span>
|
||||
</div>
|
||||
{categoryModalOpen && (
|
||||
<CategoryRetentionModal
|
||||
categoryAgeMinutes={categoryAgeMinutes}
|
||||
onChange={(key, minutes) => setCategoryAgeMinutes((prev) => ({ ...prev, [key]: minutes }))}
|
||||
disabled={retentionMode === "off"}
|
||||
onClose={() => setCategoryModalOpen(false)}
|
||||
/>
|
||||
)}
|
||||
</section>
|
||||
|
||||
<div className="attr-block" style={{ marginTop: "1.5em" }}>
|
||||
<section className="section-block">
|
||||
<SectionHead title={"Reclaim space"} />
|
||||
<div className="card-body">
|
||||
<div className="attr-block">
|
||||
<label className="checkline">
|
||||
<input
|
||||
type="checkbox"
|
||||
|
|
@ -746,11 +750,16 @@ function LimitsRetentionSection() {
|
|||
{" "}{"Actively reclaim space once over budget"}
|
||||
</label>
|
||||
<p className="env-field-desc">
|
||||
{"Once total physical storage exceeds the Max total storage budget above, actively delete the oldest files (regardless of category or age) until back under budget -- the same way \"hard\" retention mode purges files. Independent of the retention mode above: this can run even when that's Off. Off by default, since this changes the storage budget from block-new-uploads-only to also reclaiming from existing files."}
|
||||
{"Once total physical storage exceeds the Max total storage budget, actively delete the oldest files (regardless of category or age) until back under budget -- the same way \"hard\" retention mode purges files. Independent of the retention mode: this can run even when that's Off. Off by default, since this changes the storage budget from block-new-uploads-only to also reclaiming from existing files."}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div className="attr-block" style={{ marginTop: "1.5em" }}>
|
||||
<section className="section-block">
|
||||
<SectionHead title={"Manual purge"} />
|
||||
<div className="card-body">
|
||||
<div className="attr-block">
|
||||
<button className="btn danger icon-text" type="button" onClick={() => setManualPurgeOpen(true)}>
|
||||
<Settings2 size={15} /> {"Manually purge storage..."}
|
||||
</button>
|
||||
|
|
@ -758,6 +767,18 @@ function LimitsRetentionSection() {
|
|||
{"Delete media file bytes right now by hand-picked category and an optional age cutoff, independent of the retention settings above."}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
{categoryModalOpen && (
|
||||
<CategoryRetentionModal
|
||||
categoryAgeMinutes={categoryAgeMinutes}
|
||||
onChange={(key, minutes) => setCategoryAgeMinutes((prev) => ({ ...prev, [key]: minutes }))}
|
||||
disabled={retentionMode === "off"}
|
||||
onClose={() => setCategoryModalOpen(false)}
|
||||
/>
|
||||
)}
|
||||
{manualPurgeOpen && <ManualPurgeStorageModal onClose={() => setManualPurgeOpen(false)} />}
|
||||
|
||||
<div className="gift-table-actions env-save-row">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue