fix: WinRM update panel no longer blocks SAC navigation (0.20.21)
This commit is contained in:
@@ -1,16 +1,31 @@
|
||||
<template>
|
||||
<div v-if="open" class="modal-backdrop" @click.self="onBackdropClick">
|
||||
<div class="modal-card host-action-log-modal" role="dialog" aria-modal="true">
|
||||
<h3>{{ title }}</h3>
|
||||
<div v-if="open" class="host-action-log-dock" aria-live="polite">
|
||||
<div class="host-action-log-panel" role="dialog" :aria-label="title">
|
||||
<div class="host-action-log-header">
|
||||
<h3>{{ title }}</h3>
|
||||
<button
|
||||
type="button"
|
||||
class="host-action-log-icon-btn"
|
||||
:title="loading ? 'Свернуть — обновление продолжится на сервере' : 'Закрыть'"
|
||||
:aria-label="loading ? 'Свернуть' : 'Закрыть'"
|
||||
@click="emit('close')"
|
||||
>
|
||||
×
|
||||
</button>
|
||||
</div>
|
||||
<p v-if="loading" class="host-action-log-status">
|
||||
<span class="host-action-log-spinner" aria-hidden="true" />
|
||||
Выполняется на удалённом хосте… Это может занять несколько минут.
|
||||
Выполняется на удалённом хосте… Можно перейти в другой раздел SAC.
|
||||
</p>
|
||||
<p v-if="message" :class="messageClass">{{ message }}</p>
|
||||
<p v-if="message && !loading" :class="messageClass">{{ message }}</p>
|
||||
<p v-else-if="message && loading" class="muted host-action-log-sub">{{ message }}</p>
|
||||
<pre v-if="output" class="host-action-log-output">{{ output }}</pre>
|
||||
<div class="modal-actions">
|
||||
<button type="button" class="secondary" :disabled="loading" @click="emit('close')">
|
||||
{{ loading ? "Выполняется…" : "Закрыть" }}
|
||||
<div class="host-action-log-actions">
|
||||
<button v-if="loading" type="button" class="secondary" @click="emit('close')">
|
||||
Свернуть
|
||||
</button>
|
||||
<button v-else type="button" class="secondary" @click="emit('close')">
|
||||
Закрыть
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -37,46 +52,79 @@ const messageClass = computed(() => {
|
||||
if (props.loading || props.ok == null) return "muted";
|
||||
return props.ok ? "success" : "error";
|
||||
});
|
||||
|
||||
function onBackdropClick() {
|
||||
if (!props.loading) emit("close");
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.modal-backdrop {
|
||||
.host-action-log-dock {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: rgba(0, 0, 0, 0.55);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
right: 1rem;
|
||||
bottom: 1rem;
|
||||
z-index: 1000;
|
||||
padding: 1rem;
|
||||
max-width: min(28rem, calc(100vw - 2rem));
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.modal-card {
|
||||
.host-action-log-panel {
|
||||
pointer-events: auto;
|
||||
background: var(--card-bg, #1e2430);
|
||||
border: 1px solid var(--border, #3a4556);
|
||||
border-radius: 8px;
|
||||
max-width: 820px;
|
||||
width: 100%;
|
||||
max-height: 85vh;
|
||||
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
|
||||
max-height: min(70vh, 28rem);
|
||||
overflow: auto;
|
||||
padding: 1rem 1.25rem;
|
||||
padding: 0.85rem 1rem 1rem;
|
||||
}
|
||||
|
||||
.host-action-log-header {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.host-action-log-header h3 {
|
||||
margin: 0;
|
||||
font-size: 1rem;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.host-action-log-icon-btn {
|
||||
flex-shrink: 0;
|
||||
width: 1.75rem;
|
||||
height: 1.75rem;
|
||||
padding: 0;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
background: transparent;
|
||||
color: #9aa4b2;
|
||||
font-size: 1.25rem;
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.host-action-log-icon-btn:hover {
|
||||
background: rgba(255, 255, 255, 0.08);
|
||||
color: #e6edf3;
|
||||
}
|
||||
|
||||
.host-action-log-status {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
align-items: flex-start;
|
||||
gap: 0.65rem;
|
||||
margin: 0.75rem 0;
|
||||
margin: 0.65rem 0 0;
|
||||
color: #9aa4b2;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.host-action-log-sub {
|
||||
margin: 0.35rem 0 0;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.host-action-log-spinner {
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
margin-top: 0.15rem;
|
||||
border: 2px solid #3a4556;
|
||||
border-top-color: #58a6ff;
|
||||
border-radius: 50%;
|
||||
@@ -91,18 +139,18 @@ function onBackdropClick() {
|
||||
}
|
||||
|
||||
.host-action-log-output {
|
||||
margin-top: 0.75rem;
|
||||
max-height: 24rem;
|
||||
margin-top: 0.65rem;
|
||||
max-height: 12rem;
|
||||
overflow: auto;
|
||||
padding: 0.75rem;
|
||||
padding: 0.65rem;
|
||||
background: #0d1117;
|
||||
border-radius: 6px;
|
||||
font-size: 0.85rem;
|
||||
font-size: 0.8rem;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.modal-actions {
|
||||
margin-top: 1rem;
|
||||
.host-action-log-actions {
|
||||
margin-top: 0.75rem;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 0.5rem;
|
||||
|
||||
Reference in New Issue
Block a user