first version

This commit is contained in:
Thomas Mack 2022-03-26 17:52:49 +01:00
parent d66e315a07
commit 1c42a5d608
49 changed files with 2642 additions and 103 deletions

1151
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -8,17 +8,30 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"@fortawesome/fontawesome-pro": "^6.1.1",
"animate.css": "^4.1.1",
"bootstrap": "^5.1.3",
"core-js": "^3.8.3",
"vue": "^3.2.13"
"fs": "^0.0.1-security",
"keycloak-js": "^17.0.1",
"vue": "^3.2.13",
"vue-class-component": "^8.0.0-0",
"vue-router": "^4.0.14",
"vuex": "^4.0.2"
},
"devDependencies": {
"@babel/core": "^7.12.16",
"@babel/eslint-parser": "^7.12.16",
"@typescript-eslint/eslint-plugin": "^5.4.0",
"@typescript-eslint/parser": "^5.4.0",
"@vue/cli-plugin-babel": "~5.0.0",
"@vue/cli-plugin-eslint": "~5.0.0",
"@vue/cli-plugin-typescript": "~5.0.0",
"@vue/cli-service": "~5.0.0",
"@vue/eslint-config-typescript": "^9.1.0",
"eslint": "^7.32.0",
"eslint-plugin-vue": "^8.0.3"
"eslint-plugin-vue": "^8.0.3",
"typescript": "~4.5.5"
},
"eslintConfig": {
"root": true,
@ -27,10 +40,11 @@
},
"extends": [
"plugin:vue/vue3-essential",
"eslint:recommended"
"eslint:recommended",
"@vue/typescript"
],
"parserOptions": {
"parser": "@babel/eslint-parser"
"parser": "@typescript-eslint/parser"
},
"rules": {}
},

View File

@ -1,26 +1,46 @@
<template>
<img alt="Vue logo" src="./assets/logo.png">
<HelloWorld msg="Welcome to Your Vue.js App"/>
<router-view></router-view>
</template>
<script>
import HelloWorld from './components/HelloWorld.vue'
export default {
name: 'App',
<script lang="ts">
import { Options, Vue } from 'vue-class-component';
import TheTwoColumnsLayout from '@/layouts/TheTwoColumnsLayout.vue';
@Options({
created() {
// this.$store.dispatch("autoSignIn");
console.log(this.$store)
},
components: {
HelloWorld
}
}
TheTwoColumnsLayout
},
computed: {
token() {
return this.$store.getters.token;
}
},
})
export default class App extends Vue {}
</script>
<style>
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
@import '~bootstrap/dist/css/bootstrap.min.css';
@import '~@fortawesome/fontawesome-pro/css/all.min.css';
@import '~animate.css/animate.min.css';
.bg-vue {
background-color: rgb(52, 73, 94);
color: white
}
.bg-vue2 {
background-color: rgb(65, 184, 131);
color: white
}
.text-vue {
color: rgb(52, 73, 94);
}
.text-vue2 {
color: rgb(65, 184, 131);
}
</style>

View File

