Added new font

This commit is contained in:
z0ccc 2022-10-06 21:46:35 -04:00
parent f0f7378bda
commit 8c7b07ef44
16 changed files with 122 additions and 25 deletions

View file

@ -26,7 +26,9 @@ const AutofillPage = ({ tab }: SystemPageProps) => {
display: tab === 'autofill' ? 'block' : 'none', display: tab === 'autofill' ? 'block' : 'none',
}} }}
> >
<Box sx={{ fontSize: '20px', mb: '8px' }}>Autofill Options</Box> <Box sx={{ fontSize: '21px', mb: '12px', fontWeight: '600' }}>
Autofill Options
</Box>
</Box> </Box>
) )
} }

View file

@ -11,7 +11,9 @@ const CurrentPage = ({ tab }: CurrentPageProps) => {
display: tab === 'current' ? 'block' : 'none', display: tab === 'current' ? 'block' : 'none',
}} }}
> >
<Box sx={{ fontSize: '20px', mb: '12px' }}>Current Info</Box> <Box sx={{ fontSize: '21px', mb: '12px', fontWeight: '600' }}>
Current Info
</Box>
</Box> </Box>
) )
} }

View file

@ -32,7 +32,9 @@ const SettingsPage = ({ tab }: SystemPageProps) => {
display: tab === 'settings' ? 'block' : 'none', display: tab === 'settings' ? 'block' : 'none',
}} }}
> >
<Box sx={{ fontSize: '20px', mb: '12px' }}>Settings</Box> <Box sx={{ fontSize: '21px', mb: '12px', fontWeight: '600' }}>
Settings
</Box>
{/* <SettingsCheckBox {/* <SettingsCheckBox
title={'Disable WebRTC'} title={'Disable WebRTC'}
onChange={setWebRtcPolicy} onChange={setWebRtcPolicy}

View file

@ -3,7 +3,7 @@ import { Label, Input } from 'theme-ui'
import detachDebugger from '../../../utils/detachDebugger' import detachDebugger from '../../../utils/detachDebugger'
import debounce from 'lodash.debounce' import debounce from 'lodash.debounce'
interface LocationInputProps { interface SystemInputProps {
name: string name: string
title: string title: string
value: string value: string
@ -11,13 +11,13 @@ interface LocationInputProps {
onChange: () => void onChange: () => void
} }
const LocationInput = ({ const SystemInput = ({
name, name,
title, title,
value, value,
setValue, setValue,
onChange, onChange,
}: LocationInputProps) => { }: SystemInputProps) => {
const debouncedChangeHandler = useMemo( const debouncedChangeHandler = useMemo(
() => () =>
debounce((e) => { debounce((e) => {
@ -41,4 +41,4 @@ const LocationInput = ({
) )
} }
export default LocationInput export default SystemInput

View file

@ -1,6 +1,6 @@
import { useState, useEffect, ChangeEvent } from 'react' import { useState, useEffect, ChangeEvent } from 'react'
import { Box, Flex, Label, Radio, Select } from 'theme-ui' import { Box, Flex, Label, Radio, Select } from 'theme-ui'
import LocationInput from './LocationInput' import SystemInput from './SystemInput'
import detachDebugger from '../../../utils/detachDebugger' import detachDebugger from '../../../utils/detachDebugger'
import countryLocales from '../../../utils/countryLocales' import countryLocales from '../../../utils/countryLocales'
import { ipData } from '../../../types' import { ipData } from '../../../types'
@ -120,7 +120,9 @@ const SystemPage = ({ tab, ipData }: SystemPageProps) => {
display: tab === 'system' ? 'block' : 'none', display: tab === 'system' ? 'block' : 'none',
}} }}
> >
<Box sx={{ fontSize: '20px', mb: '12px' }}>System Data</Box> <Box sx={{ fontSize: '21px', mb: '12px', fontWeight: '600' }}>
System Data
</Box>
<Flex <Flex
sx={{ sx={{
justifyContent: 'space-between', justifyContent: 'space-between',
@ -173,28 +175,28 @@ const SystemPage = ({ tab, ipData }: SystemPageProps) => {
</Select> </Select>
</> </>
)} )}
<LocationInput <SystemInput
name="timezone" name="timezone"
title="Timezone" title="Timezone"
value={timezone} value={timezone}
setValue={setTimezone} setValue={setTimezone}
onChange={changeInputText} onChange={changeInputText}
/> />
<LocationInput <SystemInput
name="locale" name="locale"
title="Locale" title="Locale"
value={locale} value={locale}
setValue={setLocale} setValue={setLocale}
onChange={changeInputText} onChange={changeInputText}
/> />
<LocationInput <SystemInput
name="lat" name="lat"
title="Latitude" title="Latitude"
value={lat} value={lat}
setValue={setLatitude} setValue={setLatitude}
onChange={changeInputText} onChange={changeInputText}
/> />
<LocationInput <SystemInput
name="lon" name="lon"
title="Longitude" title="Longitude"
value={lon} value={lon}

View file

@ -65,7 +65,9 @@ const UserAgentPage = ({ tab }: UserAgentPageProps) => {
display: tab === 'useragent' ? 'block' : 'none', display: tab === 'useragent' ? 'block' : 'none',
}} }}
> >
<Box sx={{ fontSize: '20px', mb: '12px' }}>Other Options</Box> <Box sx={{ fontSize: '21px', mb: '12px', fontWeight: '600' }}>
Other Options
</Box>
<Flex <Flex
sx={{ sx={{
justifyContent: 'space-between', justifyContent: 'space-between',

View file

@ -1,5 +1,5 @@
import { useState, useEffect } from 'react' import { useState, useEffect } from 'react'
import { Box, Button, Select } from 'theme-ui' import { Box, Button, Label, Radio, Select, Text } from 'theme-ui'
import getWebRTCData from './getWebRTCData' import getWebRTCData from './getWebRTCData'
import handleWebRtcPolicy from './handleWebRtcPolicy' import handleWebRtcPolicy from './handleWebRtcPolicy'
@ -30,8 +30,76 @@ const WebRtcPage = ({ tab }: SystemPageProps) => {
display: tab === 'webRtc' ? 'block' : 'none', display: tab === 'webRtc' ? 'block' : 'none',
}} }}
> >
<Box sx={{ fontSize: '20px', mb: '8px' }}>WebRTC Policy</Box> <Box sx={{ fontSize: '21px', mb: '12px', fontWeight: '600' }}>
<Select WebRTC Policy
</Box>
<Label>
<Radio
name="webRtcPolicy"
value="default"
onChange={(e) => handleWebRtcPolicy(e.target.value)}
checked={webRtcPolicy === 'default'}
/>
<Box>
<Text sx={{ fontWeight: '700' }}>Default</Text>
<Box sx={{ mb: '12px', fontSize: '12px' }}>
Same as above, except allow WebRTC traffic through the default
private
</Box>
</Box>
</Label>
<Label>
<Radio
name="webRtcPolicy"
value="default_public_and_private_interfaces"
onChange={(e) => handleWebRtcPolicy(e.target.value)}
checked={webRtcPolicy === 'default_public_and_private_interfaces'}
/>
<Box>
<Text sx={{ fontWeight: '700' }}>
Default public and private interfaces
</Text>
<Box sx={{ mb: '12px', fontSize: '12px' }}>
Send WebRTC traffic via the default public network adapter to the
Internet. This will be.
</Box>
</Box>
</Label>
<Label>
<Radio
name="webRtcPolicy"
value="default_public_interface_only"
onChange={(e) => handleWebRtcPolicy(e.target.value)}
checked={webRtcPolicy === 'default_public_interface_only'}
/>
<Box>
<Text sx={{ fontWeight: '700' }}>Default public interface only</Text>
<Box sx={{ mb: '12px', fontSize: '12px' }}>
Same as above, except allow WebRTC traffic through the default
private interface to your.
</Box>
</Box>
</Label>
<Label>
<Radio
name="webRtcPolicy"
value="disable_non_proxied_udp"
onChange={(e) => handleWebRtcPolicy(e.target.value)}
checked={webRtcPolicy === 'disable_non_proxied_udp'}
/>
<Box>
<Text sx={{ fontWeight: '700' }}>Disable non proxied udp</Text>
<Box sx={{ mb: '12px', fontSize: '12px' }}>
Force the use of a proxy, and only allow WebRTC traffic over UDP
proxies.
</Box>
</Box>
</Label>
{/* <Select
name="webRtcPolicy" name="webRtcPolicy"
id="webRtcPolicy" id="webRtcPolicy"
value={webRtcPolicy} value={webRtcPolicy}
@ -45,8 +113,8 @@ const WebRtcPage = ({ tab }: SystemPageProps) => {
Default public interface only Default public interface only
</option> </option>
<option value="disable_non_proxied_udp">Disable non proxied udp</option> <option value="disable_non_proxied_udp">Disable non proxied udp</option>
</Select> </Select> */}
<Box sx={{ fontSize: '12px', mb: '8px' }}> {/* <Box sx={{ fontSize: '12px', mb: '8px' }}>
IP: {JSON.stringify(webRtcIp)} IP: {JSON.stringify(webRtcIp)}
</Box> </Box>
<Button <Button
@ -59,7 +127,7 @@ const WebRtcPage = ({ tab }: SystemPageProps) => {
}} }}
> >
Reload Reload
</Button> </Button> */}
</Box> </Box>
) )
} }

