[ui] automatically mark any added "group" as of "group" type
parent
91e64feeec
commit
fd4d80c0b7
|
@ -1,2 +1,5 @@
|
|||
export const BLOB_TYPE_ADDR =
|
||||
"zDtsJrcbKphTkaaxVKSRSpb7L6mXWV2kPwF1VP9WKS7US7t4s";
|
||||
|
||||
export const GROUP_TYPE_ADDR =
|
||||
"zDtsJkSDtg6VMT1WU8Du4Ue1kRtDtXEgodrBbcDruTbVrPctE";
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
import IconButton from "./utils/IconButton.svelte";
|
||||
import type { BrowseContext } from "../util/browse";
|
||||
import { useParams } from "svelte-navigator";
|
||||
import { GROUP_TYPE_ADDR } from "upend/constants";
|
||||
const params = useParams();
|
||||
|
||||
export let address: string;
|
||||
|
@ -153,14 +154,24 @@
|
|||
await fetch(`api/obj`, {
|
||||
method: "PUT",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({
|
||||
entity: String(groupToAdd.c),
|
||||
attribute: "HAS",
|
||||
value: {
|
||||
t: "Address",
|
||||
c: address,
|
||||
body: JSON.stringify([
|
||||
{
|
||||
entity: String(groupToAdd.c),
|
||||
attribute: "HAS",
|
||||
value: {
|
||||
t: "Address",
|
||||
c: address,
|
||||
},
|
||||
},
|
||||
}),
|
||||
{
|
||||
entity: String(groupToAdd.c),
|
||||
attribute: "IS",
|
||||
value: {
|
||||
t: "Address",
|
||||
c: GROUP_TYPE_ADDR,
|
||||
},
|
||||
},
|
||||
]),
|
||||
});
|
||||
revalidate();
|
||||
groupToAdd = undefined;
|
||||
|
|
|
@ -4669,8 +4669,8 @@ __metadata:
|
|||
|
||||
"upend@file:../tools/upend_js::locator=svelte-app%40workspace%3A.":
|
||||
version: 0.0.1
|
||||
resolution: "upend@file:../tools/upend_js#../tools/upend_js::hash=7db405&locator=svelte-app%40workspace%3A."
|
||||
checksum: 2cf640ebac60141df688cafb62b3a14bc94edc797b701037cac00fc7216fe064067857ae13f6baf1d339afd34ad0666d8dc2fdb2e84aa6ac1e0968c0bd938eea
|
||||
resolution: "upend@file:../tools/upend_js#../tools/upend_js::hash=fd602e&locator=svelte-app%40workspace%3A."
|
||||
checksum: 14cc9cfb6f04a85ec4715b3bbb6b5636b898ccb1ac2418cae9d5e8c00ec25f6245e5be1f8f831c8f24aa3cc0ecb97942c1a569a2fdee104383beb173b40daf0d
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
|
Loading…
Reference in New Issue