chore: Set up Electron configuration and update dependencies

- Add Electron Forge configuration in forge.config.js for packaging and building the app
- Create main Electron entry point in main.cjs for application initialization
- Update package.json scripts for Electron development and building
- Add necessary Electron dependencies to package.json
- Modify .gitignore to exclude build artifacts and temporary files
- Refactor Footer and Navbar components to remove unused imports
- Enhance NostrFeed component by removing unnecessary connection logic
- Update i18n setup for better type safety and locale management
- Refactor Home component to clean up unused code
- Extend Nostr store to manage account state with TypeScript interfaces
This commit is contained in:
padreug 2025-03-20 17:26:15 +01:00
parent 3c05ddde51
commit a74148a0da
11 changed files with 5831 additions and 13 deletions

View file

@ -1,9 +1,16 @@
import { defineStore } from 'pinia'
import { ref } from 'vue'
// Define an interface for the account object
interface NostrAccount {
privkey: string
pubkey: string
}
export const useNostrStore = defineStore('nostr', () => {
const isConnected = ref(false)
const relayUrls = ref<string[]>([])
const account = ref<NostrAccount | null>(null)
function setConnected(value: boolean) {
isConnected.value = value
@ -13,10 +20,16 @@ export const useNostrStore = defineStore('nostr', () => {
relayUrls.value = urls
}
function setAccount(nostrAccount: NostrAccount | null) {
account.value = nostrAccount
}
return {
isConnected,
relayUrls,
account,
setConnected,
setRelayUrls,
setAccount,
}
})