mirror of
https://github.com/Dadido3/Scanyonero.git
synced 2025-06-06 01:10:00 +00:00
- Add ServerWebsocketPacketQueueSplit - Add Split method to Queue - Correct automatic separator insertion for newly ingested documents - Rework UI so that entries have their own set of buttons - Refactor occurrences of "document" to "queueEntry"
54 lines
1002 B
JavaScript
54 lines
1002 B
JavaScript
import { API } from '../api.js';
|
|
import { LitElement, css, html, repeat } from '../vendor/lit-html/lit-all.min.js';
|
|
|
|
export class DocumentQueueEntrySeparator extends LitElement {
|
|
static properties = {
|
|
queueEntry: { type: Object },
|
|
|
|
api: { type: Object, state: true },
|
|
};
|
|
|
|
constructor() {
|
|
super();
|
|
|
|
/** @type {API} */
|
|
this.api;
|
|
/** @type {import('model').APIQueueEntry} */
|
|
this.queueEntry;
|
|
}
|
|
|
|
static styles = css`
|
|
:host {
|
|
width: 100%;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
gap: 8px;
|
|
}
|
|
|
|
#buttons {
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: space-between;
|
|
gap: 8px;
|
|
}
|
|
|
|
button {
|
|
padding: 8px;
|
|
}
|
|
`;
|
|
|
|
// @ts-ignore
|
|
render() {
|
|
return html`
|
|
<div style="flex-grow: 1; align-self: center;">
|
|
<hr>
|
|
</div>
|
|
<div id="buttons">
|
|
<button @click=${e => this.api.queueDelete(this.queueEntry.id)}>Delete</button>
|
|
</div>
|
|
`;
|
|
}
|
|
}
|
|
|
|
customElements.define("document-queue-entry-separator", DocumentQueueEntrySeparator);
|