added bools for actionbar rendering

This commit is contained in:
2024-03-12 20:36:26 +01:00
parent 7af5c0ce0d
commit 3613565b39
8 changed files with 475 additions and 117 deletions

View File

@ -1,15 +1,40 @@
<template>
<section :class="['asset-search', darkMode ? 'section-darkmode' : 'section-lightmode']">
<div :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Asset:</div>
<pre :class="['data', darkMode ? 'pre-darkmode' : 'pre-lightmode']">Asset name</pre>
<pre :class="['data', darkMode ? 'pre-darkmode' : 'pre-lightmode']">{{ asset.assetName }}</pre>
</section>
</template>
<script setup>
import { ref } from 'vue';
import { ref, onMounted } from 'vue';
import Axios from '../axios.config.js';
import clientsideConfig from '../../clientsideConfig.js';
import { useStore } from 'vuex';
import { computed } from 'vue';
const store = useStore();
const chosenAssetId = computed(() => store.state.chosenAssetId);
const asset = ref({});
const darkMode = ref(true)
// get config item from id
const getItemById = async () => {
try {
const response = await Axios.get(
`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getConfigItem/${chosenAssetId.value}`
);
asset.value = response.data;
} catch (err) {
console.log(err.response.statusText);
}
}
onMounted(() => {
getItemById();
});
</script>
<script>