File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ const NodeSpecification = ({
7777 } else {
7878 const tree = getBasicTreeByParentUid ( parentUid ) ;
7979 const scratchNode = getSubTree ( { tree, key : "scratch" } ) ;
80- Promise . all ( scratchNode . children . map ( ( c : { uid : string } ) => deleteBlock ( c . uid ) ) ) . catch (
80+ Promise . all ( scratchNode . children . map ( ( c ) => deleteBlock ( c . uid ) ) ) . catch (
8181 ( error ) => {
8282 internalError ( { error } ) ;
8383 } ,
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ import { PersonalFlagPanel } from "./components/BlockPropSettingPanels";
3131import posthog from "posthog-js" ;
3232
3333const HomePersonalSettings = ( { onloadArgs } : { onloadArgs : OnloadArgs } ) => {
34+ const extensionAPI = onloadArgs . extensionAPI ;
3435 const overlayHandler = getOverlayHandler ( onloadArgs ) ;
3536 const settings = useMemo ( ( ) => getFormattedConfigTree ( ) , [ ] ) ;
3637
@@ -43,7 +44,7 @@ const HomePersonalSettings = ({ onloadArgs }: { onloadArgs: OnloadArgs }) => {
4344 "Override the global trigger for the discourse node menu. Must refresh after editing."
4445 }
4546 />
46- < NodeMenuTriggerComponent extensionAPI = { onloadArgs . extensionAPI } />
47+ < NodeMenuTriggerComponent extensionAPI = { extensionAPI } />
4748 </ Label >
4849 < Label >
4950 Node search menu trigger
@@ -59,6 +60,7 @@ const HomePersonalSettings = ({ onloadArgs }: { onloadArgs: OnloadArgs }) => {
5960 settingKey = { DISCOURSE_TOOL_SHORTCUT_KEY }
6061 label = "Discourse tool keyboard shortcut"
6162 description = "Set a single key to activate the discourse tool in tldraw. Only single keys (no modifiers) are supported. Leave empty for no shortcut."
63+ placeholder = "Click to set single key"
6264 />
6365 < PersonalFlagPanel
6466 title = "Overlay"
Original file line number Diff line number Diff line change @@ -110,7 +110,13 @@ const initSingleDiscourseNode = async (
110110
111111 if ( ! existingProps || Object . keys ( existingProps ) . length === 0 ) {
112112 const nodeData = DiscourseNodeSchema . parse ( {
113- ...node ,
113+ text : node . text ,
114+ type : node . type ,
115+ format : node . format || "" ,
116+ shortcut : node . shortcut || "" ,
117+ tag : node . tag || "" ,
118+ graphOverview : node . graphOverview ?? false ,
119+ canvasSettings : node . canvasSettings || { } ,
114120 backedBy : "default" ,
115121 } ) ;
116122
Original file line number Diff line number Diff line change @@ -36,12 +36,12 @@ import getBasicTreeByParentUid from "roamjs-components/queries/getBasicTreeByPar
3636import getPageUidByPageTitle from "roamjs-components/queries/getPageUidByPageTitle" ;
3737import { DISCOURSE_CONFIG_PAGE_TITLE } from "./utils/renderNodeConfigPage" ;
3838import { getSetting } from "./utils/extensionSettings" ;
39+ import { initPostHog } from "./utils/posthog" ;
3940import {
4041 STREAMLINE_STYLING_KEY ,
4142 DISALLOW_DIAGNOSTICS ,
4243} from "./data/userSettings" ;
4344import { initSchema } from "./components/settings/utils/init" ;
44- import { initPostHog } from "./utils/posthog" ;
4545export const DEFAULT_CANVAS_PAGE_FORMAT = "Canvas/*" ;
4646
4747export default runExtension ( async ( onloadArgs ) => {
You can’t perform that action at this time.
0 commit comments