chore: migrate to nuxt-bridge
This commit is contained in:
@@ -2,3 +2,4 @@ node_modules
|
||||
.nuxt
|
||||
dist
|
||||
.eslintcache
|
||||
.output
|
||||
|
||||
+1
-1
@@ -14,5 +14,5 @@ RUN yarn run generate
|
||||
FROM nginx
|
||||
MAINTAINER Joakim Olsson <joakim@unbound.se>
|
||||
|
||||
COPY --from=builder /build/dist/ /usr/share/nginx/html/
|
||||
COPY --from=builder /build/.output/public/ /usr/share/nginx/html/
|
||||
COPY --from=builder /build/nginx-conf/default.conf /etc/nginx/conf.d/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<v-card xs12>
|
||||
<v-card flat outlined rounded class='mx-3 my-3 rounded-xl'>
|
||||
<v-card-title primary-title>
|
||||
<h3 class='headline mb-0'>
|
||||
<v-icon
|
||||
|
||||
@@ -1,24 +1,22 @@
|
||||
<template>
|
||||
<v-col xs='12' sm='6' md='4' lg='3'>
|
||||
<v-card>
|
||||
<v-card flat outlined class='mx-3 my-3 rounded-xl'>
|
||||
<v-card-title>
|
||||
<span v-text="$tc(title, model.length)" />
|
||||
<span v-text='$tc(title, model.length)' />
|
||||
</v-card-title>
|
||||
<v-list>
|
||||
<v-list-item v-for="item in model" :key="item">
|
||||
<v-list-item-action @click="toggleIgnore(type, item)">
|
||||
<v-list-item v-for='item in model' :key='item'>
|
||||
<v-list-item-action @click='toggleIgnore(type, item)'>
|
||||
<v-tooltip top>
|
||||
<template #activator="{ on }">
|
||||
<v-icon v-on="on">mdi-delete-outline</v-icon>
|
||||
<template #activator='{ on }'>
|
||||
<v-icon v-on='on'>mdi-delete-outline</v-icon>
|
||||
</template>
|
||||
<span v-text="$t('filters.remove')" />
|
||||
</v-tooltip>
|
||||
</v-list-item-action>
|
||||
<v-list-item-title><span v-text="item" /></v-list-item-title>
|
||||
<v-list-item-title><span v-text='item' /></v-list-item-title>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-card>
|
||||
</v-col>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
@@ -1,55 +1,59 @@
|
||||
<template>
|
||||
<div :key="isAuthenticated">
|
||||
<v-container fluid grid-list-md class="app-fade-in">
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12>
|
||||
<div :key='isAuthenticated'>
|
||||
<v-container fluid grid-list-md class='app-fade-in'>
|
||||
<v-row wrap>
|
||||
<v-col cols='12'>
|
||||
<v-card>
|
||||
<v-container fluid grid-list-md>
|
||||
<v-layout row wrap>
|
||||
<v-row wrap>
|
||||
<v-col xs='12' sm='12' md='4' lg='4'>
|
||||
<list
|
||||
:model="bands || []"
|
||||
title="filters.band"
|
||||
type="band"
|
||||
:toggle-ignore="toggleIgnore"
|
||||
:model='bands || []'
|
||||
title='filters.band'
|
||||
type='band'
|
||||
:toggle-ignore='toggleIgnore'
|
||||
/>
|
||||
<v-flex xs12 sm6 md4 lg3>
|
||||
<v-layout column>
|
||||
</v-col>
|
||||
<v-col xs='12' sm='12' md='4' lg='4'>
|
||||
<v-row>
|
||||
<v-col cols='12'>
|
||||
<list
|
||||
:model="states || []"
|
||||
title="filters.state"
|
||||
type="state"
|
||||
:toggle-ignore="toggleIgnore"
|
||||
:model='states || []'
|
||||
title='filters.state'
|
||||
type='state'
|
||||
:toggle-ignore='toggleIgnore'
|
||||
/>
|
||||
<list
|
||||
:model="municipalities || []"
|
||||
title="filters.municipality"
|
||||
type="municipality"
|
||||
:toggle-ignore="toggleIgnore"
|
||||
:model='municipalities || []'
|
||||
title='filters.municipality'
|
||||
type='municipality'
|
||||
:toggle-ignore='toggleIgnore'
|
||||
/>
|
||||
<list
|
||||
:model="cities || []"
|
||||
title="filters.city"
|
||||
type="city"
|
||||
:toggle-ignore="toggleIgnore"
|
||||
:model='cities || []'
|
||||
title='filters.city'
|
||||
type='city'
|
||||
:toggle-ignore='toggleIgnore'
|
||||
/>
|
||||
<list
|
||||
:model="danceHalls || []"
|
||||
title="filters.hall"
|
||||
type="danceHall"
|
||||
:toggle-ignore="toggleIgnore"
|
||||
:model='danceHalls || []'
|
||||
title='filters.hall'
|
||||
type='danceHall'
|
||||
:toggle-ignore='toggleIgnore'
|
||||
/>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</v-card>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
<v-snackbar
|
||||
v-model="snackbar.active"
|
||||
:color="snackbar.color"
|
||||
:timeout="5000"
|
||||
v-model='snackbar.active'
|
||||
:color='snackbar.color'
|
||||
:timeout='5000'
|
||||
>
|
||||
{{ snackbar.text }}
|
||||
</v-snackbar>
|
||||
@@ -58,15 +62,18 @@
|
||||
|
||||
<script lang='ts'>
|
||||
import { computed, ref } from 'vue'
|
||||
import { useStore } from '@nuxtjs/composition-api'
|
||||
import { useNuxtApp } from '@nuxt/bridge/dist/runtime'
|
||||
|
||||
import List from './List/index.vue'
|
||||
import { useAuth } from '~/plugins/auth'
|
||||
import { useTranslation } from '~/plugins/i18n'
|
||||
import {
|
||||
useFetchFiltersQuery,
|
||||
useToggleIgnoreBandMutation, useToggleIgnoreCityMutation,
|
||||
useToggleIgnoreDanceHallMutation, useToggleIgnoreMunicipalityMutation, useToggleIgnoreStateMutation
|
||||
useToggleIgnoreBandMutation,
|
||||
useToggleIgnoreCityMutation,
|
||||
useToggleIgnoreDanceHallMutation,
|
||||
useToggleIgnoreMunicipalityMutation,
|
||||
useToggleIgnoreStateMutation
|
||||
} from '~/graphql/generated/operations'
|
||||
|
||||
export default {
|
||||
@@ -75,9 +82,9 @@ export default {
|
||||
List
|
||||
},
|
||||
setup() {
|
||||
const store = useStore()
|
||||
const { $store } = useNuxtApp()
|
||||
const { t } = useTranslation()
|
||||
store.commit('setTitle', t('app.links.filters'))
|
||||
$store.commit('setTitle', t('app.links.filters'))
|
||||
const { isAuthenticated } = useAuth()
|
||||
const { result, loading, refetch } = useFetchFiltersQuery()
|
||||
const bands = computed(() => result.value?.bands ?? [])
|
||||
|
||||
+9
-6
@@ -1,7 +1,11 @@
|
||||
import { defineNuxtConfig } from '@nuxt/bridge'
|
||||
import translations from './translations'
|
||||
import numberFormats from './translations/numberFormats'
|
||||
|
||||
export default {
|
||||
export default defineNuxtConfig({
|
||||
alias: {
|
||||
tslib: 'tslib/tslib.es6.js'
|
||||
},
|
||||
build: {
|
||||
extend(config) {
|
||||
config.module.rules.push({
|
||||
@@ -14,8 +18,8 @@ export default {
|
||||
presets({ isServer }) {
|
||||
return [
|
||||
[
|
||||
require.resolve('@nuxt/babel-preset-app'),
|
||||
// require.resolve('@nuxt/babel-preset-app-edge'), // For nuxt-edge users
|
||||
// require.resolve('@nuxt/babel-preset-app'),
|
||||
require.resolve('@nuxt/babel-preset-app-edge'), // For nuxt-edge users
|
||||
{
|
||||
buildTarget: isServer ? 'server' : 'client',
|
||||
corejs: { version: 3 }
|
||||
@@ -26,14 +30,12 @@ export default {
|
||||
}
|
||||
},
|
||||
buildModules: [
|
||||
'@nuxt/typescript-build',
|
||||
// https://go.nuxtjs.dev/eslint
|
||||
['@nuxtjs/eslint-module', { exclude: ['graphql/generated', 'node_modules'] }],
|
||||
// https://go.nuxtjs.dev/stylelint
|
||||
'@nuxtjs/stylelint-module',
|
||||
// https://go.nuxtjs.dev/vuetify
|
||||
'@nuxtjs/vuetify',
|
||||
'@nuxtjs/composition-api/module',
|
||||
'@vueuse/nuxt'
|
||||
],
|
||||
css: ['vuetify/dist/vuetify.css', '~/assets/scss/global.scss'],
|
||||
@@ -126,7 +128,8 @@ export default {
|
||||
config: {} // Additional config
|
||||
},
|
||||
ssr: false,
|
||||
target: 'static',
|
||||
vuetify: {
|
||||
optionsPath: './vuetify.options.js'
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
+8
-6
@@ -7,9 +7,9 @@
|
||||
"author": "Joakim Olsson <joakim@unbound.se>",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "nuxt",
|
||||
"build": "nuxt build",
|
||||
"start": "nuxt start",
|
||||
"dev": "nuxi dev",
|
||||
"build": "nuxi generate",
|
||||
"start": "nuxi preview",
|
||||
"generate": "nuxt generate",
|
||||
"lint:js": "eslint --ext \".ts,.js,.vue\" --ignore-path .gitignore .",
|
||||
"lint:style": "stylelint \"**/*.{css,scss,sass,html,vue}\" --ignore-path .gitignore",
|
||||
@@ -26,7 +26,6 @@
|
||||
"@graphql-codegen/typescript": "^2.7.3",
|
||||
"@graphql-codegen/typescript-operations": "^2.5.3",
|
||||
"@graphql-codegen/typescript-vue-apollo": "^3.3.3",
|
||||
"@nuxtjs/composition-api": "^0.33.1",
|
||||
"@nuxtjs/i18n": "^7.2.3",
|
||||
"@nuxtjs/moment": "^1.1.0",
|
||||
"@nuxtjs/sentry": "^5.1.7",
|
||||
@@ -41,7 +40,7 @@
|
||||
"graphql-tag": "^2.12.6",
|
||||
"moment": "^2.29.4",
|
||||
"node-sass": "^7.0.1",
|
||||
"nuxt": "^2.15.8",
|
||||
"nuxt-edge": "latest",
|
||||
"sass-loader": "^10.1.1",
|
||||
"vue": "2.7.8",
|
||||
"vue-demi": "^0.13.7",
|
||||
@@ -55,11 +54,13 @@
|
||||
"@babel/runtime-corejs3": "^7.18.9",
|
||||
"@graphql-codegen/cli": "^2.11.6",
|
||||
"@graphql-codegen/fragment-matcher": "^3.3.1",
|
||||
"@nuxt/bridge": "npm:@nuxt/bridge-edge",
|
||||
"@nuxt/types": "^2.15.8",
|
||||
"@nuxt/typescript-build": "^2.1.0",
|
||||
"@nuxtjs/eslint-config-typescript": "^10.0.0",
|
||||
"@nuxtjs/eslint-module": "^3.1.0",
|
||||
"@nuxtjs/stylelint-module": "^4.1.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.33.1",
|
||||
"@typescript-eslint/parser": "^5.33.1",
|
||||
"babel-eslint": "^10.0.3",
|
||||
"cli-engine": "^4.7.6",
|
||||
"cypress": "^10.5.0",
|
||||
@@ -78,6 +79,7 @@
|
||||
"stylelint-config-prettier": "^9.0.3",
|
||||
"stylelint-config-recommended-vue": "^1.4.0",
|
||||
"stylelint-config-standard": "^27.0.0",
|
||||
"typescript": "^4.7.4",
|
||||
"wait-on": "^6.0.1"
|
||||
},
|
||||
"snyk": true
|
||||
|
||||
+1
-8
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"extends": "./.nuxt/tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"target": "ES2018",
|
||||
"module": "ESNext",
|
||||
@@ -14,14 +15,6 @@
|
||||
"strict": true,
|
||||
"noEmit": true,
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"~/*": [
|
||||
"./*"
|
||||
],
|
||||
"@/*": [
|
||||
"./*"
|
||||
]
|
||||
},
|
||||
"types": [
|
||||
"@types/node",
|
||||
"@nuxt/types",
|
||||
|
||||
Reference in New Issue
Block a user