upload image
This commit is contained in:
parent
1aadad6e45
commit
1cd8f3933d
|
@ -5,7 +5,6 @@
|
|||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "billibox-vue",
|
||||
"version": "0.1.0",
|
||||
"dependencies": {
|
||||
"@dsb-norge/vue-keycloak-js": "*",
|
||||
|
@ -41,6 +40,7 @@
|
|||
"@vue/cli-plugin-typescript": "~5.0.0",
|
||||
"@vue/cli-service": "~5.0.0",
|
||||
"@vue/eslint-config-typescript": "^9.1.0",
|
||||
"axios-debug-log": "^0.8.4",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-plugin-vue": "^8.0.3",
|
||||
"typescript": "~4.5.5"
|
||||
|
@ -2158,6 +2158,15 @@
|
|||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/debug": {
|
||||
"version": "4.1.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.7.tgz",
|
||||
"integrity": "sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/ms": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/eslint": {
|
||||
"version": "7.29.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.29.0.tgz",
|
||||
|
@ -2245,6 +2254,12 @@
|
|||
"integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/ms": {
|
||||
"version": "0.7.31",
|
||||
"resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz",
|
||||
"integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "17.0.23",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.23.tgz",
|
||||
|
@ -3773,6 +3788,19 @@
|
|||
"follow-redirects": "^1.14.8"
|
||||
}
|
||||
},
|
||||
"node_modules/axios-debug-log": {
|
||||
"version": "0.8.4",
|
||||
"resolved": "https://registry.npmjs.org/axios-debug-log/-/axios-debug-log-0.8.4.tgz",
|
||||
"integrity": "sha512-DvmaJiYusndhfAjQ94HqlvhaVoEjOetwo9cpb+OVtOZNZTqdz0VAVed3ZjSQKpyM1g8jDXUXFx0Pg1DhUZzAdw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/debug": "^4.0.0",
|
||||
"debug": "^4.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"axios": ">=0.17.0"
|
||||
}
|
||||
},
|
||||
"node_modules/babel-loader": {
|
||||
"version": "8.2.4",
|
||||
"resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.2.4.tgz",
|
||||
|
@ -13895,6 +13923,15 @@
|
|||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"@types/debug": {
|
||||
"version": "4.1.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.7.tgz",
|
||||
"integrity": "sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/ms": "*"
|
||||
}
|
||||
},
|
||||
"@types/eslint": {
|
||||
"version": "7.29.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.29.0.tgz",
|
||||
|
@ -13982,6 +14019,12 @@
|
|||
"integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/ms": {
|
||||
"version": "0.7.31",
|
||||
"resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz",
|
||||
"integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "17.0.23",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.23.tgz",
|
||||
|
@ -14243,7 +14286,6 @@
|
|||
"integrity": "sha512-vf4KqrmuOSnoEYGUiHPeMoxhh6wpiucLWXISn7xYFU80pK1lqcuhbl6tpurAanUIyRO/ENDUQBH7RAdbLNq1bA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/core": "^7.12.16",
|
||||
"@babel/helper-compilation-targets": "^7.12.16",
|
||||
"@babel/helper-module-imports": "^7.12.13",
|
||||
"@babel/plugin-proposal-class-properties": "^7.12.13",
|
||||
|
@ -14256,7 +14298,6 @@
|
|||
"@vue/babel-plugin-jsx": "^1.0.3",
|
||||
"@vue/babel-preset-jsx": "^1.1.2",
|
||||
"babel-plugin-dynamic-import-node": "^2.3.3",
|
||||
"core-js": "^3.8.3",
|
||||
"core-js-compat": "^3.8.3",
|
||||
"semver": "^7.3.4"
|
||||
},
|
||||
|
@ -15151,6 +15192,16 @@
|
|||
"follow-redirects": "^1.14.8"
|
||||
}
|
||||
},
|
||||
"axios-debug-log": {
|
||||
"version": "0.8.4",
|
||||
"resolved": "https://registry.npmjs.org/axios-debug-log/-/axios-debug-log-0.8.4.tgz",
|
||||
"integrity": "sha512-DvmaJiYusndhfAjQ94HqlvhaVoEjOetwo9cpb+OVtOZNZTqdz0VAVed3ZjSQKpyM1g8jDXUXFx0Pg1DhUZzAdw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/debug": "^4.0.0",
|
||||
"debug": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"babel-loader": {
|
||||
"version": "8.2.4",
|
||||
"resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.2.4.tgz",
|
||||
|
@ -15932,9 +15983,7 @@
|
|||
"resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz",
|
||||
"integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ajv": "^8.0.0"
|
||||
}
|
||||
"requires": {}
|
||||
},
|
||||
"ajv-keywords": {
|
||||
"version": "5.1.0",
|
||||
|
@ -18413,9 +18462,7 @@
|
|||
"resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz",
|
||||
"integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ajv": "^8.0.0"
|
||||
}
|
||||
"requires": {}
|
||||
},
|
||||
"ajv-keywords": {
|
||||
"version": "5.1.0",
|
||||
|
@ -21093,9 +21140,7 @@
|
|||
"resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz",
|
||||
"integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ajv": "^8.0.0"
|
||||
}
|
||||
"requires": {}
|
||||
},
|
||||
"ajv-keywords": {
|
||||
"version": "5.1.0",
|
||||
|
@ -21181,9 +21226,7 @@
|
|||
"resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz",
|
||||
"integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ajv": "^8.0.0"
|
||||
}
|
||||
"requires": {}
|
||||
},
|
||||
"ajv-keywords": {
|
||||
"version": "5.1.0",
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
"@vue/cli-plugin-typescript": "~5.0.0",
|
||||
"@vue/cli-service": "~5.0.0",
|
||||
"@vue/eslint-config-typescript": "^9.1.0",
|
||||
"axios-debug-log": "^0.8.4",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-plugin-vue": "^8.0.3",
|
||||
"typescript": "~4.5.5"
|
||||
|
|
10
src/App.vue
10
src/App.vue
|
@ -23,6 +23,16 @@ import TheTwoColumnsLayout from '@/layouts/TheTwoColumnsLayout.vue';
|
|||
return this.$store.getters.token;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
async beforeCreate() {
|
||||
console.log("beforeCreate", this.$store.getters.isInitialized);
|
||||
if(!this.$store.getters.isInitialized) {
|
||||
console.log("Not yet initialized")
|
||||
await this.$store.dispatch("initialize", {seed: true});
|
||||
}
|
||||
},
|
||||
|
||||
})
|
||||
export default class App extends Vue {}
|
||||
</script>
|
||||
|
|
|
@ -16,6 +16,9 @@ import axios from 'axios';
|
|||
|
||||
export default {
|
||||
name: "FileUpload",
|
||||
|
||||
|
||||
|
||||
data() {
|
||||
return {
|
||||
file: ''
|
||||
|
@ -28,8 +31,14 @@ export default {
|
|||
submitFile() {
|
||||
let formData = new FormData();
|
||||
formData.append('file',this.file);
|
||||
localStorage.debug = "axios";
|
||||
const api = axios.create({baseURL: 'http://127.0.0.1:4000'})
|
||||
const apiLogger = require('debug')('api');
|
||||
require('axios-debug-log').addLogger(api, apiLogger);
|
||||
|
||||
axios.post( '^/api/fs/billibox/assets',
|
||||
// api('/');
|
||||
|
||||
api.post( '/fs/billibox/assets',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
|
||||
<div :title="typeName">
|
||||
<font-awesome-icon class="billi-icon-filter" :class="cardStyle" :icon="getIconName(itemType)" color="#eee" size="xxl"/>
|
||||
<font-awesome-icon class="billi-icon-filter" :class="cardStyle" :icon="getIconName(itemType)" color="#eee" />
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import NameKey from "@/store/classes/NameKey";
|
||||
|
||||
export default {
|
||||
name: "NameKeyListItem",
|
||||
|
@ -43,7 +42,7 @@ export default {
|
|||
},
|
||||
props: {
|
||||
item: {
|
||||
type: NameKey,
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
storeType: {
|
||||
|
|
|
@ -30,6 +30,8 @@ export default class BilliDB {
|
|||
console.log("onupgradeneeded");
|
||||
// @ts-ignore
|
||||
const db = e.target.result;
|
||||
const stores =
|
||||
|
||||
db.createObjectStore("inventory", {autoIncrement: false, keyPath: 'id'});
|
||||
db.createObjectStore("sets", {autoIncrement: false, keyPath: 'id'});
|
||||
|
||||
|
@ -39,6 +41,8 @@ export default class BilliDB {
|
|||
db.createObjectStore("brands", {autoIncrement: false, keyPath: 'key'});
|
||||
db.createObjectStore("manufacturers", {autoIncrement: false, keyPath: 'key'});
|
||||
db.createObjectStore("medias", {autoIncrement: false, keyPath: 'key'});
|
||||
db.createObjectStore("assets", {autoIncrement: false, keyPath: 'key'});
|
||||
db.createObjectStore("filtermounts", {autoIncrement: false, keyPath: 'key'});
|
||||
|
||||
}
|
||||
})
|
||||
|
|
|
@ -63,6 +63,8 @@ app.use(VueKeyCloak, {
|
|||
console.log("res", res);
|
||||
});
|
||||
|
||||
console.log(keycloak.idToken);
|
||||
|
||||
}
|
||||
)
|
||||
}
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
<template>
|
||||
<TheCameraLayout
|
||||
:left-column-class="'col-md-8 '"
|
||||
:right-column-class="'col-md-4 bg-vue'"
|
||||
:fullsize="true"
|
||||
>
|
||||
<TheCameraLayout>
|
||||
<template #main>
|
||||
|
||||
<div v-if="activeItem && activeItem.edit">
|
||||
|
@ -85,14 +81,6 @@ export default {
|
|||
},
|
||||
|
||||
},
|
||||
|
||||
async beforeCreate() {
|
||||
console.log("beforeCreate", this.$store.getters.isInitialized);
|
||||
if(!this.$store.getters.isInitialized) {
|
||||
console.log("Not yet initialized")
|
||||
await this.$store.dispatch("initialize", {seed: true});
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
<template>
|
||||
<TheCameraLayout
|
||||
:left-column-class="'col-md-8 '"
|
||||
:right-column-class="'col-md-4 bg-vue'"
|
||||
:fullsize="true"
|
||||
>
|
||||
<TheCameraLayout>
|
||||
<template #main>
|
||||
|
||||
<div v-if="activeStore!=''">
|
||||
|
|
58
src/seed.ts
58
src/seed.ts
|
@ -1,4 +1,4 @@
|
|||
export const SEED_VERSION = 3;
|
||||
export const SEED_VERSION = 7;
|
||||
|
||||
export const medias = [
|
||||
{key: "kb", name: "Kleinbild", description: ''},
|
||||
|
@ -21,6 +21,60 @@ export const mounts = [
|
|||
{key: "ef-bajonett", name: "EF-Bajonett", description: ''},
|
||||
];
|
||||
|
||||
export const filtermounts = [
|
||||
{ key: "M1905", name: "M 19 × 0,5", description: "sehr selten" },
|
||||
{ key: "M2405", name: "M 24 × 0,5", description: "sehr selten" },
|
||||
{ key: "M25505", name: "M 25,5 × 0,5", description: "sehr selten" },
|
||||
{ key: "M2705", name: "M 27 × 0,5", description: "häufig) (Video" },
|
||||
{ key: "M28505", name: "M 28,5 × 0,5", description: "im Wesentlichen nur Astronomie 1,25 = 31,75 mm Tubusdurchmesser" },
|
||||
{ key: "M30505", name: "M 30,5 × 0,5", description: " " },
|
||||
{ key: "M3405", name: "M 34 × 0,5", description: "sehr selten" },
|
||||
{ key: "M3505", name: "M 35 × 0,5", description: "sehr selten" },
|
||||
{ key: "M35505", name: "M 35,5 × 0,5", description: "häufig) (Video" },
|
||||
{ key: "M36505", name: "M 36,5 × 0,5", description: " " },
|
||||
{ key: "M3705", name: "M 37 × 0,5", description: " " },
|
||||
{ key: "M37505", name: "M 37,5 × 0,5", description: " " },
|
||||
{ key: "M3905", name: "M 39 × 0,5", description: "Video" },
|
||||
{ key: "M4005", name: "M 40 × 0,5", description: "sehr selten" },
|
||||
{ key: "M40505", name: "M 40,5 × 0,5", description: "häufig) (Video" },
|
||||
{ key: "M4105", name: "M 41 × 0,5", description: "sehr selten" },
|
||||
{ key: "M4305", name: "M 43 × 0,5", description: "sehr selten" },
|
||||
{ key: "M4505", name: "M 45 × 0,5", description: " " },
|
||||
{ key: "M285060", name: "M 28,5 × 0,60", description: "im Wesentlichen nur Astronomie 1,25\"" },
|
||||
{ key: "M48060", name: "M 48 × 0,60", description: "im Wesentlichen nur Astronomie 2\"" },
|
||||
{ key: "M25075", name: "M 25 × 0,75", description: " " },
|
||||
{ key: "M27075", name: "M 27 × 0,75", description: "sehr selten" },
|
||||
{ key: "M28075", name: "M 28 × 0,75", description: "sehr selten" },
|
||||
{ key: "M285075", name: "M 28,5 × 0,75", description: "sehr selten" },
|
||||
{ key: "M30075", name: "M 30 × 0,75", description: " " },
|
||||
{ key: "M305075", name: "M 30,5 × 0,75", description: " " },
|
||||
{ key: "M37075", name: "M 37 × 0,75", description: " " },
|
||||
{ key: "M38075", name: "M 38 × 0,75", description: "sehr selten" },
|
||||
{ key: "M43075", name: "M 43 × 0,75", description: " " },
|
||||
{ key: "M46075", name: "M 46 × 0,75", description: " " },
|
||||
{ key: "M48075", name: "M 48 × 0,75", description: "u. a. Astronomie 2\"" },
|
||||
{ key: "M49075", name: "M 49 × 0,75", description: "häufig; besonders kompakt gebaute KB-SLR bis 50 mm Brennweite und 1:1,7 Öffnung" },
|
||||
{ key: "M52075", name: "M 52 × 0,75", description: "sehr häufig; typisch für KB-SLR bis 50 mm und 1:1,4 " },
|
||||
{ key: "M55075", name: "M 55 × 0,75", description: "häufig" },
|
||||
{ key: "M58075", name: "M 58 × 0,75", description: "sehr häufig" },
|
||||
{ key: "M60075", name: "M 60 × 0,75", description: " " },
|
||||
{ key: "M62075", name: "M 62 × 0,75", description: "sehr häufig" },
|
||||
{ key: "M67075", name: "M 67 × 0,75", description: "sehr häufig" },
|
||||
{ key: "M69075", name: "M 69 × 0,75", description: " " },
|
||||
{ key: "M72075", name: "M 72 × 0,75", description: "sehr häufig" },
|
||||
{ key: "M75075", name: "M 75 × 0,75", description: "selten" },
|
||||
{ key: "M77075", name: "M 77 × 0,75", description: "sehr häufig" },
|
||||
{ key: "M82075", name: "M 82 × 0,75", description: "häufig" },
|
||||
{ key: "M100075", name: "M 100 × 0,75", description: " " },
|
||||
{ key: "M861", name: "M 86 × 1", description: "auch C 86 genannt) (häufig" },
|
||||
{ key: "M951", name: "M 95 × 1", description: "auch C 95 genannt" },
|
||||
{ key: "M1001", name: "M 100 × 1", description: " " },
|
||||
{ key: "M1051", name: "M 105 × 1", description: "auch C 105 genannt" },
|
||||
{ key: "M1221", name: "M 122 × 1", description: " " },
|
||||
{ key: "M11215", name: "M 112 × 1,5", description: " " }
|
||||
|
||||
|
||||
];
|
||||
|
||||
export const conditions = [
|
||||
{key: "neu", name: "neu", description: ''},
|
||||
|
@ -366,7 +420,6 @@ export const manufacturers = [
|
|||
{key: 'zorki', name: 'Zorki', description: 'Kleinbildkameras.'},
|
||||
]
|
||||
|
||||
|
||||
export const lenses = [
|
||||
{
|
||||
id: "pentax-zoom",
|
||||
|
@ -607,6 +660,7 @@ export const sets = [
|
|||
|
||||
]
|
||||
|
||||
export const assets = []
|
||||
|
||||
export const accessories = [
|
||||
{
|
||||
|
|
|
@ -55,6 +55,7 @@ const actions = {
|
|||
})
|
||||
},
|
||||
storeUserProfile(context:ActionContext<any, any>, payload:any) {
|
||||
console.log("STORE user Profile", payload);
|
||||
context.commit("storeUserProfile", payload)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue