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

4
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",

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": {

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,16 +30,22 @@ layout.area = {
const body = document.querySelector('body');
if (!state.get.current().header.search.removalNotice) {
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>.', 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>.', attr: [{ key: 'class', value: 'small' }], complexText: true })
],
dismissAction: () => {
state.get.current().header.search.removalNotice = true;
data.save();
}
});
body.append(notification.notification());
};
body.append(layout.element.layout);
const resize = new ResizeObserver((entries) => {

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

@ -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": {