-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
update to we-applet 0.14 and update attachments
Showing
25 changed files
with
714 additions
and
264 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<script lang="ts"> | ||
import "@shoelace-style/shoelace/dist/components/skeleton/skeleton.js"; | ||
import { createEventDispatcher, getContext } from "svelte"; | ||
import type { TalkingStickiesStore } from "./store"; | ||
import type { Board } from "./board"; | ||
import SvgIcon from "./SvgIcon.svelte"; | ||
import { StoreSubscriber } from "@holochain-open-dev/stores"; | ||
import { WeClient } from "@lightningrodlabs/we-applet"; | ||
export let activeBoard: Board | ||
const dispatch = createEventDispatcher() | ||
const { getStore } :any = getContext("store"); | ||
let store: TalkingStickiesStore = getStore(); | ||
let attachmentTypes = Array.from(store.weClient.attachmentTypes.entries()) | ||
export const refresh = () => { | ||
attachmentTypes = Array.from(store.weClient.attachmentTypes.entries()) | ||
} | ||
</script> | ||
|
||
<div> | ||
<h3>Create Bound Item:</h3> | ||
{#each attachmentTypes as [hash, record]} | ||
<div> | ||
{#await store.weClient.appletInfo(hash)} | ||
... | ||
{:then appletInfo} | ||
{#each appletInfo.groupsIds as groupHash} | ||
{#await store.weClient.groupProfile(groupHash)}... | ||
{:then profile} | ||
<sl-icon src={profile.logo_src}></sl-icon> <strong>{profile.name}</strong> | ||
{:catch error} | ||
{error} | ||
{/await} | ||
{/each} | ||
|
||
{appletInfo.appletName}: | ||
{:catch error} | ||
{error} | ||
{/await} | ||
{#each Object.values(record) as aType} | ||
<sl-icon src={aType.icon_src}></sl-icon>{aType.label} | ||
<button class="control" on:click={async ()=>{ | ||
const hrl = await aType.create({hrl:[store.dnaHash,activeBoard.hash],context:""}) | ||
dispatch("add-binding",hrl) | ||
}} > | ||
<SvgIcon icon=faPlus size=12/> | ||
</button> | ||
{/each} | ||
</div> | ||
{/each} | ||
</div> | ||
<style> | ||
</style> |
Oops, something went wrong.