Skip to content

Commit

Permalink
fix(save & 'working on it'): look good on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
he3als committed Oct 31, 2024
1 parent 0a25411 commit 53502a9
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 24 deletions.
36 changes: 19 additions & 17 deletions apps/frontend/src/components/ui/servers/SaveBanner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,26 @@
<div
v-if="props.isVisible"
data-pyro-save-banner
class="fixed bottom-8 left-4 right-4 z-50 mx-auto h-fit w-full max-w-4xl rounded-2xl border-2 border-solid border-button-border bg-bg-raised p-4 transition-all duration-300"
class="fixed bottom-16 left-0 right-0 z-[6] mx-auto h-fit w-full max-w-4xl transition-all duration-300 sm:bottom-8"
>
<div class="flex flex-col items-center justify-between gap-2 md:flex-row">
<span class="font-bold text-contrast">Careful, you have unsaved changes!</span>
<div class="flex gap-2">
<ButtonStyled type="transparent" color="standard">
<button :disabled="props.isUpdating" @click="props.reset">Reset</button>
</ButtonStyled>
<ButtonStyled type="standard" :color="props.restart ? 'standard' : 'brand'">
<button :disabled="props.isUpdating" @click="props.save">
{{ props.isUpdating ? "Saving..." : "Save" }}
</button>
</ButtonStyled>
<ButtonStyled v-if="props.restart" type="standard" color="brand">
<button :disabled="props.isUpdating" @click="saveAndRestart">
{{ props.isUpdating ? "Saving..." : "Save & Restart" }}
</button>
</ButtonStyled>
<div class="mx-2 rounded-2xl border-2 border-solid border-button-border bg-bg-raised p-4">
<div class="flex flex-col items-center justify-between gap-2 md:flex-row">
<span class="font-bold text-contrast">Careful, you have unsaved changes!</span>
<div class="flex gap-2">
<ButtonStyled type="transparent" color="standard">
<button :disabled="props.isUpdating" @click="props.reset">Reset</button>
</ButtonStyled>
<ButtonStyled type="standard" :color="props.restart ? 'standard' : 'brand'">
<button :disabled="props.isUpdating" @click="props.save">
{{ props.isUpdating ? "Saving..." : "Save" }}
</button>
</ButtonStyled>
<ButtonStyled v-if="props.restart" type="standard" color="brand">
<button :disabled="props.isUpdating" @click="saveAndRestart">
{{ props.isUpdating ? "Saving..." : "Save & Restart" }}
</button>
</ButtonStyled>
</div>
</div>
</div>
</div>
Expand Down
18 changes: 11 additions & 7 deletions apps/frontend/src/pages/servers/manage/[id]/content/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,20 @@
<Transition name="sync-banner">
<div
v-if="status === 'pending'"
class="fixed bottom-16 left-2 z-50 mx-auto flex h-fit w-[96%] max-w-4xl flex-row items-center gap-4 rounded-2xl border-2 border-solid border-button-border bg-bg-raised p-2 transition-all duration-300 sm:bottom-8 sm:left-4 sm:right-4 sm:w-full sm:shadow-2xl"
class="fixed bottom-16 left-0 right-0 z-[6] mx-auto h-fit w-full max-w-4xl transition-all duration-300 sm:bottom-8"
>
<div
class="grid size-12 place-content-center overflow-hidden rounded-xl border-[1px] border-solid border-button-border bg-button-bg shadow-sm"
class="mx-2 flex flex-row items-center gap-4 rounded-2xl border-2 border-solid border-button-border bg-bg-raised p-2 transition-all duration-300 sm:shadow-2xl"
>
<UiServersIconsLoadingIcon class="size-6 animate-spin" />
</div>
<div class="flex flex-col gap-0.5">
<p class="m-0 text-sm font-bold text-contrast">Working on it...</p>
<p class="m-0 text-sm">We're making sure everything's 100% up to date.</p>
<div
class="grid size-12 place-content-center overflow-hidden rounded-xl border-[1px] border-solid border-button-border bg-button-bg shadow-sm"
>
<UiServersIconsLoadingIcon class="size-6 animate-spin" />
</div>
<div class="flex flex-col gap-0.5">
<p class="m-0 text-sm font-bold text-contrast">Working on it...</p>
<p class="m-0 text-sm">We're making sure everything's 100% up to date.</p>
</div>
</div>
</div>
</Transition>
Expand Down

0 comments on commit 53502a9

Please sign in to comment.