mirror of
https://github.com/LCE-Hub/LCE-Emerald-Launcher.git
synced 2026-08-19 12:07:24 +00:00
fix(download+branches): fetch from rust, no update notif without url
This commit is contained in:
parent
49e7f823ce
commit
6f64b43358
|
|
@ -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 timestamp_file = instance_dir.join("update_timestamp.txt");
|
||||
let local_timestamp = fs::read_to_string(×tamp_file).unwrap_or_default();
|
||||
if url.is_empty() {
|
||||
return Ok(false);
|
||||
}
|
||||
if local_timestamp.is_empty() {
|
||||
return Ok(true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -170,9 +170,9 @@ export function useGameManager({
|
|||
? `https://api.github.com/repos/${owner}/${repo}`
|
||||
: `${urlObj.origin}/api/v1/repos/${owner}/${repo}`;
|
||||
|
||||
const response = await fetch(`${apiBase}/releases`);
|
||||
if (response.ok) {
|
||||
const data = await response.json();
|
||||
const res = await TauriService.httpProxyRequest("GET", `${apiBase}/releases`, null, {});
|
||||
if (res.status >= 200 && res.status < 300) {
|
||||
const data = JSON.parse(res.body);
|
||||
let tags: string[] = data
|
||||
.map((r: { tag_name: string }) => r.tag_name)
|
||||
.filter((t: string) => !t.toLowerCase().includes("server"));
|
||||
|
|
|
|||
Loading…
Reference in a new issue