Disabling buttons
This commit is contained in:
parent
04c9574a56
commit
5df4ac4c7f
2 changed files with 23 additions and 14 deletions
33
admin.php
33
admin.php
File diff suppressed because one or more lines are too long
|
|
@ -75,6 +75,7 @@ function mvlog_input_dir_switch_payload(string $dir, array $config, string $arti
|
||||||
$canShow = mvlog_input_dir_can_show($dir, $config);
|
$canShow = mvlog_input_dir_can_show($dir, $config);
|
||||||
$visible = $canShow && mvlog_input_dir_visible_marker($dir);
|
$visible = $canShow && mvlog_input_dir_visible_marker($dir);
|
||||||
$permalink = mvlog_input_dir_permalink($dir);
|
$permalink = mvlog_input_dir_permalink($dir);
|
||||||
|
$running = is_dir($dir . '/.movmaker-lock');
|
||||||
return [
|
return [
|
||||||
'dir' => basename($dir),
|
'dir' => basename($dir),
|
||||||
'id' => $articleId,
|
'id' => $articleId,
|
||||||
|
|
@ -86,6 +87,7 @@ function mvlog_input_dir_switch_payload(string $dir, array $config, string $arti
|
||||||
'can_permalink' => $canShow,
|
'can_permalink' => $canShow,
|
||||||
'public_locked' => $visible || $permalink,
|
'public_locked' => $visible || $permalink,
|
||||||
'map_hidden' => is_file($dir . '/.mvlog-hide-map'),
|
'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);
|
$switches[] = mvlog_input_dir_switch_payload($dir, $config, $articleId);
|
||||||
|
|
||||||
if ($locked || $status === 'processing') {
|
if ($locked) {
|
||||||
$started = '';
|
$started = '';
|
||||||
if (is_file($lockDir . '/started_at')) $started = trim((string)file_get_contents($lockDir . '/started_at'));
|
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'] ?? '');
|
if ($started === '') $started = (string)($state['started_at'] ?? $state['updated_at'] ?? '');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue