From 979fba0af1fe3c7b7925f445075a759d1c1f882a Mon Sep 17 00:00:00 2001 From: Harsh Shah Date: Tue, 4 Apr 2023 15:20:06 +0530 Subject: [PATCH] Feat : Save and import side settings There were requests from multiple users that they use squoosh for compression but for each iteration side settings resets to default causing issues and there is no way to save and import side settings. There will be two buttons adjacent to copy-over save side settings : This will save side encoder and latest settings to localstorage of browser import side settings : This will import side encoder and latest settings from localstorage of browser and replace the existing settings Also if there are saved settings in locaStorage then whenever user loads the app it will take that settings and populate the side so user do not have to repeatedly enter same settings for similar compression operation subject to user has saved side settings Update:1 Import settings button remains disabled if there is nothing to import Whenever the side setting is saved there will be event fired and eventually listened to enable import button All 2 operations show notifications now Import notification has undo option Update : 2 Changed Icon SVGs --- .../lazy-app/Compress/Options/style.css | 2 +- src/client/lazy-app/icons/index.tsx | 36 ++++++++++--------- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/src/client/lazy-app/Compress/Options/style.css b/src/client/lazy-app/Compress/Options/style.css index 82322be5..dfe2c414 100644 --- a/src/client/lazy-app/Compress/Options/style.css +++ b/src/client/lazy-app/Compress/Options/style.css @@ -125,7 +125,7 @@ composes: title-button; svg { - fill: var(--header-text-color); + stroke: var(--header-text-color); } } diff --git a/src/client/lazy-app/icons/index.tsx b/src/client/lazy-app/icons/index.tsx index 265b72c0..c3a640d9 100644 --- a/src/client/lazy-app/icons/index.tsx +++ b/src/client/lazy-app/icons/index.tsx @@ -99,25 +99,29 @@ export const SwapIcon = () => ( ); export const SaveIcon = () => ( - - - - + + + + + ); export const ImportIcon = () => ( - - - + + + + + );