Skip to content

Commit e4f9ea7

Browse files
committed
Version 1.0.7
- Fix minor UI sizing - Add skeleton to service details - Add Ctrl K to start filtering - Fix logon col format
1 parent 425a7f6 commit e4f9ea7

File tree

5 files changed

+6797
-6731
lines changed

5 files changed

+6797
-6731
lines changed

q-manui/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "q-manui",
3-
"version": "1.0.6",
4-
"description": "DenoMan 1.0.6",
3+
"version": "1.0.7",
4+
"description": "DenoMan 1.0.7",
55
"productName": "DenoMan",
66
"author": "Sameh Fakoua <s.fakoua@gmail.com>",
77
"private": true,

q-manui/src/components/ServerComponent.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ div.s-left {
9191
div.s-right {
9292
overflow: hidden;
9393
width: calc(100vw - 70px);
94-
height: calc(100vh - 100px);
94+
height: calc(100vh - 90px);
9595
border-left: 1px solid rgba(0, 0, 0, 0.12);
9696
}
9797
.dialog-title {

q-manui/src/components/ServiceDetailsComponent.vue

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@
44
<div v-if="!service" class="text-weight-bold text-primary mb-12">
55
Select a service
66
</div>
7+
<div v-if="!service">
8+
<q-skeleton
9+
type="QBtn"
10+
animation="none"
11+
style="width: 76px; height: 28px"
12+
/>
13+
<q-skeleton type="text" animation="none" width="75%" />
14+
<q-skeleton type="text" animation="none" />
15+
<br />
16+
<q-skeleton type="text" animation="none" width="65%" />
17+
<q-skeleton type="rect" animation="none" height="40px" />
18+
</div>
719
<div v-if="service">
820
<div class="text-weight-bold text-primary mb-12">
921
{{ service.caption }}
@@ -95,7 +107,7 @@
95107
<div v-if="isLoading">
96108
<q-spinner-ball color="primary" size="2em" />
97109
</div>
98-
<div v-if="!isLoading">
110+
<div v-if="!isLoading" class="sub-fotter">
99111
<div class="text-weight-bold">{{ data.csName }}</div>
100112
<div class="mb-12 div-windows">
101113
{{ data.caption }} ({{ data.osArchitecture }})
@@ -114,7 +126,8 @@
114126
}
115127
.container {
116128
padding: 16px;
117-
height: 88vh;
129+
height: calc(100vh - 90px);
130+
border-top: 1px solid rgba(0, 0, 0, 0.12);
118131
}
119132
.mb-12 {
120133
margin-bottom: 12px;
@@ -124,10 +137,14 @@
124137
}
125138
.footer {
126139
overflow: auto;
127-
height: 140px;
140+
height: 160px;
128141
position: absolute;
129142
bottom: 0;
130143
}
144+
.sub-fotter {
145+
overflow: auto;
146+
height: 120px;
147+
}
131148
.div-system {
132149
border-bottom: 2px solid #1976d2;
133150
color: #1976d2;

q-manui/src/components/ServicesListComponent.vue

Lines changed: 51 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<template>
22
<q-table
33
bordered
4+
square
45
:rows="data"
56
:columns="columns"
67
color="primary"
@@ -85,14 +86,36 @@
8586
</template>
8687
<template v-slot:top-right>
8788
<q-input
89+
ref="filterInput"
8890
borderless
8991
dense
90-
debounce="300"
92+
filled
93+
clearable
9194
v-model="filter"
92-
placeholder="Search"
95+
placeholder="Search Services"
96+
style="width: 300px"
97+
input-style="width: 100%;"
98+
@focus="
99+
() => {
100+
filterFocused = true;
101+
}
102+
"
103+
@blur="
104+
() => {
105+
filterFocused = false;
106+
}
107+
"
93108
>
94109
<template v-slot:append>
95-
<q-icon name="search" />
110+
<q-chip
111+
outline
112+
square
113+
color="grey-14"
114+
text-color="white"
115+
label="Ctrl+K"
116+
v-if="!filterFocused"
117+
/>
118+
<q-icon name="search" v-if="filterFocused" />
96119
</template>
97120
</q-input>
98121
</template>
@@ -147,8 +170,8 @@
147170
transition: transform 0.28s, background-color 0.28s;
148171
}
149172
.my-sticky-header-table {
150-
height: 88vh;
151-
width: calc(100vw - 354px);
173+
height: calc(100vh - 94px);
174+
width: 100%;
152175
}
153176
.my-sticky-header-table .q-table__top,
154177
.my-sticky-header-table .q-table__bottom,
@@ -177,7 +200,7 @@
177200
</style>
178201

179202
<script lang="ts">
180-
import { PropType, defineComponent, onMounted, ref } from 'vue';
203+
import { PropType, defineComponent, onMounted, onUnmounted, ref } from 'vue';
181204
182205
import * as serviceApi from './service-api';
183206
import { ControlAction, ServiceModel, WinRMPayload } from './models';
@@ -228,6 +251,9 @@ const columns: QTableColumn[] = [
228251
field: 'startName',
229252
sortable: true,
230253
align: 'left',
254+
format: (val: string) => {
255+
return val.replaceAll('|', '\\');
256+
},
231257
},
232258
{
233259
name: 'description',
@@ -291,6 +317,8 @@ export default defineComponent({
291317
const showSystemDriver = ref(false);
292318
const disabledControls = ref<boolean[]>([true, true, true, true, true]);
293319
const selected = ref([] as ServiceModel[]);
320+
const filterInput = ref(null);
321+
const filterFocused = ref(false);
294322
const $q = useQuasar();
295323
296324
const loadServices = async () => {
@@ -313,7 +341,17 @@ export default defineComponent({
313341
disabledControls.value[4] = service.state !== 'Running';
314342
};
315343
344+
const captureCtrlK = (e: KeyboardEvent) => {
345+
if (e.ctrlKey && e.key === 'k') {
346+
e.preventDefault();
347+
if (filterInput.value) {
348+
(filterInput.value as HTMLElement).focus();
349+
}
350+
}
351+
};
352+
316353
onMounted(async () => {
354+
document.addEventListener('keydown', captureCtrlK);
317355
await loadServices();
318356
isLoading.value = false;
319357
@@ -334,6 +372,11 @@ export default defineComponent({
334372
});
335373
});
336374
375+
onUnmounted(() => {
376+
document.removeEventListener('keydown', captureCtrlK);
377+
bus.off('controlService');
378+
});
379+
337380
return {
338381
columns,
339382
data,
@@ -346,6 +389,8 @@ export default defineComponent({
346389
services,
347390
showSystemDriver,
348391
disabledControls,
392+
filterInput,
393+
filterFocused,
349394
setDisabledControls,
350395
};
351396
},

0 commit comments

Comments
 (0)