소스 검색

mol-plugin-ui: left panel tweak

David Sehnal 5 년 전
부모
커밋
b1d8c5f6ea
2개의 변경된 파일7개의 추가작업 그리고 7개의 파일을 삭제
  1. 1 1
      src/mol-plugin-ui/left-panel.tsx
  2. 6 6
      src/mol-plugin-ui/state/snapshots.tsx

+ 1 - 1
src/mol-plugin-ui/left-panel.tsx

@@ -85,7 +85,7 @@ export class LeftPanelControls extends PluginUIComponent<{}, { tab: LeftPanelTab
                 <IconButton icon='home' toggleState={tab === 'root'} onClick={() => this.set('root')} title='Home' />
                 {/* <IconButton icon='flow-tree' toggleState={tab === 'data'} onClick={() => this.set('data')} title='State Tree' /> */}
                 <DataIcon set={this.set} />
-                {this.plugin.spec.components?.remoteState !== 'none' && <IconButton icon='floppy' toggleState={tab === 'states'} onClick={() => this.set('states')} title='Plugin State' />}
+                <IconButton icon='floppy' toggleState={tab === 'states'} onClick={() => this.set('states')} title='Plugin State' />
                 <IconButton icon='help-circle' toggleState={tab === 'help'} onClick={() => this.set('help')} title='Help' />
                 <div className='msp-left-panel-controls-buttons-bottom'>
                     <IconButton icon='settings' toggleState={tab === 'settings'} onClick={() => this.set('settings')} title='Settings' />

+ 6 - 6
src/mol-plugin-ui/state/snapshots.tsx

@@ -47,8 +47,8 @@ export class StateSnapshots extends PluginUIComponent<{ }> {
 }
 
 class LocalStateSnapshots extends PluginUIComponent<
-    { },
-    { params: PD.Values<typeof LocalStateSnapshots.Params> }> {
+{ },
+{ params: PD.Values<typeof LocalStateSnapshots.Params> }> {
 
     state = { params: PD.getDefaultValues(LocalStateSnapshots.Params) };
 
@@ -162,8 +162,8 @@ class LocalStateSnapshotList extends PluginUIComponent<{ }, { }> {
 
 export type RemoteEntry = { url: string, removeUrl: string, timestamp: number, id: string, name: string, description: string, isSticky?: boolean }
 export class RemoteStateSnapshots extends PluginUIComponent<
-    { listOnly?: boolean },
-    { params: PD.Values<RemoteStateSnapshots['Params']>, entries: OrderedMap<string, RemoteEntry>, isBusy: boolean }> {
+{ listOnly?: boolean },
+{ params: PD.Values<RemoteStateSnapshots['Params']>, entries: OrderedMap<string, RemoteEntry>, isBusy: boolean }> {
 
     Params = {
         name: PD.Text(),
@@ -299,8 +299,8 @@ export class RemoteStateSnapshots extends PluginUIComponent<
 }
 
 class RemoteStateSnapshotList extends PurePluginUIComponent<
-    { entries: OrderedMap<string, RemoteEntry>, serverUrl: string, isBusy: boolean, fetch: (e: React.MouseEvent<HTMLElement>) => void, remove?: (e: React.MouseEvent<HTMLElement>) => void },
-    { }> {
+{ entries: OrderedMap<string, RemoteEntry>, serverUrl: string, isBusy: boolean, fetch: (e: React.MouseEvent<HTMLElement>) => void, remove?: (e: React.MouseEvent<HTMLElement>) => void },
+{ }> {
 
     open = async (e: React.MouseEvent<HTMLElement>) => {
         const id = e.currentTarget.getAttribute('data-id');