Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(collection/presentation): DOM buttons are not visible after shadow DOM
Elian Doran9281cc9290c7
diff --git a/apps/client/src/widgets/collections/presentation/index.tsx b/apps/client/src/widgets/collections/presentation/index.tsxindex e3329970ef..9ac6e87e90 100644--- a/apps/client/src/widgets/collections/presentation/index.tsx+++ b/apps/client/src/widgets/collections/presentation/index.tsx@@ -1,8 +1,8 @@import { ViewModeProps } from "../interface";import { useEffect, useLayoutEffect, useRef, useState } from "preact/hooks";import Reveal from "reveal.js";-import slideBaseStylesheet from "reveal.js/dist/reveal.css?raw";-import slideThemeStylesheet from "reveal.js/dist/theme/black.css?raw";+import slideBaseStylesheetUrl from "reveal.js/dist/reveal.css?url";+import slideThemeStylesheetUrl from "reveal.js/dist/theme/black.css?url";import { buildPresentationModel, PresentationModel, PresentationSlideModel } from "./model";import ShadowDom from "../../react/ShadowDom";@@ -15,8 +15,8 @@ export default function PresentationView({ note }: ViewModeProps<{}>) {return presentation && (<ShadowDom className="presentation-container" style={{ width: "100%", height: "100%" }}>- <style>{slideBaseStylesheet}</style>- <style>{slideThemeStylesheet}</style>+ <link rel="stylesheet" href={slideBaseStylesheetUrl} />+ <link rel="stylesheet" href={slideThemeStylesheetUrl} /><Presentation presentation={presentation} /></ShadowDom>)@@ -30,7 +30,8 @@ function Presentation({ presentation } : { presentation: PresentationModel }) {if (apiRef.current || !containerRef.current) return;apiRef.current = new Reveal(containerRef.current, {- transition: "slide"+ transition: "slide",+ embedded: true});apiRef.current.initialize().then(() => {console.log("Slide.js initialized.");