From 42488a339aa60fd814fc2eacaffcb2666e2cebf7 Mon Sep 17 00:00:00 2001 From: Arkadiusz Wieczorek Date: Sat, 29 Jan 2022 01:13:02 +0100 Subject: [PATCH] Update icons, add minValueLength to LocalStorage --- assets/logo.svg | 4748 +++++++++++++++++++++++++++++++++++++++++++ manifest.json | 10 +- options.tsx | 10 +- package.json | 3 +- sidebar/sidebar.tsx | 13 +- 5 files changed, 4773 insertions(+), 11 deletions(-) create mode 100644 assets/logo.svg diff --git a/assets/logo.svg b/assets/logo.svg new file mode 100644 index 0000000..e4f7c4f --- /dev/null +++ b/assets/logo.svg @@ -0,0 +1,4748 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Rtg + + + + + Rtg + + + + + Rtg + + + Rtg + + + + Rtg + + + + Rtg + Rtg + + + + + + Rtg + + + Rtg + + + + + + + + + + + + + + + + + + + + + + + + RENTGEN + add-on + + + + + + + + + + + + diff --git a/manifest.json b/manifest.json index f254304..9eb8487 100644 --- a/manifest.json +++ b/manifest.json @@ -10,12 +10,18 @@ "sidebar_action": { "default_title": "Rentgen", "default_panel": "sidebar/sidebar.html", - "default_icon": "icons/logo-black-square.svg", + "default_icon": { + "16": "assets/logo.svg", + "32": "assets/logo.svg", + "64": "assets/logo.svg" + }, "browser_style": true, "open_at_install": true }, "icons": { - "48": "icons/logo-black-square.svg" + "16": "assets/logo.svg", + "32": "assets/logo.svg", + "64": "assets/logo.svg" }, "permissions": [ "proxy", diff --git a/options.tsx b/options.tsx index 951aec3..c923b63 100644 --- a/options.tsx +++ b/options.tsx @@ -76,9 +76,13 @@ export default function Options({ type="number" id="minValueLength" value={minValueLength} - onChange={(e) => - setMinValueLength(parseInt(e.target.value)) - } + onChange={(e) => { + setMinValueLength(parseInt(e.target.value)); + localStorage.setItem( + 'minValueLength', + e.target.value + ); + }} />
diff --git a/package.json b/package.json index 813f85f..e0d4e99 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,8 @@ "type": "git", "url": "https://git.internet-czas-dzialac.pl/icd/rentgen.git" }, - "author": "Kuba Orlik, Arkadiusz Wieczorek (internet-czas-dzialac.pl)", + "homepage": "https://git.internet-czas-dzialac.pl/icd/rentgen", + "author": "Kuba Orlik, Arkadiusz Wieczorek", "license": "GPL-3.0-or-later", "dependencies": { "@iabtcf/core": "^1.3.1", diff --git a/sidebar/sidebar.tsx b/sidebar/sidebar.tsx index 90ea53e..2f72040 100644 --- a/sidebar/sidebar.tsx +++ b/sidebar/sidebar.tsx @@ -25,7 +25,12 @@ import './sidebar.scss'; const Sidebar = () => { const [origin, setOrigin] = useState(null); - const [minValueLength, setMinValueLength] = useState(7); + // const [minValueLength, setMinValueLength] = useState(7); + const [minValueLength, setMinValueLength] = useState( + localStorage.getItem('minValueLength') === null + ? 7 + : (localStorage.getItem('minValueLength') as unknown as number) + ); const [cookiesOnly, setCookiesOnly] = useState(false); const [stolenDataView, setStolenDataView] = useState(true); const [cookiesOrOriginOnly, setCookiesOrOriginOnly] = @@ -41,7 +46,7 @@ const Sidebar = () => { ); const [logoVisibility, setLogoVisibility] = useState( localStorage.getItem('logoVisibility') === null - ? true + ? false : localStorage.getItem('logoVisibility') == 'true' ? true : false @@ -166,9 +171,7 @@ const Sidebar = () => { }} > - - Utwórz wiadomość dla administratora witryny - + Utwórz wiadomość dla administratora witryny ) : null}