Fix label position

This commit is contained in:
mrjvs
2024-02-07 17:27:04 +01:00
parent c0c733ecfc
commit b900fbdaa8
3 changed files with 25 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
import { BottomLabel } from '~components/BottomLabel';
import { BottomLabel, TopRightLabel } from '~components/BottomLabel';
import { DisabledScreen } from '~components/DisabledScreen';
import { Frame } from '~components/Frame';
import { PermissionMissingScreen } from '~components/PermissionMissingScreen';
@@ -18,12 +18,18 @@ function IndexPopup() {
if (!hasPermission) page = 'perm';
else if (!domain) page = 'disabled';
return (
return page === 'perm' ? (
<Frame>
<div className="popup">
<PermissionMissingScreen />
<TopRightLabel />
</div>
</Frame>
) : (
<Frame>
<div className="popup">
{page === 'toggle' ? <ToggleButton active={isWhitelisted} onClick={toggle} domain={domain} /> : null}
{page === 'disabled' ? <DisabledScreen /> : null}
{page === 'perm' ? <PermissionMissingScreen /> : null}
<BottomLabel />
</div>
</Frame>