Browse Source

修复垂直居中的问题。

oldj 8 years ago
parent
commit
a57ddf4b37
3 changed files with 19 additions and 22 deletions
  1. 0 0
      app/ui/bundle.js
  2. 9 11
      ui/App.jsx
  3. 10 11
      ui/frame/frame.less

File diff suppressed because it is too large
+ 0 - 0
app/ui/bundle.js


+ 9 - 11
ui/App.jsx

@@ -172,6 +172,15 @@ export default class App extends React.Component {
     return (
       <div id="app" className={'platform-' + Agent.platform}>
         <NotificationSystem ref="notificationSystem" style={notificationStyle}/>
+        <SudoPrompt lang={this.state.lang}/>
+        <EditPrompt
+          lang={this.state.lang}
+          list={this.state.list}
+          justAdd={this.justAdd.bind(this)}
+        />
+        <PreferencesPrompt
+          lang={this.state.lang}
+        />
         <Panel
           list={this.state.list}
           sys_hosts={this.state.sys_hosts}
@@ -187,17 +196,6 @@ export default class App extends React.Component {
           setHostsContent={this.setHostsContent.bind(this)}
           lang={this.state.lang}
         />
-        <div className="frames">
-          <SudoPrompt lang={this.state.lang}/>
-          <EditPrompt
-            lang={this.state.lang}
-            list={this.state.list}
-            justAdd={this.justAdd.bind(this)}
-          />
-          <PreferencesPrompt
-            lang={this.state.lang}
-          />
-        </div>
       </div>
     )
   }

+ 10 - 11
ui/frame/frame.less

@@ -2,6 +2,8 @@
   @bg: #f5f5f5;
   @btn_default: #05a;
   @lh: 28px;
+  text-align: center;
+  white-space: nowrap;
 
   &:before {
     content: '';
@@ -18,17 +20,14 @@
   }
 
   .ant-modal {
-    //display: inline-block;
-    //vertical-align: middle;
-    position: fixed;
-    top: 50%;
-    left: 50%;
-    transform: translate(-50%, -50%);
-    //min-width: 520px;
-    //max-width: 600px;
-    //background: #fff;
-    //box-shadow: 0 0 4px 4px rgba(0, 0, 0, 0.1);
-    line-height: @lh;
+    display: inline-block;
+    vertical-align: middle;
+    top: 0;
+    //top: 50%;
+    //left: 50%;
+    //transform: translate(-50%, -50%);
+    padding-bottom: 0;
+    text-align: left;
 
     .prompt-body {
       //padding: 20px 20px;

Some files were not shown because too many files changed in this diff