Skip to content

Commit 353fc19

Browse files
committed
update graphql
1 parent 85f52e3 commit 353fc19

File tree

12 files changed

+2938
-3702
lines changed

12 files changed

+2938
-3702
lines changed

components/map/View.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ interface DynmapOptions {
2020
}
2121
2222
const { data: options, refresh } = await useFetch<DynmapOptions>('/dynmap/up/configuration', {
23-
transform: r => JSON.parse(r as unknown as string),
23+
transform: r => {
24+
console.log(r)
25+
return JSON.parse(r as unknown as string)
26+
},
2427
})
2528
2629
const context = useMap()

components/network/Node.vue

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
11
<template>
22
<g v-tooltip="$t(`network.node_type.${node.type.toLowerCase()}`)">
33
<circle v-if="isCircle" :r="config.radius * scale" :fill="color" />
4-
<rect
5-
v-else
6-
:height="config.height * scale"
7-
:width="config.width * scale"
8-
:x="config.height * scale * -0.5"
9-
:y="config.width * scale * -0.5"
10-
:fill="color"
11-
/>
4+
<rect v-else :height="config.height * scale" :width="config.width * scale" :x="config.height * scale * -0.5"
5+
:y="config.width * scale * -0.5" :fill="color" />
126
<component :is="icon" v-if="icon" v-svg-size="{ ...config, scale: scale * 0.6 }" />
137
<text :x="0" y="3em" :font-size="9 * scale" text-anchor="middle" fill="#FFF">
148
{{ node.name }}
@@ -17,7 +11,7 @@
1711
</template>
1812

1913
<script lang="ts" setup>
20-
import { BookOpenIcon, FlagIcon, MapPinIcon, UserGroupIcon, UserIcon } from '@heroicons/vue/24/solid/esm'
14+
import { BookOpenIcon, FlagIcon, MapPinIcon, UserGroupIcon, UserIcon } from '@heroicons/vue/24/solid'
2115
import type { ShapeType } from 'v-network-graph'
2216
import type { Node } from '~/composables/useNetwork'
2317

components/paginated/Filter.vue

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
<template>
2-
<FormKit
3-
:id="filterId"
4-
:classes="{ form: 'grid grid-flow-col gap-2 w-max mx-auto items-end' }"
5-
type="form"
6-
:actions="false"
7-
:value="rawValue"
8-
@input="update"
9-
>
2+
<FormKit :id="filterId" :classes="{ form: 'grid grid-flow-col gap-2 w-max mx-auto items-end' }" type="form"
3+
:actions="false" :value="rawValue" @input="update">
104
<span class="bg-solid-900 p-3 rounded mb-2 border-2 border-transparent"> Filter by </span>
115
<slot />
126
<FormKit type="button" suffix-icon="trash" @click="reset(filterId)"> Reset </FormKit>
@@ -15,7 +9,7 @@
159

