Split form.css into form-base.css and form-admin.css, drop dead upload-progress code

Also introduces $extraCssAdmin support in head.php for admin-only
stylesheets (form-admin.css, filepond CSS, system.css). Admin pages
now use $extraCssAdmin for admin-only assets and $extraCss for
shared stylesheets like form-base.css.
This commit is contained in:
Pontoporeia
2026-06-11 11:04:01 +02:00
parent 99125cc8e3
commit cbd369bc72
15 changed files with 250 additions and 682 deletions

View File

@@ -163,7 +163,7 @@ class ThesisEditController
* the transaction is still open, but this method rolls
* back internally before re-throwing).
*/
public function save(int $thesisId, array $post, array $files, ?string $progressToken = null): void
public function save(int $thesisId, array $post, array $files): void
{
if ($thesisId <= 0) {
throw new InvalidArgumentException('ID de TFE invalide.');

View File

@@ -455,30 +455,4 @@ class PeerTubeService
throw new \RuntimeException('Erreur réseau PeerTube : ' . $e->getMessage(), 0, $e);
}
}
// -------------------------------------------------------------------------
// Progress reporting (for upload-progress.js polling)
// -------------------------------------------------------------------------
/**
* Write upload progress to a temp file polled by the progress endpoint.
*/
public static function writeProgress(string $token, string $stage, int $pct, string $file = ''): void
{
$progressFile = sys_get_temp_dir() . '/xamxam_upload_' . $token . '.json';
file_put_contents($progressFile, json_encode([
'stage' => $stage,
'pct' => $pct,
'file' => $file,
]), LOCK_EX);
}
/**
* Remove the progress file for a given token.
*/
public static function clearProgress(string $token): void
{
$progressFile = sys_get_temp_dir() . '/xamxam_upload_' . $token . '.json';
@unlink($progressFile);
}
}