Browse Source

move state/session io warning to snapshot ui

Alexander Rose 5 years ago
parent
commit
8f52ffe061
2 changed files with 16 additions and 15 deletions
  1. 16 10
      src/mol-plugin-ui/state/snapshots.tsx
  2. 0 5
      src/mol-plugin-ui/viewport/screenshot.tsx

+ 16 - 10
src/mol-plugin-ui/state/snapshots.tsx

@@ -14,6 +14,7 @@ import OpenInBrowser from '@material-ui/icons/OpenInBrowser';
 import SaveOutlined from '@material-ui/icons/SaveOutlined';
 import SwapHoriz from '@material-ui/icons/SwapHoriz';
 import Refresh from '@material-ui/icons/Refresh';
+import Warning from '@material-ui/icons/Warning';
 import { OrderedMap } from 'immutable';
 import * as React from 'react';
 import { PluginCommands } from '../../mol-plugin/commands';
@@ -73,17 +74,22 @@ export class StateExportImportControls extends PluginUIComponent<{ onAction?: ()
     }
 
     render() {
-        return <div className='msp-flex-row'>
-            <Button icon={GetApp} onClick={this.downloadToFileJson} title='Save the state description. Input data are loaded using the provided sources. Does not work if local files are used as input.'>
-                State
-            </Button>
-            <Button icon={GetApp} onClick={this.downloadToFileZip} title='Save the state including the input data.'>
-                Session
-            </Button>
-            <div className='msp-btn msp-btn-block msp-btn-action msp-loader-msp-btn-file'>
-                <Icon svg={OpenInBrowser} inline /> Open <input onChange={this.open} type='file' multiple={false} accept='.molx,.molj' />
+        return <>
+            <div className='msp-flex-row'>
+                <Button icon={GetApp} onClick={this.downloadToFileJson} title='Save the state description. Input data are loaded using the provided sources. Does not work if local files are used as input.'>
+                    State
+                </Button>
+                <Button icon={GetApp} onClick={this.downloadToFileZip} title='Save the state including the input data.'>
+                    Session
+                </Button>
+                <div className='msp-btn msp-btn-block msp-btn-action msp-loader-msp-btn-file'>
+                    <Icon svg={OpenInBrowser} inline /> Open <input onChange={this.open} type='file' multiple={false} accept='.molx,.molj' />
+                </div>
             </div>
-        </div>;
+            <div className='msp-help-text' style={{ padding: '10px'}}>
+                <Icon svg={Warning} /> This is an experimental feature and stored states/sessions might not be openable in a future version.
+            </div>
+        </>;
     }
 }
 

+ 0 - 5
src/mol-plugin-ui/viewport/screenshot.tsx

@@ -16,9 +16,7 @@ import { Button, ExpandGroup } from '../controls/common';
 import { CameraHelperProps } from '../../mol-canvas3d/helper/camera-helper';
 import GetApp from '@material-ui/icons/GetApp';
 import Launch from '@material-ui/icons/Launch';
-import Warning from '@material-ui/icons/Warning';
 import { PluginCommands } from '../../mol-plugin/commands';
-import { Icon } from '../controls/icons';
 import { StateExportImportControls, LocalStateSnapshotParams } from '../state/snapshots';
 
 interface ImageControlsState {
@@ -152,9 +150,6 @@ export class DownloadScreenshotControls extends PluginUIComponent<{ close: () =>
                 <ExpandGroup header='Save Options' initiallyExpanded={false} noOffset>
                     <LocalStateSnapshotParams />
                 </ExpandGroup>
-                <div className='msp-help-text' style={{ padding: '10px'}}>
-                    <Icon svg={Warning} /> This is an experimental feature and stored states might not be openable in a future version.
-                </div>
             </ExpandGroup>
         </div>;
     }