feat: local command

This commit is contained in:
DarkSky
2022-07-22 18:08:30 +08:00
parent 0871fbda07
commit 9361ad8e61
9 changed files with 43 additions and 23 deletions
@@ -84,9 +84,9 @@ const Title = styled('div')<{ size: PreviewSize }>(({ size }) => {
const ScopedEditorWrapper = styled('div')<{ size: PreviewSize }>(({ size }) => {
return {
width: '750px',
width: '940px',
height: '750px',
transform: 'scale(32%) translate(-102%, -104%)',
transform: 'scale(25%) translate(-145%, -145%)',
// eslint-disable-next-line @typescript-eslint/naming-convention
'&>:first-child': {
margin: 'auto',
@@ -136,7 +136,6 @@ const SourceViewContainer = styled('div')<{
borderRadius: theme.affine.shape.borderRadius,
background: isSelected ? 'rgba(152, 172, 189, 0.1)' : 'transparent',
padding: '8px',
// border:
iframe: {
width: '100%',
height: '100%',
@@ -171,6 +170,7 @@ export const SourceView: FC<Props> = props => {
<SourceViewContainer
isSelected={isSelected}
scene={SCENE_CONFIG.REFLINK}
style={{ padding: '0' }}
>
<MemoBlockPreview
block={block}
@@ -1,5 +1,5 @@
const _regex =
/^(https?:\/\/(localhost:4200|(nightly|app)\.affine\.pro|.*?\.ligo-virgo\.pages\.dev)\/\w{28}\/)?(affine\w{16})$/;
/^(https?:\/\/(localhost:4200|(nightly|app)\.affine\.pro|.*?\.ligo-virgo\.pages\.dev)\/\w{28}\/)?(affine\w{16})(\/whiteboard)?$/;
export const isAffineUrl = (url?: string) => {
if (!url) return false;