File tree Expand file tree Collapse file tree 1 file changed +19
-4
lines changed
Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -62,17 +62,18 @@ export default function fontManager() {
6262 const fontNames = fonts . getNames ( ) ;
6363 let $currentItem ;
6464 const content = [ ] ;
65+ const defaultAppliedTargets = getAppliedTargets ( "" ) ;
6566
6667 const $defaultItem = (
6768 < FontItem
6869 name = { defaultAppFontLabel }
69- appliedTargets = { getAppliedTargets ( "" ) }
70+ appliedTargets = { defaultAppliedTargets }
7071 subtitle = "System default app font"
7172 deletable = { false }
7273 onSelect = { ( ) => chooseApplyTarget ( "" ) }
7374 />
7475 ) ;
75- if ( getAppliedTargets ( "" ) . length ) $currentItem = $defaultItem ;
76+ if ( defaultAppliedTargets . length ) $currentItem = $defaultItem ;
7677 content . push ( $defaultItem ) ;
7778
7879 fontNames . forEach ( ( fontName ) => {
@@ -248,8 +249,22 @@ export default function fontManager() {
248249 }
249250
250251 function getTargetOptionText ( fontName , target ) {
251- const action = fontName ? "Apply" : "Reset" ;
252- return `${ action } to ${ targetLabels [ target ] } ` ;
252+ if ( fontName ) {
253+ return `Apply to ${ targetLabels [ target ] } ` ;
254+ }
255+
256+ switch ( target ) {
257+ case "app" :
258+ return "Reset App font" ;
259+ case "editor" :
260+ return "Reset Editor font" ;
261+ case "terminal" :
262+ return "Reset Terminal font" ;
263+ case "all" :
264+ return "Reset all fonts" ;
265+ default :
266+ return "Reset font" ;
267+ }
253268 }
254269
255270 async function chooseApplyTarget ( fontName ) {
You can’t perform that action at this time.
0 commit comments