Skip to content

Commit f439479

Browse files
committed
more client refactor
1 parent da2d3a7 commit f439479

105 files changed

Lines changed: 1258 additions & 1141 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

client/.dockerignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
1+
dist
22
node_modules

client/Dockerfile

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,7 @@
1-
# Build stage
2-
FROM node:23.11.0-alpine3.21 as build
1+
FROM node:24.0.2-alpine3.21 AS build
32
COPY . .
4-
# Install project dependencies (somehow Python has to be installed)
5-
RUN apk --no-cache add --virtual .builds-deps build-base python3
6-
RUN npm ci
7-
# Builds to dist/
8-
RUN npm run build
3+
RUN npm ci && npm run build-only
94

10-
# Production stage.
11-
FROM node:23.11.0-alpine3.21
12-
WORKDIR /app
13-
# Install dependencies of server.js
14-
RUN npm install express connect-history-api-fallback && npm cache clean --force
15-
# Copy over build & server.
16-
COPY --from=build /dist ./dist
17-
COPY . .
18-
19-
EXPOSE 8080
20-
CMD [ "node", "server.js" ]
5+
FROM nginx:1.28.0-alpine3.21-slim
6+
COPY --from=build /dist /usr/share/nginx/html
7+
COPY nginx.conf /etc/nginx/nginx.conf

client/StyleTemplate.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
<script setup lang="ts">
1212
// -- libraries --
13-
import { computed, ref } from "vue"
14-
// --- components ---
1513
// --- stores ---
1614
// --- api ---
1715
// --- types ---
@@ -20,13 +18,21 @@ const { foo = "bar" } = defineProps<{
2018
foo?: string
2119
}>()
2220
// --- emits ---
21+
// Defining emits is technically optional if they are not used in <script>, but it is a good practice to do so.
22+
const emit = defineEmits<{
23+
click: [name: string]
24+
voidExample: []
25+
}>()
2326
// --- data ---
2427
const visible = ref<boolean>(true)
2528
// --- computed ---
2629
const isVisible = computed<boolean>(() => visible.value) // arrow function where possible
2730
// --- watch ---
2831
// --- lifecycle (in order of execution) ---
2932
// --- methods ---
33+
function handleClick(): void {
34+
// do something
35+
}
3036
</script>
3137

3238
<style scoped lang="scss">

