Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gear: userspace permissions interface (types + pokes) #187

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 31 additions & 73 deletions ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"@tlon/sigil-js": "^1.4.4",
"@tloncorp/mock-http-api": "^1.2.0",
"@types/lodash": "^4.14.172",
"@urbit/api": "^2.2.0",
"@urbit/http-api": "^2.4.5-debug",
"@urbit/aura": "^1.0.0",
"@urbit/js-http-api": "git+https://github.com/urbit/js-http-api",
"big-integer": "^1.6.48",
"browser-cookies": "^1.2.0",
"classnames": "^2.3.1",
Expand All @@ -59,7 +59,6 @@
"react-hook-form": "^7.38.0",
"react-router-dom": "^5.2.0",
"slugify": "^1.6.0",
"urbit-ob": "^5.0.1",
"zustand": "^3.7.2"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion ui/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Urbit, {
Thread,
UrbitHttpApiEvent,
UrbitHttpApiEventType,
} from '@urbit/http-api';
} from '@urbit/js-http-api';
import _ from 'lodash';
import { useLocalState } from '@/state/local';
import useSchedulerStore from './state/scheduler';
Expand Down
2 changes: 1 addition & 1 deletion ui/src/components/AppInfo.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { chadIsRunning, Pike, Treaty } from '@urbit/api';
import { chadIsRunning, Pike, Treaty } from '@/gear';
import clipboardCopy from 'clipboard-copy';
import React, { FC, useCallback, useState } from 'react';
import cn from 'classnames';
Expand Down
2 changes: 1 addition & 1 deletion ui/src/components/Avatar.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import classNames from 'classnames';
import React, { useMemo } from 'react';
import { sigil, reactRenderer } from '@tlon/sigil-js';
import { deSig } from '@urbit/api';
import { deSig } from '@urbit/aura';
import { darken, lighten, parseToHsla } from 'color2k';
import { useCurrentTheme } from '../state/local';
import { normalizeUrbitColor } from '@/logic/utils';
Expand Down
2 changes: 1 addition & 1 deletion ui/src/components/DocketImage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState } from 'react';
import { Docket } from '@urbit/api';
import { Docket } from '@/gear';
import cn from 'classnames';
import { useTileColor } from '../tiles/useTileColor';

Expand Down
2 changes: 1 addition & 1 deletion ui/src/components/PikeMeta.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Pike } from '@urbit/api';
import { Pike } from '@/gear';

import { Attribute } from './Attribute';

Expand Down
2 changes: 1 addition & 1 deletion ui/src/components/ProviderLink.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import classNames from 'classnames';
import React from 'react';
import { Link, LinkProps } from 'react-router-dom';
import { Provider } from '@urbit/api';
import { Provider } from '@/gear';
import { ShipName } from './ShipName';
import { Avatar, AvatarSizes } from './Avatar';
import { Contact } from '@/types/contact';
Expand Down
2 changes: 1 addition & 1 deletion ui/src/components/ProviderList.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { MouseEvent, useCallback } from 'react';
import { Provider } from '@urbit/api';
import { Provider } from '@/gear';
import classNames from 'classnames';
import { MatchItem } from '../nav/Nav';
import { useRecentsStore } from '../nav/search/Home';
Expand Down
2 changes: 1 addition & 1 deletion ui/src/components/ShipName.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { cite } from '@urbit/api';
import { cite } from '@urbit/aura';
import React, { HTMLAttributes } from 'react';
import { useCalm } from '../state/settings';
import { useContact } from '../state/contact';
Expand Down
5 changes: 3 additions & 2 deletions ui/src/components/TreatyMeta.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import { daToDate, Treaty } from '@urbit/api';
import { daToUnix, parseDa } from '@urbit/aura'
import { Treaty } from '@/gear';

import moment from 'moment';
import { Attribute } from './Attribute';
Expand All @@ -15,7 +16,7 @@ export function TreatyMeta(props: { treaty: Treaty }) {
{ship}/{desk}
</Attribute>
<Attribute title="Last Software Update" attr="case">
{moment(daToDate(cass.da)).format('YYYY.MM.DD')}
{moment(daToUnix(parseDa(cass.da))).format('YYYY.MM.DD')}
</Attribute>
{meta.map((d) => (
<Attribute key={d} attr={d}>
Expand Down
2 changes: 2 additions & 0 deletions ui/src/gear/contacts/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './types';
export * from './lib';
Loading