mirror of
https://github.com/LCE-Hub/LCE-Emerald-Launcher.git
synced 2026-07-18 00:10:45 +00:00
fix(download+branches): fetch from rust, no update notif without url
This commit is contained in:
@@ -1,7 +0,0 @@
|
|||||||
api.actions.register("home-menu", {
|
|
||||||
id: "multiplayer",
|
|
||||||
label: "Multiplayer",
|
|
||||||
onClick: function () {
|
|
||||||
api.views.navigate("lcelive");
|
|
||||||
},
|
|
||||||
});
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"id": "multiplayer-button",
|
|
||||||
"name": "Multiplayer Button",
|
|
||||||
"version": "1.0.0",
|
|
||||||
"author": "neoapps",
|
|
||||||
"description": "Adds a Multiplayer button to the home menu that opens LCELive",
|
|
||||||
"main": "main.js",
|
|
||||||
"permissions": []
|
|
||||||
}
|
|
||||||
@@ -242,6 +242,9 @@ pub async fn check_game_update(
|
|||||||
let instance_dir = util::get_instance_working_dir(&app, &instance_id);
|
let instance_dir = util::get_instance_working_dir(&app, &instance_id);
|
||||||
let timestamp_file = instance_dir.join("update_timestamp.txt");
|
let timestamp_file = instance_dir.join("update_timestamp.txt");
|
||||||
let local_timestamp = fs::read_to_string(×tamp_file).unwrap_or_default();
|
let local_timestamp = fs::read_to_string(×tamp_file).unwrap_or_default();
|
||||||
|
if url.is_empty() {
|
||||||
|
return Ok(false);
|
||||||
|
}
|
||||||
if local_timestamp.is_empty() {
|
if local_timestamp.is_empty() {
|
||||||
return Ok(true);
|
return Ok(true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -170,9 +170,9 @@ export function useGameManager({
|
|||||||
? `https://api.github.com/repos/${owner}/${repo}`
|
? `https://api.github.com/repos/${owner}/${repo}`
|
||||||
: `${urlObj.origin}/api/v1/repos/${owner}/${repo}`;
|
: `${urlObj.origin}/api/v1/repos/${owner}/${repo}`;
|
||||||
|
|
||||||
const response = await fetch(`${apiBase}/releases`);
|
const res = await TauriService.httpProxyRequest("GET", `${apiBase}/releases`, null, {});
|
||||||
if (response.ok) {
|
if (res.status >= 200 && res.status < 300) {
|
||||||
const data = await response.json();
|
const data = JSON.parse(res.body);
|
||||||
let tags: string[] = data
|
let tags: string[] = data
|
||||||
.map((r: { tag_name: string }) => r.tag_name)
|
.map((r: { tag_name: string }) => r.tag_name)
|
||||||
.filter((t: string) => !t.toLowerCase().includes("server"));
|
.filter((t: string) => !t.toLowerCase().includes("server"));
|
||||||
|
|||||||
Reference in New Issue
Block a user