client/auto-imports.d.ts

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
/* eslint-disable */
2+
/* prettier-ignore */
3+
// @ts-nocheck
4+
// noinspection JSUnusedGlobalSymbols
5+
// Generated by unplugin-auto-import
6+
// biome-ignore lint: disable
7+
export {}
8+
declare global {
9+
const EffectScope: typeof import('vue')['EffectScope']
10+
const acceptHMRUpdate: typeof import('pinia')['acceptHMRUpdate']
11+
const computed: typeof import('vue')['computed']
12+
const createApp: typeof import('vue')['createApp']
13+
const createPinia: typeof import('pinia')['createPinia']
14+
const customRef: typeof import('vue')['customRef']
15+
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
16+
const defineComponent: typeof import('vue')['defineComponent']
17+
const defineStore: typeof import('pinia')['defineStore']
18+
const effectScope: typeof import('vue')['effectScope']
19+
const getActivePinia: typeof import('pinia')['getActivePinia']
20+
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
21+
const getCurrentScope: typeof import('vue')['getCurrentScope']
22+
const h: typeof import('vue')['h']
23+
const inject: typeof import('vue')['inject']
24+
const isProxy: typeof import('vue')['isProxy']
25+
const isReactive: typeof import('vue')['isReactive']
26+
const isReadonly: typeof import('vue')['isReadonly']
27+
const isRef: typeof import('vue')['isRef']
28+
const mapActions: typeof import('pinia')['mapActions']
29+
const mapGetters: typeof import('pinia')['mapGetters']
30+
const mapState: typeof import('pinia')['mapState']
31+
const mapStores: typeof import('pinia')['mapStores']
32+
const mapWritableState: typeof import('pinia')['mapWritableState']
33+
const markRaw: typeof import('vue')['markRaw']
34+
const nextTick: typeof import('vue')['nextTick']
35+
const onActivated: typeof import('vue')['onActivated']
36+
const onBeforeMount: typeof import('vue')['onBeforeMount']
37+
const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave']
38+
const onBeforeRouteUpdate: typeof import('vue-router')['onBeforeRouteUpdate']
39+
const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
40+
const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
41+
const onDeactivated: typeof import('vue')['onDeactivated']
42+
const onErrorCaptured: typeof import('vue')['onErrorCaptured']
43+
const onMounted: typeof import('vue')['onMounted']
44+
const onRenderTracked: typeof import('vue')['onRenderTracked']
45+
const onRenderTriggered: typeof import('vue')['onRenderTriggered']
46+
const onScopeDispose: typeof import('vue')['onScopeDispose']
47+
const onServerPrefetch: typeof import('vue')['onServerPrefetch']
48+
const onUnmounted: typeof import('vue')['onUnmounted']
49+
const onUpdated: typeof import('vue')['onUpdated']
50+
const onWatcherCleanup: typeof import('vue')['onWatcherCleanup']
51+
const provide: typeof import('vue')['provide']
52+
const reactive: typeof import('vue')['reactive']
53+
const readonly: typeof import('vue')['readonly']
54+
const ref: typeof import('vue')['ref']
55+
const resolveComponent: typeof import('vue')['resolveComponent']
56+
const setActivePinia: typeof import('pinia')['setActivePinia']
57+
const setMapStoreSuffix: typeof import('pinia')['setMapStoreSuffix']
58+
const shallowReactive: typeof import('vue')['shallowReactive']
59+
const shallowReadonly: typeof import('vue')['shallowReadonly']
60+
const shallowRef: typeof import('vue')['shallowRef']
61+
const storeToRefs: typeof import('pinia')['storeToRefs']
62+
const toRaw: typeof import('vue')['toRaw']
63+
const toRef: typeof import('vue')['toRef']
64+
const toRefs: typeof import('vue')['toRefs']
65+
const toValue: typeof import('vue')['toValue']
66+
const triggerRef: typeof import('vue')['triggerRef']
67+
const unref: typeof import('vue')['unref']
68+
const useAttrs: typeof import('vue')['useAttrs']
69+
const useCssModule: typeof import('vue')['useCssModule']
70+
const useCssVars: typeof import('vue')['useCssVars']
71+
const useId: typeof import('vue')['useId']
72+
const useLink: typeof import('vue-router')['useLink']
73+
const useModel: typeof import('vue')['useModel']
74+
const useRoute: typeof import('vue-router')['useRoute']
75+
const useRouter: typeof import('vue-router')['useRouter']
76+
const useSlots: typeof import('vue')['useSlots']
77+
const useTemplateRef: typeof import('vue')['useTemplateRef']
78+
const watch: typeof import('vue')['watch']
79+
const watchEffect: typeof import('vue')['watchEffect']
80+
const watchPostEffect: typeof import('vue')['watchPostEffect']
81+
const watchSyncEffect: typeof import('vue')['watchSyncEffect']
82+
}
83+
// for type re-export
84+
declare global {
85+
// @ts-ignore
86+
export type { Component, Slot, Slots, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
87+
import('vue')
88+
}

client/components.d.ts

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/* eslint-disable */
2+
// @ts-nocheck
3+
// Generated by unplugin-vue-components
4+
// Read more: https://github.com/vuejs/core/pull/3399
5+
// biome-ignore lint: disable
6+
export {}
7+
8+
/* prettier-ignore */
9+
declare module 'vue' {
10+
export interface GlobalComponents {
11+
AnnotateTab: typeof import('./src/components/AnnotateTab.vue')['default']
12+
BenchmarkSetsHelp: typeof import('./src/components/help/BenchmarkSetsHelp.vue')['default']
13+
ComparisonModal: typeof import('./src/components/modals/ComparisonModal.vue')['default']
14+
ContributeTaggerLink: typeof import('./src/components/links/ContributeTaggerLink.vue')['default']
15+
CorpusForm: typeof import('./src/components/modals/corpus/CorpusForm.vue')['default']
16+
CorpusFormHelp: typeof import('./src/components/help/CorpusFormHelp.vue')['default']
17+
CorpusHelp: typeof import('./src/components/help/CorpusHelp.vue')['default']
18+
CorpusTable: typeof import('./src/components/tables/CorpusTable.vue')['default']
19+
DeleteModal: typeof import('./src/components/modals/DeleteModal.vue')['default']
20+
DifferentTagsetsHelp: typeof import('./src/components/help/DifferentTagsetsHelp.vue')['default']
21+
DocumentsHelp: typeof import('./src/components/help/DocumentsHelp.vue')['default']
22+
DocumentsTable: typeof import('./src/components/tables/DocumentsTable.vue')['default']
23+
DownloadButton: typeof import('./src/components/input/DownloadButton.vue')['default']
24+
EvaluateHelp: typeof import('./src/components/help/EvaluateHelp.vue')['default']
25+
EvaluationInfoBox: typeof import('./src/components/EvaluationInfoBox.vue')['default']
26+
ExportHelp: typeof import('./src/components/help/ExportHelp.vue')['default']
27+
ExternalLink: typeof import('./src/components/links/ExternalLink.vue')['default']
28+
FileFormatInput: typeof import('./src/components/input/FileFormatInput.vue')['default']
29+
GButton: typeof import('./src/components/input/GButton.vue')['default']
30+
GCard: typeof import('./src/components/GCard.vue')['default']
31+
GInfo: typeof import('./src/components/GInfo.vue')['default']
32+
GInput: typeof import('./src/components/input/GInput.vue')['default']
33+
GModal: typeof import('./src/components/modals/GModal.vue')['default']
34+
GNav: typeof import('./src/components/links/GNav.vue')['default']
35+
GSpinner: typeof import('./src/components/GSpinner.vue')['default']
36+
GTable: typeof import('./src/components/tables/GTable.vue')['default']
37+
GTabs: typeof import('./src/components/GTabs.vue')['default']
38+
HelpLink: typeof import('./src/components/links/HelpLink.vue')['default']
39+
InspectButton: typeof import('./src/components/input/InspectButton.vue')['default']
40+
JobModal: typeof import('./src/components/modals/jobs/JobModal.vue')['default']
41+
JobSelect: typeof import('./src/components/input/JobSelect.vue')['default']
42+
JobsHelp: typeof import('./src/components/help/JobsHelp.vue')['default']
43+
KeyValues: typeof import('./src/components/KeyValues.vue')['default']
44+
LayerViewer: typeof import('./src/components/tables/LayerViewer.vue')['default']
45+
MailAddress: typeof import('./src/components/links/MailAddress.vue')['default']
46+
MetricsFilter: typeof import('./src/components/tables/MetricsFilter.vue')['default']
47+
MetricsTable: typeof import('./src/components/tables/MetricsTable.vue')['default']
48+
ProgressSegment: typeof import('./src/components/modals/jobs/ProgressSegment.vue')['default']
49+
RightFloatCell: typeof import('./src/components/tables/RightFloatCell.vue')['default']
50+
RouterLink: typeof import('vue-router')['RouterLink']
51+
RouterView: typeof import('vue-router')['RouterView']
52+
SingleTermComparisonTable: typeof import('./src/components/tables/SingleTermComparisonTable.vue')['default']
53+
UploadDocuments: typeof import('./src/components/input/UploadDocuments.vue')['default']
54+
UserList: typeof import('./src/components/modals/corpus/UserList.vue')['default']
55+
VariantsModal: typeof import('./src/components/modals/VariantsModal.vue')['default']
56+
}
57+
}

client/eslint.config.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
declare const _default: import("@typescript-eslint/utils/ts-eslint").FlatConfig.Config[];
2+
export default _default;

client/nginx.conf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
events {}
2+
3+
http {
4+
include /etc/nginx/mime.types;
5+
default_type application/octet-stream;
6+
sendfile on;
7+
server {
8+
listen 80;
9+
location / {
10+
root /usr/share/nginx/html;
11+
index index.html;
12+
try_files $uri $uri/ /index.html;
13+
}
14+
}
15+
}

0 commit comments

Comments
 (0)