contacts: rename, migrate '~contacts' to '~groups'

This commit is contained in:
Matilde Park 2020-03-04 14:50:11 -05:00
parent f457c0e568
commit aee2496588
43 changed files with 46 additions and 46 deletions

View File

@ -58,8 +58,8 @@
^- (quip card _this)
:_ this
:~ [%pass /updates %agent [our.bowl %contact-store] %watch /updates]
[%pass / %arvo %e %connect [~ /'~contacts'] %contact-view]
(launch-poke:cc [%contact-view /primary '/~contacts/js/tile.js'])
[%pass / %arvo %e %connect [~ /'~groups'] %contact-view]
(launch-poke:cc [%contact-view /primary '/~groups/js/tile.js'])
(contact-poke:cc [%create /~/default])
(group-poke:cc [%bundle /~/default])
(contact-poke:cc [%add /~/default our.bowl *contact])
@ -172,15 +172,15 @@
''
i.back-path
?+ site.url not-found:gen
[%'~contacts' %css %index ~] (css-response:gen style)
[%'~contacts' %js %index ~] (js-response:gen script)
[%'~contacts' %js %tile ~] (js-response:gen tile-js)
[%'~contacts' %img *]
[%'~groups' %css %index ~] (css-response:gen style)
[%'~groups' %js %index ~] (js-response:gen script)
[%'~groups' %js %tile ~] (js-response:gen tile-js)
[%'~groups' %img *]
(png-response:gen (as-octs:mimes:html (~(got by contact-png) `@ta`name)))
::
:: avatar images
::
[%'~contacts' %avatar @ *]
[%'~groups' %avatar @ *]
=/ pax=path `path`t.t.site.url
?~ pax not-found:gen
=/ pas `path`(flop pax)
@ -196,7 +196,7 @@
?~ decoded not-found:gen
[[200 ['content-type' content-type.avatar]~] `u.decoded]
::
[%'~contacts' *] (html-response:gen index)
[%'~groups' *] (html-response:gen index)
==
::
:: +utilities

View File

@ -1,17 +1,17 @@
<!doctype html>
<html>
<head>
<title>Contacts</title>
<title>Groups</title>
<meta charset="utf-8" />
<meta name="viewport"
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">
</head>
<body>
<div id="root" />
<script src="/~/channel/channel.js"></script>
<script src="/~modulo/session.js"></script>
<script src="/~contacts/js/index.js"></script>
<script src="/~groups/js/index.js"></script>
</body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -44,7 +44,7 @@ export class AddScreen extends Component {
let submit = props.api.group.add(props.path, aud);
submit.then(() => {
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 (
<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">
<Link to={"/~contacts" + props.path}>{"⟵ All Contacts"}</Link>
<Link to={"/~groups" + props.path}>{"⟵ All Contacts"}</Link>
</div>
<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>
@ -82,7 +82,7 @@ export class AddScreen extends Component {
className="ml4 f8 ba pa2 b--green2 green2 pointer">
Add Members
</button>
<Link to="/~contacts">
<Link to="/~groups">
<button className="f8 ml4 ba pa2 b--black pointer">Cancel</button>
</Link>
</div>

View File

@ -246,7 +246,7 @@ export class ContactCard extends Component {
`~${props.ship}`, props.path, `~${window.ship}`, contact
).then(() => {
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);
let destination = (props.ship === window.ship)
? "" : 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 " +
"bb b--gray4 b--gray2-d "}>
<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 className="flex">
<button

View File

@ -15,7 +15,7 @@ export class ContactItem extends Component {
let prefix = props.share ? 'share' : 'view';
let suffix = !props.share ? `/${props.ship}` : '';
return (
<Link to={`/~contacts/${prefix}` + props.path + suffix}>
<Link to={`/~groups/${prefix}` + props.path + suffix}>
<div className=
{"pl4 pt1 pb1 f9 flex justify-start content-center " + selectedClass}
>

View File

@ -67,18 +67,18 @@ export class ContactSidebar extends Component {
);
});
let detailHref = `/~contacts/detail${props.path}`
let detailHref = `/~groups/detail${props.path}`
return (
<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
overflow-hidden ` + responsiveClasses}>
<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 className="overflow-auto h-100">
<Link
to={"/~contacts/add" + props.path}
to={"/~groups/add" + props.path}
className={((props.path.includes(window.ship))
? "dib"
: "dn")}>

View File

