diff --git a/electron.js b/electron.js index 4bae1dd25b..539a62f3ae 100644 --- a/electron.js +++ b/electron.js @@ -42,8 +42,8 @@ let csp = [ "media-src 'self' http://*:* https://*:* data: blob: file://*", "style-src 'unsafe-inline' http://localhost:* file://*", "font-src data: file://*", - "connect-src http://localhost:* http://127.0.0.1:* ws://localhost:* https://sentry.anytype.io https://anytype.io https://api.amplitude.com/ devtools://devtools data: https://*.wistia.com https://*.wistia.net https://embedwistia-a.akamaihd.net", - "script-src-elem file: http://localhost:* https://sentry.io devtools://devtools 'unsafe-inline' https://*.wistia.com https://*.wistia.net", + "connect-src http://localhost:* http://127.0.0.1:* ws://localhost:* https://sentry.anytype.io https://anytype.io https://api.amplitude.com/ devtools://devtools data:", + "script-src-elem file: http://localhost:* https://sentry.io devtools://devtools 'unsafe-inline'", "frame-src chrome-extension://react-developer-tools" ]; diff --git a/middleware.version b/middleware.version index b166f00780..c9532c6209 100644 --- a/middleware.version +++ b/middleware.version @@ -1 +1 @@ -0.21.4 \ No newline at end of file +0.21.5 \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index f0636ea18c..0974d5ccea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "anytype2", - "version": "0.27.0", + "version": "0.27.1-alpha", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "anytype2", - "version": "0.27.0", + "version": "0.27.1-alpha", "hasInstallScript": true, "license": "ISC", "dependencies": { diff --git a/package.json b/package.json index c374fb8230..afe1179f47 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "anytype2", - "version": "0.27.0", + "version": "0.27.1-alpha", "description": "Anytype", "main": "electron.js", "scripts": { diff --git a/src/scss/theme/dark/menu.scss b/src/scss/theme/dark/menu.scss index e0ae234656..d9333c0650 100644 --- a/src/scss/theme/dark/menu.scss +++ b/src/scss/theme/dark/menu.scss @@ -80,7 +80,7 @@ /* MenuSmile */ .menu.menuSmile { - .head { border-color: $colorLineSecondary; color: $colorSecondary; } + .head, .foot { border-color: $colorLineSecondary; color: $colorSecondary; } .head { .btn:hover, .btn.active { color: $colorPrimary; } } diff --git a/src/ts/component/block/table.tsx b/src/ts/component/block/table.tsx index dd38edee0e..800867bcb2 100644 --- a/src/ts/component/block/table.tsx +++ b/src/ts/component/block/table.tsx @@ -657,7 +657,9 @@ const BlockTable = observer(class BlockTable extends React.Component }; onCellFocus (e: any, rowId: string, columnId: string, cellId: string) { - const { rootId, readonly } = this.props; + const { rootId, readonly, dataset } = this.props; + const { selection } = dataset || {}; + if (readonly) { return; }; @@ -674,6 +676,8 @@ const BlockTable = observer(class BlockTable extends React.Component focus.set(cellId, { from: 0, to: 0 }); focus.apply(); + + selection.clear(true); }); } else { cb(); diff --git a/src/ts/component/block/text.tsx b/src/ts/component/block/text.tsx index 18c4666818..ca7944fc34 100644 --- a/src/ts/component/block/text.tsx +++ b/src/ts/component/block/text.tsx @@ -677,7 +677,6 @@ const BlockText = observer(class BlockText extends React.Component { { key: `${cmd}+a`, preventDefault: true }, { key: `${cmd}+[`, preventDefault: false }, { key: `${cmd}+]`, preventDefault: false }, - { key: `tab`, preventDefault: false }, { key: `shift+tab`, preventDefault: true }, { key: `shift+space`, preventDefault: false }, ]; diff --git a/src/ts/component/editor/page.tsx b/src/ts/component/editor/page.tsx index 6fe7d35513..a1761daed4 100644 --- a/src/ts/component/editor/page.tsx +++ b/src/ts/component/editor/page.tsx @@ -801,7 +801,7 @@ const EditorPage = observer(class EditorPage extends React.Component // Enter keyboard.shortcut('enter, shift+enter', e, (pressed: string) => { if (isInsideTable && (pressed == 'enter')) { - this.onArrowVertical(e, 'arrowdown', { from: length, to: length }, length, props); + this.onArrowVertical(e, Key.down, { from: length, to: length }, length, props); } else { this.onEnterBlock(e, range, pressed); }; @@ -809,10 +809,12 @@ const EditorPage = observer(class EditorPage extends React.Component // Tab, indent block keyboard.shortcut('tab, shift+tab', e, (pressed: string) => { + const isShift = pressed.match('shift') ? true : false; + if (isInsideTable) { - this.onArrowHorizontal (e, 'arrowright', { from: length, to: length }, length, props); + this.onArrowHorizontal(e, isShift ? Key.left : Key.right, { from: length, to: length }, length, props); } else { - this.onTabBlock(e, pressed); + this.onTabBlock(e, isShift); }; }); @@ -1105,7 +1107,7 @@ const EditorPage = observer(class EditorPage extends React.Component }; // Indentation - onTabBlock (e: any, pressed: string) { + onTabBlock (e: any, isShift: boolean) { e.preventDefault(); const { rootId } = this.props; @@ -1116,7 +1118,6 @@ const EditorPage = observer(class EditorPage extends React.Component return; }; - const isShift = pressed.match('shift'); const element = blockStore.getMapElement(rootId, block.id); const parent = blockStore.getLeaf(rootId, element.parentId); const parentElement = blockStore.getMapElement(rootId, parent.id); @@ -1282,7 +1283,7 @@ const EditorPage = observer(class EditorPage extends React.Component onArrowHorizontal (e: any, pressed: string, range: I.TextRange, length: number, props: any) { const { focused } = focus.state; - const { rootId, isPopup } = this.props; + const { rootId } = this.props; const { isInsideTable } = props; const block = blockStore.getLeaf(rootId, focused); const dir = pressed.match(Key.left) ? -1 : 1;