forked from mirrors/homebox
feat: primary images (#576)
* add support for primary images * fix locked loading state issue * add action to auto-set images
This commit is contained in:
parent
63a966c526
commit
318b8be192
34 changed files with 649 additions and 207 deletions
|
@ -19,4 +19,10 @@ export class ActionsAPI extends BaseAPI {
|
|||
url: route("/actions/ensure-import-refs"),
|
||||
});
|
||||
}
|
||||
|
||||
setPrimaryPhotos() {
|
||||
return this.http.post<void, ActionAmountResult>({
|
||||
url: route("/actions/set-primary-photos"),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,11 +42,13 @@ export interface ItemAttachment {
|
|||
createdAt: Date | string;
|
||||
document: DocumentOut;
|
||||
id: string;
|
||||
primary: boolean;
|
||||
type: string;
|
||||
updatedAt: Date | string;
|
||||
}
|
||||
|
||||
export interface ItemAttachmentUpdate {
|
||||
primary: boolean;
|
||||
title: string;
|
||||
type: string;
|
||||
}
|
||||
|
@ -84,6 +86,7 @@ export interface ItemOut {
|
|||
description: string;
|
||||
fields: ItemField[];
|
||||
id: string;
|
||||
imageId: string;
|
||||
insured: boolean;
|
||||
labels: LabelSummary[];
|
||||
/** Warranty */
|
||||
|
@ -124,6 +127,7 @@ export interface ItemSummary {
|
|||
createdAt: Date | string;
|
||||
description: string;
|
||||
id: string;
|
||||
imageId: string;
|
||||
insured: boolean;
|
||||
labels: LabelSummary[];
|
||||
/** Edges */
|
||||
|
@ -187,7 +191,6 @@ export interface LabelOut {
|
|||
createdAt: Date | string;
|
||||
description: string;
|
||||
id: string;
|
||||
items: ItemSummary[];
|
||||
name: string;
|
||||
updatedAt: Date | string;
|
||||
}
|
||||
|
@ -211,7 +214,6 @@ export interface LocationOut {
|
|||
createdAt: Date | string;
|
||||
description: string;
|
||||
id: string;
|
||||
items: ItemSummary[];
|
||||
name: string;
|
||||
parent: LocationSummary;
|
||||
updatedAt: Date | string;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue