diff --git a/web/.editorconfig b/web/.editorconfig index c7d5acf..2b514c6 100644 --- a/web/.editorconfig +++ b/web/.editorconfig @@ -1,7 +1,7 @@ root = true [*.js] -indent_size = 2 +indent_size = 4 [*.vue] -indent_size = 2 \ No newline at end of file +indent_size = 4 \ No newline at end of file diff --git a/web/.eslintrc.js b/web/.eslintrc.js index c2931c7..42e9689 100644 --- a/web/.eslintrc.js +++ b/web/.eslintrc.js @@ -17,8 +17,7 @@ module.exports = { 'rules': { "no-console": "off", 'indent': [ - 'error', - 2 + 'error', 4 ], 'linebreak-style': [ 'off', diff --git a/web/babel.config.js b/web/babel.config.js index 3f453d4..c5dc6a5 100644 --- a/web/babel.config.js +++ b/web/babel.config.js @@ -1,5 +1,5 @@ module.exports = { - presets: [ - '@vue/cli-plugin-babel/preset' - ] + presets: [ + '@vue/cli-plugin-babel/preset' + ] }; diff --git a/web/public/index.html b/web/public/index.html index f1ec7ee..efc4b5f 100644 --- a/web/public/index.html +++ b/web/public/index.html @@ -1,17 +1,18 @@ - + c3cloc - - - -
- - + + + +
+ + diff --git a/web/src/App.vue b/web/src/App.vue index 72309a6..1fb66de 100644 --- a/web/src/App.vue +++ b/web/src/App.vue @@ -1,15 +1,16 @@ diff --git a/web/src/components/AddItemModal.vue b/web/src/components/AddItemModal.vue index e3cdf06..294e8a7 100644 --- a/web/src/components/AddItemModal.vue +++ b/web/src/components/AddItemModal.vue @@ -1,15 +1,15 @@ diff --git a/web/src/components/Cards.vue b/web/src/components/Cards.vue index 426ce0d..99ea98e 100644 --- a/web/src/components/Cards.vue +++ b/web/src/components/Cards.vue @@ -22,27 +22,27 @@ :value="filters[column]" @input="changeFilter(column, $event.target.value)" > - +
-
-
-
- -
+
+
+
+ +
+
-
@@ -52,17 +52,23 @@ import DataContainer from '@/mixins/data-container'; import router from '../router'; export default { - name: 'Cards', - mixins: [DataContainer], - created() { - this.columns.map(e => ({k: e, v: this.$store.getters.getFilters[e]})).filter(e => e.v).forEach(e => this.setFilter(e.k, e.v)); - }, - methods: { - changeFilter(col, val) { - this.setFilter(col, val); - let newquery = Object.entries({...this.$store.getters.getFilters, [col]: val}).reduce((a,[k,v]) => (v ? {...a, [k]:v} : a), {}); - router.push({query: newquery}); + name: 'Cards', + mixins: [DataContainer], + created() { + this.columns.map(e => ({ + k: e, + v: this.$store.getters.getFilters[e] + })).filter(e => e.v).forEach(e => this.setFilter(e.k, e.v)); + }, + methods: { + changeFilter(col, val) { + this.setFilter(col, val); + let newquery = Object.entries({ + ...this.$store.getters.getFilters, + [col]: val + }).reduce((a, [k, v]) => (v ? {...a, [k]: v} : a), {}); + router.push({query: newquery}); + }, }, - }, }; diff --git a/web/src/components/EditItem.vue b/web/src/components/EditItem.vue index e5f2a5f..9bea6f9 100644 --- a/web/src/components/EditItem.vue +++ b/web/src/components/EditItem.vue @@ -25,23 +25,23 @@ diff --git a/web/src/components/Lightbox.vue b/web/src/components/Lightbox.vue index 6af67ad..ac159f4 100644 --- a/web/src/components/Lightbox.vue +++ b/web/src/components/Lightbox.vue @@ -19,18 +19,18 @@ import Modal from '@/components/Modal'; import config from '../config'; export default { - name: 'Lightbox', - components: { Modal }, - props: ['file'], - data: ()=>({ - baseUrl: config.service.url, - }), + name: 'Lightbox', + components: {Modal}, + props: ['file'], + data: () => ({ + baseUrl: config.service.url, + }), }; \ No newline at end of file diff --git a/web/src/components/Modal.vue b/web/src/components/Modal.vue index b253e6c..c2c8f0b 100644 --- a/web/src/components/Modal.vue +++ b/web/src/components/Modal.vue @@ -29,47 +29,47 @@ \ No newline at end of file diff --git a/web/src/components/Navbar.vue b/web/src/components/Navbar.vue index 6c4e613..a343a29 100644 --- a/web/src/components/Navbar.vue +++ b/web/src/components/Navbar.vue @@ -3,7 +3,7 @@ @@ -27,10 +27,10 @@ import {mapActions, mapState} from 'vuex'; import Table from '@/components/Table'; export default { - name: 'Boxes', - components: {Table}, - computed: mapState(['loadedBoxes', 'layout']), - methods: mapActions(['showBoxContent']), + name: 'Boxes', + components: {Table}, + computed: mapState(['loadedBoxes', 'layout']), + methods: mapActions(['showBoxContent']), }; diff --git a/web/src/views/Error.vue b/web/src/views/Error.vue index ad1e07d..9d8cbad 100644 --- a/web/src/views/Error.vue +++ b/web/src/views/Error.vue @@ -4,7 +4,7 @@ diff --git a/web/src/views/Events.vue b/web/src/views/Events.vue index 99a3d6e..68ffca5 100644 --- a/web/src/views/Events.vue +++ b/web/src/views/Events.vue @@ -1,25 +1,27 @@ diff --git a/web/src/views/Files.vue b/web/src/views/Files.vue index a023053..aac8c7e 100644 --- a/web/src/views/Files.vue +++ b/web/src/views/Files.vue @@ -1,22 +1,23 @@ diff --git a/web/src/views/HowTo.vue b/web/src/views/HowTo.vue index 3f1c8a3..cc970a4 100644 --- a/web/src/views/HowTo.vue +++ b/web/src/views/HowTo.vue @@ -1,125 +1,135 @@ diff --git a/web/src/views/Items.vue b/web/src/views/Items.vue index 1f2f202..bfe852d 100644 --- a/web/src/views/Items.vue +++ b/web/src/views/Items.vue @@ -22,17 +22,17 @@ v-slot="{ item }" @itemActivated="openLightboxModalWith($event)" > -
- - - -
+
+ + + +
@@ -53,14 +53,14 @@
uid: {{ item.uid }} box: {{ item.box }}
- - + +
@@ -79,33 +79,33 @@ import config from '../config'; import Lightbox from '../components/Lightbox'; export default { - name: 'Items', - data: () => ({ - lightboxItem: null, - editingItem: null, - baseUrl: config.service.url, - }), - components: {Lightbox, Table, Cards, Modal, EditItem }, - computed: mapState(['loadedItems', 'layout']), - methods: { - ...mapActions(['deleteItem','markItemReturned']), - openLightboxModalWith(item) { // Opens the editing modal with a copy of the selected item. - this.lightboxItem = { ...item }; - }, - closeLightboxModal() { // Closes the editing modal and discards the edited copy of the item. - this.lightboxItem = null; - }, - openEditingModalWith(item) { - this.editingItem = item; - }, - closeEditingModal() { - this.editingItem = null; - }, - saveEditingItem() { // Saves the edited copy of the item. - this.$store.dispatch('updateItem', this.editingItem); - this.closeEditingModal(); + name: 'Items', + data: () => ({ + lightboxItem: null, + editingItem: null, + baseUrl: config.service.url, + }), + components: {Lightbox, Table, Cards, Modal, EditItem}, + computed: mapState(['loadedItems', 'layout']), + methods: { + ...mapActions(['deleteItem', 'markItemReturned']), + openLightboxModalWith(item) { // Opens the editing modal with a copy of the selected item. + this.lightboxItem = {...item}; + }, + closeLightboxModal() { // Closes the editing modal and discards the edited copy of the item. + this.lightboxItem = null; + }, + openEditingModalWith(item) { + this.editingItem = item; + }, + closeEditingModal() { + this.editingItem = null; + }, + saveEditingItem() { // Saves the edited copy of the item. + this.$store.dispatch('updateItem', this.editingItem); + this.closeEditingModal(); + } } - } };