mirror of
https://github.com/seriousm4x/UpSnap.git
synced 2026-08-01 09:58:42 -04:00
add page transitions
This commit is contained in:
10
frontend/src/lib/components/Transition.svelte
Normal file
10
frontend/src/lib/components/Transition.svelte
Normal file
@@ -0,0 +1,10 @@
|
||||
<script lang="ts">
|
||||
import { fly } from 'svelte/transition';
|
||||
export let url: URL;
|
||||
</script>
|
||||
|
||||
{#key url}
|
||||
<div in:fly={{ y: 50, duration: 300 }}>
|
||||
<slot />
|
||||
</div>
|
||||
{/key}
|
||||
@@ -6,6 +6,7 @@
|
||||
import { pocketbase, backendUrl, devices } from '$lib/stores/pocketbase';
|
||||
import { settingsPub } from '$lib/stores/settings';
|
||||
import Navbar from '$lib/components/Navbar.svelte';
|
||||
import Transition from '$lib/components/Transition.svelte';
|
||||
import type { Device } from '$lib/types/device';
|
||||
|
||||
onMount(async () => {
|
||||
@@ -68,6 +69,8 @@
|
||||
<Navbar />
|
||||
{/if}
|
||||
|
||||
<div class="container mx-auto p-2">
|
||||
<slot />
|
||||
</div>
|
||||
<Transition url={$page.url}>
|
||||
<div class="container mx-auto p-2 mb-4">
|
||||
<slot />
|
||||
</div>
|
||||
</Transition>
|
||||
|
||||
@@ -280,15 +280,15 @@
|
||||
linux or
|
||||
<span class="badge">curl</span> in general to make web requests.
|
||||
</p>
|
||||
<p class="my-2 font-bold">Example:</p>
|
||||
<div class="alert text-sm bg-base-100 text-start">
|
||||
<p class="my-2 font-bold">Examples:</p>
|
||||
<div class="alert text-sm bg-base-100 text-start w-fit">
|
||||
<div>
|
||||
<span class="font-bold">Shutdown remote windows machine:</span>
|
||||
<pre
|
||||
class="break-words whitespace-pre-wrap">net rpc shutdown -I 192.168.1.13 -U "user%password"</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="alert text-sm my-2 bg-base-100 text-start">
|
||||
<div class="alert text-sm my-2 bg-base-100 text-start w-fit">
|
||||
<div>
|
||||
<span class="font-bold">Shutdown remote linux machine:</span>
|
||||
<pre
|
||||
|
||||
Reference in New Issue
Block a user