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:
parent
b6759f154e
commit
951cb9ed6a
4 changed files with 14 additions and 2 deletions
|
@ -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) => {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue