Add sync beta button in sync menu

This commit is contained in:
Gregory Schier 2019-05-29 16:53:55 -04:00
parent a70eb2bee4
commit 4fdb99a5ef
2 changed files with 16 additions and 1 deletions

View File

@ -9,6 +9,7 @@ import WorkspaceShareSettingsModal from '../modals/workspace-share-settings-moda
import SetupSyncModal from '../modals/setup-sync-modal';
import type { Workspace } from '../../../models/workspace';
import * as session from '../../../account/session';
import { clickLink } from '../../../common/misc';
type Props = {
workspace: Workspace,
@ -99,6 +100,10 @@ class SyncLegacyDropdown extends React.PureComponent<Props, State> {
}
}
static _handleShowSyncBetaPrompt() {
clickLink('https://support.insomnia.rest/article/67-version-control');
}
async _handleShowSyncModePrompt() {
showModal(SetupSyncModal, {
onSelectSyncMode: async syncMode => {
@ -209,6 +214,16 @@ class SyncLegacyDropdown extends React.PureComponent<Props, State> {
Share Settings
</DropdownItem>
) : null}
{syncMode === syncStorage.SYNC_MODE_OFF && [
// NOTE: We can't use <React.Fragment> here because the nesting breaks
// the <Dropdown> component's child detection
<DropdownDivider key="divider" />,
<DropdownItem key="beta" onClick={SyncLegacyDropdown._handleShowSyncBetaPrompt}>
<i className="fa fa-star" />
Try New Sync Beta
</DropdownItem>,
]}
</Dropdown>
</div>
);

View File

@ -6,7 +6,7 @@
"name": "insomnia",
"productName": "Insomnia",
"longName": "Insomnia REST Client",
"version": "6.5.3",
"version": "6.5.4",
"main": "main.min.js"
},
"licence": "MIT",