Files
nostash/Shared (Extension)/Resources/popup.js

30 lines
555 B
JavaScript

import Alpine from "alpinejs";
window.Alpine = Alpine;
Alpine.data('popup', () => ({
privKey: '',
profiles: [],
profile: '',
visibleKey: false,
async init() {
await this.getProfiles();
await this.getPrivKeyForProfile();
},
saveKey() {
console.log(`Saving key ${this.privKey}`);
},
async getProfiles() {
this.profiles = ['Default', 'Extra'];
this.profile = 'Default';
},
async getPrivKeyForProfile() {
this.privKey = this.profile;
}
}));
Alpine.start();