Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit b314670

Browse files
committed
[feature] add control for link item line
1 parent 29f14af commit b314670

6 files changed

Lines changed: 39 additions & 2 deletions

File tree

css/link.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
background-color: rgb(var(--gray-02));
6666
border-radius: var(--radius);
6767
width: 100%;
68-
height: calc(100% - var(--line-width));
68+
height: 100%;
6969
display: flex;
7070
z-index: 3;
7171
overflow: hidden;
@@ -74,6 +74,10 @@
7474
transition: background-color var(--animation-speed-fast) ease-in-out, height var(--animation-speed-fast) ease-in-out, box-shadow var(--animation-speed-fast) ease-in-out;
7575
}
7676

77+
.is-link-item-line-show .link-panel-front {
78+
height: calc(100% - var(--line-width));
79+
}
80+
7781
.link-panel-front:hover,
7882
.link-panel-front:focus {
7983
background-color: rgb(var(--gray-03));

index.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -747,6 +747,11 @@ <h1 class="menu-item-header-text">Bookmarks</h1>
747747
</div>
748748
</div>
749749
<hr>
750+
<div class="input-wrap">
751+
<input id="control-link-item-line-show" class="control-link-item-line-show" type="checkbox" tabindex="1">
752+
<label for="control-link-item-line-show">Tile line</label>
753+
</div>
754+
<hr>
750755
<div class="input-wrap">
751756
<label for="control-link-area-gap">Gap size</label>
752757
<input id="control-link-area-gap" class="control-link-area-gap" type="range" min="0" max="20" value="0" tabindex="1">

js/control.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,6 +1419,13 @@ var control = (function() {
14191419
func: function() {
14201420
render();
14211421
}
1422+
}, {
1423+
element: helper.e(".control-link-item-line-show"),
1424+
path: "link.item.line.show",
1425+
type: "checkbox",
1426+
func: function() {
1427+
render();
1428+
}
14221429
}, {
14231430
element: helper.e(".control-link-area-gap"),
14241431
path: "link.area.gap",
@@ -1849,6 +1856,7 @@ var control = (function() {
18491856
helper.removeClass(html, "is-link-url-show");
18501857
helper.removeClass(html, "is-link-url-style-light");
18511858
helper.removeClass(html, "is-link-url-style-dark");
1859+
helper.removeClass(html, "is-link-item-line-show");
18521860
helper.removeClass(html, "is-link-item-alignment-horizontal-left");
18531861
helper.removeClass(html, "is-link-item-alignment-horizontal-center");
18541862
helper.removeClass(html, "is-link-item-alignment-horizontal-right");
@@ -1872,6 +1880,9 @@ var control = (function() {
18721880
if (state.get().link.item.url.show) {
18731881
helper.addClass(html, "is-link-url-show");
18741882
};
1883+
if (state.get().link.item.line.show) {
1884+
helper.addClass(html, "is-link-item-line-show");
1885+
};
18751886
if (state.get().link.edit) {
18761887
helper.addClass(html, "is-link-edit");
18771888
link.render.tabIndex();
@@ -2200,6 +2211,7 @@ var control = (function() {
22002211
helper.e(".control-link-item-url-show").disabled = true;
22012212
helper.e(".control-link-item-url-style-dark").disabled = true;
22022213
helper.e(".control-link-item-url-style-light").disabled = true;
2214+
helper.e(".control-link-item-line-show").disabled = true;
22032215
helper.e("[for=control-link-area-gap]").setAttribute("disabled", "");
22042216
helper.e(".control-link-area-gap").disabled = true;
22052217
helper.e(".control-link-item-display-alignment-horizontal-label").setAttribute("disabled", "");
@@ -2231,6 +2243,7 @@ var control = (function() {
22312243
helper.e(".control-link-item-display-show").disabled = false;
22322244
helper.e(".control-link-item-name-show").disabled = false;
22332245
helper.e(".control-link-item-url-show").disabled = false;
2246+
helper.e(".control-link-item-line-show").disabled = false;
22342247
helper.e("[for=control-link-area-gap]").removeAttribute("disabled");
22352248
helper.e(".control-link-area-gap").disabled = false;
22362249
helper.e(".control-link-new-tab").disabled = false;

js/state.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ var state = (function() {
164164
show: true,
165165
style: "dark"
166166
},
167+
line: {
168+
show: true
169+
}
167170
},
168171
show: true,
169172
newTab: false,

js/update.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,14 @@ var update = (function() {
419419
return data;
420420
};
421421

422+
var _update_370 = function(data) {
423+
data.version = "3.7.0";
424+
data.state.link.item.line = {
425+
show: true
426+
};
427+
return data;
428+
};
429+
422430
// var _update_300 = function(data) {
423431
// data.version = 3.00;
424432
// return data;
@@ -529,6 +537,10 @@ var update = (function() {
529537
console.log("\t= running update 3.6.0");
530538
data = _update_360(data);
531539
};
540+
if (version.compare(data.version, "3.7.0") == -1) {
541+
console.log("\t= running update 3.7.0");
542+
data = _update_370(data);
543+
};
532544
};
533545
// if no update is needed
534546
// version bump

js/version.js

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

33
// version is normally bumped when the state needs changing or any new functionality is added
4-
var current = "3.6.0";
4+
var current = "3.7.0";
55

66
var compare = function(a, b) {
77
var pa = a.split(".");

0 commit comments

Comments
 (0)