mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-01 21:13:09 +00:00
clean up code and logs (#1809)
abstract base64 functions and clean up console logs
This commit is contained in:
@@ -46,6 +46,7 @@ export * from './types/url'
|
||||
export * from './types/workspace-config'
|
||||
|
||||
export * from './util/copy-to-clipboard'
|
||||
export * from './util/base-64'
|
||||
export * from './util/get-pkg-id'
|
||||
export * from './util/misc.util'
|
||||
export * from './util/rpc.util'
|
||||
|
||||
@@ -11,7 +11,6 @@ export class DownloadHTMLService {
|
||||
.join(';')
|
||||
const styleString = entries ? `<style>html{${entries}}></style>` : ''
|
||||
|
||||
console.log('STYLES', styleString)
|
||||
html = styleString + html
|
||||
|
||||
const elem = this.document.createElement('a')
|
||||
|
||||
9
frontend/projects/shared/src/util/base-64.ts
Normal file
9
frontend/projects/shared/src/util/base-64.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import * as Base64 from 'base64-js'
|
||||
|
||||
export function encodeBase64(text: string) {
|
||||
return Base64.fromByteArray(new TextEncoder().encode(text))
|
||||
}
|
||||
|
||||
export function decodeBase64(encoded: string) {
|
||||
return new TextDecoder().decode(Base64.toByteArray(encoded))
|
||||
}
|
||||
Reference in New Issue
Block a user