mirror of
https://github.com/movie-web/extension.git
synced 2025-09-13 13:13:24 +00:00
Fix some styling
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
.bottom-label {
|
.bottom-label {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: .25rem;
|
bottom: 1rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: .5rem;
|
gap: .5rem;
|
||||||
@@ -19,8 +19,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.dot {
|
.dot {
|
||||||
width: 2px;
|
width: 3px;
|
||||||
height: 2px;
|
height: 3px;
|
||||||
background: currentColor;
|
background: currentColor;
|
||||||
border-radius: 100px;
|
border-radius: 100px;
|
||||||
}
|
}
|
||||||
|
@@ -5,11 +5,11 @@
|
|||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.disabled svg {
|
.disabled .icon {
|
||||||
display: block;
|
font-size: 1.5rem;
|
||||||
width: 1.5rem;
|
margin-bottom: 1rem;
|
||||||
height: 1.5rem;
|
text-align: center;
|
||||||
margin: 0 auto;
|
display: inline-block;
|
||||||
color: #B44868;
|
color: #B44868;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -4,7 +4,9 @@ import { Icon } from './Icon';
|
|||||||
export function DisabledScreen() {
|
export function DisabledScreen() {
|
||||||
return (
|
return (
|
||||||
<div className="disabled">
|
<div className="disabled">
|
||||||
<Icon name="warningCircle" />
|
<div className="icon">
|
||||||
|
<Icon name="warningCircle" />
|
||||||
|
</div>
|
||||||
<p>
|
<p>
|
||||||
The <strong>movie-web extension</strong> can not be used on this page
|
The <strong>movie-web extension</strong> can not be used on this page
|
||||||
</p>
|
</p>
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
|
|
||||||
import { Button } from '~components/Button';
|
import { Button } from '~components/Button';
|
||||||
|
import { Icon } from '~components/Icon';
|
||||||
|
|
||||||
import './SetupScreen.css';
|
import './SetupScreen.css';
|
||||||
import { Icon } from '~components/Icon';
|
|
||||||
|
|
||||||
export function SetupScreen() {
|
export function SetupScreen() {
|
||||||
const open = useCallback(() => {
|
const open = useCallback(() => {
|
||||||
|
@@ -15,7 +15,7 @@ body {
|
|||||||
background-color: #0A0A10;
|
background-color: #0A0A10;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container.permission-grant {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -23,14 +23,14 @@ body {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.inner-container {
|
.permission-grant .inner-container {
|
||||||
width: 400px;
|
width: 400px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.permission-card {
|
.permission-grant .permission-card {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -42,30 +42,30 @@ body {
|
|||||||
border: 1px solid #272A37;
|
border: 1px solid #272A37;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
.permission-grant h1 {
|
||||||
font-size: 1.25rem;
|
font-size: 1.25rem;
|
||||||
margin-bottom: 0.5rem;
|
margin-bottom: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.permission-card>p {
|
.permission-grant .permission-card > p {
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
margin-top: .5rem;
|
margin-top: .5rem;
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.color-white {
|
.permission-grant .color-white {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-color {
|
.permission-grant .text-color {
|
||||||
color: #73739d;
|
color: #73739d;
|
||||||
}
|
}
|
||||||
|
|
||||||
.buttons {
|
.permission-grant .buttons {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 2rem;
|
margin-top: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.buttons>*+* {
|
.permission-grant .buttons>*+* {
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
}
|
}
|
@@ -1,20 +1,16 @@
|
|||||||
import { Button } from '~components/Button';
|
import { Button } from '~components/Button';
|
||||||
import { useDomainWhitelist } from '~hooks/useDomainWhitelist';
|
|
||||||
import { usePermission } from '~hooks/usePermission';
|
import { usePermission } from '~hooks/usePermission';
|
||||||
import { makeUrlIntoDomain } from '~utils/domains';
|
import { makeUrlIntoDomain } from '~utils/domains';
|
||||||
|
|
||||||
import './PermissionGrant.css';
|
import './PermissionGrant.css';
|
||||||
|
|
||||||
export default function PermissionGrant() {
|
export default function PermissionGrant() {
|
||||||
const { domainWhitelist } = useDomainWhitelist();
|
const { grantPermission } = usePermission();
|
||||||
const { hasPermission, grantPermission } = usePermission();
|
|
||||||
|
|
||||||
const queryParams = new URLSearchParams(window.location.search);
|
const queryParams = new URLSearchParams(window.location.search);
|
||||||
const redirectUrl = queryParams.get('redirectUrl') ?? 'https://movie-web.app';
|
const redirectUrl = queryParams.get('redirectUrl') ?? 'https://movie-web.app';
|
||||||
const domain = makeUrlIntoDomain(redirectUrl);
|
const domain = makeUrlIntoDomain(redirectUrl);
|
||||||
|
|
||||||
const permissionsGranted = domainWhitelist.includes(domain) && hasPermission;
|
|
||||||
|
|
||||||
const redirectBack = () => {
|
const redirectBack = () => {
|
||||||
chrome.tabs.getCurrent((tab) => {
|
chrome.tabs.getCurrent((tab) => {
|
||||||
chrome.tabs.update(tab.id, { url: redirectUrl });
|
chrome.tabs.update(tab.id, { url: redirectUrl });
|
||||||
@@ -28,7 +24,7 @@ export default function PermissionGrant() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container">
|
<div className="permission-grant container">
|
||||||
<div className="inner-container">
|
<div className="inner-container">
|
||||||
<div className="permission-card">
|
<div className="permission-card">
|
||||||
<h1 className="color-white">Permission</h1>
|
<h1 className="color-white">Permission</h1>
|
||||||
|
@@ -10,45 +10,45 @@ body {
|
|||||||
padding-bottom: 50px;
|
padding-bottom: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.permission-request.container {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
margin: 100px auto;
|
margin: 100px auto;
|
||||||
max-width: 628px;
|
max-width: 628px;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
.permission-request h1 {
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
h2 {
|
.permission-request h2 {
|
||||||
font-size: 1.5rem;
|
font-size: 1.5rem;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-top: 4rem;
|
margin-top: 4rem;
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-color {
|
.permission-request .text-color {
|
||||||
color: #7C7C97;
|
color: #7C7C97;
|
||||||
}
|
}
|
||||||
|
|
||||||
.paragraph {
|
.permission-request .paragraph {
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
max-width: 500px;
|
max-width: 500px;
|
||||||
line-height: 1.3;
|
line-height: 1.3;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-list {
|
.permission-request .card-list {
|
||||||
margin: 1rem 0;
|
margin: 1rem 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-list>*+* {
|
.permission-request .card-list>*+* {
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card {
|
.permission-request .card {
|
||||||
padding: 20px;
|
padding: 25px 20px;
|
||||||
border: 1px solid #272A37;
|
border: 1px solid #272A37;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: auto 1fr auto;
|
grid-template-columns: auto 1fr auto;
|
||||||
@@ -57,9 +57,10 @@ h2 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.card .icon-circle {
|
.permission-request .card .icon-circle {
|
||||||
width: 2rem;
|
width: 2rem;
|
||||||
height: 2rem;
|
height: 2rem;
|
||||||
|
font-size: 1rem;
|
||||||
background-color: rgba(39, 42, 55, 0.35);
|
background-color: rgba(39, 42, 55, 0.35);
|
||||||
border: 1px solid #272A37;
|
border: 1px solid #272A37;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
@@ -68,37 +69,37 @@ h2 {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card.purple, .card.purple .icon-circle {
|
.permission-request .card.purple, .permission-request .card.purple .icon-circle {
|
||||||
border-color: #49277C;
|
border-color: #49277C;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card.purple .icon-circle {
|
.permission-request .card.purple .icon-circle {
|
||||||
background-color: rgba(51, 27, 87, .4);
|
background-color: rgba(51, 27, 87, .4);
|
||||||
}
|
}
|
||||||
|
|
||||||
.card svg {
|
.permission-request .card .icon-circle > div {
|
||||||
display: block;
|
display: block;
|
||||||
width: 1rem;
|
width: 1rem;
|
||||||
height: 1rem;
|
height: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card h3 {
|
.permission-request .card h3 {
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: white;
|
color: white;
|
||||||
margin-top: 0;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card .paragraph {
|
.permission-request .card .paragraph {
|
||||||
margin-top: 0.5rem;
|
margin-top: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card .center-y {
|
.permission-request .card .center-y {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card button {
|
.permission-request .card button {
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
border: 0;
|
border: 0;
|
||||||
@@ -108,11 +109,11 @@ h2 {
|
|||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card:not(.purple) svg {
|
.permission-request .card:not(.purple) .icon-circle {
|
||||||
color: #7C7C97;
|
color: #7C7C97;
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer {
|
.permission-request .footer {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
@@ -26,7 +26,7 @@ export default function PermissionRequest() {
|
|||||||
}, [grantPermission]);
|
}, [grantPermission]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container">
|
<div className="container permission-request">
|
||||||
<div className="inner-container">
|
<div className="inner-container">
|
||||||
<h1 className="color-white">
|
<h1 className="color-white">
|
||||||
We need some <br /> browser permissions
|
We need some <br /> browser permissions
|
||||||
@@ -41,9 +41,9 @@ export default function PermissionRequest() {
|
|||||||
purple
|
purple
|
||||||
icon={<Icon name="github" />}
|
icon={<Icon name="github" />}
|
||||||
right={
|
right={
|
||||||
<a href="https://github.com/movie-web/extension" target="_blank" rel="noreferrer">
|
<Button type="secondary" href="https://github.com/movie-web/extension">
|
||||||
<button type="button">Read source code</button>
|
Read source code
|
||||||
</a>
|
</Button>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<h3>Read the source code on GitHub</h3>
|
<h3>Read the source code on GitHub</h3>
|
||||||
@@ -54,7 +54,7 @@ export default function PermissionRequest() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2>Permission list</h2>
|
<h2>Permission list</h2>
|
||||||
<div className="card-list">
|
<div className="card-list" style={{ paddingBottom: '10rem' }}>
|
||||||
<Card icon={<Icon name="windows" />}>
|
<Card icon={<Icon name="windows" />}>
|
||||||
<h3>Read & change data from all sites</h3>
|
<h3>Read & change data from all sites</h3>
|
||||||
<p className="text-color paragraph">
|
<p className="text-color paragraph">
|
||||||
|
Reference in New Issue
Block a user