From 054e444bff550f86916735e533b09cd827264842 Mon Sep 17 00:00:00 2001 From: acx10 Date: Sat, 19 Sep 2026 10:13:53 -0600 Subject: [PATCH] Announce BookOrbit as BookLore successor --- .github/ISSUE_TEMPLATE/config.yml | 6 + .github/ISSUE_TEMPLATE/feature_request.yml | 38 ++-- README.md | 10 +- .../book-dialog-helper.service.ts | 15 +- .../global-preferences.component.html | 27 --- .../global-preferences.component.ts | 10 - .../bookorbit-announcement.component.html | 46 ++++ .../bookorbit-announcement.component.scss | 205 +++++++++++++++++ .../bookorbit-announcement.component.spec.ts | 77 +++++++ .../bookorbit-announcement.component.ts | 26 +++ ...bookorbit-transition-dialog.component.html | 55 +++++ ...bookorbit-transition-dialog.component.scss | 210 ++++++++++++++++++ ...korbit-transition-dialog.component.spec.ts | 39 ++++ .../bookorbit-transition-dialog.component.ts | 18 ++ .../layout-main/app.layout.component.html | 1 + .../layout-main/app.layout.component.ts | 2 + .../layout-topbar/app.topbar.component.html | 33 +-- .../layout-topbar/app.topbar.component.scss | 145 ++++-------- .../layout-topbar/app.topbar.component.ts | 21 +- .../services/dialog-launcher.service.ts | 12 +- booklore-ui/src/i18n/en/layout.json | 11 + 21 files changed, 803 insertions(+), 204 deletions(-) create mode 100644 booklore-ui/src/app/shared/components/bookorbit-announcement/bookorbit-announcement.component.html create mode 100644 booklore-ui/src/app/shared/components/bookorbit-announcement/bookorbit-announcement.component.scss create mode 100644 booklore-ui/src/app/shared/components/bookorbit-announcement/bookorbit-announcement.component.spec.ts create mode 100644 booklore-ui/src/app/shared/components/bookorbit-announcement/bookorbit-announcement.component.ts create mode 100644 booklore-ui/src/app/shared/components/bookorbit-transition-dialog/bookorbit-transition-dialog.component.html create mode 100644 booklore-ui/src/app/shared/components/bookorbit-transition-dialog/bookorbit-transition-dialog.component.scss create mode 100644 booklore-ui/src/app/shared/components/bookorbit-transition-dialog/bookorbit-transition-dialog.component.spec.ts create mode 100644 booklore-ui/src/app/shared/components/bookorbit-transition-dialog/bookorbit-transition-dialog.component.ts diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index bf037bb41..b7b82d23a 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,11 @@ blank_issues_enabled: false contact_links: + - name: BookOrbit Feature Requests + url: https://github.com/bookorbit/bookorbit/issues/new/choose + about: Request new features in BookOrbit, the official successor to BookLore. + - name: BookOrbit Questions and Discussions + url: https://github.com/bookorbit/bookorbit/discussions + about: Ask about BookOrbit or moving from BookLore. - name: Questions & Support url: https://discord.gg/Ee5hd458Uz about: Join our Discord community to chat with other users and maintainers. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index 659af2d94..7a4fa3523 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -1,28 +1,32 @@ -name: Feature Request -description: Suggest a new feature or enhancement for Booklore -title: "[Feature] " +name: BookLore Maintenance Request +description: Suggest a focused maintenance improvement for BookLore +title: "[Maintenance] " labels: ["feature"] body: - type: markdown attributes: value: | - Please share as much detail as you can to help us understand your suggestion. + ## BookLore is in maintenance mode + + Active feature development has moved to [BookOrbit](https://bookorbit.app), the official successor to BookLore. Please submit new feature ideas to the [BookOrbit issue tracker](https://github.com/bookorbit/bookorbit/issues/new/choose). + + Use this form only for a small, focused BookLore maintenance improvement. Bug reports should use the bug report form. - type: textarea id: description attributes: - label: What's Your Idea? - description: Tell us about the feature you'd like to see - placeholder: "Example: Add a 'Currently Reading' shelf where I can track books I'm reading and see my progress" + label: What maintenance improvement are you proposing? + description: Describe the focused improvement and why it belongs in maintenance-mode BookLore rather than BookOrbit. + placeholder: "Describe the existing BookLore behavior and the limited improvement you are proposing." validations: required: true - type: textarea id: problem attributes: - label: Why Would This Be Helpful? - description: Help us understand the problem this solves or the value it brings - placeholder: "Example: Right now, it's hard to keep track of multiple books I'm reading at once. Having a dedicated shelf with progress tracking would help me stay organized" + label: What existing problem would this address? + description: Explain the impact on current BookLore installations. + placeholder: "Explain the current limitation and who it affects." validations: required: true @@ -41,10 +45,10 @@ body: - type: dropdown id: willing-to-contribute attributes: - label: Want to Help Out? - description: Let us know if you'd like to be involved in making this happen + label: Want to help? + description: Let us know if you can help implement or verify this maintenance improvement. options: - - "Yes! I'd love to help implement this" + - "Yes! I'd love to help implement this improvement" - "I'm happy to help test and give feedback" - "Just sharing the idea for now" validations: @@ -59,8 +63,10 @@ body: - type: checkboxes id: prerequisites attributes: - label: Before Submitting - description: Please confirm you've completed this step + label: Before submitting + description: Please confirm both items. options: - - label: I've searched existing issues and confirmed this feature hasn't been requested yet + - label: I've searched existing issues and confirmed this maintenance improvement has not already been requested. + required: true + - label: I understand that new feature development has moved to BookOrbit. required: true diff --git a/README.md b/README.md index de8b91d24..972840ab3 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,15 @@ BookLore is a self-hosted app that brings your entire book collection under one Organize, read, annotate, sync across devices, and share, all without relying on third-party services.

