Skip to content

Commit

Permalink
Minor adjustements
Browse files Browse the repository at this point in the history
  • Loading branch information
ddd-mtl committed Aug 1, 2023
1 parent d5efa3f commit 0289dbb
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 37 deletions.
17 changes: 11 additions & 6 deletions we-applet/demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@
<link href="../dist/styles.css" rel="stylesheet" />
</head>
<body style="margin:0px;background: #9bb791">
<!-- <div id="container"></div> -->

<script type="module">
console.log("Waiting for Shoelace...")
await Promise.allSettled([
customElements.whenDefined('sl-tab'),
//customElements.whenDefined('sl-tab-group')
]);
console.log("Shoelace READY!");
</script>
<script type="module">
//import '@shoelace-style/shoelace/dist/themes/light.css';
import { AppAgentWebsocket, AdminWebsocket, encodeHashToBase64, fakeDnaHash, fakeEntryHash} from '@holochain/client';
import { ProfilesClient } from '@holochain-open-dev/profiles';
import { ProfilesZomeMock } from "@holochain-open-dev/profiles/dist/mocks.js";
Expand Down Expand Up @@ -106,19 +111,19 @@
//console.log("mock agentId", mockProfilesZome.myPubKey);
mockProfilesZome.myPubKey = whereCellId[1];
//console.log("mock agentId", encodeHashToBase64(mockProfilesZome.myPubKey));
mockProfilesZome.create_profile({nickname: "Bobby Joe", fields: {}})
mockProfilesZome.create_profile({nickname: "Alex", fields: {}})

/** */
const renderers = await Applet.appletViews(
appAgentWs,
whereDemoAppletId,
new ProfilesClient(mockProfilesZome, mockProfilesZome.roleName),
// new ProfilesClient(new ProfilesZomeMock()),
mockWeServices,
);
renderers.main(document.body); // container, window.customElements
renderers.main(document.body);
}

/** Run it */
setup();
</script>
</body>
Expand Down
5 changes: 2 additions & 3 deletions we-applet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"build:watch": "tsc -w --preserveWatchOutput",
"devtest": "npm run build && cross-env HC_APP_PORT=$(port) HC_ADMIN_PORT=$(port) BUILD_MODE='dev' concurrently \"npm run start:happ\" \"npm run start:ui\"",
"devtest:ludo": "npm run build && cross-env HC_APP_PORT=$(port) HC_ADMIN_PORT=$(port) BUILD_MODE='dev' concurrently \"npm run start:happ:ludo\" \"npm run start:ui\"",
"start:happ": "RUST_LOG=warn WASM_LOG=debug echo \"pass\" | ../$npm_package_config_bin/hc s --piped -f=$HC_ADMIN_PORT generate ../artifacts/where.happ --run=$HC_APP_PORT -a where-applet network mdns",
"start:happ:ludo": "RUST_LOG=warn WASM_LOG=debug echo \"pass\" | hc s --piped -f=$HC_ADMIN_PORT generate ../artifacts/ludotheque.happ --run=$HC_APP_PORT -a ludotheque-applet network mdns",
"start:happ": "RUST_LOG=warn WASM_LOG=debug echo \"pass\" | ../$npm_package_config_bin/hc s --piped -f=$HC_ADMIN_PORT generate ../artifacts/where.happ --run=$HC_APP_PORT -a where-applet network mem",
"start:happ:ludo": "RUST_LOG=warn WASM_LOG=debug echo \"pass\" | hc s --piped -f=$HC_ADMIN_PORT generate ../artifacts/ludotheque.happ --run=$HC_APP_PORT -a ludotheque-applet network mem",
"start:ui": "concurrently -k --names tsc,dev-server \"npm run build:watch\" \"wds --config web-dev-server.config.mjs\""
},
"devDependencies": {
Expand All @@ -18,7 +18,6 @@
"@rollup/plugin-commonjs": "18.0.0",
"@rollup/plugin-node-resolve": "^13.0.4",
"@rollup/plugin-replace": "^3.0.0",
"@rollup/plugin-typescript": "^8.2.5",
"@web/dev-server": "^0.1.21",
"@web/dev-server-rollup": "^0.3.10",
"babel-plugin-template-html-minifier": "^4.1.0",
Expand Down
3 changes: 2 additions & 1 deletion we-applet/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import nodeResolve from "@rollup/plugin-node-resolve";
import typescript from "@rollup/plugin-typescript";
//import typescript from "@rollup/plugin-typescript";
//import replace from "@rollup/plugin-replace";
//import builtins from "rollup-plugin-node-builtins";
//import globals from "rollup-plugin-node-globals";
Expand Down Expand Up @@ -32,6 +32,7 @@ export default {
{ src: "icon.png", dest: DIST_FOLDER },
{ src: "../webapp/favicon.ico", dest: DIST_FOLDER },
{ src: "../webapp/logo.svg", dest: DIST_FOLDER },
{ src: "../webapp/logo.svg", dest: "demo" },
{ src: "../node_modules/@shoelace-style/shoelace/dist/themes/light.css", dest: DIST_FOLDER, rename: "styles.css" },
],
}),
Expand Down
2 changes: 0 additions & 2 deletions webapp/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
<where-app></where-app>
<script type="module">
import { WhereApp } from "./";
//import { setBasePath } from '@shoelace-style/shoelace/dist/utilities/base-path.js';
//setBasePath('shoelace');
</script>
</body>
</html>
25 changes: 0 additions & 25 deletions webcomponents/src/dialogs/where-play-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1020,31 +1020,6 @@ export class WherePlayDialog extends ZomeElement<PlaysetPerspective, PlaysetZvm>
svgMarkerField.select(svgMarkerField.children.length - 1);
}

// /** */
// static get scopedElements() {
// return {
// 'sl-avatar': SlAvatar,
// 'sl-tab-group': SlTabGroup,
// 'sl-tab': SlTab,
// 'sl-tab-panel': SlTabPanel,
// "mwc-select": Select,
// "mwc-list-item": ListItem,
// "mwc-button": Button,
// "mwc-icon-button": IconButton,
// "mwc-dialog": Dialog,
// "mwc-textfield": TextField,
// "mwc-textarea": TextArea,
// "mwc-formfield": Formfield,
// "mwc-checkbox": Checkbox,
// "mwc-radio": Radio,
// "mwc-tab": Tab,
// "mwc-tab-bar": TabBar,
// "where-emoji-group-dialog" : WhereEmojiGroupDialog,
// "where-emoji-dialog" : WhereEmojiDialog,
// "where-svg-marker-dialog" : WhereSvgMarkerDialog,
// "emoji-picker": customElements.get('emoji-picker'),
// };
// }

/** */
static get styles() {
Expand Down

0 comments on commit 0289dbb

Please sign in to comment.