View file

@ -19,9 +19,10 @@ import WebRtcPage from './Pages/WebRtcPage'
import CurrentPage from './Pages/CurrentPage' import CurrentPage from './Pages/CurrentPage'
import { ipData } from '../types' import { ipData } from '../types'
import getIp from '../utils/getIp' import getIp from '../utils/getIp'
import '../assets/global.css'
const Popup = () => { const Popup = () => {
const [tab, setTab] = useState('current') const [tab, setTab] = useState('webRtc')
const [ipData, setIpData] = useState<ipData | undefined>(undefined) const [ipData, setIpData] = useState<ipData | undefined>(undefined)
useEffect(() => { useEffect(() => {

Binary file not shown.

10
src/assets/global.css Normal file
View file

@ -0,0 +1,10 @@
@font-face {
font-family: 'Nunito';
src: url(./Nunito-VariableFont_wght.ttf);
font-weight: 400 800;
}
body {
font-family: 'Nunito';
font-weight: 500;
}

View file

Before

Width:  |  Height:  |  Size: 8 KiB

After

Width:  |  Height:  |  Size: 8 KiB

View file

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

View file

@ -14,12 +14,11 @@ export const theme: Theme = {
}, },
styles: { styles: {
root: { root: {
backgroundColor: 'body', backgroundColor: 'background',
color: 'text', color: 'text',
fontSize: '18px', fontSize: '18px',
lineHeight: '22px', lineHeight: '22px',
margin: '0', margin: '0',
fontFamily: "'Segoe UI', Tahoma, sans-serif",
}, },
}, },

View file

@ -131,7 +131,7 @@ var options = {
new CopyWebpackPlugin({ new CopyWebpackPlugin({
patterns: [ patterns: [
{ {
from: 'src/assets/img/icon128.png', from: 'src/assets/icon128.png',
to: path.join(__dirname, 'build'), to: path.join(__dirname, 'build'),
force: true, force: true,
}, },
@ -140,7 +140,16 @@ var options = {
new CopyWebpackPlugin({ new CopyWebpackPlugin({
patterns: [ patterns: [
{ {
from: 'src/assets/img/icon32.png', from: 'src/assets/icon32.png',
to: path.join(__dirname, 'build'),
force: true,
},
],
}),
new CopyWebpackPlugin({
patterns: [
{
from: 'src/assets/Nunito-VariableFont_wght.ttf',
to: path.join(__dirname, 'build'), to: path.join(__dirname, 'build'),
force: true, force: true,
}, },