mirror of
https://github.com/LBRYFoundation/Watch-on-LBRY.git
synced 2025-08-23 17:47:26 +00:00
commit
66cb8ccccf
6 changed files with 17 additions and 16 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,5 +1,6 @@
|
|||
.cache
|
||||
dist
|
||||
build
|
||||
node_modules
|
||||
web-ext-artifacts
|
||||
yarn-error.log
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
"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",
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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')
|
||||
|
|
Loading…
Add table
Reference in a new issue