Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fix file paths opening on app #2382

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apps/app-frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@modrinth/app-frontend",
"private": true,
"version": "0.8.6",
"version": "0.8.7",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
2 changes: 1 addition & 1 deletion apps/app-frontend/src/components/ui/AddContentButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const handleAddContentFromFile = async () => {
if (!newProject) return
for (const project of newProject) {
await add_project_from_path(props.instance.path, project.path).catch(handleError)
await add_project_from_path(props.instance.path, project.path ?? project).catch(handleError)
}
}
Expand Down
4 changes: 2 additions & 2 deletions apps/app-frontend/src/components/ui/InstanceCreationModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ const upload_icon = async () => {
],
})
icon.value = res ? res.path : null
icon.value = res.path ?? res
if (!icon.value) return
display_icon.value = convertFileSrc(icon.value)
Expand Down Expand Up @@ -417,7 +417,7 @@ const openFile = async () => {
const newProject = await open({ multiple: false })
if (!newProject) return
hide()
await install_from_file(newProject.path).catch(handleError)
await install_from_file(newProject.path ?? newProject).catch(handleError)
trackEvent('InstanceCreate', {
source: 'CreationModalFileOpen',
Expand Down
5 changes: 2 additions & 3 deletions apps/app-frontend/src/components/ui/JavaSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -127,17 +127,16 @@ async function handleJavaFileInput() {
const filePath = await open()
if (filePath) {
let result = await get_jre(filePath.path)
let result = await get_jre(filePath.path ?? filePath)
if (!result) {
result = {
path: filePath.path,
path: filePath.path ?? filePath,
version: props.version.toString(),
architecture: 'x86',
}
}
trackEvent('JavaManualSelect', {
path: filePath.path,
version: props.version,
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ const upload_icon = async () => {
},
],
})
icon.value = res ? res.path : null
icon.value = res.path ?? res
if (!icon.value) return
display_icon.value = convertFileSrc(icon.value)
Expand Down
2 changes: 1 addition & 1 deletion apps/app-frontend/src/pages/instance/Options.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<div class="modal-delete">
<div
class="markdown-body"
v-html="

Check warning on line 14 in apps/app-frontend/src/pages/instance/Options.vue

View workflow job for this annotation

GitHub Actions / Build, Test, and Lint

'v-html' directive can lead to XSS attack
'If you proceed, you will not be able to re-lock it without using the `Reinstall modpack` button.'
"
/>
Expand All @@ -32,7 +32,7 @@
<div class="modal-delete">
<div
class="markdown-body"
v-html="

Check warning on line 35 in apps/app-frontend/src/pages/instance/Options.vue

View workflow job for this annotation

GitHub Actions / Build, Test, and Lint

'v-html' directive can lead to XSS attack
'If you proceed, you will not be able to re-pair it without creating an entirely new instance.'
"
/>
Expand Down Expand Up @@ -581,7 +581,7 @@

if (!value) return

icon.value = value.path
icon.value = value.path ?? value
await edit_icon(props.instance.path, icon.value).catch(handleError)

trackEvent('InstanceSetIcon')
Expand Down
2 changes: 1 addition & 1 deletion apps/app/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "theseus_gui"
version = "0.8.6"
version = "0.8.7"
description = "The Modrinth App is a desktop application for managing your Minecraft mods"
license = "GPL-3.0-only"
repository = "https://github.com/modrinth/code/apps/app/"
Expand Down
2 changes: 1 addition & 1 deletion apps/app/src/api/ads.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub fn init<R: Runtime>() -> TauriPlugin<R> {
position: None,
}));

/// We refresh the ads window every 5 minutes for performance
// We refresh the ads window every 5 minutes for performance
let app = app.clone();
tauri::async_runtime::spawn(async move {
loop {
Expand Down
2 changes: 1 addition & 1 deletion apps/app/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
]
},
"productName": "Modrinth App",
"version": "0.8.6",
"version": "0.8.7",
"identifier": "ModrinthApp",
"plugins": {
"deep-link": {
Expand Down
2 changes: 1 addition & 1 deletion packages/app-lib/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "theseus"
version = "0.8.6"
version = "0.8.7"
authors = ["Jai A <jaiagr+gpg@pm.me>"]
edition = "2021"

Expand Down
Loading