From ac66c78dbffa1f14652f500bd0f417d97c2b4b9a Mon Sep 17 00:00:00 2001 From: Lncvrt Date: Tue, 24 Mar 2026 21:31:11 -0700 Subject: [PATCH] Fix this not using Rust for sending requests --- src-tauri/capabilities/default.json | 17 ++++++----------- src/componets/popups/ModDownloads.tsx | 1 + 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src-tauri/capabilities/default.json b/src-tauri/capabilities/default.json index ba34be6..2b84329 100644 --- a/src-tauri/capabilities/default.json +++ b/src-tauri/capabilities/default.json @@ -2,9 +2,7 @@ "$schema": "../gen/schemas/desktop-schema.json", "identifier": "default", "description": "Capability for the main window", - "windows": [ - "main" - ], + "windows": ["main"], "permissions": [ "core:default", "opener:default", @@ -30,15 +28,11 @@ "fs:allow-applocaldata-write", { "identifier": "fs:scope", - "allow": [ - { "path": "$APPLOCALDATA/game/**" } - ] + "allow": [{ "path": "$APPLOCALDATA/game/**" }] }, { "identifier": "opener:allow-open-path", - "allow": [ - { "path": "$APPLOCALDATA/game/**" } - ] + "allow": [{ "path": "$APPLOCALDATA/game/**" }] }, { "identifier": "http:default", @@ -51,8 +45,9 @@ { "url": "https://games.lncvrt.xyz/api/berrydash/leaderboard/berry" }, { "url": "https://games.lncvrt.xyz/api/berrydash/leaderboard/coin" }, { "url": "https://games.lncvrt.xyz/api/berrydash/leaderboard/legacy" }, - { "url": "https://games.lncvrt.xyz/api/berrydash/leaderboard/total" } + { "url": "https://games.lncvrt.xyz/api/berrydash/leaderboard/total" }, + { "url": "https://games.lncvrt.xyz/api/launcher/mods" } ] } ] -} \ No newline at end of file +} diff --git a/src/componets/popups/ModDownloads.tsx b/src/componets/popups/ModDownloads.tsx index b03a851..7862dbb 100644 --- a/src/componets/popups/ModDownloads.tsx +++ b/src/componets/popups/ModDownloads.tsx @@ -17,6 +17,7 @@ import { import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { message } from '@tauri-apps/plugin-dialog' import { BaseDirectory, exists, remove } from '@tauri-apps/plugin-fs' +import { fetch } from '@tauri-apps/plugin-http' import { arch, platform } from '@tauri-apps/plugin-os' import { useEffect, useState } from 'react'