@@ -70,20 +70,16 @@ const customBackgroundCommand: Command = {
7070 } ,
7171 } ,
7272 {
73- id : "removeCustomBackground " ,
74- display : "Remove custom background" ,
73+ id : "removeLocalBackground " ,
74+ display : "Remove local background" ,
7575 icon : "fa-trash" ,
7676 alias : "remove background" ,
7777 available : async ( ) : Promise < boolean > => {
78- return (
79- ( await FileStorage . hasFile ( "LocalBackgroundFile" ) ) ||
80- Config . customBackground !== ""
81- ) ;
78+ return await FileStorage . hasFile ( "LocalBackgroundFile" ) ;
8279 } ,
8380 exec : async ( ) : Promise < void > => {
8481 try {
8582 await FileStorage . deleteFile ( "LocalBackgroundFile" ) ;
86- setConfig ( "customBackground" , "" ) ;
8783 await applyCustomBackground ( ) ;
8884 await updateUI ( ) ;
8985 } catch ( e ) {
@@ -93,6 +89,18 @@ const customBackgroundCommand: Command = {
9389 }
9490 } ,
9591 } ,
92+ {
93+ id : "removeUrlBackground" ,
94+ display : "Remove URL background" ,
95+ icon : "fa-trash" ,
96+ alias : "remove background" ,
97+ available : async ( ) : Promise < boolean > => {
98+ return Config . customBackground !== "" ;
99+ } ,
100+ exec : async ( ) : Promise < void > => {
101+ setConfig ( "customBackground" , "" ) ;
102+ } ,
103+ } ,
96104 ] ,
97105 } ,
98106} ;
0 commit comments