Skip to content

Commit

Permalink
Fixed ui buidl
Browse files Browse the repository at this point in the history
  • Loading branch information
guillemcordoba committed Nov 7, 2024
1 parent 9248c9a commit b4ee3b9
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 24 deletions.
7 changes: 4 additions & 3 deletions ui/src/context.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { createContext } from "@lit/context";
import { LinkedDevicesStore } from "./linked-devices-store.js";
import { createContext } from '@lit/context';

import { LinkedDevicesStore } from './linked-devices-store.js';

export const linkedDevicesStoreContext = createContext<LinkedDevicesStore>(
"linked_devices/store",
'linked_devices/store',
);
1 change: 1 addition & 0 deletions ui/src/elements/link-devices-recipient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export class LinkDevicesRecipient extends SignalWatcher(LitElement) {
/**
* @internal
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
interval: any;

async firstUpdated() {
Expand Down
2 changes: 2 additions & 0 deletions ui/src/elements/link-devices-requestor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export class LinkDevicesRequestor extends SignalWatcher(LitElement) {
/**
* @internal
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
interval: any;

async firstUpdated() {
Expand Down Expand Up @@ -117,6 +118,7 @@ export class LinkDevicesRequestor extends SignalWatcher(LitElement) {
await this.store.client.prepareLinkDevices(this.requestorpasscode);
}, TTL_CAP_GRANT);
this.successfulRecipient = linkingAgent;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} catch (e: any) {
console.error(e);
if (e.toString().includes('Unauthorized')) {
Expand Down
34 changes: 17 additions & 17 deletions ui/src/elements/linked-devices-context.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import { provide } from "@lit/context";
import { css, html, LitElement } from "lit";
import { customElement, property } from "lit/decorators.js";
import { provide } from '@lit/context';
import { LitElement, css, html } from 'lit';
import { customElement, property } from 'lit/decorators.js';

import { linkedDevicesStoreContext } from "../context.js";
import { LinkedDevicesStore } from "../linked-devices-store.js";
import { linkedDevicesStoreContext } from '../context.js';
import { LinkedDevicesStore } from '../linked-devices-store.js';

@customElement("linked-devices-context")
@customElement('linked-devices-context')
export class LinkedDevicesContext extends LitElement {
@provide({ context: linkedDevicesStoreContext })
@property({ type: Object })
store!: LinkedDevicesStore;
@provide({ context: linkedDevicesStoreContext })
@property({ type: Object })
store!: LinkedDevicesStore;

render() {
return html`<slot></slot>`;
}
render() {
return html`<slot></slot>`;
}

static styles = css`
:host {
display: contents;
}
`;
static styles = css`
:host {
display: contents;
}
`;
}
8 changes: 4 additions & 4 deletions ui/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from "./context.js";
export * from "./linked-devices-client.js";
export * from "./linked-devices-store.js";
export * from "./types.js";
export * from './context.js';
export * from './linked-devices-client.js';
export * from './linked-devices-store.js';
export * from './types.js';

0 comments on commit b4ee3b9

Please sign in to comment.