Merge pull request #2345 from urbit/jy/copy

Copy changes to publish and contacts
This commit is contained in:
matildepark 2020-02-25 13:14:31 -05:00 committed by GitHub
commit 1c87e329d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 42 additions and 60 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -2148,8 +2148,7 @@
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
"dev": true,
"optional": true
"dev": true
},
"aproba": {
"version": "1.2.0",
@ -2173,15 +2172,13 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
"dev": true,
"optional": true
"dev": true
},
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@ -2198,22 +2195,19 @@
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
"dev": true,
"optional": true
"dev": true
},
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
"dev": true,
"optional": true
"dev": true
},
"console-control-strings": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
"integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",
"dev": true,
"optional": true
"dev": true
},
"core-util-is": {
"version": "1.0.2",
@ -2344,8 +2338,7 @@
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
"dev": true,
"optional": true
"dev": true
},
"ini": {
"version": "1.3.5",
@ -2359,7 +2352,6 @@
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@ -2376,7 +2368,6 @@
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@ -2385,15 +2376,13 @@
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
"dev": true,
"optional": true
"dev": true
},
"minipass": {
"version": "2.3.5",
"resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz",
"integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==",
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@ -2414,7 +2403,6 @@
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
@ -2503,8 +2491,7 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
"dev": true,
"optional": true
"dev": true
},
"object-assign": {
"version": "4.1.1",
@ -2518,7 +2505,6 @@
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
@ -2614,8 +2600,7 @@
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
"dev": true,
"optional": true
"dev": true
},
"safer-buffer": {
"version": "2.1.2",
@ -2657,7 +2642,6 @@
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@ -2679,7 +2663,6 @@
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@ -2728,15 +2711,13 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
"dev": true,
"optional": true
"dev": true
},
"yallist": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz",
"integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==",
"dev": true,
"optional": true
"dev": true
}
}
},

View File

@ -479,7 +479,7 @@ export class ContactCard extends Component {
const { props, state } = this;
let editInfoText =
state.edit ? "Finish Editing" : "Edit Contact Info";
state.edit ? "Finish" : "Edit";
if (props.share && state.edit) {
editInfoText = "Share with Group";
}
@ -499,32 +499,34 @@ export class ContactCard extends Component {
//TODO "Share card" if it's /me -> sends to /~/default of recipient
return (
<div className="w-100 h-100 overflow-hidden">
<div className="w-100 bg-white bb b--gray4">
<div className="flex justify-between w-100 bg-white bb b--gray4 ">
<div className="w-100 h2 dn-m dn-l dn-xl inter pb6 pl3 pt3 f8">
<Link to="/~contacts/">{"⟵"}</Link>
</div>
<button
onClick={() => {
if (props.share) {
this.shareWithGroup();
} else {
this.editToggle();
}
}}
className={`pl4 mt4 mb4 f9 pointer b--black ` + ourOpt}>
{editInfoText}
</button>
<button className={`pl4 mt4 mb4 f9 b--black ` + localOpt}>
Share Contact Info
</button>
<div className="flex">
<button
onClick={() => {
if (props.share) {
this.shareWithGroup();
} else {
this.editToggle();
}
}}
className={`ml3 mt2 mb2 f9 pa1 pointer` + ourOpt}>
{editInfoText}
</button>
<button className={`ml3 mt2 mb2 f9 pa1 pointer` + localOpt}>
Share
</button>
</div>
<button
className={
`pl4 mt4 mb4 f9 red2 b--red2 pointer ` + adminOpt
`pl4 mt4 mb4 f9 red2 pointer ` + adminOpt
}
onClick={this.removeFromGroup}>
{(
props.ship === window.ship && props.path.includes(window.ship)
? "Delete Group" : "Remove from Group"
? "Delete" : "Remove"
)}
</button>
</div>
@ -533,4 +535,3 @@ export class ContactCard extends Component {
);
}
}

View File

@ -162,26 +162,26 @@ export class Sidebar extends Component {
options={[
{
cls: "w-100 tl pointer db ph2 pv3 hover-bg-gray4",
txt: "Oldest Notebooks First",
txt: "Oldest",
action: () => {this.setState({sort: "oldest"})}
},
{
cls: "w-100 tl pointer db ph2 pv3 hover-bg-gray4",
txt: "Newest Notebooks First",
txt: "Newest",
action: () => {this.setState({sort: "newest"})}
},
{
cls: "w-100 tl pointer db ph2 pv3 hover-bg-gray4",
txt: "Alphabetical A -> Z",
txt: "A -> Z",
action: () => {this.setState({sort: "alphabetical"})}
},
{
cls: "w-100 tl pointer db ph2 pv3 hover-bg-gray4",
txt: "Alphabetical Z -> A",
txt: "Z -> A",
action: () => {this.setState({sort: "reverseAlphabetical"})}
}
]}
buttonText="Sort Notebooks"
buttonText="Sort By"
/>
</div>
</div>