Skip to content

Commit 3595357

Browse files
authored
Merge pull request #6702 from frappe/mergify/bp/master/pr-6701
fix(deploy-ui): Make page responsive (backport #6701)
2 parents fa70e43 + e820725 commit 3595357

2 files changed

Lines changed: 18 additions & 18 deletions

File tree

dashboard/src/components/benches/pipeline/Details.vue

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ const fetchSetErrs = () => {
168168
169169
// pipeline.doc exists if cache exists
170170
// if cache exists then onSuccess wont run so fetch errs!
171-
if(pipeline?.doc?.status == 'Failure') fetchSetErrs()
171+
if (pipeline?.doc?.status == 'Failure') fetchSetErrs()
172172
173173
const wired = reactive(new Set<string>())
174174
const builds = ref<Record<string, any>>({})
@@ -385,7 +385,7 @@ const appVersions = () => {
385385
dc_name: deploy.name,
386386
group: deploy.group,
387387
status: deploy.status,
388-
isPipeline: !props.deployview,
388+
isPipeline: !props.deployview,
389389
}),
390390
)
391391
}
@@ -433,7 +433,7 @@ const stopBuild = () => {
433433
/>
434434

435435
<main
436-
class="flex flex-col gap-4 py-3 px-5 w-full h-[calc(100dvh-7rem)] mt-1.5"
436+
class="flex flex-col gap-4 p-3 md:px-5 w-full md:h-[calc(100dvh-7rem)] md:mt-1.5"
437437
v-else
438438
>
439439
<!-- header -->
@@ -483,30 +483,31 @@ const stopBuild = () => {
483483

484484
<!-- status cards -->
485485
<section
486-
class="grid grid-cols-4 gap-3 [&_b]:text-ink-gray-4 [&_b]:font-normal text-sm -mt-1"
486+
class="flex flex-wrap md:grid grid-cols-4 gap-3 [&_b]:text-ink-gray-4 [&_b]:font-normal text-sm -mt-1
487+
*:p-2 *:md:p-4 *:border"
487488
>
488-
<div class="flex flex-col gap-2 border p-4 rounded ">
489+
<div class="flex flex-col gap-2 rounded ">
489490
<b> Created by </b>
490491
<span class="text-ink-gray-9"
491492
>{{ deployview ? builds[activeBuildId]?.doc?.owner : pipeline?.doc?.owner }}
492493
</span>
493494
</div>
494495

495-
<div class="flex flex-col gap-2 border p-4 rounded">
496+
<div class="flex flex-col gap-2 rounded">
496497
<b> Start </b>
497498
<span>
498499
{{ date(deployview ? builds[activeBuildId]?.doc?.build_start : pipeline?.doc?.steps?.start) || '-' }}
499500
</span>
500501
</div>
501502

502-
<div class="flex flex-col gap-2 border p-4 rounded">
503+
<div class="flex flex-col gap-2 rounded">
503504
<b> End </b>
504505
<span>
505506
{{ date(deployview ? builds[activeBuildId]?.doc?.build_end : pipeline?.doc?.steps?.end) || '-' }}
506507
</span>
507508
</div>
508509

509-
<div class="flex flex-col gap-2 border p-4 rounded">
510+
<div class="flex flex-col gap-2 rounded">
510511
<b> Duration </b>
511512
<span>
512513
{{ deployview ? duration( builds[activeBuildId]?.doc?.build_duration) || '-' : secsToDuration(pipeline?.doc?.steps?.duration) || '-' }}
@@ -516,13 +517,13 @@ const stopBuild = () => {
516517

517518
<!-- deploy steps + output -->
518519
<div
519-
class="flex rounded border p-3 pt-1 flex-1 min-h-0"
520+
class="flex flex-col md:flex-row rounded border p-3 pt-1 flex-1 min-h-0"
520521
:class='output.opened? "": "!pr-0" '
521522
ref="stepsEl"
522523
>
523524
<Scrollbar
524-
class="px-0.5 pr-3 transition-all duration-300 shrink-0"
525-
:class="output.opened ? 'w-[30rem]' : 'w-full'"
525+
class="px-0.5 md:pr-3 transition-all duration-300 shrink-0"
526+
:class="output.opened ? 'md:w-[30rem]' : 'w-full'"
526527
>
527528
<Tabs
528529
class="w-full sticky top-0 z-10 bg-surface-white mb-2"

dashboard/src/components/benches/pipeline/Loader.vue

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<template>
2-
<div class="sk-fade flex flex-col gap-4 py-3 px-5 w-full mt-1.5">
2+
<div class="sk-fade flex flex-col gap-4 p-3 md:px-5 w-full md:mt-1.5">
33
<div class="flex gap-2 items-center">
44
<div class="sk size-7" />
55
<div class="sk h-7 w-44" />
66
<div class="sk h-7 w-16 mr-auto" />
7-
<div class="sk h-7 w-20" />
7+
<div class="sk h-7 w-20 hidden md:block" />
88
<div class="sk size-7" />
99
</div>
1010

11-
<section class="grid grid-cols-4 gap-3">
11+
<section class="grid grid-cols-2 md:grid-cols-4 gap-3">
1212
<div
1313
v-for="i in 4"
1414
:key="i"
@@ -20,10 +20,9 @@
2020
</section>
2121

2222
<div
23-
class="flex rounded border p-3 pt-0.5 gap-3 min-h-0"
24-
style="height: calc(100dvh - 18rem)"
23+
class="flex flex-col md:flex-row rounded border p-3 pt-0.5 gap-3 min-h-0 md:h-[calc(100dvh-18rem)]"
2524
>
26-
<div class="w-[30rem] shrink-0 flex flex-col py-3">
25+
<div class="w-full md:w-[30rem] shrink-0 flex flex-col py-3">
2726
<div class="flex gap-4 pb-3 mb-1 border-b">
2827
<div class="sk h-5 w-16" />
2928
<div class="sk h-5 w-16" />
@@ -48,7 +47,7 @@
4847
</div>
4948

5049
<div
51-
class="flex-1 bg-surface-gray-1 dark:bg-surface-cards rounded p-3 flex flex-col gap-3 mt-1"
50+
class="flex-1 bg-surface-gray-1 dark:bg-surface-cards rounded p-3 hidden md:flex flex-col gap-3 mt-1"
5251
>
5352
<div class="flex items-center gap-2 pb-2 border-b">
5453
<div class="sk h-4 w-12" />

0 commit comments

Comments
 (0)