mirror of
https://github.com/urbit/shrub.git
synced 2024-12-24 11:24:21 +03:00
contacts: rename, migrate '~contacts' to '~groups'
This commit is contained in:
parent
f457c0e568
commit
aee2496588
@ -58,8 +58,8 @@
|
|||||||
^- (quip card _this)
|
^- (quip card _this)
|
||||||
:_ this
|
:_ this
|
||||||
:~ [%pass /updates %agent [our.bowl %contact-store] %watch /updates]
|
:~ [%pass /updates %agent [our.bowl %contact-store] %watch /updates]
|
||||||
[%pass / %arvo %e %connect [~ /'~contacts'] %contact-view]
|
[%pass / %arvo %e %connect [~ /'~groups'] %contact-view]
|
||||||
(launch-poke:cc [%contact-view /primary '/~contacts/js/tile.js'])
|
(launch-poke:cc [%contact-view /primary '/~groups/js/tile.js'])
|
||||||
(contact-poke:cc [%create /~/default])
|
(contact-poke:cc [%create /~/default])
|
||||||
(group-poke:cc [%bundle /~/default])
|
(group-poke:cc [%bundle /~/default])
|
||||||
(contact-poke:cc [%add /~/default our.bowl *contact])
|
(contact-poke:cc [%add /~/default our.bowl *contact])
|
||||||
@ -108,7 +108,7 @@
|
|||||||
==
|
==
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ on-arvo
|
++ on-arvo
|
||||||
|= [=wire =sign-arvo]
|
|= [=wire =sign-arvo]
|
||||||
^- (quip card _this)
|
^- (quip card _this)
|
||||||
?. ?=(%bound +<.sign-arvo)
|
?. ?=(%bound +<.sign-arvo)
|
||||||
@ -172,16 +172,16 @@
|
|||||||
''
|
''
|
||||||
i.back-path
|
i.back-path
|
||||||
?+ site.url not-found:gen
|
?+ site.url not-found:gen
|
||||||
[%'~contacts' %css %index ~] (css-response:gen style)
|
[%'~groups' %css %index ~] (css-response:gen style)
|
||||||
[%'~contacts' %js %index ~] (js-response:gen script)
|
[%'~groups' %js %index ~] (js-response:gen script)
|
||||||
[%'~contacts' %js %tile ~] (js-response:gen tile-js)
|
[%'~groups' %js %tile ~] (js-response:gen tile-js)
|
||||||
[%'~contacts' %img *]
|
[%'~groups' %img *]
|
||||||
(png-response:gen (as-octs:mimes:html (~(got by contact-png) `@ta`name)))
|
(png-response:gen (as-octs:mimes:html (~(got by contact-png) `@ta`name)))
|
||||||
::
|
::
|
||||||
:: avatar images
|
:: avatar images
|
||||||
::
|
::
|
||||||
[%'~contacts' %avatar @ *]
|
[%'~groups' %avatar @ *]
|
||||||
=/ pax=path `path`t.t.site.url
|
=/ pax=path `path`t.t.site.url
|
||||||
?~ pax not-found:gen
|
?~ pax not-found:gen
|
||||||
=/ pas `path`(flop pax)
|
=/ pas `path`(flop pax)
|
||||||
?~ pas not-found:gen
|
?~ pas not-found:gen
|
||||||
@ -196,7 +196,7 @@
|
|||||||
?~ decoded not-found:gen
|
?~ decoded not-found:gen
|
||||||
[[200 ['content-type' content-type.avatar]~] `u.decoded]
|
[[200 ['content-type' content-type.avatar]~] `u.decoded]
|
||||||
::
|
::
|
||||||
[%'~contacts' *] (html-response:gen index)
|
[%'~groups' *] (html-response:gen index)
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
:: +utilities
|
:: +utilities
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Contacts</title>
|
<title>Groups</title>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport"
|
<meta name="viewport"
|
||||||
content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
|
content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
|
||||||
<link rel="stylesheet" href="/~contacts/css/index.css" />
|
<link rel="stylesheet" href="/~groups/css/index.css" />
|
||||||
<link rel="icon" type="image/png" href="/~launch/img/Favicon.png">
|
<link rel="icon" type="image/png" href="/~launch/img/Favicon.png">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root" />
|
<div id="root" />
|
||||||
<script src="/~/channel/channel.js"></script>
|
<script src="/~/channel/channel.js"></script>
|
||||||
<script src="/~modulo/session.js"></script>
|
<script src="/~modulo/session.js"></script>
|
||||||
<script src="/~contacts/js/index.js"></script>
|
<script src="/~groups/js/index.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -143,7 +143,7 @@ gulp.task('urbit-copy', function () {
|
|||||||
gulp.task('js-bundle-dev', gulp.series('jsx-transform', 'js-imports'));
|
gulp.task('js-bundle-dev', gulp.series('jsx-transform', 'js-imports'));
|
||||||
gulp.task('tile-js-bundle-dev', gulp.series('tile-jsx-transform', 'tile-js-imports'));
|
gulp.task('tile-js-bundle-dev', gulp.series('tile-jsx-transform', 'tile-js-imports'));
|
||||||
gulp.task('js-bundle-prod', gulp.series('jsx-transform', 'js-imports', 'js-minify'))
|
gulp.task('js-bundle-prod', gulp.series('jsx-transform', 'js-imports', 'js-minify'))
|
||||||
gulp.task('tile-js-bundle-prod',
|
gulp.task('tile-js-bundle-prod',
|
||||||
gulp.series('tile-jsx-transform', 'tile-js-imports', 'tile-js-minify'));
|
gulp.series('tile-jsx-transform', 'tile-js-imports', 'tile-js-minify'));
|
||||||
|
|
||||||
gulp.task('bundle-dev',
|
gulp.task('bundle-dev',
|
@ -44,7 +44,7 @@ export class AddScreen extends Component {
|
|||||||
let submit = props.api.group.add(props.path, aud);
|
let submit = props.api.group.add(props.path, aud);
|
||||||
submit.then(() => {
|
submit.then(() => {
|
||||||
props.api.setSpinner(false);
|
props.api.setSpinner(false);
|
||||||
props.history.push("/~contacts" + props.path);
|
props.history.push("/~groups" + props.path);
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -63,7 +63,7 @@ export class AddScreen extends Component {
|
|||||||
return (
|
return (
|
||||||
<div className="h-100 w-100 flex flex-column overflow-y-scroll">
|
<div className="h-100 w-100 flex flex-column overflow-y-scroll">
|
||||||
<div className="w-100 dn-m dn-l dn-xl inter pt1 pb6 pl3 pt3 f8">
|
<div className="w-100 dn-m dn-l dn-xl inter pt1 pb6 pl3 pt3 f8">
|
||||||
<Link to={"/~contacts" + props.path}>{"⟵ All Contacts"}</Link>
|
<Link to={"/~groups" + props.path}>{"⟵ All Contacts"}</Link>
|
||||||
</div>
|
</div>
|
||||||
<div className="w-100 w-70-l w-70-xl mb4 pr6 pr0-l pr0-xl">
|
<div className="w-100 w-70-l w-70-xl mb4 pr6 pr0-l pr0-xl">
|
||||||
<h2 className="f8 pl4 pt4">Add Group Members</h2>
|
<h2 className="f8 pl4 pt4">Add Group Members</h2>
|
||||||
@ -82,7 +82,7 @@ export class AddScreen extends Component {
|
|||||||
className="ml4 f8 ba pa2 b--green2 green2 pointer">
|
className="ml4 f8 ba pa2 b--green2 green2 pointer">
|
||||||
Add Members
|
Add Members
|
||||||
</button>
|
</button>
|
||||||
<Link to="/~contacts">
|
<Link to="/~groups">
|
||||||
<button className="f8 ml4 ba pa2 b--black pointer">Cancel</button>
|
<button className="f8 ml4 ba pa2 b--black pointer">Cancel</button>
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
@ -246,7 +246,7 @@ export class ContactCard extends Component {
|
|||||||
`~${props.ship}`, props.path, `~${window.ship}`, contact
|
`~${props.ship}`, props.path, `~${window.ship}`, contact
|
||||||
).then(() => {
|
).then(() => {
|
||||||
api.setSpinner(false);
|
api.setSpinner(false);
|
||||||
props.history.push(`/~contacts/view${props.path}/${window.ship}`)
|
props.history.push(`/~groups/view${props.path}/${window.ship}`)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -273,7 +273,7 @@ export class ContactCard extends Component {
|
|||||||
api.setSpinner(false);
|
api.setSpinner(false);
|
||||||
let destination = (props.ship === window.ship)
|
let destination = (props.ship === window.ship)
|
||||||
? "" : props.path;
|
? "" : props.path;
|
||||||
props.history.push(`/~contacts${destination}`);
|
props.history.push(`/~groups${destination}`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -503,7 +503,7 @@ export class ContactCard extends Component {
|
|||||||
<div className={"flex justify-between w-100 bg-white bg-gray0-d " +
|
<div className={"flex justify-between w-100 bg-white bg-gray0-d " +
|
||||||
"bb b--gray4 b--gray2-d "}>
|
"bb b--gray4 b--gray2-d "}>
|
||||||
<div className="w-100 h2 dn-m dn-l dn-xl inter pb6 pl3 pt3 f8">
|
<div className="w-100 h2 dn-m dn-l dn-xl inter pb6 pl3 pt3 f8">
|
||||||
<Link to="/~contacts/">{"⟵"}</Link>
|
<Link to="/~groups/">{"⟵"}</Link>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex">
|
<div className="flex">
|
||||||
<button
|
<button
|
@ -15,7 +15,7 @@ export class ContactItem extends Component {
|
|||||||
let prefix = props.share ? 'share' : 'view';
|
let prefix = props.share ? 'share' : 'view';
|
||||||
let suffix = !props.share ? `/${props.ship}` : '';
|
let suffix = !props.share ? `/${props.ship}` : '';
|
||||||
return (
|
return (
|
||||||
<Link to={`/~contacts/${prefix}` + props.path + suffix}>
|
<Link to={`/~groups/${prefix}` + props.path + suffix}>
|
||||||
<div className=
|
<div className=
|
||||||
{"pl4 pt1 pb1 f9 flex justify-start content-center " + selectedClass}
|
{"pl4 pt1 pb1 f9 flex justify-start content-center " + selectedClass}
|
||||||
>
|
>
|
@ -67,18 +67,18 @@ export class ContactSidebar extends Component {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
let detailHref = `/~contacts/detail${props.path}`
|
let detailHref = `/~groups/detail${props.path}`
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={`bn br-m br-l br-xl b--gray3 lh-copy h-100 flex-shrink-0
|
<div className={`bn br-m br-l br-xl b--gray3 lh-copy h-100 flex-shrink-0
|
||||||
flex-basis-100-s flex-basis-30-ns mw5-m mw5-l mw5-xl relative
|
flex-basis-100-s flex-basis-30-ns mw5-m mw5-l mw5-xl relative
|
||||||
overflow-hidden ` + responsiveClasses}>
|
overflow-hidden ` + responsiveClasses}>
|
||||||
<div className="pt3 pb5 pl3 f8 db dn-m dn-l dn-xl">
|
<div className="pt3 pb5 pl3 f8 db dn-m dn-l dn-xl">
|
||||||
<Link to="/~contacts/">{"⟵ All Groups"}</Link>
|
<Link to="/~groups/">{"⟵ All Groups"}</Link>
|
||||||
</div>
|
</div>
|
||||||
<div className="overflow-auto h-100">
|
<div className="overflow-auto h-100">
|
||||||
<Link
|
<Link
|
||||||
to={"/~contacts/add" + props.path}
|
to={"/~groups/add" + props.path}
|
||||||
className={((props.path.includes(window.ship))
|
className={((props.path.includes(window.ship))
|
||||||
? "dib"
|
? "dib"
|
||||||
: "dn")}>
|
: "dn")}>
|
@ -13,7 +13,7 @@ export class GroupItem extends Component {
|
|||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Link to={"/~contacts" + props.link}>
|
<Link to={"/~groups" + props.link}>
|
||||||
<div className={"w-100 v-mid f9 pl4 " + selectedClass}>
|
<div className={"w-100 v-mid f9 pl4 " + selectedClass}>
|
||||||
<p className="f9 pt1">{props.name}</p>
|
<p className="f9 pt1">{props.name}</p>
|
||||||
<p className="f9 pb1 gray2">
|
<p className="f9 pb1 gray2">
|
@ -16,7 +16,7 @@ export class GroupSidebar extends Component {
|
|||||||
|
|
||||||
let rootIdentity = <Link
|
let rootIdentity = <Link
|
||||||
key={1}
|
key={1}
|
||||||
to={"/~contacts/me"}>
|
to={"/~groups/me"}>
|
||||||
<div
|
<div
|
||||||
className={
|
className={
|
||||||
"w-100 pl4 pt1 pb1 f9 mb5 flex justify-start content-center " +
|
"w-100 pl4 pt1 pb1 f9 mb5 flex justify-start content-center " +
|
||||||
@ -84,7 +84,7 @@ export class GroupSidebar extends Component {
|
|||||||
{/*TODO Add invite items */}
|
{/*TODO Add invite items */}
|
||||||
<a className="db dn-m dn-l dn-xl f8 pb6 pl3" href="/">⟵ Landscape</a>
|
<a className="db dn-m dn-l dn-xl f8 pb6 pl3" href="/">⟵ Landscape</a>
|
||||||
<div className="overflow-auto pb8 h-100">
|
<div className="overflow-auto pb8 h-100">
|
||||||
<Link to="/~contacts/new" className="dib">
|
<Link to="/~groups/new" className="dib">
|
||||||
<p className="f9 pt4 pl4 green2 bn">Create Group</p>
|
<p className="f9 pt4 pl4 green2 bn">Create Group</p>
|
||||||
</Link>
|
</Link>
|
||||||
<h2 className="f9 pt6 pr4 pb2 pl4 gray2 c-default">Root Identity</h2>
|
<h2 className="f9 pt6 pr4 pb2 pl4 gray2 c-default">Root Identity</h2>
|
@ -7,7 +7,7 @@ export class IconHome extends Component {
|
|||||||
return (
|
return (
|
||||||
<img
|
<img
|
||||||
className={"invert-d " + classes}
|
className={"invert-d " + classes}
|
||||||
src="/~contacts/img/Home.png"
|
src="/~groups/img/Home.png"
|
||||||
width={16}
|
width={16}
|
||||||
height={16}
|
height={16}
|
||||||
/>
|
/>
|
@ -326,7 +326,7 @@ export class InviteSearch extends Component {
|
|||||||
return (
|
return (
|
||||||
<div className="relative">
|
<div className="relative">
|
||||||
<img
|
<img
|
||||||
src="/~contacts/img/search.png"
|
src="/~groups/img/search.png"
|
||||||
className="absolute invert-d"
|
className="absolute invert-d"
|
||||||
style={{
|
style={{
|
||||||
height: 16,
|
height: 16,
|
@ -7,7 +7,7 @@ export class SidebarInvite extends Component {
|
|||||||
onAccept() {
|
onAccept() {
|
||||||
const { props } = this;
|
const { props } = this;
|
||||||
props.api.invite.accept(props.uid);
|
props.api.invite.accept(props.uid);
|
||||||
props.history.push(`/~contacts${props.invite.path}`);
|
props.history.push(`/~groups${props.invite.path}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
onDecline() {
|
onDecline() {
|
@ -66,7 +66,7 @@ export class NewScreen extends Component {
|
|||||||
let submit = props.api.contactView.create(group, aud);
|
let submit = props.api.contactView.create(group, aud);
|
||||||
submit.then(() => {
|
submit.then(() => {
|
||||||
props.api.setSpinner(false);
|
props.api.setSpinner(false);
|
||||||
props.history.push(`/~contacts${group}`);
|
props.history.push(`/~groups${group}`);
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -93,7 +93,7 @@ export class NewScreen extends Component {
|
|||||||
return (
|
return (
|
||||||
<div className="h-100 w-100 flex flex-column overflow-y-scroll white-d">
|
<div className="h-100 w-100 flex flex-column overflow-y-scroll white-d">
|
||||||
<div className="w-100 dn-m dn-l dn-xl inter pt1 pb6 pl3 pt3 f8">
|
<div className="w-100 dn-m dn-l dn-xl inter pt1 pb6 pl3 pt3 f8">
|
||||||
<Link to="/~contacts/">{"⟵ All Groups"}</Link>
|
<Link to="/~groups/">{"⟵ All Groups"}</Link>
|
||||||
</div>
|
</div>
|
||||||
<div className="w-100 w-50-l w-50-xl mb4 pr6 pr0-l pr0-xl">
|
<div className="w-100 w-50-l w-50-xl mb4 pr6 pr0-l pr0-xl">
|
||||||
<h2 className="f8 pl3 pt4">Create New Group</h2>
|
<h2 className="f8 pl3 pt4">Create New Group</h2>
|
||||||
@ -130,7 +130,7 @@ export class NewScreen extends Component {
|
|||||||
className="ml3 f8 ba pa2 b--green2 green2 pointer">
|
className="ml3 f8 ba pa2 b--green2 green2 pointer">
|
||||||
Start Group
|
Start Group
|
||||||
</button>
|
</button>
|
||||||
<Link to="/~contacts">
|
<Link to="/~groups">
|
||||||
<button className="f8 ml3 ba pa2 b--black pointer">Cancel</button>
|
<button className="f8 ml3 ba pa2 b--black pointer">Cancel</button>
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
@ -39,7 +39,7 @@ export class Root extends Component {
|
|||||||
return (
|
return (
|
||||||
<BrowserRouter>
|
<BrowserRouter>
|
||||||
<div className="h-100 w-100">
|
<div className="h-100 w-100">
|
||||||
<Route exact path="/~contacts"
|
<Route exact path="/~groups"
|
||||||
render={ (props) => {
|
render={ (props) => {
|
||||||
return (
|
return (
|
||||||
<Skeleton
|
<Skeleton
|
||||||
@ -60,7 +60,7 @@ export class Root extends Component {
|
|||||||
</Skeleton>
|
</Skeleton>
|
||||||
);
|
);
|
||||||
}} />
|
}} />
|
||||||
<Route exact path="/~contacts/new"
|
<Route exact path="/~groups/new"
|
||||||
render={ (props) => {
|
render={ (props) => {
|
||||||
return (
|
return (
|
||||||
<Skeleton
|
<Skeleton
|
||||||
@ -79,7 +79,7 @@ export class Root extends Component {
|
|||||||
</Skeleton>
|
</Skeleton>
|
||||||
);
|
);
|
||||||
}} />
|
}} />
|
||||||
<Route exact path="/~contacts/(detail)?/:ship/:group/"
|
<Route exact path="/~groups/(detail)?/:ship/:group/"
|
||||||
render={ (props) => {
|
render={ (props) => {
|
||||||
let groupPath =
|
let groupPath =
|
||||||
`/${props.match.params.ship}/${props.match.params.group}`;
|
`/${props.match.params.ship}/${props.match.params.group}`;
|
||||||
@ -115,7 +115,7 @@ export class Root extends Component {
|
|||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Route exact path="/~contacts/add/:ship/:group"
|
<Route exact path="/~groups/add/:ship/:group"
|
||||||
render={(props) => {
|
render={(props) => {
|
||||||
let groupPath =
|
let groupPath =
|
||||||
`/${props.match.params.ship}/${props.match.params.group}`;
|
`/${props.match.params.ship}/${props.match.params.group}`;
|
||||||
@ -149,7 +149,7 @@ export class Root extends Component {
|
|||||||
</Skeleton>
|
</Skeleton>
|
||||||
);
|
);
|
||||||
}} />
|
}} />
|
||||||
<Route exact path="/~contacts/share/:ship/:group"
|
<Route exact path="/~groups/share/:ship/:group"
|
||||||
render={(props) => {
|
render={(props) => {
|
||||||
let groupPath =
|
let groupPath =
|
||||||
`/${props.match.params.ship}/${props.match.params.group}`;
|
`/${props.match.params.ship}/${props.match.params.group}`;
|
||||||
@ -190,7 +190,7 @@ export class Root extends Component {
|
|||||||
</Skeleton>
|
</Skeleton>
|
||||||
);
|
);
|
||||||
}} />
|
}} />
|
||||||
<Route exact path="/~contacts/view/:ship/:group/:contact"
|
<Route exact path="/~groups/view/:ship/:group/:contact"
|
||||||
render={ (props) => {
|
render={ (props) => {
|
||||||
let groupPath =
|
let groupPath =
|
||||||
`/${props.match.params.ship}/${props.match.params.group}`;
|
`/${props.match.params.ship}/${props.match.params.group}`;
|
||||||
@ -235,7 +235,7 @@ export class Root extends Component {
|
|||||||
</Skeleton>
|
</Skeleton>
|
||||||
);
|
);
|
||||||
}} />
|
}} />
|
||||||
<Route exact path="/~contacts/me"
|
<Route exact path="/~groups/me"
|
||||||
render={ (props) => {
|
render={ (props) => {
|
||||||
let me = defaultContacts[window.ship] || {};
|
let me = defaultContacts[window.ship] || {};
|
||||||
|
|
@ -11,16 +11,16 @@ export default class ContactTile extends Component {
|
|||||||
return (
|
return (
|
||||||
<div className={"w-100 h-100 relative bg-white bg-gray0-d " +
|
<div className={"w-100 h-100 relative bg-white bg-gray0-d " +
|
||||||
"b--black b--gray1-d ba"}>
|
"b--black b--gray1-d ba"}>
|
||||||
<a className="w-100 h-100 db pa2 bn" href="/~contacts">
|
<a className="w-100 h-100 db pa2 bn" href="/~groups">
|
||||||
<p
|
<p
|
||||||
className="black white-d absolute f9"
|
className="black white-d absolute f9"
|
||||||
style={{ left: 8, top: 8 }}>
|
style={{ left: 8, top: 8 }}>
|
||||||
Contacts
|
Groups
|
||||||
</p>
|
</p>
|
||||||
<img
|
<img
|
||||||
className="absolute invert-d"
|
className="absolute invert-d"
|
||||||
style={{ left: 39, top: 39 }}
|
style={{ left: 39, top: 39 }}
|
||||||
src="/~contacts/img/Tile.png"
|
src="/~groups/img/Tile.png"
|
||||||
width={48}
|
width={48}
|
||||||
height={48}
|
height={48}
|
||||||
/>
|
/>
|
@ -26,7 +26,7 @@ cd ../weather
|
|||||||
npm install
|
npm install
|
||||||
gulp bundle-prod
|
gulp bundle-prod
|
||||||
|
|
||||||
cd ../contacts
|
cd ../groups
|
||||||
npm install
|
npm install
|
||||||
gulp bundle-prod
|
gulp bundle-prod
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user