Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
fix license renewal date handling
Brendan Allan5de08c7b3a39
diff --git a/apps/desktop/src-tauri/src/general_settings.rs b/apps/desktop/src-tauri/src/general_settings.rsindex 56a731c2b..2cf013f59 100644--- a/apps/desktop/src-tauri/src/general_settings.rs+++ b/apps/desktop/src-tauri/src/general_settings.rs@@ -43,7 +43,7 @@ pub struct GeneralSettingsStore {#[serde(rename_all = "camelCase")]pub struct CommercialLicense {license_key: String,- expiry_date: u32,+ expiry_date: Option<u32>,refresh: u32,activated_on: u32,}diff --git a/apps/desktop/src/routes/(window-chrome)/licensing.tsx b/apps/desktop/src/routes/(window-chrome)/licensing.tsxindex a59377992..76c867b9a 100644--- a/apps/desktop/src/routes/(window-chrome)/licensing.tsx+++ b/apps/desktop/src/routes/(window-chrome)/licensing.tsx@@ -60,12 +60,18 @@ export default function Page() {{license().licenseKey}</pre></div>- <div class="flex flex-col">- <label class="text-[--text-tertiary] text-sm">Expires</label>- <span class="text-[--text-secondary] mt-1 ml-0.5">- {new Date(license().expiryDate).toUTCString()}- </span>- </div>+ <Show when={license().expiryDate}>+ {(expiry) => (+ <div class="flex flex-col">+ <label class="text-[--text-tertiary] text-sm">+ Expires+ </label>+ <span class="text-[--text-secondary] mt-1 ml-0.5">+ {new Date(expiry()).toUTCString()}+ </span>+ </div>+ )}+ </Show>{/* <p class="text-[--text-tertiary] text-sm pt-1">Instance ID: {license().instanceId}diff --git a/apps/desktop/src/utils/tauri.ts b/apps/desktop/src/utils/tauri.tsindex 1222fea3d..1a5ae2cda 100644--- a/apps/desktop/src/utils/tauri.ts+++ b/apps/desktop/src/utils/tauri.ts@@ -240,7 +240,7 @@ export type CameraYPosition = "top" | "bottom"export type CaptureArea = { screen: CaptureScreen; bounds: Bounds }export type CaptureScreen = { id: number; name: string; refresh_rate: number }export type CaptureWindow = { id: number; owner_name: string; name: string; bounds: Bounds; refresh_rate: number }-export type CommercialLicense = { licenseKey: string; expiryDate: number; refresh: number; activatedOn: number }+export type CommercialLicense = { licenseKey: string; expiryDate: number | null; refresh: number; activatedOn: number }export type Crop = { position: XY<number>; size: XY<number> }export type CurrentRecordingChanged = nullexport type CursorAnimationStyle = "regular" | "slow" | "fast"diff --git a/crates/flags/src/lib.rs b/crates/flags/src/lib.rsindex 3906df988..327873a65 100644--- a/crates/flags/src/lib.rs+++ b/crates/flags/src/lib.rs@@ -6,6 +6,6 @@ pub struct Flags {}pub const FLAGS: Flags = Flags {- record_mouse_state: cfg!(debug_assertions),- split: cfg!(debug_assertions),+ record_mouse_state: false,+ split: false,};diff --git a/packages/web-api-contract/src/index.ts b/packages/web-api-contract/src/index.tsindex d3c413a5c..bea842a37 100644--- a/packages/web-api-contract/src/index.ts+++ b/packages/web-api-contract/src/index.ts@@ -48,7 +48,7 @@ export const licenseContract = c.router({responses: {200: z.object({message: z.string(),- expiryDate: z.number(),+ expiryDate: z.number().optional(),refresh: z.number(),}),403: z.object({ message: z.string() }),