renommer le bouton automatiquement
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
<header>
|
<header>
|
||||||
<div style="display: flex; gap: 10px; align-items: center;">
|
<div style="display: flex; gap: 10px; align-items: center;">
|
||||||
<button class="stop-all" onclick="stopAll()">🛑 STOP ALL</button>
|
<button class="stop-all" onclick="stopAll()">🛑 STOP ALL</button>
|
||||||
<span id="app-version" style="color: #555; font-size: 0.8rem; margin-left: 10px;">v1.207</span>
|
<span id="app-version" style="color: #555; font-size: 0.8rem; margin-left: 10px;">v1.208</span>
|
||||||
|
|
||||||
<button id="installBtn" style="display:none; ...">📥 INSTALLER</button>
|
<button id="installBtn" style="display:none; ...">📥 INSTALLER</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -207,6 +207,13 @@
|
|||||||
document.getElementById('fileInput').onchange = (e) => {
|
document.getElementById('fileInput').onchange = (e) => {
|
||||||
const file = e.target.files[0];
|
const file = e.target.files[0];
|
||||||
if (file) {
|
if (file) {
|
||||||
|
// Extraction du nom sans l'extension
|
||||||
|
// .replace(/\.[^/.]+$/, "") retire tout ce qui suit le dernier point
|
||||||
|
const fileNameWithoutExtension = file.name.replace(/\.[^/.]+$/, "");
|
||||||
|
|
||||||
|
// On met à jour le champ texte du nom dans la modale
|
||||||
|
document.getElementById('inputName').value = fileNameWithoutExtension;
|
||||||
|
|
||||||
const reader = new FileReader();
|
const reader = new FileReader();
|
||||||
reader.onload = (ev) => {
|
reader.onload = (ev) => {
|
||||||
tempFileData = ev.target.result;
|
tempFileData = ev.target.result;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
const CACHE_NAME = 'sb-v1.207'; // Change ce numéro pour forcer une mise à jour globale
|
const CACHE_NAME = 'sb-v1.208'; // Change ce numéro pour forcer une mise à jour globale
|
||||||
const ASSETS = [
|
const ASSETS = [
|
||||||
'./', // Racine
|
'./', // Racine
|
||||||
'./index.html',
|
'./index.html',
|
||||||
|
|||||||
Reference in New Issue
Block a user