Implement GitHub Star Prompt via Topbar

This commit is contained in:
aditya.chandel
2025-06-05 15:10:26 -06:00
committed by Aditya Chandel
parent c3f54e0a88
commit 2d77644b8e
5 changed files with 53 additions and 10 deletions
@@ -58,6 +58,14 @@
<p-divider layout="vertical"/>
<div class="flex gap-6">
<li class="relative group overflow-hidden !border-transparent topbar-item" (click)="openGithubSupportDialog()">
<span
style="animation-duration: 2s; background: conic-gradient(from 90deg, #f97316, #f59e0b, #eab308, #84cc16, #22c55e, #10b981, #14a8a6, #06b6d4, #0ea5e9, #3b82f6, #6366f1, #8b5cf6, #a855f7, #d946ef, #ec4899, #f43f5e)"
class="absolute -top-5 -left-5 w-20 h-20 animate-spin">
</span>
<span style="inset: 1px; border-radius: 4px" class="absolute z-2 bg-surface-0 dark:bg-surface-900 transition-all"></span>
<i class="pi pi-thumbs-up z-10" pTooltip="Love BookLore?" tooltipPosition="top"></i>
</li>
<li class="relative">
<button type="button"
class="topbar-item config-item"
@@ -70,6 +78,9 @@
</button>
<app-theme-configurator></app-theme-configurator>
</li>
</div>
<p-divider layout="vertical"/>
<div class="flex gap-6">
<li>
<button class="topbar-item" (click)="openUserProfileDialog()" pTooltip="Profile" tooltipPosition="top">
<i class="pi pi-user text-surface-700 dark:text-surface-100"></i>
@@ -19,6 +19,7 @@ import {BookUploaderComponent} from '../../../utilities/component/book-uploader/
import {AuthService} from '../../../core/service/auth.service';
import {UserService} from '../../../settings/user-management/user.service';
import {UserProfileDialogComponent} from '../../../settings/global-preferences/user-profile-dialog/user-profile-dialog.component';
import {GithubSupportDialog} from '../../../github-support-dialog/github-support-dialog';
@Component({
selector: 'app-topbar',
@@ -72,16 +73,16 @@ export class AppTopBarComponent implements OnDestroy {
this.layoutService.onMenuToggle();
}
onMouseEnter() {
this.showEvents = true;
}
onMouseLeave() {
this.showEvents = false;
}
toggleEventDisplay(): void {
this.showEvents = !this.showEvents;
openGithubSupportDialog(): void {
this.ref = this.dialogService.open(GithubSupportDialog, {
header: 'Support BookLore on GitHub',
modal: true,
closable: true,
style: {
position: 'absolute',
top: '25%',
},
});
}
openLibraryCreatorDialog(): void {