diff --git a/comixed-frontend/src/app/app.module.ts b/comixed-frontend/src/app/app.module.ts index d411352a7..aad640eec 100644 --- a/comixed-frontend/src/app/app.module.ts +++ b/comixed-frontend/src/app/app.module.ts @@ -42,12 +42,10 @@ import { ComicsModule } from 'app/comics/comics.module'; import { LoginComponent } from 'app/components/login/login.component'; import { MainMenuComponent } from 'app/components/main-menu/main-menu.component'; import { LibraryModule } from 'app/library/library.module'; -import { LibraryAdminPageComponent } from 'app/pages/admin/library-admin-page/library-admin-page.component'; import { MainPageComponent } from 'app/pages/main-page/main-page.component'; import { UserService } from 'app/services/user.service'; import { UserModule } from 'app/user/user.module'; import { XhrInterceptor } from 'app/xhr.interceptor'; -import { FileSaverModule } from 'ngx-filesaver'; import { TranslateMessageFormatCompiler } from 'ngx-translate-messageformat-compiler'; import { MultiTranslateHttpLoader } from 'ngx-translate-multi-http-loader'; import { ConfirmationService, MessageService } from 'primeng/api'; @@ -90,7 +88,6 @@ import { LoggerModule } from '@angular-ru/logger'; AppComponent, MainPageComponent, LoginComponent, - LibraryAdminPageComponent, MainMenuComponent ], imports: [ @@ -159,7 +156,6 @@ import { LoggerModule } from '@angular-ru/logger'; } }), LoggerModule.forRoot(), - FileSaverModule, BreadcrumbModule ], providers: [ diff --git a/comixed-frontend/src/app/app.routing.ts b/comixed-frontend/src/app/app.routing.ts index 42aea2f0a..e4794cd7e 100644 --- a/comixed-frontend/src/app/app.routing.ts +++ b/comixed-frontend/src/app/app.routing.ts @@ -18,20 +18,13 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; -import { AdminGuard } from 'app/user'; import { MainPageComponent } from 'app/pages/main-page/main-page.component'; -import { LibraryAdminPageComponent } from 'app/pages/admin/library-admin-page/library-admin-page.component'; export const routes: Routes = [ { path: 'home', component: MainPageComponent }, - { - path: 'admin/library', - component: LibraryAdminPageComponent, - canActivate: [AdminGuard] - }, { path: '', redirectTo: 'home', diff --git a/comixed-frontend/src/app/library/library-routing.module.ts b/comixed-frontend/src/app/library/library-routing.module.ts index e10219e4d..828a4298a 100644 --- a/comixed-frontend/src/app/library/library-routing.module.ts +++ b/comixed-frontend/src/app/library/library-routing.module.ts @@ -27,6 +27,7 @@ import { MultiComicScrapingPageComponent } from 'app/library/pages/multi-comic-s import { ReadingListPageComponent } from 'app/library/pages/reading-list-page/reading-list-page.component'; import { ReadingListsPageComponent } from 'app/library/pages/reading-lists-page/reading-lists-page.component'; import { AdminGuard, ReaderGuard } from 'app/user'; +import { LibraryAdminPageComponent } from 'app/library/pages/library-admin-page/library-admin-page.component'; const routes: Routes = [ { @@ -73,6 +74,11 @@ const routes: Routes = [ path: 'duplicates', component: DuplicatesPageComponent, canActivate: [AdminGuard] + }, + { + path: 'admin/library', + component: LibraryAdminPageComponent, + canActivate: [AdminGuard] } ]; diff --git a/comixed-frontend/src/app/library/library.module.ts b/comixed-frontend/src/app/library/library.module.ts index cdf573d19..14381c2e3 100644 --- a/comixed-frontend/src/app/library/library.module.ts +++ b/comixed-frontend/src/app/library/library.module.ts @@ -44,9 +44,11 @@ import { DuplicatePagesService } from 'app/library/services/duplicate-pages.serv import { CheckboxModule } from 'primeng/checkbox'; import { ContextMenuModule } from 'primeng/contextmenu'; import { + ButtonModule, DialogModule, ProgressSpinnerModule, - ScrollPanelModule, SidebarModule, + ScrollPanelModule, + SidebarModule, SliderModule, ToolbarModule, TooltipModule @@ -76,6 +78,8 @@ import * as fromPublisher from 'app/library/reducers/publisher.reducer'; import { PublisherEffects } from 'app/library/effects/publisher.effects'; import { PublisherAdaptor } from 'app/library/adaptors/publisher.adaptor'; import { ConsolidateLibraryComponent } from './components/consolidate-library/consolidate-library.component'; +import { LibraryAdminPageComponent } from 'app/library/pages/library-admin-page/library-admin-page.component'; +import { FileSaverModule } from 'ngx-filesaver'; @NgModule({ imports: [ @@ -85,24 +89,24 @@ import { ConsolidateLibraryComponent } from './components/consolidate-library/co UserExperienceModule, TranslateModule.forRoot(), StoreModule.forFeature( - fromLibrary.LIBRARY_FEATURE_KEY, - fromLibrary.reducer + fromLibrary.LIBRARY_FEATURE_KEY, + fromLibrary.reducer ), StoreModule.forFeature( - fromSelection.SELECTION_FEATURE_KEY, - fromSelection.reducer + fromSelection.SELECTION_FEATURE_KEY, + fromSelection.reducer ), StoreModule.forFeature( - fromReadingList.READING_LIST_FEATURE_KEY, - fromReadingList.reducer + fromReadingList.READING_LIST_FEATURE_KEY, + fromReadingList.reducer ), StoreModule.forFeature( - fromDupes.DUPLICATE_PAGES_FEATURE_KEY, - fromDupes.reducer + fromDupes.DUPLICATE_PAGES_FEATURE_KEY, + fromDupes.reducer ), StoreModule.forFeature( - fromPublisher.PUBLISHER_FEATURE_KEY, - fromPublisher.reducer + fromPublisher.PUBLISHER_FEATURE_KEY, + fromPublisher.reducer ), EffectsModule.forFeature([ LibraryEffects, @@ -118,7 +122,9 @@ import { ConsolidateLibraryComponent } from './components/consolidate-library/co ProgressSpinnerModule, TooltipModule, DialogModule, - SidebarModule + SidebarModule, + ButtonModule, + FileSaverModule ], exports: [CommonModule, ComicsModule, ComicListComponent], declarations: [ @@ -140,7 +146,8 @@ import { ConsolidateLibraryComponent } from './components/consolidate-library/co CollectionDetailsPageComponent, CollectionPageComponent, ConvertComicsSettingsComponent, - ConsolidateLibraryComponent + ConsolidateLibraryComponent, + LibraryAdminPageComponent ], providers: [ LibraryService, diff --git a/comixed-frontend/src/app/library/pages/library-admin-page/library-admin-page.component.html b/comixed-frontend/src/app/library/pages/library-admin-page/library-admin-page.component.html new file mode 100644 index 000000000..7003221b6 --- /dev/null +++ b/comixed-frontend/src/app/library/pages/library-admin-page/library-admin-page.component.html @@ -0,0 +1,69 @@ +
Use this button to force rescanning your entire library.
", - "paragraph2": "The server will re-evaluate each of the comics in your library, updating what it knows about each file.
", - "paragraph3": "NOTE: While the library is being rescanned, you will not be able to import new comics.
", - "already-running": "A rescan is current running on the server...
", - "buttons": { - "rescan-library": "Rescan Library" - } - }, - "backup": { - "header": "Library Backup/Restore", - "paragraph1": "Use this section to download and restore snapshots of your library database.
", - "paragraph2": "To download the current database content, click on the Export Library button.
", - "buttons": { - "export-library": "Export Library" - } - } - }, - "account-preferences": { - "label": { - "preference-name": "Name", - "preference-value": "Value" - } - }, "user-details": { "label": { "email-address": "Email Address", diff --git a/comixed-frontend/src/assets/i18n/library-en.json b/comixed-frontend/src/assets/i18n/library-en.json index 2f772a33c..292885e43 100644 --- a/comixed-frontend/src/assets/i18n/library-en.json +++ b/comixed-frontend/src/assets/i18n/library-en.json @@ -412,6 +412,35 @@ "message": "Are you sure you want to consolidate the library and {deletePhysicalFiles, select, true{delete} other{not delete}} the comic files?" } }, + "library-admin-page": { + "rescan": { + "header": "Rescan Library", + "paragraph1": "Use this button to force rescanning your entire library.
", + "paragraph2": "The server will re-evaluate each of the comics in your library, updating what it knows about each file.
", + "paragraph3": "NOTE: While the library is being rescanned, you will not be able to import new comics.
", + "already-running": "A rescan is current running on the server...
", + "buttons": { + "rescan-library": "Rescan Library" + } + }, + "backup": { + "header": "Library Backup/Restore", + "paragraph1": "Use this section to download and restore snapshots of your library database.
", + "paragraph2": "To download the current database content, click on the Export Library button.
", + "buttons": { + "export-library": "Export Library" + } + }, + "consolidate": { + "header": "Consolidate Library Files" + } + }, + "account-preferences": { + "label": { + "preference-name": "Name", + "preference-value": "Value" + } + }, "breadcrumb": { "collections": { "root": "Collections",