Skip to content

Commit 49a13c1

Browse files
authored
[UI] fix logo black background (#647)
1 parent ecded9d commit 49a13c1

File tree

2 files changed

+18
-11
lines changed

2 files changed

+18
-11
lines changed

web/client/src/library/components/logo/SqlMesh.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ function LogoSqlMesh({
2929
className={className}
3030
viewBox="0 0 240 72"
3131
xmlns="http://www.w3.org/2000/svg"
32+
fill="none"
3233
>
3334
<title>SQLMesh logo</title>
3435
<path

web/client/src/workers/sqlglot/worker.ts

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,30 @@
1-
const global = self as any
2-
global.importScripts('https://cdn.jsdelivr.net/pyodide/v0.22.1/full/pyodide.js')
1+
declare function importScripts(...urls: string[]): void
2+
3+
importScripts('https://cdn.jsdelivr.net/pyodide/v0.22.1/full/pyodide.js')
4+
5+
const scope = self as any
36

47
async function loadPyodideAndPackages(): Promise<any[]> {
5-
global.pyodide = await global.loadPyodide()
6-
await global.pyodide.loadPackage('micropip')
8+
scope.pyodide = await scope.loadPyodide()
9+
10+
await scope.pyodide.loadPackage('micropip')
11+
12+
const micropip = scope.pyodide.pyimport('micropip')
713

8-
const micropip = global.pyodide.pyimport('micropip')
914
await micropip.install('sqlglot')
15+
1016
const file = await (
1117
await fetch(new URL('./sqlglot.py', import.meta.url))
1218
).text()
1319

14-
global.postMessage({ topic: 'init' })
20+
scope.postMessage({ topic: 'init' })
1521

16-
return Array.from(global.pyodide.runPython(file))
22+
return Array.from(scope.pyodide.runPython(file))
1723
}
1824

1925
const pyodideReadyPromise = loadPyodideAndPackages()
2026

21-
global.onmessage = async (e: MessageEvent) => {
27+
scope.onmessage = async (e: MessageEvent) => {
2228
const [parse, get_dialect, dialects] = await pyodideReadyPromise
2329

2430
if (e.data.topic === 'parse') {
@@ -33,7 +39,7 @@ global.onmessage = async (e: MessageEvent) => {
3339
}
3440
}
3541

36-
global.postMessage({
42+
scope.postMessage({
3743
topic: 'parse',
3844
payload,
3945
})
@@ -44,7 +50,7 @@ global.onmessage = async (e: MessageEvent) => {
4450
get_dialect(e.data.payload),
4551
)
4652

47-
global.postMessage({
53+
scope.postMessage({
4854
topic: 'dialect',
4955
payload: {
5056
types: `${types} `.toLowerCase(),
@@ -54,7 +60,7 @@ global.onmessage = async (e: MessageEvent) => {
5460
}
5561

5662
if (e.data.topic === 'dialects') {
57-
global.postMessage({
63+
scope.postMessage({
5864
topic: 'dialects',
5965
payload: {
6066
dialects: JSON.parse(dialects),

0 commit comments

Comments
 (0)