Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pat-contentbrowser UI fixes #1398

Merged
merged 3 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/pat/contentbrowser/src/ContentBrowser.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
// one level search mode
updatePreview({ data: item });
} else if (item.is_folderish) {
$previewUids = [item.UID];
currentPath.set(item.path);
} else {
const pathParts = item.path.split("/");
Expand Down
16 changes: 9 additions & 7 deletions src/pat/contentbrowser/src/SelectedItems.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,10 @@
style="width: {$config.width || 'auto'}"
bind:this={ref}
>
<!-- {maxSelectionsize} -->
<div class="content-browser-selected-items">
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div class="content-browser-selected-items"
on:click={() => $showContentBrowser = $selectedItems.length ? false : true }>
{#if $selectedItems}
{#each $selectedItems as selItem, i (selItem.UID)}
<div
Expand All @@ -109,10 +111,9 @@
data-uuid={selItem.UID}
>
<div class="item-info">
<!-- svelte-ignore a11y-missing-attribute -->
<button
class="btn btn-link btn-sm link-secondary"
on:click={() => unselectItem(i)}
on:click|stopPropagation={() => unselectItem(i)}
><svg use:resolveIcon={{ iconName: "x-circle" }} /></button
>
<div>
Expand All @@ -131,11 +132,12 @@
<p>{_t("loading selected items")}</p>
{/if}
</div>
<button
class="btn btn-primary"
<!-- svelte-ignore a11y-invalid-attribute -->
<a
class="btn btn-primary" href="#"
style="border-radius:0 var(--bs-border-radius) var(--bs-border-radius) 0"
on:click|preventDefault={() => ($showContentBrowser = true)}
>{_t("Select")}</button
>{_t("Select")}</a
>
</div>

Expand Down
Loading