mirror of https://github.com/logseq/logseq
Merge branch 'master' into feat/reproducible-plugin
commit
7c9c6bd913
|
@ -29,7 +29,7 @@
|
|||
[:span.col-span-3 desc]
|
||||
[:div.col-span-1.justify-end.tip.flex
|
||||
(when (and (keyword? id) (namespace id))
|
||||
[:code.opacity-20.bg-transparent (namespace id)])
|
||||
[:code.opacity-40.bg-transparent (namespace id)])
|
||||
(when-not (string/blank? first-shortcut)
|
||||
[:code.ml-1 first-shortcut])]]))
|
||||
|
||||
|
|
|
@ -1253,7 +1253,7 @@
|
|||
:right-side-bar/recent "最近"
|
||||
:right-side-bar/contents "目录"
|
||||
:right-side-bar/favorites "收藏"
|
||||
:right-side-bar/page-graph "页面图谱:"
|
||||
:right-side-bar/page-graph "页面图谱"
|
||||
:right-side-bar/block-ref "块引用"
|
||||
:right-side-bar/graph-view "图谱视角"
|
||||
:right-side-bar/all-pages "全部页面"
|
||||
|
@ -1508,8 +1508,8 @@
|
|||
|
||||
:command-palette/prompt "输入指令"
|
||||
|
||||
:file-sync/other-user-graph "当前本地 graph 绑定在其他用户的远程 graph 上。因此无法启动同步。"
|
||||
:file-sync/graph-deleted "当前远程 graph 已经删除"}
|
||||
:file-sync/other-user-graph "当前本地图谱绑定在其他用户的远程图谱上。因此无法启动同步。"
|
||||
:file-sync/graph-deleted "当前远程图谱已经删除"}
|
||||
|
||||
:zh-Hant {:on-boarding/demo-graph "This is a demo graph, changes will not be saved until you open a local folder."
|
||||
:on-boarding/add-graph "Add a graph"
|
||||
|
|
|
@ -160,7 +160,7 @@
|
|||
(dissoc options :only-child?) child]
|
||||
[:a.flex.justify-between.px-4.py-2.text-sm.transition.ease-in-out.duration-150.cursor.menu-link
|
||||
options
|
||||
[:span child]
|
||||
[:span.flex-1 child]
|
||||
(when shortcut
|
||||
[:span.ml-1 (render-keyboard-shortcut shortcut)])]))
|
||||
|
||||
|
|
|
@ -7,8 +7,7 @@ import * as React from 'react'
|
|||
|
||||
import * as ReactContextMenu from '@radix-ui/react-context-menu'
|
||||
import * as Separator from '@radix-ui/react-separator'
|
||||
|
||||
const preventDefault = (e: Event) => e.stopPropagation()
|
||||
import { toJS } from 'mobx'
|
||||
|
||||
interface ContextMenuProps {
|
||||
children: React.ReactNode
|
||||
|
@ -27,6 +26,13 @@ export const ContextMenu = observer(function ContextMenu({
|
|||
app.transition('select')
|
||||
}
|
||||
|
||||
const developerMode = React.useMemo(() => {
|
||||
return (
|
||||
window?.logseq?.api?.get_state_from_store?.('ui/developer-mode?') ||
|
||||
process.env.NODE_ENV === 'development'
|
||||
)
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<ReactContextMenu.Root>
|
||||
<ReactContextMenu.Trigger>{children}</ReactContextMenu.Trigger>
|
||||
|
@ -226,6 +232,15 @@ export const ContextMenu = observer(function ContextMenu({
|
|||
</span>
|
||||
</div>
|
||||
</ReactContextMenu.Item>
|
||||
|
||||
{developerMode && (
|
||||
<ReactContextMenu.Item
|
||||
className="tl-menu-item"
|
||||
onClick={() => console.log(app.selectedShapesArray.map(s => toJS(s.serialized)))}
|
||||
>
|
||||
(Dev) Print shape props
|
||||
</ReactContextMenu.Item>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
|
|
@ -11,6 +11,7 @@ declare global {
|
|||
set_blocks_id?: (uuids: string[]) => void
|
||||
open_external_link?: (url: string) => void
|
||||
get_selected_blocks?: () => { uuid: string }[]
|
||||
get_state_from_store?: (path: string) => any
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,8 +48,8 @@ export class ImageShape extends TLImageShape<ImageShapeProps> {
|
|||
<HTMLContainer {...events} opacity={isErasing ? 0.2 : opacity}>
|
||||
{isBinding && <BindingIndicator mode="html" strokeWidth={4} size={[w, h]} />}
|
||||
|
||||
<div style={{ width: '100%', height: '100%', overflow: 'hidden' }}>
|
||||
{asset && (
|
||||
<div className="tl-image-shape-container">
|
||||
{asset ? (
|
||||
<img
|
||||
src={handlers ? handlers.makeAssetUrl(asset.src) : asset.src}
|
||||
draggable={false}
|
||||
|
@ -60,9 +60,10 @@ export class ImageShape extends TLImageShape<ImageShapeProps> {
|
|||
width: w + (l - r),
|
||||
height: h + (t - b),
|
||||
objectFit,
|
||||
pointerEvents: 'all',
|
||||
}}
|
||||
/>
|
||||
) : (
|
||||
'Asset is missing'
|
||||
)}
|
||||
</div>
|
||||
</HTMLContainer>
|
||||
|
|
|
@ -699,6 +699,11 @@ button.tl-select-input-trigger {
|
|||
flex-grow: 0;
|
||||
}
|
||||
|
||||
.tl-image-shape-container {
|
||||
@apply h-full w-full overflow-hidden flex items-center justify-center pointer-events-auto;
|
||||
background-color: var(--ls-secondary-background-color);
|
||||
}
|
||||
|
||||
.tl-html-container {
|
||||
@apply h-full w-full m-0 relative flex flex-col;
|
||||
user-select: text;
|
||||
|
|
Loading…
Reference in New Issue