alllowed sites UI

This commit is contained in:
Ryan Breen
2023-01-13 23:12:00 -05:00
parent 6f7eafc296
commit f5f800ee72
4 changed files with 49 additions and 3 deletions

View File

@@ -6,10 +6,12 @@ Alpine.data('popup', () => ({
profiles: [],
profile: '',
visibleKey: false,
allowedSites: [],
async init() {
await this.getProfiles();
await this.getPrivKeyForProfile();
await this.getAllowedSites();
},
saveKey() {
@@ -23,6 +25,19 @@ Alpine.data('popup', () => ({
async getPrivKeyForProfile() {
this.privKey = this.profile;
},
async getAllowedSites() {
this.allowedSites = [
{site: 'yosupp.app', allowed: true},
{site: 'iris.to', allowed: false},
];
},
async deleteSite(index) {
let newSites = [...this.allowedSites];
newSites.splice(index, 1);
this.allowedSites = newSites;
}
}));