瀏覽代碼

Alias creation fix

Andrea Pollastri 5 年之前
父節點
當前提交
9dfcebb835

+ 3 - 0
app/Http/Controllers/ShellController.php

@@ -93,6 +93,9 @@ class ShellController extends Controller
             return abort(403);
         }
         $script = Storage::get('scripts/aliasadd.sh');
+        $script = Str::replaceArray('???', [
+            $this->url->to('/')
+        ], $script);
         return response($script)->withHeaders(['Content-Type' =>'application/x-sh']);
     }
 

+ 1 - 1
resources/views/applications.blade.php

@@ -12,7 +12,7 @@ Applications
 <div class="row">
     <div class="col">
         <a href="#" class="btn btn-sm btn-primary shadow-sm float-right" data-toggle="modal" data-target="#createModal">
-            <i class="fas fa-plus fa-sm text-white-50"></i> CREATE APP
+            <i class="fas fa-plus fa-sm text-white-50"></i> NEW APPLICATION
         </a>
     </div>
 </div>

+ 5 - 5
resources/views/servers.blade.php

@@ -12,7 +12,7 @@ Servers
 <div class="row">
     <div class="col">
         <a href="#" class="btn btn-sm btn-primary shadow-sm float-right" data-toggle="modal" data-target="#createModal">
-            <i class="fas fa-plus fa-sm text-white-50"></i> ADD SERVER
+            <i class="fas fa-plus fa-sm text-white-50"></i> NEW SERVER
         </a>
     </div>
 </div>
@@ -317,16 +317,16 @@ Servers
                     <div class=" row">
                         <div class="col-sm-12">
                             <h4>Are you sure to delete server <b><span id="server-name"></span></b>?</h4>
-                            <div style="min-height: 20px;"></div>
+                            <div class="space"></div>
                             <div class="form-group">
                                 <select class="form-control" name="server_id" required id="server-list">
                                     <option value="">Select...</option>
                                     <option value="">YES! I'm sure!!!</option>
                                 </select>
                             </div>
-                            <div style="min-height: 20px;"></div>
-                            <h6 class="text-danger">You can not reverse this action.</h6>
-                            <h6 class="text-danger">You will lose control on this server</h6>
+                            <div class="space"></div>
+                            <h6 class="text-danger">This action is irreversible.</h6>
+                            <h6 class="text-danger">You will lose control on this server.</h6>
                         </div>
                     </div>
                 </div>

+ 2 - 0
storage/app/scripts/aliasadd.sh

@@ -1,5 +1,7 @@
 #!/usr/bin/env bash
 
+REMOTE=???
+
 while [ -n "$1" ] ; do
     case $1 in
     -d | --domain )