/
githubmirror
/
halo
Обзор
Документация
Войти
/
githubmirror
/
halo
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
ui/console-src/modules/system/plugins/components/PluginConditionsModal.vue
93 строки
3 KB
Ryan Wang
Rename `@halo-dev/console-shared` to `@halo-dev/ui-shared` (#7926)
10 ноя 2025, 19:20
Не верифицирован
10 ноя 2025, 19:20
ac88ee7
Код
Авторство
О чём код?
<script lang="ts" setup> import type { Plugin } from "@halo-dev/api-client"; import { VButton, VModal } from "@halo-dev/components"; import { utils } from "@halo-dev/ui-shared"; import { ref } from "vue"; withDefaults(defineProps<{ plugin: Plugin }>(), {}); const emit = defineEmits<{ (event: "close"): void; }>(); const modal = ref(); </script> <template> <VModal ref="modal" :body-class="['!p-0']" :title="$t('core.plugin.conditions_modal.title')" :width="900" layer-closable @close="emit('close')" > <table class="min-w-full divide-y divide-gray-100"> <thead class="bg-gray-50"> <tr> <th class="px-4 py-3 text-left text-sm font-semibold text-gray-900 sm:w-96" scope="col" > {{ $t("core.plugin.conditions_modal.fields.type") }} </th> <th scope="col" class="px-4 py-3 text-left text-sm font-semibold text-gray-900" > {{ $t("core.plugin.conditions_modal.fields.status") }} </th> <th scope="col" class="px-4 py-3 text-left text-sm font-semibold text-gray-900" > {{ $t("core.plugin.conditions_modal.fields.reason") }} </th> <th scope="col" class="px-4 py-3 text-left text-sm font-semibold text-gray-900" > {{ $t("core.plugin.conditions_modal.fields.message") }} </th> <th scope="col" class="px-4 py-3 text-left text-sm font-semibold text-gray-900" > {{ $t("core.plugin.conditions_modal.fields.last_transition_time") }} </th> </tr> </thead> <tbody class="divide-y divide-gray-100 bg-white"> <tr v-for="(condition, index) in plugin?.status?.conditions" :key="index" > <td class="whitespace-nowrap px-4 py-3 text-sm text-gray-900"> {{ condition.type }} </td> <td class="whitespace-nowrap px-4 py-3 text-sm text-gray-500"> {{ condition.status }} </td> <td class="whitespace-nowrap px-4 py-3 text-sm text-gray-500"> {{ condition.reason || "-" }} </td> <td class="whitespace-nowrap px-4 py-3 text-sm text-gray-500"> <pre>{{ condition.message || "-" }}</pre> </td> <td v-tooltip="utils.date.format(condition.lastTransitionTime)" class="whitespace-nowrap px-4 py-3 text-sm text-gray-500" > {{ utils.date.timeAgo(condition.lastTransitionTime) }} </td> </tr> </tbody> </table> <template #footer> <VButton @click="modal.close()"> {{ $t("core.common.buttons.close") }} </VButton> </template> </VModal> </template>