Merge commit '6e3bf5fbf9558dcfcfb12f65890391945e554f7e' into feature-clean

This commit is contained in:
2024-09-11 23:57:05 +03:00
40 changed files with 2816 additions and 2625 deletions

View File

@@ -139,8 +139,8 @@
class="image"
:class="{ 'zoomed-in': zoomedIn }"
:src="
expandedGalleryItem.url
? expandedGalleryItem.url
expandedGalleryItem.raw_url
? expandedGalleryItem.raw_url
: 'https://cdn.modrinth.com/placeholder-banner.svg'
"
:alt="expandedGalleryItem.title ? expandedGalleryItem.title : 'gallery-image'"
@@ -165,8 +165,8 @@
class="open circle-button"
target="_blank"
:href="
expandedGalleryItem.url
? expandedGalleryItem.url
expandedGalleryItem.raw_url
? expandedGalleryItem.raw_url
: 'https://cdn.modrinth.com/placeholder-banner.svg'
"
>

View File

@@ -58,13 +58,19 @@
]);
});
let lastUrl = null
window.addEventListener(
"message",
(event) => {
if (event.data.modrinthOpenUrl && window.__TAURI_INTERNALS__) {
window.__TAURI_INTERNALS__.invoke("plugin:shell|open", {
path: event.data.modrinthOpenUrl,
});
if (event.data.modrinthOpenUrl && window.__TAURI_INTERNALS__ && lastUrl !== event.data.modrinthOpenUrl) {
lastUrl = event.data.modrinthOpenUrl
// window.__TAURI_INTERNALS__.invoke("plugin:shell|open", {
// path: event.data.modrinthOpenUrl,
// });
setTimeout(() => {
lastUrl = null
}, 500)
}
},
false,