Use deno typescript instead of node. Fix compilation errors for updated typescript. update setup script to install deno. use tmux when running localling for all processes.
This commit is contained in:
28
src/App.ts
28
src/App.ts
@@ -749,27 +749,23 @@ export class App {
|
||||
this.render();
|
||||
}
|
||||
|
||||
getPeerID() {
|
||||
let id = localStorage.getItem("peer_id");
|
||||
|
||||
if (!id) {
|
||||
console.log.apply(null, log(`Didn't find a peer ID, generating one`));;
|
||||
id = generateID();
|
||||
localStorage.setItem("peer_id", id);
|
||||
}
|
||||
getPeerID(): string {
|
||||
const existing = localStorage.getItem("peer_id");
|
||||
if (existing) return existing;
|
||||
|
||||
console.log.apply(null, log(`Didn't find a peer ID, generating one`));
|
||||
const id = generateID();
|
||||
localStorage.setItem("peer_id", id);
|
||||
return id;
|
||||
}
|
||||
|
||||
getUserID() {
|
||||
let id = localStorage.getItem("dandelion_id");
|
||||
|
||||
if (!id) {
|
||||
console.log.apply(null, log(`Didn't find a user ID, generating one`));;
|
||||
id = generateID();
|
||||
localStorage.setItem("dandelion_id", id);
|
||||
}
|
||||
getUserID(): string {
|
||||
const existing = localStorage.getItem("dandelion_id");
|
||||
if (existing) return existing;
|
||||
|
||||
console.log.apply(null, log(`Didn't find a user ID, generating one`));
|
||||
const id = generateID();
|
||||
localStorage.setItem("dandelion_id", id);
|
||||
return id;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { openDatabase, getData, addData, addDataArray, clearData, deleteData, me
|
||||
import { log, logID } from "log";
|
||||
|
||||
|
||||
async function bytesToBase64DataUrl(bytes: Uint8Array, type = "application/octet-stream") {
|
||||
async function bytesToBase64DataUrl(bytes: Uint8Array<ArrayBuffer>, type = "application/octet-stream") {
|
||||
return await new Promise((resolve, reject) => {
|
||||
const reader = Object.assign(new FileReader(), {
|
||||
onload: () => resolve(reader.result),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export async function bytesToBase64DataUrl(bytes: Uint8Array, type = "application/octet-stream") {
|
||||
export async function bytesToBase64DataUrl(bytes: Uint8Array<ArrayBuffer>, type = "application/octet-stream") {
|
||||
return await new Promise((resolve, reject) => {
|
||||
const reader = Object.assign(new FileReader(), {
|
||||
onload: () => resolve(reader.result),
|
||||
|
||||
@@ -230,7 +230,7 @@ window.addEventListener('scroll', () => {
|
||||
// }
|
||||
// }
|
||||
|
||||
async function bytesToBase64DataUrl(bytes: Uint8Array, type = "application/octet-stream") {
|
||||
async function bytesToBase64DataUrl(bytes: Uint8Array<ArrayBuffer>, type = "application/octet-stream") {
|
||||
return await new Promise((resolve, reject) => {
|
||||
const reader = Object.assign(new FileReader(), {
|
||||
onload: () => resolve(reader.result),
|
||||
@@ -918,7 +918,7 @@ class App {
|
||||
}_${String(d.getSeconds()).padStart(2, '0')}`;
|
||||
|
||||
|
||||
this.downloadBinary(compressedData, `ddln_${this.username}_export_${timestamp}.json.gz`);
|
||||
this.downloadBinary(compressedData.buffer, `ddln_${this.username}_export_${timestamp}.json.gz`);
|
||||
}
|
||||
|
||||
async importTweetArchive(userID: string, tweetArchive: any[]) {
|
||||
|
||||
Reference in New Issue
Block a user