Fix ui regressions
This commit is contained in:
1 parent
09a6585618
commit
1047a7882a
7 files changed
+93
-92
No files matched your search
@@ -67,16 +67,17 @@
|
|||||||
<div class="flex items-center min-w-0">
|
<div class="flex items-center min-w-0">
|
||||||
<ThemeSelect />
|
<ThemeSelect />
|
||||||
{#if currentProfile && currentProfile.username}
|
{#if currentProfile && currentProfile.username}
|
||||||
<div
|
<button
|
||||||
class="badge badge-outline min-w-0 max-w-[12rem] overflow-hidden whitespace-nowrap truncate px-0.5"
|
class="badge badge-outline min-w-0 max-w-[12rem] overflow-hidden whitespace-nowrap truncate cursor-pointer"
|
||||||
title={currentProfile.username}
|
title={currentProfile.username}
|
||||||
|
on:click={showProfilesDialog}
|
||||||
>
|
>
|
||||||
<span class="truncate">{currentProfile.username}</span>
|
<span class="truncate">{currentProfile.username} </span>
|
||||||
</div>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
<button
|
<button
|
||||||
on:click={showProfilesDialog}
|
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} />
|
<ProfileAvatar profile={currentProfile} navbar={true} />
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -131,37 +131,55 @@
|
|||||||
await searchVideos("");
|
await searchVideos("");
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div class="join w-full border border-neutral rounded-full">
|
<div class="relative w-full">
|
||||||
<input
|
<div class="join w-full">
|
||||||
type="search"
|
<input
|
||||||
dir="auto"
|
type="search"
|
||||||
placeholder="{$translate('Search')}..."
|
dir="auto"
|
||||||
class="join-item input w-full border border-neutral rounded-full"
|
placeholder="{$translate('Search')}..."
|
||||||
bind:this={searchBox}
|
class="join-item input w-full border border-neutral focus:outline-none focus:ring-0 rounded-l-full rounded-r-none"
|
||||||
bind:value={searchBoxText}
|
bind:this={searchBox}
|
||||||
on:input={searchSuggestions}
|
bind:value={searchBoxText}
|
||||||
on:focus={searchSuggestions}
|
on:input={searchSuggestions}
|
||||||
on:blur={() => {
|
on:focus={searchSuggestions}
|
||||||
// A delay before clearing the suggestions allows the user to click on a suggestion
|
on:blur={() => {
|
||||||
// Clicking the suggestion will trigger the blur event immediately, and the search won't happen
|
// A delay before clearing the suggestions allows the user to click on a suggestion
|
||||||
setTimeout(() => {
|
// Clicking the suggestion will trigger the blur event immediately, and the search won't happen
|
||||||
suggestions = { suggestions: [] };
|
setTimeout(() => {
|
||||||
}, 200);
|
suggestions = { suggestions: [] };
|
||||||
}}
|
}, 200);
|
||||||
/>
|
}}
|
||||||
<button
|
/>
|
||||||
type="button"
|
<button
|
||||||
class="join-item btn w-16"
|
type="button"
|
||||||
on:click={async () => {
|
class="join-item btn border border-neutral border-l-0 rounded-l-none rounded-r-full"
|
||||||
page = 1;
|
on:click={async () => {
|
||||||
videos = [];
|
page = 1;
|
||||||
await searchVideos("");
|
videos = [];
|
||||||
}}
|
await searchVideos("");
|
||||||
>
|
}}
|
||||||
<div class="h-6">
|
>
|
||||||
<SearchThinIcon />
|
<div class="h-6">
|
||||||
</div>
|
<SearchThinIcon />
|
||||||
</button>
|
</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>
|
</div>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
@@ -173,23 +191,6 @@
|
|||||||
</div>
|
</div>
|
||||||
{searchFiltersLabel}
|
{searchFiltersLabel}
|
||||||
</button>
|
</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>
|
</form>
|
||||||
</search>
|
</search>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="form-control m-5">
|
<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>
|
<div class="label-text {textSizes[level]}">{$translate(displayText)}</div>
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
|
|||||||
@@ -113,18 +113,18 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td class="w-full">
|
||||||
<label class="label p-0 cursor-pointer">
|
<div class="label-text m-2">
|
||||||
<div class="label-text">
|
{$translate(homeLayout[item.id].title)}
|
||||||
{$translate(homeLayout[item.id].title)}
|
</div>
|
||||||
</div>
|
</td>
|
||||||
<input
|
<td class="text-right">
|
||||||
type="checkbox"
|
<input
|
||||||
name={item.id}
|
type="checkbox"
|
||||||
bind:checked={item.enabled}
|
name={item.id}
|
||||||
class="toggle toggle-primary"
|
bind:checked={item.enabled}
|
||||||
/>
|
class="toggle toggle-primary"
|
||||||
</label>
|
/>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
<div class="tooltip" data-tip="Move down">
|
<div class="tooltip" data-tip="Move down">
|
||||||
|
|||||||
@@ -129,7 +129,7 @@
|
|||||||
{#each Object.keys(qualityLabels) as quality}
|
{#each Object.keys(qualityLabels) as quality}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<label class="label p-0 cursor-pointer">
|
<div class="flex justify-between items-center w-full">
|
||||||
<div class="label-text text-lg">
|
<div class="label-text text-lg">
|
||||||
{$translate(qualityLabels[quality])}
|
{$translate(qualityLabels[quality])}
|
||||||
</div>
|
</div>
|
||||||
@@ -139,7 +139,7 @@
|
|||||||
on:change={(e) => onChange(e, quality)}
|
on:change={(e) => onChange(e, quality)}
|
||||||
class="toggle toggle-primary"
|
class="toggle toggle-primary"
|
||||||
/>
|
/>
|
||||||
</label>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{/each}
|
{/each}
|
||||||
|
|||||||
@@ -28,18 +28,16 @@
|
|||||||
<div class="text-xs text-gray-500">{@html $translate(description)}</div>
|
<div class="text-xs text-gray-500">{@html $translate(description)}</div>
|
||||||
|
|
||||||
{#each options as option}
|
{#each options as option}
|
||||||
<div class="form-control">
|
<label class="flex justify-between items-center py-2 cursor-pointer w-full">
|
||||||
<label class="label cursor-pointer">
|
<span class="label-text">{$translate(option.displayText)}</span>
|
||||||
<span class="label-text">{$translate(option.displayText)}</span>
|
<input
|
||||||
<input
|
type="radio"
|
||||||
type="radio"
|
name={key}
|
||||||
name={key}
|
value={option.value}
|
||||||
value={option.value}
|
class="radio"
|
||||||
class="radio"
|
checked={value === option.value}
|
||||||
checked={value === option.value}
|
on:change={handleChange}
|
||||||
on:change={handleChange}
|
/>
|
||||||
/>
|
</label>
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
@@ -96,16 +96,17 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{#if lengthSeconds && checked}
|
{#if lengthSeconds && checked}
|
||||||
<input
|
<div class="w-full">
|
||||||
type="range"
|
<input
|
||||||
min="0"
|
type="range"
|
||||||
max={lengthSeconds}
|
min="0"
|
||||||
bind:value={timestampRange}
|
max={lengthSeconds}
|
||||||
on:input={(e) => {
|
bind:value={timestampRange}
|
||||||
// @ts-ignore
|
on:input={(e) => {
|
||||||
timestamp = e.currentTarget.value;
|
timestamp = parseInt(e.currentTarget.value);
|
||||||
}}
|
}}
|
||||||
class="range range-xs range-primary"
|
class="range range-xs range-primary w-full"
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
Reference in new issue
Block a user