1
0
Fork 0
mirror of https://github.com/anyproto/anytype-ts.git synced 2025-06-08 05:57:02 +09:00

Merge branch 'master' of github.com:anytypeio/js-anytype into npm-security

This commit is contained in:
Andrew Simachev 2022-08-03 09:43:39 +03:00
commit 10b7f4d12b
8 changed files with 19 additions and 15 deletions

View file

@ -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"
];

View file

@ -1 +1 @@
0.21.4
0.21.5

4
package-lock.json generated
View file

@ -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": {

View file

@ -1,6 +1,6 @@
{
"name": "anytype2",
"version": "0.27.0",
"version": "0.27.1-alpha",
"description": "Anytype",
"main": "electron.js",
"scripts": {

View file

@ -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; }
}

View file

@ -657,7 +657,9 @@ const BlockTable = observer(class BlockTable extends React.Component<Props, {}>
};
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<Props, {}>
focus.set(cellId, { from: 0, to: 0 });
focus.apply();
selection.clear(true);
});
} else {
cb();

View file

@ -677,7 +677,6 @@ const BlockText = observer(class BlockText extends React.Component<Props, {}> {
{ 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 },
];

View file

@ -801,7 +801,7 @@ const EditorPage = observer(class EditorPage extends React.Component<Props, {}>
// 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<Props, {}>
// 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<Props, {}>
};
// 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<Props, {}>
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<Props, {}>
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;