Skip to content

Commit 0441c2b

Browse files
authored
chore: update dependencies (#20)
1 parent e1bbbed commit 0441c2b

File tree

9 files changed

+167
-97
lines changed

9 files changed

+167
-97
lines changed

bun.lock

Lines changed: 120 additions & 64 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
2-
"name": "v1",
3-
"version": "0.0.0",
2+
"name": "curator-frontend",
3+
"version": "1.0.0",
44
"private": true,
55
"type": "module",
66
"scripts": {
77
"dev": "vite",
8-
"build": "run-p type-check \"build-only {@}\" --",
8+
"build": "run-p typecheck \"build-only {@}\" --",
99
"build-only": "vite build",
10-
"type-check": "vue-tsc --build",
10+
"typecheck": "vue-tsc --build",
1111
"lint": "eslint . --fix",
1212
"format": "prettier --write src/"
1313
},
@@ -20,18 +20,18 @@
2020
},
2121
"devDependencies": {
2222
"@primevue/auto-import-resolver": "4.3.6",
23-
"@stylistic/eslint-plugin": "^5.1.0",
23+
"@stylistic/eslint-plugin": "^5.2.2",
2424
"@tailwindcss/vite": "^4.1.11",
2525
"@tsconfig/node22": "^22.0.2",
26-
"@types/bun": "^1.2.18",
27-
"@types/node": "^24.0.12",
28-
"@typescript-eslint/parser": "^8.36.0",
26+
"@types/bun": "^1.2.19",
27+
"@types/node": "^24.1.0",
28+
"@typescript-eslint/parser": "^8.38.0",
2929
"@vitejs/plugin-vue": "^6.0.0",
3030
"@vue/eslint-config-prettier": "^10.2.0",
3131
"@vue/eslint-config-typescript": "^14.6.0",
3232
"@vue/tsconfig": "^0.7.0",
3333
"autoprefixer": "^10.4.21",
34-
"eslint": "^9.30.1",
34+
"eslint": "^9.31.0",
3535
"eslint-plugin-vue": "~10.3.0",
3636
"jiti": "^2.4.2",
3737
"npm-run-all2": "^8.0.4",
@@ -41,11 +41,14 @@
4141
"typescript": "~5.8.3",
4242
"unplugin-auto-import": "^19.3.0",
4343
"unplugin-vue-components": "^28.8.0",
44-
"vite": "^7.0.4",
44+
"vite": "^7.0.5",
4545
"vite-plugin-vue-devtools": "^7.7.7",
46-
"vue-tsc": "^3.0.1"
46+
"vue-tsc": "^3.0.3"
4747
},
4848
"trustedDependencies": [
4949
"@tailwindcss/oxide"
50-
]
50+
],
51+
"engines": {
52+
"bun": "1.2.19"
53+
}
5154
}

