rozpracovane API a frontend pomocou Vue.js
This commit is contained in:
17
webapp/src/App.vue
Normal file
17
webapp/src/App.vue
Normal file
@ -0,0 +1,17 @@
|
||||
<template>
|
||||
<div id="header">
|
||||
<div>
|
||||
<router-link to="/">
|
||||
<img src="public/bugreport.svg" height="48" width="48" />
|
||||
|
||||
<h1>Bug Report</h1>
|
||||
</router-link>
|
||||
</div>
|
||||
<div class="menu">
|
||||
<router-link to="/add">Pridať bug</router-link>
|
||||
<router-link to="/archive">Archív</router-link>
|
||||
<router-link to="/about">O aplikácii</router-link>
|
||||
</div>
|
||||
</div>
|
||||
<router-view></router-view>
|
||||
</template>
|
||||
202
webapp/src/assets/css/style.css
Normal file
202
webapp/src/assets/css/style.css
Normal file
@ -0,0 +1,202 @@
|
||||
/*
|
||||
TPsoft.org 2000-2025
|
||||
Cascade Style Document
|
||||
|
||||
posledna editacia:
|
||||
2025-04-13 00:09 Igor
|
||||
|
||||
01 - GENERAL
|
||||
02 - HEADER
|
||||
03 - DASHBOARD
|
||||
99 - LIGHT MODE
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/* ----------------------------------------------------
|
||||
01 - GENERAL
|
||||
*/
|
||||
:root {
|
||||
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
|
||||
line-height: 1.5;
|
||||
font-weight: 400;
|
||||
|
||||
font-synthesis: none;
|
||||
text-rendering: optimizeLegibility;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
--color-bg: #242424;
|
||||
--color-bg0: #0D5EAF;
|
||||
--color-bg1: #449ef8;
|
||||
--color-bg2: #449ef820;
|
||||
--color-text0: #fff;
|
||||
--color-text1: rgb(11, 11, 104);
|
||||
|
||||
/* color-scheme: light dark; */
|
||||
color: var(--color-text0);
|
||||
background-color: var(--color-bg);
|
||||
|
||||
}
|
||||
|
||||
a {
|
||||
font-weight: 500;
|
||||
color: #646cff;
|
||||
text-decoration: inherit;
|
||||
}
|
||||
a:hover {
|
||||
color: #535bf2;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
/* place-items: center; */
|
||||
min-width: 320px;
|
||||
min-height: 100vh;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 24px;
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
button {
|
||||
border-radius: 8px;
|
||||
border: 1px solid transparent;
|
||||
padding: 0.6em 1.2em;
|
||||
font-size: 1em;
|
||||
font-weight: 500;
|
||||
font-family: inherit;
|
||||
background-color: #1a1a1a;
|
||||
cursor: pointer;
|
||||
transition: border-color 0.25s;
|
||||
}
|
||||
button:hover {
|
||||
border-color: #646cff;
|
||||
}
|
||||
button:focus,
|
||||
button:focus-visible {
|
||||
outline: 4px auto -webkit-focus-ring-color;
|
||||
}
|
||||
|
||||
.card {
|
||||
padding: 2em;
|
||||
}
|
||||
|
||||
#app {
|
||||
/* max-width: 1280px; */
|
||||
/* margin: 0 auto; */
|
||||
/* padding: 10px; */
|
||||
/* text-align: center; */
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------
|
||||
02 - HEADER
|
||||
*/
|
||||
#header {
|
||||
background-color: var(--color-bg0);
|
||||
color: var(--color-text0);
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: end;
|
||||
}
|
||||
#header a,
|
||||
#header a:visited {
|
||||
color: var(--color-text0);
|
||||
}
|
||||
#header .menu a,
|
||||
#header .menu a:visited {
|
||||
border: 1px solid var(--color-text0);
|
||||
padding: 5px 10px;
|
||||
border-radius: 5px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
#header .menu a:hover {
|
||||
color: var(--color-text1);
|
||||
background-color: var(--color-bg1);
|
||||
}
|
||||
#header h1 {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------
|
||||
03 - DASHBOARD
|
||||
*/
|
||||
#dashboard {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: stretch;
|
||||
/* border: 1px red solid; */
|
||||
min-height: calc(100vh - 150px);
|
||||
}
|
||||
#dashboard > div {
|
||||
width: 25%;
|
||||
}
|
||||
#dashboard > div:not(:first-child) {
|
||||
border-left: 5px var(--color-bg0) dotted;
|
||||
}
|
||||
#dashboard > div h2 {
|
||||
background-color: var(--color-bg1);
|
||||
margin: 0px;
|
||||
padding: 5px;
|
||||
text-align: center;
|
||||
}
|
||||
#dashboard .report {
|
||||
margin: 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: stretch;
|
||||
border-left: 5px var(--color-bg1) solid;
|
||||
border-radius: 5px;
|
||||
}
|
||||
#dashboard .report .report-header {
|
||||
background-color: var(--color-bg0);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
border-top-right-radius: 5px;
|
||||
|
||||
}
|
||||
#dashboard .report .report-header .report-title {
|
||||
|
||||
}
|
||||
#dashboard .report .report-header h3 {
|
||||
margin: 0px;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
#dashboard .report .report-description {
|
||||
padding: 10px;
|
||||
text-align: justify;
|
||||
border-right: 5px var(--color-bg0) solid;
|
||||
background-color: var(--color-bg2);
|
||||
}
|
||||
#dashboard .report .report-date {
|
||||
background-color: var(--color-bg1);
|
||||
text-align: right;
|
||||
padding: 5px;
|
||||
border-bottom-right-radius: 5px;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------
|
||||
99 - LIGHT MODE
|
||||
*/
|
||||
/* @media (prefers-color-scheme: light) {
|
||||
:root {
|
||||
color: #213547;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
a:hover {
|
||||
color: #747bff;
|
||||
}
|
||||
button {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
} */
|
||||
43
webapp/src/components/HelloWorld.vue
Normal file
43
webapp/src/components/HelloWorld.vue
Normal file
@ -0,0 +1,43 @@
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
|
||||
defineProps({
|
||||
msg: String,
|
||||
})
|
||||
|
||||
const count = ref(0)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<h1>{{ msg }}</h1>
|
||||
|
||||
<div class="card">
|
||||
<button type="button" @click="count++">count is {{ count }}</button>
|
||||
<p>
|
||||
Edit
|
||||
<code>components/HelloWorld.vue</code> to test HMR
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Check out
|
||||
<a href="https://vuejs.org/guide/quick-start.html#local" target="_blank"
|
||||
>create-vue</a
|
||||
>, the official Vue + Vite starter
|
||||
</p>
|
||||
<p>
|
||||
Learn more about IDE Support for Vue in the
|
||||
<a
|
||||
href="https://vuejs.org/guide/scaling-up/tooling.html#ide-support"
|
||||
target="_blank"
|
||||
>Vue Docs Scaling up Guide</a
|
||||
>.
|
||||
</p>
|
||||
<p class="read-the-docs">Click on the Vite and Vue logos to learn more</p>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.read-the-docs {
|
||||
color: #888;
|
||||
}
|
||||
</style>
|
||||
23
webapp/src/components/MojTest1.vue
Normal file
23
webapp/src/components/MojTest1.vue
Normal file
@ -0,0 +1,23 @@
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
|
||||
defineProps({
|
||||
msg: String,
|
||||
})
|
||||
|
||||
const count = ref(0)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<h1>{{ msg }}</h1>
|
||||
|
||||
<div class="card">
|
||||
<button type="button" @click="count++">count is {{ count }}</button>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
22
webapp/src/components/Report.vue
Normal file
22
webapp/src/components/Report.vue
Normal file
@ -0,0 +1,22 @@
|
||||
<script setup>
|
||||
defineProps({
|
||||
title: String,
|
||||
description: String,
|
||||
date: String
|
||||
})
|
||||
</script>
|
||||
<template>
|
||||
<div class="report">
|
||||
<div class="report-header">
|
||||
<div class="report-title">
|
||||
<h3>{{ title }}</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="report-description">
|
||||
<p>
|
||||
{{ description }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="report-date">{{ date }}</div>
|
||||
</div>
|
||||
</template>
|
||||
9
webapp/src/main.js
Normal file
9
webapp/src/main.js
Normal file
@ -0,0 +1,9 @@
|
||||
import { createApp } from 'vue'
|
||||
import './assets/css/style.css'
|
||||
import App from './App.vue'
|
||||
import { router } from './router'
|
||||
|
||||
const app = createApp(App)
|
||||
|
||||
app.use(router)
|
||||
app.mount('#app')
|
||||
18
webapp/src/router.js
Normal file
18
webapp/src/router.js
Normal file
@ -0,0 +1,18 @@
|
||||
import { createRouter, createWebHistory } from "vue-router";
|
||||
|
||||
import Dashboard from "./views/Dashboard.vue";
|
||||
import About from "./views/About.vue";
|
||||
import BugAdd from "./views/BugAdd.vue";
|
||||
import Archive from "./views/Archive.vue";
|
||||
|
||||
const routes = [
|
||||
{ path: "/", component: Dashboard },
|
||||
{ path: "/about", component: About },
|
||||
{ path: "/add", component: BugAdd },
|
||||
{ path: "/archive", component: Archive },
|
||||
];
|
||||
|
||||
export const router = createRouter({
|
||||
history: createWebHistory(import.meta.env.BASE_URL),
|
||||
routes,
|
||||
});
|
||||
6
webapp/src/views/About.vue
Normal file
6
webapp/src/views/About.vue
Normal file
@ -0,0 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<h1>O aplikácii</h1>
|
||||
<router-link to="/">Späť domov</router-link>
|
||||
</div>
|
||||
</template>
|
||||
6
webapp/src/views/Archive.vue
Normal file
6
webapp/src/views/Archive.vue
Normal file
@ -0,0 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<h1>Archív</h1>
|
||||
<router-link to="/">Späť domov</router-link>
|
||||
</div>
|
||||
</template>
|
||||
6
webapp/src/views/BugAdd.vue
Normal file
6
webapp/src/views/BugAdd.vue
Normal file
@ -0,0 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<h1>Pridať bug</h1>
|
||||
<router-link to="/">Prejsť na Dashboard</router-link>
|
||||
</div>
|
||||
</template>
|
||||
41
webapp/src/views/Dashboard.vue
Normal file
41
webapp/src/views/Dashboard.vue
Normal file
@ -0,0 +1,41 @@
|
||||
<template>
|
||||
<div id="dashboard">
|
||||
<div id="inbox">
|
||||
<h2>Nezaradené</h2>
|
||||
|
||||
<Report title="Pridať bug" description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam massa eros, porta id, vestibulum sit amet, malesuada in, sapien. Donec nec justo eget felis facilisis fermentum." date="2025-04-13 01:30:18" />
|
||||
<Report title="Resetovat pismo" description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam massa eros, porta id, vestibulum sit amet, malesuada in, sapien. Donec nec justo eget felis facilisis fermentum." date="2025-04-13 01:30:18" />
|
||||
|
||||
</div>
|
||||
<div id="waiting">
|
||||
<h2>Čakajúce</h2>
|
||||
|
||||
<Report title="Vymena obrazkov za ikonky" description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam massa eros, porta id, vestibulum sit amet, malesuada in, sapien. Donec nec justo eget felis facilisis fermentum." date="2025-04-13 01:30:18" />
|
||||
<Report title="Doplnit serverove ikoky a toto bude dlhy nadpis, ze ako sa s tym vysporiada" description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam massa eros, porta id, vestibulum sit amet, malesuada in, sapien. Donec nec justo eget felis facilisis fermentum." date="2025-04-13 01:30:18" />
|
||||
<Report title="Rozdelit na 2 polozky na fakture" description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam massa eros, porta id, vestibulum sit amet, malesuada in, sapien. Donec nec justo eget felis facilisis fermentum." date="2025-04-13 01:30:18" />
|
||||
<Report title="Rozdelit na 2 polozky na fakture" description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam massa eros, porta id, vestibulum sit amet, malesuada in, sapien. Donec nec justo eget felis facilisis fermentum." date="2025-04-13 01:30:18" />
|
||||
<Report title="Rozdelit na 2 polozky na fakture" description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam massa eros, porta id, vestibulum sit amet, malesuada in, sapien. Donec nec justo eget felis facilisis fermentum." date="2025-04-13 01:30:18" />
|
||||
<Report title="Rozdelit na 2 polozky na fakture" description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam massa eros, porta id, vestibulum sit amet, malesuada in, sapien. Donec nec justo eget felis facilisis fermentum." date="2025-04-13 01:30:18" />
|
||||
<Report title="Rozdelit na 2 polozky na fakture" description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam massa eros, porta id, vestibulum sit amet, malesuada in, sapien. Donec nec justo eget felis facilisis fermentum." date="2025-04-13 01:30:18" />
|
||||
<Report title="Rozdelit na 2 polozky na fakture" description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam massa eros, porta id, vestibulum sit amet, malesuada in, sapien. Donec nec justo eget felis facilisis fermentum." date="2025-04-13 01:30:18" />
|
||||
<Report title="Rozdelit na 2 polozky na fakture" description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam massa eros, porta id, vestibulum sit amet, malesuada in, sapien. Donec nec justo eget felis facilisis fermentum." date="2025-04-13 01:30:18" />
|
||||
|
||||
|
||||
</div>
|
||||
<div id="inprogress">
|
||||
<h2>Rozpracované</h2>
|
||||
</div>
|
||||
<div id="done">
|
||||
<h2>Hotové</h2>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Report from '../components/Report.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Report
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user