on main help sign in
fix some bugs in star chart and add locked stars tab
commit15920bd33f641e3ea6d1d17a782577e6c7176141 authorJohn Hyde <johnhydefour@gmail.com> dateTue 13 Dec 2022, 15:12 (4 years ago) parent2d2698c
19 files changed+359−168
README.md+1 base-desk/mar/kelvin.hoon+28 desk/app/astrolabe.hoon+12−64 desk/desk.seal+7 desk/lib/astrolabe.hoon+1−2 desk/lib/state.hoon+23 desk/mar/seal.hoon+12 desk/sur/astrolabe.hoon+43−1 desk/tests/lib/state.hoon+59 ui/scraps/scry thoughts−5 ui/src/components/ShipListing.svelte+3−5 ui/src/components/StarChart.svelte+6−1 ui/src/components/search/SearchBar.svelte+19−9 ui/src/components/ship_view/AzimuthDetails.svelte+92 ui/src/components/ship_view/ShipChildrenTabs.svelte+35−4 ui/src/components/ship_view/ShipView.svelte+3−75 ui/src/lib/api.ts+8 ui/src/routes/Home.svelte+4−2 ui/src/styles/tailwind-output.css+3
README.md+1
@@ -38,6 +38,7 @@ Regardless of what you run to develop, Vite will hot-reload code changes as you
38384. Bump the `version` in `desk.docket-0`.
39393. Install the desk
4040 1. From the `ui` folder: `npm run install:desk`
41+ 2. (first time only, on dev ship): `|install our %astrolabe`
4142 2. From the distribution ship's dojo: `:treaty|unpublish %astrolabe`
4243 2. From middleman or distribution ship's dojo: `|commit %astrolabe`
4344 3. (if using a comet as a middleman) `|public %astrolabe`
base-desk/mar/kelvin.hoonnew file+28
@@ -0,0 +1,28 @@
1+|_ kal=waft:clay
2+++ grow
3+ |%
4+ ++ mime `^mime`[/text/x-kelvin (as-octs:mimes:html hoon)]
5+ ++ noun kal
6+ ++ hoon
7+ %+ rap 3
8+ %+ turn
9+ %+ sort
10+ ~(tap in (waft-to-wefts:clay kal))
11+ |= [a=weft b=weft]
12+ ?: =(lal.a lal.b)
13+ (gte num.a num.b)
14+ (gte lal.a lal.b)
15+ |= =weft
16+ (rap 3 '[%' (scot %tas lal.weft) ' ' (scot %ud num.weft) ']\0a' ~)
17+ ::
18+ ++ txt (to-wain:format hoon)
19+ --
20+++ grab
21+ |%
22+ ++ noun waft:clay
23+ ++ mime
24+ |= [=mite len=@ud tex=@]
25+ (cord-to-waft:clay tex)
26+ --
27+++ grad %noun
28+--
desk/app/astrolabe.hoon+12−64
@@ -1,42 +1,12 @@
11/- *astrolabe
2−/+ *astrolabe, *search, *mip, naive, default-agent, dbug, agentio
2+/+ *astrolabe, *search, slib=state
3+/+ *mip, naive, default-agent, dbug, agentio
34/$ udon-to-docu %udon %docu
45|%
5−+$ versioned-state
6− $% state-0
7− state-1
8− state-2
9− state-3
10− ==
11−+$ state-0
12− $: %0
13− spa=spawned
14− ==
15−+$ state-1
16− $: %1
17− fropoints-1
18− ==
19−+$ state-2
20− $: %2
21− spam=spawn-mip
22− fropoints-1
23− ==
24−+$ state-3
25− $: %3
26− prev-spo=(map ship ship) :: so we know who the old sponsor was when sponsor changes
27− spam=spawn-mip
28− fropoints-1
29− ==
30−::
31−+$ fropoints-1
32− $: fopoints=opoints :: forward ordered points
33− ropoints=opoints :: reversed ordered points, e.g. .~palnet-sampel
34− ==
35−+$ spawned (jug ship ship)
366+$ card card:agent:gall
377--
388%- agent:dbug
39−=| state-3
9+=| state-latest
4010=* state -
4111^- agent:gall
4212=<
@@ -55,15 +25,15 @@
5525 |= old-state=vase
5626 ^- (quip card _this)
5727 =/ old !<(versioned-state old-state)
58− =^ cards-01 old
59− ?. ?=(?(%0 %1 %2) -.old) `old
28+ =/ [cards-01=(list card) new=state-latest]
29+ ?. ?=(?(%0 %1 %2 %3) -.old) `old
6030 (on-naive-state:hc get-nas:hc)
61− ?> ?=(%3 -.old)
31+ ?> ?=(%4 -.new)
6232 =/ cards=(list card)
6333 =/ ug-vase !>([/astrolabe '/apps/astrolabe/#'])
6434 [%pass /monkey-ug %agent [our.bowl %monkey] %poke [%bind-ug ug-vase]]~
6535 =. cards (weld cards-01 cards)
66− [cards this(state old)]
36+ [cards this(state new)]
6737++ on-poke on-poke:def
6838++ on-watch on-watch:def
6939++ on-leave on-leave:def
@@ -72,11 +42,14 @@
7242 |= =path
7343 ^- (unit (unit cage))
7444 ?+ path (on-peek:def path)
45+ [%x %nop ~]
46+ ``noun+!>(~)
7547 [%x %point @ ~]
7648 ``astrolabe-point+!>((get-point:hc &3.path))
7749 [%x %point @ %spawned ?(~ [spawned-filter ~])]
7850 =/ =ship `@p`(slav %p &3.path)
79− =/ arg ?~(t.t.t.t.path %all i.t.t.t.t.path)
51+ =/ filter t.t.t.t.path
52+ =/ arg ?~(filter %all -.filter)
8053 ``astrolabe-point-set+!>((get-spawned-points:hc ship arg))
8154 [%x %search %patp @ ?(~ [%narrow ~])]
8255 =/ =search-text (trip &4.path)
@@ -158,32 +131,7 @@
158131 |= [child=ship nas=^state:naive]
159132 ^- _state
160133 =/ =npoint (get-npoint-from-nas child nas)
161− =/ parent (^sein:title child)
162− ?: =(parent child) state
163− ?: (is-npoint-locked npoint) state
164− =/ pdata (pdata:smel (pmeta:smel child npoint) ~)
165− =* spo sponsor.net.npoint
166− =/ spo-not-par &(has.spo !=(parent who.spo))
167− =? state spo-not-par
168− =/ prev (~(get by prev-spo) child)
169− =? spam &(?=(^ prev) !=(u.prev who.spo))
170− (~(del bi spam) u.prev child)
171− =. prev-spo
172− %+ ~(put by prev-spo)
173− child
174− who.spo
175− =. spam
176− %^ ~(put bi-meta spam)
177− who.spo
178− child
179− pdata
180− state
181− =. spam
182− %^ ~(put bi-meta spam)
183− parent
184− child
185− pdata
186− state
134+ (put-in-spawn-mip:slib child npoint state)
187135::
188136++ on-naive-state
189137 |= nas=^state:naive
desk/desk.sealnew file+7
@@ -0,0 +1,7 @@
1+:- :~ [%watch & %azimuth /event]
2+ [%reads %gall `%x `%azimuth /]
3+ [%reads %clay `%u ~ /]
4+ [%reads %clay `%x ~ /]
5+ [%reads %ames `%x ~ /peers]
6+ ==
7+~
desk/lib/astrolabe.hoon+1−2
@@ -1,5 +1,5 @@
11/- sur=astrolabe
2−/+ azimuth, naive, mip
2+/+ azimuth, naive
33=< [sur .]
44=, sur
55|%
@@ -25,7 +25,6 @@
2525 ^- ?
2626 (rev-f lte a b)
2727::
28−+$ opoints (tree [@ @]) :: ordered points [ship ~]
2928++ ors ((on @q @) rpor)
3029++ or-meta ((on @p tape) por:naive)
3130++ bi-meta
desk/lib/state.hoonnew file+23
@@ -0,0 +1,23 @@
1+/- *astrolabe
2+/+ *astrolabe
3+|%
4+++ put-in-spawn-mip
5+ |= [child=ship =npoint s=state-latest]
6+ ^- _s
7+ =/ parent (^sein:title child)
8+ ?: =(parent child) s
9+ ?: (is-npoint-locked npoint) s
10+ =/ pdata (pdata:smel (pmeta:smel child npoint) ~)
11+ =* spo sponsor.net.npoint
12+ =/ prev (~(gut by prev-spo.s) child parent)
13+ =/ unsponsored-state
14+ =. prev-spo.s (~(del by prev-spo.s) child)
15+ =. spam.s (~(del bi spam.s) prev child)
16+ s
17+ ?. has.spo unsponsored-state
18+ =? s !=(prev who.spo)
19+ unsponsored-state
20+ =. prev-spo.s (~(put by prev-spo.s) child who.spo)
21+ =. spam.s (~(put bi spam.s) who.spo child pdata)
22+ s
23+--
desk/mar/seal.hoonnew file+12
@@ -0,0 +1,12 @@
1+|_ dat=@
2+++ grow
3+ |%
4+ ++ mime [/text (as-octs:mimes:html dat)]
5+ --
6+++ grab
7+ |%
8+ ++ mime |=([p=mite q=octs] q.q)
9+ ++ noun @
10+ --
11+++ grad %mime
12+--
desk/sur/astrolabe.hoon+43−1
@@ -1,5 +1,48 @@
11/+ naive, *mip
22|%
3++$ versioned-state
4+ $% state-0
5+ state-1
6+ state-2
7+ state-3
8+ state-4
9+ ==
10++$ state-latest state-4
11++$ state-0
12+ $: %0
13+ spa=spawned
14+ ==
15++$ state-1
16+ $: %1
17+ fropoints-1
18+ ==
19++$ state-2
20+ $: %2
21+ spam=spawn-mip
22+ fropoints-1
23+ ==
24++$ state-3
25+ $: %3
26+ prev-spo=(map ship ship) :: so we know who the old sponsor was when sponsor changes
27+ spam=spawn-mip
28+ fropoints-1
29+ ==
30++$ state-4
31+ $: %4
32+ bump=@ud :: bump to update state without changing the type
33+ prev-spo=(map ship ship) :: so we know who the old sponsor was when sponsor changes
34+ spam=spawn-mip
35+ fropoints-1
36+ ==
37+::
38++$ fropoints-1
39+ $: fopoints=opoints :: forward ordered points
40+ ropoints=opoints :: reversed ordered points, e.g. .~palnet-sampel
41+ ==
42++$ spawned (jug ship ship)
43++$ spawn-mip (mip ship ship tape)
44++$ opoints (tree [@ @]) :: ordered points [ship ~]
45+::
346+$ npoint point:naive
447++ unpoint (unit npoint)
548+$ point
@@ -11,6 +54,5 @@
1154 ==
1255+$ spawned-filter ?(%all %locked %unlocked)
1356::
14−+$ spawn-mip (mip ship ship tape)
1557::
1658--
desk/tests/lib/state.hoonnew file+59
@@ -0,0 +1,59 @@
1+/- *astrolabe
2+/+ *astrolabe, *state, *test
3+|%
4+++ test-put-in-spawn-mip
5+ =| state=state-latest
6+ =/ moved-to-bus=npoint
7+ =< .(who.sponsor.net ~bus)
8+ *npoint
9+ =/ moved-to-hec=npoint
10+ =< .(who.sponsor.net ~hec)
11+ *npoint
12+ ;: weld
13+ %+ expect-eq
14+ !> :-
15+ `~zod :: new prev-spo
16+ %.y :: spawn-mip has something under ~zod
17+ !> =- :-
18+ (~(get by prev-spo) ~marzod)
19+ (~(has by spam) ~zod)
20+ (put-in-spawn-mip ~marzod *npoint state)
21+ ::
22+ %+ expect-eq
23+ !> :*
24+ `~hec :: new prev-spo
25+ %.n :: nothing under ~zod
26+ %.n :: nothing under ~bus
27+ %.y :: something under ~hec
28+ ==
29+ !>
30+ =. state (put-in-spawn-mip ~marzod *npoint state)
31+ =. state (put-in-spawn-mip ~marzod moved-to-bus state)
32+ =+ (put-in-spawn-mip ~marzod moved-to-hec state)
33+ :*
34+ (~(get by prev-spo) ~marzod)
35+ (~(has by spam) ~zod)
36+ (~(has by spam) ~bus)
37+ (~(has by spam) ~hec)
38+ ==
39+ ::
40+ %+ expect-eq
41+ !> :*
42+ `~zod :: new prev-spo
43+ %.y :: something under ~zod
44+ %.n :: nothing under ~bus
45+ %.n :: something under ~hec
46+ ==
47+ !>
48+ =. state (put-in-spawn-mip ~marzod *npoint state)
49+ =. state (put-in-spawn-mip ~marzod moved-to-bus state)
50+ =. state (put-in-spawn-mip ~marzod moved-to-hec state)
51+ =+ (put-in-spawn-mip ~marzod *npoint state)
52+ :*
53+ (~(get by prev-spo) ~marzod)
54+ (~(has by spam) ~zod)
55+ (~(has by spam) ~bus)
56+ (~(has by spam) ~hec)
57+ ==
58+ ==
59+--
ui/scraps/scry thoughtsdeleted−5
@@ -1,5 +0,0 @@
1−:: get list of group ids
2−.^((set [ship term]) %gy /(scot %p our)/group-store/(scot %da now)/groups)
3−.^(* %gx /(scot %p our)/group-store/(scot %da now)/groups/ship/~poster-hoster-midlev-mindyr/astrolabe/noun)
4−
5−web+urbitgraph://astrolabe/ship/~midlev-mindyr
ui/src/components/ShipListing.svelte+3−5
@@ -12,8 +12,9 @@
1212 export let differentiateContacts = false;
1313
1414 $: patp = normalizeId(ship.patp);
15+ $: contact = $store.contacts[ship.patp];
1516 $: borderClass = differentiateContacts ? (
16− 'border-l-8 ' + (Object.keys(ship).length > 1 ? 'border-gold' : 'border-gray-300')
17+ 'border-l-8 ' + (contact ? 'border-gold' : 'border-gray-300')
1718 ) : '';
1819
1920 function handleClick() {
@@ -29,16 +30,13 @@ on:click
2930>
3031 <div class="flex p-4 items-center gap-x-4">
3132 <Sigil {patp} size={48} useNew noShrink />
32− <!-- {#if ship.avatar}
33− <img src={ship.avatar} class="h-12 w-12 mr-4" />
34− {/if} -->
3533 <p class="break-words grow">
3634 <span class="align-middle mr-1">
3735 {patp}
3836 </span>
3937 <PalStatusIndicator status={getPalStatus($store.pals, patp)} class="inline" />
4038 <br/>
41− {ship.nickname ? `(${ship.nickname})` : ''}
39+ {contact?.nickname ? `(${contact.nickname})` : ''}
4240 </p>
4341 </div>
4442</div>
ui/src/components/StarChart.svelte+6−1
@@ -23,6 +23,7 @@
2323 let firstRender = true;
2424 let mouseDown = false;
2525 let isDragging = false;
26+ let stoppedDragging = Date.now();
2627
2728 function sigma(container: HTMLElement, params: any = {}) {
2829 try {
@@ -38,7 +39,9 @@
3839 });
3940
4041 s.on('clickNode', ({ node }) => {
41− push(linkToShip(node));
42+ if (!isDragging && 100 < Date.now() - stoppedDragging) {
43+ push(linkToShip(node));
44+ }
4245 });
4346 s.on('afterRender', () => {
4447 if (firstRender) {
@@ -58,6 +61,8 @@
5861 mc.on('mouseup', () => {
5962 if (!isDragging) {
6063 clearHighlight();
64+ } else {
65+ stoppedDragging = Date.now();
6166 }
6267 mouseDown = false;
6368 isDragging = false;
ui/src/components/search/SearchBar.svelte+19−9
@@ -12,8 +12,16 @@
1212 export let sigilQuery: SigilQuery = new SigilQuery('planet');
1313 sigilQuery.urlString = search;
1414 export let searchMode: ('patp' | 'sigil') = 'patp';
15− export let placeholderText = "Search by @p or #. '*' matches any character";
15+ export let allowSigilSearch: boolean = true;
16+ let defaultPlaceholderText = "Search by @p or #. '*' matches any character";
17+ export let placeholderText = defaultPlaceholderText;
1618
19+ $: {
20+ placeholderText = placeholderText ? placeholderText : defaultPlaceholderText;
21+ }
22+ $: {
23+ searchMode = allowSigilSearch ? searchMode : 'patp';
24+ }
1725 $: showSigilInput = searchMode == 'sigil';
1826
1927 let bouncySearch: string = search;
@@ -113,13 +121,15 @@
113121 value={search}
114122 autofocus
115123 />
116− <button
117− on:click={openSigilInput}
118− class="absolute top-1 right-1 w-8 h-8 {buttonClasses}"
119− >
120− <Symbol components={'gci.lvf.lhf.lbhb.atrf4.al3.cbl2lf.cbl2mb'.split('.')} size={32}
121− altBgColor="transparent"
122− />
123− </button>
124+ {#if allowSigilSearch}
125+ <button
126+ on:click={openSigilInput}
127+ class="absolute top-1 right-1 w-8 h-8 {buttonClasses}"
128+ >
129+ <Symbol components={'gci.lvf.lhf.lbhb.atrf4.al3.cbl2lf.cbl2mb'.split('.')} size={32}
130+ altBgColor="transparent"
131+ />
132+ </button>
133+ {/if}
124134 {/if}
125135</div>
ui/src/components/ship_view/AzimuthDetails.sveltenew file+92
@@ -0,0 +1,92 @@
1+<script lang="ts">
2+ import { clan, patp2dec } from 'urbit-ob';
3+ import { getPoint, getSpawnedPoints } from 'lib/api';
4+ import { generateParentChain, processPointInfo } from 'lib/ship';
5+ import TooltipAndDocLink from '@/common/TooltipAndDocLink.svelte';
6+ import EthAddressLink from '@/common/EthAddressLink.svelte';
7+ import ShipChain from './ShipChain.svelte';
8+
9+ export let patp: string;
10+ export let pointInfo: any = {};
11+
12+
13+ $: shipClass = clan(patp);
14+ $: azPoint = ['galaxy', 'star', 'planet'].includes(shipClass);
15+</script>
16+
17+{#if azPoint}
18+ {#if shipClass !== 'galaxy'}
19+ <p>
20+ {#if pointInfo.sponsorChain && pointInfo.sponsorChain.length > 0}
21+ <p>
22+ {pointInfo.sponsorChain.length === 1 ? 'Sponsor:' : 'Sponsor Chain:'}
23+ <ShipChain shipChain={pointInfo.sponsorChain}></ShipChain>
24+ </p>
25+ {:else}
26+ Unsponsored
27+ {/if}
28+ </p>
29+ {/if}
30+ <p>
31+ <TooltipAndDocLink
32+ text="Number of times this ship's keys have been set. Must be at least 1 to use the network."
33+ doc="keys"
34+ class="inline"
35+ >
36+ Key Revision:
37+ {pointInfo.life}
38+ </TooltipAndDocLink>
39+ </p>
40+ <p>
41+ <TooltipAndDocLink
42+ text="Number of times this ship has breached."
43+ doc="keys"
44+ class="inline"
45+ >
46+ Factory Resets:
47+ {pointInfo.rift}
48+ </TooltipAndDocLink>
49+ </p>
50+ {#if pointInfo.proxies}
51+ <p>
52+ <span>
53+ Owner:
54+ <EthAddressLink address={pointInfo.proxies.owner.address} />
55+ </span>
56+ </p>
57+ <p>
58+ <span>
59+ Management Proxy:
60+ <EthAddressLink address={pointInfo.proxies['management-proxy'].address}>
61+ <span class="text-gray-700">not set</span>
62+ </EthAddressLink>
63+ </span>
64+ </p>
65+ <p>
66+ <span>
67+ Spawn Proxy:
68+ <EthAddressLink address={pointInfo.proxies['spawn-proxy'].address}>
69+ <span class="text-gray-700">not set</span>
70+ </EthAddressLink>
71+ </span>
72+ </p>
73+ <p>
74+ <span>
75+ Transfer Proxy:
76+ <EthAddressLink address={pointInfo.proxies['transfer-proxy'].address}>
77+ <span class="text-gray-700">not set</span>
78+ </EthAddressLink>
79+ </span>
80+ </p>
81+ {#if shipClass === 'galaxy'}
82+ <p>
83+ <span>
84+ Voting Proxy:
85+ <EthAddressLink address={pointInfo.proxies['voting-proxy'].address}>
86+ [not set]
87+ </EthAddressLink>
88+ </span>
89+ </p>
90+ {/if}
91+ {/if}
92+{/if}
ui/src/components/ship_view/ShipChildrenTabs.svelte+35−4
@@ -2,7 +2,7 @@
22 import { clan } from 'urbit-ob';
33
44 import { normalizeId, filterIdsForChildMoons } from 'lib/id';
5− import { getSpawnedPoints } from 'lib/api';
5+ import { getSpawnedPoints, getUnlockedSpawnedPoints, getLockedSpawnedPoints } from 'lib/api';
66 import store from 'stores/store';
77 import ShipListings from '@/ShipListings.svelte';
88
@@ -11,7 +11,10 @@
1111
1212 let rawSpawnedPointsPromise: any;
1313 let rawSpawnedPoints: any = null;
14+ let rawLockedPointsPromise: any;
15+ let rawLockedPoints: any = null;
1416 let spawnedPoints: string[] = [];
17+ let lockedPoints: string[] = [];
1518
1619 $: shipClass = clan(patp);
1720 $: azPoint = ['galaxy', 'star', 'planet'].includes(shipClass);
@@ -19,8 +22,19 @@
1922 $: spawnableClassPlural = !canSpawnPoints ? '' : (shipClass === 'galaxy' ? 'Star' : 'Planet');
2023 $: {
2124 rawSpawnedPoints = null;
25+ rawLockedPoints = null;
2226 if (canSpawnPoints) {
23− rawSpawnedPointsPromise = getSpawnedPoints(patp);
27+ let galaxy = shipClass === 'galaxy';
28+ let getSpawnedPointsFunc = galaxy ? getUnlockedSpawnedPoints : getSpawnedPoints;
29+ if (galaxy) {
30+ rawLockedPointsPromise = getLockedSpawnedPoints(patp);
31+ rawLockedPointsPromise.then((info) => {
32+ rawLockedPoints = info;
33+ }).catch((error) => {
34+ rawLockedPoints = { error };
35+ });
36+ }
37+ rawSpawnedPointsPromise = getSpawnedPointsFunc(patp);
2438 rawSpawnedPointsPromise.then((info) => {
2539 rawSpawnedPoints = info;
2640 }).catch((error) => {
@@ -34,6 +48,12 @@
3448 spawnedPoints = rawSpawnedPoints?.points.map(patpToShip);
3549 }
3650 }
51+ $: {
52+ lockedPoints = [];
53+ if (rawLockedPoints?.points) {
54+ lockedPoints = rawLockedPoints?.points.map(patpToShip);
55+ }
56+ }
3757 $: trueSpawnedCount = spawnedCount || spawnedPoints.length;
3858 $: spawnedTab = {
3959 name: 'Spawned',
@@ -42,6 +62,13 @@
4262 points: spawnedPoints,
4363 count: trueSpawnedCount,
4464 };
65+ $: lockedTab = {
66+ name: 'Locked',
67+ plural: 'Locked ' + spawnableClassPlural + (lockedPoints.length == 1 ? '' : 's'),
68+ promise: rawLockedPointsPromise,
69+ points: lockedPoints,
70+ count: lockedPoints.length,
71+ };
4572 $: moons = filterIdsForChildMoons($store.peers, patp).map(patpToShip);
4673 $: moonsTab = {
4774 name: 'Moons',
@@ -57,6 +84,9 @@
5784 if (spawnedCount !== undefined || spawnedPoints.length > 0) {
5885 tabs.push(spawnedTab);
5986 }
87+ if (lockedPoints.length > 0) {
88+ tabs.push(lockedTab);
89+ }
6090 if (azPoint) {
6191 tabs.push(moonsTab);
6292 }
@@ -82,8 +112,8 @@
82112 </div>
83113 {/if}
84114 {#if tab}
85− <div class="mt-2">
86− <h3 class="text-lg">
115+ <div>
116+ <h3 class="text-lg m-2">
87117 {#if tab.count}
88118 {tab.count} {tab.plural}:
89119 {:else}
@@ -97,6 +127,7 @@
97127 <ShipListings
98128 ships={tab.points}
99129 linkToShips
130+ differentiateContacts
100131 />
101132 {/await}
102133 </div>
ui/src/components/ship_view/ShipView.svelte+3−75
@@ -13,6 +13,7 @@
1313 import LoadingSpinner from '@/common/LoadingSpinner.svelte';
1414 import CollapsibleContent from '@/CollapsibleContent.svelte';
1515 import ShipChain from './ShipChain.svelte';
16+ import AzimuthDetails from './AzimuthDetails.svelte';
1617 import ShipChildrenTabs from './ShipChildrenTabs.svelte';
1718 import ProfileShipViewExtension from '~/components/extensions/ProfileShipViewExtension.svelte';
1819 import PalsShipViewExtension from '@/pals/PalsShipViewExtension.svelte';
@@ -113,81 +114,8 @@
113114 {#await rawPointInfoPromise}
114115 <LoadingSpinner spinnerClass="text-black" />
115116 {:then}
116− {#if shipClass !== 'galaxy'}
117− <p>
118− {#if pointInfo.sponsorChain && pointInfo.sponsorChain.length > 0}
119− <p>
120− {pointInfo.sponsorChain.length === 1 ? 'Sponsor:' : 'Sponsor Chain:'}
121− <ShipChain shipChain={pointInfo.sponsorChain}></ShipChain>
122− </p>
123− {:else}
124− Unsponsored
125− {/if}
126− </p>
127− {/if}
128− <p>
129− <TooltipAndDocLink
130− text="Number of times this ship's keys have been set. Must be at least 1 to use the network."
131− doc="keys"
132− class="inline"
133− >
134− Key Revision:
135− {pointInfo.life}
136− </TooltipAndDocLink>
137− </p>
138− <p>
139− <TooltipAndDocLink
140− text="Number of times this ship has breached."
141− doc="keys"
142− class="inline"
143− >
144− Factory Resets:
145− {pointInfo.rift}
146− </TooltipAndDocLink>
147− </p>
148− {#if pointInfo.proxies}
149− <p>
150− <span>
151− Owner:
152− <EthAddressLink address={pointInfo.proxies.owner.address} />
153− </span>
154− </p>
155− <p>
156− <span>
157− Management Proxy:
158− <EthAddressLink address={pointInfo.proxies['management-proxy'].address}>
159− <span class="text-gray-700">not set</span>
160− </EthAddressLink>
161− </span>
162− </p>
163− <p>
164− <span>
165− Spawn Proxy:
166− <EthAddressLink address={pointInfo.proxies['spawn-proxy'].address}>
167− <span class="text-gray-700">not set</span>
168− </EthAddressLink>
169− </span>
170− </p>
171− <p>
172− <span>
173− Transfer Proxy:
174− <EthAddressLink address={pointInfo.proxies['transfer-proxy'].address}>
175− <span class="text-gray-700">not set</span>
176− </EthAddressLink>
177− </span>
178− </p>
179− {#if shipClass === 'galaxy'}
180− <p>
181− <span>
182− Voting Proxy:
183− <EthAddressLink address={pointInfo.proxies['voting-proxy'].address}>
184− [not set]
185− </EthAddressLink>
186− </span>
187− </p>
188− {/if}
189− {/if}
190−
117+ <AzimuthDetails {patp} {pointInfo}></AzimuthDetails>
118+
191119 <!-- {#if value && value.point}
192120 <pre class="text-sm overflow-scroll">
193121 Raw Info:{JSON.stringify(rawPointInfo, null, 2)}
ui/src/lib/api.ts+8
@@ -24,6 +24,14 @@ export function getSpawnedPoints(patp: string): Promise<any> {
2424 return scry<any>(`/point/${patp}/spawned`);
2525}
2626
27+export function getLockedSpawnedPoints(patp: string): Promise<any> {
28+ return scry<any>(`/point/${patp}/spawned/locked`);
29+}
30+
31+export function getUnlockedSpawnedPoints(patp: string): Promise<any> {
32+ return scry<any>(`/point/${patp}/spawned/unlocked`);
33+}
34+
2735export function getPeers(): Promise<any> {
2836 return scry<any>(`/peers`);
2937}
ui/src/routes/Home.svelte+4−2
@@ -149,7 +149,9 @@
149149</script>
150150
151151<div class="p-4 space-y-4 min-h-full flex flex-col items-center 2xs:p-8 2xs:space-y-8">
152− <SearchBar bind:analysis bind:sigilQuery bind:search bind:searchMode bind:patp {placeholderText} />
152+ <SearchBar bind:analysis bind:sigilQuery bind:search bind:searchMode bind:patp {placeholderText}
153+ allowSigilSearch={params.mode !== 'chart'}
154+ />
153155 <!-- <div class="bg-white">
154156 <p>
155157 Search: {search}
@@ -164,7 +166,7 @@
164166 Patp: {patp}
165167 </p>
166168 </div> -->
167− {#if params.mode == "chart"}
169+ {#if params.mode == 'chart'}
168170 <StarChart patp={patp || null} />
169171 {:else if patp}
170172 <ShipView {patp} />
ui/src/styles/tailwind-output.css+3
@@ -728,6 +728,9 @@ Ensure the default browser behavior of the `hidden` attribute.
728728.-mb-16 {
729729 margin-bottom: -4rem;
730730}
731+.mb-2 {
732+ margin-bottom: 0.5rem;
733+}
731734.-mt-0\.5 {
732735 margin-top: -0.125rem;
733736}