mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-20 08:52:59 +00:00
feat: layout url import
feat: backup import (except chords) feat: legacy layout import feat: separate layout, chord & setting backup downloads
This commit is contained in:
@@ -24,7 +24,7 @@ export function decompressActions(raw: Uint8Array): number[] {
|
||||
const actions: number[] = []
|
||||
for (let i = 0; i < raw.length; i++) {
|
||||
let action = raw[i]
|
||||
if (action < 32) {
|
||||
if (action > 0 && action < 32) {
|
||||
action = (action << 8) | raw[++i]
|
||||
}
|
||||
actions.push(action)
|
||||
|
||||
@@ -20,7 +20,7 @@ export async function toBase64(blob: Blob): Promise<string> {
|
||||
})
|
||||
}
|
||||
|
||||
export async function fromBase64(base64: string): Promise<Blob> {
|
||||
export async function fromBase64(base64: string, fetch = window.fetch): Promise<Blob> {
|
||||
return fetch(
|
||||
`data:application/octet-stream;base64,${base64
|
||||
.replaceAll(".", "+")
|
||||
|
||||
Reference in New Issue
Block a user