links: move 'mark all as seen' to settings

This commit is contained in:
Matilde Park 2020-03-31 22:12:05 -04:00 committed by Matilde Park
parent 93587dd84d
commit 6e0a29b79d
2 changed files with 10 additions and 10 deletions

View File

@ -13,7 +13,6 @@ import { makeRoutePath, getContactDetails } from '../lib/util';
export class Links extends Component {
constructor(props) {
super(props);
this.markAllAsSeen = this.markAllAsSeen.bind(this);
}
componentDidMount() {
@ -30,10 +29,6 @@ export class Links extends Component {
}
}
markAllAsSeen() {
api.seenLink(this.props.resourcePath);
}
render() {
let props = this.props;
@ -121,11 +116,6 @@ export class Links extends Component {
<LinkSubmit resourcePath={props.resourcePath}/>
</div>
<div className="pb4">
<span
className="f9 inter gray2 ba b--gray2 br2 dib pa1 pointer"
onClick={this.markAllAsSeen}>
mark all as seen
</span>
{LinkList}
<Pagination
{...props}

View File

@ -139,6 +139,10 @@ export class SettingsScreen extends Component {
});
}
markAllAsSeen() {
api.seenLink(this.props.resourcePath);
}
renderRemove() {
const { props, state } = this;
@ -338,6 +342,12 @@ export class SettingsScreen extends Component {
</div>
<div className="w-100 pl3 mt4 cf">
<h2 className="f8 pb2">Collection Settings</h2>
<p className="f8 mt3 lh-copy db">Mark all links as read</p>
<p className="f9 gray2 db mb4">Mark all links in this collection as read.</p>
<a className="dib f9 black gray4-d bg-gray0-d ba pa2 b--black b--gray1-d pointer"
onClick={() => this.markAllAsSeen}>
Mark all as read
</a>
{this.renderRemove()}
{this.renderDelete()}
{this.renderMetadataSettings()}