quantframe: 1.3.4 -> 1.4.3 (#401613)

authored by isabelroses.com and committed by GitHub d429072d 5b804594

+70 -26
+54 -14
pkgs/by-name/qu/quantframe/0001-disable-telemetry.patch
··· 1 diff --git a/src-tauri/src/qf_client/modules/analytics.rs b/src-tauri/src/qf_client/modules/analytics.rs 2 - index f6f1209..e08490b 100644 3 --- a/src-tauri/src/qf_client/modules/analytics.rs 4 +++ b/src-tauri/src/qf_client/modules/analytics.rs 5 - @@ -115,52 +115,6 @@ impl AnalyticsModule { 6 - } 7 - }; 8 - } 9 - loop { 10 - let send_metrics = qf.analytics().send_metrics; 11 - if !send_metrics { ··· 22 - } 23 - 24 - last_metric_time = Instant::now(); 25 - - logger::info_con( 26 - - &qf.analytics().get_component("TrySendAnalytics"), 27 - - "Sending user activity", 28 - - ); 29 - match qf 30 - .analytics() 31 - .try_send_analytics( ··· 43 - || e.cause().contains("Banned") 44 - || e.cause().contains("WFMBanned") 45 - { 46 - - error::create_log_file("analytics.log".to_string(), &e); 47 - break; 48 - } 49 - - error::create_log_file("analytics.log".to_string(), &e); 50 - } 51 - }; 52 - } ··· 55 qf.analytics().is_init = false; 56 } 57 }); 58 - @@ -176,44 +130,6 @@ impl AnalyticsModule { 59 mut retry_count: i64, 60 data: Value, 61 ) -> Result<(), AppError> { ··· 88 - return Err(err); 89 - } 90 - retry_count -= 1; 91 - - logger::warning_con( 92 - &self.get_component("TrySendAnalytics"), 93 - &format!( 94 - "Failed to send analytics, retrying in 5 seconds, retries left: {}", 95 - retry_count 96 - ), 97 - ); 98 - tokio::time::sleep(std::time::Duration::from_secs(5)).await; 99 - } 100 - Ok(()) 101 - + return Ok(()); 102 } 103 }
··· 1 diff --git a/src-tauri/src/qf_client/modules/analytics.rs b/src-tauri/src/qf_client/modules/analytics.rs 2 + index 3b31cfa..562e0b4 100644 3 --- a/src-tauri/src/qf_client/modules/analytics.rs 4 +++ b/src-tauri/src/qf_client/modules/analytics.rs 5 + @@ -37,7 +37,7 @@ impl AnalyticsModule { 6 + current_page: "home".to_string(), 7 + component: "Analytics".to_string(), 8 + is_init: false, 9 + - send_metrics: true, 10 + + send_metrics: false, 11 + last_user_activity: Arc::new(Mutex::new(Instant::now())), 12 + metricAndLabelPairsScheduledToSend: vec![], 13 + } 14 + @@ -96,69 +96,6 @@ impl AnalyticsModule { 15 + // Create Timer for sending metrics 16 + let mut last_metric_time = Instant::now(); 17 + 18 + - if is_first_install { 19 + - logger::info( 20 + - &&qf.analytics().get_component("init"), 21 + - "Detected first install", 22 + - LoggerOptions::default(), 23 + - ); 24 + - match qf 25 + - .analytics() 26 + - .try_send_analytics("install", 3, json!({})) 27 + - .await 28 + - { 29 + - Ok(_) => {} 30 + - Err(e) => { 31 + - error::create_log_file("analytics.log", &e); 32 + - } 33 + - }; 34 + - } 35 - loop { 36 - let send_metrics = qf.analytics().send_metrics; 37 - if !send_metrics { ··· 48 - } 49 - 50 - last_metric_time = Instant::now(); 51 + - // logger::info_con( 52 + - // &qf.analytics().get_component("TrySendAnalytics"), 53 + - // "Sending user activity", 54 + - // ); 55 - match qf 56 - .analytics() 57 - .try_send_analytics( ··· 69 - || e.cause().contains("Banned") 70 - || e.cause().contains("WFMBanned") 71 - { 72 + - error::create_log_file("analytics.log", &e); 73 - break; 74 - } 75 + - error::create_log_file("analytics.log", &e); 76 - } 77 - }; 78 - } ··· 81 qf.analytics().is_init = false; 82 } 83 }); 84 + @@ -174,45 +111,6 @@ impl AnalyticsModule { 85 mut retry_count: i64, 86 data: Value, 87 ) -> Result<(), AppError> { ··· 114 - return Err(err); 115 - } 116 - retry_count -= 1; 117 + - logger::warning( 118 - &self.get_component("TrySendAnalytics"), 119 - &format!( 120 - "Failed to send analytics, retrying in 5 seconds, retries left: {}", 121 - retry_count 122 - ), 123 + - LoggerOptions::default(), 124 - ); 125 - tokio::time::sleep(std::time::Duration::from_secs(5)).await; 126 - } 127 - Ok(()) 128 + + return Ok(()) 129 } 130 } 131 + diff --git a/src/contexts/app.context.tsx b/src/contexts/app.context.tsx 132 + index 8b3ced9..5da811f 100644 133 + --- a/src/contexts/app.context.tsx 134 + +++ b/src/contexts/app.context.tsx 135 + @@ -160,7 +160,7 @@ export function AppContextProvider({ children }: AppContextProviderProps) { 136 + const id = context.substring(start, end); 137 + 138 + console.log("OpenTos", settings?.tos_uuid, id); 139 + - if (id == settings?.tos_uuid) return; 140 + + if (true) return; 141 + modals.open({ 142 + title: useTranslateModals("tos.title"), 143 + size: "100%",
+16 -12
pkgs/by-name/qu/quantframe/package.nix
··· 2 lib, 3 rustPlatform, 4 fetchFromGitHub, 5 - cargo-tauri_1, 6 nodejs, 7 pnpm_9, 8 pkg-config, 9 glib-networking, 10 openssl, 11 - webkitgtk_4_0, 12 wrapGAppsHook3, 13 - libsoup_2_4, 14 libayatana-appindicator, 15 gtk3, 16 }: 17 18 rustPlatform.buildRustPackage (finalAttrs: { 19 pname = "quantframe"; 20 - version = "1.3.4"; 21 22 src = fetchFromGitHub { 23 owner = "Kenya-DK"; 24 repo = "quantframe-react"; 25 tag = "v${finalAttrs.version}"; 26 - hash = "sha256-/cjlYQHb23DY4RSjc2HosTar6p1epsqlWQX6TlrzSe8="; 27 }; 28 29 postPatch = '' 30 substituteInPlace $cargoDepsCopy/libappindicator-sys-*/src/lib.rs \ 31 --replace-fail "libayatana-appindicator3.so.1" "${libayatana-appindicator}/lib/libayatana-appindicator3.so.1" 32 ''; 33 34 patches = [ ··· 37 38 pnpmDeps = pnpm_9.fetchDeps { 39 inherit (finalAttrs) pname version src; 40 - hash = "sha256-4uyjvwvrMDe+86wcB7MBBWWc4NGKzqBsgG3TScf7BMk="; 41 }; 42 43 useFetchCargoVendor = true; 44 - cargoHash = "sha256-mtHbWTNrWh4hq4IAncE9TCWr7sozIy2zf3DK3WN7wqI="; 45 46 nativeBuildInputs = [ 47 - cargo-tauri_1.hook 48 - 49 pkg-config 50 wrapGAppsHook3 51 - 52 nodejs 53 pnpm_9.configHook 54 ]; 55 56 buildInputs = [ 57 openssl 58 - libsoup_2_4 59 glib-networking 60 gtk3 61 libayatana-appindicator 62 - webkitgtk_4_0 63 ]; 64 65 cargoRoot = "src-tauri"; 66 buildAndTestSubdir = finalAttrs.cargoRoot; 67 68 meta = { 69 description = "Warframe Market listings and transactions manager";
··· 2 lib, 3 rustPlatform, 4 fetchFromGitHub, 5 + cargo-tauri, 6 nodejs, 7 pnpm_9, 8 pkg-config, 9 glib-networking, 10 openssl, 11 + webkitgtk_4_1, 12 wrapGAppsHook3, 13 + libsoup_3, 14 libayatana-appindicator, 15 gtk3, 16 + nix-update-script, 17 }: 18 19 rustPlatform.buildRustPackage (finalAttrs: { 20 pname = "quantframe"; 21 + version = "1.4.3"; 22 23 src = fetchFromGitHub { 24 owner = "Kenya-DK"; 25 repo = "quantframe-react"; 26 tag = "v${finalAttrs.version}"; 27 + hash = "sha256-ls6c9xLmjjx0kSh1s+HkdClrcTOvsAemjzqNwMeOd9c="; 28 }; 29 30 postPatch = '' 31 substituteInPlace $cargoDepsCopy/libappindicator-sys-*/src/lib.rs \ 32 --replace-fail "libayatana-appindicator3.so.1" "${libayatana-appindicator}/lib/libayatana-appindicator3.so.1" 33 + 34 + substituteInPlace src-tauri/tauri.conf.json \ 35 + --replace-fail '"createUpdaterArtifacts": "v1Compatible"' '"createUpdaterArtifacts": false' 36 ''; 37 38 patches = [ ··· 41 42 pnpmDeps = pnpm_9.fetchDeps { 43 inherit (finalAttrs) pname version src; 44 + hash = "sha256-3IHwwbl1aH3Pzh9xq2Jfev9hj6/LXZaVaIJOPbgsquE="; 45 }; 46 47 useFetchCargoVendor = true; 48 + cargoHash = "sha256-UyfSmlr+5mWmlisNtjF6jZKx92kdQziG26mgeZtkySY="; 49 50 nativeBuildInputs = [ 51 + cargo-tauri.hook 52 pkg-config 53 wrapGAppsHook3 54 nodejs 55 pnpm_9.configHook 56 ]; 57 58 buildInputs = [ 59 openssl 60 + libsoup_3 61 glib-networking 62 gtk3 63 libayatana-appindicator 64 + webkitgtk_4_1 65 ]; 66 67 cargoRoot = "src-tauri"; 68 buildAndTestSubdir = finalAttrs.cargoRoot; 69 + 70 + passthru.updateScript = nix-update-script { }; 71 72 meta = { 73 description = "Warframe Market listings and transactions manager";