feat(planning): grille hebdomadaire complète avec API et filtres
- Connexion API via proxy Angular (résolution CORS, base path /api) - Import CSS ng-zorro global pour les modales et composants - Filtres Camion/Show câblés sur l'affichage de la grille - Camions affichés via TrucksService (linkés au show du même créneau) - Panneau de détails : spectacles + camions du jour sélectionné - Modale de création de spectacle stylisée avec fond et centrage - Positionnement précis des events à la minute dans leur créneau - Auto-scroll vers l'heure courante au chargement - Ligne "maintenant" sur la colonne du jour actuel - Régénération des services OpenAPI (nouveaux noms de types) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+5
-8
@@ -14,15 +14,12 @@ async function getRandomValues(size) {
|
||||
*/
|
||||
async function random(size) {
|
||||
const mask = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~";
|
||||
const evenDistCutoff = Math.pow(2, 8) - Math.pow(2, 8) % mask.length;
|
||||
let result = "";
|
||||
while (result.length < size) {
|
||||
const randomBytes = await getRandomValues(size - result.length);
|
||||
for (const randomByte of randomBytes) {
|
||||
if (randomByte < evenDistCutoff) {
|
||||
result += mask[randomByte % mask.length];
|
||||
}
|
||||
}
|
||||
const randomUints = await getRandomValues(size);
|
||||
for (let i = 0; i < size; i++) {
|
||||
// cap the value of the randomIndex to mask.length - 1
|
||||
const randomIndex = randomUints[i] % mask.length;
|
||||
result += mask[randomIndex];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
+5
-8
@@ -22,15 +22,12 @@ async function getRandomValues(size) {
|
||||
*/
|
||||
async function random(size) {
|
||||
const mask = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~";
|
||||
const evenDistCutoff = Math.pow(2, 8) - Math.pow(2, 8) % mask.length;
|
||||
let result = "";
|
||||
while (result.length < size) {
|
||||
const randomBytes = await getRandomValues(size - result.length);
|
||||
for (const randomByte of randomBytes) {
|
||||
if (randomByte < evenDistCutoff) {
|
||||
result += mask[randomByte % mask.length];
|
||||
}
|
||||
}
|
||||
const randomUints = await getRandomValues(size);
|
||||
for (let i = 0; i < size; i++) {
|
||||
// cap the value of the randomIndex to mask.length - 1
|
||||
const randomIndex = randomUints[i] % mask.length;
|
||||
result += mask[randomIndex];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
+5
-8
@@ -17,15 +17,12 @@ async function getRandomValues(size) {
|
||||
*/
|
||||
async function random(size) {
|
||||
const mask = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~";
|
||||
const evenDistCutoff = Math.pow(2, 8) - Math.pow(2, 8) % mask.length;
|
||||
let result = "";
|
||||
while (result.length < size) {
|
||||
const randomBytes = await getRandomValues(size - result.length);
|
||||
for (const randomByte of randomBytes) {
|
||||
if (randomByte < evenDistCutoff) {
|
||||
result += mask[randomByte % mask.length];
|
||||
}
|
||||
}
|
||||
const randomUints = await getRandomValues(size);
|
||||
for (let i = 0; i < size; i++) {
|
||||
// cap the value of the randomIndex to mask.length - 1
|
||||
const randomIndex = randomUints[i] % mask.length;
|
||||
result += mask[randomIndex];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user