1import React, { useCallback } from 'react';
2import { Just } from 'folktale/maybe';
3import { Grid, B } from 'indigo-react';
5import { ForwardButton } from 'components/Buttons';
7import { useWallet } from 'store/wallet';
9import ViewHeader from 'components/ViewHeader';
10import { useLocalRouter } from 'lib/LocalRouter';
11import DownloadKeyfileButton from 'components/DownloadKeyfileButton';
12import MiniBackButton from 'components/MiniBackButton';
13import useCurrentPermissions from 'lib/useCurrentPermissions';
15export default function AdminHome() {
16 const { push, names, pop } = useLocalRouter();
17 const { urbitWallet } = useWallet();
19 const { isOwner, canTransfer, isTransferProxySet } = useCurrentPermissions();
21 const goRedownload = useCallback(() => push(names.REDOWNLOAD), [push, names]);
22 const goReticket = useCallback(() => push(names.RETICKET), [push, names]);
23 const goEditPermissions = useCallback(() => push(names.EDIT_PERMISSIONS), [
27 const goCancelTransfer = useCallback(() => push(names.CANCEL_TRANSFER), [
31 const goTransfer = useCallback(() => push(names.TRANSFER), [names, push]);
33 const canDownloadPassport = Just.hasInstance(urbitWallet);
38 <Grid.Item full as={MiniBackButton} onClick={() => pop()} />
39 <Grid.Item full as={ViewHeader}>
46 disabled={!canDownloadPassport}
47 onClick={goRedownload}
48 detail="Re-download your paper wallet"
50 <B className="wrap ws-normal">
51 · Master Ticket Authentication required.
59 as={DownloadKeyfileButton}
60 detail="Download your Arvo Keyfile"
68 detail="Move to brand new wallet, resetting all permissions">
75 onClick={goEditPermissions}
76 detail="Proxies, networking keys, etc.">
80 {isTransferProxySet ? (
84 onClick={goCancelTransfer}
85 detail="Cancel outgoing transfer"
86 disabled={!canTransfer}>
87 Cancel Outgoing Transfer
94 detail="Transfer ownership of this point"
95 disabled={!canTransfer}>
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list