Migrated AutoUpdateVersion to ts
Summary: Migrated AutoUpdateVersion.js to AutoUpdateVersion.tsx Reviewed By: jknoxville Differential Revision: D16667729 fbshipit-source-id: a8f05b39be412f9ece1d1e56961fd87c88deb76a
This commit is contained in:
committed by
Facebook Github Bot
parent
77811c3c1b
commit
d39ac338a4
@@ -5,17 +5,11 @@
|
|||||||
* @format
|
* @format
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {
|
import {FlexRow, colors, LoadingIndicator, Glyph, styled} from 'flipper';
|
||||||
FlexRow,
|
|
||||||
colors,
|
|
||||||
LoadingIndicator,
|
|
||||||
Glyph,
|
|
||||||
Component,
|
|
||||||
styled,
|
|
||||||
} from 'flipper';
|
|
||||||
import {remote} from 'electron';
|
import {remote} from 'electron';
|
||||||
import isProduction from '../utils/isProduction.js';
|
import isProduction from '../utils/isProduction.js';
|
||||||
import config from '../fb-stubs/config.js';
|
import config from '../fb-stubs/config.js';
|
||||||
|
import React, {Component} from 'react';
|
||||||
|
|
||||||
const Container = styled(FlexRow)({
|
const Container = styled(FlexRow)({
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
@@ -36,7 +30,7 @@ type Props = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default class AutoUpdateVersion extends Component<Props, State> {
|
export default class AutoUpdateVersion extends Component<Props, State> {
|
||||||
state = {
|
state: State = {
|
||||||
updater: 'update-not-available',
|
updater: 'update-not-available',
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -54,7 +48,7 @@ export default class AutoUpdateVersion extends Component<Props, State> {
|
|||||||
remote.autoUpdater.on('update-downloaded', () => {
|
remote.autoUpdater.on('update-downloaded', () => {
|
||||||
this.setState({updater: 'update-downloaded'});
|
this.setState({updater: 'update-downloaded'});
|
||||||
|
|
||||||
const notification = new window.Notification('Update available', {
|
const notification = new Notification('Update available', {
|
||||||
body: 'Restart Flipper to update to the latest version.',
|
body: 'Restart Flipper to update to the latest version.',
|
||||||
requireInteraction: true,
|
requireInteraction: true,
|
||||||
});
|
});
|
||||||
@@ -28,7 +28,7 @@ import {
|
|||||||
import RatingButton from './RatingButton.js';
|
import RatingButton from './RatingButton.js';
|
||||||
import DevicesButton from './DevicesButton.js';
|
import DevicesButton from './DevicesButton.js';
|
||||||
import ScreenCaptureButtons from './ScreenCaptureButtons.js';
|
import ScreenCaptureButtons from './ScreenCaptureButtons.js';
|
||||||
import AutoUpdateVersion from './AutoUpdateVersion.js';
|
import AutoUpdateVersion from './AutoUpdateVersion';
|
||||||
import UpdateIndicator from './UpdateIndicator.js';
|
import UpdateIndicator from './UpdateIndicator.js';
|
||||||
import config from '../fb-stubs/config.js';
|
import config from '../fb-stubs/config.js';
|
||||||
import {isAutoUpdaterEnabled} from '../utils/argvUtils.js';
|
import {isAutoUpdaterEnabled} from '../utils/argvUtils.js';
|
||||||
|
|||||||
Reference in New Issue
Block a user