From: Aleksander Grygier Date: Fri, 19 Sep 2025 07:52:27 +0000 (+0200) Subject: feat: Improve mobile UI for Settings Dialog (#16084) X-Git-Tag: upstream/0.0.6527~7 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=4067f07fc5aa5722b87db303b561597004696f6c;p=pkg%2Fggml%2Fsources%2Fllama.cpp feat: Improve mobile UI for Settings Dialog (#16084) * feat: Improve mobile UI for Settings Dialog * chore: update webui build output * fix: Linting errors * chore: update webui build output --- diff --git a/tools/server/public/index.html.gz b/tools/server/public/index.html.gz index 909fa1cc..c6d8258d 100644 Binary files a/tools/server/public/index.html.gz and b/tools/server/public/index.html.gz differ diff --git a/tools/server/webui/scripts/install-git-hooks.sh b/tools/server/webui/scripts/install-git-hooks.sh index 740075e2..a2a3ca76 100755 --- a/tools/server/webui/scripts/install-git-hooks.sh +++ b/tools/server/webui/scripts/install-git-hooks.sh @@ -1,7 +1,7 @@ #!/bin/bash # Script to install pre-commit and post-commit hooks for webui -# Pre-commit: formats code and builds, stashes unstaged changes +# Pre-commit: formats, lints, checks, and builds code, stashes unstaged changes # Post-commit: automatically unstashes changes REPO_ROOT=$(git rev-parse --show-toplevel) @@ -44,6 +44,18 @@ if git diff --cached --name-only | grep -q "^tools/server/webui/"; then exit 1 fi + # Run the lint command + npm run lint + + # Check if lint command succeeded + if [ $? -ne 0 ]; then + echo "Error: npm run lint failed" + if [ $STASH_CREATED -eq 0 ]; then + echo "You can restore your unstaged changes with: git stash pop" + fi + exit 1 + fi + # Run the check command npm run check @@ -112,7 +124,7 @@ if [ $? -eq 0 ]; then echo " Post-commit: $POST_COMMIT_HOOK" echo "" echo "The hooks will automatically:" - echo " • Format and build webui code before commits" + echo " • Format, lint, check, and build webui code before commits" echo " • Stash unstaged changes during the process" echo " • Restore your unstaged changes after the commit" echo "" diff --git a/tools/server/webui/src/app.css b/tools/server/webui/src/app.css index d05a422f..a9ac80ab 100644 --- a/tools/server/webui/src/app.css +++ b/tools/server/webui/src/app.css @@ -121,3 +121,15 @@ @apply bg-background text-foreground; } } + +@layer utilities { + .scrollbar-hide { + /* Hide scrollbar for Chrome, Safari and Opera */ + &::-webkit-scrollbar { + display: none; + } + /* Hide scrollbar for IE, Edge and Firefox */ + -ms-overflow-style: none; + scrollbar-width: none; + } +} diff --git a/tools/server/webui/src/lib/components/app/chat/ChatSettings/ChatSettingsDialog.svelte b/tools/server/webui/src/lib/components/app/chat/ChatSettings/ChatSettingsDialog.svelte index 6752f066..0d9cca05 100644 --- a/tools/server/webui/src/lib/components/app/chat/ChatSettings/ChatSettingsDialog.svelte +++ b/tools/server/webui/src/lib/components/app/chat/ChatSettings/ChatSettingsDialog.svelte @@ -1,15 +1,20 @@ - -
-
+ +
+ + - -
- - {#each currentSection.fields as field (field.key)} -
- {#if field.type === 'input'} - - - (localConfig[field.key] = e.currentTarget.value)} - placeholder={`Default: ${SETTING_CONFIG_DEFAULT[field.key] || 'none'}`} - class="max-w-md" - /> - {#if field.help || SETTING_CONFIG_INFO[field.key]} -

- {field.help || SETTING_CONFIG_INFO[field.key]} -

- {/if} - {:else if field.type === 'textarea'} - - -