mirror of
https://github.com/anyproto/anytype-ts.git
synced 2025-06-10 01:51:10 +09:00
refactoring
This commit is contained in:
parent
844c251020
commit
597e3bf4be
2 changed files with 9 additions and 9 deletions
|
@ -1,11 +1,10 @@
|
|||
import * as React from 'react';
|
||||
import { Title, Icon, Label, Button } from 'Component';
|
||||
import { I, translate, UtilCommon } from 'Lib';
|
||||
import { observer } from 'mobx-react';
|
||||
|
||||
const PopupAbout = observer(class PopupAbout extends React.Component<I.Popup> {
|
||||
class PopupAbout extends React.Component<I.Popup> {
|
||||
|
||||
render() {
|
||||
render () {
|
||||
return (
|
||||
<React.Fragment>
|
||||
<div className="iconWrapper">
|
||||
|
@ -15,7 +14,7 @@ const PopupAbout = observer(class PopupAbout extends React.Component<I.Popup> {
|
|||
<Label text={translate('popupAboutDescription')} />
|
||||
|
||||
<div className="version">
|
||||
{UtilCommon.sprintf(translate('popupAboutVersion'), window.Electron.version.app)}
|
||||
{UtilCommon.sprintf(translate('popupAboutVersion'), UtilCommon.getElectron().version.app)}
|
||||
<Button onClick={this.onVersionCopy} text={translate('commonCopy')} className="c28" color="blank" />
|
||||
</div>
|
||||
<div className="copyright">{translate('popupAboutCopyright')}</div>
|
||||
|
@ -24,8 +23,9 @@ const PopupAbout = observer(class PopupAbout extends React.Component<I.Popup> {
|
|||
};
|
||||
|
||||
onVersionCopy () {
|
||||
UtilCommon.clipboardCopy({ text: window.Electron.version.app });
|
||||
UtilCommon.clipboardCopy({ text: UtilCommon.getElectron().version.app });
|
||||
};
|
||||
});
|
||||
|
||||
export default PopupAbout;
|
||||
};
|
||||
|
||||
export default PopupAbout;
|
|
@ -107,7 +107,7 @@ const PopupSettingsOnboarding = observer(class PopupSettingsOnboarding extends R
|
|||
componentDidMount(): void {
|
||||
const { networkConfig } = authStore;
|
||||
const { mode, path } = networkConfig;
|
||||
const userPath = window.Electron.userPath();
|
||||
const userPath = UtilCommon.getElectron().userPath();
|
||||
|
||||
this.config = {
|
||||
userPath,
|
||||
|
@ -129,7 +129,7 @@ const PopupSettingsOnboarding = observer(class PopupSettingsOnboarding extends R
|
|||
|
||||
onSave () {
|
||||
const { networkConfig } = authStore;
|
||||
const userPath = window.Electron.userPath();
|
||||
const userPath = UtilCommon.getElectron().userPath();
|
||||
|
||||
if (this.config.mode !== networkConfig.mode) {
|
||||
analytics.event('SelectNetwork', { route: 'Onboarding', type: this.config.mode });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue