diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml index 6aba9fc..b3bbb18 100644 --- a/.forgejo/workflows/build.yml +++ b/.forgejo/workflows/build.yml @@ -58,20 +58,20 @@ jobs: push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - # - name: Extract Binary For Release - # uses: https://github.com/moosetheory/actions-docker-extract@v3.1 - # id: extract - # if: startsWith(github.ref, 'refs/tags/') - # with: - # shell_command: /bin/ash -c - # image: ${{ fromJSON(steps.meta.outputs.json).tags[0] }} - # path: /usr/share/nginx/html - # destination: dist - # - name: Create a Release - # uses: https://forgejo.merr.is/actions/forgejo-release@alpinev1 - # if: startsWith(github.ref, 'refs/tags/') - # with: - # direction: upload - # release-dir: dist - # token: ${{ secrets.ADMIN_TOKEN }} + - name: Extract Binary For Release + uses: https://github.com/moosetheory/actions-docker-extract@v3.1 + id: extract + if: startsWith(github.ref, 'refs/tags/') + with: + shell_command: /bin/ash -c + image: ${{ fromJSON(steps.meta.outputs.json).tags[0] }} + path: /dist + destination: dist + - name: Create a Release + uses: https://forgejo.merr.is/actions/forgejo-release@alpinev1 + if: startsWith(github.ref, 'refs/tags/') + with: + direction: upload + release-dir: dist + token: ${{ secrets.ADMIN_TOKEN }} diff --git a/Dockerfile b/Dockerfile index 82032c6..7b34b52 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,10 +22,6 @@ COPY . . # [optional] tests & build ENV NODE_ENV=production -# I can't run the type checking because of some sort of issue with -# bun and vue-tsc. -# see https://github.com/oven-sh/bun/issues/4754 -# RUN bunx --bun vue-tsc --build --force RUN bunx --bun vite build # Copy the distribution folder into the final image. diff --git a/Dockerfile.dev b/Dockerfile.dev new file mode 100644 index 0000000..f25be24 --- /dev/null +++ b/Dockerfile.dev @@ -0,0 +1,31 @@ +# This is making minimal changes from the guide at +# https://bun.sh/guides/ecosystem/docker (as of 2024-02-04) + +# use the official Bun image +# see all versions at https://hub.docker.com/r/oven/bun/tags +FROM oven/bun:1-alpine as base +WORKDIR /app + +# install dependencies into temp directory +# this will cache them and speed up future builds +FROM base as install +RUN mkdir -p /tmp/dev +COPY package.json bun.lockb /temp/dev/ +RUN cd /temp/dev && bun install --frozen-lockfile + +# install with --production (exclude devDependencies) +RUN mkdir -p /temp/prod +COPY package.json bun.lockb /temp/prod/ +RUN cd /temp/prod && bun install --frozen-lockfile --production +# ^ Is this necessary? Don't we either need prod or not prod? + +# copy node_modules from temp directory +# then copy all (non-ignored) project files into the image +FROM base AS prerelease +COPY --from=install /temp/dev/node_modules node_modules +COPY . . + +FROM nginx:stable-alpine as release + +COPY --from=build-stage /app/docker/nginx.conf /etc/nginx/nginx.conf +COPY --from=build-stage /app/dist /usr/share/nginx/html diff --git a/bun.lockb b/bun.lockb index 39c0ac4..6e01c21 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 5323011..b08cacf 100644 --- a/package.json +++ b/package.json @@ -15,11 +15,9 @@ }, "dependencies": { "axios": "^1.6.5", - "axios-retry": "^4.0.0", - "oidc-client-ts": "^3.0.1", "pinia": "^2.1.7", + "sass": "^1.69.7", "vue": "^3.3.11", - "vue-oidc-client": "^1.0.0-alpha.5", "vue-router": "^4.2.5", "vuetify": "^3.4.10" }, @@ -43,8 +41,6 @@ "typescript": "~5.3.0", "vite": "^5.0.10", "vitest": "^1.0.4", - "vue-tsc": "^1.8.25", - "sass": "^1.69.7", - "vite-plugin-vuetify": "^2.0.1" + "vue-tsc": "^1.8.25" } } diff --git a/public/config.json b/public/config.json deleted file mode 100644 index e89a2f4..0000000 --- a/public/config.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "apiBaseURL": "http://coder.local.merr.is:3001", - "oidcAuthority": "https://auth.joes.moosenet.work", - "oidcClientID": "255988227184328707@isekai:_slow_life_calculator", - "oidcProjectID": "255987963094106115" -} \ No newline at end of file diff --git a/src/App.vue b/src/App.vue index 5248187..63d145c 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,13 +1,25 @@ - + Copyright Annika Merris 2024 diff --git a/src/components/GlobalHeader.vue b/src/components/GlobalHeader.vue index 4ae83ce..fd1edfb 100644 --- a/src/components/GlobalHeader.vue +++ b/src/components/GlobalHeader.vue @@ -1,22 +1,7 @@ @@ -40,11 +25,5 @@ const logout = () => { Intimacy Power - - - Logout - Login - - diff --git a/src/components/NewItemForm.vue b/src/components/NewItemForm.vue deleted file mode 100644 index 63fa5d6..0000000 --- a/src/components/NewItemForm.vue +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - - - Add New Item - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Submit - Clear - - - - - - diff --git a/src/components/SpecialItemsCard.vue b/src/components/SpecialItemsCard.vue index 7c3b14c..7677514 100644 --- a/src/components/SpecialItemsCard.vue +++ b/src/components/SpecialItemsCard.vue @@ -1,82 +1,72 @@ - + Special Items Items from events @@ -169,9 +151,9 @@ if (!isLoading.value) { density="compact" v-model:sort-by="sortBy" :items="filteredItems" - :headers="computedHeaders" + :headers="headers" > - + - {{ item[1].origin }} + {{ item?.[1].origin }} + - + - + - + {{ item[1].minItemPower * item[1].owned }} - + {{ item[1].maxItemPower * item[1].owned }} - + {{ ((item[1].minItemPower + item[1].maxItemPower) / 2) * item[1].owned }} diff --git a/src/components/StandardItemsCard.vue b/src/components/StandardItemsCard.vue index a36ae0d..3a4382b 100644 --- a/src/components/StandardItemsCard.vue +++ b/src/components/StandardItemsCard.vue @@ -1,14 +1,7 @@ - + Standard Items Items that exist all the time @@ -92,7 +77,7 @@ const isLoading = computed((): boolean => props.items.keys()?.next().done ?? fal :items="[...items.entries()]" :headers="headers" > - + props.items.keys()?.next().done ?? fal - + props.items.keys()?.next().done ?? fal {{ item[1].itemName }} - + props.items.keys()?.next().done ?? fal @update:model-value="usePowerItems().updateOwned(item[0], item[1].owned)" > - + {{ item[1].minItemPower * item[1].owned }} diff --git a/src/components/SummaryCard.vue b/src/components/SummaryCard.vue index 69a681b..48e4f0d 100644 --- a/src/components/SummaryCard.vue +++ b/src/components/SummaryCard.vue @@ -1,12 +1,11 @@ - + Blessing Power @@ -44,7 +34,6 @@ onBeforeMount(() => { /> { - if (standardFellowItems.value.keys().next().done) { - usePowerItems().fetchFellowItems() - } - if (specialFellowItems.value.keys().next().done) { - usePowerItems().fetchFellowItems() - } -}) - + Fellow Power @@ -43,7 +33,6 @@ onBeforeMount(() => { :average-total="specialFellowItemsAveTotal" /> { - if (standardIntimacyItems.value.keys().next().done) { - usePowerItems().fetchIntimacyItems() - } - if (specialIntimacyItems.value.keys().next().done) { - usePowerItems().fetchIntimacyItems() - } -}) - + Intimacy Power @@ -43,7 +33,6 @@ onBeforeMount(() => { :average-total="specialIntimacyItemsAveTotal" /> - - - This is a login-protected page - - The following profile data is extended by information from ZITADELs userinfo endpoint. - - - - - {{ c.key }}: {{ c.value }} - - - - - Sign Out - - - - - - diff --git a/src/views/NoAccess.vue b/src/views/NoAccess.vue deleted file mode 100644 index d1c9e80..0000000 --- a/src/views/NoAccess.vue +++ /dev/null @@ -1,22 +0,0 @@ - - - - - Access denied - - - You don't have the role "admin" in your ZITADEL project. - - - - - - \ No newline at end of file diff --git a/src/views/PostLoginView.vue b/src/views/PostLoginView.vue deleted file mode 100644 index 3f9cbf3..0000000 --- a/src/views/PostLoginView.vue +++ /dev/null @@ -1,10 +0,0 @@ - - - - Hi mom - diff --git a/src/views/Test.vue b/src/views/Test.vue new file mode 100644 index 0000000..02e58f4 --- /dev/null +++ b/src/views/Test.vue @@ -0,0 +1,52 @@ + + + + + Intimacy Power + + + + + + + + + + + diff --git a/src/views/TestView.vue b/src/views/TestView.vue deleted file mode 100644 index b5b51fd..0000000 --- a/src/views/TestView.vue +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - diff --git a/vite.config.ts b/vite.config.ts index 24a6d02..5c45e1d 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -2,13 +2,11 @@ import { fileURLToPath, URL } from 'node:url' import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' -import vuetify from 'vite-plugin-vuetify' // https://vitejs.dev/config/ export default defineConfig({ plugins: [ vue(), - vuetify(), ], resolve: { alias: {
-