Show/Hide Button for private key in Options page. Move experimental page into separate sub-folder. Move delegation wizard to sub-folder. Move permission page into separate folder. Basic functional SwiftUI look for the app. Beginning to define the main app view. NavigationStack and Privacy Policy Show App Icon on main screen. Getting Started: macOS Getting Started: iPhone Getting Started: iPad Removing old default UIKit code. Added "No Thanks" toggle to the relay reminder. Clearly indicate in the Settings page when a profile is a delegated profile. Changed recommended relays to all public relays. Use x-cloak in all the places. Fix bundle display name to use capital N. Added copy button to pubkey in settings. Window default size. Updating event kind list. Allow events to be copied by clicking on them in the event log. Tweaking the colors for a more purple-ish look. Added Tips and Tricks view to native app. Move utilities modules into separate folder. Rename event_log files to event_history to escape some content blockers. Renamed Event Log to Event History in the UI as well.
41 lines
1.0 KiB
JavaScript
41 lines
1.0 KiB
JavaScript
import Alpine from 'alpinejs';
|
|
|
|
const FEATURES = [
|
|
[
|
|
'delegation',
|
|
'NIP-26 Delegation Profiles',
|
|
'Allow user to create delegated profiles that obey the NIP-26 standard. Requires client support.',
|
|
],
|
|
];
|
|
|
|
Alpine.data('experimental', () => ({
|
|
features: [],
|
|
|
|
async init() {
|
|
await this.reloadFeatures();
|
|
|
|
console.log(this.features);
|
|
},
|
|
|
|
async reloadFeatures() {
|
|
this.features = await Promise.all(
|
|
FEATURES.map(async ([name, shortDesc, longDesc]) => {
|
|
name = `feature:${name}`;
|
|
let active = await browser.storage.local.get({
|
|
[name]: false,
|
|
});
|
|
active = active[name];
|
|
return [name, active, shortDesc, longDesc];
|
|
})
|
|
);
|
|
},
|
|
|
|
async change(feature, active) {
|
|
console.log(feature, active);
|
|
await browser.storage.local.set({ [feature]: active });
|
|
await this.reloadFeatures();
|
|
},
|
|
}));
|
|
|
|
Alpine.start();
|