Skip to content

Commit

Permalink
chore: fix gui build with reflection, add example-app to workspace
Browse files Browse the repository at this point in the history
fix images in filesystem gui
  • Loading branch information
marcj committed Oct 23, 2023
1 parent becdeba commit 33ff545
Show file tree
Hide file tree
Showing 8 changed files with 128 additions and 12 deletions.
1 change: 0 additions & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"packages": [
"packages/*",
"!packages/fs",
"!packages/example-app",
"!packages/orm-browser-example",
"!packages/framework-examples"
],
Expand Down
106 changes: 104 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"workspaces": [
"packages/*",
"!packages/fs",
"!packages/example-app",
"!packages/orm-browser-example",
"!packages/framework-examples"
],
Expand Down
1 change: 0 additions & 1 deletion packages/api-console-gui/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
]
},
"reflection": [
"src/api.ts",
"src/app/store.ts"
],
"angularCompilerOptions": {
Expand Down
15 changes: 14 additions & 1 deletion packages/broker/tests/broker.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,20 @@ test('cache3', async () => {
test('bus', async () => {
const broker = new Broker(await adapterFactory());

type Events = { type: 'user-created', id: number } | { type: 'user-deleted', id: number };

const channel = broker.bus<Events>('/events');

await channel.subscribe((event) => {
expect(event).toEqual({ type: 'user-created', id: 2 });
});

await channel.publish({ type: 'user-created', id: 2 });
});

test('bus2', async () => {
const broker = new Broker(await adapterFactory());

type Events = { type: 'user-created', id: number } | { type: 'user-deleted', id: number };
type EventChannel = BrokerBusChannel<Events, '/events'>;

Expand Down Expand Up @@ -113,7 +127,6 @@ test('lock2', async () => {
}
});


test('queue', async () => {
const broker = new Broker(await adapterFactory());

Expand Down
5 changes: 5 additions & 0 deletions packages/example-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
"rxjs": "~7.5.0",
"send": "^0.18.0"
},
"overrides": {
"deepkit-openapi": {
"@deepkit/core": "$@deepkit/core"
}
},
"keywords": [],
"author": "",
"license": "MIT"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,15 +249,15 @@ export class MediaFileDetail implements OnChanges, OnInit {
styleUrls: ['./media-file-thumbnail.component.scss'],
template: `
<img *ngIf="file.type === 'directory'" (contextmenu)="onContextMenu()" (click)="selectFile($event)" alt="Folder icon"
src="/assets/images/icons/folder-icon-dark.png"/>
src="assets/images/icons/folder-icon-dark.png"/>
<img [src]="url" (load)="loaded()" (error)="loaded(true)" [class.image-hidden]="loading || noPreview"
*ngIf="file.type !== 'directory' && url" loading="lazy"
(contextmenu)="onContextMenu()"
(click)="selectFile($event)" alt="File preview"/>
<img class="no-preview" *ngIf="file.type !== 'directory' && noPreview"
(contextmenu)="onContextMenu()"
(click)="selectFile($event)"
src="/assets/images/icons/file-icon-unknown.png"/>
src="assets/images/icons/file-icon-unknown.png"/>
<app-loading-spinner *ngIf="loading && file.type !== 'directory'" (contextmenu)="onContextMenu()"
(click)="selectFile($event)"></app-loading-spinner>
<div class="title" *ngIf="withTitle">
Expand Down Expand Up @@ -390,10 +390,10 @@ export class MediaFileThumbnail implements OnInit, OnDestroy, OnChanges {
</dui-button-groups>
<div class="overlay-scrollbar-small quick-look-content">
<ng-container *ngIf="file">
<img *ngIf="file.type === 'directory'" alt="Folder icon" src="/assets/images/icons/folder-icon-dark.png"/>
<img *ngIf="file.type === 'directory'" alt="Folder icon" src="assets/images/icons/folder-icon-dark.png"/>
<img [src]="preview.data|objectURL:file.mimeType" *ngIf="file.type !== 'directory' && mediaFileCache.getPreview(file.id) as preview" alt="File preview"/>
<img class="no-preview" *ngIf="file.type !== 'directory' && mediaFileCache.getPreview(file.id) === false"
src="/assets/images/icons/file-icon-unknown.png"/>
src="assets/images/icons/file-icon-unknown.png"/>
<app-loading-spinner *ngIf="file.type !== 'directory' && mediaFileCache.isLoading(file.id)"></app-loading-spinner>
</ng-container>
</div>
Expand Down
3 changes: 1 addition & 2 deletions packages/framework-debug-gui/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
},
"reflection": [
"./src/app/state.ts",
"../../node_modules/@deepkit/api-console-gui/src/api.ts",
"../../node_modules/@deepkit/api-console-gui/src/app/store.ts"
"node_modules/@deepkit/api-console-gui/src/app/store.ts"
],
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
Expand Down

0 comments on commit 33ff545

Please sign in to comment.