Skip to content

Commit

Permalink
fix(notices): update notice length reference to use plugin settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Mara-Li committed Feb 19, 2025
1 parent 3e00624 commit d7c6a03
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/settings/modals/manage_repo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ class ModalEditingRepository extends Modal {
value = "[PUBLISHER] MERGE";
new Notice(
i18next.t("settings.githubWorkflow.prRequest.error"),
this.settings.plugin.noticeLength
this.plugin.settings.plugin.noticeLength
);
}
this.repository.workflow.commitMessage = value;
Expand Down
2 changes: 1 addition & 1 deletion src/settings/modals/token_path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export class TokenEditPath extends Modal {
input.controlEl.querySelector("input")!.style.border = "1px solid red";
new Notice(
i18next.t("error.reading-token-file"),
this.settings.plugin.noticeLength
this.plugin.settings.plugin.noticeLength
);
this.tokenPath = "error";
throw new EnveloppeErrors((e as Error).message, { cause: e });
Expand Down
8 changes: 4 additions & 4 deletions src/settings/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,24 +71,24 @@ export async function autoCleanCondition(
if (settings.autoclean.enable)
new Notice(
i18next.t("error.autoClean", { what: translation }),
this.settings.plugin.noticeLength
plugin.settings.plugin.noticeLength
);
settings.autoclean.enable = false;
await plugin.saveSettings();
// @ts-ignore
autoCleanSetting.components[0].toggleEl.classList.remove("is-enabled");
settingsTab.renderSettingsPage(ESettingsTabId.Upload);
await settingsTab.renderSettingsPage(ESettingsTabId.Upload);
}
if (value.length === 0 && settings.behavior !== FolderSettings.Yaml) {
if (settings.autoclean.enable)
new Notice(
i18next.t("error.autoClean", { what: i18next.t("common.defaultName") }),
this.settings.plugin.noticeLength
plugin.settings.plugin.noticeLength
);
settings.autoclean.enable = false;
// @ts-ignore
autoCleanSetting.components[0].toggleEl.classList.remove("is-enabled");
settingsTab.renderSettingsPage(ESettingsTabId.Upload);
await settingsTab.renderSettingsPage(ESettingsTabId.Upload);
}
if (settings.autoclean.enable) {
// @ts-ignore
Expand Down

0 comments on commit d7c6a03

Please sign in to comment.