2019-12-05 04:32:33 +01:00
|
|
|
<template>
|
|
|
|
<div class="container-fluid px-xl-5 mt-3">
|
|
|
|
<div class="row" v-if="layout === 'table'">
|
|
|
|
<div class="col-xl-8 offset-xl-2">
|
|
|
|
<Table
|
2019-12-13 00:06:22 +01:00
|
|
|
:columns="['uid', 'description', 'box']"
|
2019-12-05 04:32:33 +01:00
|
|
|
:items="loadedItems"
|
2019-12-13 00:06:22 +01:00
|
|
|
:keyName="'uid'"
|
2019-12-05 04:32:33 +01:00
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<Cards
|
|
|
|
v-if="layout === 'cards'"
|
2019-12-13 00:06:22 +01:00
|
|
|
:columns="['uid', 'description', 'box']"
|
2019-12-05 04:32:33 +01:00
|
|
|
:items="loadedItems"
|
2019-12-13 00:06:22 +01:00
|
|
|
:keyName="'uid'"
|
2019-12-05 04:32:33 +01:00
|
|
|
v-slot="{ item }"
|
|
|
|
>
|
|
|
|
<img
|
2019-12-05 20:10:43 +01:00
|
|
|
:src="`https://c3lf.de/api/1/thumbs/${item.file}`"
|
2019-12-05 04:32:33 +01:00
|
|
|
class="card-img-top img-fluid"
|
|
|
|
>
|
|
|
|
<div class="card-body">
|
2019-12-13 00:06:22 +01:00
|
|
|
<h6 class="card-title">{{ item.description }}</h6>
|
|
|
|
<h6 class="card-subtitle text-secondary">uid: {{ item.uid }} box: {{ item.box }}</h6>
|
2019-12-05 04:32:33 +01:00
|
|
|
</div>
|
|
|
|
</Cards>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import Table from '@/components/Table';
|
|
|
|
import Cards from '@/components/Cards';
|
|
|
|
import { mapState } from 'vuex';
|
2019-12-13 00:06:22 +01:00
|
|
|
|
2019-12-05 04:32:33 +01:00
|
|
|
export default {
|
|
|
|
name: 'Items',
|
|
|
|
components: { Table, Cards },
|
|
|
|
computed: mapState(['loadedItems', 'layout']),
|
2019-12-13 00:06:22 +01:00
|
|
|
methods: {
|
|
|
|
}
|
2019-12-05 04:32:33 +01:00
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
|
|
|
</style>
|