various
This commit is contained in:
1 parent
289dc98042
commit
65177c7553
18 files changed
+152
-199
No files matched your search
@@ -150,5 +150,8 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"cli": {
|
||||
"analytics": false
|
||||
}
|
||||
}
|
||||
@@ -62,6 +62,7 @@ export class NavbarComponent implements OnInit {
|
||||
this.router.navigate(['/search'], {
|
||||
queryParams: { title: searchTerm },
|
||||
});
|
||||
this.toggleSearchPopup(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<li>
|
||||
<a class="has-arrow">
|
||||
<div class="parent-icon">
|
||||
<span class="material-symbols-outlined">explore</span>
|
||||
<i class="material-symbols-outlined">explore</i>
|
||||
</div>
|
||||
<div class="menu-title">Discover</div>
|
||||
</a>
|
||||
@@ -51,7 +51,8 @@
|
||||
<li class="menu-label">Library</li>
|
||||
<li routerLink="/library" routerLinkActive="mm-active">
|
||||
<a>
|
||||
<div class="parent-icon"><span class="material-symbols-outlined">
|
||||
<div class="parent-icon">
|
||||
<span class="material-symbols-outlined">
|
||||
home_storage
|
||||
</span>
|
||||
</div>
|
||||
@@ -60,7 +61,8 @@
|
||||
</li>
|
||||
<li routerLink="/favorit" routerLinkActive="mm-active">
|
||||
<a>
|
||||
<div class="parent-icon"><i class="material-icons-outlined">grade</i>
|
||||
<div class="parent-icon">
|
||||
<i class="material-icons-outlined">grade</i>
|
||||
</div>
|
||||
<div class="menu-title">Favorit</div>
|
||||
</a>
|
||||
@@ -76,7 +78,8 @@
|
||||
</li>
|
||||
<li routerLink="/collections" routerLinkActive="mm-active">
|
||||
<a>
|
||||
<div class="parent-icon"><span class="material-symbols-outlined">
|
||||
<div class="parent-icon">
|
||||
<span class="material-symbols-outlined">
|
||||
format_list_bulleted
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -6,6 +6,7 @@ import { EntryId } from '../../shared/models/entryId.model';
|
||||
import { EntryRating } from '../../shared/models/entry-rating.model';
|
||||
import { environment } from '../../../environments/environment.prod';
|
||||
import { Media } from '../../shared/models/media.model';
|
||||
import { LibraryService } from './library.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
@@ -14,7 +15,10 @@ export class EntryService {
|
||||
private backend_apiUrl = environment.API_URL;
|
||||
private apiAction = 'entries';
|
||||
|
||||
constructor(private http: HttpClient) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private libraryService: LibraryService
|
||||
) {}
|
||||
|
||||
// get entries
|
||||
getEntries(): Observable<Entry[]> {
|
||||
|
||||
@@ -1,52 +1,46 @@
|
||||
import { Injectable, OnInit } from '@angular/core';
|
||||
import { HttpClient, HttpParams } from '@angular/common/http';
|
||||
import { Observable, ReplaySubject, throwError, map, of } from 'rxjs';
|
||||
import { catchError, switchMap, tap } from 'rxjs/operators';
|
||||
import { Observable, throwError, map, of, BehaviorSubject } from 'rxjs';
|
||||
import { catchError, tap } from 'rxjs/operators';
|
||||
import { Entry } from '../../shared/models/entry.model';
|
||||
import { EntryId } from '../../shared/models/entryId.model';
|
||||
import { EntryRating } from '../../shared/models/entry-rating.model';
|
||||
import { environment } from '../../../environments/environment.prod';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class LibraryService implements OnInit {
|
||||
private entries: Entry[] = [];
|
||||
private entriesLoaded = false;
|
||||
private entriesSubject: BehaviorSubject<Entry[]> = new BehaviorSubject<
|
||||
Entry[]
|
||||
>([]);
|
||||
public entries$: Observable<Entry[]> = this.entriesSubject.asObservable();
|
||||
|
||||
// private oldEntries: Entry[] = [];
|
||||
// private entriesLoaded = false;
|
||||
|
||||
private backend_apiUrl = environment.API_URL;
|
||||
private apiAction = 'entries';
|
||||
|
||||
constructor(private http: HttpClient) {
|
||||
this.fetchAllEntries().subscribe(() => {
|
||||
console.log(`Library Service: Loaded ${this.entries.length} entry.`);
|
||||
console.log(
|
||||
`Library Service: Loaded ${
|
||||
this.entriesSubject.getValue().length
|
||||
} entry.`
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit() {}
|
||||
|
||||
getAllEntries(forceFetch: boolean = false): Observable<Entry[]> {
|
||||
if (!forceFetch && this.entriesLoaded) {
|
||||
return of(this.entries);
|
||||
} else {
|
||||
return this.fetchAllEntries();
|
||||
}
|
||||
newGetAllEntries(refresh: boolean = false): Observable<Entry[]> {
|
||||
if (refresh) {
|
||||
this.fetchAllEntries();
|
||||
}
|
||||
|
||||
// public getAllEntries2(forceFetch: boolean = false): ReplaySubject<Entry[]> {
|
||||
// if (this.entriesLoaded && !forceFetch) {
|
||||
// return this.libraryEntriesSubject;
|
||||
// } else {
|
||||
// this.fetchAllEntries(forceFetch);
|
||||
// return this.libraryEntriesSubject;
|
||||
// }
|
||||
// }
|
||||
|
||||
refreshEntries(): Observable<Entry[]> {
|
||||
return this.fetchAllEntries();
|
||||
return this.entries$;
|
||||
}
|
||||
|
||||
fetchData(
|
||||
private fetchData(
|
||||
endPoint: string,
|
||||
params?: { [param: string]: string | number }
|
||||
): Observable<any> {
|
||||
@@ -60,37 +54,14 @@ export class LibraryService implements OnInit {
|
||||
return this.http.get<{ results: any[] }>(endPoint, { params: httpParams });
|
||||
}
|
||||
|
||||
// private fetchAllEntries(forceFetch: boolean = false): Observable<Entry[]> {
|
||||
// const endPoint = `${this.backend_apiUrl}/${this.apiAction}`;
|
||||
|
||||
// // If data is already loaded and not force fetching, immediately return the cached observable.
|
||||
// if (this.entriesLoaded && !forceFetch) {
|
||||
// return this.libraryEntriesSubject.asObservable();
|
||||
// } else {
|
||||
// // Data needs to be (re)fetched.
|
||||
// return this.fetchData(endPoint).pipe(
|
||||
// tap((entries) => {
|
||||
// // Cache the latest entries and mark as loaded.
|
||||
// entries.forEach((entry: Entry) => (entry.isInLibrary = true));
|
||||
// this.libraryEntriesSubject.next(entries);
|
||||
// this.entriesLoaded = true;
|
||||
// }),
|
||||
// catchError((error) => {
|
||||
// console.error('Failed to fetch entries:', error);
|
||||
// this.entriesLoaded = false; // Allow for a retry on subsequent calls.
|
||||
// return throwError(() => new Error('Failed to fetch entries'));
|
||||
// })
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
fetchAllEntries(): Observable<Entry[]> {
|
||||
private fetchAllEntries(): Observable<Entry[]> {
|
||||
return this.http
|
||||
.get<Entry[]>(`${this.backend_apiUrl}/${this.apiAction}`)
|
||||
.pipe(
|
||||
tap((entries) => {
|
||||
this.entries = entries;
|
||||
this.entries.forEach((entry: Entry) => (entry.isInLibrary = true));
|
||||
this.entriesLoaded = true;
|
||||
tap((result) => {
|
||||
result.forEach((entry: Entry) => (entry.isInLibrary = true));
|
||||
|
||||
this.entriesSubject.next(result);
|
||||
}),
|
||||
catchError((error) => {
|
||||
console.error('Failed to fetch entries:', error);
|
||||
@@ -99,30 +70,17 @@ export class LibraryService implements OnInit {
|
||||
);
|
||||
}
|
||||
|
||||
// addEntry(tmdb_id: string, is_tvserie: boolean): Observable<Entry | null> {
|
||||
// return this.getAllEntries().pipe(
|
||||
// switchMap((entries) => {
|
||||
// const existingEntry = entries.find((entry) => {
|
||||
// if (entry.entryId?.tmdb_id) entry.entryId.tmdb_id == tmdb_id;
|
||||
// });
|
||||
// if (existingEntry) {
|
||||
// return of(existingEntry);
|
||||
// } else {
|
||||
// return this.http.post<Entry>(
|
||||
// `${this.backend_apiUrl}/${this.apiAction}`,
|
||||
// {
|
||||
// tmdb_id: tmdb_id,
|
||||
// is_tvserie: is_tvserie,
|
||||
// }
|
||||
// );
|
||||
// }
|
||||
// })
|
||||
// );
|
||||
// }
|
||||
addEntry(tmdb_id: string, is_tvserie: boolean): Observable<Entry | null> {
|
||||
const existingEntry = this.entries.find(
|
||||
(entry) => entry.entryId?.tmdb_id === tmdb_id
|
||||
);
|
||||
refetchEntries(): Observable<Entry[]> {
|
||||
return this.fetchAllEntries();
|
||||
}
|
||||
|
||||
public addEntry(
|
||||
tmdb_id: string,
|
||||
is_tvserie: boolean
|
||||
): Observable<Entry | null> {
|
||||
const existingEntry = this.entriesSubject
|
||||
.getValue()
|
||||
.find((entry) => entry.entryId?.tmdb_id == tmdb_id);
|
||||
if (existingEntry) {
|
||||
return of(existingEntry);
|
||||
} else {
|
||||
@@ -132,105 +90,85 @@ export class LibraryService implements OnInit {
|
||||
is_tvserie: is_tvserie,
|
||||
})
|
||||
.pipe(
|
||||
tap((newEntry) => this.entries.push(newEntry)) // Add new entry to the list
|
||||
tap((newEntry) => {
|
||||
newEntry.isInLibrary = true;
|
||||
|
||||
const currentEntries = this.entriesSubject.getValue();
|
||||
const updatedEntries = [...currentEntries, newEntry];
|
||||
|
||||
this.entriesSubject.next(updatedEntries);
|
||||
}) // Add new entry to the list
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// deleteEntry(id: number): Observable<any> {
|
||||
// // Directly attempt to delete the entry without fetching all entries first.
|
||||
// return this.http.delete(`${this.backend_apiUrl}/${this.apiAction}/${id}`);
|
||||
// }
|
||||
public deleteEntry(id: number): Observable<any> {
|
||||
return this.http
|
||||
.delete(`${this.backend_apiUrl}/${this.apiAction}/${id}`)
|
||||
.pipe(
|
||||
tap(() => {
|
||||
this.entries = this.entries.filter(
|
||||
(entry) => entry.entryId.id !== id
|
||||
const currentEntries = this.entriesSubject.getValue();
|
||||
const updatedEntries = currentEntries.filter(
|
||||
(entry) => entry.entryId.id != id
|
||||
);
|
||||
|
||||
this.entriesSubject.next(updatedEntries);
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
// isInLibrary(tmdb_id: string): Observable<Entry | null> {
|
||||
// return this.getAllEntries().pipe(
|
||||
// switchMap((entries) => {
|
||||
// if (entries.length == 0) return of(null);
|
||||
// const existingEntry = entries.find((entry) => {
|
||||
// // console.log(entry.entryId.tmdb_id, tmdb_id);
|
||||
// return entry.entryId.tmdb_id == tmdb_id;
|
||||
// });
|
||||
public setEntry(entry: Entry) {
|
||||
const currentEntries = this.entriesSubject.getValue();
|
||||
let updatedEntries = currentEntries.filter(
|
||||
(e) => e.id != entry.id
|
||||
);
|
||||
|
||||
updatedEntries.push(entry);
|
||||
|
||||
this.entriesSubject.next(updatedEntries);
|
||||
}
|
||||
|
||||
// if (existingEntry) {
|
||||
// return of(existingEntry);
|
||||
// } else {
|
||||
// return of(null);
|
||||
// }
|
||||
// })
|
||||
// );
|
||||
// }
|
||||
public isInLibrary(tmdb_id: string): Observable<Entry | null> {
|
||||
console.log(`is in library called`);
|
||||
const existingEntry = this.entries.find(
|
||||
// Since entries$ is an Observable, we need to use pipe and map to work with the data
|
||||
return this.entries$.pipe(
|
||||
map((entries: Entry[]) => {
|
||||
const existingEntry = entries.find(
|
||||
(entry) => entry.entryId.tmdb_id == tmdb_id
|
||||
);
|
||||
return of(existingEntry || null);
|
||||
return existingEntry || null;
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
// isInLibrary2(tmdb_id: string): Entry | null {
|
||||
// const entries = this.getAllEntries2();
|
||||
// private mapMovieToEntry(movie: any): Entry {
|
||||
// const entryId = {
|
||||
// tmdb_id: movie.entryId.tmdb_id,
|
||||
// } as EntryId;
|
||||
// const entryRating = {
|
||||
// tmdb_rating: movie.entryRating.tmdb_rating,
|
||||
// } as EntryRating;
|
||||
|
||||
// if (entries.length == 0) return null;
|
||||
// var is_tvseries = movie.release_date == null ? true : false;
|
||||
// var release_date = movie.release_date || movie.first_air_date;
|
||||
|
||||
// entries
|
||||
// .forEach((entry) => {})
|
||||
// return {
|
||||
// entryId: entryId,
|
||||
// entryRating: entryRating,
|
||||
|
||||
// .pipe(
|
||||
// switchMap((entries) => {
|
||||
// const existingEntry = entries.find((entry) => {
|
||||
// // console.log(entry.entryId.tmdb_id, tmdb_id);
|
||||
// return entry.entryId.tmdb_id == tmdb_id;
|
||||
// });
|
||||
// title: movie.title,
|
||||
// original_title: movie.original_title,
|
||||
// release_date: release_date,
|
||||
|
||||
// if (existingEntry) {
|
||||
// return of(existingEntry);
|
||||
// } else {
|
||||
// return of(null);
|
||||
// storyline: movie.storyline,
|
||||
|
||||
// watchlist: movie.storyline,
|
||||
// favorit: false,
|
||||
// hidden: false,
|
||||
|
||||
// is_tvseries: is_tvseries,
|
||||
// status: movie.status,
|
||||
|
||||
// poster_path: movie.poster_path,
|
||||
// } as Entry;
|
||||
// }
|
||||
// })
|
||||
// );
|
||||
// }
|
||||
|
||||
private mapMovieToEntry(movie: any): Entry {
|
||||
const entryId = {
|
||||
tmdb_id: movie.entryId.tmdb_id,
|
||||
} as EntryId;
|
||||
const entryRating = {
|
||||
tmdb_rating: movie.entryRating.tmdb_rating,
|
||||
} as EntryRating;
|
||||
|
||||
var is_tvseries = movie.release_date == null ? true : false;
|
||||
var release_date = movie.release_date || movie.first_air_date;
|
||||
|
||||
return {
|
||||
entryId: entryId,
|
||||
entryRating: entryRating,
|
||||
|
||||
title: movie.title,
|
||||
original_title: movie.original_title,
|
||||
release_date: release_date,
|
||||
|
||||
storyline: movie.storyline,
|
||||
|
||||
watchlist: movie.storyline,
|
||||
favorit: false,
|
||||
hidden: false,
|
||||
|
||||
is_tvseries: is_tvseries,
|
||||
status: movie.status,
|
||||
|
||||
poster_path: movie.poster_path,
|
||||
} as Entry;
|
||||
}
|
||||
}
|
||||
@@ -97,7 +97,7 @@ export class TmdbService {
|
||||
getByKeywordMulti(keyword: string, page: number) {
|
||||
var endPoint = `${this.tmdb_apiUrl}/search/multi?query=${keyword}&page=${page}&api_key=${this.tmdb_apiKey}&language=en-US`;
|
||||
|
||||
return this.fetchdataNoCach(endPoint).pipe(
|
||||
return this.fetchdata(endPoint).pipe(
|
||||
switchMap((response) =>
|
||||
from(response.results).pipe(
|
||||
filter(
|
||||
@@ -105,14 +105,6 @@ export class TmdbService {
|
||||
entry.media_type === 'tv' || entry.media_type === 'movie'
|
||||
),
|
||||
map((entry: any) => this.adaptMovieToEntry(entry)),
|
||||
switchMap((entry: any) =>
|
||||
this.libraryService.isInLibrary(entry.entryId.tmdb_id).pipe(
|
||||
map((inLibrary) => {
|
||||
// console.log(inLibrary);
|
||||
return inLibrary ? inLibrary : entry;
|
||||
})
|
||||
)
|
||||
),
|
||||
toArray(),
|
||||
map((entries) => ({
|
||||
entries: entries,
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
}
|
||||
|
||||
|
||||
/* ! collection */
|
||||
/* ! collection banner */
|
||||
.card-img-overlay:hover h5 {
|
||||
color: var(--shz-blue-default) !important;
|
||||
}
|
||||
@@ -188,6 +188,8 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.card-img-overlay img {
|
||||
.collection-card,
|
||||
.collection-card img {
|
||||
aspect-ratio: 16/9;
|
||||
height: 100%;
|
||||
}
|
||||
@@ -147,6 +147,7 @@ export class EntryPageComponent implements OnInit {
|
||||
if (entryRatings) {
|
||||
// TODO show notification
|
||||
this.entry.entryRating = entryRatings;
|
||||
this.libraryService.setEntry(this.entry);
|
||||
}
|
||||
},
|
||||
error: (error) => {
|
||||
@@ -217,7 +218,10 @@ export class EntryPageComponent implements OnInit {
|
||||
// ? from the watchlist, so now we need to refrech libraryService in order to
|
||||
// ? update the watchlist page
|
||||
if (this.entry.watchlist) {
|
||||
this.libraryService.refreshEntries().subscribe();
|
||||
this.entry.watchlist = false;
|
||||
this.libraryService.setEntry(this.entry);
|
||||
|
||||
// this.libraryService.refetchEntries().subscribe();
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -284,6 +288,7 @@ export class EntryPageComponent implements OnInit {
|
||||
// console.log(`Entry updated: `, entry);
|
||||
this.entry = entry;
|
||||
this.entry.isInLibrary = true;
|
||||
this.libraryService.setEntry(this.entry);
|
||||
},
|
||||
error: (error) => {
|
||||
console.log(`Error updating entry: `, error);
|
||||
@@ -306,6 +311,7 @@ export class EntryPageComponent implements OnInit {
|
||||
// console.log(`Entry updated: `, entry);
|
||||
this.entry = entry;
|
||||
this.entry.isInLibrary = true;
|
||||
this.libraryService.setEntry(this.entry);
|
||||
},
|
||||
error: (error) => {
|
||||
console.log(`Error updating entry: `, error);
|
||||
@@ -718,8 +724,8 @@ export class EntryPageComponent implements OnInit {
|
||||
|
||||
settingsModal() {
|
||||
const dialogRef = this.dialog.open(EntrySettingsModalComponent, {
|
||||
width: '800px',
|
||||
height: '600px',
|
||||
width: '400px',
|
||||
// height: '600px',
|
||||
minHeight: '50%',
|
||||
panelClass: 'media-dialog-container',
|
||||
data: {
|
||||
@@ -734,7 +740,8 @@ export class EntryPageComponent implements OnInit {
|
||||
this.entry.hidden = result.entry.hidden;
|
||||
this.entry.showInCalendar = result.entry.showInCalendar;
|
||||
this.entry.autoSync = result.entry.autoSync;
|
||||
} else {
|
||||
|
||||
this.libraryService.setEntry(this.entry);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ export class HomeComponent implements OnInit {
|
||||
|
||||
getCounts() {
|
||||
// TODO performance: change this to get stats from backend directly
|
||||
this.libraryService.getAllEntries(true).subscribe((entries) => {
|
||||
this.libraryService.newGetAllEntries().subscribe((entries) => {
|
||||
this.counts.favorit = entries.filter((e) => e.favorit).length;
|
||||
this.counts.watchlist = entries.filter((e) => e.watchlist).length;
|
||||
this.counts.movies = entries.filter(
|
||||
|
||||
@@ -68,6 +68,6 @@ a.clear-filter-link {
|
||||
}
|
||||
|
||||
::ng-deep ol,
|
||||
::ng-deep ul {
|
||||
::ng-deep ul:not(.metismenu) {
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
@@ -133,7 +133,7 @@ export class EntriesDisplayComponent
|
||||
|
||||
// uses libraryService to get library all content
|
||||
getEntries(forceFetch: boolean = false) {
|
||||
this.libraryService.getAllEntries(forceFetch).subscribe({
|
||||
this.libraryService.newGetAllEntries().subscribe({
|
||||
next: (entries) => {
|
||||
if (this.displayType == 'favorit') {
|
||||
this.entries = entries.filter((e) => e.favorit);
|
||||
|
||||
@@ -27,7 +27,7 @@ export class FavoritComponent {
|
||||
|
||||
// uses libraryService to get library all content
|
||||
getEntries(forceFetch: boolean = false) {
|
||||
this.libraryService.getAllEntries(forceFetch).subscribe({
|
||||
this.libraryService.newGetAllEntries().subscribe({
|
||||
next: (entries) => {
|
||||
this.entries = entries.filter((e) => e.favorit);
|
||||
|
||||
|
||||
@@ -77,6 +77,6 @@ a.clear-filter-link {
|
||||
}
|
||||
|
||||
::ng-deep ol,
|
||||
::ng-deep ul {
|
||||
::ng-deep ul:not(.metismenu) {
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
@@ -121,7 +121,7 @@ export class LibraryPageComponent implements OnInit, AfterViewInit {
|
||||
|
||||
// ? uses libraryService to get library all entries
|
||||
getEntries(forceFetch: boolean = false) {
|
||||
this.libraryService.getAllEntries(forceFetch).subscribe({
|
||||
this.libraryService.newGetAllEntries().subscribe({
|
||||
next: (entries) => {
|
||||
this.entries = entries.filter((e) => !e.watchlist);
|
||||
this.populateYears();
|
||||
@@ -185,7 +185,7 @@ export class LibraryPageComponent implements OnInit, AfterViewInit {
|
||||
|
||||
// this.filterCriteria();
|
||||
// this.setQueryParameters(); // * update url query
|
||||
console.log(this.filterCriteria);
|
||||
// console.log(this.filterCriteria);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -323,7 +323,7 @@ export class LibraryPageComponent implements OnInit, AfterViewInit {
|
||||
);
|
||||
});
|
||||
|
||||
console.log(temp);
|
||||
// console.log(temp);
|
||||
// ? sort filter
|
||||
temp = await this.sortEntries(temp);
|
||||
|
||||
|
||||
+2
-2
@@ -88,7 +88,7 @@ export class LibraryTableLineComponent {
|
||||
// console.log(`Entry added to library`, entry);
|
||||
entry.isInLibrary = true;
|
||||
this.entry = entry;
|
||||
this.libraryService.refreshEntries().subscribe();
|
||||
this.libraryService.refetchEntries().subscribe();
|
||||
this.onEntryUpdate.emit(this.entry.id);
|
||||
this.lockActions = false;
|
||||
obs.unsubscribe();
|
||||
@@ -126,7 +126,7 @@ export class LibraryTableLineComponent {
|
||||
this.entry.id = 0;
|
||||
this.entry.isInLibrary = false;
|
||||
this.onEntryRemove.emit(this.entry.id);
|
||||
this.libraryService.refreshEntries().subscribe();
|
||||
this.libraryService.refetchEntries().subscribe();
|
||||
// todo entry removed notification
|
||||
},
|
||||
error: (error) => {
|
||||
|
||||
@@ -123,7 +123,7 @@ export class MainCardComponent implements OnInit {
|
||||
// console.log(`Entry added to library`, entry);
|
||||
entry.isInLibrary = true;
|
||||
this.entry = entry;
|
||||
this.libraryService.refreshEntries().subscribe();
|
||||
this.libraryService.refetchEntries().subscribe();
|
||||
this.onEntryUpdate.emit(this.entry.id);
|
||||
this.lockActions = false;
|
||||
obs.unsubscribe();
|
||||
@@ -162,7 +162,7 @@ export class MainCardComponent implements OnInit {
|
||||
this.entry.id = 0;
|
||||
this.entry.isInLibrary = false;
|
||||
this.onEntryRemove.emit(this.entry.id);
|
||||
this.libraryService.refreshEntries().subscribe();
|
||||
this.libraryService.refetchEntries().subscribe();
|
||||
// todo entry removed notification
|
||||
},
|
||||
error: (error) => {
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
"mysql2": "^3.9.3",
|
||||
"ngx-bootstrap": "^12.0.0",
|
||||
"ngx-toastr": "^18.0.0",
|
||||
"optional": "^0.1.4",
|
||||
"p-limit": "^6.1.0",
|
||||
"perfect-scrollbar": "^1.5.5",
|
||||
"primeicons": "^7.0.0",
|
||||
|
||||
Generated
+16
-14
@@ -28,7 +28,7 @@ importers:
|
||||
version: 17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.10))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.10))(@angular/platform-browser@17.3.12(@angular/animations@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.10)))(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.10))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.10)))(rxjs@7.8.1)
|
||||
'@angular/material':
|
||||
specifier: ^17.0.0
|
||||
version: 17.3.10(fziyzy25gol2o7xzraihs72xsu)
|
||||
version: 17.3.10(c3dcdbb03e8441fd1677ed83c13fe4b4)
|
||||
'@angular/platform-browser':
|
||||
specifier: ^17.0.0
|
||||
version: 17.3.12(@angular/animations@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.10)))(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.10))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.10))
|
||||
@@ -59,9 +59,6 @@ importers:
|
||||
axios:
|
||||
specifier: ^1.6.8
|
||||
version: 1.7.5
|
||||
body-parser:
|
||||
specifier: ^1.20.3
|
||||
version: 1.20.3
|
||||
bootstrap:
|
||||
specifier: ^5.3.3
|
||||
version: 5.3.3(@popperjs/core@2.11.8)
|
||||
@@ -74,9 +71,6 @@ importers:
|
||||
flatpickr:
|
||||
specifier: ^4.6.13
|
||||
version: 4.6.13
|
||||
form-data:
|
||||
specifier: ^4.0.0
|
||||
version: 4.0.0
|
||||
html2canvas:
|
||||
specifier: ^1.4.1
|
||||
version: 1.4.1
|
||||
@@ -92,6 +86,9 @@ importers:
|
||||
ngx-toastr:
|
||||
specifier: ^18.0.0
|
||||
version: 18.0.0(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.10))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.10))(@angular/platform-browser@17.3.12(@angular/animations@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.10)))(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.10))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.10)))
|
||||
optional:
|
||||
specifier: ^0.1.4
|
||||
version: 0.1.4
|
||||
p-limit:
|
||||
specifier: ^6.1.0
|
||||
version: 6.1.0
|
||||
@@ -146,7 +143,7 @@ importers:
|
||||
version: 29.4.6
|
||||
electron-builder:
|
||||
specifier: ^24.13.3
|
||||
version: 24.13.3(electron-builder-squirrel-windows@24.13.3(dmg-builder@24.13.3))
|
||||
version: 24.13.3(electron-builder-squirrel-windows@24.13.3)
|
||||
jasmine-core:
|
||||
specifier: ~5.1.0
|
||||
version: 5.1.2
|
||||
@@ -3955,6 +3952,9 @@ packages:
|
||||
resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==}
|
||||
engines: {node: '>=12'}
|
||||
|
||||
optional@0.1.4:
|
||||
resolution: {integrity: sha512-gtvrrCfkE08wKcgXaVwQVgwEQ8vel2dc5DDBn9RLQZ3YtmtkBss6A2HY6BnJH4N/4Ku97Ri/SF8sNWE2225WJw==}
|
||||
|
||||
ora@5.4.1:
|
||||
resolution: {integrity: sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==}
|
||||
engines: {node: '>=10'}
|
||||
@@ -5422,7 +5422,7 @@ snapshots:
|
||||
rxjs: 7.8.1
|
||||
tslib: 2.7.0
|
||||
|
||||
'@angular/material@17.3.10(fziyzy25gol2o7xzraihs72xsu)':
|
||||
'@angular/material@17.3.10(c3dcdbb03e8441fd1677ed83c13fe4b4)':
|
||||
dependencies:
|
||||
'@angular/animations': 17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.10))
|
||||
'@angular/cdk': 17.3.10(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.10))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.10))(rxjs@7.8.1)
|
||||
@@ -7796,7 +7796,7 @@ snapshots:
|
||||
|
||||
app-builder-bin@4.0.0: {}
|
||||
|
||||
app-builder-lib@24.13.3(dmg-builder@24.13.3(electron-builder-squirrel-windows@24.13.3))(electron-builder-squirrel-windows@24.13.3(dmg-builder@24.13.3)):
|
||||
app-builder-lib@24.13.3(dmg-builder@24.13.3)(electron-builder-squirrel-windows@24.13.3):
|
||||
dependencies:
|
||||
'@develar/schema-utils': 2.6.5
|
||||
'@electron/notarize': 2.2.1
|
||||
@@ -8502,7 +8502,7 @@ snapshots:
|
||||
|
||||
dmg-builder@24.13.3(electron-builder-squirrel-windows@24.13.3):
|
||||
dependencies:
|
||||
app-builder-lib: 24.13.3(dmg-builder@24.13.3(electron-builder-squirrel-windows@24.13.3))(electron-builder-squirrel-windows@24.13.3(dmg-builder@24.13.3))
|
||||
app-builder-lib: 24.13.3(dmg-builder@24.13.3)(electron-builder-squirrel-windows@24.13.3)
|
||||
builder-util: 24.13.1
|
||||
builder-util-runtime: 9.2.4
|
||||
fs-extra: 10.1.0
|
||||
@@ -8571,7 +8571,7 @@ snapshots:
|
||||
|
||||
electron-builder-squirrel-windows@24.13.3(dmg-builder@24.13.3):
|
||||
dependencies:
|
||||
app-builder-lib: 24.13.3(dmg-builder@24.13.3(electron-builder-squirrel-windows@24.13.3))(electron-builder-squirrel-windows@24.13.3(dmg-builder@24.13.3))
|
||||
app-builder-lib: 24.13.3(dmg-builder@24.13.3)(electron-builder-squirrel-windows@24.13.3)
|
||||
archiver: 5.3.2
|
||||
builder-util: 24.13.1
|
||||
fs-extra: 10.1.0
|
||||
@@ -8579,9 +8579,9 @@ snapshots:
|
||||
- dmg-builder
|
||||
- supports-color
|
||||
|
||||
electron-builder@24.13.3(electron-builder-squirrel-windows@24.13.3(dmg-builder@24.13.3)):
|
||||
electron-builder@24.13.3(electron-builder-squirrel-windows@24.13.3):
|
||||
dependencies:
|
||||
app-builder-lib: 24.13.3(dmg-builder@24.13.3(electron-builder-squirrel-windows@24.13.3))(electron-builder-squirrel-windows@24.13.3(dmg-builder@24.13.3))
|
||||
app-builder-lib: 24.13.3(dmg-builder@24.13.3)(electron-builder-squirrel-windows@24.13.3)
|
||||
builder-util: 24.13.1
|
||||
builder-util-runtime: 9.2.4
|
||||
chalk: 4.1.2
|
||||
@@ -10010,6 +10010,8 @@ snapshots:
|
||||
is-docker: 2.2.1
|
||||
is-wsl: 2.2.0
|
||||
|
||||
optional@0.1.4: {}
|
||||
|
||||
ora@5.4.1:
|
||||
dependencies:
|
||||
bl: 4.1.0
|
||||
|
||||
Reference in new issue
Block a user