mirror of
https://github.com/zombieFox/nightTab.git
synced 2025-06-25 20:11:27 +02:00
[feature] add header button colour dot control
This commit is contained in:
parent
cdded4a772
commit
9ac5a3e5c9
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "nighttab",
|
"name": "nighttab",
|
||||||
"version": "4.5.0",
|
"version": "4.4.0",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "nighttab",
|
"name": "nighttab",
|
||||||
"version": "4.5.0",
|
"version": "4.4.0",
|
||||||
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
|
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -784,6 +784,12 @@
|
|||||||
<label for="control-header-button-coloraccent-show"><span class="label-icon"></span> Show Colour/Accent</label>
|
<label for="control-header-button-coloraccent-show"><span class="label-icon"></span> Show Colour/Accent</label>
|
||||||
</div>
|
</div>
|
||||||
<p class="control-header-button-coloraccent-show-helper form-helper small">Colour and Accent can also be found under Theme.</p>
|
<p class="control-header-button-coloraccent-show-helper form-helper small">Colour and Accent can also be found under Theme.</p>
|
||||||
|
<div class="form-indent">
|
||||||
|
<div class="input-wrap">
|
||||||
|
<input id="control-header-button-coloraccent-dot-show" class="control-header-button-coloraccent-dot-show" type="checkbox" tabindex="-1">
|
||||||
|
<label for="control-header-button-coloraccent-dot-show"><span class="label-icon"></span> Show colour dots</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
<div class="input-wrap">
|
<div class="input-wrap">
|
||||||
<label for="control-header-button-size">Size</label>
|
<label for="control-header-button-size">Size</label>
|
||||||
|
@ -1663,6 +1663,13 @@ var control = (function() {
|
|||||||
render.class();
|
render.class();
|
||||||
render.dependents();
|
render.dependents();
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
element: helper.e(".control-header-button-coloraccent-dot-show"),
|
||||||
|
path: "header.button.colorAccent.dot.show",
|
||||||
|
type: "checkbox",
|
||||||
|
func: function() {
|
||||||
|
header.render.button.dot();
|
||||||
|
}
|
||||||
}, {
|
}, {
|
||||||
element: helper.e(".control-header-button-size"),
|
element: helper.e(".control-header-button-size"),
|
||||||
path: "header.button.size",
|
path: "header.button.size",
|
||||||
@ -3482,6 +3489,12 @@ var control = (function() {
|
|||||||
_disable.input(".control-header-radius", true);
|
_disable.input(".control-header-radius", true);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
var _button = function() {
|
||||||
|
_disable.input(".control-header-button-coloraccent-dot-show", true);
|
||||||
|
if (state.get.current().header.button.colorAccent.show) {
|
||||||
|
_disable.input(".control-header-button-coloraccent-dot-show", false);
|
||||||
|
};
|
||||||
|
};
|
||||||
var _search = function() {
|
var _search = function() {
|
||||||
if (state.get.current().header.search.show) {
|
if (state.get.current().header.search.show) {
|
||||||
_disable.element(".control-header-search-style-label", false);
|
_disable.element(".control-header-search-style-label", false);
|
||||||
@ -3613,6 +3626,7 @@ var control = (function() {
|
|||||||
_clock();
|
_clock();
|
||||||
_date();
|
_date();
|
||||||
_shade();
|
_shade();
|
||||||
|
_button();
|
||||||
_search();
|
_search();
|
||||||
_greeting();
|
_greeting();
|
||||||
_transitional();
|
_transitional();
|
||||||
|
@ -149,6 +149,23 @@ var header = (function() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
action[state.get.current().header.button.style]();
|
action[state.get.current().header.button.style]();
|
||||||
|
},
|
||||||
|
dot: function() {
|
||||||
|
if (state.get.current().header.button.colorAccent.dot.show) {
|
||||||
|
helper.addClass(helper.getClosest(helper.e(".control-theme-color-rgb-quick"), ".input-wrap"), "input-color-dot");
|
||||||
|
helper.addClass(helper.getClosest(helper.e(".control-theme-color-rgb-quick"), ".input-wrap"), "input-color-dot-accent");
|
||||||
|
helper.removeClass(helper.getClosest(helper.e(".control-theme-color-rgb-quick"), ".input-wrap"), "input-hide");
|
||||||
|
helper.addClass(helper.getClosest(helper.e(".control-theme-accent-current-quick"), ".input-wrap"), "input-color-dot");
|
||||||
|
helper.addClass(helper.getClosest(helper.e(".control-theme-accent-current-quick"), ".input-wrap"), "input-color-dot-accent");
|
||||||
|
helper.removeClass(helper.getClosest(helper.e(".control-theme-accent-current-quick"), ".input-wrap"), "input-hide");
|
||||||
|
} else {
|
||||||
|
helper.removeClass(helper.getClosest(helper.e(".control-theme-color-rgb-quick"), ".input-wrap"), "input-color-dot");
|
||||||
|
helper.removeClass(helper.getClosest(helper.e(".control-theme-color-rgb-quick"), ".input-wrap"), "input-color-dot-accent");
|
||||||
|
helper.addClass(helper.getClosest(helper.e(".control-theme-color-rgb-quick"), ".input-wrap"), "input-hide");
|
||||||
|
helper.removeClass(helper.getClosest(helper.e(".control-theme-accent-current-quick"), ".input-wrap"), "input-color-dot");
|
||||||
|
helper.removeClass(helper.getClosest(helper.e(".control-theme-accent-current-quick"), ".input-wrap"), "input-color-dot-accent");
|
||||||
|
helper.addClass(helper.getClosest(helper.e(".control-theme-accent-current-quick"), ".input-wrap"), "input-hide");
|
||||||
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -105,7 +105,10 @@ var state = (function() {
|
|||||||
show: true
|
show: true
|
||||||
},
|
},
|
||||||
colorAccent: {
|
colorAccent: {
|
||||||
show: true
|
show: true,
|
||||||
|
dot: {
|
||||||
|
show: true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
style: "box",
|
style: "box",
|
||||||
size: 1
|
size: 1
|
||||||
|
@ -716,6 +716,12 @@ var update = (function() {
|
|||||||
data.state.header.button.colorAccent = data.state.header.button.accent;
|
data.state.header.button.colorAccent = data.state.header.button.accent;
|
||||||
delete data.state.header.button.accent;
|
delete data.state.header.button.accent;
|
||||||
return data;
|
return data;
|
||||||
|
},
|
||||||
|
"4.4.0": function(data) {
|
||||||
|
data.state.header.button.colorAccent.dot = {
|
||||||
|
show: true
|
||||||
|
};
|
||||||
|
return data;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
var version = (function() {
|
var version = (function() {
|
||||||
|
|
||||||
var current = "4.5.0";
|
var current = "4.4.0";
|
||||||
|
|
||||||
var name = "Naughty Goose";
|
var name = "Naughty Goose";
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"name": "nightTab",
|
"name": "nightTab",
|
||||||
"short_name": "nightTab",
|
"short_name": "nightTab",
|
||||||
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
|
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
|
||||||
"version": "4.5.0",
|
"version": "4.4.0",
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"chrome_url_overrides": {
|
"chrome_url_overrides": {
|
||||||
"newtab": "index.html"
|
"newtab": "index.html"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user