mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-04-13 18:11:03 +08:00
fix: 程序状态
This commit is contained in:
@@ -11,6 +11,8 @@ export const appStop = () => axios.get('api/v1/stop');
|
||||
|
||||
/** 状态 */
|
||||
export async function appStatus() {
|
||||
const { data } = await axios.get<boolean>('api/v1/status');
|
||||
return data;
|
||||
const { data } = await axios.get<{ status: 'stop' | 'running' }>(
|
||||
'api/v1/status'
|
||||
);
|
||||
return data.status !== 'stop';
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ const { status } = storeToRefs(programStore());
|
||||
运行状态:
|
||||
<div
|
||||
class="i-carbon:dot-mark"
|
||||
:class="{ 'text-red': !status, 'text-green': status }"
|
||||
:class="[status ? 'text-green' : 'text-red']"
|
||||
></div>
|
||||
</div>
|
||||
</el-header>
|
||||
|
||||
Reference in New Issue
Block a user