diff --git a/apps/client/src/widgets/type_widgets/options/other.tsx b/apps/client/src/widgets/type_widgets/options/other.tsx
index 4446ea0ff..641b271dd 100644
--- a/apps/client/src/widgets/type_widgets/options/other.tsx
+++ b/apps/client/src/widgets/type_widgets/options/other.tsx
@@ -10,6 +10,7 @@ export default function OtherSettings() {
return (
<>
+
>
)
}
@@ -21,8 +22,7 @@ function NoteErasureTimeout() {
{t("note_erasure_timeout.manual_erasing_description")}
@@ -36,4 +36,27 @@ function NoteErasureTimeout() {
/>
)
+}
+
+function AttachmentErasureTimeout() {
+ return (
+
+ {t("attachment_erasure_timeout.attachment_auto_deletion_description")}
+
+ {t("attachment_erasure_timeout.manual_erasing_description")}
+
+
+ )
}
\ No newline at end of file
diff --git a/apps/client/src/widgets/type_widgets/options/other/attachment_erasure_timeout.ts b/apps/client/src/widgets/type_widgets/options/other/attachment_erasure_timeout.ts
deleted file mode 100644
index afb75522b..000000000
--- a/apps/client/src/widgets/type_widgets/options/other/attachment_erasure_timeout.ts
+++ /dev/null
@@ -1,44 +0,0 @@
-import OptionsWidget from "../options_widget.js";
-import server from "../../../../services/server.js";
-import toastService from "../../../../services/toast.js";
-import { t } from "../../../../services/i18n.js";
-import TimeSelector from "../time_selector.js";
-
-const TPL = /*html*/`
-
-
${t("attachment_erasure_timeout.attachment_erasure_timeout")}
-
-
${t("attachment_erasure_timeout.attachment_auto_deletion_description")}
-
-
-
${t("attachment_erasure_timeout.manual_erasing_description")}
-
-
`;
-
-export default class AttachmentErasureTimeoutOptions extends TimeSelector {
- private $eraseUnusedAttachmentsNowButton!: JQuery;
-
- constructor() {
- super({
- widgetId: "erase-unused-attachments-after",
- widgetLabelId: "attachment_erasure_timeout.erase_attachments_after",
- optionValueId: "eraseUnusedAttachmentsAfterSeconds",
- optionTimeScaleId: "eraseUnusedAttachmentsAfterTimeScale"
- });
- super.doRender();
- }
-
- doRender() {
- const $timeSelector = this.$widget;
- this.$widget = $(TPL);
- // inject TimeSelector widget template
- this.$widget.find("#time-selector-placeholder").replaceWith($timeSelector);
-
- this.$eraseUnusedAttachmentsNowButton = this.$widget.find(".erase-unused-attachments-now-button");
- this.$eraseUnusedAttachmentsNowButton.on("click", () => {
- server.post("notes/erase-unused-attachments-now").then(() => {
- toastService.showMessage(t("attachment_erasure_timeout.unused_attachments_erased"));
- });
- });
- }
-}