{% extends "base.html" %}
{% block content %}
<div class="card">
  <div class="card-header"><div class="card-title"><i class="fas fa-sliders"></i> Platform Settings</div></div>
  <div style="max-width:460px; display:flex; flex-direction:column; gap:14px;">
    <div class="form-group"><label class="form-label">MAIN SERVER IP</label><input class="form-input" value="{{ main_server }}" readonly></div>
    <div class="form-group"><label class="form-label">PLATFORM DOMAIN</label><input class="form-input" value="{{ platform_domain }}" readonly></div>
    <div class="form-group"><label class="form-label">SSL</label><input class="form-input" value="{{ 'Configured' if platform_ssl else 'Not configured' }}" readonly></div>
    <div class="form-group"><label class="form-label">PLATFORM URL</label>
      <div style="display:flex;gap:8px;align-items:center;">
        <input class="form-input" value="{{ platform_url }}" readonly style="flex:1;">
        <a class="btn btn-primary btn-sm" href="{{ platform_url }}" target="_blank" rel="noopener"><i class="fas fa-arrow-up-right-from-square"></i></a>
      </div>
    </div>
    <div class="form-group"><label class="form-label">PLATFORM HOST</label><input class="form-input" value="{{ 'Main Server' if running_on_main else 'VM (backup mode)' }}" readonly></div>
    <div class="form-group"><label class="form-label">VM BACKUP PATH</label><input class="form-input" value="/backups/main-server/" readonly></div>
    <div class="form-group"><label class="form-label">MAIN SERVER UPTIME</label><input class="form-input" id="settings-uptime" value="{{ system.uptime }}" readonly></div>
    <div class="form-group"><label class="form-label">DOCKER VERSION</label><input class="form-input" value="{{ system.docker_v }}" readonly></div>
    <button class="btn btn-ghost" onclick="refreshAll()"><i class="fas fa-sync-alt"></i> Refresh</button>
  </div>
</div>
{% endblock %}
