mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-10 03:52:57 +00:00
typing challenge prototype
This commit is contained in:
@@ -34,6 +34,7 @@
|
|||||||
>
|
>
|
||||||
{/each}
|
{/each}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
{/if}
|
{/if}
|
||||||
{/each}
|
{/each}
|
||||||
</section>
|
</section>
|
||||||
@@ -54,17 +55,16 @@
|
|||||||
section {
|
section {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
gap: 8px;
|
|
||||||
|
|
||||||
font-size: 1.3rem;
|
font-size: 1.3rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
.letter {
|
.letter {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
filter: brightness(50%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.letter.active::before {
|
.cursor {
|
||||||
content: "";
|
content: "";
|
||||||
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import {
|
|||||||
deserializeActions,
|
deserializeActions,
|
||||||
serializeActions,
|
serializeActions,
|
||||||
} from "./chord"
|
} from "./chord"
|
||||||
import type {Chord} from "./chord"
|
|
||||||
|
|
||||||
describe("chords", function () {
|
describe("chords", function () {
|
||||||
describe("actions", function () {
|
describe("actions", function () {
|
||||||
|
|||||||
@@ -9,11 +9,11 @@ export async function toBase64(blob: Blob): Promise<string> {
|
|||||||
const reader = new FileReader()
|
const reader = new FileReader()
|
||||||
reader.onloadend = function () {
|
reader.onloadend = function () {
|
||||||
resolve(
|
resolve(
|
||||||
(reader.result as string)
|
`${(reader.result as string)
|
||||||
.replace(/^data:application\/octet-stream;base64,/, "")
|
.replace(/^data:application\/octet-stream;base64,/, "")
|
||||||
.replaceAll("+", "~")
|
.replaceAll("+", ".")
|
||||||
.replaceAll("/", "_")
|
.replaceAll("/", "_")
|
||||||
.replaceAll("=", "-"),
|
.replaceAll("=", "-")}-`,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
reader.readAsDataURL(blob)
|
reader.readAsDataURL(blob)
|
||||||
@@ -23,7 +23,8 @@ export async function toBase64(blob: Blob): Promise<string> {
|
|||||||
export async function fromBase64(base64: string): Promise<Blob> {
|
export async function fromBase64(base64: string): Promise<Blob> {
|
||||||
return fetch(
|
return fetch(
|
||||||
`data:application/octet-stream;base64,${base64
|
`data:application/octet-stream;base64,${base64
|
||||||
.replaceAll("~", "+")
|
.replace(/-$/, "")
|
||||||
|
.replaceAll(".", "+")
|
||||||
.replaceAll("_", "/")
|
.replaceAll("_", "/")
|
||||||
.replaceAll("-", "=")}`,
|
.replaceAll("-", "=")}`,
|
||||||
).then(it => it.blob())
|
).then(it => it.blob())
|
||||||
|
|||||||
Reference in New Issue
Block a user