-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
64 changed files
with
8,068 additions
and
10,459 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
24 changes: 24 additions & 0 deletions
24
src/mafiasi_link_shortener/frontend/link_shortener_gui/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Nuxt dev/build outputs | ||
.output | ||
.data | ||
.nuxt | ||
.nitro | ||
.cache | ||
dist | ||
|
||
# Node dependencies | ||
node_modules | ||
|
||
# Logs | ||
logs | ||
*.log | ||
|
||
# Misc | ||
.DS_Store | ||
.fleet | ||
.idea | ||
|
||
# Local env files | ||
.env | ||
.env.* | ||
!.env.example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
shamefully-hoist=true |
75 changes: 75 additions & 0 deletions
75
src/mafiasi_link_shortener/frontend/link_shortener_gui/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# Nuxt 3 Minimal Starter | ||
|
||
Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more. | ||
|
||
## Setup | ||
|
||
Make sure to install the dependencies: | ||
|
||
```bash | ||
# npm | ||
npm install | ||
|
||
# pnpm | ||
pnpm install | ||
|
||
# yarn | ||
yarn install | ||
|
||
# bun | ||
bun install | ||
``` | ||
|
||
## Development Server | ||
|
||
Start the development server on `http://localhost:3000`: | ||
|
||
```bash | ||
# npm | ||
npm run dev | ||
|
||
# pnpm | ||
pnpm run dev | ||
|
||
# yarn | ||
yarn dev | ||
|
||
# bun | ||
bun run dev | ||
``` | ||
|
||
## Production | ||
|
||
Build the application for production: | ||
|
||
```bash | ||
# npm | ||
npm run build | ||
|
||
# pnpm | ||
pnpm run build | ||
|
||
# yarn | ||
yarn build | ||
|
||
# bun | ||
bun run build | ||
``` | ||
|
||
Locally preview production build: | ||
|
||
```bash | ||
# npm | ||
npm run preview | ||
|
||
# pnpm | ||
pnpm run preview | ||
|
||
# yarn | ||
yarn preview | ||
|
||
# bun | ||
bun run preview | ||
``` | ||
|
||
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information. |
5 changes: 5 additions & 0 deletions
5
src/mafiasi_link_shortener/frontend/link_shortener_gui/app.config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export default defineAppConfig({ | ||
mafiasi: { | ||
openidScopes: "openid shortlinks" | ||
} | ||
}) |
17 changes: 17 additions & 0 deletions
17
src/mafiasi_link_shortener/frontend/link_shortener_gui/composables/apiClient.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import {Configuration, LinksApi} from "~/utils/apiClient"; | ||
|
||
async function useApiConfig(): Promise<Configuration> { | ||
const config = useRuntimeConfig(); | ||
const userManager = useUserManager(); | ||
|
||
return new Configuration({ | ||
basePath: config.public.apiBase, | ||
headers: { | ||
"Authorization": `Bearer ${(await userManager.getUser())!.access_token}`, | ||
} | ||
}) | ||
} | ||
|
||
export async function useLinksApi(): Promise<LinksApi> { | ||
return new LinksApi(await useApiConfig()) | ||
} |
12 changes: 12 additions & 0 deletions
12
src/mafiasi_link_shortener/frontend/link_shortener_gui/nuxt.config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// https://nuxt.com/docs/api/configuration/nuxt-config | ||
export default defineNuxtConfig({ | ||
extends: ["nuxt_layer_mafiasi"], | ||
app: { | ||
baseURL: "/app", | ||
}, | ||
runtimeConfig: { | ||
public: { | ||
apiBase: "" | ||
} | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/mafiasi_link_shortener/frontend/link_shortener_gui/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"name": "nuxt-app", | ||
"private": true, | ||
"type": "module", | ||
"scripts": { | ||
"build": "nuxt build", | ||
"dev": "nuxt dev --dotenv .env.dev", | ||
"generate": "nuxt generate", | ||
"preview": "nuxt preview", | ||
"postinstall": "nuxt prepare", | ||
"gen-api-client": "openapi-generator-cli generate -g typescript-fetch -i http://localhost:8000/api/schema -o utils/apiClient/" | ||
}, | ||
"devDependencies": { | ||
"@nuxt/devtools": "latest", | ||
"@openapitools/openapi-generator-cli": "^2.7.0", | ||
"nuxt": "^3.8.1", | ||
"vue": "^3.3.8", | ||
"vue-router": "^4.2.5" | ||
}, | ||
"dependencies": { | ||
"nuxt_layer_mafiasi": "github:fsinfuhh/nuxt_layer_mafiasi" | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
src/mafiasi_link_shortener/frontend/link_shortener_gui/pages/index.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<script setup lang="ts"> | ||
definePageMeta({ | ||
middleware: ["authenticated"], | ||
}) | ||
const api = await useLinksApi(); | ||
const links = await api.linksList(); | ||
</script> | ||
|
||
<template> | ||
<UContainer> | ||
<h1>{{ links }}</h1> | ||
</UContainer> | ||
</template> |
Oops, something went wrong.