web: formatting by prettier
Co-authored-by: Schmackofatz <Schmackofatz@gmail.com>
This commit is contained in:
parent
856e8b70ef
commit
b24a040d4d
10 changed files with 390 additions and 57 deletions
1
web/components.d.ts
vendored
1
web/components.d.ts
vendored
|
@ -12,5 +12,6 @@ declare module 'vue' {
|
|||
HeaderBar: typeof import('./src/components/HeaderBar.vue')['default']
|
||||
ListViewElement: typeof import('./src/components/ListViewElement.vue')['default']
|
||||
LoginPage: typeof import('./src/components/loginPage.vue')['default']
|
||||
MainPage: typeof import('./src/components/MainPage.vue')['default']
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@mdi/font": "6.2.95",
|
||||
"@tanstack/vue-query": "^5.51.0",
|
||||
"@vueuse/core": "^10.11.0",
|
||||
"axios": "^1.7.2",
|
||||
"lucide-vue-next": "^0.402.0",
|
||||
|
|
43
web/pnpm-lock.yaml
generated
43
web/pnpm-lock.yaml
generated
|
@ -11,6 +11,9 @@ importers:
|
|||
'@mdi/font':
|
||||
specifier: 6.2.95
|
||||
version: 6.2.95
|
||||
'@tanstack/vue-query':
|
||||
specifier: ^5.51.0
|
||||
version: 5.51.0(vue@3.4.31(typescript@5.5.3))
|
||||
'@vueuse/core':
|
||||
specifier: ^10.11.0
|
||||
version: 10.11.0(vue@3.4.31(typescript@5.5.3))
|
||||
|
@ -325,6 +328,22 @@ packages:
|
|||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
||||
'@tanstack/match-sorter-utils@8.15.1':
|
||||
resolution: {integrity: sha512-PnVV3d2poenUM31ZbZi/yXkBu3J7kd5k2u51CGwwNojag451AjTH9N6n41yjXz2fpLeewleyLBmNS6+HcGDlXw==}
|
||||
engines: {node: '>=12'}
|
||||
|
||||
'@tanstack/query-core@5.50.1':
|
||||
resolution: {integrity: sha512-lpfhKPrJlyV2DSVcQb/HuozH3Av3kws4ge22agx+lNGpFkS4vLZ7St0l3GLwlAD+bqB+qXGex3JdRKUNtMviEQ==}
|
||||
|
||||
'@tanstack/vue-query@5.51.0':
|
||||
resolution: {integrity: sha512-h9wP5Aib4Xwxyd/9Wvo/QHgm7ZJoaI0XmGO7c2MbZbnqioyRjrbi350qycjdwKWobhhSI1AOiKdLFgc2mbp2vg==}
|
||||
peerDependencies:
|
||||
'@vue/composition-api': ^1.1.2
|
||||
vue: ^2.6.0 || ^3.3.0
|
||||
peerDependenciesMeta:
|
||||
'@vue/composition-api':
|
||||
optional: true
|
||||
|
||||
'@types/estree@1.0.5':
|
||||
resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==}
|
||||
|
||||
|
@ -362,6 +381,9 @@ packages:
|
|||
'@vue/compiler-ssr@3.4.31':
|
||||
resolution: {integrity: sha512-RtefmITAje3fJ8FSg1gwgDhdKhZVntIVbwupdyZDSifZTRMiWxWehAOTCc8/KZDnBOcYQ4/9VWxsTbd3wT0hAA==}
|
||||
|
||||
'@vue/devtools-api@6.6.3':
|
||||
resolution: {integrity: sha512-0MiMsFma/HqA6g3KLKn+AGpL1kgKhFWszC9U29NfpWK5LE7bjeXxySWJrOJ77hBz+TBrBQ7o4QJqbPbqbs8rJw==}
|
||||
|
||||
'@vue/language-core@2.0.26':
|
||||
resolution: {integrity: sha512-/lt6SfQ3O1yDAhPsnLv9iSUgXd1dMHqUm/t3RctfqjuwQf1LnftZ414X3UBn6aXT4MiwXWtbNJ4Z0NZWwDWgJQ==}
|
||||
peerDependencies:
|
||||
|
@ -614,6 +636,9 @@ packages:
|
|||
resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==}
|
||||
engines: {node: '>=8.10.0'}
|
||||
|
||||
remove-accents@0.5.0:
|
||||
resolution: {integrity: sha512-8g3/Otx1eJaVD12e31UbJj1YzdtVvzH85HV7t+9MJYk/u3XmkOUJ5Ys9wQrf9PCPK8+xn4ymzqYCiZl6QWKn+A==}
|
||||
|
||||
resolve@1.22.8:
|
||||
resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==}
|
||||
hasBin: true
|
||||
|
@ -949,6 +974,20 @@ snapshots:
|
|||
'@rollup/rollup-win32-x64-msvc@4.18.0':
|
||||
optional: true
|
||||
|
||||
'@tanstack/match-sorter-utils@8.15.1':
|
||||
dependencies:
|
||||
remove-accents: 0.5.0
|
||||
|
||||
'@tanstack/query-core@5.50.1': {}
|
||||
|
||||
'@tanstack/vue-query@5.51.0(vue@3.4.31(typescript@5.5.3))':
|
||||
dependencies:
|
||||
'@tanstack/match-sorter-utils': 8.15.1
|
||||
'@tanstack/query-core': 5.50.1
|
||||
'@vue/devtools-api': 6.6.3
|
||||
vue: 3.4.31(typescript@5.5.3)
|
||||
vue-demi: 0.14.8(vue@3.4.31(typescript@5.5.3))
|
||||
|
||||
'@types/estree@1.0.5': {}
|
||||
|
||||
'@types/node@20.14.9':
|
||||
|
@ -1004,6 +1043,8 @@ snapshots:
|
|||
'@vue/compiler-dom': 3.4.31
|
||||
'@vue/shared': 3.4.31
|
||||
|
||||
'@vue/devtools-api@6.6.3': {}
|
||||
|
||||
'@vue/language-core@2.0.26(typescript@5.5.3)':
|
||||
dependencies:
|
||||
'@volar/language-core': 2.4.0-alpha.15
|
||||
|
@ -1268,6 +1309,8 @@ snapshots:
|
|||
dependencies:
|
||||
picomatch: 2.3.1
|
||||
|
||||
remove-accents@0.5.0: {}
|
||||
|
||||
resolve@1.22.8:
|
||||
dependencies:
|
||||
is-core-module: 2.14.0
|
||||
|
|
|
@ -5,35 +5,22 @@
|
|||
<loginPage />
|
||||
</div>
|
||||
<div v-else>
|
||||
<HeaderBar />
|
||||
<div class="ma-8">
|
||||
<li>
|
||||
<CategoryContainer licenseGroupName="Jetbrains Ultimate"/>
|
||||
<CategoryContainer licenseGroupName="Microsoft"/>
|
||||
<CategoryContainer licenseGroupName="Willy Wonker Online Movie"/>
|
||||
</li>
|
||||
</div>
|
||||
<MainPage />
|
||||
</div>
|
||||
|
||||
</v-main>
|
||||
</v-app>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import HeaderBar from './components/HeaderBar.vue';
|
||||
import CategoryContainer from './components/CategoryContainer.vue';
|
||||
import { store } from './store';
|
||||
|
||||
|
||||
import MainPage from "./components/MainPage.vue";
|
||||
import loginPage from "./components/loginPage.vue";
|
||||
import { store } from "./store";
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
li {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
html,body,main {
|
||||
background-color: #E3E3E3
|
||||
}
|
||||
html,
|
||||
body,
|
||||
main {
|
||||
background-color: #e3e3e3;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<script setup lang="ts">
|
||||
import { useClipboard } from '@vueuse/core'
|
||||
import { useClipboard } from "@vueuse/core";
|
||||
|
||||
const source = ref('Hello')
|
||||
const { text, copy, copied, isSupported } = useClipboard({ source })
|
||||
const source = ref("Hello");
|
||||
const { text, copy, copied, isSupported } = useClipboard({ source });
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -12,9 +12,9 @@ const { text, copy, copied, isSupported } = useClipboard({ source })
|
|||
<span v-if="!copied">Copy</span>
|
||||
<span v-else>Copied!</span>
|
||||
</button>
|
||||
<p>Current copied: <code>{{ text || 'none' }}</code></p>
|
||||
<p>
|
||||
Current copied: <code>{{ text || "none" }}</code>
|
||||
</p>
|
||||
</div>
|
||||
<p v-else>
|
||||
Your browser does not support Clipboard API
|
||||
</p>
|
||||
<p v-else>Your browser does not support Clipboard API</p>
|
||||
</template>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
</v-btn>
|
||||
<v-dialog v-model="add" width="600" persistent>
|
||||
<v-card max-width="600">
|
||||
<v-form>
|
||||
<v-form @submit.prevent="submit">
|
||||
<v-card-title>
|
||||
<span class="headline">Add License</span>
|
||||
</v-card-title>
|
||||
|
@ -101,11 +101,7 @@
|
|||
></v-btn>
|
||||
</v-col>
|
||||
<v-col>
|
||||
<v-btn
|
||||
class="ms-auto"
|
||||
text="Add"
|
||||
@click="add = false"
|
||||
></v-btn>
|
||||
<v-btn class="ms-auto" text="Add" type="submit"></v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-actions>
|
||||
|
@ -141,6 +137,8 @@
|
|||
|
||||
<script setup lang="ts">
|
||||
import { store } from "@/store";
|
||||
import { SubmitEventPromise } from "vuetify";
|
||||
import { computed, ref } from "vue";
|
||||
import {
|
||||
Plus,
|
||||
LogOut,
|
||||
|
@ -148,13 +146,17 @@ import {
|
|||
CalendarCheck,
|
||||
CalendarX,
|
||||
} from "lucide-vue-next";
|
||||
import { computed, ref } from "vue";
|
||||
|
||||
function handlelogout() {
|
||||
console.log("logout");
|
||||
store.setToken(null);
|
||||
}
|
||||
|
||||
async function submit(event: SubmitEventPromise) {
|
||||
const result = await event;
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
const add = ref(false);
|
||||
// References for Add License Dialog
|
||||
const addLicenseName = ref<string>("");
|
||||
|
@ -162,7 +164,7 @@ const licenseNameRules = [
|
|||
(value: string) => {
|
||||
if (value) return true;
|
||||
|
||||
return "YOU MUST ENTER A LICENSE NAME";
|
||||
return "YOU MUST ENTER (A LICENSE NAME)";
|
||||
},
|
||||
];
|
||||
const addAmount = ref<number | undefined>();
|
||||
|
|
23
web/src/components/MainPage.vue
Normal file
23
web/src/components/MainPage.vue
Normal file
|
@ -0,0 +1,23 @@
|
|||
<template>
|
||||
<div>
|
||||
<HeaderBar />
|
||||
<div class="ma-8">
|
||||
<li>
|
||||
<CategoryContainer licenseGroupName="Jetbrains Ultimate" />
|
||||
<CategoryContainer licenseGroupName="Microsoft" />
|
||||
<CategoryContainer licenseGroupName="Willy Wonker Online Movie" />
|
||||
</li>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import HeaderBar from "./HeaderBar.vue";
|
||||
import CategoryContainer from "./CategoryContainer.vue";
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
li {
|
||||
list-style-type: none;
|
||||
}
|
||||
</style>
|
|
@ -6,8 +6,19 @@
|
|||
<v-card-title class="text-h5">Login</v-card-title>
|
||||
<v-card-text>
|
||||
<v-form>
|
||||
<v-text-field v-model="email" label="Email" required variant="outlined"></v-text-field>
|
||||
<v-text-field v-model="password" label="Password" type="password" required variant="outlined"></v-text-field>
|
||||
<v-text-field
|
||||
v-model="email"
|
||||
label="Email"
|
||||
required
|
||||
variant="outlined"
|
||||
></v-text-field>
|
||||
<v-text-field
|
||||
v-model="password"
|
||||
label="Password"
|
||||
type="password"
|
||||
required
|
||||
variant="outlined"
|
||||
></v-text-field>
|
||||
</v-form>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
|
@ -19,32 +30,30 @@
|
|||
</v-container>
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import axios from 'axios'
|
||||
import { store } from '@/store';
|
||||
import { ref } from "vue";
|
||||
import axios from "axios";
|
||||
import { store } from "@/store";
|
||||
|
||||
const email = ref('')
|
||||
const password = ref('')
|
||||
const email = ref("");
|
||||
const password = ref("");
|
||||
|
||||
async function login() {
|
||||
try {
|
||||
const response = await axios.post<string>("http://localhost:8080/api/v1/auth/login", { email: email.value, password: password.value})
|
||||
const response = await axios.post<string>(
|
||||
"http://localhost:8080/api/v1/auth/login",
|
||||
{ email: email.value, password: password.value }
|
||||
);
|
||||
if (response.status === 200) {
|
||||
store.setToken(response.data)
|
||||
store.setToken(response.data);
|
||||
} else {
|
||||
alert("Invalid Credentials")
|
||||
alert("Invalid Credentials");
|
||||
}
|
||||
|
||||
} catch(err) {
|
||||
alert("Invalid Credentials")
|
||||
} catch (err) {
|
||||
alert("Invalid Credentials");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
setTimeout(() => {
|
||||
console.log(email.value)
|
||||
|
@ -53,6 +62,4 @@ setTimeout(() => {
|
|||
*/
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
<style scoped></style>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue