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
d1885122
Unverified
Commit
d1885122
authored
Oct 21, 2023
by
AJ ONeal
Browse files
chore: npm run fmt
parent
2eea7643
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
62 deletions
+62
-62
postcss.config.js
postcss.config.js
+5
-5
src/lib/components/common/Overlay.svelte
src/lib/components/common/Overlay.svelte
+33
-33
src/lib/components/common/Spinner.svelte
src/lib/components/common/Spinner.svelte
+24
-24
No files found.
postcss.config.js
View file @
d1885122
export
default
{
export
default
{
plugins
:
{
plugins
:
{
tailwindcss
:
{},
tailwindcss
:
{},
autoprefixer
:
{}
,
autoprefixer
:
{}
},
}
}
}
;
src/lib/components/common/Overlay.svelte
View file @
d1885122
<script>
<script>
import Spinner from './Spinner.svelte';
import Spinner from './Spinner.svelte';
export let show = false;
export let show = false;
export let content = '';
export let content = '';
export let opacity = 1;
export let opacity = 1;
</script>
</script>
<div class="relative">
<div class="relative">
{#if show}
{#if show}
<div class="absolute w-full h-full flex">
<div class="absolute w-full h-full flex">
<div
<div
class="absolute rounded"
class="absolute rounded"
style="inset: -10px; opacity: {opacity}; backdrop-filter: blur(5px);"
style="inset: -10px; opacity: {opacity}; backdrop-filter: blur(5px);"
/>
/>
<div class="flex w-full flex-col justify-center">
<div class="flex w-full flex-col justify-center">
<div class=" py-3">
<div class=" py-3">
<Spinner className="ml-2" />
<Spinner className="ml-2" />
</div>
</div>
{#if content !== ''}
{#if content !== ''}
<div class="text-center text-gray-100 text-xs font-medium z-50">
<div class="text-center text-gray-100 text-xs font-medium z-50">
{content}
{content}
</div>
</div>
{/if}
{/if}
</div>
</div>
</div>
</div>
{/if}
{/if}
<slot />
<slot />
</div>
</div>
src/lib/components/common/Spinner.svelte
View file @
d1885122
<script lang="ts">
<script lang="ts">
export let className: string = 'text-white';
export let className: string = 'text-white';
export let theme: 'blue' | 'white' | 'black' = 'white';
export let theme: 'blue' | 'white' | 'black' = 'white';
</script>
</script>
<div class="flex justify-center text-center {className}">
<div class="flex justify-center text-center {className}">
<svg
<svg
class="animate-spin -ml-1 mr-3 h-5 w-5 {theme === 'blue'
class="animate-spin -ml-1 mr-3 h-5 w-5 {theme === 'blue'
? 'text-sky-600'
? 'text-sky-600'
: theme === 'white'
: theme === 'white'
? 'text-white'
? 'text-white'
: 'text-gray-600'} "
: 'text-gray-600'} "
xmlns="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
fill="none"
fill="none"
viewBox="0 0 24 24"
viewBox="0 0 24 24"
>
>
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4" />
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4" />
<path
<path
class="opacity-75"
class="opacity-75"
fill="currentColor"
fill="currentColor"
d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
/>
/>
</svg>
</svg>
</div>
</div>
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