1import React, { useCallback } from 'react';
2import { Just } from 'folktale/maybe';
3import { Grid, B } from 'indigo-react';
5import { useWallet } from 'store/wallet';
7import { useLocalRouter } from 'lib/LocalRouter';
8import useCurrentPermissions from 'lib/useCurrentPermissions';
9import useKeyfileGenerator from 'lib/useKeyfileGenerator';
11import { ForwardButton } from 'components/Buttons';
12import ViewHeader from 'components/ViewHeader';
13import DownloadKeyfileButton from 'components/DownloadKeyfileButton';
15export default function AdminHome() {
16 const { push, names } = useLocalRouter();
17 const { urbitWallet } = useWallet();
19 const { bind: keyfileBind } = useKeyfileGenerator();
21 const { isOwner, canTransfer, isTransferProxySet } = useCurrentPermissions();
23 const goRedownload = useCallback(() => push(names.REDOWNLOAD), [push, names]);
24 const goReticket = useCallback(() => push(names.RETICKET), [push, names]);
25 const goEditPermissions = useCallback(() => push(names.EDIT_PERMISSIONS), [
29 const goCancelTransfer = useCallback(() => push(names.CANCEL_TRANSFER), [
33 const goTransfer = useCallback(() => push(names.TRANSFER), [names, push]);
35 const canDownloadPassport = Just.hasInstance(urbitWallet);
40 <Grid.Item full as={ViewHeader}>
47 disabled={!canDownloadPassport}
48 onClick={goRedownload}
49 detail="Re-download your paper wallet"
51 <B className="wrap ws-normal">
52 · Master Ticket Authentication required.
60 as={DownloadKeyfileButton}
62 detail="Download your current Arvo Keyfile">
71 detail="Move to brand new wallet, resetting all permissions">
78 onClick={goEditPermissions}
79 detail="Proxies, networking keys, etc.">
83 {isTransferProxySet ? (
87 onClick={goCancelTransfer}
88 detail="Cancel outgoing transfer"
89 disabled={!canTransfer}>
90 Cancel Outgoing Transfer
97 detail="Transfer ownership of this ID"
98 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