Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions src/frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from "react";
import React, { useState, useEffect } from "react";
import { Excalidraw, MainMenu, Footer } from "@atyrode/excalidraw";
import type { ExcalidrawImperativeAPI, AppState } from "@atyrode/excalidraw/types";
import type { ExcalidrawEmbeddableElement, NonDeleted } from "@atyrode/excalidraw/element/types";
Expand All @@ -7,6 +7,7 @@ import type { ExcalidrawEmbeddableElement, NonDeleted } from "@atyrode/excalidra
import { useAuthStatus } from "./hooks/useAuthStatus";
import { usePadTabs } from "./hooks/usePadTabs";
import { useCallbackRefState } from "./hooks/useCallbackRefState";
import { useAppConfig } from "./hooks/useAppConfig";

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

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

const {
Expand Down Expand Up @@ -49,16 +51,16 @@ export default function App() {
lockEmbeddables(excalidrawAPI?.getAppState());
};

// useEffect(() => {
// if (appConfig?.posthogKey && appConfig?.posthogHost) {
// initializePostHog({
// posthogKey: appConfig.posthogKey,
// posthogHost: appConfig.posthogHost,
// });
// } else if (configError) {
// console.error('[pad.ws] Failed to load app config:', configError);
// }
// }, [appConfig, configError]);
useEffect(() => {
if (config?.posthogKey && config?.posthogHost) {
initializePostHog({
posthogKey: config.posthogKey,
posthogHost: config.posthogHost,
});
} else if (configError) {
console.error('[pad.ws] Failed to load app config:', configError);
}
}, [config, configError]);

return (
<>
Expand Down
9 changes: 9 additions & 0 deletions src/frontend/src/ui/AuthDialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@
width: 100%;
height: 100%;
z-index: 5;
background-color: rgba(0, 0, 0, 0.2) !important;
backdrop-filter: blur(1px) !important;
}

.Modal { /* Overriding the Excalidraw override for the pad.ws logo! */
&__background {
background-color: none !important;
backdrop-filter: none !important;
}
}

&__logo-container {
Expand Down