apply transitions to sidebars on large viewports

This commit is contained in:
hippoz 2022-08-28 16:02:51 +03:00
parent fc8d81753e
commit 537036e8bb
Signed by: hippoz
GPG key ID: 7C52899193467641
2 changed files with 4 additions and 4 deletions

View file

@ -1,7 +1,7 @@
<script>
import { ArrowLeftIcon, AtSignIcon } from "svelte-feather-icons";
import { quadInOut } from "svelte/easing";
import { maybeFly } from "../animations";
import { maybeFly, maybeFlyIf } from "../animations";
import { presenceStore, showChannelView, showPresenceSidebar, smallViewport } from "../stores";
let pendingExit = false;
@ -11,7 +11,7 @@
};
</script>
<div class="sidebar-container" in:maybeFly="{{ duration: 175, easing: quadInOut, x: 10 }}">
<div class="sidebar-container" in:maybeFly="{{ duration: 175, easing: quadInOut, x: 10 }}" out:maybeFlyIf="{{ _condition: !smallViewport.value, duration: 175, easing: quadInOut, x: -10 }}">
<div class="top-bar">
<span class="input-label">User List</span>
</div>

View file

@ -1,7 +1,7 @@
<script>
import { HashIcon, PlusIcon, MoreVerticalIcon, SettingsIcon, CloudIcon } from "svelte-feather-icons";
import { quadInOut } from "svelte/easing";
import { maybeFly } from "../animations";
import { maybeFly, maybeFlyIf } from "../animations";
import { channels, gatewayStatus, overlayStore, selectedChannel, showChannelView, showSidebar, smallViewport, userInfoStore } from "../stores";
import UserTopBar from "./UserTopBar.svelte";
@ -14,7 +14,7 @@
}
</script>
<div class="sidebar-container" in:maybeFly="{{ duration: 175, easing: quadInOut, x: -10 }}">
<div class="sidebar-container" in:maybeFly="{{ duration: 175, easing: quadInOut, x: -10 }}" out:maybeFlyIf="{{ _condition: !smallViewport.value, duration: 175, easing: quadInOut, x: -10 }}">
<UserTopBar />
<div class="sidebar">
{#each $channels as channel (channel.id)}