mirror of
https://github.com/adityachandelgit/BookLore.git
synced 2026-11-28 17:48:38 +01:00
Announce BookOrbit as BookLore successor
This commit is contained in:
6
.github/ISSUE_TEMPLATE/config.yml
vendored
6
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -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.
|
||||
|
||||
38
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
38
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
@@ -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
|
||||
|
||||
10
README.md
10
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.
|
||||
</p>
|
||||
|
||||
> [!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 |
|
||||
|
||||
---
|
||||
|
||||
@@ -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<T>(component: Type<T>, options: DynamicDialogConfig): DynamicDialogRef<T> | null {
|
||||
return this.dialogLauncherService.openDialog(component, options);
|
||||
}
|
||||
|
||||
@@ -40,13 +39,11 @@ export class BookDialogHelperService {
|
||||
}
|
||||
|
||||
openShelfAssignerDialog(book: Book | null, bookIds: Set<number> | null): DynamicDialogRef | null {
|
||||
const data: any = {};
|
||||
let data: {isMultiBooks: false; book: Book} | {isMultiBooks: true; bookIds: Set<number>};
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -11,33 +11,6 @@
|
||||
</div>
|
||||
|
||||
<div class="settings-content">
|
||||
<div class="preferences-section">
|
||||
<div class="section-header">
|
||||
<h3 class="section-title">
|
||||
<i class="pi pi-palette"></i>
|
||||
{{ t('appearance.sectionTitle') }}
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="settings-card">
|
||||
<div class="setting-item">
|
||||
<div class="setting-info">
|
||||
<div class="setting-label-row">
|
||||
<label class="setting-label">{{ t('appearance.supportButtonAnimation') }}</label>
|
||||
<p-toggleswitch
|
||||
[(ngModel)]="supportButtonAnimation"
|
||||
(onChange)="onSupportAnimationChange($event.checked)">
|
||||
</p-toggleswitch>
|
||||
</div>
|
||||
<p class="setting-description">
|
||||
<i class="pi pi-info-circle"></i>
|
||||
{{ t('appearance.supportButtonAnimationDesc') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="preferences-section">
|
||||
<div class="section-header">
|
||||
<h3 class="section-title">
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
<ng-container *transloco="let t; prefix: 'layout.bookorbitAnnouncement'">
|
||||
@if (!dismissed && (userService.userState$ | async)?.user?.permissions?.admin) {
|
||||
<aside class="bookorbit-announcement" role="region" aria-labelledby="bookorbit-announcement-title">
|
||||
<div class="announcement-mark" aria-hidden="true">
|
||||
<i class="pi pi-compass"></i>
|
||||
</div>
|
||||
|
||||
<div class="announcement-content">
|
||||
<h2 id="bookorbit-announcement-title">{{ t('title') }}</h2>
|
||||
<p>{{ t('description') }}</p>
|
||||
<p class="migration-note">{{ t('migration') }}</p>
|
||||
|
||||
<div class="announcement-actions">
|
||||
<a
|
||||
class="announcement-link announcement-link-primary"
|
||||
href="https://bookorbit.app"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer">
|
||||
{{ t('explore') }}
|
||||
<i class="pi pi-external-link" aria-hidden="true"></i>
|
||||
</a>
|
||||
<a
|
||||
class="announcement-link announcement-link-secondary"
|
||||
href="https://github.com/bookorbit/bookorbit"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer">
|
||||
{{ t('github') }}
|
||||
<i class="pi pi-github" aria-hidden="true"></i>
|
||||
</a>
|
||||
<a
|
||||
class="announcement-link announcement-link-secondary"
|
||||
href="https://bookorbit.app/migration/"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer">
|
||||
{{ t('migrationGuide') }}
|
||||
<i class="pi pi-arrow-right" aria-hidden="true"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="button" class="dismiss-button" (click)="dismiss()" [attr.aria-label]="t('dismiss')">
|
||||
<i class="pi pi-times" aria-hidden="true"></i>
|
||||
</button>
|
||||
</aside>
|
||||
}
|
||||
</ng-container>
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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<UserState>({user: null, loaded: true, error: null});
|
||||
const storage = {
|
||||
get: vi.fn(),
|
||||
set: vi.fn()
|
||||
};
|
||||
let fixture: ComponentFixture<BookOrbitAnnouncementComponent>;
|
||||
|
||||
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();
|
||||
});
|
||||
});
|
||||
@@ -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<boolean>(DISMISSED_STORAGE_KEY) ?? false;
|
||||
|
||||
protected dismiss(): void {
|
||||
this.dismissed = true;
|
||||
this.localStorageService.set(DISMISSED_STORAGE_KEY, true);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
<ng-container *transloco="let t; prefix: 'layout.bookorbitAnnouncement'">
|
||||
<section class="bookorbit-dialog" aria-labelledby="bookorbit-dialog-title">
|
||||
<header class="dialog-header">
|
||||
<div class="orbit-mark" aria-hidden="true">
|
||||
<span class="orbit-ring"></span>
|
||||
<i class="pi pi-compass"></i>
|
||||
</div>
|
||||
|
||||
<div class="header-copy">
|
||||
<span class="eyebrow">BookOrbit</span>
|
||||
<h2 id="bookorbit-dialog-title">{{ t('title') }}</h2>
|
||||
</div>
|
||||
|
||||
<button type="button" class="close-button" (click)="close()" [attr.aria-label]="t('closeDialog')">
|
||||
<i class="pi pi-times" aria-hidden="true"></i>
|
||||
</button>
|
||||
</header>
|
||||
|
||||
<div class="dialog-content">
|
||||
<p class="lead">{{ t('description') }}</p>
|
||||
|
||||
<div class="maintenance-note">
|
||||
<i class="pi pi-shield" aria-hidden="true"></i>
|
||||
<p>{{ t('migration') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="dialog-actions">
|
||||
<a
|
||||
class="dialog-link dialog-link-primary"
|
||||
href="https://bookorbit.app"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer">
|
||||
{{ t('explore') }}
|
||||
<i class="pi pi-external-link" aria-hidden="true"></i>
|
||||
</a>
|
||||
<a
|
||||
class="dialog-link dialog-link-secondary"
|
||||
href="https://github.com/bookorbit/bookorbit"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer">
|
||||
{{ t('github') }}
|
||||
<i class="pi pi-github" aria-hidden="true"></i>
|
||||
</a>
|
||||
<a
|
||||
class="dialog-link dialog-link-secondary"
|
||||
href="https://bookorbit.app/migration/"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer">
|
||||
{{ t('migrationGuide') }}
|
||||
<i class="pi pi-arrow-right" aria-hidden="true"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</ng-container>
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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<BookOrbitTransitionDialogComponent>;
|
||||
|
||||
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();
|
||||
});
|
||||
});
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@
|
||||
<app-sidebar></app-sidebar>
|
||||
</div>
|
||||
<div class="layout-main-container">
|
||||
<app-bookorbit-announcement></app-bookorbit-announcement>
|
||||
<div class="layout-main">
|
||||
<router-outlet></router-outlet>
|
||||
</div>
|
||||
|
||||
@@ -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
|
||||
],
|
||||
|
||||
@@ -117,17 +117,20 @@
|
||||
</p-popover>
|
||||
</li>
|
||||
|
||||
<li class="topbar-item-relative heart-button topbar-item"
|
||||
[class.heart-button-static]="!supportAnimationEnabled"
|
||||
(click)="openGithubSupportDialog()">
|
||||
@if (supportAnimationEnabled) {
|
||||
<span class="heart-ripple"></span>
|
||||
<span class="heart-ripple heart-ripple-delayed"></span>
|
||||
<span class="heart-orbit heart-orbit-1"></span>
|
||||
<span class="heart-orbit heart-orbit-2"></span>
|
||||
<span class="heart-orbit heart-orbit-3"></span>
|
||||
}
|
||||
<i class="pi pi-heart-fill heart-icon"></i>
|
||||
<li class="topbar-item-relative">
|
||||
<button
|
||||
type="button"
|
||||
class="topbar-item migration-button"
|
||||
(click)="openBookOrbitTransitionDialog()"
|
||||
[pTooltip]="t('migrateToBookOrbit')"
|
||||
tooltipPosition="bottom"
|
||||
[attr.aria-label]="t('migrateToBookOrbit')">
|
||||
<svg class="migration-glyph" viewBox="0 0 24 24" aria-hidden="true">
|
||||
<circle class="migration-orbit" cx="12" cy="12" r="8.25"/>
|
||||
<path class="migration-arrow" d="M7.5 12h8.25m-2.9-3.1 3.1 3.1-3.1 3.1"/>
|
||||
<circle class="migration-origin" cx="6.25" cy="12" r="1.35"/>
|
||||
</svg>
|
||||
</button>
|
||||
</li>
|
||||
<li class="topbar-item-relative">
|
||||
<button
|
||||
@@ -296,11 +299,11 @@
|
||||
</li>
|
||||
<li>
|
||||
<button
|
||||
type="button"
|
||||
class="mobile-menu-item"
|
||||
(click)="openGithubSupportDialog(); mobileMenu.hide()"
|
||||
>
|
||||
<i class="pi pi-thumbs-up topbar-icon"></i>
|
||||
{{ t('supportBookLore') }}
|
||||
(click)="openBookOrbitTransitionDialog(); mobileMenu.hide()">
|
||||
<i class="pi pi-directions-alt topbar-icon"></i>
|
||||
{{ t('migrateToBookOrbit') }}
|
||||
</button>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -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; }
|
||||
|
||||
@@ -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<void>();
|
||||
|
||||
@@ -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']);
|
||||
}
|
||||
|
||||
@@ -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<any>, {
|
||||
openDialog<T>(component: Type<T>, options: DynamicDialogConfig): DynamicDialogRef<T> | 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}`,
|
||||
});
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user