@ -1,58 +0,0 @@
<template>
<div class="hello">
<h1>{{ msg }}</h1>
<p>
For a guide and recipes on how to configure / customize this project,<br>
check out the
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
</p>
<h3>Installed CLI Plugins</h3>
<ul>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
</ul>
<h3>Essential Links</h3>
<ul>
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
</ul>
<h3>Ecosystem</h3>
<ul>
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
</ul>
</div>
</template>
<script>
export default {
name: 'HelloWorld',
props: {
msg: String
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h3 {
margin: 40px 0 0;
}
ul {
list-style-type: none;
padding: 0;
}
li {
display: inline-block;
margin: 0 10px;
}
a {
color: #42b983;
}
</style>

View File

@ -0,0 +1,13 @@
<template>
<div>Login User</div>
</template>
<script>
export default {
name: "LoginUser"
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,13 @@
<template>
<div>RegisterUser</div>
</template>
<script>
export default {
name: "RegiterUser"
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,55 @@
<template>
<div class="container">
<div class="">
Wir haben {{cameras.length}} in der Liste
<input type="text" name="searchstring" v-model="searchText">
</div>
</div>
<div v-for="camera in filteredCameras" :key="camera.id">
<transition-group
enter-active-class="animate__animated animate__bounceInRight"
leave-active-class="animate__animated animate__bounceOutRight"
mode="out-in"
>
<component
:is="componentName"
:camera=camera
:key="camera.id"
></component>
</transition-group>
</div>
</template>
<script>
import CameraListItem from "@/components/camera/CameraListItem";
export default {
name: "CameraList",
components: {
CameraListItem
},
props: {
cameras: {
type:Object,
required: true
}
},
data() {
return {
searchText: ""
}
},
computed:{
componentName() {
return "CameraListItem";
},
filteredCameras() {
if(this.searchText ==="") return this.cameras ;
else return this.cameras.filter( (camera) => camera.name.toLowerCase().includes(this.searchText.toLowerCase()));
}
}
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,48 @@
<template>
<div class="card mt-3"
@click="toggleActive">
<div class="card-header"
:class="getActiveStyle"
>{{ camera.name }}</div>
<div class="card-body">
{{camera.year_of_production}}
</div>
</div>
</template>
<script>
export default {
name: "CameraListItem",
props: {
camera: {
type:Object,
required: true
}
},
computed: {
getActiveStyle() {
if(this.isActive) return ["bg-primary"] ;
else return ["bg-secondary"];
},
isActive() {
const activeCamera = this.$store.getters.activeCamera;
if(activeCamera && activeCamera.id === this.camera.id) return true;
else return false;
}
},
methods: {
toggleActive() {
console.log("click toggleActive ")
this.$store.dispatch("setCameraActiveState", {cameraId: this.camera.id , active:!this.isActive})
}
}
}
</script>
<style scoped>
</style>

View File

View File

@ -0,0 +1,19 @@
<template>
<div class="container-fluid">
<div class="row">
<div class="col-12">
<slot></slot>
</div>
</div>
</div>
</template>
<script>
export default {
name: "TheEmptyLayout"
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,52 @@
<template>
<div class="container-fluid" :class="containerClasses">
<div class="row" :class="rowClasses">
<div :class="leftColumnClasses">
<slot name="leftCol">
<h1>Linke Spalte</h1>
</slot>
</div>
<div :class="rightColumnClasses">
<slot name="rightCol"><h1>Rechte Spalte</h1></slot>
</div>
</div>
</div>
</template>
<script>
export default {
name: "TheTwoColumnsLayout",
props: {
leftColumnClass: {
type:String,
default: 'col-md-8'
},
rightColumnClass: {
type:String,
default: 'col-md-4'
},
fullsize: {
type: Boolean,
default: false,
}
},
computed: {
leftColumnClasses() {
return [this.leftColumnClass, this.fullsize ? "h-100": ""];
},
rightColumnClasses() {
return [this.rightColumnClass, this.fullsize ? "h-100": ""];
},
rowClasses(){
return [this.fullsize ? "h-100": ""];
},
containerClasses(){
return [this.fullsize ? "vh-100": ""];
}
}
}
</script>
<style scoped>
</style>

View File

@ -1,4 +1,9 @@
import { createApp } from 'vue'
import App from './App.vue'
createApp(App).mount('#app')
import { createApp } from 'vue';
import App from './App.vue';
import store from './store';
import router from './router';
createApp(App)
.use(store)
.use(router)
.mount('#app');
//# sourceMappingURL=main.js.map

45
src/main.js.bak Normal file
View File

@ -0,0 +1,45 @@
import Vue from 'vue'
import App from './App.vue'
import Keycloak from "keycloak-js";
const initOptions = {
url: 'http://auth.toking.de/', realm: 'toking', clientId: 'billibox', onLoad: 'login-required'
}
//const app = createApp(App);
const keycloak = Keycloak(initOptions);
keycloak.init({ onLoad: initOptions.onLoad }).then((auth) => {
if (!auth) {
window.location.reload();
} else {
Vue.$log.info("Authenticated");
new Vue({
el: '#app',
render: h => h(App, { props: { keycloak: keycloak } })
})
}
//Token Refresh
setInterval(() => {
keycloak.updateToken(70).then((refreshed) => {
if (refreshed) {
Vue.$log.info('Token refreshed' + refreshed);
} else {
Vue.$log.warn('Token not refreshed, valid for '
+ Math.round(keycloak.tokenParsed.exp + keycloak.timeSkew - new Date().getTime() / 1000) + ' seconds');
}
}).catch(() => {
Vue.$log.error('Failed to refresh token');
});
}, 6000)
}).catch(() => {
Vue.$log.error("Authenticated Failed");
});
//app.mount('#app')

38
src/main.js.bak.js Normal file
View File

@ -0,0 +1,38 @@
import Vue from 'vue';
import App from './App.vue';
import Keycloak from "keycloak-js";
const initOptions = {
url: 'http://auth.toking.de/', realm: 'toking', clientId: 'billibox', onLoad: 'login-required'
};
//const app = createApp(App);
const keycloak = Keycloak(initOptions);
keycloak.init({ onLoad: initOptions.onLoad }).then((auth) => {
if (!auth) {
window.location.reload();
}
else {
Vue.$log.info("Authenticated");
new Vue({
el: '#app',
render: h => h(App, { props: { keycloak: keycloak } })
});
}
//Token Refresh
setInterval(() => {
keycloak.updateToken(70).then((refreshed) => {
if (refreshed) {
Vue.$log.info('Token refreshed' + refreshed);
}
else {
Vue.$log.warn('Token not refreshed, valid for '
+ Math.round(keycloak.tokenParsed.exp + keycloak.timeSkew - new Date().getTime() / 1000) + ' seconds');
}
}).catch(() => {
Vue.$log.error('Failed to refresh token');
});
}, 6000);
}).catch(() => {
Vue.$log.error("Authenticated Failed");
});
//app.mount('#app')
//# sourceMappingURL=main.js.bak.js.map

1
src/main.js.bak.js.map Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"main.js.bak.js","sourceRoot":"","sources":["main.js.bak.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAA;AACrB,OAAO,GAAG,MAAM,WAAW,CAAA;AAC3B,OAAO,QAAQ,MAAM,aAAa,CAAC;AAEnC,MAAM,W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B,CAAC,CAAC;QAC9C,CAAC,CAAC,CAAC;IACP,CAAC,EAAE,IAAI,CAAC,CAAA;AAEZ,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE;IACV,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC;AAC3C,CAAC,CAAC,CAAC;AAIH,mBAAmB"}

1
src/main.js.map Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"main.js","sourceRoot":"","sources":["main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,GAAG,MAAM,WAAW,CAAA;AAC3B,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,MAAM,MAAM,UAAU,CAAA;AAG7B,SAAS,CAAC,GAAG,CAAC;KACT,GAAG,CAAC,KAAK,CAAC;KACV,GAAG,CAAC,MAAM,CAAC;KACX,KAAK,CAAC,MAAM,CAAC,CAAA"}

10
src/main.ts Normal file
View File

@ -0,0 +1,10 @@
import { createApp } from 'vue'
import App from './App.vue'
import store from './store';
import router from './router'
createApp(App)
.use(store)
.use(router)
.mount('#app')

View File

@ -0,0 +1,18 @@
<template>
<div>CreateCameraPage</div>
</template>
<script>
export default {
name: "CreateCameraPage",
data() {
return {
}
}
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,18 @@
<template>
<div>EditCameraPage</div>
</template>
<script>
export default {
name: "EditCameraPage",
data() {
return {
}
}
}
</script>
<style scoped>
</style>

63
src/pages/HomePage.vue Normal file
View File

@ -0,0 +1,63 @@
<template>
<TheTwoColumnsLayout
:left-column-class="'col-md-8 bg-vue'"
:right-column-class="'col-md-4'"
:fullsize="true"
>
<template #leftCol>
<div class="mt-5 text-center">
<div class="display-1 my-5">Billibox</div>
<div class="display-4 my-5">Die kleine Welt alter Fotoapparate</div>
<div class="my-5 offset-4 col-4">
<img src="~@fortawesome/fontawesome-pro/svgs/duotone/camera.svg" class="img-fluid">
</div>
</div>
</template>
<template #rightCol>
<transition
enter-active-class="animate__animated animate__bounceInRight"
leave-active-class="animate__animated animate__bounceOutRight"
mode="out-in"
>
<component
:is="componentName"
@changeComponent="changeComponent"
></component>
</transition>
</template>
</TheTwoColumnsLayout>
</template>
<script>
import TheTwoColumnsLayout from "@/layouts/TheTwoColumnsLayout";
import RegisterUser from "@/components/auth/RegisterUser";
import LoginUser from "@/components/auth/LoginUser";
export default {
name: "HomePage",
components: {
TheTwoColumnsLayout,
RegisterUser,
LoginUser
},
data() {
return {
componentName: "RegisterUser"
}
},
methods: {
changeComponent(handler) {
this.componentName = handler.componentName
}
}
}
</script>
<style scoped>
svg { color: white};
</style>

View File

@ -0,0 +1,18 @@
<template>
<div>NotFoundPage</div>
</template>
<script>
export default {
name: "NotFoundPage",
data() {
return {
}
}
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,18 @@
<template>
<div>ReadCameraPage</div>
</template>
<script>
export default {
name: "ReadCameraPage",
data() {
return {
}
}
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,62 @@
<template>
<TheTwoColumnsLayout>
<template #leftCol>
<div class="mt-5 text-center">
<div class="display-1 my-5">Billibox</div>
<div class="display-4 my-5">Die kleine Welt alter Fotoapparate</div>
<div class="my-5 offset-4 col-4">
<img src="~@fortawesome/fontawesome-pro/svgs/duotone/camera.svg" class="img-fluid">
</div>
</div>
</template>
<template #rightCol>
<transition
enter-active-class="animate__animated animate__bounceInRight"
leave-active-class="animate__animated animate__bounceOutRight"
mode="out-in"
>
<CameraList :cameras="cameras"></CameraList>
</transition>
</template>
</TheTwoColumnsLayout>
</template>
<script>
import TheTwoColumnsLayout from "@/layouts/TheTwoColumnsLayout";
import CameraList from "@/components/camera/CameraList";
export default {
name: "ReadListPage",
computed: {
storeIsInitialized( ) {
return this.$store.getters.isInitialized;
},
cameras() {
return this.$store.getters.cameras;
}
},
components: {
CameraList,
TheTwoColumnsLayout
},
beforeCreate() {
console.log("beforeCreate", this.$store.getters.isInitialized);
if(!this.$store.getters.isInitialized) {
console.log("Not yet initialized")
this.$store.dispatch("initialize");
}
},
data() {
return {
}
}
}
</script>
<style scoped>
</style>

26
src/router/index.js Normal file
View File

@ -0,0 +1,26 @@
import { createRouter, createWebHistory } from "vue-router";
import NotFoundPage from "@/pages/NotFoundPage.vue";
import routes from "@/routes";
import store from "@/store";
const router = createRouter({
// Options
history: createWebHistory(),
routes: [...routes,
{
path: "/:pathMatch(.*)*",
component: NotFoundPage,
// Alternativ mit Redirect auf Root
// redirect: "/"
}
]
});
router.beforeEach((to, from, next) => {
if (to.meta.requiresAuth && !store.getters.isAuthenticated) {
next("/");
}
else {
next();
}
});
export default router;
//# sourceMappingURL=index.js.map

1
src/router/index.js.map Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE5D,OAAO,YAAY,MAAM,0BAA0B,CAAC;AAEpD,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B,MAAM,MAAM,GAAG,YAAY,CAAE;IACzB,UAAU;IACV,OAAO,EAAE,gBAAgB,EAAE;IAC3B,MAAM,EAAE,CAAE,GAAG,MAAM;QACf;YACI,IAAI,EAAE,kBAAkB;YACxB,SAAS,EAAE,YAAY;YACvB,mCAAmC;YAC/C,2BAA2B;SAClB;KACJ;CAEJ,CAAC,CAAC;AAGH,MAAM,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;IACjC,IAAG,EAAE,CAAC,IAAI,CAAC,YAAY,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,eAAe,EAAE;QACvD,IAAI,CAAC,GAAG,CAAC,CAAA;KACZ;SAAM;QACH,IAAI,EAAE,CAAC;KACV;AACL,CAAC,CAAC,CAAC;AAEH,eAAe,MAAM,CAAC"}

32
src/router/index.ts Normal file
View File

@ -0,0 +1,32 @@
import { createRouter, createWebHistory } from "vue-router";
import NotFoundPage from "@/pages/NotFoundPage.vue";
import routes from "@/routes";
import store from "@/store";
const router = createRouter( {
// Options
history: createWebHistory(),
routes: [ ...routes ,
{
path: "/:pathMatch(.*)*",
component: NotFoundPage,
// Alternativ mit Redirect auf Root
// redirect: "/"
}
]
});
router.beforeEach((to, from, next) => {
if(to.meta.requiresAuth && !store.getters.isAuthenticated) {
next("/")
} else {
next();
}
});
export default router;

View File

@ -0,0 +1,12 @@
import CreateCameraPage from "@/pages/CreateCameraPage.vue";
const shopRoutes = [
{
path: "/admin/camera/create",
component: CreateCameraPage,
meta: {
requiresAuth: true
}
},
];
export default shopRoutes;
//# sourceMappingURL=admin-routes.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"admin-routes.js","sourceRoot":"","sources":["admin-routes.ts"],"names":[],"mappings":"AACA,OAAO,gBAAgB,MAAM,8BAA8B,CAAC;AAI5D,MAAM,UAAU,GAAG;IACf;QACI,IAAI,EAAE,sBAAsB;QAC5B,SAAS,EAAE,gBAAgB;QAC3B,IAAI,EAAE;YACF,YAAY,EAAE,IAAI;SACrB;KACJ;CAEJ,CAAA;AAED,eAAe,UAAU,CAAC"}

View File

@ -0,0 +1,17 @@
import ShopPage from "@/pages/ShopPage.vue";
import CreateCameraPage from "@/pages/CreateCameraPage.vue";
import ReadProductPage from "@/pages/ReadProductPage.vue";
import component from "*.vue";
const shopRoutes = [
{
path: "/admin/camera/create",
component: CreateCameraPage,
meta: {
requiresAuth: true
}
},
]
export default shopRoutes;

40
src/routes/app-routes.js Normal file
View File

@ -0,0 +1,40 @@
import store from "@/store";
import ReadCameraPage from "@/pages/ReadCameraPage.vue";
import ReadListPage from "@/pages/ReadListPage.vue";
const appRoutes = [
{
path: "/",
alias: "/home",
name: "home",
component: () => import('@/pages/HomePage.vue'),
beforeEnter: (to, from, next) => {
if (store.getters.isAuthenticated) {
next("/shop");
}
else {
next();
}
}
},
{
path: "/read/cameara/:id",
name: "ReadProduct",
component: ReadCameraPage,
props: true,
meta: {
requiresAuth: false,
// enterTransition: "rubberBand"
}
},
{
path: "/list",
component: ReadListPage,
props: true,
meta: {
requiresAuth: false,
// enterTransition: "rubberBand"
}
},
];
export default appRoutes;
//# sourceMappingURL=app-routes.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"app-routes.js","sourceRoot":"","sources":["app-routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,cAAc,MAAM,4BAA4B,CAAC;AACxD,OAAO,YAAY,MAAM,0BAA0B,CAAC;AAGpD,MAAM,SAAS,GAAG;IACd;QACI,IAAI,EAAE,GAAG;QACT,KAAK,EAAE,OAAO;QACd,IAAI,EAAE,MAAM;QACZ,SAAS,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,sBAAsB,CAAC;QAC/C,WAAW,EAAE,CAAC,EAAM,EAAE,IAAQ,EAAE,IAAQ,EAAE,EAAE;YACxC,IAAI,KAAK,CAAC,OAAO,CAAC,eAAe,EAAE;gBAC/B,IAAI,CAAC,OAAO,CAAC,CAAC;aACjB;iBAAM;gBACH,IAAI,EAAE,CAAC;aACV;QACL,CAAC;KACJ;IACD;QACI,IAAI,EAAE,mBAAmB;QACzB,IAAI,EAAE,aAAa;QACnB,SAAS,EAAE,cAAc;QACzB,KAAK,EAAE,IAAI;QACX,IAAI,EAAE;YACF,YAAY,EAAE,KAAK;YACpB,gCAAgC;SAClC;KAEJ;IAED;QACI,IAAI,EAAE,OAAO;QACb,SAAS,EAAE,YAAY;QACvB,KAAK,EAAE,IAAI;QACX,IAAI,EAAE;YACF,YAAY,EAAE,KAAK;YACnB,gCAAgC;SACnC;KAEJ;CACJ,CAAA;AAED,eAAe,SAAS,CAAC"}

44
src/routes/app-routes.ts Normal file
View File

@ -0,0 +1,44 @@
import store from "@/store";
import ReadCameraPage from "@/pages/ReadCameraPage.vue";
import ReadListPage from "@/pages/ReadListPage.vue";
const appRoutes = [
{
path: "/",
alias: "/home",
name: "home",
component: () => import('@/pages/HomePage.vue'),
beforeEnter: (to:any, from:any, next:any) => {
if (store.getters.isAuthenticated) {
next("/shop");
} else {
next();
}
}
},
{
path: "/read/cameara/:id",
name: "ReadProduct",
component: ReadCameraPage,
props: true,
meta: {
requiresAuth: false,
// enterTransition: "rubberBand"
}
},
{
path: "/list",
component: ReadListPage,
props: true,
meta: {
requiresAuth: false,
// enterTransition: "rubberBand"
}
},
]
export default appRoutes;

5
src/routes/index.js Normal file
View File

@ -0,0 +1,5 @@
import adminRoutes from "@/routes/admin-routes";
import appRoutes from '@/routes/app-routes';
const routes = [...adminRoutes, ...appRoutes];
export default routes;
//# sourceMappingURL=index.js.map

1
src/routes/index.js.map Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,SAAS,MAAM,qBAAqB,CAAC;AAE5C,MAAM,MAAM,GAAG,CAAC,GAAG,WAAW,EAAE,GAAG,SAAS,CAAC,CAAC;AAE9C,eAAe,MAAM,CAAC"}

6
src/routes/index.ts Normal file
View File

@ -0,0 +1,6 @@
import adminRoutes from "@/routes/admin-routes";
import appRoutes from '@/routes/app-routes';
const routes = [...adminRoutes, ...appRoutes];
export default routes;

214
src/seed.js Normal file
View File

@ -0,0 +1,214 @@
export const shape = [
{ schluessel: "neu", name: "neu", beschreibung: '' },
{ schluessel: "neuwertig", name: "neuwertig", beschreibung: '' },
{ schluessel: "lg", name: "leichte Gebrauchsspuren", beschreibung: '' },
{ schluessel: "mg", name: "mittlere Gebrauchsspuren", beschreibung: '' },
{ schluessel: "ag", name: "abgenutzt", beschreibung: '' },
{ schluessel: "eg", name: "eingeschränkte Funktion", beschreibung: '' },
{ schluessel: "defekt", name: "defekt", beschreibung: '' },
];
export const buildtype = [
{ schluessel: "box", name: "Box", beschreibung: '' },
{ schluessel: "kb", name: "Kleinbildkamera", beschreibung: '' },
{ schluessel: "slr", name: "Spiegelreflex", beschreibung: '' },
{ schluessel: "dslr", name: "Digitale Spiegelreflex", beschreibung: '' },
{ schluessel: "mf", name: "Mittelformat", beschreibung: '' },
{ schluessel: "gf", name: "Großformat", beschreibung: '' },
{ schluessel: "aps", name: "Digitalkamera", beschreibung: '' },
{ schluessel: "holz", name: "Holzkamera", beschreibung: '' },
{ schluessel: "platte", name: "Plattenkamera", beschreibung: '' },
{ schluessel: "fach", name: "Fachkamera", beschreibung: '' },
{ schluessel: "lf", name: "Lichtfeldkamera", beschreibung: '' },
{ schluessel: "balg", name: "Balgenkamera", beschreibung: '' },
{ schluessel: "sof", name: "Sofortbild", beschreibung: '' },
];
export const brands = [
{ schluessel: 'agfa', name: 'Agfa', beschreibung: 'Filme aller Art sowie analoge Kameras' },
{ schluessel: 'alpa', name: 'Alpa', beschreibung: 'Mittelformat analog/digital (früher Kleinbild).' },
{ schluessel: 'arca_swiss', name: 'Arca-Swiss', beschreibung: 'Großformatkameras.' },
{ schluessel: 'bilora', name: 'Bilora', beschreibung: 'Kleinbildkameras.' },
{ schluessel: 'braun_photo_technik', name: 'Braun Photo Technik', beschreibung: 'Kameras, Diaprojektoren' },
{ schluessel: 'bronica', name: 'Bronica', beschreibung: 'Mittelformatkameras.' },
{ schluessel: 'cambo', name: 'Cambo', beschreibung: 'Großformatkameras.' },
{ schluessel: 'camogli', name: 'Camogli', beschreibung: 'Mittelformatkameras.' },
{ schluessel: 'canham_cameras', name: 'Canham Cameras', beschreibung: 'Großformatkameras.' },
{ schluessel: 'canon', name: 'Canon', beschreibung: 'APS-Kameras, Digitalkameras, Kleinbildkameras, Objektive.' },
{ schluessel: 'carena', name: 'Carena', beschreibung: 'Kleinbildkameras, Objektive' },
{ schluessel: 'casio', name: 'Casio', beschreibung: 'Digitalkameras.' },
{ schluessel: 'chinon', name: 'Chinon', beschreibung: 'Digitalkameras, Kleinbildkameras.' },
{
schluessel: 'contax',
name: 'Contax',
beschreibung: 'APS-Kameras, Digitalkameras, Kleinbildkameras, Mittelformatkameras.'
},
{ schluessel: 'dr_gilde', name: 'Dr. Gilde', beschreibung: 'Mittelformatkameras.' },
{
schluessel: 'dhw_fototechnik',
name: 'DHW Fototechnik',
beschreibung: 'digitale und analoge Mittelformatkameras, TLR Mittelformatkameras, Fachkameras, Kleinbildkameras'
},
{ schluessel: 'epson', name: 'Epson', beschreibung: 'Digitalkameras.' },
{
schluessel: 'ernemann_Werke_AG',
name: 'Ernemann-Werke AG',
beschreibung: 'Kinoprojektoren und Kameras, darunter die Ermanox mit damals lichtstärkstem Serienobjektiv der Welt'
},
{ schluessel: 'fed', name: 'FED', beschreibung: 'Kleinbildkameras.' },
{
schluessel: 'fujifilm',
name: 'Fujifilm',
beschreibung: 'APS-Kameras, Digitalkameras, Kleinbildkameras, Mittelformatkameras.'
},
{ schluessel: 'fandolfi', name: 'Gandolfi', beschreibung: 'Großformatkameras.' },
{ schluessel: 'fottschalt', name: 'Gottschalt', beschreibung: 'Fachkameras.' },
{ schluessel: 'hasselblad', name: 'Hasselblad', beschreibung: 'Kleinbildkameras, Mittelformatkameras.' },
{ schluessel: 'hitachi', name: 'Hitachi', beschreibung: 'Digitalkameras.' },
{ schluessel: 'hewlett-Packard (HP)', name: 'Hewlett-Packard (HP)', beschreibung: 'Digitalkameras.' },
{ schluessel: 'horseman', name: 'Horseman', beschreibung: 'Großformatkameras, Mittelformatkameras.' },
{ schluessel: 'ihagee', name: 'Ihagee', beschreibung: 'Kleinbildkameras (Bezeichnungen Exa und Exakta).' },
{ schluessel: 'jenoptik', name: 'Jenoptik', beschreibung: 'Digitalkameras.' },
{ schluessel: 'jvc', name: 'JVC', beschreibung: 'Digitalkameras.' },
{ schluessel: 'kalimar', name: 'Kalimar', beschreibung: 'Kleinbildkameras, Mittelformatkameras, Objektive.' },
{
schluessel: 'kamera_werk_dresden',
name: 'Kamera Werk Dresden',
beschreibung: 'Panoramakameras für Kleinbild und Mittelformat (Bezeichnung Noblex).'
},
{ schluessel: 'kiev', name: 'Kiev', beschreibung: 'Mittelformatkameras, Kleinbildkameras.' },
{ schluessel: 'kodak', name: 'Kodak', beschreibung: 'APS-Kameras, Kleinbildkameras, Digitalkameras.' },
{
schluessel: 'konica',
name: 'Konica',
beschreibung: 'APS-Kameras, Digitalkameras, Kleinbildkameras, Mittelformatkameras, Objektive.'
},
{
schluessel: 'konica_minolta',
name: 'Konica Minolta',
beschreibung: 'Fusion aus Konica und Minolta; Digitalkameras, Objektive.'
},
{ schluessel: 'kōwa', name: 'Kōwa', beschreibung: 'Mittelformatkameras.' },
{ schluessel: 'kyocera', name: 'Kyocera', beschreibung: '(siehe auch Yashica und Contax): Digitalkameras.' },
{ schluessel: 'leaf', name: 'Leaf', beschreibung: 'Digitale Rückwände für Mittelformatkameras.' },
{
schluessel: 'leica',
name: 'Leica',
beschreibung: 'APS-Kameras, Analogkameras, Digitalkameras, Kleinbildkameras.'
},
{ schluessel: 'linhof', name: 'Linhof', beschreibung: 'Großformatkameras, Mittelformatkameras.' },
{ schluessel: 'lomo', name: 'Lomo', beschreibung: 'analoge Kleinbildsucherkameras.' },
{ schluessel: 'lotus_view', name: 'Lotus-View', beschreibung: 'Großformatkameras.' },
{ schluessel: 'mamiya', name: 'Mamiya', beschreibung: 'Kleinbildkameras, Mittelformatkameras, Digitalkameras' },
{ schluessel: 'meyer_optik', name: 'Meyer-Optik', beschreibung: 'v. a. Objektive' },
{
schluessel: 'minolta',
name: 'Minolta',
beschreibung: 'APS-Kameras, Digitalkameras, Kleinbildkameras, Mittelformatkameras, Objektive.'
},
{ schluessel: 'minox', name: 'Minox', beschreibung: 'Digitalkameras, Kleinbildkameras.' },
{ schluessel: 'mustek', name: 'Mustek', beschreibung: 'Digitalkameras.' },
{
schluessel: 'nikon',
name: 'Nikon',
beschreibung: 'APS-Kameras, Digitalkameras, Kleinbildkameras, Objektive für GF-Kameras.'
},
{ schluessel: 'olympus', name: 'Olympus', beschreibung: 'APS-Kameras, Digitalkameras, Kleinbildkameras.' },
{ schluessel: 'panasonic', name: 'Panasonic', beschreibung: 'Digitalkameras, Smartphones.' },
{
schluessel: 'pentacon',
name: 'Pentacon',
beschreibung: 'Digitalkameras, Kleinbildkameras (Bezeichnung Praktica), früher auch Mittelformatkameras.'
},
{ schluessel: 'pentax', name: 'Pentax', beschreibung: 'Digitalkameras, Kleinbildkameras, Mittelformatkameras.' },
{ schluessel: 'phase_one', name: 'Phase One', beschreibung: 'Digitalkameras (digitaler Rückteile).' },
{ schluessel: 'plaubel', name: 'Plaubel', beschreibung: 'Großformatkameras' },
{ schluessel: 'polaroid', name: 'Polaroid', beschreibung: 'Digitalkameras, Sofortbildsysteme chemisch.' },
{ schluessel: 'rbt', name: 'RBT', beschreibung: 'Stereokameras und Projektoren.' },
{
schluessel: 'reflekta_kamerawerk_tharandt',
name: 'Reflekta-Kamerawerk Tharandt',
beschreibung: 'TLR Mittelformatkameras, Reflekta'
},
{ schluessel: 'ricoh', name: 'Ricoh', beschreibung: 'Digitalkameras, Kleinbildkameras.' },
{ schluessel: 'rheinmetall', name: 'Rheinmetall', beschreibung: 'Kleinbildkameras EXA, Exakta' },
{
schluessel: 'rollei',
name: 'Rollei',
beschreibung: 'Digitalkameras, Kleinbildkameras, digitale und analoge Mittelformatkameras, TLR Mittelformatkameras.'
},
{
schluessel: 'sakar_international',
name: 'Sakar International',
beschreibung: 'Zubehör, Digitalkameras, Marken Vivitar, Kodak'
},
{ schluessel: 'salyut', name: 'Salyut', beschreibung: 'Mittelformatkameras.' },
{ schluessel: 'samsung', name: 'Samsung', beschreibung: 'Digitalkameras, Kleinbildkameras.' },
{ schluessel: 'sanyo', name: 'Sanyo', beschreibung: 'Digitalkameras.' },
{ schluessel: 'sigma', name: 'Sigma', beschreibung: 'Digitalkameras, Kleinbildkameras, Objektive.' },
{ schluessel: 'silvestri', name: 'Silvestri', beschreibung: 'Großformatkameras.' },
{ schluessel: 'sinar', name: 'Sinar', beschreibung: 'Digitalkameras, Großformatkameras.' },
{ schluessel: 'sony', name: 'Sony', beschreibung: 'Digitalkameras, Objektive.' },
{ schluessel: 'tachihara', name: 'Tachihara', beschreibung: 'Mittelformatkameras' },
{ schluessel: 'tamron', name: 'Tamron', beschreibung: 'Objektive' },
{ schluessel: 'teamwork', name: 'Teamwork', beschreibung: 'Mittelformatkameras' },
{ schluessel: 'tokina', name: 'Tokina', beschreibung: 'Objektive' },
{ schluessel: 'topcon', name: 'Topcon', beschreibung: 'Kleinbildkameras' },
{ schluessel: 'toshiba', name: 'Toshiba', beschreibung: 'Digitalkameras, Großformatkameras' },
{ schluessel: 'toyo', name: 'Toyo', beschreibung: 'Großformatkameras' },
{ schluessel: 'yashica', name: 'Yashica', beschreibung: 'Digitalkameras, Kleinbildkameras.' },
{ schluessel: 'yashica_kyocera', name: 'Yashica-Kyocera', beschreibung: 'Mittelformatkameras.' },
{ schluessel: 'vinten', name: 'Vinten', beschreibung: 'Luftbildkameras.' },
{ schluessel: 'vivitar', name: 'Vivitar', beschreibung: 'Digitalkameras, Wechselobjektive.' },
{
schluessel: 'voigtländer',
name: 'Voigtländer',
beschreibung: 'APS-Kameras, Digitalkameras, Kleinbildkameras, erstes Foto-Zoomobjektiv der Welt, aktuell: ausschließlich Objektive.'
},
{ schluessel: 'walker_cameras', name: 'Walker Cameras', beschreibung: 'Großformatkameras.' },
{
schluessel: 'welta',
name: 'Welta',
beschreibung: 'Mittelformatkameras, TLR, Kleinbildkameras. Später aufgegangen in Pentacon.'
},
{
schluessel: 'wünsche_emil_ag',
name: 'Wünsche, Emil AG',
beschreibung: 'Magazinkameras, Laufboden-Klappkameras mit Klappmechanismus, Reisekameras; aufgegangen in ICA Dresden im Jahre 1909.'
},
{ schluessel: 'zeiss_ikon', name: 'Zeiss Ikon', beschreibung: 'Kleinbildkameras.' },
{ schluessel: 'zenit', name: 'Zenit', beschreibung: 'Kleinbildkameras, Mittelformatkameras.' },
{ schluessel: 'zenza_bronica', name: 'Zenza Bronica', beschreibung: 'Mittelformatkameras.' },
{ schluessel: 'zorki', name: 'Zorki', beschreibung: 'Kleinbildkameras.' },
];
export const cameras = [
{
id: "pentax_19",
brand_key: "pentax",
shape_key: "neuwertig",
name: "Pentax K30",
buildtype: "slr",
description: "Langer Text",
year_of_production: 2000,
year_of_purchase: 2022,
},
{
id: "pentax_20",
brand_key: "pentax",
shape_key: "neuwertig",
name: "Pentax K50",
buildtype: "slr",
description: "Langer Text",
year_of_production: 2000,
year_of_purchase: 2022,
},
{
id: "pentax_21",
brand_key: "pentax",
shape_key: "neuwertig",
name: "Pentax K3",
buildtype: "slr",
description: "Langer Text",
year_of_production: 2000,
year_of_purchase: 2022,
}
];
//# sourceMappingURL=seed.js.map

1
src/seed.js.map Normal file

File diff suppressed because one or more lines are too long

221
src/seed.ts Normal file
View File

@ -0,0 +1,221 @@
export const shape = [
{schluessel: "neu", name: "neu", beschreibung: ''},
{schluessel: "neuwertig", name: "neuwertig", beschreibung: ''},
{schluessel: "lg", name: "leichte Gebrauchsspuren", beschreibung: ''},
{schluessel: "mg", name: "mittlere Gebrauchsspuren", beschreibung: ''},
{schluessel: "ag", name: "abgenutzt", beschreibung: ''},
{schluessel: "eg", name: "eingeschränkte Funktion", beschreibung: ''},
{schluessel: "defekt", name: "defekt", beschreibung: ''},
];
export const buildtype= [
{schluessel: "box", name: "Box", beschreibung: ''},
{schluessel: "kb", name: "Kleinbildkamera", beschreibung: ''},
{schluessel: "slr", name: "Spiegelreflex", beschreibung: ''},
{schluessel: "dslr", name: "Digitale Spiegelreflex", beschreibung: ''},
{schluessel: "mf", name: "Mittelformat", beschreibung: ''},
{schluessel: "gf", name: "Großformat", beschreibung: ''},
{schluessel: "aps", name: "Digitalkamera", beschreibung: ''},
{schluessel: "holz", name: "Holzkamera", beschreibung: ''},
{schluessel: "platte", name: "Plattenkamera", beschreibung: ''},
{schluessel: "fach", name: "Fachkamera", beschreibung: ''},
{schluessel: "lf", name: "Lichtfeldkamera", beschreibung: ''},
{schluessel: "balg", name: "Balgenkamera", beschreibung: ''},
{schluessel: "sof", name: "Sofortbild", beschreibung: ''},
];
export const brands= [
{schluessel: 'agfa', name: 'Agfa', beschreibung: 'Filme aller Art sowie analoge Kameras'},
{schluessel: 'alpa', name: 'Alpa', beschreibung: 'Mittelformat analog/digital (früher Kleinbild).'},
{schluessel: 'arca_swiss', name: 'Arca-Swiss', beschreibung: 'Großformatkameras.'},
{schluessel: 'bilora', name: 'Bilora', beschreibung: 'Kleinbildkameras.'},
{schluessel: 'braun_photo_technik', name: 'Braun Photo Technik', beschreibung: 'Kameras, Diaprojektoren'},
{schluessel: 'bronica', name: 'Bronica', beschreibung: 'Mittelformatkameras.'},
{schluessel: 'cambo', name: 'Cambo', beschreibung: 'Großformatkameras.'},
{schluessel: 'camogli', name: 'Camogli', beschreibung: 'Mittelformatkameras.'},
{schluessel: 'canham_cameras', name: 'Canham Cameras', beschreibung: 'Großformatkameras.'},
{schluessel: 'canon', name: 'Canon', beschreibung: 'APS-Kameras, Digitalkameras, Kleinbildkameras, Objektive.'},
{schluessel: 'carena', name: 'Carena', beschreibung: 'Kleinbildkameras, Objektive'},
{schluessel: 'casio', name: 'Casio', beschreibung: 'Digitalkameras.'},
{schluessel: 'chinon', name: 'Chinon', beschreibung: 'Digitalkameras, Kleinbildkameras.'},
{
schluessel: 'contax',
name: 'Contax',
beschreibung: 'APS-Kameras, Digitalkameras, Kleinbildkameras, Mittelformatkameras.'
},
{schluessel: 'dr_gilde', name: 'Dr. Gilde', beschreibung: 'Mittelformatkameras.'},
{
schluessel: 'dhw_fototechnik',
name: 'DHW Fototechnik',
beschreibung: 'digitale und analoge Mittelformatkameras, TLR Mittelformatkameras, Fachkameras, Kleinbildkameras'
},
{schluessel: 'epson', name: 'Epson', beschreibung: 'Digitalkameras.'},
{
schluessel: 'ernemann_Werke_AG',
name: 'Ernemann-Werke AG',
beschreibung: 'Kinoprojektoren und Kameras, darunter die Ermanox mit damals lichtstärkstem Serienobjektiv der Welt'
},
{schluessel: 'fed', name: 'FED', beschreibung: 'Kleinbildkameras.'},
{
schluessel: 'fujifilm',
name: 'Fujifilm',
beschreibung: 'APS-Kameras, Digitalkameras, Kleinbildkameras, Mittelformatkameras.'
},
{schluessel: 'fandolfi', name: 'Gandolfi', beschreibung: 'Großformatkameras.'},
{schluessel: 'fottschalt', name: 'Gottschalt', beschreibung: 'Fachkameras.'},
{schluessel: 'hasselblad', name: 'Hasselblad', beschreibung: 'Kleinbildkameras, Mittelformatkameras.'},
{schluessel: 'hitachi', name: 'Hitachi', beschreibung: 'Digitalkameras.'},
{schluessel: 'hewlett-Packard (HP)', name: 'Hewlett-Packard (HP)', beschreibung: 'Digitalkameras.'},
{schluessel: 'horseman', name: 'Horseman', beschreibung: 'Großformatkameras, Mittelformatkameras.'},
{schluessel: 'ihagee', name: 'Ihagee', beschreibung: 'Kleinbildkameras (Bezeichnungen Exa und Exakta).'},
{schluessel: 'jenoptik', name: 'Jenoptik', beschreibung: 'Digitalkameras.'},
{schluessel: 'jvc', name: 'JVC', beschreibung: 'Digitalkameras.'},
{schluessel: 'kalimar', name: 'Kalimar', beschreibung: 'Kleinbildkameras, Mittelformatkameras, Objektive.'},
{
schluessel: 'kamera_werk_dresden',
name: 'Kamera Werk Dresden',
beschreibung: 'Panoramakameras für Kleinbild und Mittelformat (Bezeichnung Noblex).'
},
{schluessel: 'kiev', name: 'Kiev', beschreibung: 'Mittelformatkameras, Kleinbildkameras.'},
{schluessel: 'kodak', name: 'Kodak', beschreibung: 'APS-Kameras, Kleinbildkameras, Digitalkameras.'},
{
schluessel: 'konica',
name: 'Konica',
beschreibung: 'APS-Kameras, Digitalkameras, Kleinbildkameras, Mittelformatkameras, Objektive.'
},
{
schluessel: 'konica_minolta',
name: 'Konica Minolta',
beschreibung: 'Fusion aus Konica und Minolta; Digitalkameras, Objektive.'
},
{schluessel: 'kōwa', name: 'Kōwa', beschreibung: 'Mittelformatkameras.'},
{schluessel: 'kyocera', name: 'Kyocera', beschreibung: '(siehe auch Yashica und Contax): Digitalkameras.'},
{schluessel: 'leaf', name: 'Leaf', beschreibung: 'Digitale Rückwände für Mittelformatkameras.'},
{
schluessel: 'leica',
name: 'Leica',
beschreibung: 'APS-Kameras, Analogkameras, Digitalkameras, Kleinbildkameras.'
},
{schluessel: 'linhof', name: 'Linhof', beschreibung: 'Großformatkameras, Mittelformatkameras.'},
{schluessel: 'lomo', name: 'Lomo', beschreibung: 'analoge Kleinbildsucherkameras.'},
{schluessel: 'lotus_view', name: 'Lotus-View', beschreibung: 'Großformatkameras.'},
{schluessel: 'mamiya', name: 'Mamiya', beschreibung: 'Kleinbildkameras, Mittelformatkameras, Digitalkameras'},
{schluessel: 'meyer_optik', name: 'Meyer-Optik', beschreibung: 'v. a. Objektive'},
{
schluessel: 'minolta',
name: 'Minolta',
beschreibung: 'APS-Kameras, Digitalkameras, Kleinbildkameras, Mittelformatkameras, Objektive.'
},
{schluessel: 'minox', name: 'Minox', beschreibung: 'Digitalkameras, Kleinbildkameras.'},
{schluessel: 'mustek', name: 'Mustek', beschreibung: 'Digitalkameras.'},
{
schluessel: 'nikon',
name: 'Nikon',
beschreibung: 'APS-Kameras, Digitalkameras, Kleinbildkameras, Objektive für GF-Kameras.'
},
{schluessel: 'olympus', name: 'Olympus', beschreibung: 'APS-Kameras, Digitalkameras, Kleinbildkameras.'},
{schluessel: 'panasonic', name: 'Panasonic', beschreibung: 'Digitalkameras, Smartphones.'},
{
schluessel: 'pentacon',
name: 'Pentacon',
beschreibung: 'Digitalkameras, Kleinbildkameras (Bezeichnung Praktica), früher auch Mittelformatkameras.'
},
{schluessel: 'pentax', name: 'Pentax', beschreibung: 'Digitalkameras, Kleinbildkameras, Mittelformatkameras.'},
{schluessel: 'phase_one', name: 'Phase One', beschreibung: 'Digitalkameras (digitaler Rückteile).'},
{schluessel: 'plaubel', name: 'Plaubel', beschreibung: 'Großformatkameras'},
{schluessel: 'polaroid', name: 'Polaroid', beschreibung: 'Digitalkameras, Sofortbildsysteme chemisch.'},
{schluessel: 'rbt', name: 'RBT', beschreibung: 'Stereokameras und Projektoren.'},
{
schluessel: 'reflekta_kamerawerk_tharandt',
name: 'Reflekta-Kamerawerk Tharandt',
beschreibung: 'TLR Mittelformatkameras, Reflekta'
},
{schluessel: 'ricoh', name: 'Ricoh', beschreibung: 'Digitalkameras, Kleinbildkameras.'},
{schluessel: 'rheinmetall', name: 'Rheinmetall', beschreibung: 'Kleinbildkameras EXA, Exakta'},
{
schluessel: 'rollei',
name: 'Rollei',
beschreibung: 'Digitalkameras, Kleinbildkameras, digitale und analoge Mittelformatkameras, TLR Mittelformatkameras.'
},
{
schluessel: 'sakar_international',
name: 'Sakar International',
beschreibung: 'Zubehör, Digitalkameras, Marken Vivitar, Kodak'
},
{schluessel: 'salyut', name: 'Salyut', beschreibung: 'Mittelformatkameras.'},
{schluessel: 'samsung', name: 'Samsung', beschreibung: 'Digitalkameras, Kleinbildkameras.'},
{schluessel: 'sanyo', name: 'Sanyo', beschreibung: 'Digitalkameras.'},
{schluessel: 'sigma', name: 'Sigma', beschreibung: 'Digitalkameras, Kleinbildkameras, Objektive.'},
{schluessel: 'silvestri', name: 'Silvestri', beschreibung: 'Großformatkameras.'},
{schluessel: 'sinar', name: 'Sinar', beschreibung: 'Digitalkameras, Großformatkameras.'},
{schluessel: 'sony', name: 'Sony', beschreibung: 'Digitalkameras, Objektive.'},
{schluessel: 'tachihara', name: 'Tachihara', beschreibung: 'Mittelformatkameras'},
{schluessel: 'tamron', name: 'Tamron', beschreibung: 'Objektive'},
{schluessel: 'teamwork', name: 'Teamwork', beschreibung: 'Mittelformatkameras'},
{schluessel: 'tokina', name: 'Tokina', beschreibung: 'Objektive'},
{schluessel: 'topcon', name: 'Topcon', beschreibung: 'Kleinbildkameras'},
{schluessel: 'toshiba', name: 'Toshiba', beschreibung: 'Digitalkameras, Großformatkameras'},
{schluessel: 'toyo', name: 'Toyo', beschreibung: 'Großformatkameras'},
{schluessel: 'yashica', name: 'Yashica', beschreibung: 'Digitalkameras, Kleinbildkameras.'},
{schluessel: 'yashica_kyocera', name: 'Yashica-Kyocera', beschreibung: 'Mittelformatkameras.'},
{schluessel: 'vinten', name: 'Vinten', beschreibung: 'Luftbildkameras.'},
{schluessel: 'vivitar', name: 'Vivitar', beschreibung: 'Digitalkameras, Wechselobjektive.'},
{
schluessel: 'voigtländer',
name: 'Voigtländer',
beschreibung: 'APS-Kameras, Digitalkameras, Kleinbildkameras, erstes Foto-Zoomobjektiv der Welt, aktuell: ausschließlich Objektive.'
},
{schluessel: 'walker_cameras', name: 'Walker Cameras', beschreibung: 'Großformatkameras.'},
{
schluessel: 'welta',
name: 'Welta',
beschreibung: 'Mittelformatkameras, TLR, Kleinbildkameras. Später aufgegangen in Pentacon.'
},
{
schluessel: 'wünsche_emil_ag',
name: 'Wünsche, Emil AG',
beschreibung: 'Magazinkameras, Laufboden-Klappkameras mit Klappmechanismus, Reisekameras; aufgegangen in ICA Dresden im Jahre 1909.'
},
{schluessel: 'zeiss_ikon', name: 'Zeiss Ikon', beschreibung: 'Kleinbildkameras.'},
{schluessel: 'zenit', name: 'Zenit', beschreibung: 'Kleinbildkameras, Mittelformatkameras.'},
{schluessel: 'zenza_bronica', name: 'Zenza Bronica', beschreibung: 'Mittelformatkameras.'},
{schluessel: 'zorki', name: 'Zorki', beschreibung: 'Kleinbildkameras.'},
]
export const cameras = [
{
id: "pentax_19",
brand_key: "pentax",
shape_key: "neuwertig",
name:"Pentax K30",
buildtype: "slr",
description: "Langer Text",
year_of_production: 2000,
year_of_purchase: 2022,
},
{
id: "pentax_20",
brand_key: "pentax",
shape_key: "neuwertig",
name:"Pentax K50",
buildtype: "slr",
description: "Langer Text",
year_of_production: 2000,
year_of_purchase: 2022,
},
{
id: "pentax_21",
brand_key: "pentax",
shape_key: "neuwertig",
name:"Pentax K3",
buildtype: "slr",
description: "Langer Text",
year_of_production: 2000,
year_of_purchase: 2022,
}
]

6
src/shims-vue.d.ts vendored Normal file
View File

@ -0,0 +1,6 @@
/* eslint-disable */
declare module '*.vue' {
import type { DefineComponent } from 'vue'
const component: DefineComponent<{}, {}, any>
export default component
}

10
src/store/index.js Normal file
View File

@ -0,0 +1,10 @@
import { createStore } from 'vuex';
import authModule from "./modules/auth";
import cameraModule from "./modules/camera";
export default createStore({
modules: {
auth: authModule,
camera: cameraModule
}
});
//# sourceMappingURL=index.js.map

1
src/store/index.js.map Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAA;AAElC,OAAO,UAAU,MAAM,gBAAgB,CAAC;AACxC,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAE5C,eAAe,WAAW,CAAC;IACvB,OAAO,EAAE;QACL,IAAI,EAAE,UAAU;QAChB,MAAM,EAAE,YAAY;KACvB;CACJ,CAAC,CAAA"}

11
src/store/index.ts Normal file
View File

@ -0,0 +1,11 @@
import { createStore } from 'vuex'
import authModule from "./modules/auth";
import cameraModule from "./modules/camera";
export default createStore({
modules: {
auth: authModule,
camera: cameraModule
}
})

View File

@ -0,0 +1,28 @@
const state = {
userId: null,
token: null
};
const getters = {
isAuthenticated(state) {
return state.token;
},
token: (state) => state.token
};
const mutations = {
setUser(context, payload) {
console.log("mutations.setUser", payload);
state.userId = payload.userId;
state.token = payload.token;
},
};
const actions = {};
const modules = {};
const authModule = {
state,
getters,
mutations,
actions,
modules
};
export default authModule;
//# sourceMappingURL=index.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAGA,MAAM,KAAK,GAAG;IACV,MAAM,EAAE,IAAI;IACZ,KAAK,EAAE,IAAI;CACd,CAAC;AAEF,MAAM,OAAO,GAAG;IACZ,eAAe,CAAC,KAAS;QACrB,OAAO,KAAK,CAAC,KAAK,CAAA;IACtB,CAAC;IACD,KAAK,EAAE,CAAC,KAAS,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK;CAEpC,CAAC;AAEF,MAAM,SAAS,GAAG;IACd,OAAO,CAAC,OAA+B,EAAE,OAAW;QAChD,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;QAC1C,KAAK,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAC9B,KAAK,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;IAChC,CAAC;CACJ,CAAC;AAEF,MAAM,OAAO,GAAG,EAAE,CAAC;AACnB,MAAM,OAAO,GAAG,EAAE,CAAC;AAEnB,MAAM,UAAU,GAAG;IACf,KAAK;IACL,OAAO;IACP,SAAS;IACT,OAAO;IACP,OAAO;CACV,CAAA;AAED,eAAe,UAAU,CAAA"}

View File

@ -0,0 +1,36 @@
import {ActionContext} from "vuex";
const state = {
userId: null,
token: null
};
const getters = {
isAuthenticated(state:any ) {
return state.token
},
token: (state:any) => state.token
};
const mutations = {
setUser(context:ActionContext<any, any>, payload:any) {
console.log("mutations.setUser", payload);
state.userId = payload.userId;
state.token = payload.token;
},
};
const actions = {};
const modules = {};
const authModule = {
state,
getters,
mutations,
actions,
modules
}
export default authModule

View File

@ -0,0 +1,93 @@
import * as seed from "@/seed";
const state = {
isInitialized: false,
cameras: [],
brands: [],
shapes: [],
buildtypes: []
};
const getters = {
cameras: (state) => state.cameras,
camera: (state) => (id) => state.cameras.find((camera) => camera.id === id),
activeCamera: (state) => state.cameras.find((camera) => camera.active),
brands: (state) => state.brands,
brand: (state) => (id) => state.brands.find((brand) => brand.schluessel === id),
shapes: (state) => state.shapes,
shape: (state) => (id) => state.shapes.find((shape) => shape.schluessel === id),
buildtypes: (state) => state.buildtypes,
buildtype: (state) => (id) => state.buildtypes.find((buildtype) => buildtype.schluessel === id),
isInitialized: (state) => state.isInitialized,
};
const mutations = {
setCameras(state, payload) {
console.log("mutation.setCameras");
const camerasDA = [];
payload.map((camera) => {
state.cameras.push({
...camera,
edit: false,
active: false
});
});
console.log("STORE", state.cameras);
},
setCameraActiveState(state, payload) {
state.cameras.map((camera) => camera.active = false);
const objCamera = state.cameras.find((camera) => camera.id === payload.id);
objCamera.active = payload.active;
},
setBrands(state, payload) {
console.log("mutation.setBrands");
state.brands = payload;
console.log("STORE", state.brands);
},
setShapes(state, payload) {
console.log("mutation.setShapes");
state.shapes = payload;
console.log("STORE", state.shapes);
},
setBuildtypes(state, payload) {
console.log("mutation.setBuildtypes");
state.buildtypes = payload;
console.log("STORE", state.buildtypes);
},
setInitialized(state, payload) {
state.isInitialized = payload;
}
};
const actions = {
fetchCameras(context) {
context.commit("setCameras", seed.cameras);
},
fetchBrands(context) {
context.commit("setBrands", seed.brands);
},
fetchBuildTypes(context) {
context.commit("setBuildtypes", seed.buildtype);
},
fetchShape(context) {
context.commit("setShapes", seed.shape);
},
setCameraActiveState(context, payload) {
console.log("action.setCameraActiveState", payload);
const cameraObj = state.cameras.find((camera) => camera.id === payload.cameraId);
context.commit("setCameraActiveState", { id: payload.cameraId, active: payload.active });
},
initialize(context) {
context.dispatch("fetchCameras");
context.dispatch("fetchBrands");
context.dispatch("fetchBuildTypes");
context.dispatch("fetchShape");
context.commit("setInitialized", true);
}
};
const modules = {};
const cameraModule = {
state,
getters,
mutations,
actions,
modules
};
export default cameraModule;
//# sourceMappingURL=index.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAE/B,MAAM,KAAK,GAAG;IACV,aAAa,EAAE,KAAK;IACpB,OAAO,EAAE,EAAE;IACX,MAAM,EAAE,EAAE;IACV,MAAM,EAAE,EAAE;IACV,UAAU,EAAE,EAAE;CAEjB,CAAC;AACF,MAAM,OAAO,GAAG;IACZ,OAAO,EAAE,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO;IACtC,MAAM,EAAE,CAAC,KAAU,EAAE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,QAAQ,CAAC,YAAY,CAAC,CAAC;QAC/B,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;IAE3C,CAAC;CACJ,CAAC;AACF,MAAM,OAAO,GAAG,EAAE,CAAC;AAEnB,MAAM,YAAY,GAAG;IACjB,KAAK;IACL,OAAO;IACP,SAAS;IACT,OAAO;IACP,OAAO;CACV,CAAA;AAED,eAAe,YAAY,CAAA"}

View File

@ -0,0 +1,104 @@
import {ActionContext} from "vuex";
import * as seed from "@/seed";
const state = {
isInitialized: false,
cameras: [],
brands: [],
shapes: [],
buildtypes: []
};
const getters = {
cameras: (state: any) => state.cameras,
camera: (state: any) => (id: any) => state.cameras.find((camera: any) => camera.id === id),
activeCamera: (state: any) => state.cameras.find((camera:any) => camera.active ),
brands: (state: any) => state.brands,
brand: (state: any) => (id: any) => state.brands.find((brand: any) => brand.schluessel === id),
shapes: (state: any) => state.shapes,
shape: (state: any) => (id: any) => state.shapes.find((shape: any) => shape.schluessel === id),
buildtypes: (state: any) => state.buildtypes,
buildtype: (state: any) => (id: any) => state.buildtypes.find((buildtype: any) => buildtype.schluessel === id),
isInitialized: (state:any ) => state.isInitialized,
};
const mutations = {
setCameras(state:any, payload:any) {
console.log("mutation.setCameras");
const camerasDA = [];
payload.map((camera:any) => {
state.cameras.push({
...camera,
edit: false,
active: false
})
})
console.log("STORE", state.cameras);
},
setCameraActiveState(state:any, payload:any) {
state.cameras.map((camera:any) => camera.active= false);
const objCamera = state.cameras.find((camera:any) => camera.id === payload.id);
objCamera.active = payload.active;
},
setBrands(state:any, payload:any) {
console.log("mutation.setBrands");
state.brands = payload;
console.log("STORE", state.brands);
},
setShapes(state:any, payload:any) {
console.log("mutation.setShapes");
state.shapes = payload;
console.log("STORE", state.shapes);
},
setBuildtypes(state:any, payload:any) {
console.log("mutation.setBuildtypes");
state.buildtypes = payload;
console.log("STORE", state.buildtypes);
},
setInitialized(state:any, payload:boolean) {
state.isInitialized = payload;
}
};
const actions = {
fetchCameras(context:ActionContext<any, any>) {
context.commit("setCameras", seed.cameras);
},
fetchBrands(context:ActionContext<any, any>) {
context.commit("setBrands", seed.brands);
},
fetchBuildTypes(context:ActionContext<any, any>) {
context.commit("setBuildtypes", seed.buildtype);
},
fetchShape(context:ActionContext<any, any>) {
context.commit("setShapes", seed.shape);
},
setCameraActiveState(context:ActionContext<any, any>, payload:any) {
console.log("action.setCameraActiveState", payload)
const cameraObj = state.cameras.find( (camera:any) => camera.id === payload.cameraId);
context.commit("setCameraActiveState", {id: payload.cameraId, active:payload.active});
},
initialize(context:ActionContext<any, any>) {
context.dispatch("fetchCameras");
context.dispatch("fetchBrands");
context.dispatch("fetchBuildTypes");
context.dispatch("fetchShape");
context.commit("setInitialized", true);
}
};
const modules = {};
const cameraModule = {
state,
getters,
mutations,
actions,
modules
}
export default cameraModule

42
tsconfig.json Normal file
View File

@ -0,0 +1,42 @@
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"strict": true,
"jsx": "preserve",
"moduleResolution": "node",
"experimentalDecorators": true,
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"useDefineForClassFields": true,
"sourceMap": true,
"baseUrl": ".",
"types": [
"webpack-env"
],
"paths": {
"@/*": [
"src/*"
]
},
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
]
},
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.vue",
"tests/**/*.ts",
"tests/**/*.tsx"
],
"exclude": [
"node_modules"
]
}