Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20
Binary file modified bun.lockb
Binary file not shown.
2 changes: 1 addition & 1 deletion components/HeaderTag.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</template>

<script setup lang="ts">
import { ViewMode } from '../composables/view'
import type { ViewMode } from '../composables/view'

const globalHeaderHeight = useGlobalHeaderHeight()
const viewMode = useViewMode()
Expand Down
2 changes: 1 addition & 1 deletion components/popups/Layer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</template>

<script setup lang="ts">
import { PopupInternally } from '../../utils/popups'
import type { PopupInternally } from '../../utils/popups'
import PopupsWrapperMobile from './WrapperMobile.vue'
import PopupsWrapperDesktop from './WrapperDesktop.vue'

Expand Down
2 changes: 1 addition & 1 deletion components/popups/WrapperDesktop.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</template>

<script setup lang="ts">
import { PopupInternally } from '../../utils/popups'
import type { PopupInternally } from '../../utils/popups'

const { data } = defineProps<{
data: PopupInternally
Expand Down
2 changes: 1 addition & 1 deletion components/utils/RelativeDateSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</template>

<script setup lang="ts">
import { TabData } from '../utils/HorizontalTabs.vue'
import type { TabData } from '../utils/HorizontalTabs.vue'

const props = defineProps<{
modelValue?: number | null
Expand Down
2 changes: 1 addition & 1 deletion components/utils/SettingsMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
</template>

<script setup lang="ts">
import { LocaleObject } from '@nuxtjs/i18n/dist/runtime/composables'
import type { LocaleObject } from '@nuxtjs/i18n'
import { useThemes } from '../../utils/themes'

const popups = usePopups()
Expand Down
13 changes: 5 additions & 8 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
modules: [
'nuxt-icon',
'@maanex/nuxt-apollo-upload',
'@nuxt/icon',
'@nuxtjs/apollo',
'@nuxtjs/i18n',
'@vite-pwa/nuxt',
'@vueuse/nuxt',
Expand Down Expand Up @@ -128,24 +128,21 @@ export default defineNuxtConfig({
},

i18n: {
legacy: false,
restructureDir: '.', // the langDir is resolved relative to a default i18n directory
langDir: 'lang',
defaultLocale: 'de',
fallbackLocale: 'de',
jsTsFormatResource: true,
lazy: true,
// ↓ remove strategy to get mensatt.de/en/about like urls. Downside: PWA entry point url is static -> language gets overwritten on startup. For now we'll rely on cookies only for language persistence.
strategy: 'no_prefix',
locales: [
{
code: 'de',
iso: 'de',
language: 'de',
file: 'de.js',
name: 'Deutsch'
},
{
code: 'en',
iso: 'en',
language: 'en',
file: 'en.js',
name: 'English'
},
Expand Down
38 changes: 19 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
{
"name": "mensatt-nuxt",
"version": "2.2.0",
"devDependencies": {
"@nuxtjs/apollo": "^5.0.0-alpha.15",
"@nuxtjs/i18n": "^10.2.1",
"@types/node": "^24.10.1",
"@typescript-eslint/parser": "^8.47.0",
"@vite-pwa/nuxt": "^1.0.7",
"@vueuse/core": "^14.0.0",
"@vueuse/nuxt": "^14.0.0",
"dayjs": "^1.11.19",
"eslint": "^9.39.1",
"eslint-config-maanex": "^1.3.3",
"eslint-plugin-vue": "^10.5.1",
"nuxt": "^4.2.1",
"sass": "^1.94.2",
"sass-loader": "^16.0.6",
"vaul-vue": "^0.4.1",
"vue-eslint-parser": "^10.2.0"
},
"private": true,
"scripts": {
"build": "nuxt build",
Expand All @@ -12,25 +30,7 @@
"lint-fix": "eslint --ext .ts,.vue --ignore-pattern .gitignore --fix --quiet .",
"postinstall": "nuxt prepare"
},
"devDependencies": {
"@maanex/nuxt-apollo-upload": "^5.0.0",
"@nuxtjs/i18n": "^8.0.0-beta.13",
"@types/node": "^18",
"@typescript-eslint/parser": "^6.9.1",
"@vite-pwa/nuxt": "^0.1.0",
"@vueuse/core": "^10.2.0",
"@vueuse/nuxt": "^10.2.0",
"dayjs": "^1.11.10",
"eslint": "^8.52.0",
"eslint-config-maanex": "^1.3.3",
"eslint-plugin-vue": "^9.18.1",
"nuxt": "^3.7.4",
"sass": "^1.62.1",
"sass-loader": "^13.3.1",
"vaul-vue": "^0.1.0",
"vue-eslint-parser": "^9.3.2"
},
"dependencies": {
"nuxt-icon": "^0.6.10"
"@nuxt/icon": "^2.1.0"
}
}
2 changes: 1 addition & 1 deletion pages/calendar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</template>

<script setup lang="ts">
import { TabData } from '../components/utils/HorizontalTabs.vue'
import type { TabData } from '../components/utils/HorizontalTabs.vue'

const viewMode = useViewMode()
const i18n = useI18n()
Expand Down
10 changes: 5 additions & 5 deletions utils/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ async function getOccurrence(occurrenceId: string): Promise<GqlResponse> {

/** @returns a list of all found locations or null if network error */
async function getLocations(): Promise<EntityLocation.Location[] | null> {
const res = await useAsyncQuery<{ locations: EntityLocation.Location[] }>(
EntityLocation.queryAll,
getClient()
)
return res.data?.value.locations ?? null
const res = await useLazyAsyncQuery<{ locations: EntityLocation.Location[] }>({
query: EntityLocation.queryAll,
clientId: getClient()
})
return res.data?.value?.locations ?? null
}

/** @returns true if successful */
Expand Down