Disabling buttons

This commit is contained in:
hbrain 2026-06-28 14:39:27 +02:00
parent 04c9574a56
commit 5df4ac4c7f
2 changed files with 23 additions and 14 deletions

View file

@ -75,6 +75,7 @@ function mvlog_input_dir_switch_payload(string $dir, array $config, string $arti
$canShow = mvlog_input_dir_can_show($dir, $config);
$visible = $canShow && mvlog_input_dir_visible_marker($dir);
$permalink = mvlog_input_dir_permalink($dir);
$running = is_dir($dir . '/.movmaker-lock');
return [
'dir' => basename($dir),
'id' => $articleId,
@ -86,6 +87,7 @@ function mvlog_input_dir_switch_payload(string $dir, array $config, string $arti
'can_permalink' => $canShow,
'public_locked' => $visible || $permalink,
'map_hidden' => is_file($dir . '/.mvlog-hide-map'),
'running' => $running,
];
}
@ -142,7 +144,7 @@ foreach ($dirs as $dir) {
$switches[] = mvlog_input_dir_switch_payload($dir, $config, $articleId);
if ($locked || $status === 'processing') {
if ($locked) {
$started = '';
if (is_file($lockDir . '/started_at')) $started = trim((string)file_get_contents($lockDir . '/started_at'));
if ($started === '') $started = (string)($state['started_at'] ?? $state['updated_at'] ?? '');