Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions frontend/src/ts/commandline/lists/custom-background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import FileStorage from "../../utils/file-storage";
import { applyCustomBackground } from "../../controllers/theme-controller";
import { updateUI } from "../../elements/settings/custom-background-picker";
import { showNoticeNotification } from "../../stores/notifications";
import Config, { setConfig } from "../../config";

const fromMeta = buildCommandForConfigKey("customBackground");

Expand Down Expand Up @@ -88,6 +89,18 @@ const customBackgroundCommand: Command = {
}
},
},
{
id: "removeUrlBackground",
display: "Remove URL background",
icon: "fa-trash",
alias: "remove background",
available: async (): Promise<boolean> => {
return Config.customBackground !== "";
},
exec: async (): Promise<void> => {
setConfig("customBackground", "");
},
},
],
},
};
Expand Down