Merge pull request #122 from DeepDoge/master

Some changes
This commit is contained in:
kodxana 2022-07-01 23:13:02 +02:00 committed by GitHub
commit 66cb8ccccf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 17 additions and 16 deletions

1
.gitignore vendored
View file

@ -1,5 +1,6 @@
.cache
dist
build
node_modules
web-ext-artifacts
yarn-error.log

View file

@ -21,7 +21,7 @@
"build:v2": "npm run clear:dist ; npm run build:base && npm run pick:manifest:v2",
"build:v3": "npm run clear:dist ; npm run build:base && npm run pick:manifest:v3",
"build": "npm run build:v3",
"build": "rm -r ./build ; mkdir ./build && npm run build:v2 && zip -r ./build/manifest-v2.zip ./dist && npm run build:v3 && zip -r ./build/manifest-v3.zip ./dist",
"watch:v2": "npm run clear:dist ; npm run pick:manifest:v2 && npm-run-all -l -p watch:parcel watch:assets",
"watch:v3": "npm run clear:dist ; npm run pick:manifest:v3 && npm-run-all -l -p watch:parcel watch:assets",

View file

@ -46,11 +46,6 @@ export function createDialogManager() {
}
}
interface DialogElement extends HTMLDivElement {
open: boolean
showModal(): void
}
export function Dialogs(params: { manager: ReturnType<typeof createDialogManager> }) {
const alerts = params.manager.useAlerts()
let currentAlert = Object.values(alerts)[0]
@ -60,7 +55,7 @@ export function Dialogs(params: { manager: ReturnType<typeof createDialogManager
let cancelled = false
const dialog = useRef(null as any as DialogElement)
const dialog = useRef(null as any as HTMLDialogElement)
useEffect(() => {
if (!dialog.current) return
if (!dialog.current.open) dialog.current.showModal()

View file

@ -68,11 +68,14 @@ function WatchOnLbryPopup(params: { profile: Awaited<ReturnType<typeof getProfil
<a onClick={() => loads(generateProfileAndSetNickname(dialogManager)).then(() => renderPopup())} className={`button active`}>
Change Nickname
</a>
<a onClick={async () =>
await dialogManager.confirm("This will delete your keypair from this device.\nStill wanna continue?\n\nNOTE: Without keypair you can't purge your data online.\nSo if you wish to purge, please use purging instead.")
&& resetProfileSettings()
&& renderPopup()
}
<a onClick={async () => {
if (!await dialogManager.confirm("This will delete your keypair from this device."
+ "\nStill wanna continue?"
+ "\n\nNOTE: Without keypair you can't purge your data online."
+ "\nSo if you wish to purge, please use purging instead.")) return
resetProfileSettings()
renderPopup()
}}
className={`button`}
>
Forget/Logout

View file

@ -32,6 +32,8 @@ function WatchOnLbryButton({ targetPlatform, lbryPathname, time }: WatchOnLbryBu
gap: '12px',
borderRadius: '2px',
backgroundColor: targetPlatform.theme,
backgroundImage: targetPlatform.theme,
fontWeight: 'bold',
border: '0',
color: 'whitesmoke',
padding: '10px 16px',

View file

@ -77,7 +77,7 @@ export const targetPlatformSettings = {
'madiator.com': targetPlatform({
domainPrefix: 'https://madiator.com/',
displayName: 'Madiator.com',
theme: '#075656',
theme: 'linear-gradient(130deg, #499375, #43889d)',
button: {
text: 'Watch on',
icon: chrome.runtime.getURL('assets/icons/lbry/madiator-logo.svg'),
@ -90,7 +90,7 @@ export const targetPlatformSettings = {
odysee: targetPlatform({
domainPrefix: 'https://odysee.com/',
displayName: 'Odysee',
theme: '#1e013b',
theme: 'linear-gradient(130deg, #c63d59, #f77937)',
button: {
text: 'Watch on Odysee',
icon: chrome.runtime.getURL('assets/icons/lbry/odysee-logo.svg')
@ -99,7 +99,7 @@ export const targetPlatformSettings = {
app: targetPlatform({
domainPrefix: 'lbry://',
displayName: 'LBRY App',
theme: '#075656',
theme: 'linear-gradient(130deg, #499375, #43889d)',
button: {
text: 'Watch on LBRY',
icon: chrome.runtime.getURL('assets/icons/lbry/lbry-logo.svg')