Finished theming
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<div class="max-w-4xl mx-auto">
|
||||
<div class="mb-6">
|
||||
<nav class="text-sm text-gray-400 mb-4">
|
||||
<a href="/" class="hover:text-white">Browse ROMs</a>
|
||||
<a href="/" class="hover:text-white">Browse Games</a>
|
||||
<span class="mx-2">/</span>
|
||||
<span class="text-white">{{ game.metadata_obj.title or game.title }}</span>
|
||||
</nav>
|
||||
@@ -36,7 +36,7 @@
|
||||
{% if can_download %}
|
||||
<button onclick="downloadGame({{ game.id }})"
|
||||
class="bg-green-600 hover:bg-green-700 px-4 py-2 rounded">
|
||||
Download ROM
|
||||
Download Game
|
||||
</button>
|
||||
{% else %}
|
||||
<span class="bg-gray-600 px-4 py-2 rounded cursor-not-allowed">
|
||||
@@ -268,7 +268,10 @@
|
||||
const a = document.createElement('a');
|
||||
a.style.display = 'none';
|
||||
a.href = url;
|
||||
a.download = response.headers.get('Content-Disposition')?.split('filename=')[1] || 'game.zip';
|
||||
// Get filename from Content-Disposition header, removing quotes and underscores
|
||||
let filename = response.headers.get('Content-Disposition')?.split('filename=')[1] || 'game.zip';
|
||||
filename = filename.replace(/^["_]+|["_]+$/g, ''); // Remove quotes and underscores from start and end
|
||||
a.download = filename;
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
window.URL.revokeObjectURL(url);
|
||||
|
||||
Reference in New Issue
Block a user