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

popup new block

This commit is contained in:
Andrew Simachev 2020-04-09 16:59:19 +03:00
parent b6759f154e
commit 951cb9ed6a
4 changed files with 14 additions and 2 deletions

View file

@ -149,6 +149,8 @@ function createWindow () {
});
autoUpdater.on('update-not-available', (info) => {
setStatus('Update not available');
win.webContents.send('update');
});
autoUpdater.on('error', (err) => { setStatus('Error: ' + err); });
autoUpdater.on('download-progress', (progress) => {

View file

@ -261,6 +261,10 @@ class App extends React.Component<Props, State> {
});
});
ipcRenderer.on('update', (e: any) => {
Storage.delete('popupNewBlock');
});
win.unbind('mousemove.common').on('mousemove.common', throttle((e: any) => {
keyboard.setPinCheck();
keyboard.disableMouse(false);

View file

@ -99,7 +99,9 @@ class PageAuthPinCheck extends React.Component<Props, State> {
history.push('/main/index');
};
commonStore.popupOpen('new', {});
if (!Storage.get('popupNewBlock')) {
commonStore.popupOpen('new', {});
};
});
};
} else {

View file

@ -1,7 +1,7 @@
import * as React from 'react';
import { RouteComponentProps } from 'react-router';
import { Label, Icon } from 'ts/component';
import { I, Docs } from 'ts/lib';
import { I, Docs, Storage } from 'ts/lib';
import { commonStore } from 'ts/store';
import { observer } from 'mobx-react';
@ -40,6 +40,10 @@ class PopupNew extends React.Component<Props, {}> {
);
};
componentDidMount () {
Storage.set('popupNewBlock', 1);
};
onUrl (url: string) {
ipcRenderer.send('urlOpen', url);
};