Skip to content

Commit

Permalink
Merge pull request #29 from movie-web/dev
Browse files Browse the repository at this point in the history
Version 1.1.4 - Fix permission request page styling
  • Loading branch information
binaryoverload authored Apr 5, 2024
2 parents ec7d9c1 + 3f33d9b commit 36326d3
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@movie-web/extension",
"displayName": "movie-web extension",
"version": "1.1.3",
"version": "1.1.4",
"description": "Enhance your movie-web experience with just one click",
"author": "movie-web",
"scripts": {
Expand Down Expand Up @@ -53,6 +53,9 @@
"browser_specific_settings": {
"gecko": {
"id": "{3fd86354-c73f-4395-9e26-2c5c984579bf}"
},
"gecko_android": {
"id": "{3fd86354-c73f-4395-9e26-2c5c984579bf}"
}
},
"web_accessible_resources": [
Expand Down
1 change: 1 addition & 0 deletions src/components/SetupScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export function SetupScreen() {
const open = useCallback(() => {
const url = (chrome || browser).runtime.getURL(`/tabs/PermissionRequest.html`);
(chrome || browser).tabs.create({ url });
window.close();
}, []);

return (
Expand Down
4 changes: 2 additions & 2 deletions src/hooks/useDomainWhitelist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ export function useDomainWhitelist() {
};
}

export function useToggleWhitelistDomain(domain: string) {
export function useToggleWhitelistDomain(domain: string | null) {
const { domainWhitelist, addDomain, removeDomain } = useDomainWhitelist();
const isWhitelisted = domainWhitelist.includes(domain);
const isWhitelisted = domainWhitelist.includes(domain ?? '');
const { grantPermission } = usePermission();
const iconPath = (chrome || browser).runtime.getURL(isWhitelisted ? 'assets/active.png' : 'assets/inactive.png');

Expand Down
2 changes: 1 addition & 1 deletion src/popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function IndexPopup() {
) : (
<Frame>
<div className="popup">
{page === 'toggle' ? <ToggleButton active={isWhitelisted} onClick={toggle} domain={domain} /> : null}
{page === 'toggle' && domain ? <ToggleButton active={isWhitelisted} onClick={toggle} domain={domain} /> : null}
{page === 'disabled' ? <DisabledScreen /> : null}
<BottomLabel />
</div>
Expand Down
4 changes: 4 additions & 0 deletions src/tabs/PermissionRequest.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ body {
padding-bottom: 50px;
}

#__plasmo {
height: unset;
}

.permission-request.container {
width: 90%;
margin: 100px auto;
Expand Down

0 comments on commit 36326d3

Please sign in to comment.