Refactor layout components and remove unnecessary code
This commit is contained in:
@@ -27,8 +27,6 @@
|
|||||||
|
|
||||||
<template #list="slotProps">
|
<template #list="slotProps">
|
||||||
<div class="flex flex-col space-y-4 mt-2">
|
<div class="flex flex-col space-y-4 mt-2">
|
||||||
|
|
||||||
|
|
||||||
<div v-for="(item, index) in slotProps.items" :key="index">
|
<div v-for="(item, index) in slotProps.items" :key="index">
|
||||||
<div class="flex flex-col sm:flex-row sm:items-center p-6 gap-4 bg-white dark:bg-gray-800 rounded-lg shadow-md"
|
<div class="flex flex-col sm:flex-row sm:items-center p-6 gap-4 bg-white dark:bg-gray-800 rounded-lg shadow-md"
|
||||||
:class="{ 'border-t border-gray-200 dark:border-gray-700': index !== 0 }">
|
:class="{ 'border-t border-gray-200 dark:border-gray-700': index !== 0 }">
|
||||||
@@ -36,14 +34,14 @@
|
|||||||
<h3 class="text-lg font-medium text-gray-900 dark:text-gray-100">{{ item.name }}</h3>
|
<h3 class="text-lg font-medium text-gray-900 dark:text-gray-100">{{ item.name }}</h3>
|
||||||
<p class="text-sm font-medium text-gray-500 dark:text-gray-400 mt-2">{{ item.description }}</p>
|
<p class="text-sm font-medium text-gray-500 dark:text-gray-400 mt-2">{{ item.description }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-auto flex justify-end">
|
<div class="mt-auto flex justify-end">
|
||||||
|
|
||||||
<Button @click="executeScenario(item.id)" label="Load" class="flex-auto md:flex-initial text-white">
|
<Button @click="executeScenario(item.id)" label="Load" class="flex-auto md:flex-initial text-white">
|
||||||
<ChevronRightIcon class="w-5 h-10 text-white transition-transform transform hover:translate-x-1"/>
|
<ChevronRightIcon class="w-5 h-10 text-white transition-transform transform hover:translate-x-1"/>
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -57,7 +55,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="p-2 border-t border-gray-200 dark:border-gray-700 flex justify-end">
|
<div class="p-2 border-t border-gray-200 dark:border-gray-700 flex justify-end">
|
||||||
<Button @click="executeScenario(item.id)" size="small" label="Load" class="flex-auto md:flex-initial text-white">
|
<Button @click="executeScenario(item.id)" size="small" label="Load" class="flex-auto md:flex-initial text-white">
|
||||||
<ChevronRightIcon class="w-6 h-5 text-white transition-transform transform hover:translate-x-1"/>
|
<ChevronRightIcon class="w-6 h-5 text-white transition-transform transform hover:translate-x-1"/>
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -69,18 +67,15 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ChevronRightIcon } from '@heroicons/vue/24/solid';
|
import { ChevronRightIcon } from '@heroicons/vue/24/solid';
|
||||||
import DataView from 'primevue/dataview';
|
import DataView from 'primevue/dataview';
|
||||||
import { onMounted, ref } from 'vue';
|
import { onMounted, ref } from 'vue';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import { LoadingStore } from '../../stores/LoadingStore.js';
|
|
||||||
import { ScenarioStore } from '../../stores/ScenarioStore.js';
|
import { ScenarioStore } from '../../stores/ScenarioStore.js';
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const layout = ref('grid');
|
const layout = ref('grid');
|
||||||
const options = ref(['list', 'grid']);
|
const options = ref(['list', 'grid']);
|
||||||
const loading = ref(true)
|
|
||||||
const loadingStore = LoadingStore()
|
|
||||||
|
|
||||||
const scenario_store = ScenarioStore();
|
const scenario_store = ScenarioStore();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user