1610
<script lang="ts" setup>
1711
import { reset } from '@formkit/core'
18-
import type { TimestampFilter, RawTimestampFilter } from '~~/composables/useFilter'
12+
import type { RawTimestampFilter, TimestampFilter } from '~~/composables/useFilter'
1913
2014
const props = defineProps<{
2115
id: string

config/apollo.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import introspectionResult from '../graphql/generated'
33
import typePolicies from '../graphql/typePolicies'
44

55
export default defineApolloClient({
6-
httpEndpoint: '/api/graphql',
6+
// will be overridden by plugins/apollo.ts using the runtimeConfig
7+
httpEndpoint: 'http://localhost:3000/api/graphql',
78
inMemoryCacheOptions: {
89
typePolicies,
910
possibleTypes: introspectionResult.possibleTypes,

graphql/generated.ts

Lines changed: 181 additions & 33 deletions
Large diffs are not rendered by default.

nuxt.config.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,16 @@ export default defineNuxtConfig({
1818

1919
nitro: {
2020
devProxy: {
21-
'/api/': 'http://localhost:8080/api',
22-
'/auth/': 'http://localhost:8080/auth',
23-
'/dynmap/': {
24-
target: 'https://map.somethingcatchy.net/',
25-
changeOrigin: true,
21+
'/api': 'http://localhost:8080/api',
22+
'/auth': 'http://localhost:8080/auth',
23+
'/dynmap': {
24+
target: 'http://localhost:8123',
2625
},
2726
},
2827
},
2928

3029
build: {
31-
transpile: ['graphql', '@heroicons/vue', 'lodash'],
30+
transpile: ['graphql'],
3231
},
3332

3433
apollo: {
@@ -66,4 +65,8 @@ export default defineNuxtConfig({
6665
strict: true,
6766
shim: false,
6867
},
68+
69+
runtimeConfig: {
70+
apiUrl: 'http://localhost:3000/api',
71+
},
6972
})

package.json

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,52 +17,51 @@
1717
"lint": "yarn lint:code && yarn lint:style"
1818
},
1919
"devDependencies": {
20-
"@formkit/nuxt": "^1.0.0-beta.11",
21-
"@formkit/themes": "^1.0.0-beta.12",
22-
"@graphql-codegen/add": "^3.2.3",
20+
"@formkit/nuxt": "^0.19.3",
21+
"@formkit/themes": "^0.19.3",
22+
"@graphql-codegen/add": "^4.0.1",
2323
"@graphql-codegen/cli": "^3.3.1",
24-
"@graphql-codegen/fragment-matcher": "^3.3.3",
24+
"@graphql-codegen/fragment-matcher": "^4.0.1",
2525
"@graphql-codegen/typed-document-node": "^4.0.1",
26-
"@graphql-codegen/typescript": "^2.8.7",
26+
"@graphql-codegen/typescript": "^3.0.4",
2727
"@graphql-codegen/typescript-operations": "^3.0.4",
2828
"@graphql-eslint/eslint-plugin": "^3.18.0",
2929
"@heroicons/vue": "^2.0.17",
3030
"@nuxtjs/apollo": "^5.0.0-alpha.6",
3131
"@nuxtjs/color-mode": "^3.1.8",
3232
"@nuxtjs/eslint-config-typescript": "^12.0.0",
33-
"@nuxtjs/i18n": "npm:@nuxtjs/i18n-edge",
34-
"@nuxtjs/i18n-edge": "npm:@nuxtjs/i18n-edge",
35-
"@nuxtjs/tailwindcss": "^6.1.3",
36-
"@pssbletrngle/assets-renderer": "1.3.1",
33+
"@nuxtjs/i18n": "^8.0.0-beta.11",
34+
"@nuxtjs/tailwindcss": "^6.8.0",
3735
"@types/leaflet": "^1.8.0",
3836
"@types/lodash-es": "^4.17.7",
3937
"@types/marked": "^4.0.8",
4038
"@types/node": "18.16.3",
41-
"@types/sanitize-html": "^2.8.0",
39+
"@types/sanitize-html": "^2.9.0",
4240
"@volar-plugins/prettier": "^2.0.0",
4341
"@vue-leaflet/vue-leaflet": "^0.9.0",
44-
"@vueform/multiselect": "^2.6.1",
42+
"@vueform/multiselect": "^2.6.2",
4543
"core-js": "^3.30.0",
44+
"d3-force": "^3.0.0",
4645
"eslint": "^8.39.0",
4746
"eslint-config-stylelint": "^18.0.0",
4847
"eslint-plugin-nuxt": "^4.0.0",
4948
"floating-vue": "2.0.0-beta.20",
50-
"graphql": "^16.6.0",
49+
"graphql": "^16.8.0",
5150
"leaflet": "^1.9.2",
5251
"lodash-es": "^4.17.21",
5352
"marked": "^4.2.12",
5453
"mini-svg-data-uri": "^1.4.4",
55-
"nuxt": "^3.4.3",
54+
"nuxt": "^3.5.3",
5655
"postcss-for": "^2.1.1",
5756
"postcss-html": "^1.5.0",
58-
"prettier": "^2.8.3",
59-
"sanitize-html": "^2.8.1",
60-
"sass": "^1.60.0",
61-
"sass-loader": "^13.1.0",
62-
"stylelint": "^14.16.1",
57+
"prettier": "^2.8.8",
58+
"sanitize-html": "^2.10.0",
59+
"sass": "^1.63.4",
60+
"sass-loader": "^13.3.2",
61+
"stylelint": "^15.6.1",
6362
"stylelint-config-prettier": "^9.0.3",
6463
"stylelint-config-recommended-vue": "^1.4.0",
6564
"stylelint-config-standard-scss": "^6.1.0",
66-
"v-network-graph": "^0.7.0"
65+
"v-network-graph": "^0.9.1"
6766
}
6867
}

pages/index.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
<StyledTitle> Atlas </StyledTitle>
66
<NuxtLink v-for="link in links" :key="link.label" :to="link.to">
77
<StyledPanel class="my-3 text-3xl">
8-
<InlineIcon> <component :is="link.icon" /> </InlineIcon>
8+
<InlineIcon>
9+
<component :is="link.icon" />
10+
</InlineIcon>
911
<span class="ml-5"> {{ link.label }} </span>
1012
</StyledPanel>
1113
</NuxtLink>
@@ -14,7 +16,7 @@
1416
</template>
1517

1618
<script lang="ts" setup>
17-
import { MapIcon, BookOpenIcon } from '@heroicons/vue/24/outline'
19+
import { BookOpenIcon, MapIcon } from '@heroicons/vue/24/outline';
1820
1921
const links = [
2022
{ to: '/map', label: 'Map', icon: MapIcon },

pages/login.vue

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,18 @@
44
<StyledButton id="discord"> Login via Discord </StyledButton>
55
</a>
66
<div v-if="result?.settings.development">
7-
<FormKit
8-
type="form"
9-
:classes="{ form: 'grid grid-flow-col gap-2 mt-1 items-stretch' }"
10-
submit-label="Login"
7+
<FormKit type="form" :classes="{ form: 'grid grid-flow-col gap-2 mt-1 items-stretch' }" submit-label="Login"
118
:submit-attrs="{
129
'suffix-icon': 'chevron-right',
13-
}"
14-
@submit="seededLogin"
15-
>
10+
}" @submit="seededLogin">
1611
<FormKit type="text" name="email" placeholder="E-Mail" help="Login as seeded user" />
1712
</FormKit>
1813
</div>
1914
</div>
2015
</template>
2116

2217
<script lang="ts" setup>
23-
import { ApiSettingsDocument, ImpersonateDocument, ImpersonateMutationVariables } from '~/graphql/generated'
18+
import { ApiSettingsDocument, ImpersonateDocument, ImpersonateMutationVariables } from '~/graphql/generated';
2419
2520
definePageMeta({
2621
layout: 'center',

pages/map/index.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
<template>
2+
</template>
3+
14
<script lang="ts" setup>
25
definePageMeta({
36
layout: 'map',
47
})
5-
</script>
6-
7-
<style></style>
8+
</script>

0 commit comments

Comments
 (0)