Skip to content

Commit

Permalink
UX: Hide Font Toggler
Browse files Browse the repository at this point in the history
I have decided to hide the toggle button for fonts in the fontmanager.
This was done to help with confusion users experienced with the menu.
This feature will stay implemented in case in the future I choose to install system fonts.
  • Loading branch information
btpf committed Aug 26, 2023
1 parent 5ff8cf1 commit 972b27a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/routes/Settings/pages/Fonts/FontManager/FontManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ const FontManager = (props:any)=>{
// // this means if the name has an extension like .ttf
// if(item.includes(".")){
const fontName = item.split(".")[0].replaceAll(" ", "_")
console.log("LOADING", fontName, "With path", newPath)
const font = new FontFace(fontName, `url(${convertFileSrc(newPath)})`);
// // wait for font to be loaded
font.load().then(()=>{
Expand Down Expand Up @@ -103,7 +102,6 @@ const FontManager = (props:any)=>{
step={null}
onChange={(e)=>{
if(typeof e === "number"){
// dispatch(SetProgress({view: 0, progress: e/1000}))
setSelectedWeight(e)
}

Expand Down Expand Up @@ -140,7 +138,7 @@ const FontManager = (props:any)=>{
console.log("Font deleted")
})
}} className={styles.trash}/>
<input className={styles.selector} checked={fontList[mappedFontName]} type="radio" onChange={()=>{/*Removes error from console */}} onClick={()=>{
<input style={{display:"none"}} className={styles.selector} checked={fontList[mappedFontName]} type="radio" onChange={()=>{/*Removes error from console */}} onClick={()=>{
const newObj = {} as {[key: string]: boolean}
newObj[mappedFontName] = !fontList[mappedFontName]
const newList = {...fontList, ...newObj}
Expand Down

0 comments on commit 972b27a

Please sign in to comment.