This commit is contained in:
Kuldeep Matharu 2024-08-10 12:15:46 +01:00
parent 989c79afb8
commit ad9c0ed9a9
9 changed files with 43 additions and 20 deletions

6
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "nightTab",
"version": "7.6.0",
"version": "7.7.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "nightTab",
"version": "7.6.0",
"version": "7.7.0",
"license": "GPL-3",
"devDependencies": {
"copy-webpack-plugin": "^12.0.2",
@ -6582,4 +6582,4 @@
}
}
}
}
}

View File

@ -1,6 +1,6 @@
{
"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.",
"main": "index.js",
"scripts": {
@ -44,4 +44,4 @@
"webpack-merge": "^5.10.0",
"zip-webpack-plugin": "^4.0.1"
}
}
}

View File

@ -32,7 +32,6 @@ groupAndBookmark.render = () => {
}
} else {
group.sort.bind();

View File

@ -1,4 +1,5 @@
import { state } from '../state';
import { data } from '../data';
import { Notification } from '../notification';
@ -29,15 +30,21 @@ layout.area = {
const body = document.querySelector('body');
const notification = new Notification({
children: [
if (!state.get.current().header.search.removalNotice) {
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 })
const notification = new Notification({
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 })
],
dismissAction: () => {
state.get.current().header.search.removalNotice = true;
data.save();
}
});
]
});
body.append(notification.notification());
body.append(notification.notification());
};
body.append(layout.element.layout);

View File

@ -6,6 +6,7 @@ import './index.css';
export const Notification = function ({
children = [],
dismissAction = false,
} = {}) {
this.element = {
@ -18,6 +19,13 @@ export const Notification = function ({
size: 'small',
style: ['ring'],
func: () => {
if (dismissAction) {
dismissAction();
}
this.element.notification.remove();
}
}),
};

View File

@ -53,7 +53,8 @@ state.default = {
text: { justify: 'center' },
size: 100,
newLine: false,
newTab: false
newTab: false,
removalNotice: false
},
order: [],
edit: false

View File

@ -6,7 +6,7 @@ const update = {};
update.mod = updateLegacy.get();
update.mod['7.0.0'] = function(data) {
update.mod['7.0.0'] = function (data) {
data.state.header.order.splice(data.state.header.order.indexOf('editAdd'), 1);
data.state.header.order.splice(data.state.header.order.indexOf('colorAccent'), 1);
@ -573,7 +573,7 @@ update.mod['7.0.0'] = function(data) {
};
update.mod['7.1.0'] = function(data) {
update.mod['7.1.0'] = function (data) {
data.state.layout.favicon = '';
@ -608,7 +608,7 @@ update.mod['7.1.0'] = function(data) {
};
update.mod['7.4.0'] = function(data) {
update.mod['7.4.0'] = function (data) {
data.state.layout.overscroll = {
active: data.state.layout.overscroll,
@ -619,7 +619,7 @@ update.mod['7.4.0'] = function(data) {
};
update.mod['7.5.0'] = function(data) {
update.mod['7.5.0'] = function (data) {
data.state.language = 'system';
@ -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) => {
// loop over all updates in mod.all object

View File

@ -1,6 +1,6 @@
export const version = {};
version.number = '7.6.0';
version.number = '7.7.0';
version.name = 'Nebulous Lobster';

View File

@ -2,7 +2,7 @@
"name": "__MSG_appName__",
"short_name": "__MSG_appShortName__",
"description": "__MSG_appDescription__",
"version": "7.6.0",
"version": "7.7.0",
"manifest_version": 3,
"default_locale": "en_GB",
"chrome_url_overrides": {
@ -14,4 +14,4 @@
"128": "icon/icon-128.png",
"512": "icon/icon-512.png"
}
}
}