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