diff --git a/src/lib/components/AnimatedNumber.svelte b/src/lib/components/AnimatedNumber.svelte new file mode 100644 index 00000000..51d0b823 --- /dev/null +++ b/src/lib/components/AnimatedNumber.svelte @@ -0,0 +1,51 @@ + + +
+ {#each digits as digit, i (digits.length - i)} +
+ {#each nums as num (num)} +
+ {num} +
+ {/each} +
+ {/each} +
+ + diff --git a/src/routes/(app)/ccos/[device]/[version]/meta.ts b/src/lib/meta.ts similarity index 100% rename from src/routes/(app)/ccos/[device]/[version]/meta.ts rename to src/lib/meta.ts diff --git a/src/routes/(app)/ccos/+layout.svelte b/src/routes/(app)/ccos/+layout.svelte index 29d3095b..958ffaee 100644 --- a/src/routes/(app)/ccos/+layout.svelte +++ b/src/routes/(app)/ccos/+layout.svelte @@ -1,15 +1,107 @@ -

Firmware Updates

+

+ CCOS + {#if targetDevice !== undefined} +
+ / + {targetDevice} +
+ {/if} + {#if version !== undefined} +
+ / + {version} +
+ {/if} +

{@render children()} diff --git a/src/routes/(app)/ccos/[device]/[version]/+page.svelte b/src/routes/(app)/ccos/[device]/[version]/+page.svelte index fddda27d..f5bca3f5 100644 --- a/src/routes/(app)/ccos/[device]/[version]/+page.svelte +++ b/src/routes/(app)/ccos/[device]/[version]/+page.svelte @@ -10,6 +10,8 @@ let success = $state(false); let error = $state(undefined); + let unsafeUpdate = $state(false); + let terminalOutput = $state(""); let step = $state(0); @@ -187,17 +189,6 @@
-

- CCOS / - {data.meta.target} - / {data.meta.version} -

- {#if data.meta.update.ota && !data.meta.target.endsWith("m0")} {@const buttonError = error || (!success && isCorrectDevice === false)}
@@ -237,87 +228,92 @@ {/if}
-

Manual Update

+ {/if} - {#if isCorrectDevice === false} -
- These files are incompatible with your device -
- {/if} - -
-
    -
  1. - - your device - {#if step >= 1} - check_circle - {/if} -
  2. - -
  3. - Make a - {#if step >= 2} - check_circle - {/if} -
  4. - -
  5. - Reboot to - {#if step >= 3} - check_circle - {/if} -
  6. - -
  7. - Replace - on the new drive - {#if step >= 4} - check_circle - {/if} -
  8. -
-
- - {#if data.meta.update.esptool} -
-

Factory Flash (WIP)

-

- If everything else fails, you can go through the same process that is - being used in the factory. -

-

- This will temporarily brick your device if the process is not done - completely or incorrectly. -

- -
- - - - +
+ {#if isCorrectDevice === false} +
+ These files are incompatible with your device
+ {/if} -
{terminalOutput}
+
+
    +
  1. + + your device + {#if step >= 1} + check_circle + {/if} +
  2. + +
  3. + Make a + {#if step >= 2} + check_circle + {/if} +
  4. + +
  5. + Reboot to + {#if step >= 3} + check_circle + {/if} +
  6. + +
  7. + Replace + on the new drive + {#if step >= 4} + check_circle + {/if} +
  8. +
- {/if} + + {#if data.meta.update.esptool} +
+

Factory Flash (WIP)

+

+ If everything else fails, you can go through the same process that is + being used in the factory. +

+

+ This will temporarily brick your device if the process is not done + completely or incorrectly. +

+ +
+ + + + +
+ +
{terminalOutput}
+
+ {/if} +