Skip to content

Commit

Permalink
Merge pull request #19 from yosoyubik/remove-view
Browse files Browse the repository at this point in the history
Remove %canvas-view
  • Loading branch information
yosoyubik authored Jul 18, 2021
2 parents 49c5b23 + 815fd38 commit a4eb95e
Show file tree
Hide file tree
Showing 19 changed files with 177 additions and 376 deletions.
10 changes: 6 additions & 4 deletions ui/src/components/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,14 @@
<svg
width="35"
height="34"
viewBox={`1 1 48 44`}
style={'margin-right: 5px;'}>
viewBox={`0 0 128 128`}
style={'margin-right: 5px;'}
transform={'scale(2.3, 2.3)'}>
>
<path
d="m 5 13 l 6 -10 l 12 0 l 6 10 l -6 10 l -12 0 l 0 0 t 0 0 l 0 0 m 0 0 l -6 -10 m 24 0 h 11 l 6 10 l -6 10 h -11 l -6 -10 m -12 0 l -6 10 l 5 10 l 15 0 l 4 -10 l -6 -10 z"
d="m48 57 6-10 12 0 6 10-6 10-12 0 0 0t0 0l0 0m0 0-6-10m24 0h12l6 10-6 10h-12l-6-10m-12 0-6 10 6-10L66 67zM72 77 84 77 90 87 84 97 72 97 66 87ZM54 67 48 57H36L31 67 36 77 48 77ZM72 57 66 47 72 37 84 37 90 47 84 57 72 57 66 47ZM48 77 54 87 66 87 72 77 66 67 54 67Z"
stroke="white"
stroke-width="0.6"
stroke-width="0.7"
fill="none" />
</svg>
{/if}
Expand Down
17 changes: 10 additions & 7 deletions ui/src/components/MeshPreview.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,19 @@
d="M 8 8 H 8 V 23 H 23 V 8 H 8 M 38 8 H 23 V 23 H 38 V 8 Z M 38 23 M 38 37 M 38 37 H 23 V 23 H 38 Z M 5 23 H 8 Z M 5 8 H 8 Z M 8 5 V 8 Z M 23 5 V 8 Z M 38 5 V 8 Z M 41 8 H 38 Z M 41 23 H 38 Z M 41 37 H 38 Z M 38 40 V 37 Z M 23 40 V 37 Z M 20 37 H 23 Z M 8 23 V 26 Z"
{stroke}
stroke-width={strokeWidth}
{fill}
/>
{fill} />
</svg>
{:else if type === 'hexa'}
<svg {width} {height} viewBox={`1 1 48 44`} style={'margin-right: 5px;'}>
<svg
{width}
{height}
viewBox={`0 0 128 128`}
style={'margin-right: 5px;'}
transform={'scale(1.2, 1.2)'}>
<path
d="m 5 13 l 6 -10 l 12 0 l 6 10 l -6 10 l -12 0 l 0 0 t 0 0 l 0 0 m 0 0 l -6 -10 m 24 0 h 11 l 6 10 l -6 10 h -11 l -6 -10 m -12 0 l -6 10 l 5 10 l 15 0 l 4 -10 l -6 -10 z"
d="m 48 57 l 6 -10 l 12 0 l 6 10 l -6 10 l -12 0 l 0 0 t 0 0 l 0 0 m 0 0 l -6 -10 m 24 0 h 12 l 6 10 l -6 10 h -12 l -6 -10 m -12 0 l -6 10 l 6 -10 L 66 67 z M 72 77 L 84 77 L 90 87 L 84 97 L 72 97 L 66 87 L 72 77 Z M 54 67 L 48 57 H 36 L 31 67 L 36 77 L 48 77 L 54 67 Z M 72 57 L 66 47 L 72 37 L 84 37 L 90 47 L 84 57 L 72 57 L 66 47 Z M 48 77 L 54 87 L 66 87 L 72 77 L 66 67 L 54 67 L 48 77 Z"
{stroke}
stroke-width={strokeWidth}
{fill}
/>
stroke-width={strokeWidth + 0.5}
{fill} />
</svg>
{/if}
8 changes: 4 additions & 4 deletions ui/src/lib/canvasApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,6 @@ export default class CanvasApi extends Api {
return this.sendPoke({ join });
}

private async sendPoke(action: unknown): Promise<unknown> {
return this.action('canvas-view', 'json', action);
}

/**
* Unsubscribes from remote canvas and makes it local
*/
Expand All @@ -95,4 +91,8 @@ export default class CanvasApi extends Api {
};
return this.sendPoke({ unlock });
}

private async sendPoke(action: unknown): Promise<unknown> {
return this.action('canvas', 'json', action);
}
}
5 changes: 2 additions & 3 deletions ui/src/lib/canvasSubscription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
*/
type AppSubscription = [Path, string];
type AppName = 'canvas-view';
const canvasSubscriptions: AppSubscription[] = [['/primary', 'canvas-view']];
const canvasSubscriptions: AppSubscription[] = [['/frontend', 'canvas']];
const appSubscriptions: Record<AppName, AppSubscription[]> = {
'canvas-view': canvasSubscriptions
};
Expand All @@ -26,7 +26,7 @@ export default class CanvasSubscription extends Subscription {
openSubscriptions: any = {};

start(): void {
this.subscribe('/primary', 'canvas-view');
this.subscribe('/frontend', 'canvas');
this.subscribe('/all', 's3-store');
}

Expand Down Expand Up @@ -57,7 +57,6 @@ export default class CanvasSubscription extends Subscription {

// eslint-disable-next-line @typescript-eslint/no-explicit-any
handleEvent(data: { data: any }): void {

const json = data.data;
if (json === null) {
return;
Expand Down
272 changes: 0 additions & 272 deletions urbit/app/canvas-view.hoon

This file was deleted.

Loading

0 comments on commit a4eb95e

Please sign in to comment.