mirror of
https://github.com/modrinth/code.git
synced 2026-08-25 17:14:50 +00:00
feat: project download modal (#6602)
* refactor: componentize project download modal * feat: implement new project download modal * fix: button trigger placeholder text styles * feat: dependency download button * refactor: move project download modal into folder * refactor: separate out download dependencies section * refactor: split out download project and install with modrinth app sections * feat+refactor: add nested dependencies route and move logic into related subcomponents * feat: handle download project dependencies recursively and properly pass all game versions/platforms compatible on the selected version * feat: if only dependency project is listed, find latest compatible dependency version to download in version page * refactor: use ts and also have modal own get project/versions queries * feat: implement opening project download modal in place in version page * feat: implement incompatible options due to base project * feat: auto select loader after selecting a game version, if only one loader is left compatible * feat: add prop to stop route selection being persisted in url param * pnpm prepr * feat: update tooltip copy * feat: polish some styles * fix: fabric dependency showing when quilt is selected * fix: tooltip hover area * fix: when there are multiple compatible of same game version + loader, give latest * feat: add link to version page * feat: add truncated tooltip * pnpm prepr * feat: add warning icon for incompatible selection * feat: polish loading state and tooltip * feat: implement download all dependencies * pnpm prepr * fix: light theme card * fix: additional files label * refactor: move additional files into download dependencies section * feat: move download all button in heading with compatible version * fix color * fix: dependencies not appearing when open modal second time * fix: dependency lines when 3 nested * feat: remove duplicated dependencies * feat: add download count indicateor on download all button * feat: add tooltip for downloading file with filename and size * pnpm prepr * feat: only show duplicate tooltip if there are duplicates
This commit is contained in:
@@ -76,8 +76,14 @@
|
||||
v-if="showIconInSelected && selectedOption?.icon"
|
||||
class="h-5 w-5 shrink-0"
|
||||
/>
|
||||
<span class="min-w-0 truncate text-primary font-semibold leading-tight">
|
||||
<slot name="selected" :label="triggerText">{{ triggerText }}</slot>
|
||||
<span
|
||||
v-if="selectedOption"
|
||||
class="min-w-0 truncate text-primary font-semibold leading-tight"
|
||||
>
|
||||
<slot name="selected" :label="selectedTriggerText">{{ selectedTriggerText }}</slot>
|
||||
</span>
|
||||
<span v-else class="min-w-0 truncate text-secondary opacity-70 font-medium leading-tight">
|
||||
{{ placeholderText }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="flex shrink-0 items-center gap-1">
|
||||
@@ -391,9 +397,13 @@ const searchableInputClass = computed(() => {
|
||||
return parts.join(' ')
|
||||
})
|
||||
|
||||
const triggerText = computed(() => {
|
||||
const selectedTriggerText = computed(() => {
|
||||
if (props.displayValue !== undefined) return props.displayValue
|
||||
return selectedOption.value?.label ?? ''
|
||||
})
|
||||
|
||||
const placeholderText = computed(() => {
|
||||
if (props.displayValue !== undefined) return props.displayValue
|
||||
if (selectedOption.value) return selectedOption.value.label
|
||||
return props.placeholder
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user