Skip to content

Commit

Permalink
Update to new UIX version
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasstrehle committed Oct 25, 2023
1 parent 4e59e67 commit d27b68c
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/uix-deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ jobs:
- name: Setup Deno
uses: "denoland/setup-deno@v1"
- name: Deploy UIX App
run: "deno run --importmap https://dev.cdn.unyt.org/importmap.json -Aqr https://dev.cdn.unyt.org/uix/run.ts --stage prod --detach "
run: "deno run --importmap https://dev.cdn.unyt.org/uix1/importmap.json -Aqr https://dev.cdn.unyt.org/uix1/run.ts --stage prod --detach "
needs: test
8 changes: 5 additions & 3 deletions common/components/MainPage.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { UIX } from "uix";
import { template } from "uix/html/template.ts";
import { Component } from "uix/components/Component.ts";

import { spawnThreads, spawnThread } from "unyt_core/threads/threads.ts";
import { always, map } from "unyt_core/functions.ts";
import type { AddressData } from "common/TOR-Worker.ts";

@UIX.template(function(this: MainPage) {
@template(function(this: MainPage) {
return <div>
<div id="tor" class={always(()=>this.calculatingAddress?'hidden':'')}>
<h2>Create TOR Address</h2>
Expand Down Expand Up @@ -31,7 +33,7 @@ import type { AddressData } from "common/TOR-Worker.ts";
</div>
</div>
})
export class MainPage extends UIX.BaseComponent {
export class MainPage extends Component {

// reference properties for input values
@property piDigits = 5;
Expand Down
36 changes: 3 additions & 33 deletions deno.json
Original file line number Diff line number Diff line change
@@ -1,41 +1,11 @@
{
"imports": {
"unyt/": "https://cdn.unyt.org/uix-components/",
"unyt_core": "https://dev.cdn.unyt.org/unyt_core/datex.ts",
"uix": "https://dev.cdn.unyt.org/uix/uix.ts",
"unyt_core/": "https://dev.cdn.unyt.org/unyt_core/",
"uix/": "https://dev.cdn.unyt.org/uix/",
"uix_std/": "https://dev.cdn.unyt.org/uix/uix_std/",
"unyt_tests/": "https://dev.cdn.unyt.org/unyt_tests/",
"unyt_web/": "https://dev.cdn.unyt.org/unyt_web/",
"unyt_node/": "https://dev.cdn.unyt.org/unyt_node/",
"unyt_cli/": "https://dev.cdn.unyt.org/unyt_cli/",
"supranet/": "https://portal.unyt.org/ts_module_resolver/",
"uix/jsx-runtime": "https://dev.cdn.unyt.org/uix/jsx-runtime/jsx.ts",
"backend/": "./backend/",
"common/": "./common/",
"frontend/": "./frontend/"
},
"_publicImportMap": "./importmap.json",
"importMap": "./.datex-cache/importmap.lock.json",
"compilerOptions": {
"module": "esnext",
"target": "es2022",
"noImplicitOverride": true,
"removeComments": true,
"preserveConstEnums": true,
"esModuleInterop": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"jsx": "react-jsx",
"jsxImportSource": "uix",
"lib": [
"deno.window",
"dom",
"esnext"
"deno.window"
]
},
"tasks": {
"run": "uix",
"run-dev": "uix -wr",
"run-uixdev": "deno run -Aqr http://localhost:4200/run.ts -wr --import-map importmap.uixdev.json"
}
}
4 changes: 2 additions & 2 deletions frontend/entrypoint.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { UIX } from "uix/uix.ts";
import { MainPage } from "../common/components/MainPage.tsx";
import { Entrypoint } from "uix/html/entrypoints.ts";

export default {
'/': <MainPage/>
} satisfies UIX.Entrypoint;
} satisfies Entrypoint;
12 changes: 12 additions & 0 deletions importmap.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"imports": {
"datex-core-legacy": "https://dev.cdn.unyt.org/unyt_core/datex.ts",
"datex-core-legacy/": "https://dev.cdn.unyt.org/unyt_core/",
"unyt_core": "https://dev.cdn.unyt.org/unyt_core/datex.ts",
"unyt_core/": "https://dev.cdn.unyt.org/unyt_core/",
"uix": "https://dev.cdn.unyt.org/uix1/uix.ts",
"uix/": "https://dev.cdn.unyt.org/uix1/src/",
"uix/jsx-runtime": "https://dev.cdn.unyt.org/uix1/src/jsx-runtime/jsx.ts",
"unyt-tests/": "https://dev.cdn.unyt.org/unyt_tests/"
}
}

0 comments on commit d27b68c

Please sign in to comment.