Skip to content

Commit 682b238

Browse files
committed
[refactor] improve link add and edit form help text
1 parent a6aa73e commit 682b238

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

‎src/css/form.css‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1032,7 +1032,7 @@ input[type="range"][disabled]::-moz-range-progress{
10321032

10331033
.form-group{
10341034
margin:001em0;
1035-
display:inline-flex;
1035+
display: flex;
10361036
justify-content: flex-start;
10371037
align-items: stretch;
10381038
width:100%;

‎src/js/link.js‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -476,15 +476,15 @@ var link = (function(){
476476
form.querySelector(".link-form-input-icon").setAttribute("disabled","");
477477
form.querySelector(".form-group-text").setAttribute("disabled","");
478478
form.querySelector(".link-form-input-icon").setAttribute("disabled","");
479-
form.querySelector(".link-form-input-helper-icon").setAttribute("disabled","");
479+
helper.addClass(form.querySelector(".link-form-input-icon-helper"),"disabled");
480480
form.querySelector(".link-form-icon-clear").setAttribute("disabled","");
481481
form.querySelector(".link-form-text-icon").tabIndex=-1;
482482
}elseif(stagedLink.data.display=="icon"){
483483
form.querySelector(".link-form-input-letter").setAttribute("disabled","");
484484
form.querySelector(".link-form-input-icon").removeAttribute("disabled");
485485
form.querySelector(".form-group-text").removeAttribute("disabled");
486486
form.querySelector(".link-form-input-icon").removeAttribute("disabled");
487-
form.querySelector(".link-form-input-helper-icon").removeAttribute("disabled");
487+
helper.removeClass(form.querySelector(".link-form-input-icon-helper"),"disabled");
488488
form.querySelector(".link-form-icon-clear").removeAttribute("disabled");
489489
form.querySelector(".link-form-input-display-icon").checked=true;
490490
form.querySelector(".link-form-text-icon").tabIndex=1;
@@ -593,20 +593,20 @@ var link = (function(){
593593
variconFormGroupText=helper.node("div|class:form-group-text link-form-text-icon,tabindex:-1,disabled");
594594
variconFormGroupClear=helper.node("button|class:link-form-icon-clear button mb-0,type:button,tabindex:1,disabled");
595595
variconFormGroupClearIcon=helper.node("span|class:icon-close");
596-
variconPara=helper.node("p:Refer to the \"Free\" and \"Brand\" icons from FontAwesome for full set of icons supported.|class:link-form-input-helper-icon input-helper small muted,disabled");
596+
variconPara=helper.node("p:Refer to the \"Free\" and \"Brand\" icons from FontAwesome for full set of icons supported.|class:link-form-input-icon-helper form-helper small muteddisabled");
597597
varnameInputWrap=helper.node("div|class:input-wrap");
598598
varnameLabel=helper.node("label:Name|for:link-form-input-name");
599599
varnameInput=helper.node("input|type:text,class:link-form-input-name mb-0,id:link-form-input-name,placeholder:Example,tabindex:1,autocomplete:off,autocorrect:off,autocapitalize:off,spellcheck:false");
600600
varurlInputWrap=helper.node("div|class:input-wrap");
601601
varurlLabel=helper.node("label:URL|for:link-form-input-url");
602602
varurlInput=helper.node("input|type:text,class:link-form-input-url mb-0,id:link-form-input-url,placeholder:https://www.example.com/,tabindex:1,autocomplete:off,autocorrect:off,autocapitalize:off,spellcheck:false");
603603
varcolorWrap=helper.node("div|class:input-wrap");
604-
varcolorFormGroup=helper.node("div|class:form-group");
604+
varcolorFormGroup=helper.node("div|class:form-group mb-0");
605605
varcolorLabel=helper.node("label:Accent override|for:link-form-input-color");
606606
varcolorInput=helper.node("input|id:link-form-input-color,class:link-form-input-color mb-0,type:color,value:"+helper.rgbToHex(state.get().theme.accent.current)+",tabindex:1");
607607
varcolorButtonRefresh=helper.node("button|class:button mb-0,type:button,tabindex:1");
608608
varcolorButtonRefreshIcon=helper.node("span|class:icon-refresh");
609-
varcolorPara=helper.node("p:Use this colour to override the global Accent colour.|class:input-helper small muted");
609+
varcolorInputHelper=helper.node("p:Use this colour to override the global Accent colour.|class:form-helper small muted");
610610
varletterRadioInputWrap=helper.node("div|class:input-wrap");
611611
varletterRadioInput=helper.node("input|class:link-form-input-display-letter,id:link-form-input-display-letter,type:radio,name:link-form-input-display,tabindex:1,checked,value:letter");
612612
varletterRadioLable=helper.node("label:Letters|for:link-form-input-display-letter");
@@ -644,8 +644,8 @@ var link = (function(){
644644
colorFormGroup.appendChild(colorButtonRefresh);
645645
colorWrap.appendChild(colorLabel);
646646
colorWrap.appendChild(colorFormGroup);
647-
colorWrap.appendChild(colorPara);
648647
fieldset.appendChild(colorWrap);
648+
fieldset.appendChild(colorInputHelper);
649649
form.appendChild(fieldset);
650650

651651
letterRadioInput.addEventListener("change",function(event){
@@ -690,15 +690,15 @@ var link = (function(){
690690
letterInput.removeAttribute("disabled");
691691
iconInput.setAttribute("disabled","");
692692
iconFormGroupText.setAttribute("disabled","");
693-
iconPara.setAttribute("disabled","");
693+
helper.addClass(form.querySelector(".link-form-input-icon-helper"),"disabled");
694694
iconFormGroupClear.setAttribute("disabled","");
695695
iconFormGroupText.tabIndex=-1;
696696
},false);
697697
iconRadioInput.addEventListener("change",function(event){
698698
letterInput.setAttribute("disabled","");
699699
iconInput.removeAttribute("disabled");
700700
iconFormGroupText.removeAttribute("disabled");
701-
iconPara.removeAttribute("disabled");
701+
helper.removeClass(form.querySelector(".link-form-input-icon-helper"),"disabled");
702702
iconFormGroupClear.removeAttribute("disabled");
703703
iconFormGroupText.tabIndex=1;
704704
},false);

‎src/js/version.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
varversion=(function(){
22

3-
varcurrent="3.64.0";
3+
varcurrent="3.65.0";
44

55
varcompare=function(a,b){
66
varpa=a.split(".");

‎src/manifest.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "nightTab",
33
"short_name": "nightTab",
44
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
5-
"version": "3.64.0",
5+
"version": "3.65.0",
66
"manifest_version": 2,
77
"chrome_url_overrides":{
88
"newtab": "index.html"

0 commit comments

Comments
(0)