Skip to content

Commit 0c62bf6

Browse files
committed
[design] improve empty links and search
1 parent 8daa349 commit 0c62bf6

File tree

2 files changed

+12
-19
lines changed

2 files changed

+12
-19
lines changed

‎src/css/link.css‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -566,15 +566,6 @@
566566
display: none;
567567
}
568568

569-
.link-empty-heading{
570-
color:rgb(var(--theme-style-text));
571-
margin-bottom:0;
572-
}
573-
574-
.link-empty-heading:not(:only-child){
575-
margin-bottom:0.5em;
576-
}
577-
578569
.is-link-style-list .link-name{
579570
white-space: nowrap;
580571
}

‎src/js/link.js‎

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,28 +1079,30 @@ var link = (function(){
10791079
vargroup=helper.node("div|class:group");
10801080
vargroupBody=helper.node("div|class:group-body");
10811081
varlinkEmpty=helper.node("div|class:link-empty");
1082-
varh1=helper.node("h1:No bookmarks added|class:link-empty-heading");
1083-
varpara=helper.node("p:Why not add some?|class:small muted");
1084-
linkEmpty.appendChild(h1);
1085-
linkEmpty.appendChild(para);
1082+
varpara1=helper.node("p:No groups or bookmarks");
1083+
varpara2=helper.node("p:Why not add a one?|class:small muted");
1084+
linkEmpty.appendChild(para1);
1085+
linkEmpty.appendChild(para2);
10861086
groupBody.appendChild(linkEmpty);
10871087
group.appendChild(groupBody);
10881088
returngroup;
10891089
},
10901090
item: function(){
10911091
varlinkEmpty=helper.node("div|class:link-empty");
1092-
varpara=helper.node("para:Empty group|class:link-empty-heading");
1093-
linkEmpty.appendChild(para);
1092+
varpara1=helper.node("p:Empty group");
1093+
varpara2=helper.node("p:Why not add a bookmark?|class:small muted");
1094+
linkEmpty.appendChild(para1);
1095+
linkEmpty.appendChild(para2);
10941096
returnlinkEmpty;
10951097
},
10961098
search: function(){
10971099
vargroup=helper.node("div|class:group");
10981100
vargroupBody=helper.node("div|class:group-body");
10991101
varlinkEmpty=helper.node("div|class:link-empty");
1100-
varh1=helper.node("h1:No matching bookmarks found|class:link-empty-heading");
1101-
varpara=helper.node("p:\"Enter\" to Search "+state.get().header.search.engine[state.get().header.search.engine.selected].name+"|class:small muted");
1102-
linkEmpty.appendChild(h1);
1103-
linkEmpty.appendChild(para);
1102+
varpara1=helper.node("p:No matching bookmarks found");
1103+
varpara2=helper.node("p:\"Enter\" to Search "+state.get().header.search.engine[state.get().header.search.engine.selected].name+"|class:small muted");
1104+
linkEmpty.appendChild(para1);
1105+
linkEmpty.appendChild(para2);
11041106
groupBody.appendChild(linkEmpty);
11051107
group.appendChild(groupBody);
11061108
returngroup;

0 commit comments

Comments
(0)