mirror of
https://github.com/LBRYFoundation/Watch-on-LBRY.git
synced 2025-08-23 17:47:26 +00:00
🍣 some little fixes in the code
- nothing changed, just some little fixes
This commit is contained in:
parent
7fa57b9e88
commit
ca65a0288d
2 changed files with 8 additions and 18 deletions
|
@ -70,22 +70,18 @@ export function resetProfileSettings() {
|
|||
|
||||
async function apiRequest<T extends object>(method: 'GET' | 'POST', pathname: string, data: T) {
|
||||
const settings = await getExtensionSettingsAsync()
|
||||
/* const urlResolverSettings = ytUrlResolversSettings[settings.urlResolver]
|
||||
if (!urlResolverSettings.signRequest) throw new Error() */
|
||||
|
||||
const url = new URL(ytUrlResolversSettings.madiatorFinder.href/* urlResolverSettings.href */)
|
||||
const url = new URL(ytUrlResolversSettings.madiatorFinder.href)
|
||||
url.pathname = path.join(url.pathname, pathname)
|
||||
url.searchParams.set('data', JSON.stringify(data))
|
||||
|
||||
if (true/* requiresSignature */) {
|
||||
if (!settings.privateKey || !settings.publicKey)
|
||||
throw new Error('There is no profile.')
|
||||
if (!settings.privateKey || !settings.publicKey)
|
||||
throw new Error('There is no profile.')
|
||||
|
||||
url.searchParams.set('keys', JSON.stringify({
|
||||
signature: await sign(url.searchParams.toString(), settings.privateKey!),
|
||||
publicKey: settings.publicKey
|
||||
}))
|
||||
}
|
||||
url.searchParams.set('keys', JSON.stringify({
|
||||
signature: await sign(url.searchParams.toString(), settings.privateKey!),
|
||||
publicKey: settings.publicKey
|
||||
}))
|
||||
|
||||
const respond = await fetch(url.href, { method })
|
||||
|
||||
|
|
|
@ -28,18 +28,12 @@ section {
|
|||
gap: .75em;
|
||||
}
|
||||
|
||||
section>label {
|
||||
label {
|
||||
font-size: 1.75em;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
section>b {
|
||||
display: block;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
section>* {
|
||||
padding: 0 1rem;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue