2023-03-30 18:37:45 -04:00
|
|
|
<template>
|
2025-08-14 21:48:38 +01:00
|
|
|
<div>
|
|
|
|
|
<template v-if="projects?.length > 0">
|
|
|
|
|
<div class="flex items-center gap-2 mb-4">
|
2026-02-09 14:57:31 +00:00
|
|
|
<StyledInput
|
|
|
|
|
v-model="searchFilter"
|
|
|
|
|
:icon="SearchIcon"
|
|
|
|
|
type="text"
|
|
|
|
|
:placeholder="`Search ${filteredProjects.length} project${filteredProjects.length === 1 ? '' : 's'}...`"
|
|
|
|
|
autocomplete="off"
|
|
|
|
|
clearable
|
|
|
|
|
wrapper-class="flex-grow"
|
|
|
|
|
/>
|
2025-08-14 21:48:38 +01:00
|
|
|
<AddContentButton :instance="instance" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="flex items-center justify-between">
|
|
|
|
|
<div v-if="filterOptions.length > 1" class="flex flex-wrap gap-1 items-center pb-4">
|
|
|
|
|
<FilterIcon class="text-secondary h-5 w-5 mr-1" />
|
|
|
|
|
<button
|
|
|
|
|
v-for="filter in filterOptions"
|
|
|
|
|
:key="`content-filter-${filter.id}`"
|
|
|
|
|
:class="`px-2 py-1 rounded-full font-semibold leading-none border-none cursor-pointer active:scale-[0.97] duration-100 transition-all ${selectedFilters.includes(filter.id) ? 'bg-brand-highlight text-brand' : 'bg-bg-raised text-secondary'}`"
|
|
|
|
|
@click="toggleArray(selectedFilters, filter.id)"
|
|
|
|
|
>
|
|
|
|
|
{{ filter.formattedName }}
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
<Pagination
|
|
|
|
|
v-if="search.length > 0"
|
|
|
|
|
:page="currentPage"
|
|
|
|
|
:count="Math.ceil(search.length / 20)"
|
|
|
|
|
:link-function="(page) => `?page=${page}`"
|
|
|
|
|
@switch-page="(page) => (currentPage = page)"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<ContentListPanel
|
|
|
|
|
v-model="selectedFiles"
|
|
|
|
|
:locked="isPackLocked"
|
|
|
|
|
:items="
|
|
|
|
|
search.map((x) => {
|
|
|
|
|
const item: ContentItem<any> = {
|
|
|
|
|
path: x.path,
|
|
|
|
|
disabled: x.disabled,
|
|
|
|
|
filename: x.file_name,
|
|
|
|
|
icon: x.icon ?? undefined,
|
|
|
|
|
title: x.name,
|
|
|
|
|
data: x,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (x.version) {
|
|
|
|
|
item.version = x.version
|
|
|
|
|
item.versionId = x.version
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (x.id) {
|
|
|
|
|
item.project = {
|
|
|
|
|
id: x.id,
|
|
|
|
|
link: {
|
|
|
|
|
path: `/project/${x.id}`,
|
|
|
|
|
query: { i: props.instance.path },
|
|
|
|
|
},
|
|
|
|
|
linkProps: {},
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (x.author) {
|
|
|
|
|
item.creator = {
|
|
|
|
|
name: x.author.name,
|
|
|
|
|
type: x.author.type,
|
|
|
|
|
id: x.author.slug,
|
|
|
|
|
link: `https://modrinth.com/${x.author.type}/${x.author.slug}`,
|
|
|
|
|
linkProps: { target: '_blank' },
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return item
|
|
|
|
|
})
|
|
|
|
|
"
|
|
|
|
|
:sort-column="sortColumn"
|
|
|
|
|
:sort-ascending="ascending"
|
|
|
|
|
:update-sort="sortProjects"
|
|
|
|
|
:current-page="currentPage"
|
|
|
|
|
>
|
|
|
|
|
<template v-if="selectedProjects.length > 0" #headers>
|
|
|
|
|
<div class="flex gap-2">
|
|
|
|
|
<ButtonStyled
|
|
|
|
|
v-if="!isPackLocked && selectedProjects.some((m) => m.outdated)"
|
|
|
|
|
color="brand"
|
|
|
|
|
color-fill="text"
|
|
|
|
|
hover-color-fill="text"
|
|
|
|
|
>
|
|
|
|
|
<button @click="updateSelected()"><DownloadIcon /> Update</button>
|
|
|
|
|
</ButtonStyled>
|
|
|
|
|
<ButtonStyled>
|
|
|
|
|
<OverflowMenu
|
|
|
|
|
:options="[
|
|
|
|
|
{
|
|
|
|
|
id: 'share-names',
|
|
|
|
|
action: () => shareNames(),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 'share-file-names',
|
|
|
|
|
action: () => shareFileNames(),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 'share-urls',
|
|
|
|
|
action: () => shareUrls(),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 'share-markdown',
|
|
|
|
|
action: () => shareMarkdown(),
|
|
|
|
|
},
|
|
|
|
|
]"
|
|
|
|
|
>
|
|
|
|
|
<ShareIcon /> Share <DropdownIcon />
|
|
|
|
|
<template #share-names> <TextInputIcon /> Project names </template>
|
|
|
|
|
<template #share-file-names> <FileIcon /> File names </template>
|
|
|
|
|
<template #share-urls> <LinkIcon /> Project links </template>
|
|
|
|
|
<template #share-markdown> <CodeIcon /> Markdown links </template>
|
|
|
|
|
</OverflowMenu>
|
|
|
|
|
</ButtonStyled>
|
|
|
|
|
<ButtonStyled v-if="selectedProjects.some((m) => m.disabled)">
|
|
|
|
|
<button @click="enableAll()"><CheckCircleIcon /> Enable</button>
|
|
|
|
|
</ButtonStyled>
|
|
|
|
|
<ButtonStyled v-if="selectedProjects.some((m) => !m.disabled)">
|
|
|
|
|
<button @click="disableAll()"><SlashIcon /> Disable</button>
|
|
|
|
|
</ButtonStyled>
|
|
|
|
|
<ButtonStyled color="red">
|
|
|
|
|
<button @click="deleteSelected()"><TrashIcon /> Remove</button>
|
|
|
|
|
</ButtonStyled>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template #header-actions>
|
|
|
|
|
<ButtonStyled type="transparent" color-fill="text" hover-color-fill="text">
|
|
|
|
|
<button :disabled="refreshingProjects" class="w-max" @click="refreshProjects">
|
|
|
|
|
<UpdatedIcon />
|
|
|
|
|
Refresh
|
|
|
|
|
</button>
|
|
|
|
|
</ButtonStyled>
|
|
|
|
|
<ButtonStyled
|
|
|
|
|
v-if="!isPackLocked && projects.some((m) => (m as any).outdated)"
|
|
|
|
|
type="transparent"
|
|
|
|
|
color="brand"
|
|
|
|
|
color-fill="text"
|
|
|
|
|
hover-color-fill="text"
|
|
|
|
|
@click="updateAll"
|
|
|
|
|
>
|
|
|
|
|
<button class="w-max"><DownloadIcon /> Update all</button>
|
|
|
|
|
</ButtonStyled>
|
|
|
|
|
<ButtonStyled
|
|
|
|
|
v-if="canUpdatePack"
|
|
|
|
|
type="transparent"
|
|
|
|
|
color="brand"
|
|
|
|
|
color-fill="text"
|
|
|
|
|
hover-color-fill="text"
|
|
|
|
|
>
|
|
|
|
|
<button class="w-max" :disabled="installing" @click="modpackVersionModal?.show()">
|
|
|
|
|
<DownloadIcon /> Update pack
|
|
|
|
|
</button>
|
|
|
|
|
</ButtonStyled>
|
|
|
|
|
</template>
|
|
|
|
|
<template #actions="{ item }">
|
|
|
|
|
<ButtonStyled
|
|
|
|
|
v-if="!isPackLocked && (item.data as any).outdated"
|
|
|
|
|
type="transparent"
|
|
|
|
|
color="brand"
|
|
|
|
|
circular
|
|
|
|
|
>
|
|
|
|
|
<button
|
|
|
|
|
v-tooltip="`Update`"
|
|
|
|
|
:disabled="(item.data as ProjectListEntry).updating"
|
|
|
|
|
@click="updateProject(item.data)"
|
|
|
|
|
>
|
|
|
|
|
<DownloadIcon />
|
|
|
|
|
</button>
|
|
|
|
|
</ButtonStyled>
|
|
|
|
|
<div v-else class="w-[36px]"></div>
|
|
|
|
|
<Toggle
|
|
|
|
|
class="!mx-2"
|
|
|
|
|
:model-value="!item.data.disabled"
|
|
|
|
|
@update:model-value="toggleDisableMod(item.data)"
|
|
|
|
|
/>
|
|
|
|
|
<ButtonStyled type="transparent" circular>
|
|
|
|
|
<button v-tooltip="'Remove'" @click="removeMod(item)">
|
|
|
|
|
<TrashIcon />
|
|
|
|
|
</button>
|
|
|
|
|
</ButtonStyled>
|
|
|
|
|
|
|
|
|
|
<ButtonStyled type="transparent" circular>
|
|
|
|
|
<OverflowMenu
|
|
|
|
|
:options="[
|
|
|
|
|
{
|
|
|
|
|
id: 'show-file',
|
|
|
|
|
action: () => highlightModInProfile(instance.path, item.path),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 'copy-link',
|
|
|
|
|
shown: item.data !== undefined && item.data.slug !== undefined,
|
|
|
|
|
action: () => copyModLink(item),
|
|
|
|
|
},
|
|
|
|
|
]"
|
|
|
|
|
direction="left"
|
|
|
|
|
>
|
|
|
|
|
<MoreVerticalIcon />
|
|
|
|
|
<template #show-file> <ExternalIcon /> Show file </template>
|
|
|
|
|
<template #copy-link> <ClipboardCopyIcon /> Copy link </template>
|
|
|
|
|
</OverflowMenu>
|
|
|
|
|
</ButtonStyled>
|
|
|
|
|
</template>
|
|
|
|
|
</ContentListPanel>
|
|
|
|
|
<div class="flex justify-end mt-4">
|
|
|
|
|
<Pagination
|
|
|
|
|
v-if="search.length > 0"
|
|
|
|
|
:page="currentPage"
|
|
|
|
|
:count="Math.ceil(search.length / 20)"
|
|
|
|
|
:link-function="(page) => `?page=${page}`"
|
|
|
|
|
@switch-page="(page) => (currentPage = page)"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<div v-else class="w-full max-w-[48rem] mx-auto flex flex-col mt-6">
|
|
|
|
|
<RadialHeader class="">
|
|
|
|
|
<div class="flex items-center gap-6 w-[32rem] mx-auto">
|
|
|
|
|
<img src="@/assets/sad-modrinth-bot.webp" class="h-24" />
|
|
|
|
|
<span class="text-contrast font-bold text-xl"
|
|
|
|
|
>You haven't added any content to this instance yet.</span
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
</RadialHeader>
|
|
|
|
|
<div class="flex mt-4 mx-auto">
|
|
|
|
|
<AddContentButton :instance="instance" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<ShareModalWrapper
|
|
|
|
|
ref="shareModal"
|
|
|
|
|
share-title="Sharing modpack content"
|
|
|
|
|
share-text="Check out the projects I'm using in my modpack!"
|
|
|
|
|
:open-in-new-tab="false"
|
|
|
|
|
/>
|
|
|
|
|
<ExportModal v-if="projects.length > 0" ref="exportModal" :instance="instance" />
|
|
|
|
|
<ModpackVersionModal
|
|
|
|
|
v-if="instance.linked_data"
|
|
|
|
|
ref="modpackVersionModal"
|
|
|
|
|
:instance="instance"
|
|
|
|
|
:versions="props.versions"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
2023-03-30 18:37:45 -04:00
|
|
|
</template>
|
App redesign (#2946)
* Start of app redesign
* format
* continue progress
* Content page nearly done
* Fix recursion issues with content page
* Fix update all alignment
* Discover page progress
* Settings progress
* Removed unlocked-size hack that breaks web
* Revamp project page, refactor web project page to share code with app, fixed loading bar, misc UI/UX enhancements, update ko-fi logo, update arrow icons, fix web issues caused by floating-vue migration, fix tooltip issues, update web tooltips, clean up web hydration issues
* Ads + run prettier
* Begin auth refactor, move common messages to ui lib, add i18n extraction to all apps, begin Library refactor
* fix ads not hiding when plus log in
* rev lockfile changes/conflicts
* Fix sign in page
* Add generated
* (mostly) Data driven search
* Fix search mobile issue
* profile fixes
* Project versions page, fix typescript on UI lib and misc fixes
* Remove unused gallery component
* Fix linkfunction err
* Search filter controls at top, localization for locked filters
* Fix provided filter names
* Fix navigating from instance browse to main browse
* Friends frontend (#2995)
* Friends system frontend
* (almost) finish frontend
* finish friends, fix lint
* Fix lint
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
* Refresh macOS app icon
* Update web search UI more
* Fix link opens
* Fix frontend build
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
Co-authored-by: Jai A <jaiagr+gpg@pm.me>
Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
2024-12-11 19:54:18 -08:00
|
|
|
<script setup lang="ts">
|
2025-08-14 21:48:38 +01:00
|
|
|
import {
|
|
|
|
|
CheckCircleIcon,
|
|
|
|
|
ClipboardCopyIcon,
|
|
|
|
|
CodeIcon,
|
|
|
|
|
DownloadIcon,
|
|
|
|
|
DropdownIcon,
|
|
|
|
|
ExternalIcon,
|
|
|
|
|
FileIcon,
|
|
|
|
|
FilterIcon,
|
|
|
|
|
LinkIcon,
|
|
|
|
|
MoreVerticalIcon,
|
|
|
|
|
SearchIcon,
|
|
|
|
|
ShareIcon,
|
|
|
|
|
SlashIcon,
|
|
|
|
|
TrashIcon,
|
|
|
|
|
UpdatedIcon,
|
|
|
|
|
} from '@modrinth/assets'
|
|
|
|
|
import {
|
|
|
|
|
ButtonStyled,
|
|
|
|
|
ContentListPanel,
|
2025-12-27 13:37:37 -08:00
|
|
|
defineMessages,
|
2025-08-14 21:48:38 +01:00
|
|
|
injectNotificationManager,
|
|
|
|
|
OverflowMenu,
|
|
|
|
|
Pagination,
|
|
|
|
|
RadialHeader,
|
2026-02-09 14:57:31 +00:00
|
|
|
StyledInput,
|
2025-08-14 21:48:38 +01:00
|
|
|
Toggle,
|
2025-12-27 13:37:37 -08:00
|
|
|
useVIntl,
|
2025-08-14 21:48:38 +01:00
|
|
|
} from '@modrinth/ui'
|
|
|
|
|
import type { ContentItem } from '@modrinth/ui/src/components/content/ContentListItem.vue'
|
|
|
|
|
import type { Organization, Project, TeamMember, Version } from '@modrinth/utils'
|
|
|
|
|
import { formatProjectType } from '@modrinth/utils'
|
|
|
|
|
import { getCurrentWebview } from '@tauri-apps/api/webview'
|
2025-11-06 23:56:00 -08:00
|
|
|
import { useStorage } from '@vueuse/core'
|
2025-08-14 21:48:38 +01:00
|
|
|
import dayjs from 'dayjs'
|
|
|
|
|
import type { ComputedRef } from 'vue'
|
|
|
|
|
import { computed, onUnmounted, ref, watch } from 'vue'
|
|
|
|
|
|
2025-08-13 21:48:52 +01:00
|
|
|
import { TextInputIcon } from '@/assets/icons'
|
|
|
|
|
import AddContentButton from '@/components/ui/AddContentButton.vue'
|
|
|
|
|
import type ContextMenu from '@/components/ui/ContextMenu.vue'
|
|
|
|
|
import ExportModal from '@/components/ui/ExportModal.vue'
|
|
|
|
|
import ShareModalWrapper from '@/components/ui/modal/ShareModalWrapper.vue'
|
|
|
|
|
import ModpackVersionModal from '@/components/ui/ModpackVersionModal.vue'
|
|
|
|
|
import { trackEvent } from '@/helpers/analytics'
|
|
|
|
|
import {
|
2025-08-14 21:48:38 +01:00
|
|
|
get_organization_many,
|
|
|
|
|
get_project_many,
|
|
|
|
|
get_team_many,
|
2025-11-24 13:35:14 +00:00
|
|
|
get_version,
|
2025-08-14 21:48:38 +01:00
|
|
|
get_version_many,
|
2025-08-13 21:48:52 +01:00
|
|
|
} from '@/helpers/cache.js'
|
|
|
|
|
import { profile_listener } from '@/helpers/events.js'
|
|
|
|
|
import {
|
2025-08-14 21:48:38 +01:00
|
|
|
add_project_from_path,
|
2025-11-24 13:35:14 +00:00
|
|
|
get,
|
2025-08-14 21:48:38 +01:00
|
|
|
get_projects,
|
|
|
|
|
remove_project,
|
|
|
|
|
toggle_disable_project,
|
|
|
|
|
update_all,
|
|
|
|
|
update_project,
|
2025-08-13 21:48:52 +01:00
|
|
|
} from '@/helpers/profile.js'
|
|
|
|
|
import type { CacheBehaviour, ContentFile, GameInstance } from '@/helpers/types'
|
|
|
|
|
import { highlightModInProfile } from '@/helpers/utils.js'
|
2025-11-24 13:35:14 +00:00
|
|
|
import { installVersionDependencies } from '@/store/install'
|
2025-08-13 21:48:52 +01:00
|
|
|
|
|
|
|
|
const { handleError } = injectNotificationManager()
|
2025-05-01 16:13:13 -07:00
|
|
|
|
|
|
|
|
const props = defineProps<{
|
2025-08-14 21:48:38 +01:00
|
|
|
instance: GameInstance
|
|
|
|
|
options: InstanceType<typeof ContextMenu>
|
|
|
|
|
offline: boolean
|
|
|
|
|
playing: boolean
|
|
|
|
|
versions: Version[]
|
|
|
|
|
installed: boolean
|
feat: linked server instances (#5221)
* ping queue with tests
* mc ping server info + timeout
* sqlx prepare
* tombi fmt
* tombi fmt
* allow querying server ping data
* fix shear
* wip: resolve comments with pings
* Switch to Redis for server pings
* tombi fmt
* fix compile error
* clear cache on project ping, add server store link
* Schema changes
* Improve server messages for app pinging
* synthetic server project version for search indexing
* wip: clean up server ping, background tasks
* fix migration to sync with main, propagate background task errors
* wip: server modpack content query, components in search
* wip: massive component query refactor
* fix more defaults stuff
* sqlx
* fix serde deser flatten
* fix search indexing not showing fields
* remove leftover prompt
* fix import
* add diff detection for version dependencies without version_id/project_id
* move servers tab to end
* hide app nav tabs if only one tab
* fix undefined property
* on click link for server side bar info
* show recommended & supported versions for vanilla
* fix how install.js installs instance with modpack content title instead of server project title and dont fetch icon when installing to existing instance
* use large play button instance
* show update success instead of launching right into the game
* add global installing server project state
* add comment
* small change: open discover to modpack
* implement ping server projects for latency in app
* add projectV3 to nag context for moderation package
* fix play server project button when instance is launched
* add ping to project header
* wip: server verified plays
* server verified plays compiling
* queue up server plays in batches
* report server plays improved in frontend
* fixes to tracking server joins
* fix: server project detection to do loose null check
* fix server projects showing license
* fix empty server info card
* fix server projects links title
* Fix backend impl for server player count analytics
* fix: allow for links to be set to empty
* hook up server recent plays
* cargo sqlx prepare
* add project sidebar stories
* feat: update project sidebar server info card to new design
* update server project header and project card
* feat: add hide label for project cards
* feat: add tags sidebar card
* small fix to keep color consistent
* fix: remove required content tab from server project page
* many small fixes
* handle locking server instance content
* fix hiding modal after saving server compatibility version
* copy content card item and table from content tab update branch
* fix nav tabs active tag
* fix switching between server instance vs regular instance persisted invalid state
* fix a lot of the bugginess of navtabs when theres hidden/shown tabs between instances. match frontend nav tabs
* hook up backend searchfor frontend in websiet
* fix: server project card tags
* hook up search v3 in app backend for app frontend
* Don't return missing components in project query
* Add game versions to server filters
* move reporting server joins to backend
* send account UUID along with server play analytics
* update java server ping schema
* feat: implement use server search for search sorting and filter facets
* pnpm prepr
* fix game version filter facet
* fix: allow java and bedrock addresses to be deleted
* feat: hook up languages
* Default deserialize `ProjectSerial`
* feat: show server project tags
* small fix on languages multi select
* also default java server content
* fix: update compatibility modal not closing after successful upload
* remove play button in website discovery for servers
* reenable fence in app backend
* update online/offline tag
* add online status indicator pulsing
* revert pulsing
* disable link for custom modpack project and show tooltip
* change modpack to modded type
* update ip address entire button to be clickable
* polish server info card styles
* make offline tag red and properly hook up online tag
* move server related settings into own tab
* fix setting project compatibility resets unsaved changes
* fix javaServerPatchaData wiping content field
* updates to compatibility card, add download button and display supported versions better
* fix unsaved changes popup for tags
* remove console.log
* fix incorrect project type in projects in dashboard
* fix: savable.ts to reset currentValues to data() after save
* upload server banner as gallery image with title == "__mc_server_banner__" and filter it from frontend gallery
* fix error handling and helper text copy
* ensure gallery banners are filtered in app backend gallery display
* add grouped filters for search
* add query params for server search
* feat: deep linking to open server project page then open install to play
* fix search in app frontend
* fix: server project showing offline
* fix: profile create error app backend
Here's what was happening and the fix:
Root cause: In create.rs:107, profile_create assumed the icon_path parameter was always a local filename relative to the caches directory. It did caches_dir().join(icon) which produced a path like ...\caches\https://staging-cdn.modrinth.com/... — the colons in https:// are illegal in Windows paths (OS error 123).
The frontend's installServerProject and createVanillaInstance in install.js:290 both pass project.icon_url (a full URL) directly as the icon parameter.
Fix: Modified profile_create to detect when the icon parameter is a URL (starts with http:// or https://). When it is, it downloads the icon via fetch(), extracts the filename from the URL path, and passes the downloaded bytes and filename to set_icon() which hashes and caches it properly. The existing local-file path continues to work as before.
* pass undefined instead of unknown for modpack content modal
* fix: wrong way to determine offline status
* delete required content page placeholder
* fix: redirect running function instead of passing function
* add in wiki page
* fix diffs which have unknown project/filename
* pnpm prepr
* feat: add handling for "stop" instance state for server project card and page play button
* fix updating modpack shouldn't launch right into game
* small fix on external icon
* fix refresh search causing infinite rerender i.e. maximum call stack size exceeded
watch(route) → watch(() => [route.query.i, route.query.ai, route.path]) (line 102): The deep watch on the entire Vue Router route object was the most likely cause of the stack overflow. Vue Router's route object contains matched records with component definitions and other deeply nested structures. Deep-watching it triggers recursive traversal on every route change (including those from router.replace() inside refreshSearch()). Now it only watches the specific properties that updateInstanceContext() actually needs.
ref → shallowRef for serverHits and serverPings (line 189-190): The v3 search results can be deeply nested objects (minecraft_java_server.ping.data, content, etc.). Using shallowRef prevents Vue from creating deep reactive proxies on these objects, which is consistent with how results already uses shallowRef on line 295.
Re-entrance guard + try/catch on refreshSearch() (line 310): The watcher calls refreshSearch() without awaiting, so state changes during the async execution could trigger the watcher again, causing concurrent calls. The guard prevents overlapping calls, and the try/catch ensures loading.value = false is always reached (fixing the infinite loading).
* don't require auth token for logging server play
* fetch latest server player count from redis instead of search doc
* remove components. in search facet
* Category and search sort fixes
* add logging for refreshSearch in browse.vue
* fix: use windows.history.replace instead of router.replace due to vue production bug and remove logs
* fix: server refresh search reactivity
* fix: type errors
* conquer the type errors in Browse.vue
* update search input background
* fix tags location
* slight change to color
* feat: add linked to modpack project for regular modpack instances
* feat: installation tab updates
* fix: copy ip missing hover effect
* feat: implement category and countries negative filters
* fix servers tab label in profile page
* implement add server to instance
* feat: implement allow editing server instances
* update installation settings to handle vanilla server instance case
* hide servers tab when installing content to instance
* add sorting for user installed content to be top of list in content
* update categories filters from one group filter card to separate filters cards
* add active scale
* fix offline server showing online
* update language display
* update tooltip
* hide navtabs if theres only one tab
* fix: modpack content name truncate in project card
* feat: add server projects to moderation queue
* update redirect middleware no longer needs projectV3
* update comment
* fix: server tags labels
* feat: add the mf icons finally
* Revert "update redirect middleware no longer needs projectV3"
This reverts commit 1289cb52869185abe1481dfb6b0c00c0233bf59e.
* fix open in browser
* revert any handling for handling base linked modpack content for content tab
* update instance online players to be client ping
* fix showing modpack/loader version for server instance in installation settings
* server projects are not marked as modpacks
* skip license check for server projects
* feat: add the concept of linked worlds for server instances and keep in sync with server project
* fix: router.push doesn't add history state, use nagivateTo instead
* fix: get server modpack content wrong link
* update some categories to default collapse
* small fixes
* optional languages & bedrock
* move creator below tags
* sort linked worlds to be first
* add red orange and green ping variants
* bring back content tab
* add download button in required content in app
* fix: server info card loading
* fix: brief flash of normal project before server project stuff loads in
* misc fixes
* invalidate project v3
* fix unused imports
* Quick pass for moderation related changes (#5429)
* filter certain nags out from server projects.
* move add-links nag to links.ts
* first few server related nags
* moderation checklist groundwork
* Prevent undefined stage from appearing on servers.
* add projectV3 to shouldShow callback
* Filter buttons by server project type
* fix, revert private use msg, adjust server & link nags
* starting tags + servers msg
* fix no projectV3
* fix: router.push doesn't add history state, use nagivateTo instead
* Tags nag works with servers now
* support servers' v3 exclusive links
* reupload, and status messages + nag tweaks.
* fixes
* Update tags.vue warning for server projects.
* don't suggest adding a bedrock IP
* Tweak phrasing on servers alert msg
---------
Signed-off-by: Truman Gao <106889354+tdgao@users.noreply.github.com>
Co-authored-by: tdgao <mr.trumgao@gmail.com>
Co-authored-by: Truman Gao <106889354+tdgao@users.noreply.github.com>
* only show unique tags in project card
* add projectV3 to cache purge
* fix type: add projectV3 to cache purge
* update caching behaviour for installing
* max 3 plays per user
* accept date_modified and date_created for sorting
* add locking environment filter for server instance and update copy
* custom pack button only shows when needed (#5444)
* expose server pinging route to frontend
* feat: add server field validation with pinging on unfocus
* improve pinging logs
* try another pinging crate
* small fixes
* prefill published project id for updating published project
* fix running app bar for mac
* cargo sqlx prepare
* fix app login avatar
* pnpm prepr
* fix download menu for mac
* FIX CI
* fix lint errors
* cargo fmt
* fix toml
* fix more lint
* add server copy
* more lint
* fix any types
* also ping unlisted and private servers
* fix lint
* remove option for showTypeSelector
* fix cannot read user from undefined
* pnpm prepr
* update pinging to make it better
* update copy
* fix login cache issue
* add project select default icon
* fix: minecraft_java_server not redirecting
* pnpm prepr
* fix required content card in project page for custom modpack
* fix app project cards custom modpacks
* update pre-collapsed for app frontend
* don't send server projects to discord webhook
* add lock icon to linked world managed by server project
* pnpm prepr
* make automod msgs on server projects private
* fix pagination for server projects tab
* fix recent plays copy
* fix sync linked world with server project
* pnpm prepr
* add 0.11.0 changelog
* update date
---------
Signed-off-by: Truman Gao <106889354+tdgao@users.noreply.github.com>
Co-authored-by: aecsocket <aecsocket@tutanota.com>
Co-authored-by: coolbot <76798835+coolbot100s@users.noreply.github.com>
2026-03-02 15:38:09 -08:00
|
|
|
isServerInstance?: boolean
|
2025-05-01 16:13:13 -07:00
|
|
|
}>()
|
2023-04-08 18:54:38 -07:00
|
|
|
|
2025-04-19 15:44:46 +02:00
|
|
|
type ProjectListEntryAuthor = {
|
2025-08-14 21:48:38 +01:00
|
|
|
name: string
|
|
|
|
|
slug: string
|
|
|
|
|
type: 'user' | 'organization'
|
2025-04-19 15:44:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type ProjectListEntry = {
|
2025-08-14 21:48:38 +01:00
|
|
|
path: string
|
|
|
|
|
name: string
|
|
|
|
|
slug?: string
|
|
|
|
|
author: ProjectListEntryAuthor | null
|
|
|
|
|
version: string | null
|
|
|
|
|
file_name: string
|
|
|
|
|
icon: string | undefined
|
|
|
|
|
disabled: boolean
|
|
|
|
|
updateVersion?: string
|
|
|
|
|
outdated: boolean
|
|
|
|
|
updated: dayjs.Dayjs
|
|
|
|
|
project_type: string
|
|
|
|
|
id?: string
|
|
|
|
|
updating?: boolean
|
|
|
|
|
selected?: boolean
|
2025-04-19 15:44:46 +02:00
|
|
|
}
|
|
|
|
|
|
2023-09-12 09:27:03 -07:00
|
|
|
const isPackLocked = computed(() => {
|
2025-08-14 21:48:38 +01:00
|
|
|
return props.instance.linked_data && props.instance.linked_data.locked
|
2023-08-14 17:02:22 -04:00
|
|
|
})
|
feat: linked server instances (#5221)
* ping queue with tests
* mc ping server info + timeout
* sqlx prepare
* tombi fmt
* tombi fmt
* allow querying server ping data
* fix shear
* wip: resolve comments with pings
* Switch to Redis for server pings
* tombi fmt
* fix compile error
* clear cache on project ping, add server store link
* Schema changes
* Improve server messages for app pinging
* synthetic server project version for search indexing
* wip: clean up server ping, background tasks
* fix migration to sync with main, propagate background task errors
* wip: server modpack content query, components in search
* wip: massive component query refactor
* fix more defaults stuff
* sqlx
* fix serde deser flatten
* fix search indexing not showing fields
* remove leftover prompt
* fix import
* add diff detection for version dependencies without version_id/project_id
* move servers tab to end
* hide app nav tabs if only one tab
* fix undefined property
* on click link for server side bar info
* show recommended & supported versions for vanilla
* fix how install.js installs instance with modpack content title instead of server project title and dont fetch icon when installing to existing instance
* use large play button instance
* show update success instead of launching right into the game
* add global installing server project state
* add comment
* small change: open discover to modpack
* implement ping server projects for latency in app
* add projectV3 to nag context for moderation package
* fix play server project button when instance is launched
* add ping to project header
* wip: server verified plays
* server verified plays compiling
* queue up server plays in batches
* report server plays improved in frontend
* fixes to tracking server joins
* fix: server project detection to do loose null check
* fix server projects showing license
* fix empty server info card
* fix server projects links title
* Fix backend impl for server player count analytics
* fix: allow for links to be set to empty
* hook up server recent plays
* cargo sqlx prepare
* add project sidebar stories
* feat: update project sidebar server info card to new design
* update server project header and project card
* feat: add hide label for project cards
* feat: add tags sidebar card
* small fix to keep color consistent
* fix: remove required content tab from server project page
* many small fixes
* handle locking server instance content
* fix hiding modal after saving server compatibility version
* copy content card item and table from content tab update branch
* fix nav tabs active tag
* fix switching between server instance vs regular instance persisted invalid state
* fix a lot of the bugginess of navtabs when theres hidden/shown tabs between instances. match frontend nav tabs
* hook up backend searchfor frontend in websiet
* fix: server project card tags
* hook up search v3 in app backend for app frontend
* Don't return missing components in project query
* Add game versions to server filters
* move reporting server joins to backend
* send account UUID along with server play analytics
* update java server ping schema
* feat: implement use server search for search sorting and filter facets
* pnpm prepr
* fix game version filter facet
* fix: allow java and bedrock addresses to be deleted
* feat: hook up languages
* Default deserialize `ProjectSerial`
* feat: show server project tags
* small fix on languages multi select
* also default java server content
* fix: update compatibility modal not closing after successful upload
* remove play button in website discovery for servers
* reenable fence in app backend
* update online/offline tag
* add online status indicator pulsing
* revert pulsing
* disable link for custom modpack project and show tooltip
* change modpack to modded type
* update ip address entire button to be clickable
* polish server info card styles
* make offline tag red and properly hook up online tag
* move server related settings into own tab
* fix setting project compatibility resets unsaved changes
* fix javaServerPatchaData wiping content field
* updates to compatibility card, add download button and display supported versions better
* fix unsaved changes popup for tags
* remove console.log
* fix incorrect project type in projects in dashboard
* fix: savable.ts to reset currentValues to data() after save
* upload server banner as gallery image with title == "__mc_server_banner__" and filter it from frontend gallery
* fix error handling and helper text copy
* ensure gallery banners are filtered in app backend gallery display
* add grouped filters for search
* add query params for server search
* feat: deep linking to open server project page then open install to play
* fix search in app frontend
* fix: server project showing offline
* fix: profile create error app backend
Here's what was happening and the fix:
Root cause: In create.rs:107, profile_create assumed the icon_path parameter was always a local filename relative to the caches directory. It did caches_dir().join(icon) which produced a path like ...\caches\https://staging-cdn.modrinth.com/... — the colons in https:// are illegal in Windows paths (OS error 123).
The frontend's installServerProject and createVanillaInstance in install.js:290 both pass project.icon_url (a full URL) directly as the icon parameter.
Fix: Modified profile_create to detect when the icon parameter is a URL (starts with http:// or https://). When it is, it downloads the icon via fetch(), extracts the filename from the URL path, and passes the downloaded bytes and filename to set_icon() which hashes and caches it properly. The existing local-file path continues to work as before.
* pass undefined instead of unknown for modpack content modal
* fix: wrong way to determine offline status
* delete required content page placeholder
* fix: redirect running function instead of passing function
* add in wiki page
* fix diffs which have unknown project/filename
* pnpm prepr
* feat: add handling for "stop" instance state for server project card and page play button
* fix updating modpack shouldn't launch right into game
* small fix on external icon
* fix refresh search causing infinite rerender i.e. maximum call stack size exceeded
watch(route) → watch(() => [route.query.i, route.query.ai, route.path]) (line 102): The deep watch on the entire Vue Router route object was the most likely cause of the stack overflow. Vue Router's route object contains matched records with component definitions and other deeply nested structures. Deep-watching it triggers recursive traversal on every route change (including those from router.replace() inside refreshSearch()). Now it only watches the specific properties that updateInstanceContext() actually needs.
ref → shallowRef for serverHits and serverPings (line 189-190): The v3 search results can be deeply nested objects (minecraft_java_server.ping.data, content, etc.). Using shallowRef prevents Vue from creating deep reactive proxies on these objects, which is consistent with how results already uses shallowRef on line 295.
Re-entrance guard + try/catch on refreshSearch() (line 310): The watcher calls refreshSearch() without awaiting, so state changes during the async execution could trigger the watcher again, causing concurrent calls. The guard prevents overlapping calls, and the try/catch ensures loading.value = false is always reached (fixing the infinite loading).
* don't require auth token for logging server play
* fetch latest server player count from redis instead of search doc
* remove components. in search facet
* Category and search sort fixes
* add logging for refreshSearch in browse.vue
* fix: use windows.history.replace instead of router.replace due to vue production bug and remove logs
* fix: server refresh search reactivity
* fix: type errors
* conquer the type errors in Browse.vue
* update search input background
* fix tags location
* slight change to color
* feat: add linked to modpack project for regular modpack instances
* feat: installation tab updates
* fix: copy ip missing hover effect
* feat: implement category and countries negative filters
* fix servers tab label in profile page
* implement add server to instance
* feat: implement allow editing server instances
* update installation settings to handle vanilla server instance case
* hide servers tab when installing content to instance
* add sorting for user installed content to be top of list in content
* update categories filters from one group filter card to separate filters cards
* add active scale
* fix offline server showing online
* update language display
* update tooltip
* hide navtabs if theres only one tab
* fix: modpack content name truncate in project card
* feat: add server projects to moderation queue
* update redirect middleware no longer needs projectV3
* update comment
* fix: server tags labels
* feat: add the mf icons finally
* Revert "update redirect middleware no longer needs projectV3"
This reverts commit 1289cb52869185abe1481dfb6b0c00c0233bf59e.
* fix open in browser
* revert any handling for handling base linked modpack content for content tab
* update instance online players to be client ping
* fix showing modpack/loader version for server instance in installation settings
* server projects are not marked as modpacks
* skip license check for server projects
* feat: add the concept of linked worlds for server instances and keep in sync with server project
* fix: router.push doesn't add history state, use nagivateTo instead
* fix: get server modpack content wrong link
* update some categories to default collapse
* small fixes
* optional languages & bedrock
* move creator below tags
* sort linked worlds to be first
* add red orange and green ping variants
* bring back content tab
* add download button in required content in app
* fix: server info card loading
* fix: brief flash of normal project before server project stuff loads in
* misc fixes
* invalidate project v3
* fix unused imports
* Quick pass for moderation related changes (#5429)
* filter certain nags out from server projects.
* move add-links nag to links.ts
* first few server related nags
* moderation checklist groundwork
* Prevent undefined stage from appearing on servers.
* add projectV3 to shouldShow callback
* Filter buttons by server project type
* fix, revert private use msg, adjust server & link nags
* starting tags + servers msg
* fix no projectV3
* fix: router.push doesn't add history state, use nagivateTo instead
* Tags nag works with servers now
* support servers' v3 exclusive links
* reupload, and status messages + nag tweaks.
* fixes
* Update tags.vue warning for server projects.
* don't suggest adding a bedrock IP
* Tweak phrasing on servers alert msg
---------
Signed-off-by: Truman Gao <106889354+tdgao@users.noreply.github.com>
Co-authored-by: tdgao <mr.trumgao@gmail.com>
Co-authored-by: Truman Gao <106889354+tdgao@users.noreply.github.com>
* only show unique tags in project card
* add projectV3 to cache purge
* fix type: add projectV3 to cache purge
* update caching behaviour for installing
* max 3 plays per user
* accept date_modified and date_created for sorting
* add locking environment filter for server instance and update copy
* custom pack button only shows when needed (#5444)
* expose server pinging route to frontend
* feat: add server field validation with pinging on unfocus
* improve pinging logs
* try another pinging crate
* small fixes
* prefill published project id for updating published project
* fix running app bar for mac
* cargo sqlx prepare
* fix app login avatar
* pnpm prepr
* fix download menu for mac
* FIX CI
* fix lint errors
* cargo fmt
* fix toml
* fix more lint
* add server copy
* more lint
* fix any types
* also ping unlisted and private servers
* fix lint
* remove option for showTypeSelector
* fix cannot read user from undefined
* pnpm prepr
* update pinging to make it better
* update copy
* fix login cache issue
* add project select default icon
* fix: minecraft_java_server not redirecting
* pnpm prepr
* fix required content card in project page for custom modpack
* fix app project cards custom modpacks
* update pre-collapsed for app frontend
* don't send server projects to discord webhook
* add lock icon to linked world managed by server project
* pnpm prepr
* make automod msgs on server projects private
* fix pagination for server projects tab
* fix recent plays copy
* fix sync linked world with server project
* pnpm prepr
* add 0.11.0 changelog
* update date
---------
Signed-off-by: Truman Gao <106889354+tdgao@users.noreply.github.com>
Co-authored-by: aecsocket <aecsocket@tutanota.com>
Co-authored-by: coolbot <76798835+coolbot100s@users.noreply.github.com>
2026-03-02 15:38:09 -08:00
|
|
|
|
2023-08-05 17:43:21 -07:00
|
|
|
const canUpdatePack = computed(() => {
|
2026-03-03 12:24:53 -08:00
|
|
|
if (props.isServerInstance) return false
|
2025-08-14 21:48:38 +01:00
|
|
|
if (!props.instance.linked_data || !props.versions || !props.versions[0]) return false
|
|
|
|
|
return props.instance.linked_data.version_id !== props.versions[0].id
|
2023-08-05 17:43:21 -07:00
|
|
|
})
|
2023-08-14 17:02:22 -04:00
|
|
|
const exportModal = ref(null)
|
2023-06-14 20:56:32 -04:00
|
|
|
|
2025-04-19 15:44:46 +02:00
|
|
|
const projects = ref<ProjectListEntry[]>([])
|
2025-05-01 16:13:13 -07:00
|
|
|
const selectedFiles = ref<string[]>([])
|
App redesign (#2946)
* Start of app redesign
* format
* continue progress
* Content page nearly done
* Fix recursion issues with content page
* Fix update all alignment
* Discover page progress
* Settings progress
* Removed unlocked-size hack that breaks web
* Revamp project page, refactor web project page to share code with app, fixed loading bar, misc UI/UX enhancements, update ko-fi logo, update arrow icons, fix web issues caused by floating-vue migration, fix tooltip issues, update web tooltips, clean up web hydration issues
* Ads + run prettier
* Begin auth refactor, move common messages to ui lib, add i18n extraction to all apps, begin Library refactor
* fix ads not hiding when plus log in
* rev lockfile changes/conflicts
* Fix sign in page
* Add generated
* (mostly) Data driven search
* Fix search mobile issue
* profile fixes
* Project versions page, fix typescript on UI lib and misc fixes
* Remove unused gallery component
* Fix linkfunction err
* Search filter controls at top, localization for locked filters
* Fix provided filter names
* Fix navigating from instance browse to main browse
* Friends frontend (#2995)
* Friends system frontend
* (almost) finish frontend
* finish friends, fix lint
* Fix lint
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
* Refresh macOS app icon
* Update web search UI more
* Fix link opens
* Fix frontend build
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
Co-authored-by: Jai A <jaiagr+gpg@pm.me>
Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
2024-12-11 19:54:18 -08:00
|
|
|
const selectedProjects = computed(() =>
|
2025-08-14 21:48:38 +01:00
|
|
|
projects.value.filter((x) => selectedFiles.value.includes(x.file_name)),
|
App redesign (#2946)
* Start of app redesign
* format
* continue progress
* Content page nearly done
* Fix recursion issues with content page
* Fix update all alignment
* Discover page progress
* Settings progress
* Removed unlocked-size hack that breaks web
* Revamp project page, refactor web project page to share code with app, fixed loading bar, misc UI/UX enhancements, update ko-fi logo, update arrow icons, fix web issues caused by floating-vue migration, fix tooltip issues, update web tooltips, clean up web hydration issues
* Ads + run prettier
* Begin auth refactor, move common messages to ui lib, add i18n extraction to all apps, begin Library refactor
* fix ads not hiding when plus log in
* rev lockfile changes/conflicts
* Fix sign in page
* Add generated
* (mostly) Data driven search
* Fix search mobile issue
* profile fixes
* Project versions page, fix typescript on UI lib and misc fixes
* Remove unused gallery component
* Fix linkfunction err
* Search filter controls at top, localization for locked filters
* Fix provided filter names
* Fix navigating from instance browse to main browse
* Friends frontend (#2995)
* Friends system frontend
* (almost) finish frontend
* finish friends, fix lint
* Fix lint
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
* Refresh macOS app icon
* Update web search UI more
* Fix link opens
* Fix frontend build
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
Co-authored-by: Jai A <jaiagr+gpg@pm.me>
Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
2024-12-11 19:54:18 -08:00
|
|
|
)
|
|
|
|
|
|
2024-07-24 11:03:19 -07:00
|
|
|
const selectionMap = ref(new Map())
|
|
|
|
|
|
2025-05-01 16:13:13 -07:00
|
|
|
const initProjects = async (cacheBehaviour?: CacheBehaviour) => {
|
2025-08-14 21:48:38 +01:00
|
|
|
const newProjects: ProjectListEntry[] = []
|
|
|
|
|
|
|
|
|
|
const profileProjects = (await get_projects(props.instance.path, cacheBehaviour)) as Record<
|
|
|
|
|
string,
|
|
|
|
|
ContentFile
|
|
|
|
|
>
|
|
|
|
|
const fetchProjects = []
|
|
|
|
|
const fetchVersions = []
|
|
|
|
|
|
|
|
|
|
for (const value of Object.values(profileProjects)) {
|
|
|
|
|
if (value.metadata) {
|
|
|
|
|
fetchProjects.push(value.metadata.project_id)
|
|
|
|
|
fetchVersions.push(value.metadata.version_id)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const [modrinthProjects, modrinthVersions] = await Promise.all([
|
|
|
|
|
(await get_project_many(fetchProjects).catch(handleError)) as Project[],
|
|
|
|
|
(await get_version_many(fetchVersions).catch(handleError)) as Version[],
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
const [modrinthTeams, modrinthOrganizations] = await Promise.all([
|
|
|
|
|
(await get_team_many(modrinthProjects.map((x) => x.team)).catch(handleError)) as TeamMember[][],
|
|
|
|
|
(await get_organization_many(
|
|
|
|
|
modrinthProjects.map((x) => x.organization).filter((x) => !!x),
|
|
|
|
|
).catch(handleError)) as Organization[],
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
for (const [path, file] of Object.entries(profileProjects)) {
|
|
|
|
|
if (file.metadata) {
|
|
|
|
|
const project = modrinthProjects.find((x) => file.metadata?.project_id === x.id)
|
|
|
|
|
const version = modrinthVersions.find((x) => file.metadata?.version_id === x.id)
|
|
|
|
|
|
|
|
|
|
if (project && version) {
|
|
|
|
|
const org = project.organization
|
|
|
|
|
? modrinthOrganizations.find((x) => x.id === project.organization)
|
|
|
|
|
: null
|
|
|
|
|
|
|
|
|
|
const team = modrinthTeams.find((x) => x[0].team_id === project.team)
|
|
|
|
|
|
|
|
|
|
let author: ProjectListEntryAuthor | null = null
|
|
|
|
|
if (org) {
|
|
|
|
|
author = {
|
|
|
|
|
name: org.name,
|
|
|
|
|
slug: org.slug,
|
|
|
|
|
type: 'organization',
|
|
|
|
|
}
|
|
|
|
|
} else if (team) {
|
|
|
|
|
const teamMember = team.find((x) => x.is_owner)
|
|
|
|
|
if (teamMember) {
|
|
|
|
|
author = {
|
|
|
|
|
name: teamMember.user.username,
|
|
|
|
|
slug: teamMember.user.username,
|
|
|
|
|
type: 'user',
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
newProjects.push({
|
|
|
|
|
path,
|
|
|
|
|
name: project.title,
|
|
|
|
|
slug: project.slug,
|
|
|
|
|
author,
|
|
|
|
|
version: version.version_number,
|
|
|
|
|
file_name: file.file_name,
|
|
|
|
|
icon: project.icon_url,
|
|
|
|
|
disabled: file.file_name.endsWith('.disabled'),
|
|
|
|
|
updateVersion: file.update_version_id,
|
|
|
|
|
updated: dayjs(version.date_published),
|
|
|
|
|
outdated: !!file.update_version_id,
|
|
|
|
|
project_type: project.project_type,
|
|
|
|
|
id: project.id,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
continue
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
newProjects.push({
|
|
|
|
|
path,
|
|
|
|
|
name: file.file_name.replace('.disabled', ''),
|
|
|
|
|
author: null,
|
|
|
|
|
version: null,
|
|
|
|
|
file_name: file.file_name,
|
|
|
|
|
icon: undefined,
|
|
|
|
|
disabled: file.file_name.endsWith('.disabled'),
|
|
|
|
|
outdated: false,
|
|
|
|
|
updated: dayjs(0),
|
|
|
|
|
project_type: file.project_type === 'shaderpack' ? 'shader' : file.project_type,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
projects.value = newProjects ?? []
|
|
|
|
|
|
|
|
|
|
const newSelectionMap = new Map()
|
|
|
|
|
for (const project of projects.value) {
|
|
|
|
|
newSelectionMap.set(
|
|
|
|
|
project.path,
|
|
|
|
|
selectionMap.value.get(project.path) ??
|
|
|
|
|
selectionMap.value.get(project.path.slice(0, -9)) ??
|
|
|
|
|
selectionMap.value.get(project.path + '.disabled') ??
|
|
|
|
|
false,
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
selectionMap.value = newSelectionMap
|
2023-04-08 18:54:38 -07:00
|
|
|
}
|
2024-07-24 11:03:19 -07:00
|
|
|
await initProjects()
|
2023-08-04 19:51:46 -07:00
|
|
|
|
2025-05-01 16:13:13 -07:00
|
|
|
const modpackVersionModal = ref<InstanceType<typeof ModpackVersionModal> | null>()
|
2023-09-12 09:27:03 -07:00
|
|
|
const installing = computed(() => props.instance.install_stage !== 'installed')
|
|
|
|
|
|
App redesign (#2946)
* Start of app redesign
* format
* continue progress
* Content page nearly done
* Fix recursion issues with content page
* Fix update all alignment
* Discover page progress
* Settings progress
* Removed unlocked-size hack that breaks web
* Revamp project page, refactor web project page to share code with app, fixed loading bar, misc UI/UX enhancements, update ko-fi logo, update arrow icons, fix web issues caused by floating-vue migration, fix tooltip issues, update web tooltips, clean up web hydration issues
* Ads + run prettier
* Begin auth refactor, move common messages to ui lib, add i18n extraction to all apps, begin Library refactor
* fix ads not hiding when plus log in
* rev lockfile changes/conflicts
* Fix sign in page
* Add generated
* (mostly) Data driven search
* Fix search mobile issue
* profile fixes
* Project versions page, fix typescript on UI lib and misc fixes
* Remove unused gallery component
* Fix linkfunction err
* Search filter controls at top, localization for locked filters
* Fix provided filter names
* Fix navigating from instance browse to main browse
* Friends frontend (#2995)
* Friends system frontend
* (almost) finish frontend
* finish friends, fix lint
* Fix lint
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
* Refresh macOS app icon
* Update web search UI more
* Fix link opens
* Fix frontend build
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
Co-authored-by: Jai A <jaiagr+gpg@pm.me>
Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
2024-12-11 19:54:18 -08:00
|
|
|
const vintl = useVIntl()
|
|
|
|
|
const { formatMessage } = vintl
|
|
|
|
|
|
|
|
|
|
type FilterOption = {
|
2025-08-14 21:48:38 +01:00
|
|
|
id: string
|
|
|
|
|
formattedName: string
|
App redesign (#2946)
* Start of app redesign
* format
* continue progress
* Content page nearly done
* Fix recursion issues with content page
* Fix update all alignment
* Discover page progress
* Settings progress
* Removed unlocked-size hack that breaks web
* Revamp project page, refactor web project page to share code with app, fixed loading bar, misc UI/UX enhancements, update ko-fi logo, update arrow icons, fix web issues caused by floating-vue migration, fix tooltip issues, update web tooltips, clean up web hydration issues
* Ads + run prettier
* Begin auth refactor, move common messages to ui lib, add i18n extraction to all apps, begin Library refactor
* fix ads not hiding when plus log in
* rev lockfile changes/conflicts
* Fix sign in page
* Add generated
* (mostly) Data driven search
* Fix search mobile issue
* profile fixes
* Project versions page, fix typescript on UI lib and misc fixes
* Remove unused gallery component
* Fix linkfunction err
* Search filter controls at top, localization for locked filters
* Fix provided filter names
* Fix navigating from instance browse to main browse
* Friends frontend (#2995)
* Friends system frontend
* (almost) finish frontend
* finish friends, fix lint
* Fix lint
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
* Refresh macOS app icon
* Update web search UI more
* Fix link opens
* Fix frontend build
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
Co-authored-by: Jai A <jaiagr+gpg@pm.me>
Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
2024-12-11 19:54:18 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const messages = defineMessages({
|
2025-08-14 21:48:38 +01:00
|
|
|
updatesAvailableFilter: {
|
|
|
|
|
id: 'instance.filter.updates-available',
|
|
|
|
|
defaultMessage: 'Updates available',
|
|
|
|
|
},
|
|
|
|
|
disabledFilter: {
|
|
|
|
|
id: 'instance.filter.disabled',
|
|
|
|
|
defaultMessage: 'Disabled projects',
|
|
|
|
|
},
|
App redesign (#2946)
* Start of app redesign
* format
* continue progress
* Content page nearly done
* Fix recursion issues with content page
* Fix update all alignment
* Discover page progress
* Settings progress
* Removed unlocked-size hack that breaks web
* Revamp project page, refactor web project page to share code with app, fixed loading bar, misc UI/UX enhancements, update ko-fi logo, update arrow icons, fix web issues caused by floating-vue migration, fix tooltip issues, update web tooltips, clean up web hydration issues
* Ads + run prettier
* Begin auth refactor, move common messages to ui lib, add i18n extraction to all apps, begin Library refactor
* fix ads not hiding when plus log in
* rev lockfile changes/conflicts
* Fix sign in page
* Add generated
* (mostly) Data driven search
* Fix search mobile issue
* profile fixes
* Project versions page, fix typescript on UI lib and misc fixes
* Remove unused gallery component
* Fix linkfunction err
* Search filter controls at top, localization for locked filters
* Fix provided filter names
* Fix navigating from instance browse to main browse
* Friends frontend (#2995)
* Friends system frontend
* (almost) finish frontend
* finish friends, fix lint
* Fix lint
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
* Refresh macOS app icon
* Update web search UI more
* Fix link opens
* Fix frontend build
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
Co-authored-by: Jai A <jaiagr+gpg@pm.me>
Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
2024-12-11 19:54:18 -08:00
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const filterOptions: ComputedRef<FilterOption[]> = computed(() => {
|
2025-08-14 21:48:38 +01:00
|
|
|
const options: FilterOption[] = []
|
|
|
|
|
|
|
|
|
|
const frequency = projects.value.reduce((map: Record<string, number>, item) => {
|
|
|
|
|
map[item.project_type] = (map[item.project_type] || 0) + 1
|
|
|
|
|
return map
|
|
|
|
|
}, {})
|
|
|
|
|
|
|
|
|
|
const types = Object.keys(frequency).sort((a, b) => frequency[b] - frequency[a])
|
|
|
|
|
|
|
|
|
|
types.forEach((type) => {
|
|
|
|
|
options.push({
|
|
|
|
|
id: type,
|
|
|
|
|
formattedName: formatProjectType(type) + 's',
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
if (!isPackLocked.value && projects.value.some((m) => m.outdated)) {
|
|
|
|
|
options.push({
|
|
|
|
|
id: 'updates',
|
|
|
|
|
formattedName: formatMessage(messages.updatesAvailableFilter),
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (projects.value.some((m) => m.disabled)) {
|
|
|
|
|
options.push({
|
|
|
|
|
id: 'disabled',
|
|
|
|
|
formattedName: formatMessage(messages.disabledFilter),
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return options
|
App redesign (#2946)
* Start of app redesign
* format
* continue progress
* Content page nearly done
* Fix recursion issues with content page
* Fix update all alignment
* Discover page progress
* Settings progress
* Removed unlocked-size hack that breaks web
* Revamp project page, refactor web project page to share code with app, fixed loading bar, misc UI/UX enhancements, update ko-fi logo, update arrow icons, fix web issues caused by floating-vue migration, fix tooltip issues, update web tooltips, clean up web hydration issues
* Ads + run prettier
* Begin auth refactor, move common messages to ui lib, add i18n extraction to all apps, begin Library refactor
* fix ads not hiding when plus log in
* rev lockfile changes/conflicts
* Fix sign in page
* Add generated
* (mostly) Data driven search
* Fix search mobile issue
* profile fixes
* Project versions page, fix typescript on UI lib and misc fixes
* Remove unused gallery component
* Fix linkfunction err
* Search filter controls at top, localization for locked filters
* Fix provided filter names
* Fix navigating from instance browse to main browse
* Friends frontend (#2995)
* Friends system frontend
* (almost) finish frontend
* finish friends, fix lint
* Fix lint
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
* Refresh macOS app icon
* Update web search UI more
* Fix link opens
* Fix frontend build
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
Co-authored-by: Jai A <jaiagr+gpg@pm.me>
Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
2024-12-11 19:54:18 -08:00
|
|
|
})
|
|
|
|
|
|
2025-11-06 23:56:00 -08:00
|
|
|
const selectedFilters = useStorage<string[]>(
|
|
|
|
|
`${props.instance.name}-mod-selected-filters`,
|
|
|
|
|
[],
|
|
|
|
|
sessionStorage,
|
|
|
|
|
{ mergeDefaults: true },
|
|
|
|
|
)
|
|
|
|
|
|
App redesign (#2946)
* Start of app redesign
* format
* continue progress
* Content page nearly done
* Fix recursion issues with content page
* Fix update all alignment
* Discover page progress
* Settings progress
* Removed unlocked-size hack that breaks web
* Revamp project page, refactor web project page to share code with app, fixed loading bar, misc UI/UX enhancements, update ko-fi logo, update arrow icons, fix web issues caused by floating-vue migration, fix tooltip issues, update web tooltips, clean up web hydration issues
* Ads + run prettier
* Begin auth refactor, move common messages to ui lib, add i18n extraction to all apps, begin Library refactor
* fix ads not hiding when plus log in
* rev lockfile changes/conflicts
* Fix sign in page
* Add generated
* (mostly) Data driven search
* Fix search mobile issue
* profile fixes
* Project versions page, fix typescript on UI lib and misc fixes
* Remove unused gallery component
* Fix linkfunction err
* Search filter controls at top, localization for locked filters
* Fix provided filter names
* Fix navigating from instance browse to main browse
* Friends frontend (#2995)
* Friends system frontend
* (almost) finish frontend
* finish friends, fix lint
* Fix lint
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
* Refresh macOS app icon
* Update web search UI more
* Fix link opens
* Fix frontend build
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
Co-authored-by: Jai A <jaiagr+gpg@pm.me>
Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
2024-12-11 19:54:18 -08:00
|
|
|
const filteredProjects = computed(() => {
|
2025-08-14 21:48:38 +01:00
|
|
|
const updatesFilter = selectedFilters.value.includes('updates')
|
|
|
|
|
const disabledFilter = selectedFilters.value.includes('disabled')
|
|
|
|
|
|
|
|
|
|
const typeFilters = selectedFilters.value.filter(
|
|
|
|
|
(filter) => filter !== 'updates' && filter !== 'disabled',
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
return projects.value.filter((project) => {
|
|
|
|
|
return (
|
|
|
|
|
(typeFilters.length === 0 || typeFilters.includes(project.project_type)) &&
|
|
|
|
|
(!updatesFilter || project.outdated) &&
|
|
|
|
|
(!disabledFilter || project.disabled)
|
|
|
|
|
)
|
|
|
|
|
})
|
App redesign (#2946)
* Start of app redesign
* format
* continue progress
* Content page nearly done
* Fix recursion issues with content page
* Fix update all alignment
* Discover page progress
* Settings progress
* Removed unlocked-size hack that breaks web
* Revamp project page, refactor web project page to share code with app, fixed loading bar, misc UI/UX enhancements, update ko-fi logo, update arrow icons, fix web issues caused by floating-vue migration, fix tooltip issues, update web tooltips, clean up web hydration issues
* Ads + run prettier
* Begin auth refactor, move common messages to ui lib, add i18n extraction to all apps, begin Library refactor
* fix ads not hiding when plus log in
* rev lockfile changes/conflicts
* Fix sign in page
* Add generated
* (mostly) Data driven search
* Fix search mobile issue
* profile fixes
* Project versions page, fix typescript on UI lib and misc fixes
* Remove unused gallery component
* Fix linkfunction err
* Search filter controls at top, localization for locked filters
* Fix provided filter names
* Fix navigating from instance browse to main browse
* Friends frontend (#2995)
* Friends system frontend
* (almost) finish frontend
* finish friends, fix lint
* Fix lint
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
* Refresh macOS app icon
* Update web search UI more
* Fix link opens
* Fix frontend build
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
Co-authored-by: Jai A <jaiagr+gpg@pm.me>
Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
2024-12-11 19:54:18 -08:00
|
|
|
})
|
|
|
|
|
|
2024-12-22 20:03:58 -07:00
|
|
|
watch(filterOptions, () => {
|
2025-08-14 21:48:38 +01:00
|
|
|
for (let i = 0; i < selectedFilters.value.length; i++) {
|
|
|
|
|
const option = selectedFilters.value[i]
|
|
|
|
|
if (!filterOptions.value.some((x) => x.id === option)) {
|
|
|
|
|
selectedFilters.value.splice(i, 1)
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-12-22 20:03:58 -07:00
|
|
|
})
|
|
|
|
|
|
2025-05-01 16:13:13 -07:00
|
|
|
function toggleArray<T>(array: T[], value: T) {
|
2025-08-14 21:48:38 +01:00
|
|
|
if (array.includes(value)) {
|
|
|
|
|
array.splice(array.indexOf(value), 1)
|
|
|
|
|
} else {
|
|
|
|
|
array.push(value)
|
|
|
|
|
}
|
App redesign (#2946)
* Start of app redesign
* format
* continue progress
* Content page nearly done
* Fix recursion issues with content page
* Fix update all alignment
* Discover page progress
* Settings progress
* Removed unlocked-size hack that breaks web
* Revamp project page, refactor web project page to share code with app, fixed loading bar, misc UI/UX enhancements, update ko-fi logo, update arrow icons, fix web issues caused by floating-vue migration, fix tooltip issues, update web tooltips, clean up web hydration issues
* Ads + run prettier
* Begin auth refactor, move common messages to ui lib, add i18n extraction to all apps, begin Library refactor
* fix ads not hiding when plus log in
* rev lockfile changes/conflicts
* Fix sign in page
* Add generated
* (mostly) Data driven search
* Fix search mobile issue
* profile fixes
* Project versions page, fix typescript on UI lib and misc fixes
* Remove unused gallery component
* Fix linkfunction err
* Search filter controls at top, localization for locked filters
* Fix provided filter names
* Fix navigating from instance browse to main browse
* Friends frontend (#2995)
* Friends system frontend
* (almost) finish frontend
* finish friends, fix lint
* Fix lint
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
* Refresh macOS app icon
* Update web search UI more
* Fix link opens
* Fix frontend build
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
Co-authored-by: Jai A <jaiagr+gpg@pm.me>
Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
2024-12-11 19:54:18 -08:00
|
|
|
}
|
|
|
|
|
|
2023-04-08 18:54:38 -07:00
|
|
|
const searchFilter = ref('')
|
2023-06-14 20:16:16 -04:00
|
|
|
const selectAll = ref(false)
|
2025-05-01 16:13:13 -07:00
|
|
|
const shareModal = ref<InstanceType<typeof ShareModalWrapper> | null>()
|
2023-07-20 12:56:48 -04:00
|
|
|
const ascending = ref(true)
|
|
|
|
|
const sortColumn = ref('Name')
|
2024-12-22 20:03:58 -07:00
|
|
|
const currentPage = ref(1)
|
2023-11-15 19:22:49 -05:00
|
|
|
|
2023-07-20 12:56:48 -04:00
|
|
|
const selected = computed(() =>
|
2025-08-14 21:48:38 +01:00
|
|
|
Array.from(selectionMap.value)
|
|
|
|
|
.filter((args) => {
|
|
|
|
|
return args[1]
|
|
|
|
|
})
|
|
|
|
|
.map((args) => {
|
|
|
|
|
return projects.value.find((x) => x.path === args[0])
|
|
|
|
|
}),
|
2023-07-20 12:56:48 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
const functionValues = computed(() =>
|
2025-08-14 21:48:38 +01:00
|
|
|
selectedProjects.value.length > 0 ? selectedProjects.value : Array.from(projects.value.values()),
|
2023-07-20 12:56:48 -04:00
|
|
|
)
|
2023-06-02 07:09:46 -07:00
|
|
|
|
2023-04-08 18:54:38 -07:00
|
|
|
const search = computed(() => {
|
2025-08-14 21:48:38 +01:00
|
|
|
const filtered = filteredProjects.value.filter((mod) => {
|
|
|
|
|
return mod.name.toLowerCase().includes(searchFilter.value.toLowerCase())
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
switch (sortColumn.value) {
|
|
|
|
|
case 'Updated':
|
|
|
|
|
return filtered.slice().sort((a, b) => {
|
|
|
|
|
const updated = a.updated.isAfter(b.updated) ? 1 : -1
|
|
|
|
|
return ascending.value ? -updated : updated
|
|
|
|
|
})
|
|
|
|
|
default:
|
|
|
|
|
return filtered
|
|
|
|
|
.slice()
|
|
|
|
|
.sort((a, b) =>
|
|
|
|
|
ascending.value ? a.name.localeCompare(b.name) : b.name.localeCompare(a.name),
|
|
|
|
|
)
|
|
|
|
|
}
|
App redesign (#2946)
* Start of app redesign
* format
* continue progress
* Content page nearly done
* Fix recursion issues with content page
* Fix update all alignment
* Discover page progress
* Settings progress
* Removed unlocked-size hack that breaks web
* Revamp project page, refactor web project page to share code with app, fixed loading bar, misc UI/UX enhancements, update ko-fi logo, update arrow icons, fix web issues caused by floating-vue migration, fix tooltip issues, update web tooltips, clean up web hydration issues
* Ads + run prettier
* Begin auth refactor, move common messages to ui lib, add i18n extraction to all apps, begin Library refactor
* fix ads not hiding when plus log in
* rev lockfile changes/conflicts
* Fix sign in page
* Add generated
* (mostly) Data driven search
* Fix search mobile issue
* profile fixes
* Project versions page, fix typescript on UI lib and misc fixes
* Remove unused gallery component
* Fix linkfunction err
* Search filter controls at top, localization for locked filters
* Fix provided filter names
* Fix navigating from instance browse to main browse
* Friends frontend (#2995)
* Friends system frontend
* (almost) finish frontend
* finish friends, fix lint
* Fix lint
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
* Refresh macOS app icon
* Update web search UI more
* Fix link opens
* Fix frontend build
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
Co-authored-by: Jai A <jaiagr+gpg@pm.me>
Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
2024-12-11 19:54:18 -08:00
|
|
|
})
|
2023-05-08 19:27:27 -04:00
|
|
|
|
2024-12-23 13:38:52 -07:00
|
|
|
watch([sortColumn, ascending, selectedFilters.value, searchFilter], () => (currentPage.value = 1))
|
2024-12-22 20:03:58 -07:00
|
|
|
|
2025-05-01 16:13:13 -07:00
|
|
|
const sortProjects = (filter: string) => {
|
2025-08-14 21:48:38 +01:00
|
|
|
if (sortColumn.value === filter) {
|
|
|
|
|
ascending.value = !ascending.value
|
|
|
|
|
} else {
|
|
|
|
|
sortColumn.value = filter
|
|
|
|
|
ascending.value = true
|
|
|
|
|
}
|
2023-07-20 12:56:48 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const updateAll = async () => {
|
2025-08-14 21:48:38 +01:00
|
|
|
const setProjects = []
|
2025-11-24 13:35:14 +00:00
|
|
|
const outdatedProjects = []
|
|
|
|
|
|
2025-08-14 21:48:38 +01:00
|
|
|
for (const [i, project] of projects.value.entries()) {
|
|
|
|
|
if (project.outdated) {
|
|
|
|
|
project.updating = true
|
|
|
|
|
setProjects.push(i)
|
2025-11-24 13:35:14 +00:00
|
|
|
if (project.updateVersion) {
|
|
|
|
|
outdatedProjects.push(project.updateVersion)
|
|
|
|
|
}
|
2025-08-14 21:48:38 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const paths = (await update_all(props.instance.path).catch(handleError)) as Record<string, string>
|
|
|
|
|
|
|
|
|
|
for (const [oldVal, newVal] of Object.entries(paths)) {
|
|
|
|
|
const index = projects.value.findIndex((x) => x.path === oldVal)
|
|
|
|
|
projects.value[index].path = newVal
|
|
|
|
|
projects.value[index].outdated = false
|
|
|
|
|
|
|
|
|
|
if (projects.value[index].updateVersion) {
|
|
|
|
|
projects.value[index].version = projects.value[index].updateVersion.version_number
|
|
|
|
|
projects.value[index].updateVersion = undefined
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-11-24 13:35:14 +00:00
|
|
|
|
|
|
|
|
if (outdatedProjects.length > 0) {
|
|
|
|
|
const profile = await get(props.instance.path).catch(handleError)
|
|
|
|
|
|
|
|
|
|
if (profile) {
|
|
|
|
|
for (const versionId of outdatedProjects) {
|
|
|
|
|
const versionData = await get_version(versionId, 'must_revalidate').catch(handleError)
|
|
|
|
|
|
|
|
|
|
if (versionData) {
|
|
|
|
|
await installVersionDependencies(profile, versionData).catch(handleError)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-08-14 21:48:38 +01:00
|
|
|
for (const project of setProjects) {
|
|
|
|
|
projects.value[project].updating = false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
trackEvent('InstanceUpdateAll', {
|
|
|
|
|
loader: props.instance.loader,
|
|
|
|
|
game_version: props.instance.game_version,
|
|
|
|
|
count: setProjects.length,
|
|
|
|
|
selected: selected.value.length > 1,
|
|
|
|
|
})
|
2023-07-20 12:56:48 -04:00
|
|
|
}
|
|
|
|
|
|
2025-05-01 16:13:13 -07:00
|
|
|
const updateProject = async (mod: ProjectListEntry) => {
|
2025-08-14 21:48:38 +01:00
|
|
|
mod.updating = true
|
|
|
|
|
await new Promise((resolve) => setTimeout(resolve, 0))
|
|
|
|
|
mod.path = await update_project(props.instance.path, mod.path).catch(handleError)
|
2025-11-24 13:35:14 +00:00
|
|
|
|
|
|
|
|
if (mod.updateVersion) {
|
|
|
|
|
const versionData = await get_version(mod.updateVersion, 'must_revalidate').catch(handleError)
|
|
|
|
|
|
|
|
|
|
if (versionData) {
|
|
|
|
|
const profile = await get(props.instance.path).catch(handleError)
|
|
|
|
|
|
|
|
|
|
if (profile) {
|
|
|
|
|
await installVersionDependencies(profile, versionData).catch(handleError)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-08-14 21:48:38 +01:00
|
|
|
mod.updating = false
|
|
|
|
|
|
|
|
|
|
mod.outdated = false
|
|
|
|
|
mod.version = mod.updateVersion?.version_number
|
|
|
|
|
mod.updateVersion = undefined
|
|
|
|
|
|
|
|
|
|
trackEvent('InstanceProjectUpdate', {
|
|
|
|
|
loader: props.instance.loader,
|
|
|
|
|
game_version: props.instance.game_version,
|
|
|
|
|
id: mod.id,
|
|
|
|
|
name: mod.name,
|
|
|
|
|
project_type: mod.project_type,
|
|
|
|
|
})
|
2023-05-18 17:12:36 -07:00
|
|
|
}
|
|
|
|
|
|
2025-05-01 16:13:13 -07:00
|
|
|
const locks: Record<string, string | null> = {}
|
2023-07-28 19:56:49 -07:00
|
|
|
|
2025-05-01 16:13:13 -07:00
|
|
|
const toggleDisableMod = async (mod: ProjectListEntry) => {
|
2025-08-14 21:48:38 +01:00
|
|
|
// Use mod's id as the key for the lock. If mod doesn't have a unique id, replace `mod.id` with some unique property.
|
|
|
|
|
const lock = locks[mod.file_name]
|
|
|
|
|
|
|
|
|
|
while (lock) {
|
|
|
|
|
await new Promise((resolve) => {
|
|
|
|
|
setTimeout((value: unknown) => resolve(value), 100)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
locks[mod.file_name] = 'lock'
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
mod.path = await toggle_disable_project(props.instance.path, mod.path)
|
|
|
|
|
mod.disabled = !mod.disabled
|
|
|
|
|
|
|
|
|
|
trackEvent('InstanceProjectDisable', {
|
|
|
|
|
loader: props.instance.loader,
|
|
|
|
|
game_version: props.instance.game_version,
|
|
|
|
|
id: mod.id,
|
|
|
|
|
name: mod.name,
|
|
|
|
|
project_type: mod.project_type,
|
|
|
|
|
disabled: mod.disabled,
|
|
|
|
|
})
|
|
|
|
|
} catch (err) {
|
|
|
|
|
handleError(err)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
locks[mod.file_name] = null
|
2023-05-18 17:12:36 -07:00
|
|
|
}
|
|
|
|
|
|
2025-05-01 16:13:13 -07:00
|
|
|
const removeMod = async (mod: ContentItem<ProjectListEntry>) => {
|
2025-08-14 21:48:38 +01:00
|
|
|
await remove_project(props.instance.path, mod.path).catch(handleError)
|
|
|
|
|
projects.value = projects.value.filter((x) => mod.path !== x.path)
|
|
|
|
|
|
|
|
|
|
trackEvent('InstanceProjectRemove', {
|
|
|
|
|
loader: props.instance.loader,
|
|
|
|
|
game_version: props.instance.game_version,
|
|
|
|
|
id: mod.data.id,
|
|
|
|
|
name: mod.data.name,
|
|
|
|
|
project_type: mod.data.project_type,
|
|
|
|
|
})
|
2023-05-08 19:27:27 -04:00
|
|
|
}
|
2023-06-10 15:31:52 -04:00
|
|
|
|
2025-05-01 16:13:13 -07:00
|
|
|
const copyModLink = async (mod: ContentItem<ProjectListEntry>) => {
|
2025-08-14 21:48:38 +01:00
|
|
|
await navigator.clipboard.writeText(
|
|
|
|
|
`https://modrinth.com/${mod.data.project_type}/${mod.data.slug}`,
|
|
|
|
|
)
|
2024-12-17 23:23:30 -07:00
|
|
|
}
|
|
|
|
|
|
2023-07-20 12:56:48 -04:00
|
|
|
const deleteSelected = async () => {
|
2025-08-14 21:48:38 +01:00
|
|
|
for (const project of functionValues.value) {
|
|
|
|
|
await remove_project(props.instance.path, project.path).catch(handleError)
|
|
|
|
|
}
|
2023-06-14 20:56:32 -04:00
|
|
|
|
2025-08-14 21:48:38 +01:00
|
|
|
projects.value = projects.value.filter((x) => !x.selected)
|
2023-06-14 20:16:16 -04:00
|
|
|
}
|
|
|
|
|
|
2023-07-20 12:56:48 -04:00
|
|
|
const shareNames = async () => {
|
2025-08-14 21:48:38 +01:00
|
|
|
await shareModal.value?.show(functionValues.value.map((x) => x.name).join('\n'))
|
2023-06-14 20:16:16 -04:00
|
|
|
}
|
|
|
|
|
|
2023-07-20 12:56:48 -04:00
|
|
|
const shareFileNames = async () => {
|
2025-08-14 21:48:38 +01:00
|
|
|
await shareModal.value?.show(functionValues.value.map((x) => x.file_name).join('\n'))
|
2023-07-20 12:56:48 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const shareUrls = async () => {
|
2025-08-14 21:48:38 +01:00
|
|
|
await shareModal.value?.show(
|
|
|
|
|
functionValues.value
|
|
|
|
|
.filter((x) => x.slug)
|
|
|
|
|
.map((x) => `https://modrinth.com/${x.project_type}/${x.slug}`)
|
|
|
|
|
.join('\n'),
|
|
|
|
|
)
|
2023-07-20 12:56:48 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const shareMarkdown = async () => {
|
2025-08-14 21:48:38 +01:00
|
|
|
await shareModal.value?.show(
|
|
|
|
|
functionValues.value
|
|
|
|
|
.map((x) => {
|
|
|
|
|
if (x.slug) {
|
|
|
|
|
return `[${x.name}](https://modrinth.com/${x.project_type}/${x.slug})`
|
|
|
|
|
}
|
|
|
|
|
return x.name
|
|
|
|
|
})
|
|
|
|
|
.join('\n'),
|
|
|
|
|
)
|
2023-07-20 12:56:48 -04:00
|
|
|
}
|
|
|
|
|
|
2023-09-12 09:27:03 -07:00
|
|
|
const updateSelected = async () => {
|
2025-08-14 21:48:38 +01:00
|
|
|
const promises = []
|
|
|
|
|
for (const project of functionValues.value) {
|
|
|
|
|
if (project.outdated) promises.push(updateProject(project))
|
|
|
|
|
}
|
|
|
|
|
await Promise.all(promises).catch(handleError)
|
2023-09-12 09:27:03 -07:00
|
|
|
}
|
|
|
|
|
|
2023-07-20 12:56:48 -04:00
|
|
|
const enableAll = async () => {
|
2025-08-14 21:48:38 +01:00
|
|
|
const promises = []
|
|
|
|
|
for (const project of functionValues.value) {
|
|
|
|
|
if (project.disabled) {
|
|
|
|
|
promises.push(toggleDisableMod(project))
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
await Promise.all(promises).catch(handleError)
|
2023-07-20 12:56:48 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const disableAll = async () => {
|
2025-08-14 21:48:38 +01:00
|
|
|
const promises = []
|
|
|
|
|
for (const project of functionValues.value) {
|
|
|
|
|
if (!project.disabled) {
|
|
|
|
|
promises.push(toggleDisableMod(project))
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
await Promise.all(promises).catch(handleError)
|
2023-06-10 15:31:52 -04:00
|
|
|
}
|
2023-07-20 12:56:48 -04:00
|
|
|
|
|
|
|
|
watch(selectAll, () => {
|
2025-08-14 21:48:38 +01:00
|
|
|
for (const [key, value] of Array.from(selectionMap.value)) {
|
|
|
|
|
if (value !== selectAll.value) {
|
|
|
|
|
selectionMap.value.set(key, selectAll.value)
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-07-20 12:56:48 -04:00
|
|
|
})
|
|
|
|
|
|
2024-08-16 23:20:11 -07:00
|
|
|
const refreshingProjects = ref(false)
|
|
|
|
|
async function refreshProjects() {
|
2025-08-14 21:48:38 +01:00
|
|
|
refreshingProjects.value = true
|
|
|
|
|
await initProjects('bypass')
|
|
|
|
|
refreshingProjects.value = false
|
2024-08-16 23:20:11 -07:00
|
|
|
}
|
|
|
|
|
|
2024-10-12 22:27:07 +02:00
|
|
|
const unlisten = await getCurrentWebview().onDragDropEvent(async (event) => {
|
2025-08-14 21:48:38 +01:00
|
|
|
if (event.payload.type !== 'drop') return
|
2024-10-12 22:27:07 +02:00
|
|
|
|
2025-08-14 21:48:38 +01:00
|
|
|
for (const file of event.payload.paths) {
|
|
|
|
|
if (file.endsWith('.mrpack')) continue
|
|
|
|
|
await add_project_from_path(props.instance.path, file).catch(handleError)
|
|
|
|
|
}
|
|
|
|
|
await initProjects()
|
2023-08-04 20:33:50 -07:00
|
|
|
})
|
2023-08-05 17:44:02 -04:00
|
|
|
|
2025-05-01 16:13:13 -07:00
|
|
|
const unlistenProfiles = await profile_listener(
|
2025-08-14 21:48:38 +01:00
|
|
|
async (event: { event: string; profile_path_id: string }) => {
|
|
|
|
|
if (
|
|
|
|
|
event.profile_path_id === props.instance.path &&
|
|
|
|
|
event.event === 'synced' &&
|
|
|
|
|
props.instance.install_stage !== 'pack_installing'
|
|
|
|
|
) {
|
|
|
|
|
await initProjects()
|
|
|
|
|
}
|
|
|
|
|
},
|
2025-05-01 16:13:13 -07:00
|
|
|
)
|
2024-12-14 22:02:38 -07:00
|
|
|
|
2023-08-04 20:33:50 -07:00
|
|
|
onUnmounted(() => {
|
2025-08-14 21:48:38 +01:00
|
|
|
unlisten()
|
|
|
|
|
unlistenProfiles()
|
2023-07-20 12:56:48 -04:00
|
|
|
})
|
2023-03-30 18:37:45 -04:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
2023-05-08 19:27:27 -04:00
|
|
|
.text-input {
|
2025-08-14 21:48:38 +01:00
|
|
|
width: 100%;
|
2023-05-08 19:27:27 -04:00
|
|
|
}
|
|
|
|
|
|
2023-04-21 17:45:50 -04:00
|
|
|
.manage {
|
2025-08-14 21:48:38 +01:00
|
|
|
display: flex;
|
|
|
|
|
gap: 0.5rem;
|
2023-03-30 18:37:45 -04:00
|
|
|
}
|
|
|
|
|
|
2023-06-02 07:09:46 -07:00
|
|
|
.table {
|
2025-08-14 21:48:38 +01:00
|
|
|
margin-block-start: 0;
|
|
|
|
|
border-radius: var(--radius-lg);
|
|
|
|
|
border: 2px solid var(--color-bg);
|
2023-06-02 07:09:46 -07:00
|
|
|
}
|
|
|
|
|
|
2023-03-30 18:37:45 -04:00
|
|
|
.table-row {
|
2025-08-14 21:48:38 +01:00
|
|
|
grid-template-columns: min-content 2fr 1fr 13.25rem;
|
|
|
|
|
|
|
|
|
|
&.show-options {
|
|
|
|
|
grid-template-columns: min-content auto;
|
|
|
|
|
|
|
|
|
|
.options {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: row;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: var(--gap-md);
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-03-30 18:37:45 -04:00
|
|
|
}
|
|
|
|
|
|
2023-08-05 17:44:02 -04:00
|
|
|
.static {
|
2025-08-14 21:48:38 +01:00
|
|
|
.table-row {
|
|
|
|
|
grid-template-areas: 'manage name version';
|
|
|
|
|
grid-template-columns: 4.25rem 1fr 1fr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.name-cell {
|
|
|
|
|
grid-area: name;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.version {
|
|
|
|
|
grid-area: version;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.manage {
|
|
|
|
|
justify-content: center;
|
|
|
|
|
grid-area: manage;
|
|
|
|
|
}
|
2023-08-05 17:44:02 -04:00
|
|
|
}
|
|
|
|
|
|
2023-03-30 18:37:45 -04:00
|
|
|
.table-cell {
|
2025-08-14 21:48:38 +01:00
|
|
|
align-items: center;
|
2023-03-30 18:37:45 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.card-row {
|
2025-08-14 21:48:38 +01:00
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: var(--gap-md);
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
background-color: var(--color-raised-bg);
|
2023-03-30 18:37:45 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mod-card {
|
2025-08-14 21:48:38 +01:00
|
|
|
display: flex;
|
|
|
|
|
flex-direction: row;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
gap: var(--gap-sm);
|
|
|
|
|
justify-content: flex-start;
|
|
|
|
|
margin-bottom: 0.5rem;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
|
|
:deep(.dropdown-row) {
|
|
|
|
|
.btn {
|
|
|
|
|
height: 2.5rem !important;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
:deep(.btn) {
|
|
|
|
|
height: 2.5rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.dropdown-input {
|
|
|
|
|
flex-grow: 1;
|
|
|
|
|
|
|
|
|
|
.animated-dropdown {
|
|
|
|
|
width: unset;
|
|
|
|
|
|
|
|
|
|
:deep(.selected) {
|
|
|
|
|
border-radius: var(--radius-md) 0 0 var(--radius-md);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.iconified-input {
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
|
|
input {
|
|
|
|
|
flex-basis: unset;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
:deep(.animated-dropdown) {
|
|
|
|
|
.render-down {
|
|
|
|
|
border-radius: var(--radius-md) 0 0 var(--radius-md) !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.options-wrapper {
|
|
|
|
|
margin-top: 0.25rem;
|
|
|
|
|
width: unset;
|
|
|
|
|
border-radius: var(--radius-md);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.options {
|
|
|
|
|
border-radius: var(--radius-md);
|
|
|
|
|
border: 1px solid var(--color);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-08-14 17:02:22 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.list-card {
|
2025-08-14 21:48:38 +01:00
|
|
|
margin-top: 0.5rem;
|
2023-03-30 18:37:45 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.text-combo {
|
2025-08-14 21:48:38 +01:00
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 0.5rem;
|
2023-03-30 18:37:45 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.name-cell {
|
2025-08-14 21:48:38 +01:00
|
|
|
padding-left: 0;
|
2023-07-21 17:59:34 -04:00
|
|
|
|
2025-08-14 21:48:38 +01:00
|
|
|
.btn {
|
|
|
|
|
margin-left: var(--gap-sm);
|
|
|
|
|
min-width: unset;
|
|
|
|
|
}
|
2023-03-30 18:37:45 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.dropdown {
|
2025-08-14 21:48:38 +01:00
|
|
|
width: 7rem !important;
|
2023-03-30 18:37:45 -04:00
|
|
|
}
|
2023-05-08 19:27:27 -04:00
|
|
|
|
2023-06-02 07:09:46 -07:00
|
|
|
.sort {
|
2025-08-14 21:48:38 +01:00
|
|
|
padding-left: 0.5rem;
|
2023-05-08 19:27:27 -04:00
|
|
|
}
|
2023-06-14 20:16:16 -04:00
|
|
|
|
|
|
|
|
.second-row {
|
2025-08-14 21:48:38 +01:00
|
|
|
display: flex;
|
|
|
|
|
align-items: flex-start;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
gap: var(--gap-sm);
|
|
|
|
|
|
|
|
|
|
.chips {
|
|
|
|
|
flex-grow: 1;
|
|
|
|
|
}
|
2023-06-14 20:16:16 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.modal-body {
|
2025-08-14 21:48:38 +01:00
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
gap: 1rem;
|
|
|
|
|
padding: var(--gap-lg);
|
|
|
|
|
|
|
|
|
|
.button-group {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
gap: 0.5rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
strong {
|
|
|
|
|
color: var(--color-contrast);
|
|
|
|
|
}
|
2023-06-14 20:16:16 -04:00
|
|
|
}
|
2023-07-20 12:56:48 -04:00
|
|
|
|
2023-07-21 17:59:34 -04:00
|
|
|
.mod-content {
|
2025-08-14 21:48:38 +01:00
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 1rem;
|
|
|
|
|
|
|
|
|
|
.mod-text {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.title {
|
|
|
|
|
color: var(--color-contrast);
|
|
|
|
|
font-weight: bolder;
|
|
|
|
|
}
|
2023-07-21 17:59:34 -04:00
|
|
|
}
|
|
|
|
|
|
2023-07-20 12:56:48 -04:00
|
|
|
.actions-cell {
|
2025-08-14 21:48:38 +01:00
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 0.5rem;
|
|
|
|
|
|
|
|
|
|
.btn {
|
|
|
|
|
height: unset;
|
|
|
|
|
width: unset;
|
|
|
|
|
padding: 0;
|
|
|
|
|
|
|
|
|
|
&.trash {
|
|
|
|
|
color: var(--color-red);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&.update {
|
|
|
|
|
color: var(--color-green);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&.share {
|
|
|
|
|
color: var(--color-blue);
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-07-20 12:56:48 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.more-box {
|
2025-08-14 21:48:38 +01:00
|
|
|
display: flex;
|
|
|
|
|
background-color: var(--color-bg);
|
|
|
|
|
padding: var(--gap-lg);
|
|
|
|
|
|
|
|
|
|
.options {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
flex-direction: row;
|
|
|
|
|
gap: var(--gap-md);
|
|
|
|
|
flex-grow: 1;
|
|
|
|
|
}
|
2023-07-20 12:56:48 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.btn {
|
2025-08-14 21:48:38 +01:00
|
|
|
&.transparent {
|
|
|
|
|
height: unset;
|
|
|
|
|
width: unset;
|
|
|
|
|
padding: 0;
|
|
|
|
|
color: var(--color-base);
|
|
|
|
|
gap: var(--gap-xs);
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
|
|
|
|
svg {
|
|
|
|
|
margin-right: 0 !important;
|
|
|
|
|
transition: transform 0.2s ease-in-out;
|
|
|
|
|
|
|
|
|
|
&.open {
|
|
|
|
|
transform: rotate(90deg);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&.down {
|
|
|
|
|
transform: rotate(180deg);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-07-20 12:56:48 -04:00
|
|
|
}
|
|
|
|
|
.empty-prompt {
|
2025-08-14 21:48:38 +01:00
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
gap: var(--gap-md);
|
|
|
|
|
height: 100%;
|
|
|
|
|
width: 100%;
|
|
|
|
|
margin: auto;
|
|
|
|
|
|
|
|
|
|
.empty-icon {
|
|
|
|
|
svg {
|
|
|
|
|
width: 10rem;
|
|
|
|
|
height: 10rem;
|
|
|
|
|
color: var(--color-contrast);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
p,
|
|
|
|
|
h3 {
|
|
|
|
|
margin: 0;
|
|
|
|
|
}
|
2023-07-20 12:56:48 -04:00
|
|
|
}
|
2023-03-30 15:56:19 -07:00
|
|
|
</style>
|
2024-07-20 02:20:12 +02:00
|
|
|
|
2023-05-18 17:12:36 -07:00
|
|
|
<style lang="scss">
|
2023-06-14 20:16:16 -04:00
|
|
|
.select-checkbox {
|
2025-08-14 21:48:38 +01:00
|
|
|
button.checkbox {
|
|
|
|
|
border: none;
|
|
|
|
|
margin: 0;
|
|
|
|
|
}
|
2023-06-14 20:16:16 -04:00
|
|
|
}
|
2023-08-14 17:02:22 -04:00
|
|
|
|
App redesign (#2946)
* Start of app redesign
* format
* continue progress
* Content page nearly done
* Fix recursion issues with content page
* Fix update all alignment
* Discover page progress
* Settings progress
* Removed unlocked-size hack that breaks web
* Revamp project page, refactor web project page to share code with app, fixed loading bar, misc UI/UX enhancements, update ko-fi logo, update arrow icons, fix web issues caused by floating-vue migration, fix tooltip issues, update web tooltips, clean up web hydration issues
* Ads + run prettier
* Begin auth refactor, move common messages to ui lib, add i18n extraction to all apps, begin Library refactor
* fix ads not hiding when plus log in
* rev lockfile changes/conflicts
* Fix sign in page
* Add generated
* (mostly) Data driven search
* Fix search mobile issue
* profile fixes
* Project versions page, fix typescript on UI lib and misc fixes
* Remove unused gallery component
* Fix linkfunction err
* Search filter controls at top, localization for locked filters
* Fix provided filter names
* Fix navigating from instance browse to main browse
* Friends frontend (#2995)
* Friends system frontend
* (almost) finish frontend
* finish friends, fix lint
* Fix lint
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
* Refresh macOS app icon
* Update web search UI more
* Fix link opens
* Fix frontend build
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
Co-authored-by: Jai A <jaiagr+gpg@pm.me>
Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
2024-12-11 19:54:18 -08:00
|
|
|
.search-input {
|
2025-08-14 21:48:38 +01:00
|
|
|
min-height: 2.25rem;
|
|
|
|
|
background-color: var(--color-raised-bg);
|
2023-08-14 17:02:22 -04:00
|
|
|
}
|
2023-09-12 09:27:03 -07:00
|
|
|
|
App redesign (#2946)
* Start of app redesign
* format
* continue progress
* Content page nearly done
* Fix recursion issues with content page
* Fix update all alignment
* Discover page progress
* Settings progress
* Removed unlocked-size hack that breaks web
* Revamp project page, refactor web project page to share code with app, fixed loading bar, misc UI/UX enhancements, update ko-fi logo, update arrow icons, fix web issues caused by floating-vue migration, fix tooltip issues, update web tooltips, clean up web hydration issues
* Ads + run prettier
* Begin auth refactor, move common messages to ui lib, add i18n extraction to all apps, begin Library refactor
* fix ads not hiding when plus log in
* rev lockfile changes/conflicts
* Fix sign in page
* Add generated
* (mostly) Data driven search
* Fix search mobile issue
* profile fixes
* Project versions page, fix typescript on UI lib and misc fixes
* Remove unused gallery component
* Fix linkfunction err
* Search filter controls at top, localization for locked filters
* Fix provided filter names
* Fix navigating from instance browse to main browse
* Friends frontend (#2995)
* Friends system frontend
* (almost) finish frontend
* finish friends, fix lint
* Fix lint
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
* Refresh macOS app icon
* Update web search UI more
* Fix link opens
* Fix frontend build
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
Co-authored-by: Jai A <jaiagr+gpg@pm.me>
Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
2024-12-11 19:54:18 -08:00
|
|
|
.top-box {
|
2025-08-14 21:48:38 +01:00
|
|
|
background-image: radial-gradient(
|
|
|
|
|
50% 100% at 50% 100%,
|
|
|
|
|
var(--color-brand-highlight) 10%,
|
|
|
|
|
#ffffff00 100%
|
|
|
|
|
);
|
App redesign (#2946)
* Start of app redesign
* format
* continue progress
* Content page nearly done
* Fix recursion issues with content page
* Fix update all alignment
* Discover page progress
* Settings progress
* Removed unlocked-size hack that breaks web
* Revamp project page, refactor web project page to share code with app, fixed loading bar, misc UI/UX enhancements, update ko-fi logo, update arrow icons, fix web issues caused by floating-vue migration, fix tooltip issues, update web tooltips, clean up web hydration issues
* Ads + run prettier
* Begin auth refactor, move common messages to ui lib, add i18n extraction to all apps, begin Library refactor
* fix ads not hiding when plus log in
* rev lockfile changes/conflicts
* Fix sign in page
* Add generated
* (mostly) Data driven search
* Fix search mobile issue
* profile fixes
* Project versions page, fix typescript on UI lib and misc fixes
* Remove unused gallery component
* Fix linkfunction err
* Search filter controls at top, localization for locked filters
* Fix provided filter names
* Fix navigating from instance browse to main browse
* Friends frontend (#2995)
* Friends system frontend
* (almost) finish frontend
* finish friends, fix lint
* Fix lint
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
* Refresh macOS app icon
* Update web search UI more
* Fix link opens
* Fix frontend build
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
Co-authored-by: Jai A <jaiagr+gpg@pm.me>
Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
2024-12-11 19:54:18 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.top-box-divider {
|
2025-08-14 21:48:38 +01:00
|
|
|
background-image: linear-gradient(90deg, #ffffff00 0%, var(--color-brand) 50%, #ffffff00 100%);
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 1px;
|
|
|
|
|
opacity: 0.8;
|
2023-09-12 09:27:03 -07:00
|
|
|
}
|
2023-05-18 17:12:36 -07:00
|
|
|
</style>
|