mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
load user
This commit is contained in:
@@ -1,18 +1,21 @@
|
||||
import './components'
|
||||
import './bootstrap'
|
||||
import "./components"
|
||||
import {Alpine, Livewire} from '../../vendor/livewire/livewire/dist/livewire.esm';
|
||||
import {NDKNip07Signer} from "@nostr-dev-kit/ndk";
|
||||
import NDKCacheAdapterDexie from "@nostr-dev-kit/ndk-cache-dexie";
|
||||
import nostrStart from "./nostr/nostrStart";
|
||||
|
||||
import Alpine from 'alpinejs'
|
||||
import collapse from '@alpinejs/collapse'
|
||||
import intersect from '@alpinejs/intersect'
|
||||
import focus from '@alpinejs/focus'
|
||||
import NDK, { NDKNip07Signer, NDKEvent } from "@nostr-dev-kit/ndk"
|
||||
Alpine.store('ndk', {
|
||||
// nostr ndk
|
||||
ndk: null,
|
||||
// signer
|
||||
nip07signer: new NDKNip07Signer(),
|
||||
// dexie cache adapter
|
||||
dexieAdapter: new NDKCacheAdapterDexie({dbName: 'einundzwanzigNostrDB', expirationTime: 60 * 60 * 24 * 7}),
|
||||
// current nostr user
|
||||
user: null,
|
||||
// hours ago
|
||||
explicitRelayUrls: [],
|
||||
});
|
||||
Alpine.data('nostrStart', nostrStart);
|
||||
|
||||
window.Alpine = Alpine
|
||||
window.NDK = NDK
|
||||
window.NDKNip07Signer = NDKNip07Signer
|
||||
window.NDKEvent = NDKEvent
|
||||
|
||||
Alpine.plugin(collapse)
|
||||
Alpine.plugin(intersect)
|
||||
Alpine.plugin(focus)
|
||||
Alpine.start()
|
||||
Livewire.start();
|
||||
|
||||
Reference in New Issue
Block a user