-
-
Notifications
You must be signed in to change notification settings - Fork 77
Fix issue "checkbox are not aligned with text when multi-selecting" #1500
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
Open
SimeonAT
wants to merge
10
commits into
music-assistant:main
Choose a base branch
from
SimeonAT:align-checkboxes
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+112
−36
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
80b0978
Added Notes to Self so I know the source code responsible for display…
SimeonAT 606098c
Align list item checkbox with title, subtitle, and buttons.
marcelveldt 2154fd3
Replace Vuetify tooltip and checkbox with Shadcn tooltip and checkbox.
SimeonAT 842c744
Fix merge conflicts
SimeonAT aa8e192
Add back code that was supposed to be there but was removed when I wa…
SimeonAT 6069016
Merge branch 'main' into align-checkboxes
SimeonAT 3122dd2
Merge branch 'main' into align-checkboxes
SimeonAT 0a7e9f6
Update src/components/ListviewItemTitle.vue
stvncode 9b5e88a
Update src/components/ListviewItemTitle.vue
stvncode 597555a
Merge branch 'main' into align-checkboxes
stvncode File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| <template> | ||
| <span v-if="item.media_type == MediaType.FOLDER" class="checkbox-label"> | ||
| <span>{{ getBrowseFolderName(item as BrowseFolder, t) }}</span> | ||
| </span> | ||
| <span v-else :class="{ 'is-playing': isPlaying }" class="checkbox-label"> | ||
| {{ displayName }} | ||
| <span v-if="'version' in item && item.version"> ({{ item.version }}) </span> | ||
| <span | ||
| v-if="item.media_type == MediaType.TRACK && item.metadata?.release_date" | ||
| > | ||
| ({{ new Date(item.metadata.release_date).getFullYear() }}) | ||
| </span> | ||
| </span> | ||
| <!-- explicit icon --> | ||
| <template | ||
| v-if="item && item.metadata && parseBool(item.metadata.explicit || false)" | ||
| > | ||
| <TooltipProvider> | ||
| <Tooltip> | ||
| <TooltipTrigger as-child> | ||
| <span | ||
| :aria-label="t('tooltip.explicit')" | ||
| role="button" | ||
| tabindex="0" | ||
| > | ||
| <v-icon | ||
| :class="{ 'explicit-icon-margin-left': showCheckboxes }" | ||
| icon="mdi-alpha-e-box" | ||
| width="35" | ||
| /> | ||
| </span> | ||
| </TooltipTrigger> | ||
| <TooltipContent> | ||
| <span>{{ $t("tooltip.explicit") }}</span> | ||
| </TooltipContent> | ||
| </Tooltip> | ||
| </TooltipProvider> | ||
| </template> | ||
| </template> | ||
|
|
||
| <script setup lang="ts"> | ||
| import { getBrowseFolderName, parseBool } from "@/helpers/utils"; | ||
| import { | ||
| MediaType, | ||
| type BrowseFolder, | ||
| type MediaItemType, | ||
| } from "@/plugins/api/interfaces"; | ||
| import { useI18n } from "vue-i18n"; | ||
|
|
||
| import { | ||
| Tooltip, | ||
| TooltipContent, | ||
| TooltipProvider, | ||
| TooltipTrigger, | ||
| } from "@/components/ui/tooltip"; | ||
|
|
||
| // properties | ||
| export interface Props { | ||
| displayName: string; | ||
| item: MediaItemType; | ||
| showCheckboxes: boolean; | ||
| isPlaying: boolean; | ||
| } | ||
|
|
||
| // global refs | ||
| const { t } = useI18n(); | ||
|
|
||
| withDefaults(defineProps<Props>(), { | ||
| displayName: "", | ||
| showCheckboxes: false, | ||
| isPlaying: false, | ||
| }); | ||
| </script> | ||
|
|
||
| <style scoped> | ||
| .checkbox-label { | ||
| font-weight: 500; | ||
| } | ||
|
|
||
| /* When checkbox is displayed, explicit icon will be shown to the right of the title. | ||
| This adds a bit of spacing between the title and the explicit icon. */ | ||
| .explicit-icon-margin-left { | ||
| margin-left: 0.1em; | ||
| } | ||
| </style> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.