feat: download and preview files from local backups automatically, if a local backup is available (#2076)

This commit is contained in:
Mo
2022-12-01 11:56:28 -06:00
committed by GitHub
parent e07fed267f
commit 28e43d37c0
34 changed files with 739 additions and 110 deletions

View File

@@ -655,11 +655,15 @@ export function secondHalfOfString(string: string): string {
}
export function log(namespace: string, ...args: any[]): void {
logWithColor(namespace, 'black', ...args)
}
export function logWithColor(namespace: string, namespaceColor: string, ...args: any[]): void {
const date = new Date()
const timeString = `${date.toLocaleTimeString().replace(' PM', '').replace(' AM', '')}.${date.getMilliseconds()}`
customLog(
`%c${namespace}%c${timeString}`,
'color: black; font-weight: bold; margin-right: 4px',
`color: ${namespaceColor}; font-weight: bold; margin-right: 4px`,
'color: gray',
...args,
)