[UI] load apps fail warning
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<q-card :class="['domain-card', small ? 'small' : '', item.id == activeId ? 'default': '']">
|
<q-card :class="['domain-card', item.id == activeId ? 'default': '']">
|
||||||
<q-card-section :class="[small ? 'q-py-sm' : '']">
|
<q-card-section>
|
||||||
<div class="row no-wrap">
|
<div class="row no-wrap">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div :class="[small ? 'text-subtitle2' : 'text-h6', 'ellipsis']">{{ item.name }}</div>
|
<div class="text-h6 ellipsis">{{ item.name }}</div>
|
||||||
<div :class="[small ? 'text-caption' : 'text-subtitle2']">{{ item.url }}</div>
|
<div class="text-subtitle2">{{ item.url }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="!isOwnerFunc(item.owner.id)" class="col-auto">
|
<div v-if="!isOwnerFunc(item.owner.id)" class="col-auto">
|
||||||
<!-- <q-badge color="secondary" text-color="white" align="middle" class="q-mb-xs" label="他人の所有" /> -->
|
<!-- <q-badge color="secondary" text-color="white" align="middle" class="q-mb-xs" label="他人の所有" /> -->
|
||||||
@@ -41,7 +41,6 @@ import { useAuthStore } from 'stores/useAuthStore';
|
|||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
item: IDomainOwnerDisplay;
|
item: IDomainOwnerDisplay;
|
||||||
small: boolean;
|
|
||||||
activeId: number;
|
activeId: number;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
@@ -53,9 +52,6 @@ const isOwnerFunc = computed(() => (ownerId: string) => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.domain-card.small {
|
|
||||||
width: 18rem;
|
|
||||||
}
|
|
||||||
.domain-card.default {
|
.domain-card.default {
|
||||||
box-shadow: 0 6px 6px -3px rgba(0, 0, 0, 0.2),
|
box-shadow: 0 6px 6px -3px rgba(0, 0, 0, 0.2),
|
||||||
0 10px 14px 1px rgba(0, 0, 0, 0.14),
|
0 10px 14px 1px rgba(0, 0, 0, 0.14),
|
||||||
|
|||||||
@@ -74,6 +74,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, watch, reactive } from 'vue';
|
import { ref, onMounted, watch, reactive } from 'vue';
|
||||||
|
import { useQuasar } from 'quasar'
|
||||||
import { api } from 'boot/axios';
|
import { api } from 'boot/axios';
|
||||||
import { useAuthStore } from 'stores/useAuthStore';
|
import { useAuthStore } from 'stores/useAuthStore';
|
||||||
import { useFlowEditorStore } from 'stores/flowEditor';
|
import { useFlowEditorStore } from 'stores/flowEditor';
|
||||||
@@ -112,6 +113,7 @@ const filter = ref('');
|
|||||||
const rows = ref<IAppDisplay[]>([]);
|
const rows = ref<IAppDisplay[]>([]);
|
||||||
const rowIds = new Set<string>();
|
const rowIds = new Set<string>();
|
||||||
|
|
||||||
|
const $q = useQuasar()
|
||||||
const store = useFlowEditorStore();
|
const store = useFlowEditorStore();
|
||||||
const appDialog = ref();
|
const appDialog = ref();
|
||||||
const showSelectApp=ref(false);
|
const showSelectApp=ref(false);
|
||||||
@@ -120,12 +122,21 @@ const isAdding = ref(false);
|
|||||||
const getApps = async () => {
|
const getApps = async () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
rowIds.clear();
|
rowIds.clear();
|
||||||
const result = await api.get('api/apps');
|
try {
|
||||||
rows.value = result.data.data.map((item: IManagedApp) => {
|
const { data } = await api.get('api/apps');
|
||||||
rowIds.add(item.appid);
|
rows.value = data.data.map((item: IManagedApp) => {
|
||||||
return appToAppDisplay(item)
|
rowIds.add(item.appid);
|
||||||
}).sort((a: IAppDisplay, b: IAppDisplay) => a.sortId - b.sortId); // set default order
|
return appToAppDisplay(item)
|
||||||
loading.value = false;
|
}).sort((a: IAppDisplay, b: IAppDisplay) => a.sortId - b.sortId); // set default order
|
||||||
|
} catch (error) {
|
||||||
|
$q.notify({
|
||||||
|
icon: 'error',
|
||||||
|
color: 'negative',
|
||||||
|
message: 'アプリ一覧の読み込みに失敗しました'
|
||||||
|
});
|
||||||
|
} finally {
|
||||||
|
loading.value = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user