Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
3e0aa296
Commit
3e0aa296
authored
Mar 24, 2024
by
Timothy J. Baek
Browse files
refac: transition
parent
df21a925
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
3 deletions
+11
-3
src/lib/components/common/Dropdown.svelte
src/lib/components/common/Dropdown.svelte
+3
-0
src/lib/components/common/Modal.svelte
src/lib/components/common/Modal.svelte
+4
-2
src/lib/components/layout/Sidebar.svelte
src/lib/components/layout/Sidebar.svelte
+2
-1
src/lib/components/layout/Sidebar/ChatMenu.svelte
src/lib/components/layout/Sidebar/ChatMenu.svelte
+2
-0
No files found.
src/lib/components/common/Dropdown.svelte
View file @
3e0aa296
...
...
@@ -2,6 +2,8 @@
import { DropdownMenu } from 'bits-ui';
import { createEventDispatcher } from 'svelte';
import { flyAndScale } from '$lib/utils/transitions';
const dispatch = createEventDispatcher();
</script>
...
...
@@ -20,6 +22,7 @@
sideOffset={8}
side="bottom"
align="start"
transition={flyAndScale}
>
<DropdownMenu.Item class="flex items-center px-3 py-2 text-sm font-medium">
<div class="flex items-center">Profile</div>
...
...
src/lib/components/common/Modal.svelte
View file @
3e0aa296
...
...
@@ -2,6 +2,8 @@
import { onMount } from 'svelte';
import { fade } from 'svelte/transition';
import { flyAndScale } from '$lib/utils/transitions';
export let show = true;
export let size = 'md';
...
...
@@ -41,10 +43,10 @@
}}
>
<div
class="
modal-content
m-auto rounded-2xl max-w-full {sizeToWidth(
class=" m-auto rounded-2xl max-w-full {sizeToWidth(
size
)} mx-2 bg-gray-50 dark:bg-gray-900 shadow-3xl"
in:f
ade={{ duration: 10 }}
in:f
lyAndScale
on:click={(e) => {
e.stopPropagation();
}}
...
...
src/lib/components/layout/Sidebar.svelte
View file @
3e0aa296
...
...
@@ -25,6 +25,7 @@
import Tooltip from '../common/Tooltip.svelte';
import Dropdown from '../common/Dropdown.svelte';
import ChatMenu from './Sidebar/ChatMenu.svelte';
import { flyAndScale } from '$lib/utils/transitions';
let show = false;
let navElement;
...
...
@@ -577,7 +578,7 @@
<div
id="dropdownDots"
class="absolute z-40 bottom-[70px] 4.5rem rounded-xl shadow w-[240px] bg-white dark:bg-gray-900"
in:
slide={{ duration: 150
}}
in:
flyAndScale={{ y: 5
}}
>
<div class="py-2 w-full">
{#if $user.role === 'admin'}
...
...
src/lib/components/layout/Sidebar/ChatMenu.svelte
View file @
3e0aa296
<script lang="ts">
import { DropdownMenu } from 'bits-ui';
import { flyAndScale } from '$lib/utils/transitions';
import Dropdown from '$lib/components/common/Dropdown.svelte';
import GarbageBin from '$lib/components/icons/GarbageBin.svelte';
...
...
@@ -29,6 +30,7 @@
sideOffset={-2}
side="bottom"
align="start"
transition={flyAndScale}
>
<DropdownMenu.Item
class="flex gap-2 items-center px-3 py-2 text-sm font-medium cursor-pointer"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment