|
936 | 936 | </div> |
937 | 937 |
|
938 | 938 | <!-- ═══ SITE DETAIL DRAWER ═══ --> |
939 | | - <div x-show="drawer.show" @click.self="drawer.show=false" |
940 | | - style="position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:100;display:flex;align-items:stretch;justify-content:flex-end"> |
| 939 | + <div x-show="drawer.show" @click.self="drawer.show=false" class="modal-overlay" |
| 940 | + style="z-index:100;align-items:stretch;justify-content:flex-end"> |
941 | 941 | <div style="width:700px;background:var(--bg-card);height:100%;display:flex;flex-direction:column;overflow:hidden;box-shadow:-4px 0 24px rgba(0,0,0,.2)"> |
942 | 942 |
|
943 | 943 | <!-- Drawer header --> |
|
1288 | 1288 | </div> |
1289 | 1289 |
|
1290 | 1290 | <!-- ═══ INSTALL MODAL ═══ --> |
1291 | | - <div x-show="showInstall" @click.self="showInstall=false" |
1292 | | - style="position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:200;display:flex;align-items:center;justify-content:center"> |
| 1291 | + <div x-show="showInstall" @click.self="showInstall=false" class="modal-overlay" style="z-index:200"> |
1293 | 1292 | <div style="background:var(--bg-card);border-radius:12px;width:580px;max-height:88vh;overflow-y:auto;border:1px solid var(--border);box-shadow:var(--shadow-lg)"> |
1294 | 1293 | <!-- Modal header --> |
1295 | 1294 | <div style="padding:16px 20px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;background:var(--bg-card);z-index:1"> |
|
1357 | 1356 | <div class="form-group"> |
1358 | 1357 | <label class="form-label">Web server</label> |
1359 | 1358 | <select class="form-input" x-model="installForm.webserver"> |
1360 | | - <option value="nginx">Nginx</option> |
1361 | | - <option value="apache">Apache</option> |
1362 | | - <option value="openlitespeed">OpenLiteSpeed</option> |
1363 | | - <option value="caddy">Caddy</option> |
| 1359 | + <option value="nginx" x-text="installedWebservers.includes('nginx')?'Nginx ✓ installed':'Nginx (not installed)'"></option> |
| 1360 | + <option value="apache" x-text="installedWebservers.includes('apache')?'Apache ✓ installed':'Apache (not installed)'"></option> |
| 1361 | + <option value="openlitespeed" x-text="installedWebservers.includes('openlitespeed')?'OpenLiteSpeed ✓ installed':'OpenLiteSpeed (not installed)'"></option> |
| 1362 | + <option value="caddy" x-text="installedWebservers.includes('caddy')?'Caddy ✓ installed':'Caddy (not installed)'"></option> |
1364 | 1363 | </select> |
| 1364 | + <div x-show="!installedWebservers.includes(installForm.webserver)" |
| 1365 | + style="margin-top:5px;padding:7px 10px;background:rgba(245,158,11,.1);border:1px solid rgba(245,158,11,.25);border-radius:var(--radius);font-size:11px;color:#92400e"> |
| 1366 | + ⚠ <strong x-text="installForm.webserver"></strong> is not installed on this server. |
| 1367 | + Install it first from the <strong>App Store</strong>, then return here to install WordPress. |
| 1368 | + </div> |
1365 | 1369 | </div> |
1366 | 1370 | <div class="form-group"> |
1367 | 1371 | <label class="form-label">Site title</label> |
|
1434 | 1438 | </div> |
1435 | 1439 | <div style="display:flex;gap:8px"> |
1436 | 1440 | <button class="btn btn-ghost" @click="showInstall=false">Cancel</button> |
1437 | | - <button class="btn btn-primary" :disabled="installing" @click="runInstall()"> |
| 1441 | + <button class="btn btn-primary" :disabled="installing || !installedWebservers.includes(installForm.webserver)" @click="runInstall()"> |
1438 | 1442 | <span x-show="installing">Installing…</span> |
1439 | | - <span x-show="!installing">Install WordPress</span> |
| 1443 | + <span x-show="!installing && !installedWebservers.includes(installForm.webserver)">Install webserver first</span> |
| 1444 | + <span x-show="!installing && installedWebservers.includes(installForm.webserver)">Install WordPress</span> |
1440 | 1445 | </button> |
1441 | 1446 | </div> |
1442 | 1447 | </div> |
|
0 commit comments