+> [!IMPORTANT] +> ## BookOrbit is the next chapter of BookLore +> +> **[BookOrbit](https://bookorbit.app)** is BookLore's official successor and the home of active development. It expands BookLore into a complete self-hosted reading platform for ebooks, PDFs, comics, and audiobooks, with richer readers and sync, automation, reading insights, integrations, and a native offline-capable iOS app with Apple Watch audiobook playback in development. +> +> BookLore is entering maintenance mode and will continue to receive occasional maintenance, bug fixes, and security updates. Moving is optional, with a guided migration available whenever you are ready. +> +> **[Visit BookOrbit](https://bookorbit.app)** · **[View on GitHub](https://github.com/bookorbit/bookorbit)** · **[Read the migration guide](https://bookorbit.app/migration/)** + --- ## ✨ Features @@ -175,7 +184,6 @@ BookLore is free, open source, and built with care. Here's how you can give back | Action | How | |:---|:---| | ⭐ **Star this repo** | It's the simplest way to help others find BookLore | -| 💰 **Sponsor development** | [Open Collective](https://opencollective.com/booklore) funds hosting, testing, and new features | | 📢 **Tell someone** | Share BookLore with a friend, a subreddit, or your local book club | --- diff --git a/booklore-ui/src/app/features/book/components/book-browser/book-dialog-helper.service.ts b/booklore-ui/src/app/features/book/components/book-browser/book-dialog-helper.service.ts index 5399f35f3..10c1251fa 100644 --- a/booklore-ui/src/app/features/book/components/book-browser/book-dialog-helper.service.ts +++ b/booklore-ui/src/app/features/book/components/book-browser/book-dialog-helper.service.ts @@ -1,5 +1,5 @@ -import {inject, Injectable} from '@angular/core'; -import {DynamicDialogRef} from 'primeng/dynamicdialog'; +import {inject, Injectable, Type} from '@angular/core'; +import {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog'; import {DialogLauncherService, DialogSize, DialogStyle} from '../../../../shared/services/dialog-launcher.service'; import {ShelfAssignerComponent} from '../shelf-assigner/shelf-assigner.component'; import {LockUnlockMetadataDialogComponent} from './lock-unlock-metadata-dialog/lock-unlock-metadata-dialog.component'; @@ -10,7 +10,6 @@ import {MultiBookMetadataFetchComponent} from '../../../metadata/component/multi import {FileMoverComponent} from '../../../../shared/components/file-mover/file-mover-component'; import {ShelfCreatorComponent} from '../shelf-creator/shelf-creator.component'; import {BookSenderComponent} from '../book-sender/book-sender.component'; -import {MetadataFetchOptionsComponent} from '../../../metadata/component/metadata-options-dialog/metadata-fetch-options/metadata-fetch-options.component'; import {BookMetadataCenterComponent} from '../../../metadata/component/book-metadata-center/book-metadata-center.component'; import {CoverSearchComponent} from '../../../metadata/component/cover-search/cover-search.component'; import {Book} from '../../model/book.model'; @@ -25,7 +24,7 @@ export class BookDialogHelperService { private dialogLauncherService = inject(DialogLauncherService); - private openDialog(component: unknown, options: {}): DynamicDialogRef | null { + private openDialog(component: Type, options: DynamicDialogConfig): DynamicDialogRef | null { return this.dialogLauncherService.openDialog(component, options); } @@ -40,13 +39,11 @@ export class BookDialogHelperService { } openShelfAssignerDialog(book: Book | null, bookIds: Set | null): DynamicDialogRef | null { - const data: any = {}; + let data: {isMultiBooks: false; book: Book} | {isMultiBooks: true; bookIds: Set}; if (book !== null) { - data.isMultiBooks = false; - data.book = book; + data = {isMultiBooks: false, book}; } else if (bookIds !== null) { - data.isMultiBooks = true; - data.bookIds = bookIds; + data = {isMultiBooks: true, bookIds}; } else { return null; } diff --git a/booklore-ui/src/app/features/settings/global-preferences/global-preferences.component.html b/booklore-ui/src/app/features/settings/global-preferences/global-preferences.component.html index 10195de62..4bc663993 100644 --- a/booklore-ui/src/app/features/settings/global-preferences/global-preferences.component.html +++ b/booklore-ui/src/app/features/settings/global-preferences/global-preferences.component.html @@ -11,33 +11,6 @@
-
-
-

- - {{ t('appearance.sectionTitle') }} -

-
- -
-
-
-
- - - -
-

- - {{ t('appearance.supportButtonAnimationDesc') }} -

-
-
-
-
-