src/components/BotsDataTable.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ interface Props {
77
const props = defineProps<Props>()
88
const botsStore = useBotsStore()
99
const authStore = useAuthStore()
10+
11+
const { isLoading } = useBotStatus()
1012
</script>
1113

1214
<template>
1315
<DataTable
1416
:value="botsStore.bots"
15-
:loading="botsStore.loading"
17+
:loading="isLoading"
1618
stripedRows
1719
size="small"
1820
class="p-datatable-sm"

src/components/BotsTable.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const botsStore = useBotsStore()
66
77
const { fetchBots, fetchJobs } = useBotsApi()
88
const { startJob, deleteJob } = useJobsApi()
9+
const { isLoading } = useBotStatus()
910
1011
// Computed properties
1112
const error = computed(() => {
@@ -73,8 +74,8 @@ const handleDeleteJob = (jobType: string) => refreshBots(() => deleteJob(jobType
7374
<Button
7475
icon="pi pi-refresh"
7576
class="p-button-rounded p-button-info"
76-
:loading="botsStore.loading"
77-
:disabled="botsStore.loading"
77+
:loading="isLoading"
78+
:disabled="isLoading"
7879
@click="refreshBots"
7980
/>
8081
</div>

src/composables/useBotStatus.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,14 @@ export const createStatusFromJob = (statusLong: string): BotStatus => {
8181
}
8282

8383
export const useBotStatus = () => {
84+
const botStore = useBotsStore()
85+
const jobStore = useJobsStore()
86+
const harborStore = useHarborStore()
87+
88+
const isLoading = computed(() => {
89+
return botStore.isLoading || jobStore.isLoading || harborStore.isLoading
90+
})
91+
8492
/**
8593
* Updates bots with job status information
8694
* @param bots - The array of bots to update
@@ -117,6 +125,7 @@ export const useBotStatus = () => {
117125
}
118126

119127
return {
128+
isLoading,
120129
updateBotsWithJobStatus,
121130
statusConfig: STATUS_CONFIG,
122131
}

src/stores/auth.store.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,15 @@ export const useAuthStore = defineStore('auth', () => {
4343
}
4444

4545
return {
46-
user,
46+
// State
4747
isAuthenticated,
4848
isAuthorized,
49+
isLoading,
50+
user,
51+
52+
// Actions
4953
login,
5054
logout,
5155
checkAuth,
52-
isLoading,
5356
}
5457
})

src/stores/bots.store.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
export const useBotsStore = defineStore('bots', () => {
2-
// Child stores
3-
const harborStore = useHarborStore()
4-
const jobsStore = useJobsStore()
5-
62
// State
7-
const loading = ref(false)
3+
const isLoading = ref(false)
84
const error = ref('')
95
const bots = ref<Bot[]>([])
106
const lastRefreshed = ref<Date | null>(null)
@@ -23,8 +19,8 @@ export const useBotsStore = defineStore('bots', () => {
2319
lastRefreshed.value = new Date()
2420
}
2521

26-
const setLoading = (isLoading: boolean) => {
27-
loading.value = isLoading
22+
const setLoading = (_isLoading: boolean) => {
23+
isLoading.value = _isLoading
2824
}
2925

3026
const updateHasPendingJobs = () => {
@@ -38,7 +34,7 @@ export const useBotsStore = defineStore('bots', () => {
3834
// State
3935
hasPendingJobs,
4036
error,
41-
loading: computed(() => loading.value || harborStore.loading || jobsStore.loading),
37+
isLoading,
4238

4339
// Getters
4440
bots,

src/stores/harbor.store.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
export const useHarborStore = defineStore('harbor', () => {
22
// State
3-
const loading = ref(false)
3+
const isLoading = ref(false)
44
const error = ref('')
55
const processes = ref<Process[]>([])
66

77
// Getters
88
const hasProcesses = computed(() => processes.value.length > 0)
99

1010
// Actions
11-
const setLoading = (isLoading: boolean) => {
12-
loading.value = isLoading
11+
const setLoading = (_isLoading: boolean) => {
12+
isLoading.value = _isLoading
1313
}
1414

1515
const setError = (errorMessage: string) => {
@@ -22,7 +22,7 @@ export const useHarborStore = defineStore('harbor', () => {
2222

2323
return {
2424
// State
25-
loading,
25+
isLoading,
2626
error,
2727
processes,
2828

src/stores/jobs.store.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
export const useJobsStore = defineStore('jobs', () => {
22
// State
3-
const loading = ref(false)
3+
const isLoading = ref(false)
44
const error = ref('')
55
const jobs = ref<Job[]>([])
66
const starting = ref<Record<string, boolean>>({})
77
const deleting = ref<Record<string, boolean>>({})
88

99
// Actions
10-
const setLoading = (isLoading: boolean) => {
11-
loading.value = isLoading
10+
const setLoading = (_isLoading: boolean) => {
11+
isLoading.value = _isLoading
1212
}
1313

1414
const setError = (errorMessage: string) => {
@@ -37,7 +37,7 @@ export const useJobsStore = defineStore('jobs', () => {
3737

3838
return {
3939
// State
40-
loading,
40+
isLoading,
4141
error,
4242
jobs,
4343
starting,

0 commit comments

Comments
 (0)