feat(rclone): mount başlatma durumu ve log sunumunu geliştir
Mount işlemi için "Başlatılıyor" ara durumu eklenerek kullanıcı geri bildirimi iyileştirildi. Sunucu tarafında log seviyeleri ayrıştırılarak gerçek hatalar bilgi mesajlarından ayırt edildi ve arayüze yansıtıldı.
This commit is contained in:
@@ -198,7 +198,24 @@
|
||||
if (!resp.ok || !data?.ok) {
|
||||
throw new Error(data?.error || `HTTP ${resp.status}`);
|
||||
}
|
||||
success = "Rclone mount başlatıldı.";
|
||||
|
||||
// Mount başlatıldı, birkaç saniye bekleyip tekrar kontrol et
|
||||
success = "Rclone mount başlatılıyor...";
|
||||
|
||||
// 2 saniye sonra status güncelle
|
||||
setTimeout(async () => {
|
||||
await loadRcloneStatus();
|
||||
// Status yüklendikten sonra mesajı güncelle
|
||||
if (rcloneStatus?.mounted) {
|
||||
success = "Rclone mount başarıyla başlatıldı.";
|
||||
} else if (rcloneStatus?.running) {
|
||||
success = "Rclone mount başlatıldı, mount tamamlanıyor...";
|
||||
} else {
|
||||
error = "Rclone mount başlatılamadı.";
|
||||
}
|
||||
}, 2000);
|
||||
|
||||
// İlk status güncellemesi
|
||||
await loadRcloneStatus();
|
||||
} catch (err) {
|
||||
error = err?.message || "Rclone mount başlatılamadı.";
|
||||
@@ -468,7 +485,17 @@
|
||||
<div class="card muted" style="margin-top:10px;">
|
||||
<div><strong>Durum:</strong></div>
|
||||
<div>Enabled: {rcloneStatus.enabled ? "Evet" : "Hayır"}</div>
|
||||
<div>Mounted: {rcloneStatus.mounted ? "Evet" : "Hayır"}</div>
|
||||
<div>
|
||||
Mounted:
|
||||
{#if rcloneStatus.mountStatus === "starting"}
|
||||
<span style="color: #f57c00;">Başlatılıyor...</span>
|
||||
{:else if rcloneStatus.mounted}
|
||||
<span style="color: #388e3c;">Evet</span>
|
||||
{:else}
|
||||
Hayır
|
||||
{/if}
|
||||
</div>
|
||||
<div>Running: {rcloneStatus.running ? "Evet" : "Hayır"}</div>
|
||||
<div>Remote: {rcloneStatus.remoteConfigured ? "Hazır" : "Eksik"}</div>
|
||||
{#if rcloneStatus.vfsCacheMode}
|
||||
<div>VFS Cache Mode: <code>{rcloneStatus.vfsCacheMode}</code></div>
|
||||
@@ -489,7 +516,14 @@
|
||||
</div>
|
||||
{/if}
|
||||
{#if rcloneStatus.lastError}
|
||||
<div style="margin-top: 8px; color: #d32f2f;">Son hata: {rcloneStatus.lastError}</div>
|
||||
<div style="margin-top: 8px; color: #d32f2f;">
|
||||
<i class="fa-solid fa-circle-exclamation"></i> Son hata: {rcloneStatus.lastError}
|
||||
</div>
|
||||
{/if}
|
||||
{#if rcloneStatus.lastLog && !rcloneStatus.lastError}
|
||||
<div style="margin-top: 8px; font-size: 11px; color: #666;">
|
||||
<i class="fa-solid fa-circle-info"></i> Son log: {rcloneStatus.lastLog}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user