diff --git a/booklore-ui/src/app/features/settings/global-preferences/global-preferences.component.ts b/booklore-ui/src/app/features/settings/global-preferences/global-preferences.component.ts index 3f315a351..2d38d316d 100644 --- a/booklore-ui/src/app/features/settings/global-preferences/global-preferences.component.ts +++ b/booklore-ui/src/app/features/settings/global-preferences/global-preferences.component.ts @@ -14,8 +14,6 @@ import {InputText} from 'primeng/inputtext'; import {Slider} from 'primeng/slider'; import {TranslocoDirective, TranslocoPipe, TranslocoService} from '@jsverse/transloco'; -export const SUPPORT_ANIMATION_KEY = 'booklore-support-animation'; - @Component({ selector: 'app-global-preferences', standalone: true, @@ -39,8 +37,6 @@ export class GlobalPreferencesComponent implements OnInit { similarBookRecommendation: false }; - supportButtonAnimation = localStorage.getItem(SUPPORT_ANIMATION_KEY) !== 'false'; - coverCroppingSettings: CoverCroppingSettings = { verticalCroppingEnabled: false, horizontalCroppingEnabled: false, @@ -95,12 +91,6 @@ export class GlobalPreferencesComponent implements OnInit { } } - onSupportAnimationChange(checked: boolean): void { - this.supportButtonAnimation = checked; - localStorage.setItem(SUPPORT_ANIMATION_KEY, String(checked)); - window.dispatchEvent(new StorageEvent('storage', {key: SUPPORT_ANIMATION_KEY, newValue: String(checked)})); - } - onCoverCroppingChange(): void { this.saveSetting(AppSettingKey.COVER_CROPPING_SETTINGS, this.coverCroppingSettings); } diff --git a/booklore-ui/src/app/shared/components/bookorbit-announcement/bookorbit-announcement.component.html b/booklore-ui/src/app/shared/components/bookorbit-announcement/bookorbit-announcement.component.html new file mode 100644 index 000000000..c332b865e --- /dev/null +++ b/booklore-ui/src/app/shared/components/bookorbit-announcement/bookorbit-announcement.component.html @@ -0,0 +1,46 @@ + + @if (!dismissed && (userService.userState$ | async)?.user?.permissions?.admin) { + + } + diff --git a/booklore-ui/src/app/shared/components/bookorbit-announcement/bookorbit-announcement.component.scss b/booklore-ui/src/app/shared/components/bookorbit-announcement/bookorbit-announcement.component.scss new file mode 100644 index 000000000..50b9b6fb5 --- /dev/null +++ b/booklore-ui/src/app/shared/components/bookorbit-announcement/bookorbit-announcement.component.scss @@ -0,0 +1,205 @@ +:host { + display: block; + flex: 0 0 auto; +} + +.bookorbit-announcement { + position: relative; + display: flex; + align-items: flex-start; + gap: 1rem; + box-sizing: border-box; + width: 100%; + margin: 0 0 1rem; + padding: 1rem 3.25rem 1rem 1rem; + overflow: hidden; + color: var(--text-color); + background: + radial-gradient(circle at 0 0, color-mix(in srgb, var(--primary-color) 20%, transparent), transparent 45%), + var(--card-background); + border: 1px solid color-mix(in srgb, var(--primary-color) 45%, var(--p-content-border-color)); + border-radius: 0.75rem; + box-shadow: 0 0.35rem 1.25rem color-mix(in srgb, black 16%, transparent); + animation: announcement-enter 0.22s ease-out; +} + +.bookorbit-announcement::before { + position: absolute; + inset: 0 auto 0 0; + width: 0.25rem; + content: ''; + background: linear-gradient(180deg, var(--primary-color), #8b5cf6); +} + +.announcement-mark { + display: grid; + flex: 0 0 auto; + width: 2.5rem; + height: 2.5rem; + color: var(--primary-color); + background: color-mix(in srgb, var(--primary-color) 14%, transparent); + border: 1px solid color-mix(in srgb, var(--primary-color) 28%, transparent); + border-radius: 50%; + place-items: center; + + i { + font-size: 1.15rem; + } +} + +.announcement-content { + min-width: 0; + + h2 { + margin: 0 0 0.35rem; + font-size: 1rem; + font-weight: 700; + line-height: 1.35; + } + + p { + max-width: 82rem; + margin: 0; + color: var(--text-color-secondary); + font-size: 0.875rem; + line-height: 1.5; + } + + .migration-note { + margin-top: 0.2rem; + color: var(--text-color); + font-weight: 500; + } +} + +.announcement-actions { + display: flex; + flex-wrap: wrap; + gap: 0.6rem; + margin-top: 0.75rem; +} + +.announcement-link { + display: inline-flex; + align-items: center; + gap: 0.4rem; + min-height: 2.15rem; + padding: 0.4rem 0.75rem; + border: 1px solid transparent; + border-radius: 0.45rem; + font-size: 0.8rem; + font-weight: 650; + line-height: 1; + text-decoration: none; + transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease; + + &:hover { + transform: translateY(-1px); + } + + &:focus-visible { + outline: 2px solid var(--primary-color); + outline-offset: 2px; + } + + i { + font-size: 0.72rem; + } +} + +.announcement-link-primary { + color: var(--primary-contrast-color); + background: var(--primary-color); + + &:hover { + background: color-mix(in srgb, var(--primary-color) 88%, black); + } +} + +.announcement-link-secondary { + color: var(--text-color); + background: color-mix(in srgb, var(--card-background) 80%, transparent); + border-color: var(--p-content-border-color); + + &:hover { + border-color: var(--primary-color); + } +} + +.dismiss-button { + position: absolute; + top: 0.65rem; + right: 0.65rem; + display: grid; + width: 2rem; + height: 2rem; + padding: 0; + color: var(--text-color-secondary); + cursor: pointer; + background: transparent; + border: 0; + border-radius: 50%; + place-items: center; + + &:hover { + color: var(--text-color); + background: color-mix(in srgb, var(--text-color) 8%, transparent); + } + + &:focus-visible { + outline: 2px solid var(--primary-color); + outline-offset: 1px; + } +} + +@media (max-width: 768px) { + .bookorbit-announcement { + gap: 0.75rem; + width: calc(100% - 1.5rem); + margin: 0 0.75rem 0.75rem; + padding: 0.85rem 2.75rem 0.85rem 0.85rem; + border-radius: 0.65rem; + } + + .announcement-mark { + width: 2.15rem; + height: 2.15rem; + } + + .announcement-content { + h2 { + font-size: 0.9rem; + } + + p { + font-size: 0.8rem; + } + } + + .announcement-link { + min-height: 2rem; + padding: 0.4rem 0.65rem; + } +} + +@keyframes announcement-enter { + from { + opacity: 0; + transform: translateY(-0.5rem); + } + + to { + opacity: 1; + transform: translateY(0); + } +} + +@media (prefers-reduced-motion: reduce) { + .bookorbit-announcement { + animation: none; + } + + .announcement-link { + transition: none; + } +} diff --git a/booklore-ui/src/app/shared/components/bookorbit-announcement/bookorbit-announcement.component.spec.ts b/booklore-ui/src/app/shared/components/bookorbit-announcement/bookorbit-announcement.component.spec.ts new file mode 100644 index 000000000..c87b2ba82 --- /dev/null +++ b/booklore-ui/src/app/shared/components/bookorbit-announcement/bookorbit-announcement.component.spec.ts @@ -0,0 +1,77 @@ +import {ComponentFixture, TestBed} from '@angular/core/testing'; +import {BehaviorSubject} from 'rxjs'; +import {beforeEach, describe, expect, it, vi} from 'vitest'; +import {getTranslocoModule} from '../../../core/testing/transloco-testing'; +import {UserService, UserState} from '../../../features/settings/user-management/user.service'; +import {LocalStorageService} from '../../service/local-storage.service'; +import {BookOrbitAnnouncementComponent} from './bookorbit-announcement.component'; + +describe('BookOrbitAnnouncementComponent', () => { + const userState = new BehaviorSubject({user: null, loaded: true, error: null}); + const storage = { + get: vi.fn(), + set: vi.fn() + }; + let fixture: ComponentFixture; + + beforeEach(async () => { + vi.clearAllMocks(); + storage.get.mockReturnValue(false); + userState.next({user: null, loaded: true, error: null}); + + await TestBed.configureTestingModule({ + imports: [BookOrbitAnnouncementComponent, getTranslocoModule()], + providers: [ + {provide: UserService, useValue: {userState$: userState.asObservable()}}, + {provide: LocalStorageService, useValue: storage} + ] + }).compileComponents(); + }); + + function createFixture(admin: boolean): void { + userState.next({ + user: {permissions: {admin}} as UserState['user'], + loaded: true, + error: null + }); + fixture = TestBed.createComponent(BookOrbitAnnouncementComponent); + fixture.detectChanges(); + } + + it('shows the announcement to administrators', () => { + createFixture(true); + + expect(fixture.nativeElement.querySelector('.bookorbit-announcement')).not.toBeNull(); + expect(fixture.nativeElement.textContent).toContain('BookOrbit is the official successor to BookLore'); + + const links = Array.from(fixture.nativeElement.querySelectorAll('.announcement-link')) as HTMLAnchorElement[]; + expect(links.map(link => link.href)).toEqual([ + 'https://bookorbit.app/', + 'https://github.com/bookorbit/bookorbit', + 'https://bookorbit.app/migration/' + ]); + }); + + it('does not show the announcement to non-administrators', () => { + createFixture(false); + + expect(fixture.nativeElement.querySelector('.bookorbit-announcement')).toBeNull(); + }); + + it('keeps a previously dismissed announcement hidden', () => { + storage.get.mockReturnValue(true); + createFixture(true); + + expect(fixture.nativeElement.querySelector('.bookorbit-announcement')).toBeNull(); + }); + + it('stores the dismissal and hides the announcement', () => { + createFixture(true); + + fixture.nativeElement.querySelector('.dismiss-button').click(); + fixture.detectChanges(); + + expect(storage.set).toHaveBeenCalledWith('bookorbit-successor-banner-v1', true); + expect(fixture.nativeElement.querySelector('.bookorbit-announcement')).toBeNull(); + }); +}); diff --git a/booklore-ui/src/app/shared/components/bookorbit-announcement/bookorbit-announcement.component.ts b/booklore-ui/src/app/shared/components/bookorbit-announcement/bookorbit-announcement.component.ts new file mode 100644 index 000000000..30943203a --- /dev/null +++ b/booklore-ui/src/app/shared/components/bookorbit-announcement/bookorbit-announcement.component.ts @@ -0,0 +1,26 @@ +import {AsyncPipe} from '@angular/common'; +import {Component, inject} from '@angular/core'; +import {TranslocoDirective} from '@jsverse/transloco'; +import {UserService} from '../../../features/settings/user-management/user.service'; +import {LocalStorageService} from '../../service/local-storage.service'; + +const DISMISSED_STORAGE_KEY = 'bookorbit-successor-banner-v1'; + +@Component({ + selector: 'app-bookorbit-announcement', + standalone: true, + imports: [AsyncPipe, TranslocoDirective], + templateUrl: './bookorbit-announcement.component.html', + styleUrl: './bookorbit-announcement.component.scss' +}) +export class BookOrbitAnnouncementComponent { + protected readonly userService = inject(UserService); + private readonly localStorageService = inject(LocalStorageService); + + protected dismissed = this.localStorageService.get(DISMISSED_STORAGE_KEY) ?? false; + + protected dismiss(): void { + this.dismissed = true; + this.localStorageService.set(DISMISSED_STORAGE_KEY, true); + } +} diff --git a/booklore-ui/src/app/shared/components/bookorbit-transition-dialog/bookorbit-transition-dialog.component.html b/booklore-ui/src/app/shared/components/bookorbit-transition-dialog/bookorbit-transition-dialog.component.html new file mode 100644 index 000000000..31f5fae35 --- /dev/null +++ b/booklore-ui/src/app/shared/components/bookorbit-transition-dialog/bookorbit-transition-dialog.component.html @@ -0,0 +1,55 @@ + +
+
+ + +
+ BookOrbit +

{{ t('title') }}

+
+ + +
+ +
+

{{ t('description') }}

+ +
+ +

{{ t('migration') }}

+
+ + +
+
+
diff --git a/booklore-ui/src/app/shared/components/bookorbit-transition-dialog/bookorbit-transition-dialog.component.scss b/booklore-ui/src/app/shared/components/bookorbit-transition-dialog/bookorbit-transition-dialog.component.scss new file mode 100644 index 000000000..c3134eceb --- /dev/null +++ b/booklore-ui/src/app/shared/components/bookorbit-transition-dialog/bookorbit-transition-dialog.component.scss @@ -0,0 +1,210 @@ +.bookorbit-dialog { + overflow: hidden; + color: var(--text-color); + background: var(--card-background); + border: 1px solid color-mix(in srgb, var(--primary-color) 38%, var(--border-color)); + border-radius: 0.75rem; +} + +.dialog-header { + position: relative; + display: flex; + align-items: center; + gap: 1rem; + padding: 1.5rem 3.5rem 1.25rem 1.5rem; + background: + radial-gradient(circle at 0 0, color-mix(in srgb, var(--primary-color) 28%, transparent), transparent 55%), + linear-gradient(135deg, color-mix(in srgb, var(--primary-color) 9%, transparent), transparent 70%); + border-bottom: 1px solid color-mix(in srgb, var(--primary-color) 25%, var(--border-color)); +} + +.orbit-mark { + position: relative; + display: grid; + flex: 0 0 auto; + width: 3.5rem; + height: 3.5rem; + color: var(--primary-color); + background: color-mix(in srgb, var(--primary-color) 14%, var(--card-background)); + border: 1px solid color-mix(in srgb, var(--primary-color) 42%, transparent); + border-radius: 50%; + place-items: center; + + i { + font-size: 1.35rem; + } +} + +.orbit-ring { + position: absolute; + inset: -0.3rem; + border: 1px dashed color-mix(in srgb, var(--primary-color) 55%, transparent); + border-radius: 50%; + animation: orbit-spin 12s linear infinite; +} + +.header-copy { + min-width: 0; + + h2 { + margin: 0.15rem 0 0; + font-size: 1.25rem; + font-weight: 700; + line-height: 1.35; + } +} + +.eyebrow { + color: var(--primary-color); + font-size: 0.72rem; + font-weight: 750; + letter-spacing: 0.13em; + text-transform: uppercase; +} + +.close-button { + position: absolute; + top: 0.75rem; + right: 0.75rem; + display: grid; + width: 2.25rem; + height: 2.25rem; + padding: 0; + color: var(--text-color-secondary); + cursor: pointer; + background: transparent; + border: 0; + border-radius: 50%; + place-items: center; + + &:hover { + color: var(--text-color); + background: color-mix(in srgb, var(--text-color) 8%, transparent); + } + + &:focus-visible { + outline: 2px solid var(--primary-color); + outline-offset: 1px; + } +} + +.dialog-content { + padding: 1.5rem; +} + +.lead { + margin: 0; + color: var(--text-color-secondary); + font-size: 0.95rem; + line-height: 1.65; +} + +.maintenance-note { + display: flex; + align-items: flex-start; + gap: 0.75rem; + margin-top: 1.25rem; + padding: 0.9rem 1rem; + color: var(--text-color); + background: color-mix(in srgb, var(--primary-color) 8%, transparent); + border: 1px solid color-mix(in srgb, var(--primary-color) 24%, var(--border-color)); + border-radius: 0.65rem; + + i { + margin-top: 0.15rem; + color: var(--primary-color); + } + + p { + margin: 0; + font-size: 0.875rem; + line-height: 1.55; + } +} + +.dialog-actions { + display: flex; + flex-wrap: wrap; + gap: 0.75rem; + margin-top: 1.35rem; +} + +.dialog-link { + display: inline-flex; + align-items: center; + justify-content: center; + gap: 0.45rem; + min-height: 2.6rem; + padding: 0.55rem 0.95rem; + border: 1px solid transparent; + border-radius: 0.55rem; + font-size: 0.875rem; + font-weight: 650; + text-decoration: none; + transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease; + + &:hover { + transform: translateY(-1px); + } + + &:focus-visible { + outline: 2px solid var(--primary-color); + outline-offset: 2px; + } +} + +.dialog-link-primary { + color: var(--primary-contrast-color); + background: var(--primary-color); +} + +.dialog-link-secondary { + color: var(--text-color); + background: transparent; + border-color: var(--border-color); + + &:hover { + border-color: var(--primary-color); + } +} + +@keyframes orbit-spin { + to { + transform: rotate(360deg); + } +} + +@media (max-width: 480px) { + .dialog-header, + .dialog-content { + padding: 1rem; + } + + .dialog-header { + padding-right: 3rem; + } + + .orbit-mark { + width: 2.75rem; + height: 2.75rem; + } + + .header-copy h2 { + font-size: 1.05rem; + } + + .dialog-actions, + .dialog-link { + width: 100%; + } +} + +@media (prefers-reduced-motion: reduce) { + .orbit-ring { + animation: none; + } + + .dialog-link { + transition: none; + } +} diff --git a/booklore-ui/src/app/shared/components/bookorbit-transition-dialog/bookorbit-transition-dialog.component.spec.ts b/booklore-ui/src/app/shared/components/bookorbit-transition-dialog/bookorbit-transition-dialog.component.spec.ts new file mode 100644 index 000000000..24e4afe66 --- /dev/null +++ b/booklore-ui/src/app/shared/components/bookorbit-transition-dialog/bookorbit-transition-dialog.component.spec.ts @@ -0,0 +1,39 @@ +import {ComponentFixture, TestBed} from '@angular/core/testing'; +import {DynamicDialogRef} from 'primeng/dynamicdialog'; +import {beforeEach, describe, expect, it, vi} from 'vitest'; +import {getTranslocoModule} from '../../../core/testing/transloco-testing'; +import {BookOrbitTransitionDialogComponent} from './bookorbit-transition-dialog.component'; + +describe('BookOrbitTransitionDialogComponent', () => { + const dialogRef = {close: vi.fn()}; + let fixture: ComponentFixture; + + beforeEach(async () => { + vi.clearAllMocks(); + + await TestBed.configureTestingModule({ + imports: [BookOrbitTransitionDialogComponent, getTranslocoModule()], + providers: [{provide: DynamicDialogRef, useValue: dialogRef}] + }).compileComponents(); + + fixture = TestBed.createComponent(BookOrbitTransitionDialogComponent); + fixture.detectChanges(); + }); + + it('shows the transition message and canonical actions', () => { + expect(fixture.nativeElement.textContent).toContain('BookOrbit is the official successor to BookLore'); + + const links = Array.from(fixture.nativeElement.querySelectorAll('.dialog-link')) as HTMLAnchorElement[]; + expect(links.map(link => link.href)).toEqual([ + 'https://bookorbit.app/', + 'https://github.com/bookorbit/bookorbit', + 'https://bookorbit.app/migration/' + ]); + }); + + it('closes from the dialog close button', () => { + fixture.nativeElement.querySelector('.close-button').click(); + + expect(dialogRef.close).toHaveBeenCalledOnce(); + }); +}); diff --git a/booklore-ui/src/app/shared/components/bookorbit-transition-dialog/bookorbit-transition-dialog.component.ts b/booklore-ui/src/app/shared/components/bookorbit-transition-dialog/bookorbit-transition-dialog.component.ts new file mode 100644 index 000000000..819f4ad68 --- /dev/null +++ b/booklore-ui/src/app/shared/components/bookorbit-transition-dialog/bookorbit-transition-dialog.component.ts @@ -0,0 +1,18 @@ +import {Component, inject} from '@angular/core'; +import {TranslocoDirective} from '@jsverse/transloco'; +import {DynamicDialogRef} from 'primeng/dynamicdialog'; + +@Component({ + selector: 'app-bookorbit-transition-dialog', + standalone: true, + imports: [TranslocoDirective], + templateUrl: './bookorbit-transition-dialog.component.html', + styleUrl: './bookorbit-transition-dialog.component.scss' +}) +export class BookOrbitTransitionDialogComponent { + private readonly dialogRef = inject(DynamicDialogRef); + + protected close(): void { + this.dialogRef.close(); + } +} diff --git a/booklore-ui/src/app/shared/layout/component/layout-main/app.layout.component.html b/booklore-ui/src/app/shared/layout/component/layout-main/app.layout.component.html index 72aa99804..4ef18d7f8 100644 --- a/booklore-ui/src/app/shared/layout/component/layout-main/app.layout.component.html +++ b/booklore-ui/src/app/shared/layout/component/layout-main/app.layout.component.html @@ -4,6 +4,7 @@

+
diff --git a/booklore-ui/src/app/shared/layout/component/layout-main/app.layout.component.ts b/booklore-ui/src/app/shared/layout/component/layout-main/app.layout.component.ts index 1e885a00b..8dc6d33de 100644 --- a/booklore-ui/src/app/shared/layout/component/layout-main/app.layout.component.ts +++ b/booklore-ui/src/app/shared/layout/component/layout-main/app.layout.component.ts @@ -7,6 +7,7 @@ import {AppTopBarComponent} from '../layout-topbar/app.topbar.component'; import {NgClass} from '@angular/common'; import {ToastModule} from 'primeng/toast'; import {LocalStorageService} from '../../../service/local-storage.service'; +import {BookOrbitAnnouncementComponent} from '../../../components/bookorbit-announcement/bookorbit-announcement.component'; @Component({ selector: 'app-layout', @@ -14,6 +15,7 @@ import {LocalStorageService} from '../../../service/local-storage.service'; RouterOutlet, AppSidebarComponent, AppTopBarComponent, + BookOrbitAnnouncementComponent, NgClass, ToastModule ], diff --git a/booklore-ui/src/app/shared/layout/component/layout-topbar/app.topbar.component.html b/booklore-ui/src/app/shared/layout/component/layout-topbar/app.topbar.component.html index a17624294..a7806cd33 100644 --- a/booklore-ui/src/app/shared/layout/component/layout-topbar/app.topbar.component.html +++ b/booklore-ui/src/app/shared/layout/component/layout-topbar/app.topbar.component.html @@ -117,17 +117,20 @@ -
  • - @if (supportAnimationEnabled) { - - - - - - } - +
  • +
  • diff --git a/booklore-ui/src/app/shared/layout/component/layout-topbar/app.topbar.component.scss b/booklore-ui/src/app/shared/layout/component/layout-topbar/app.topbar.component.scss index 0f3f17796..59a2a6e29 100644 --- a/booklore-ui/src/app/shared/layout/component/layout-topbar/app.topbar.component.scss +++ b/booklore-ui/src/app/shared/layout/component/layout-topbar/app.topbar.component.scss @@ -66,83 +66,55 @@ position: relative; } -.heart-button { +.migration-button { + color: var(--primary-color) !important; + background: linear-gradient(135deg, + color-mix(in srgb, var(--primary-color) 20%, transparent), + color-mix(in srgb, #8b5cf6 14%, transparent)) !important; + border-color: color-mix(in srgb, var(--primary-color) 55%, transparent) !important; + box-shadow: 0 0 0.9rem color-mix(in srgb, var(--primary-color) 20%, transparent); + + &:hover { + border-color: var(--primary-color) !important; + box-shadow: 0 0 1.2rem color-mix(in srgb, var(--primary-color) 35%, transparent); + + .migration-orbit { + transform: rotate(180deg); + } + + .migration-arrow { + transform: translateX(0.75px); + } + } +} + +.migration-glyph { + width: 1.35rem; + height: 1.35rem; overflow: visible; - cursor: pointer; - position: relative; - - &:hover .heart-icon { - animation: heartbeat 0.6s ease-in-out; - filter: drop-shadow(0 0 8px rgba(236, 72, 153, 0.8)); - } - - &:hover .heart-ripple { - animation: ripple-burst 1.2s ease-out infinite; - } - - &:hover .heart-ripple-delayed { - animation-delay: 0.4s; - } + fill: none; + stroke: currentColor; + stroke-linecap: round; + stroke-linejoin: round; } -.heart-ripple { - position: absolute; - z-index: -1; - inset: 0; - border-radius: 50%; - border: 1.5px solid #ec4899; - opacity: 0; - pointer-events: none; +.migration-orbit { + stroke-dasharray: 31 9; + stroke-width: 1.45; + transform-box: fill-box; + transform-origin: center; + transition: transform 0.45s ease; } -.heart-orbit { - position: absolute; - z-index: 11; - width: 4px; - height: 4px; - border-radius: 50%; - pointer-events: none; - top: calc(50% - 2px); - left: calc(50% - 2px); +.migration-arrow { + stroke-width: 1.8; + transition: transform 0.2s ease; } -.heart-orbit-1 { - background: #f472b6; - box-shadow: 0 0 10px #f472b6, 0 0 4px #f472b6; - animation: orbit-1 2.5s linear infinite; -} - -.heart-orbit-2 { - background: #a78bfa; - box-shadow: 0 0 10px #a78bfa, 0 0 4px #a78bfa; - animation: orbit-2 3.2s linear infinite reverse; -} - -.heart-orbit-3 { - background: #38bdf8; - box-shadow: 0 0 10px #38bdf8, 0 0 4px #38bdf8; - animation: orbit-3 4s linear infinite; -} - -.heart-icon { - z-index: 10; - color: #e8366d !important; - font-size: 1.05rem; - animation: heart-float 2.5s ease-in-out infinite; - filter: drop-shadow(0 0 6px rgba(232, 54, 109, 0.8)); - transition: filter 0.3s; -} - -.heart-button-static { - .heart-icon { - animation: none; - filter: none; - } - - &:hover .heart-icon { - animation: none; - filter: none; - } +.migration-origin { + fill: var(--primary-color); + stroke: var(--card-background); + stroke-width: 1; } .mobile-trigger { @@ -195,39 +167,6 @@ animation: spin 1.5s linear infinite; } -@keyframes orbit-1 { - 0% { transform: rotate(0deg) translateX(16px) rotate(0deg); } - 100% { transform: rotate(360deg) translateX(16px) rotate(-360deg); } -} - -@keyframes orbit-2 { - 0% { transform: rotate(120deg) translateX(14px) rotate(-120deg); } - 100% { transform: rotate(480deg) translateX(14px) rotate(-480deg); } -} - -@keyframes orbit-3 { - 0% { transform: rotate(240deg) translateX(18px) rotate(-240deg); } - 100% { transform: rotate(600deg) translateX(18px) rotate(-600deg); } -} - -@keyframes ripple-burst { - 0% { transform: scale(0.8); opacity: 0.6; } - 100% { transform: scale(2.2); opacity: 0; } -} - -@keyframes heart-float { - 0%, 100% { transform: translateY(1px); } - 50% { transform: translateY(-1px); } -} - -@keyframes heartbeat { - 0% { transform: scale(1); } - 25% { transform: scale(1.35); } - 40% { transform: scale(0.95); } - 55% { transform: scale(1.2); } - 100% { transform: scale(1); } -} - @keyframes pulsate { 0% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.25); opacity: 0.8; } diff --git a/booklore-ui/src/app/shared/layout/component/layout-topbar/app.topbar.component.ts b/booklore-ui/src/app/shared/layout/component/layout-topbar/app.topbar.component.ts index c66b42cf8..27c913e7e 100644 --- a/booklore-ui/src/app/shared/layout/component/layout-topbar/app.topbar.component.ts +++ b/booklore-ui/src/app/shared/layout/component/layout-topbar/app.topbar.component.ts @@ -28,7 +28,6 @@ import {Menu} from 'primeng/menu'; import {TranslocoDirective, TranslocoService} from '@jsverse/transloco'; import {AVAILABLE_LANGS, LANG_LABELS} from '../../../../core/config/transloco-loader'; import {LANG_STORAGE_KEY} from '../../../../core/config/language-initializer'; -import {SUPPORT_ANIMATION_KEY} from '../../../../features/settings/global-preferences/global-preferences.component'; @Component({ selector: 'app-topbar', @@ -71,8 +70,6 @@ export class AppTopBarComponent implements OnDestroy { showPulse = false; hasAnyTasks = false; hasPendingBookdropFiles = false; - supportAnimationEnabled = localStorage.getItem(SUPPORT_ANIMATION_KEY) !== 'false'; - private eventTimer: number | undefined; private destroy$ = new Subject(); @@ -103,9 +100,6 @@ export class AppTopBarComponent implements OnDestroy { icon: lang === this.activeLang ? 'pi pi-check' : undefined, command: () => this.switchLanguage(lang), })); - this.onStorageChange = this.onStorageChange.bind(this); - window.addEventListener('storage', this.onStorageChange); - this.subscribeToMetadataProgress(); this.subscribeToNotifications(); @@ -143,26 +137,15 @@ export class AppTopBarComponent implements OnDestroy { ngOnDestroy(): void { if (this.ref) this.ref.close(); clearTimeout(this.eventTimer); - window.removeEventListener('storage', this.onStorageChange); this.destroy$.next(); this.destroy$.complete(); } - private onStorageChange(event: StorageEvent): void { - if (event.key === SUPPORT_ANIMATION_KEY) { - this.supportAnimationEnabled = event.newValue !== 'false'; - } - } - toggleMenu() { this.isMenuVisible = !this.isMenuVisible; this.layoutService.onMenuToggle(); } - openGithubSupportDialog(): void { - this.dialogLauncher.openGithubSupportDialog(); - } - openLibraryCreatorDialog(): void { this.dialogLauncher.openLibraryCreateDialog(); } @@ -179,6 +162,10 @@ export class AppTopBarComponent implements OnDestroy { this.router.navigate(['/settings']); } + openBookOrbitTransitionDialog(): void { + this.ref = this.dialogLauncher.openBookOrbitTransitionDialog() ?? undefined; + } + navigateToBookdrop() { this.router.navigate(['/bookdrop']); } diff --git a/booklore-ui/src/app/shared/services/dialog-launcher.service.ts b/booklore-ui/src/app/shared/services/dialog-launcher.service.ts index daf73fe32..fd081c61e 100644 --- a/booklore-ui/src/app/shared/services/dialog-launcher.service.ts +++ b/booklore-ui/src/app/shared/services/dialog-launcher.service.ts @@ -1,6 +1,5 @@ import {inject, Injectable, Type} from '@angular/core'; -import {DialogService, DynamicDialogRef} from 'primeng/dynamicdialog'; -import {GithubSupportDialog} from '../components/github-support-dialog/github-support-dialog'; +import {DialogService, DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog'; import {LibraryCreatorComponent} from '../../features/library-creator/library-creator.component'; import {BookUploaderComponent} from '../components/book-uploader/book-uploader.component'; import {UserProfileDialogComponent} from '../../features/settings/user-profile-dialog/user-profile-dialog.component'; @@ -18,6 +17,7 @@ import {MetadataRefreshType} from '../../features/metadata/model/request/metadat import {MetadataFetchOptionsComponent} from '../../features/metadata/component/metadata-options-dialog/metadata-fetch-options/metadata-fetch-options.component'; import {ShelfEditDialogComponent} from '../../features/book/components/shelf-edit-dialog/shelf-edit-dialog.component'; import {IconPickerComponent} from '../components/icon-picker/icon-picker-component'; +import {BookOrbitTransitionDialogComponent} from '../components/bookorbit-transition-dialog/bookorbit-transition-dialog.component'; /** * Dialog size classes - use these to control dialog dimensions @@ -56,8 +56,8 @@ export class DialogLauncherService { maximizable: false, } - openDialog(component: unknown, options: {}): DynamicDialogRef | null { - return this.dialogService.open(component as Type, { + openDialog(component: Type, options: DynamicDialogConfig): DynamicDialogRef | null { + return this.dialogService.open(component, { ...this.defaultDialogOptions, ...options, }); @@ -70,8 +70,8 @@ export class DialogLauncherService { }); } - openGithubSupportDialog(): DynamicDialogRef | null { - return this.openDialog(GithubSupportDialog, { + openBookOrbitTransitionDialog(): DynamicDialogRef | null { + return this.openDialog(BookOrbitTransitionDialogComponent, { showHeader: false, styleClass: `${DialogSize.MD} ${DialogStyle.MINIMAL}`, }); diff --git a/booklore-ui/src/i18n/en/layout.json b/booklore-ui/src/i18n/en/layout.json index fdada6224..edcdfd8ce 100644 --- a/booklore-ui/src/i18n/en/layout.json +++ b/booklore-ui/src/i18n/en/layout.json @@ -11,6 +11,7 @@ "logout": "Logout", "language": "Language", "supportBookLore": "Support BookLore", + "migrateToBookOrbit": "Migrate to BookOrbit", "notificationAriaLabel": "Unified Notification Icon", "createLibrary": "Create Library", "stats": "Stats", @@ -40,6 +41,16 @@ "primary": "Primary", "surface": "Surface" }, + "bookorbitAnnouncement": { + "title": "BookOrbit is the official successor to BookLore", + "description": "BookOrbit takes BookLore far beyond library management: one home for ebooks, PDFs, comics, and audiobooks, with polished readers, cross-device progress and annotation sync, discovery and request automation, and deep reading insights. A native, offline-capable iOS app with Apple Watch audiobook playback is in active development.", + "migration": "BookLore will remain available in maintenance mode for occasional maintenance, bug fixes, and security updates, with a guided migration path when you are ready.", + "explore": "Visit BookOrbit", + "github": "BookOrbit on GitHub", + "migrationGuide": "Migration guide", + "dismiss": "Dismiss BookOrbit announcement", + "closeDialog": "Close BookOrbit transition dialog" + }, "uploadDialog": { "chooseFile": "Choose File:", "selectImage": "Select Image",