mirror of
https://github.com/movie-web/extension.git
synced 2025-09-13 13:03:25 +00:00
Fix label position
This commit is contained in:
@@ -9,6 +9,15 @@
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.top-right-label {
|
||||||
|
position: absolute;
|
||||||
|
right: 1rem;
|
||||||
|
top: 1rem;
|
||||||
|
font-weight: normal;
|
||||||
|
color: #4A4863;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
.dot {
|
.dot {
|
||||||
width: 2px;
|
width: 2px;
|
||||||
height: 2px;
|
height: 2px;
|
||||||
|
@@ -12,3 +12,9 @@ export function BottomLabel() {
|
|||||||
</h3>
|
</h3>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function TopRightLabel() {
|
||||||
|
const version = useVersion({ prefixed: true });
|
||||||
|
|
||||||
|
return <h3 className="top-right-label">{version}</h3>;
|
||||||
|
}
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { BottomLabel } from '~components/BottomLabel';
|
import { BottomLabel, TopRightLabel } from '~components/BottomLabel';
|
||||||
import { DisabledScreen } from '~components/DisabledScreen';
|
import { DisabledScreen } from '~components/DisabledScreen';
|
||||||
import { Frame } from '~components/Frame';
|
import { Frame } from '~components/Frame';
|
||||||
import { PermissionMissingScreen } from '~components/PermissionMissingScreen';
|
import { PermissionMissingScreen } from '~components/PermissionMissingScreen';
|
||||||
@@ -18,12 +18,18 @@ function IndexPopup() {
|
|||||||
if (!hasPermission) page = 'perm';
|
if (!hasPermission) page = 'perm';
|
||||||
else if (!domain) page = 'disabled';
|
else if (!domain) page = 'disabled';
|
||||||
|
|
||||||
return (
|
return page === 'perm' ? (
|
||||||
|
<Frame>
|
||||||
|
<div className="popup">
|
||||||
|
<PermissionMissingScreen />
|
||||||
|
<TopRightLabel />
|
||||||
|
</div>
|
||||||
|
</Frame>
|
||||||
|
) : (
|
||||||
<Frame>
|
<Frame>
|
||||||
<div className="popup">
|
<div className="popup">
|
||||||
{page === 'toggle' ? <ToggleButton active={isWhitelisted} onClick={toggle} domain={domain} /> : null}
|
{page === 'toggle' ? <ToggleButton active={isWhitelisted} onClick={toggle} domain={domain} /> : null}
|
||||||
{page === 'disabled' ? <DisabledScreen /> : null}
|
{page === 'disabled' ? <DisabledScreen /> : null}
|
||||||
{page === 'perm' ? <PermissionMissingScreen /> : null}
|
|
||||||
<BottomLabel />
|
<BottomLabel />
|
||||||
</div>
|
</div>
|
||||||
</Frame>
|
</Frame>
|
||||||
|
Reference in New Issue
Block a user