Skip to content

Commit

Permalink
feat frontend: correct badge for pro/wc license
Browse files Browse the repository at this point in the history
  • Loading branch information
xikxp1 committed Nov 12, 2024
1 parent 97b275d commit f4b4165
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "iracehud"
version = "0.3.3"
version = "0.3.4"
description = "iRacing HUD overlay built in Tauri"
authors = ["Ivan Kachalkin<xikxp1@gmail.com>"]
edition = "2021"
Expand Down
28 changes: 14 additions & 14 deletions src/components/Main.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import { onMount } from "svelte";
let gear_indicator: HTMLDivElement;
let rpm_incidator: HTMLProgressElement;
let rpm_indicator: HTMLProgressElement;
function on_rpm(rpm: Rpm) {
if (rpm >= $gearBlinkRPM) {
Expand All @@ -26,10 +26,10 @@
gear_indicator.classList.add("text-error");
}
if (rpm_incidator != null) {
rpm_incidator.classList.remove("progress-secondary");
rpm_incidator.classList.remove("progress-info");
rpm_incidator.classList.add("progress-error");
if (rpm_indicator != null) {
rpm_indicator.classList.remove("progress-secondary");
rpm_indicator.classList.remove("progress-info");
rpm_indicator.classList.add("progress-error");
}
} else if (rpm >= $gearShiftRPM) {
if (gear_indicator != null) {
Expand All @@ -38,10 +38,10 @@
gear_indicator.classList.remove("text-error");
}
if (rpm_incidator != null) {
rpm_incidator.classList.remove("progress-secondary");
rpm_incidator.classList.add("progress-info");
rpm_incidator.classList.remove("progress-error");
if (rpm_indicator != null) {
rpm_indicator.classList.remove("progress-secondary");
rpm_indicator.classList.add("progress-info");
rpm_indicator.classList.remove("progress-error");
}
} else {
if (gear_indicator != null) {
Expand All @@ -50,10 +50,10 @@
gear_indicator.classList.remove("text-error");
}
if (rpm_incidator != null) {
rpm_incidator.classList.add("progress-secondary");
rpm_incidator.classList.remove("progress-info");
rpm_incidator.classList.remove("progress-error");
if (rpm_indicator != null) {
rpm_indicator.classList.add("progress-secondary");
rpm_indicator.classList.remove("progress-info");
rpm_indicator.classList.remove("progress-error");
}
}
}
Expand Down Expand Up @@ -84,7 +84,7 @@
class="join-item flex flex-col items-center justify-evenly rounded-md w-3/4"
>
<progress
bind:this={rpm_incidator}
bind:this={rpm_indicator}
class="progress progress-secondary w-5/6 outline outline-2 outline-offset-2 outline-primary"
value={$rpm}
max={$gearBlinkRPM}
Expand Down
2 changes: 2 additions & 0 deletions src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ export function getBadgeColor(license: string) {
return "bg-blue-800";
case "P":
return "bg-black";
case "W":
return "bg-black";
default:
return "";
}
Expand Down
1 change: 0 additions & 1 deletion src/routes/settings/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<script lang="ts">
import { invoke } from "@tauri-apps/api/core";
import { info } from "@tauri-apps/plugin-log";
import { onMount } from "svelte";
let is_autostart_enabled = false;
Expand Down

0 comments on commit f4b4165

Please sign in to comment.