chore: Update project metadata and dependencies
- Change project title from "Atitlán Directory" to "Ariège Hub" in index.html - Update app title in meta tags for PWA support - Add @tanstack/vue-table dependency for enhanced table management - Refactor ConnectionStatus component to improve status variant logic - Enhance useEvents composable for better error handling and sorting - Add 'events' translation to Spanish and French locales - Create a new Pinia store for Nostr state management
This commit is contained in:
parent
de73230525
commit
3c05ddde51
9 changed files with 72 additions and 13 deletions
|
|
@ -9,10 +9,10 @@
|
||||||
<link rel="icon" href="/favicon.ico" />
|
<link rel="icon" href="/favicon.ico" />
|
||||||
<link rel="apple-touch-icon" href="/apple-touch-icon.png" sizes="180x180">
|
<link rel="apple-touch-icon" href="/apple-touch-icon.png" sizes="180x180">
|
||||||
<link rel="mask-icon" href="/mask-icon.svg" color="#FFFFFF">
|
<link rel="mask-icon" href="/mask-icon.svg" color="#FFFFFF">
|
||||||
<title>Atitlán Directory</title>
|
<title>Ariège Hub</title>
|
||||||
<link rel="apple-touch-icon" href="/pwa-192x192.png">
|
<link rel="apple-touch-icon" href="/pwa-192x192.png">
|
||||||
<link rel="apple-touch-startup-image" href="/splash.png">
|
<link rel="apple-touch-startup-image" href="/splash.png">
|
||||||
<meta name="apple-mobile-web-app-title" content="Atitlán">
|
<meta name="apple-mobile-web-app-title" content="Ariège">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
|
|
||||||
33
package-lock.json
generated
33
package-lock.json
generated
|
|
@ -8,6 +8,7 @@
|
||||||
"name": "aio-shadcn-vite",
|
"name": "aio-shadcn-vite",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@tanstack/vue-table": "^8.21.2",
|
||||||
"@types/qrcode": "^1.5.5",
|
"@types/qrcode": "^1.5.5",
|
||||||
"@vueuse/components": "^12.5.0",
|
"@vueuse/components": "^12.5.0",
|
||||||
"@vueuse/core": "^12.5.0",
|
"@vueuse/core": "^12.5.0",
|
||||||
|
|
@ -3301,6 +3302,19 @@
|
||||||
"vite": "^5.2.0 || ^6"
|
"vite": "^5.2.0 || ^6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@tanstack/table-core": {
|
||||||
|
"version": "8.21.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tanstack/table-core/-/table-core-8.21.2.tgz",
|
||||||
|
"integrity": "sha512-uvXk/U4cBiFMxt+p9/G7yUWI/UbHYbyghLCjlpWZ3mLeIZiUBSKcUnw9UnKkdRz7Z/N4UBuFLWQdJCjUe7HjvA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "github",
|
||||||
|
"url": "https://github.com/sponsors/tannerlinsley"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@tanstack/virtual-core": {
|
"node_modules/@tanstack/virtual-core": {
|
||||||
"version": "3.13.2",
|
"version": "3.13.2",
|
||||||
"resolved": "https://registry.npmjs.org/@tanstack/virtual-core/-/virtual-core-3.13.2.tgz",
|
"resolved": "https://registry.npmjs.org/@tanstack/virtual-core/-/virtual-core-3.13.2.tgz",
|
||||||
|
|
@ -3311,6 +3325,25 @@
|
||||||
"url": "https://github.com/sponsors/tannerlinsley"
|
"url": "https://github.com/sponsors/tannerlinsley"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@tanstack/vue-table": {
|
||||||
|
"version": "8.21.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tanstack/vue-table/-/vue-table-8.21.2.tgz",
|
||||||
|
"integrity": "sha512-KBgOWxha/x4m1EdhVWxOpqHb661UjqAxzPcmXR3QiA7aShZ547x19Gw0UJX9we+m+tVcPuLRZ61JsYW47QZFfQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@tanstack/table-core": "8.21.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "github",
|
||||||
|
"url": "https://github.com/sponsors/tannerlinsley"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"vue": ">=3.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@tanstack/vue-virtual": {
|
"node_modules/@tanstack/vue-virtual": {
|
||||||
"version": "3.13.2",
|
"version": "3.13.2",
|
||||||
"resolved": "https://registry.npmjs.org/@tanstack/vue-virtual/-/vue-virtual-3.13.2.tgz",
|
"resolved": "https://registry.npmjs.org/@tanstack/vue-virtual/-/vue-virtual-3.13.2.tgz",
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
"analyze": "vite build --mode analyze"
|
"analyze": "vite build --mode analyze"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@tanstack/vue-table": "^8.21.2",
|
||||||
"@types/qrcode": "^1.5.5",
|
"@types/qrcode": "^1.5.5",
|
||||||
"@vueuse/components": "^12.5.0",
|
"@vueuse/components": "^12.5.0",
|
||||||
"@vueuse/core": "^12.5.0",
|
"@vueuse/core": "^12.5.0",
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, onUnmounted, ref } from 'vue'
|
import { onMounted, onUnmounted } from 'vue'
|
||||||
import Navbar from '@/components/layout/Navbar.vue'
|
import Navbar from '@/components/layout/Navbar.vue'
|
||||||
import Footer from '@/components/layout/Footer.vue'
|
import Footer from '@/components/layout/Footer.vue'
|
||||||
import ConnectionStatus from '@/components/nostr/ConnectionStatus.vue'
|
import ConnectionStatus from '@/components/nostr/ConnectionStatus.vue'
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,10 @@ const props = defineProps<{
|
||||||
error?: Error | null
|
error?: Error | null
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
function getStatusVariant() {
|
function getStatusVariant(): 'default' | 'destructive' | 'outline' | 'secondary' {
|
||||||
if (props.isConnecting) return 'warning'
|
if (!props.isConnected) return 'destructive'
|
||||||
return props.isConnected ? 'success' : 'destructive'
|
if (props.isConnecting) return 'secondary'
|
||||||
|
return 'outline'
|
||||||
}
|
}
|
||||||
|
|
||||||
function getStatusText() {
|
function getStatusText() {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { ref, computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import { useAsyncState } from '@vueuse/core'
|
import { useAsyncState } from '@vueuse/core'
|
||||||
import type { Event } from '@/lib/types/event'
|
import type { Event } from '@/lib/types/event'
|
||||||
import { fetchEvents } from '@/lib/api/events'
|
import { fetchEvents } from '@/lib/api/events'
|
||||||
|
|
@ -16,8 +16,8 @@ export function useEvents() {
|
||||||
const error = computed(() => {
|
const error = computed(() => {
|
||||||
if (asyncError.value) {
|
if (asyncError.value) {
|
||||||
return {
|
return {
|
||||||
message: asyncError.value instanceof Error
|
message: asyncError.value instanceof Error
|
||||||
? asyncError.value.message
|
? asyncError.value.message
|
||||||
: 'An error occurred while fetching events'
|
: 'An error occurred while fetching events'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -25,21 +25,21 @@ export function useEvents() {
|
||||||
})
|
})
|
||||||
|
|
||||||
const sortedEvents = computed(() => {
|
const sortedEvents = computed(() => {
|
||||||
return [...events.value].sort((a, b) =>
|
return [...events.value].sort((a, b) =>
|
||||||
new Date(b.time).getTime() - new Date(a.time).getTime()
|
new Date(b.time).getTime() - new Date(a.time).getTime()
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
const upcomingEvents = computed(() => {
|
const upcomingEvents = computed(() => {
|
||||||
const now = new Date()
|
const now = new Date()
|
||||||
return sortedEvents.value.filter(event =>
|
return sortedEvents.value.filter(event =>
|
||||||
new Date(event.event_start_date) > now
|
new Date(event.event_start_date) > now
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
const pastEvents = computed(() => {
|
const pastEvents = computed(() => {
|
||||||
const now = new Date()
|
const now = new Date()
|
||||||
return sortedEvents.value.filter(event =>
|
return sortedEvents.value.filter(event =>
|
||||||
new Date(event.event_end_date) < now
|
new Date(event.event_end_date) < now
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
@ -52,4 +52,4 @@ export function useEvents() {
|
||||||
error,
|
error,
|
||||||
refresh,
|
refresh,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ const messages: LocaleMessages = {
|
||||||
directory: 'Directorio',
|
directory: 'Directorio',
|
||||||
faq: 'Preguntas Frecuentes',
|
faq: 'Preguntas Frecuentes',
|
||||||
support: 'Soporte',
|
support: 'Soporte',
|
||||||
|
events: 'Eventos',
|
||||||
login: 'Iniciar Sesión',
|
login: 'Iniciar Sesión',
|
||||||
logout: 'Cerrar Sesión'
|
logout: 'Cerrar Sesión'
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ const messages: LocaleMessages = {
|
||||||
directory: 'Répertoire',
|
directory: 'Répertoire',
|
||||||
faq: 'FAQ',
|
faq: 'FAQ',
|
||||||
support: 'Support',
|
support: 'Support',
|
||||||
|
events: 'Événements',
|
||||||
login: 'Connexion',
|
login: 'Connexion',
|
||||||
logout: 'Déconnexion'
|
logout: 'Déconnexion'
|
||||||
},
|
},
|
||||||
|
|
|
||||||
22
src/stores/nostr.ts
Normal file
22
src/stores/nostr.ts
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
import { defineStore } from 'pinia'
|
||||||
|
import { ref } from 'vue'
|
||||||
|
|
||||||
|
export const useNostrStore = defineStore('nostr', () => {
|
||||||
|
const isConnected = ref(false)
|
||||||
|
const relayUrls = ref<string[]>([])
|
||||||
|
|
||||||
|
function setConnected(value: boolean) {
|
||||||
|
isConnected.value = value
|
||||||
|
}
|
||||||
|
|
||||||
|
function setRelayUrls(urls: string[]) {
|
||||||
|
relayUrls.value = urls
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
isConnected,
|
||||||
|
relayUrls,
|
||||||
|
setConnected,
|
||||||
|
setRelayUrls,
|
||||||
|
}
|
||||||
|
})
|
||||||
Loading…
Add table
Add a link
Reference in a new issue