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
fb516ea6
Commit
fb516ea6
authored
Apr 02, 2024
by
Timothy J. Baek
Browse files
refac: styling
parent
b35cc36e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
115 additions
and
83 deletions
+115
-83
src/lib/components/chat/Settings/Account.svelte
src/lib/components/chat/Settings/Account.svelte
+100
-83
src/lib/components/icons/Plus.svelte
src/lib/components/icons/Plus.svelte
+15
-0
No files found.
src/lib/components/chat/Settings/Account.svelte
View file @
fb516ea6
...
...
@@ -8,6 +8,8 @@
import UpdatePassword from './Account/UpdatePassword.svelte';
import { getGravatarUrl } from '$lib/apis/utils';
import { copyToClipboard } from '$lib/utils';
import Plus from '$lib/components/icons/Plus.svelte';
import Tooltip from '$lib/components/common/Tooltip.svelte';
const i18n = getContext('i18n');
...
...
@@ -199,14 +201,14 @@
<div class="flex mt-2">
<div class="flex w-full">
<input
class="w-full rounded-l-lg py-1.5 pl-4 text-sm dark:text-gray-300 dark:bg-gray-800 outline-none"
class="w-full rounded-l-lg py-1.5 pl-4 text-sm
bg-white
dark:text-gray-300 dark:bg-gray-800 outline-none"
type={showJWTToken ? 'text' : 'password'}
value={localStorage.token}
disabled
/>
<button
class="px-2 transition rounded-r-lg dark:bg-gray-800"
class="px-2 transition rounded-r-lg
bg-white
dark:bg-gray-800"
on:click={() => {
showJWTToken = !showJWTToken;
}}
...
...
@@ -246,7 +248,7 @@
</div>
<button
class="ml-1.5 px-1.5 py-1 hover:bg-gray-800 transition rounded-lg"
class="ml-1.5 px-1.5 py-1
dark:
hover:bg-gray-800 transition rounded-lg"
on:click={() => {
copyToClipboard(localStorage.token);
JWTTokenCopied = true;
...
...
@@ -296,16 +298,17 @@
</div>
<div class="flex mt-2">
{#if APIKey}
<div class="flex w-full">
<input
class="w-full rounded-l-lg py-1.5 pl-4 text-sm dark:text-gray-300 dark:bg-gray-800 outline-none"
class="w-full rounded-l-lg py-1.5 pl-4 text-sm
bg-white
dark:text-gray-300 dark:bg-gray-800 outline-none"
type={showAPIKey ? 'text' : 'password'}
value={APIKey}
disabled
/>
<button
class="px-2 transition rounded-r-lg dark:bg-gray-800"
class="px-2 transition rounded-r-lg
bg-white
dark:bg-gray-800"
on:click={() => {
showAPIKey = !showAPIKey;
}}
...
...
@@ -345,7 +348,7 @@
</div>
<button
class="ml-1.5 px-1.5 py-1 hover:bg-gray-800 transition rounded-lg"
class="ml-1.5 px-1.5 py-1
dark:
hover:bg-gray-800 transition rounded-lg"
on:click={() => {
copyToClipboard(APIKey);
APIKeyCopied = true;
...
...
@@ -388,8 +391,9 @@
{/if}
</button>
<Tooltip content="Create new key">
<button
class=" px-1.5 py-1 hover:bg-gray-800
transition rounded-lg"
class=" px-1.5 py-1
dark:
hover:bg-gray-800transition rounded-lg"
on:click={() => {
createAPIKeyHandler();
}}
...
...
@@ -409,6 +413,19 @@
/>
</svg>
</button>
</Tooltip>
{:else}
<button
class="flex gap-1.5 items-center font-medium px-3.5 py-1.5 rounded-lg bg-gray-100/70 hover:bg-gray-100 dark:bg-gray-850 dark:hover:bg-gray-800 transition"
on:click={() => {
createAPIKeyHandler();
}}
>
<Plus strokeWidth="2" className=" size-3.5" />
Create new secret key</button
>
{/if}
</div>
</div>
</div>
...
...
src/lib/components/icons/Plus.svelte
0 → 100644
View file @
fb516ea6
<script lang="ts">
export let className = 'w-4 h-4';
export let strokeWidth = '1.5';
</script>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width={strokeWidth}
stroke="currentColor"
class={className}
>
<path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15" />
</svg>
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