mirror of
https://github.com/movie-web/extension.git
synced 2025-09-13 11:13:24 +00:00
fix ts error, fix styling on PermissionRequest
This commit is contained in:
@@ -23,9 +23,9 @@ export function useDomainWhitelist() {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function useToggleWhitelistDomain(domain: string) {
|
export function useToggleWhitelistDomain(domain: string | null) {
|
||||||
const { domainWhitelist, addDomain, removeDomain } = useDomainWhitelist();
|
const { domainWhitelist, addDomain, removeDomain } = useDomainWhitelist();
|
||||||
const isWhitelisted = domainWhitelist.includes(domain);
|
const isWhitelisted = domainWhitelist.includes(domain ?? '');
|
||||||
const { grantPermission } = usePermission();
|
const { grantPermission } = usePermission();
|
||||||
const iconPath = (chrome || browser).runtime.getURL(isWhitelisted ? 'assets/active.png' : 'assets/inactive.png');
|
const iconPath = (chrome || browser).runtime.getURL(isWhitelisted ? 'assets/active.png' : 'assets/inactive.png');
|
||||||
|
|
||||||
|
@@ -28,7 +28,7 @@ function IndexPopup() {
|
|||||||
) : (
|
) : (
|
||||||
<Frame>
|
<Frame>
|
||||||
<div className="popup">
|
<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}
|
{page === 'disabled' ? <DisabledScreen /> : null}
|
||||||
<BottomLabel />
|
<BottomLabel />
|
||||||
</div>
|
</div>
|
||||||
|
@@ -10,6 +10,10 @@ body {
|
|||||||
padding-bottom: 50px;
|
padding-bottom: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#__plasmo {
|
||||||
|
height: unset;
|
||||||
|
}
|
||||||
|
|
||||||
.permission-request.container {
|
.permission-request.container {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
margin: 100px auto;
|
margin: 100px auto;
|
||||||
|
Reference in New Issue
Block a user