Skip to content

Commit 8462322

Browse files
refactor: remove unused formatLabel function and simplify label creation
1 parent dfd029f commit 8462322

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

remote.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -704,15 +704,6 @@ const Remote = {
704704
}
705705
},
706706

707-
formatLabel (string) {
708-
709-
/*
710-
* let result = string.replace(/([A-Z])/g, " $1" );
711-
* return result.charAt(0).toUpperCase() + result.slice(1);
712-
*/
713-
return string;
714-
},
715-
716707
formatPosition (string) {
717708
return string.replaceAll("_", " ").replaceAll(/\w\S*/g, (txt) => txt.at(0).toUpperCase() + txt.slice(1).toLowerCase());
718709
},
@@ -906,7 +897,7 @@ const Remote = {
906897
const label = document.createElement("label");
907898
label.htmlFor = key;
908899
label.className = "config-label";
909-
const desc = Remote.createSymbolText(`fa fa-fw ${symbol}`, this.formatLabel(name), false, "span");
900+
const desc = Remote.createSymbolText(`fa fa-fw ${symbol}`, name, false, "span");
910901
desc.className = "label-name";
911902
label.append(desc);
912903

0 commit comments

Comments
 (0)