💾 Add server save functionality and display server storage status in Gamemaster Manager view

This commit is contained in:
2026-01-28 18:59:05 +00:00
parent 21d7d0c9be
commit e4ca6b392b

View File

@@ -66,9 +66,28 @@
</div> </div>
</div> </div>
<!-- Save to Server Section -->
<div v-if="processedData" class="section">
<h2>3. Save to Server</h2>
<p class="description">
Store processed data on server for other apps to access via API
</p>
<button
@click="saveToServer"
:disabled="saving"
class="btn btn-primary"
>
{{ saving ? 'Saving...' : '💾 Save All Files to Server' }}
</button>
<div v-if="saveSuccess" class="success">
Files saved to server successfully! Other apps can now access
the data via the Gamemaster API.
</div>
</div>
<!-- Download Section --> <!-- Download Section -->
<div v-if="processedData" class="section"> <div v-if="processedData" class="section">
<h2>3. Download Files</h2> <h2>4. Download Files</h2>
<div class="button-group"> <div class="button-group">
<button @click="downloadPokemon" class="btn btn-success"> <button @click="downloadPokemon" class="btn btn-success">
📥 Download pokemon.json 📥 Download pokemon.json
@@ -85,6 +104,24 @@
</div> </div>
</div> </div>
<!-- Server Status Section -->
<div v-if="serverStatus" class="section">
<h2>5. Server Storage Status</h2>
<div class="status-card">
<p>
<strong>Last Update:</strong>
{{ formatDate(serverStatus.lastUpdate) }}
</p>
<p><strong>Files Available:</strong> {{ serverStatus.totalFiles }}</p>
<div class="file-list">
<div v-for="file in serverStatus.available" :key="file.filename" class="file-item">
<span class="file-name">{{ file.filename }}</span>
<span class="file-size">{{ file.sizeKb }} KB</span>
</div>
</div>
</div>
</div>
<!-- Info Section --> <!-- Info Section -->
<div class="section info-section"> <div class="section info-section">
<h2>About This Tool</h2> <h2>About This Tool</h2>