Compare commits

...

12 commits

Author SHA1 Message Date
isUnknown
9ee827c106 fix: vue de face de l'échantillon virtuel quand xMax est pair (#188)
All checks were successful
Deploy Production / Build and Deploy to Production (push) Successful in 31s
Deploy Preprod / Build and Deploy to Preprod (push) Successful in 37s
La division (xMax + 1) / 2 produisait un float (ex: 4.5) quand xMax
est pair, générant un nom de fichier introuvable et un undefined dans
le tableau images, ce qui plantait le rendu entier.

- Math.round() pour obtenir un index entier
- fallback sur le premier fichier si la vue de face est introuvable
- filter(Boolean) en défense sur le tableau images
- console.warn pour signaler les cas de nommage non conforme

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 18:27:01 +02:00
isUnknown
a4cc5c8efe fix redirection to old domain
All checks were successful
Deploy Production / Build and Deploy to Production (push) Successful in 30s
2026-03-20 11:49:34 +01:00
isUnknown
19752f516e fix: guard instanceof ProjectPage avant getNotificationsLight
All checks were successful
Deploy Production / Build and Deploy to Production (push) Successful in 28s
Les projets avec un template non-project déclenchaient le __call magique
de Kirby qui retournait un Field object au lieu de lancer une exception,
cassant l'affichage des notifications côté frontend.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-08 18:53:37 +01:00
isUnknown
1fb4e47d8d fix: CI deploy .user.ini + ACL mask, migration memory limit
All checks were successful
Deploy Production / Build and Deploy to Production (push) Successful in 31s
- Déploie .user.ini via rsync pour augmenter memory_limit à 512M
- Réapplique le mask ACL rwx après chaque deploy
- ini_set('memory_limit') dans la route de migration user-projects

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-08 18:31:57 +01:00
isUnknown
01b4a374cf merge preprod
All checks were successful
Deploy Production / Build and Deploy to Production (push) Successful in 28s
2026-03-08 17:51:45 +01:00
isUnknown
c9aefe7ecf #179 2025-10-15 16:17:30 +02:00
isUnknown
d590c9ac45 fix CI 2025-10-08 15:58:25 +02:00
isUnknown
186f7b80ba fix CI 2025-10-08 15:56:15 +02:00
isUnknown
1dad073ea1 #178 2025-10-08 15:54:17 +02:00
isUnknown
729d72e18a fix CI 2025-10-08 15:48:35 +02:00
isUnknown
95bdf4615d fix CI 2025-10-08 15:47:45 +02:00
isUnknown
5e78e67fc8 remove cache busting 2025-10-08 15:34:53 +02:00
9 changed files with 36 additions and 13 deletions

View file

@ -62,3 +62,12 @@ jobs:
sshpass -p "$PASSWORD" rsync -az --delete -O \
-e 'ssh -p 2244 -o StrictHostKeyChecking=no' \
assets/ $USERNAME@$HOST:$PREPROD_PATH/assets/
echo "Deploying .user.ini"
sshpass -p "$PASSWORD" rsync -az -O \
-e 'ssh -p 2244 -o StrictHostKeyChecking=no' \
.user.ini $USERNAME@$HOST:$PREPROD_PATH/.user.ini
echo "Fix ACL mask on writable directories"
sshpass -p "$PASSWORD" ssh -p 2244 -o StrictHostKeyChecking=no $USERNAME@$HOST \
"setfacl -m mask::rwx $PREPROD_PATH/site/accounts $PREPROD_PATH/site/cache $PREPROD_PATH/site/sessions $PREPROD_PATH/content $PREPROD_PATH/media"

View file

@ -62,3 +62,12 @@ jobs:
sshpass -p "$PASSWORD" rsync -az --delete -O \
-e 'ssh -p 2244 -o StrictHostKeyChecking=no' \
assets/ $USERNAME@$HOST:$PROD_PATH/assets/
echo "Deploying .user.ini"
sshpass -p "$PASSWORD" rsync -az -O \
-e 'ssh -p 2244 -o StrictHostKeyChecking=no' \
.user.ini $USERNAME@$HOST:$PROD_PATH/.user.ini
echo "Fix ACL mask on writable directories"
sshpass -p "$PASSWORD" ssh -p 2244 -o StrictHostKeyChecking=no $USERNAME@$HOST \
"setfacl -m mask::rwx $PROD_PATH/site/accounts $PROD_PATH/site/cache $PROD_PATH/site/sessions $PROD_PATH/content $PROD_PATH/media"

View file

@ -56,7 +56,7 @@ deploy_preprod:
build_prod:
stage: build
only:
- prod
- main
image: composer:2
script:
- apk add --no-cache nodejs npm

View file

@ -30,12 +30,12 @@ sections:
fr: Ouvrir la plateforme
en: Open platform
value: Design to Pack
link: https://designtopack.morphozbygroupepochet.com/
link: https://designtopack.groupe-pochet.fr/
icon: open
- label:
fr: Projet(s) en cours
en: Current project(s)
link: https://designtopack.morphozbygroupepochet.com/
link: https://designtopack.groupe-pochet.fr/
value: "{{ user.currentProjects.count }}"
icon: folder
content:

View file

@ -16,6 +16,7 @@ return [
'pattern' => 'migrate-user-projects.json',
'method' => 'POST',
'action' => function () {
ini_set('memory_limit', '512M');
$user = kirby()->user();
if (!$user || $user->role()->id() !== 'admin') {

View file

@ -34,7 +34,7 @@
<script>
if (location.href.includes('goguely')) {
location.href = 'https://designtopack.morphozbygroupepochet.com' + location.pathname
location.href = 'https://designtopack.groupe-pochet.fr' + location.pathname
}
</script>
</head>

View file

@ -11,11 +11,12 @@ function getProjectData($project, $user)
{
// Utiliser getNotificationsLight() avec cache pour optimiser les performances
$notifications = [];
try {
$notifications = $project->getNotificationsLight($user);
} catch (\Throwable $e) {
error_log("Error getting notifications for project {$project->uri()}: " . $e->getMessage());
$notifications = [];
if ($project instanceof ProjectPage) {
try {
$notifications = $project->getNotificationsLight($user);
} catch (\Throwable $e) {
error_log("Error getting notifications for project {$project->uri()}: " . $e->getMessage());
}
}
$data = [

View file

@ -25,7 +25,7 @@ const images = computed(() => {
},
];
}
return allVariations.value.map((variation) => getFrontView(variation)) ?? [];
return allVariations.value.map((variation) => getFrontView(variation)).filter(Boolean) ?? [];
});
const uri = addLocalePrefix(step.uri);
@ -35,10 +35,13 @@ function getFrontView(variation) {
const xMax = parseInt(
variation.files[variation.files.length - 1].name.split('_')[1].split('.')[0]
);
const xFrontView = (xMax + 1) / 2;
const xFrontView = Math.round((xMax + 1) / 2);
const extension = variation.files[0].name.split('.')[1];
const frontViewName = '0_' + xFrontView + '.' + extension;
const frontView = variation.files.find((file) => file.name === frontViewName);
return frontView;
if (!frontView) {
console.warn(`[VirtualSample] Front view "${frontViewName}" not found in variation "${variation.title}", falling back to first file.`);
}
return frontView ?? variation.files[0];
}
</script>

View file

@ -14,7 +14,7 @@ export default defineConfig(({ mode }) => {
},
},
sourcemap: mode === 'staging',
minify: mode === 'production' ? 'esbuild' : false,
minify: mode === 'production',
},
server: {
cors: true,