mirror of
https://github.com/zombieFox/nightTab.git
synced 2024-11-24 00:53:53 +01:00
dismiss
This commit is contained in:
parent
989c79afb8
commit
ad9c0ed9a9
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "nightTab",
|
"name": "nightTab",
|
||||||
"version": "7.6.0",
|
"version": "7.7.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "nightTab",
|
"name": "nightTab",
|
||||||
"version": "7.6.0",
|
"version": "7.7.0",
|
||||||
"license": "GPL-3",
|
"license": "GPL-3",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"copy-webpack-plugin": "^12.0.2",
|
"copy-webpack-plugin": "^12.0.2",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "nightTab",
|
"name": "nightTab",
|
||||||
"version": "7.6.0",
|
"version": "7.7.0",
|
||||||
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks with nightTab.",
|
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks with nightTab.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -32,7 +32,6 @@ groupAndBookmark.render = () => {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
group.sort.bind();
|
group.sort.bind();
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { state } from '../state';
|
import { state } from '../state';
|
||||||
|
import { data } from '../data';
|
||||||
|
|
||||||
import { Notification } from '../notification';
|
import { Notification } from '../notification';
|
||||||
|
|
||||||
@ -29,16 +30,22 @@ layout.area = {
|
|||||||
|
|
||||||
const body = document.querySelector('body');
|
const body = document.querySelector('body');
|
||||||
|
|
||||||
|
if (!state.get.current().header.search.removalNotice) {
|
||||||
|
|
||||||
const notification = new Notification({
|
const notification = new Notification({
|
||||||
children: [
|
children: [
|
||||||
|
complexNode({ tag: 'p', text: 'Search in nightTab will be removed to comply with a <a href="https://developer.chrome.com/blog/cws-policy-updates-2024" target="_blank">Chrome policy change</a>. Filtering bookmarks will remain. Read more about this change on the <a href="https://github.com/zombieFox/nightTab/discussions/460" target="_blank">nightTab repo</a>.', attr: [{ key: 'class', value: 'small' }], complexText: true })
|
||||||
complexNode({ tag: 'p', text: 'Search in nightTab will be removed to comply with a <a href="https://developer.chrome.com/blog/cws-policy-updates-2024" target="_blank">Chrome policy change</a>. Filtering bookmarks will remain. Read more about this change on the <a href="https://github.com/zombieFox/nightTab/discussions/460" target="_blank">nightTab repo</a>.', complexText: true })
|
],
|
||||||
|
dismissAction: () => {
|
||||||
]
|
state.get.current().header.search.removalNotice = true;
|
||||||
|
data.save();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
body.append(notification.notification());
|
body.append(notification.notification());
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
body.append(layout.element.layout);
|
body.append(layout.element.layout);
|
||||||
|
|
||||||
const resize = new ResizeObserver((entries) => {
|
const resize = new ResizeObserver((entries) => {
|
||||||
|
@ -6,6 +6,7 @@ import './index.css';
|
|||||||
|
|
||||||
export const Notification = function ({
|
export const Notification = function ({
|
||||||
children = [],
|
children = [],
|
||||||
|
dismissAction = false,
|
||||||
} = {}) {
|
} = {}) {
|
||||||
|
|
||||||
this.element = {
|
this.element = {
|
||||||
@ -18,6 +19,13 @@ export const Notification = function ({
|
|||||||
size: 'small',
|
size: 'small',
|
||||||
style: ['ring'],
|
style: ['ring'],
|
||||||
func: () => {
|
func: () => {
|
||||||
|
|
||||||
|
if (dismissAction) {
|
||||||
|
dismissAction();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.element.notification.remove();
|
||||||
|
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
@ -53,7 +53,8 @@ state.default = {
|
|||||||
text: { justify: 'center' },
|
text: { justify: 'center' },
|
||||||
size: 100,
|
size: 100,
|
||||||
newLine: false,
|
newLine: false,
|
||||||
newTab: false
|
newTab: false,
|
||||||
|
removalNotice: false
|
||||||
},
|
},
|
||||||
order: [],
|
order: [],
|
||||||
edit: false
|
edit: false
|
||||||
|
@ -627,6 +627,14 @@ update.mod['7.5.0'] = function(data) {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
update.mod['7.7.0'] = function (data) {
|
||||||
|
|
||||||
|
data.state.header.search.removalNotice = false;
|
||||||
|
|
||||||
|
return data;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
update.run = (data) => {
|
update.run = (data) => {
|
||||||
|
|
||||||
// loop over all updates in mod.all object
|
// loop over all updates in mod.all object
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
export const version = {};
|
export const version = {};
|
||||||
|
|
||||||
version.number = '7.6.0';
|
version.number = '7.7.0';
|
||||||
|
|
||||||
version.name = 'Nebulous Lobster';
|
version.name = 'Nebulous Lobster';
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"name": "__MSG_appName__",
|
"name": "__MSG_appName__",
|
||||||
"short_name": "__MSG_appShortName__",
|
"short_name": "__MSG_appShortName__",
|
||||||
"description": "__MSG_appDescription__",
|
"description": "__MSG_appDescription__",
|
||||||
"version": "7.6.0",
|
"version": "7.7.0",
|
||||||
"manifest_version": 3,
|
"manifest_version": 3,
|
||||||
"default_locale": "en_GB",
|
"default_locale": "en_GB",
|
||||||
"chrome_url_overrides": {
|
"chrome_url_overrides": {
|
||||||
|
Loading…
Reference in New Issue
Block a user