90 lines
2.1 KiB
Vue
90 lines
2.1 KiB
Vue
<script setup>
|
|
import ReleaseOperationTimeline from "@/components/release/ReleaseOperationTimeline.vue";
|
|
|
|
const emit = defineEmits(["close", "retry"]);
|
|
|
|
defineProps({
|
|
operation: {
|
|
type: Object,
|
|
default: null,
|
|
},
|
|
});
|
|
|
|
</script>
|
|
|
|
<template>
|
|
<div v-if="operation" class="release-operation-modal" role="dialog" aria-modal="true" data-testid="release-operation-modal">
|
|
<div class="release-operation-modal__backdrop" @click="emit('close')"></div>
|
|
<section class="release-operation-modal__panel">
|
|
<header>
|
|
<div>
|
|
<span class="release-operation-modal__eyebrow">{{ operation.operation_type || "operation" }}</span>
|
|
<h3>{{ operation.title || `Operation #${operation.id}` }}</h3>
|
|
<p>{{ operation.summary || "Operation is running." }}</p>
|
|
</div>
|
|
<button type="button" class="delete" aria-label="Close" @click="emit('close')"></button>
|
|
</header>
|
|
|
|
<ReleaseOperationTimeline :operation="operation" @retry="(step) => emit('retry', step)" />
|
|
</section>
|
|
</div>
|
|
</template>
|
|
|
|
<style scoped>
|
|
.release-operation-modal {
|
|
inset: 0;
|
|
position: fixed;
|
|
z-index: 60;
|
|
}
|
|
|
|
.release-operation-modal__backdrop {
|
|
background: rgba(15, 23, 42, 0.42);
|
|
inset: 0;
|
|
position: absolute;
|
|
}
|
|
|
|
.release-operation-modal__panel {
|
|
background: #ffffff;
|
|
border-radius: 8px;
|
|
box-shadow: 0 22px 70px rgba(15, 23, 42, 0.28);
|
|
display: grid;
|
|
gap: 1rem;
|
|
max-height: min(86vh, 780px);
|
|
max-width: min(920px, calc(100vw - 2rem));
|
|
overflow: auto;
|
|
padding: 1rem;
|
|
position: absolute;
|
|
right: 1rem;
|
|
top: 1rem;
|
|
width: 56rem;
|
|
}
|
|
|
|
.release-operation-modal__panel header {
|
|
align-items: start;
|
|
display: flex;
|
|
gap: 0.75rem;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.release-operation-modal__panel h3,
|
|
.release-operation-modal__panel p {
|
|
margin: 0;
|
|
}
|
|
|
|
.release-operation-modal__eyebrow {
|
|
color: #667085;
|
|
font-size: 0.76rem;
|
|
font-weight: 700;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.release-operation-modal__panel {
|
|
inset: 0.5rem;
|
|
max-height: calc(100vh - 1rem);
|
|
max-width: none;
|
|
width: auto;
|
|
}
|
|
}
|
|
</style>
|