From 4edb99003fb11e042f7140b378d60c734ebf47f1 Mon Sep 17 00:00:00 2001 From: visortelle Date: Tue, 8 Feb 2022 20:08:41 +0100 Subject: [PATCH] Browser ext => 0.0.8. Add Reset settings button. --- browser-extension/assets/manifest-v2.json | 2 +- browser-extension/assets/manifest-v3.json | 2 +- browser-extension/popup/Popup.module.css | 19 +++++++++++++++++++ browser-extension/popup/Popup.tsx | 18 +++++++++++------- 4 files changed, 32 insertions(+), 9 deletions(-) diff --git a/browser-extension/assets/manifest-v2.json b/browser-extension/assets/manifest-v2.json index 88c93a5..3fbf534 100644 --- a/browser-extension/assets/manifest-v2.json +++ b/browser-extension/assets/manifest-v2.json @@ -4,7 +4,7 @@ "short_name": "Haskell Spotlight", "description": "Search on Hackage, Hoogle and more soon.", "homepage_url": "https://github.com/haskell-spotlight/haskell-spotlight", - "version": "0.0.7", + "version": "0.0.8", "icons": { "192": "images/icon-192.png" }, "content_scripts": [ { diff --git a/browser-extension/assets/manifest-v3.json b/browser-extension/assets/manifest-v3.json index 55cc9bc..1604623 100644 --- a/browser-extension/assets/manifest-v3.json +++ b/browser-extension/assets/manifest-v3.json @@ -4,7 +4,7 @@ "short_name": "Haskell Spotlight", "description": "Search on Hackage, Hoogle and more soon.", "homepage_url": "https://github.com/haskell-spotlight/haskell-spotlight", - "version": "0.0.7", + "version": "0.0.8", "icons": { "192": "images/icon-192.png" }, "content_scripts": [ { diff --git a/browser-extension/popup/Popup.module.css b/browser-extension/popup/Popup.module.css index f626d0c..2ca8fcb 100644 --- a/browser-extension/popup/Popup.module.css +++ b/browser-extension/popup/Popup.module.css @@ -69,3 +69,22 @@ .kbdKeyActive { filter: grayscale(0); } + +.resetKeyBindingsButton { + text-align: center; + background-color: #5e5086; + color: #fff; + border-radius: 8px; + display: inline-flex; + margin: auto; + padding: 4px 8px; + filter: grayscale(1); + border-bottom: 6px solid #453a62; + border-right: 4px solid #453a62; + transition: var(--transition-short); +} + +.resetKeyBindingsButton:hover { + cursor: pointer; + filter: grayscale(0); +} diff --git a/browser-extension/popup/Popup.tsx b/browser-extension/popup/Popup.tsx index cc88190..8ca7675 100644 --- a/browser-extension/popup/Popup.tsx +++ b/browser-extension/popup/Popup.tsx @@ -61,7 +61,7 @@ export default () => { onKeyUp={handleKeyUp} onKeyDown={handleKeyDown} > -
Haskell Spotlight
+
Haskell Spotlight  ⭐
{state === 'awaitingForNewKeyBinding' && Click on the area bellow to change hotkey.} @@ -91,13 +91,17 @@ export default () => {
)} - { + await k.setDefaultKeyBindings(); + const kb = await k.readKeyBinding('toggleSpotlight'); + setKeyBinding(kb); + setState('keyBindingUpdated'); + }} > - ⭐️ github.com/haskell-spotlight/haskell-spotlight - + Reset settings +
);