Fix ui regressions

This commit is contained in:
Brahim Hadriche committed 2025-09-10 13:49:38 -04:00
1 parent 09a6585618
commit 1047a7882a
7 files changed
+93 -92

No files matched your search

+6 -5
View File
@@ -67,16 +67,17 @@
<div class="flex items-center min-w-0">
<ThemeSelect />
{#if currentProfile && currentProfile.username}
<div
class="badge badge-outline min-w-0 max-w-[12rem] overflow-hidden whitespace-nowrap truncate px-0.5"
<button
class="badge badge-outline min-w-0 max-w-[12rem] overflow-hidden whitespace-nowrap truncate cursor-pointer"
title={currentProfile.username}
on:click={showProfilesDialog}
>
<span class="truncate">{currentProfile.username}</span>
</div>
<span class="truncate">{currentProfile.username} </span>
</button>
{/if}
<button
on:click={showProfilesDialog}
class="btn btn-ghost btn-circle avatar overflow-hidden w-12 h-12"
class="btn btn-ghost btn-circle overflow-hidden w-12 h-12"
>
<ProfileAvatar profile={currentProfile} navbar={true} />
</button>
+49 -48
View File
@@ -131,37 +131,55 @@
await searchVideos("");
}}
>
<div class="join w-full border border-neutral rounded-full">
<input
type="search"
dir="auto"
placeholder="{$translate('Search')}..."
class="join-item input w-full border border-neutral rounded-full"
bind:this={searchBox}
bind:value={searchBoxText}
on:input={searchSuggestions}
on:focus={searchSuggestions}
on:blur={() => {
// A delay before clearing the suggestions allows the user to click on a suggestion
// Clicking the suggestion will trigger the blur event immediately, and the search won't happen
setTimeout(() => {
suggestions = { suggestions: [] };
}, 200);
}}
/>
<button
type="button"
class="join-item btn w-16"
on:click={async () => {
page = 1;
videos = [];
await searchVideos("");
}}
>
<div class="h-6">
<SearchThinIcon />
</div>
</button>
<div class="relative w-full">
<div class="join w-full">
<input
type="search"
dir="auto"
placeholder="{$translate('Search')}..."
class="join-item input w-full border border-neutral focus:outline-none focus:ring-0 rounded-l-full rounded-r-none"
bind:this={searchBox}
bind:value={searchBoxText}
on:input={searchSuggestions}
on:focus={searchSuggestions}
on:blur={() => {
// A delay before clearing the suggestions allows the user to click on a suggestion
// Clicking the suggestion will trigger the blur event immediately, and the search won't happen
setTimeout(() => {
suggestions = { suggestions: [] };
}, 200);
}}
/>
<button
type="button"
class="join-item btn border border-neutral border-l-0 rounded-l-none rounded-r-full"
on:click={async () => {
page = 1;
videos = [];
await searchVideos("");
}}
>
<div class="h-6">
<SearchThinIcon />
</div>
</button>
</div>
{#if suggestions.suggestions.length > 0}
<ul
class="absolute left-0 right-0 mt-1 dropdown-content menu z-20 p-2 shadow-xl bg-base-200 rounded-box"
>
{#each suggestions.suggestions as suggestion}
<li class="p-1">
<button
type="button"
on:click={async (e) => {
await suggestionClicked(e.currentTarget.innerText);
}}>{@html suggestion}</button
>
</li>
{/each}
</ul>
{/if}
</div>
<button
type="button"
@@ -173,23 +191,6 @@
</div>
{searchFiltersLabel}
</button>
{#if suggestions.suggestions.length > 0}
<ul
class="dropdown-content menu z-10 p-2 shadow-xl bg-base-200 rounded-box"
>
{#each suggestions.suggestions as suggestion}
<li class="p-1">
<button
type="button"
on:click={async (e) => {
await suggestionClicked(e.currentTarget.innerText);
}}>{@html suggestion}</button
>
</li>
{/each}
</ul>
{/if}
</form>
</search>
</div>
@@ -22,7 +22,7 @@
</script>
<div class="form-control m-5">
<label class="label p-0 cursor-pointer">
<label class="flex justify-between items-center p-0 cursor-pointer w-full">
<div class="label-text {textSizes[level]}">{$translate(displayText)}</div>
<input
type="checkbox"
@@ -113,18 +113,18 @@
</button>
</div>
</td>
<td>
<label class="label p-0 cursor-pointer">
<div class="label-text">
{$translate(homeLayout[item.id].title)}
</div>
<input
type="checkbox"
name={item.id}
bind:checked={item.enabled}
class="toggle toggle-primary"
/>
</label>
<td class="w-full">
<div class="label-text m-2">
{$translate(homeLayout[item.id].title)}
</div>
</td>
<td class="text-right">
<input
type="checkbox"
name={item.id}
bind:checked={item.enabled}
class="toggle toggle-primary"
/>
</td>
<td class="text-right">
<div class="tooltip" data-tip="Move down">
@@ -129,7 +129,7 @@
{#each Object.keys(qualityLabels) as quality}
<tr>
<td>
<label class="label p-0 cursor-pointer">
<div class="flex justify-between items-center w-full">
<div class="label-text text-lg">
{$translate(qualityLabels[quality])}
</div>
@@ -139,7 +139,7 @@
on:change={(e) => onChange(e, quality)}
class="toggle toggle-primary"
/>
</label>
</div>
</td>
</tr>
{/each}
@@ -28,18 +28,16 @@
<div class="text-xs text-gray-500">{@html $translate(description)}</div>
{#each options as option}
<div class="form-control">
<label class="label cursor-pointer">
<span class="label-text">{$translate(option.displayText)}</span>
<input
type="radio"
name={key}
value={option.value}
class="radio"
checked={value === option.value}
on:change={handleChange}
/>
</label>
</div>
<label class="flex justify-between items-center py-2 cursor-pointer w-full">
<span class="label-text">{$translate(option.displayText)}</span>
<input
type="radio"
name={key}
value={option.value}
class="radio"
checked={value === option.value}
on:change={handleChange}
/>
</label>
{/each}
</div>
@@ -96,16 +96,17 @@
{/if}
</div>
{#if lengthSeconds && checked}
<input
type="range"
min="0"
max={lengthSeconds}
bind:value={timestampRange}
on:input={(e) => {
// @ts-ignore
timestamp = e.currentTarget.value;
}}
class="range range-xs range-primary"
/>
<div class="w-full">
<input
type="range"
min="0"
max={lengthSeconds}
bind:value={timestampRange}
on:input={(e) => {
timestamp = parseInt(e.currentTarget.value);
}}
class="range range-xs range-primary w-full"
/>
</div>
{/if}
</div>