mirror of
https://github.com/immich-app/immich.git
synced 2025-12-22 01:11:20 +03:00
feat(server): library cleanup from ui (#16226)
* feat(server,web): scan all libraries from frontend * feat(server,web): scan all libraries from frontend * Add button text
This commit is contained in:
committed by
GitHub
parent
8885e3105e
commit
869839f642
@@ -185,7 +185,7 @@
|
||||
{#if !disabled && !multipleButtons && isIdle}
|
||||
<JobTileButton color="light-gray" onClick={() => onCommand({ command: JobCommand.Start, force: false })}>
|
||||
<Icon path={mdiPlay} size="48" />
|
||||
{$t('start').toUpperCase()}
|
||||
{missingText}
|
||||
</JobTileButton>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -79,8 +79,7 @@
|
||||
icon: mdiLibraryShelves,
|
||||
title: $getJobName(JobName.Library),
|
||||
subtitle: $t('admin.library_tasks_description'),
|
||||
allText: $t('all'),
|
||||
missingText: $t('refresh'),
|
||||
missingText: $t('rescan'),
|
||||
},
|
||||
[JobName.Sidecar]: {
|
||||
title: $getJobName(JobName.Sidecar),
|
||||
@@ -135,14 +134,14 @@
|
||||
[JobName.StorageTemplateMigration]: {
|
||||
icon: mdiFolderMove,
|
||||
title: $getJobName(JobName.StorageTemplateMigration),
|
||||
missingText: $t('missing'),
|
||||
missingText: $t('start'),
|
||||
description: StorageMigrationDescription,
|
||||
},
|
||||
[JobName.Migration]: {
|
||||
icon: mdiFolderMove,
|
||||
title: $getJobName(JobName.Migration),
|
||||
subtitle: $t('admin.migration_job_description'),
|
||||
missingText: $t('missing'),
|
||||
missingText: $t('start'),
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ export const getJobName = derived(t, ($t) => {
|
||||
[JobName.Migration]: $t('admin.migration_job'),
|
||||
[JobName.BackgroundTask]: $t('admin.background_task_job'),
|
||||
[JobName.Search]: $t('search'),
|
||||
[JobName.Library]: $t('library'),
|
||||
[JobName.Library]: $t('external_libraries'),
|
||||
[JobName.Notifications]: $t('notifications'),
|
||||
[JobName.BackupDatabase]: $t('admin.backup_database'),
|
||||
};
|
||||
|
||||
@@ -22,7 +22,10 @@
|
||||
getAllLibraries,
|
||||
getLibraryStatistics,
|
||||
getUserAdmin,
|
||||
JobCommand,
|
||||
JobName,
|
||||
scanLibrary,
|
||||
sendJobCommand,
|
||||
updateLibrary,
|
||||
type LibraryResponseDto,
|
||||
type LibraryStatsResponseDto,
|
||||
@@ -151,9 +154,8 @@
|
||||
|
||||
const handleScanAll = async () => {
|
||||
try {
|
||||
for (const library of libraries) {
|
||||
await scanLibrary({ id: library.id });
|
||||
}
|
||||
await sendJobCommand({ id: JobName.Library, jobCommandDto: { command: JobCommand.Start } });
|
||||
|
||||
notificationController.show({
|
||||
message: $t('admin.refreshing_all_libraries'),
|
||||
type: NotificationType.Info,
|
||||
|
||||
Reference in New Issue
Block a user