prettier, update to the dependencies (latest), remove nip26 and its artifacts, cleanup and renew

This commit is contained in:
Fishcake
2024-09-20 20:31:58 +09:00
parent 0477cc5cdf
commit e1c83597dd
37 changed files with 3136 additions and 2488 deletions

View File

@@ -16,8 +16,6 @@ import {
KINDS,
humanPermission,
validateKey,
feature,
getDelegator,
} from './utilities/utils';
const log = console.log;
@@ -42,10 +40,7 @@ Alpine.data('options', () => ({
host: '',
permHosts: [],
hostPerms: [],
delegationActive: false,
visible: false,
delegate: false,
delegator: '',
copied: false,
setPermission,
go,
@@ -77,8 +72,6 @@ Alpine.data('options', () => ({
await this.getProfileIndex();
this.setProfileIndexFromSearch();
await this.refreshProfile();
this.delegationActive = await feature('delegation');
},
async refreshProfile() {
@@ -88,7 +81,6 @@ Alpine.data('options', () => ({
await this.getNpub();
await this.getRelays();
await this.getPermissions();
await this.getDelegate();
},
// Profile functions
@@ -117,27 +109,12 @@ Alpine.data('options', () => ({
this.profileIndex = await getProfileIndex();
},
async getDelegate() {
let [delegate, delegator] = await getDelegator(this.profileIndex);
this.delegate = delegate;
this.delegator = await browser.runtime.sendMessage({
kind: 'npubEncode',
payload: delegator,
});
},
async newProfile() {
let newIndex = await newProfile();
await this.getProfileNames();
this.profileIndex = newIndex;
},
newDelegated() {
window.location = browser.runtime.getURL(
'wizards/delegation/delegation.html'
);
},
async deleteProfile() {
if (
confirm(