[FEAT] Admin / ajout d'une partition doit pouvoir ajouter le numero dans
le PDF. #1
This commit is contained in:
@@ -58,6 +58,8 @@
|
||||
let uploadClef = $state('');
|
||||
let uploadVariant = $state('');
|
||||
let uploadPart = $state('1');
|
||||
let uploadWatermark = $state(false);
|
||||
let uploadWatermarkPosition = $state<'left' | 'right'>('left');
|
||||
|
||||
// Auto-set default key when instrument changes
|
||||
$effect(() => {
|
||||
@@ -193,7 +195,9 @@
|
||||
uploadKey,
|
||||
uploadClef,
|
||||
uploadVariant,
|
||||
uploadPart
|
||||
uploadPart,
|
||||
uploadWatermark,
|
||||
uploadWatermarkPosition
|
||||
);
|
||||
if (result.success) {
|
||||
uploadSuccess = 'Fichier uploadé avec succès';
|
||||
@@ -495,6 +499,22 @@
|
||||
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-700">Fichier PDF</label>
|
||||
<div class="flex items-center gap-3 mt-1">
|
||||
<label class="relative inline-flex items-center cursor-pointer whitespace-nowrap">
|
||||
<input type="checkbox" bind:checked={uploadWatermark} class="sr-only peer" />
|
||||
<div class="w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-ohmj-primary rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-ohmj-primary"></div>
|
||||
<span class="ml-2 text-sm text-gray-700">Ajouter le numéro</span>
|
||||
</label>
|
||||
{#if uploadWatermark}
|
||||
<select
|
||||
bind:value={uploadWatermarkPosition}
|
||||
class="text-sm border border-gray-300 rounded px-2 py-1"
|
||||
>
|
||||
<option value="left">Gauche</option>
|
||||
<option value="right">Droite</option>
|
||||
</select>
|
||||
{/if}
|
||||
</div>
|
||||
<input
|
||||
id="file-input"
|
||||
type="file"
|
||||
|
||||
Reference in New Issue
Block a user