mirror of
https://github.com/misskey-dev/misskey.git
synced 2025-04-21 16:42:41 +09:00

Some checks are pending
Check SPDX-License-Identifier / check-spdx-license-id (push) Waiting to run
Check copyright year / check_copyright_year (push) Waiting to run
Publish Docker image (develop) / Build (linux/amd64) (push) Waiting to run
Publish Docker image (develop) / Build (linux/arm64) (push) Waiting to run
Publish Docker image (develop) / merge (push) Blocked by required conditions
Dockle / dockle (push) Waiting to run
Lint / lint (misskey-reversi) (push) Blocked by required conditions
Lint / lint (sw) (push) Blocked by required conditions
Lint / typecheck (backend) (push) Blocked by required conditions
Lint / typecheck (misskey-js) (push) Blocked by required conditions
Lint / typecheck (sw) (push) Blocked by required conditions
Lint / pnpm_install (push) Waiting to run
Lint / lint (backend) (push) Blocked by required conditions
Lint / lint (frontend) (push) Blocked by required conditions
Lint / lint (frontend-embed) (push) Blocked by required conditions
Lint / lint (frontend-shared) (push) Blocked by required conditions
Lint / lint (misskey-bubble-game) (push) Blocked by required conditions
Storybook / build (push) Waiting to run
Test (frontend) / Unit tests (frontend) (22.11.0) (push) Waiting to run
Lint / lint (misskey-js) (push) Blocked by required conditions
Test (frontend) / E2E tests (frontend) (chrome, 22.11.0) (push) Waiting to run
Test (production install and build) / Production build (22.11.0) (push) Waiting to run
81 lines
2.1 KiB
Vue
81 lines
2.1 KiB
Vue
<!--
|
|
SPDX-FileCopyrightText: syuilo and misskey-project
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
-->
|
|
|
|
<template>
|
|
<MkFolder>
|
|
<template #label>{{ entity.name || entity.url }}</template>
|
|
<template v-if="entity.name != null && entity.name != ''" #caption>{{ entity.url }}</template>
|
|
<template #icon>
|
|
<i v-if="!entity.isActive" class="ti ti-player-pause"/>
|
|
<i v-else-if="entity.latestStatus === null" class="ti ti-circle"/>
|
|
<i
|
|
v-else-if="[200, 201, 204].includes(entity.latestStatus)"
|
|
class="ti ti-check"
|
|
:style="{ color: 'var(--MI_THEME-success)' }"
|
|
/>
|
|
<i v-else class="ti ti-alert-triangle" :style="{ color: 'var(--MI_THEME-error)' }"/>
|
|
</template>
|
|
<template #suffix>
|
|
<MkTime v-if="entity.latestSentAt" :time="entity.latestSentAt" style="margin-right: 8px"/>
|
|
<span v-else>-</span>
|
|
</template>
|
|
<template #footer>
|
|
<div class="_buttons">
|
|
<MkButton @click="onEditClick">
|
|
<i class="ti ti-settings"></i> {{ i18n.ts.edit }}
|
|
</MkButton>
|
|
<MkButton danger @click="onDeleteClick">
|
|
<i class="ti ti-trash"></i> {{ i18n.ts.delete }}
|
|
</MkButton>
|
|
</div>
|
|
</template>
|
|
|
|
<div class="_gaps">
|
|
<MkKeyValue>
|
|
<template #key>latestStatus</template>
|
|
<template #value>{{ entity.latestStatus ?? '-' }}</template>
|
|
</MkKeyValue>
|
|
</div>
|
|
</MkFolder>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { entities } from 'misskey-js';
|
|
import { toRefs } from 'vue';
|
|
import MkFolder from '@/components/MkFolder.vue';
|
|
import { i18n } from '@/i18n.js';
|
|
import MkButton from '@/components/MkButton.vue';
|
|
import MkKeyValue from '@/components/MkKeyValue.vue';
|
|
|
|
const emit = defineEmits<{
|
|
(ev: 'edit', value: entities.SystemWebhook): void;
|
|
(ev: 'delete', value: entities.SystemWebhook): void;
|
|
}>();
|
|
|
|
const props = defineProps<{
|
|
entity: entities.SystemWebhook;
|
|
}>();
|
|
|
|
const { entity } = toRefs(props);
|
|
|
|
function onEditClick() {
|
|
emit('edit', entity.value);
|
|
}
|
|
|
|
function onDeleteClick() {
|
|
emit('delete', entity.value);
|
|
}
|
|
|
|
</script>
|
|
|
|
<style module lang="scss">
|
|
.icon {
|
|
margin-right: 0.75em;
|
|
flex-shrink: 0;
|
|
text-align: center;
|
|
color: color(from var(--MI_THEME-fg) srgb r g b / 0.75);
|
|
}
|
|
</style>
|