Skip to content

Commit 365d7ee

Browse files
authored
fix: restore style for pad.ws logo in auth modal (#98)
* fix: restore telemetry in App.tsx * style: update AuthDialog.scss for improved modal background and backdrop effects - Added a semi-transparent background color and blur effect to the modal backdrop for enhanced visual appeal. - Overrode the Excalidraw already overriden background styles to ensure consistent appearance across the application.
1 parent 8749139 commit 365d7ee

File tree

2 files changed

+22
-11
lines changed

2 files changed

+22
-11
lines changed

src/frontend/src/App.tsx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState } from "react";
1+
import React, { useState, useEffect } from "react";
22
import { Excalidraw, MainMenu, Footer } from "@atyrode/excalidraw";
33
import type { ExcalidrawImperativeAPI, AppState } from "@atyrode/excalidraw/types";
44
import type { ExcalidrawEmbeddableElement, NonDeleted } from "@atyrode/excalidraw/element/types";
@@ -7,6 +7,7 @@ import type { ExcalidrawEmbeddableElement, NonDeleted } from "@atyrode/excalidra
77
import { useAuthStatus } from "./hooks/useAuthStatus";
88
import { usePadTabs } from "./hooks/usePadTabs";
99
import { useCallbackRefState } from "./hooks/useCallbackRefState";
10+
import { useAppConfig } from "./hooks/useAppConfig";
1011

1112
// Components
1213
import DiscordButton from './ui/DiscordButton';
@@ -22,6 +23,7 @@ import Tabs from "./ui/Tabs";
2223
import { INITIAL_APP_DATA, HIDDEN_UI_ELEMENTS } from "./constants";
2324

2425
export default function App() {
26+
const { config, configError } = useAppConfig();
2527
const { isAuthenticated, isLoading: isLoadingAuth, user } = useAuthStatus();
2628

2729
const {
@@ -49,16 +51,16 @@ export default function App() {
4951
lockEmbeddables(excalidrawAPI?.getAppState());
5052
};
5153

52-
// useEffect(() => {
53-
// if (appConfig?.posthogKey && appConfig?.posthogHost) {
54-
// initializePostHog({
55-
// posthogKey: appConfig.posthogKey,
56-
// posthogHost: appConfig.posthogHost,
57-
// });
58-
// } else if (configError) {
59-
// console.error('[pad.ws] Failed to load app config:', configError);
60-
// }
61-
// }, [appConfig, configError]);
54+
useEffect(() => {
55+
if (config?.posthogKey && config?.posthogHost) {
56+
initializePostHog({
57+
posthogKey: config.posthogKey,
58+
posthogHost: config.posthogHost,
59+
});
60+
} else if (configError) {
61+
console.error('[pad.ws] Failed to load app config:', configError);
62+
}
63+
}, [config, configError]);
6264

6365
return (
6466
<>

src/frontend/src/ui/AuthDialog.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,15 @@
5050
width: 100%;
5151
height: 100%;
5252
z-index: 5;
53+
background-color: rgba(0, 0, 0, 0.2) !important;
54+
backdrop-filter: blur(1px) !important;
55+
}
56+
57+
.Modal { /* Overriding the Excalidraw override for the pad.ws logo! */
58+
&__background {
59+
background-color: none !important;
60+
backdrop-filter: none !important;
61+
}
5362
}
5463

5564
&__logo-container {

0 commit comments

Comments
 (0)