@ -13,7 +13,7 @@ export class GroupItem extends Component {
);
return (
<Link to={"/~contacts" + props.link}>
<Link to={"/~groups" + props.link}>
<div className={"w-100 v-mid f9 pl4 " + selectedClass}>
<p className="f9 pt1">{props.name}</p>
<p className="f9 pb1 gray2">

View File

@ -16,7 +16,7 @@ export class GroupSidebar extends Component {
let rootIdentity = <Link
key={1}
to={"/~contacts/me"}>
to={"/~groups/me"}>
<div
className={
"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 */}
<a className="db dn-m dn-l dn-xl f8 pb6 pl3" href="/"> Landscape</a>
<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>
</Link>
<h2 className="f9 pt6 pr4 pb2 pl4 gray2 c-default">Root Identity</h2>

View File

@ -7,7 +7,7 @@ export class IconHome extends Component {
return (
<img
className={"invert-d " + classes}
src="/~contacts/img/Home.png"
src="/~groups/img/Home.png"
width={16}
height={16}
/>

View File

@ -326,7 +326,7 @@ export class InviteSearch extends Component {
return (
<div className="relative">
<img
src="/~contacts/img/search.png"
src="/~groups/img/search.png"
className="absolute invert-d"
style={{
height: 16,

View File

@ -7,7 +7,7 @@ export class SidebarInvite extends Component {
onAccept() {
const { props } = this;
props.api.invite.accept(props.uid);
props.history.push(`/~contacts${props.invite.path}`);
props.history.push(`/~groups${props.invite.path}`);
}
onDecline() {

View File

@ -66,7 +66,7 @@ export class NewScreen extends Component {
let submit = props.api.contactView.create(group, aud);
submit.then(() => {
props.api.setSpinner(false);
props.history.push(`/~contacts${group}`);
props.history.push(`/~groups${group}`);
})
});
}
@ -93,7 +93,7 @@ export class NewScreen extends Component {
return (
<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">
<Link to="/~contacts/">{"⟵ All Groups"}</Link>
<Link to="/~groups/">{"⟵ All Groups"}</Link>
</div>
<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>
@ -130,7 +130,7 @@ export class NewScreen extends Component {
className="ml3 f8 ba pa2 b--green2 green2 pointer">
Start Group
</button>
<Link to="/~contacts">
<Link to="/~groups">
<button className="f8 ml3 ba pa2 b--black pointer">Cancel</button>
</Link>
</div>

View File

@ -39,7 +39,7 @@ export class Root extends Component {
return (
<BrowserRouter>
<div className="h-100 w-100">
<Route exact path="/~contacts"
<Route exact path="/~groups"
render={ (props) => {
return (
<Skeleton
@ -60,7 +60,7 @@ export class Root extends Component {
</Skeleton>
);
}} />
<Route exact path="/~contacts/new"
<Route exact path="/~groups/new"
render={ (props) => {
return (
<Skeleton
@ -79,7 +79,7 @@ export class Root extends Component {
</Skeleton>
);
}} />
<Route exact path="/~contacts/(detail)?/:ship/:group/"
<Route exact path="/~groups/(detail)?/:ship/:group/"
render={ (props) => {
let groupPath =
`/${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) => {
let groupPath =
`/${props.match.params.ship}/${props.match.params.group}`;
@ -149,7 +149,7 @@ export class Root extends Component {
</Skeleton>
);
}} />
<Route exact path="/~contacts/share/:ship/:group"
<Route exact path="/~groups/share/:ship/:group"
render={(props) => {
let groupPath =
`/${props.match.params.ship}/${props.match.params.group}`;
@ -190,7 +190,7 @@ export class Root extends Component {
</Skeleton>
);
}} />
<Route exact path="/~contacts/view/:ship/:group/:contact"
<Route exact path="/~groups/view/:ship/:group/:contact"
render={ (props) => {
let groupPath =
`/${props.match.params.ship}/${props.match.params.group}`;
@ -235,7 +235,7 @@ export class Root extends Component {
</Skeleton>
);
}} />
<Route exact path="/~contacts/me"
<Route exact path="/~groups/me"
render={ (props) => {
let me = defaultContacts[window.ship] || {};

View File

@ -11,16 +11,16 @@ export default class ContactTile extends Component {
return (
<div className={"w-100 h-100 relative bg-white bg-gray0-d " +
"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
className="black white-d absolute f9"
style={{ left: 8, top: 8 }}>
Contacts
Groups
</p>
<img
className="absolute invert-d"
style={{ left: 39, top: 39 }}
src="/~contacts/img/Tile.png"
src="/~groups/img/Tile.png"
width={48}
height={48}
/>

View File

@ -26,7 +26,7 @@ cd ../weather
npm install
gulp bundle-prod
cd ../contacts
cd ../groups
npm install
gulp bundle-prod