@@ -111,7 +98,7 @@ import {
DropdownIcon,
UnplugIcon,
} from '@modrinth/assets'
-import { Button, Card } from '@modrinth/ui'
+import { Button, ButtonStyled, Card } from '@modrinth/ui'
import { onBeforeUnmount, onMounted, ref } from 'vue'
import { get_all as getRunningProcesses, kill as killProcess } from '@/helpers/process'
import { loading_listener, process_listener } from '@/helpers/events'
@@ -409,10 +396,6 @@ onBeforeUnmount(() => {
}
}
-.show-card-icon {
- color: var(--color-brand);
-}
-
.download-enter-active,
.download-leave-active {
transition: opacity 0.3s ease;
diff --git a/apps/app-frontend/src/components/ui/SearchCard.vue b/apps/app-frontend/src/components/ui/SearchCard.vue
index 2a9ebc069..4d276f05f 100644
--- a/apps/app-frontend/src/components/ui/SearchCard.vue
+++ b/apps/app-frontend/src/components/ui/SearchCard.vue
@@ -157,13 +157,13 @@ const installing = ref(false)
async function install() {
installing.value = true
await installVersion(
- props.project.project_id,
+ props.project.project_id ?? props.project.id,
null,
props.instance ? props.instance.path : null,
'SearchCard',
() => {
installing.value = false
- emit('install', props.project.project_id)
+ emit('install', props.project.project_id ?? props.project.id)
},
)
}
diff --git a/apps/app-frontend/src/pages/Browse.vue b/apps/app-frontend/src/pages/Browse.vue
index 3f45869ac..7553be051 100644
--- a/apps/app-frontend/src/pages/Browse.vue
+++ b/apps/app-frontend/src/pages/Browse.vue
@@ -1,7 +1,7 @@
@@ -477,7 +509,12 @@ await refreshSearch()
newlyInstalled.push(id)
}
"
+ @contextmenu.prevent.stop="(event) => handleRightClick(event, result)"
/>
+
+ Open in Modrinth
+ Copy link
+
+
+
(currentPage = page)"
+ />
+
@@ -416,6 +425,7 @@ const initProjects = async (cacheBehaviour?) => {
icon: null,
disabled: file.file_name.endsWith('.disabled'),
outdated: false,
+ updated: dayjs(0),
project_type: file.project_type === 'shaderpack' ? 'shader' : file.project_type,
})
}
@@ -541,20 +551,19 @@ const search = computed(() => {
switch (sortColumn.value) {
case 'Updated':
return filtered.slice().sort((a, b) => {
- if (a.updated < b.updated) {
- return ascending.value ? 1 : -1
- }
- if (a.updated > b.updated) {
- return ascending.value ? -1 : 1
- }
- return 0
+ const updated = a.updated.isAfter(b.updated) ? 1 : -1
+ return ascending.value ? -updated : updated
})
default:
- return filtered.slice().sort((a, b) => a.name.localeCompare(b.name))
+ return filtered
+ .slice()
+ .sort((a, b) =>
+ ascending.value ? a.name.localeCompare(b.name) : b.name.localeCompare(a.name),
+ )
}
})
-watch(search, () => (currentPage.value = 1))
+watch([sortColumn, ascending, selectedFilters.value, searchFilter], () => (currentPage.value = 1))
const sortProjects = (filter) => {
if (sortColumn.value === filter) {
diff --git a/apps/app-frontend/src/pages/project/Index.vue b/apps/app-frontend/src/pages/project/Index.vue
index c86f7f31b..1f5082b13 100644
--- a/apps/app-frontend/src/pages/project/Index.vue
+++ b/apps/app-frontend/src/pages/project/Index.vue
@@ -31,7 +31,7 @@
>
-
+
- Project data coult not be loaded.
+ Project data couldn't not be loaded.
Install
@@ -165,6 +165,7 @@ import { get_project, get_team, get_version_many } from '@/helpers/cache.js'
import NavTabs from '@/components/ui/NavTabs.vue'
import { useTheming } from '@/store/state.js'
import InstanceIndicator from '@/components/ui/InstanceIndicator.vue'
+import { openUrl } from '@tauri-apps/plugin-opener'
dayjs.extend(relativeTime)
@@ -172,7 +173,6 @@ const route = useRoute()
const breadcrumbs = useBreadcrumbs()
const themeStore = useTheming()
-const options = ref(null)
const installing = ref(false)
const data = shallowRef(null)
const versions = shallowRef([])
@@ -245,19 +245,30 @@ async function install(version) {
)
}
+const options = ref(null)
+const handleRightClick = (event) => {
+ options.value.showMenu(event, data.value, [
+ {
+ name: 'install',
+ },
+ {
+ type: 'divider',
+ },
+ {
+ name: 'open_link',
+ },
+ {
+ name: 'copy_link',
+ },
+ ])
+}
const handleOptionsClick = (args) => {
switch (args.option) {
case 'install':
install(null)
break
case 'open_link':
- window.__TAURI_INVOKE__('tauri', {
- __tauriModule: 'Shell',
- message: {
- cmd: 'open',
- path: `https://modrinth.com/${args.item.project_type}/${args.item.slug}`,
- },
- })
+ openUrl(`https://modrinth.com/${args.item.project_type}/${args.item.slug}`)
break
case 'copy_link':
navigator.clipboard.writeText(
diff --git a/apps/app/Cargo.toml b/apps/app/Cargo.toml
index e34d20226..e3d6dc3d9 100644
--- a/apps/app/Cargo.toml
+++ b/apps/app/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "theseus_gui"
-version = "0.9.0-2"
+version = "0.9.0"
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/"
diff --git a/apps/app/src/api/ads.rs b/apps/app/src/api/ads.rs
index 90d5efcc1..5f719b52b 100644
--- a/apps/app/src/api/ads.rs
+++ b/apps/app/src/api/ads.rs
@@ -61,7 +61,7 @@ fn get_webview_position(
let width = 300.0 * dpr;
let height = 250.0 * dpr;
- let main_window_size = main_window.inner_size()?;
+ let main_window_size = main_window.outer_size()?;
let x = (main_window_size.width as f32) - width;
let y = (main_window_size.height as f32) - height;
diff --git a/apps/app/src/main.rs b/apps/app/src/main.rs
index 9aa97c69e..49fd103f6 100644
--- a/apps/app/src/main.rs
+++ b/apps/app/src/main.rs
@@ -237,7 +237,7 @@ fn main() {
if let Some(window) = app.get_window("main") {
// Hide window to prevent white flash on startup
- let _ = window.hide();
+ // let _ = window.hide();
#[cfg(not(target_os = "linux"))]
{
diff --git a/apps/app/tauri.conf.json b/apps/app/tauri.conf.json
index b0c65371f..c880ecb22 100644
--- a/apps/app/tauri.conf.json
+++ b/apps/app/tauri.conf.json
@@ -44,7 +44,7 @@
]
},
"productName": "Modrinth App",
- "version": "0.9.0-2",
+ "version": "0.9.0",
"mainBinaryName": "Modrinth App",
"identifier": "ModrinthApp",
"plugins": {
@@ -69,7 +69,7 @@
"width": 1280,
"minHeight": 700,
"minWidth": 1100,
- "visible": false,
+ "visible": true,
"zoomHotkeysEnabled": false,
"decorations": false
}
diff --git a/packages/app-lib/Cargo.toml b/packages/app-lib/Cargo.toml
index 86f735e6d..4681899e2 100644
--- a/packages/app-lib/Cargo.toml
+++ b/packages/app-lib/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "theseus"
-version = "0.9.0-2"
+version = "0.9.0"
authors = ["Jai A "]
edition = "2021"
diff --git a/packages/ui/src/components/modal/TabbedModal.vue b/packages/ui/src/components/modal/TabbedModal.vue
index a7292113c..bc3f2f763 100644
--- a/packages/ui/src/components/modal/TabbedModal.vue
+++ b/packages/ui/src/components/modal/TabbedModal.vue
@@ -41,7 +41,7 @@ defineExpose({ selectedTab, setTab })
-