Disabling buttons
This commit is contained in:
parent
04c9574a56
commit
5df4ac4c7f
2 changed files with 23 additions and 14 deletions
|
|
@ -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'] ?? '');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue