Compare commits

...

2 Commits

Author SHA1 Message Date
Alejandro González
d73e21c5a5 chore(docs/labrinth): remove unnecessary trailing spaces in lines
These don't serve an useful purpose, and overall the Markdown source
looks less tidy with them.
2025-08-06 23:27:08 +02:00
fishstiz
e31197f649 feat(app): pass selected version to incompatibility warning modal (#4115)
Co-authored-by: IMB11 <hendersoncal117@gmail.com>
2025-08-05 11:10:02 +00:00
3 changed files with 27 additions and 21 deletions

View File

@@ -76,10 +76,10 @@ const installing = ref(false)
const onInstall = ref(() => {}) const onInstall = ref(() => {})
defineExpose({ defineExpose({
show: (instanceVal, projectVal, projectVersions, callback) => { show: (instanceVal, projectVal, projectVersions, selected, callback) => {
instance.value = instanceVal instance.value = instanceVal
versions.value = projectVersions versions.value = projectVersions
selectedVersion.value = projectVersions[0] selectedVersion.value = selected ?? projectVersions[0]
project.value = projectVal project.value = projectVal

View File

@@ -29,8 +29,8 @@ export const useInstall = defineStore('installStore', {
setIncompatibilityWarningModal(ref) { setIncompatibilityWarningModal(ref) {
this.incompatibilityWarningModal = ref this.incompatibilityWarningModal = ref
}, },
showIncompatibilityWarningModal(instance, project, versions, onInstall) { showIncompatibilityWarningModal(instance, project, versions, selected, onInstall) {
this.incompatibilityWarningModal.show(instance, project, versions, onInstall) this.incompatibilityWarningModal.show(instance, project, versions, selected, onInstall)
}, },
setModInstallModal(ref) { setModInstallModal(ref) {
this.modInstallModal = ref this.modInstallModal = ref
@@ -133,7 +133,13 @@ export const install = async (
callback(version.id) callback(version.id)
} else { } else {
const install = useInstall() const install = useInstall()
install.showIncompatibilityWarningModal(instance, project, projectVersions, callback) install.showIncompatibilityWarningModal(
instance,
project,
projectVersions,
version,
callback,
)
} }
} else { } else {
const versions = (await get_version_many(project.versions).catch(handleError)).sort( const versions = (await get_version_many(project.versions).catch(handleError)).sort(

View File

@@ -67,8 +67,8 @@ During development, you might notice that changes made directly to entities in t
`SITE_URL`: The main URL to be used for CORS `SITE_URL`: The main URL to be used for CORS
`CDN_URL`: The publicly accessible base URL for files uploaded to the CDN `CDN_URL`: The publicly accessible base URL for files uploaded to the CDN
`MODERATION_DISCORD_WEBHOOK`: The URL for a Discord webhook where projects pending approval will be sent `MODERATION_DISCORD_WEBHOOK`: The URL for a Discord webhook where projects pending approval will be sent
`CLOUDFLARE_INTEGRATION`: Whether labrinth should integrate with Cloudflare's spam protection `CLOUDFLARE_INTEGRATION`: Whether Labrinth should integrate with Cloudflare's spam protection
`DATABASE_URL`: The URL for the PostgreSQL database `DATABASE_URL`: The URL for the PostgreSQL database, including its username, password, host, port, and database name
`DATABASE_MIN_CONNECTIONS`: The minimum number of concurrent connections allowed to the database at the same time `DATABASE_MIN_CONNECTIONS`: The minimum number of concurrent connections allowed to the database at the same time
`DATABASE_MAX_CONNECTIONS`: The maximum number of concurrent connections allowed to the database at the same time `DATABASE_MAX_CONNECTIONS`: The maximum number of concurrent connections allowed to the database at the same time
`MEILISEARCH_ADDR`: The URL for the MeiliSearch instance used for search `MEILISEARCH_ADDR`: The URL for the MeiliSearch instance used for search
@@ -114,7 +114,7 @@ If you're prepared to contribute by submitting a pull request, ensure you have m
- `cargo check` has been run. - `cargo check` has been run.
- `cargo sqlx prepare` has been run. - `cargo sqlx prepare` has been run.
> Note: If you encounter issues with `sqlx` saying 'no queries found' after running `cargo sqlx prepare`, you may need to ensure the installed version of `sqlx-cli` matches the current version of `sqlx` used [in labrinth](https://github.com/modrinth/labrinth/blob/master/Cargo.toml). > Note: If you encounter issues with `sqlx` saying 'no queries found' after running `cargo sqlx prepare`, you may need to ensure the installed version of `sqlx-cli` matches the current version of `sqlx` used [in Labrinth](https://github.com/modrinth/labrinth/blob/master/Cargo.toml).
[Discord]: https://discord.modrinth.com [Discord]: https://discord.modrinth.com
[GitHub]: https://github.com/modrinth [GitHub]: https://github.com/modrinth