Skip to content

Commit

Permalink
Title in layout, search on title+url
Browse files Browse the repository at this point in the history
  • Loading branch information
rabadiw committed Jul 11, 2017
1 parent 45f4b73 commit c219353
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"name": "onemark",
"private": true,
"productName": "Onemark",
"version": "1.0.13-alpha",
"version": "1.0.14-alpha",
"dependencies": {
"body-parser": "1.17.2",
"dotenv": "4.0.0",
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@
},
"scripts": {
"postinstall": "install-app-deps",
"start:client": "concurrently \"npm run dev:server\" \"npm run dev:client\"",
"build:api": "tsc -p ./src-api",
"build:client": "node client-build.js",
"dev:server": "node ./src-client/client-server.js --env=./src-api/.env",
"dev:client": "node client-startup.js",
"build:client": "node client-build.js",
"build:api": "tsc -p ./src-api",
"start:client": "concurrently \"npm run api\" \"npm run dev:server\" \"npm run dev:client\"",
"preapi": "yarn run build:api",
"api": "electron ./app --start=api --env=./src-api/.env",
"preapp": "yarn run build:client",
Expand Down
9 changes: 6 additions & 3 deletions src-client/src/components/marks/Mark.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ const Header = (props) => {

const MarkGroupItem = (props) => {
let { url, title, navigate } = props;
let clickHandler = (e) => navigate.present(e, props);
return (
<div className="section-item" >
<a href="#" target={url} title={url} onClick={(e) => navigate.present(e, props)}>
<a href="#" target={url} title={url} onClick={clickHandler}>
<i className="fa fa-globe" width="24" height="24" /><span>{title}</span>
</a>
</div>
Expand All @@ -29,7 +30,7 @@ const MarkGroupItem = (props) => {

const MarkGroup = (props) => {
const items = props.items.map((v, i) =>
<MarkGroupItem url={v.url} title={v.url} navigate={props.navigate} key={i} />
<MarkGroupItem url={v.url} title={v.title} navigate={props.navigate} key={i} />
);
return (
<div>
Expand Down Expand Up @@ -57,7 +58,9 @@ const MarkSection = ({ model, actions }: Props) => {
} else {
return (
<div className="app-mark-section">
No marks found!
<div className="section-group">
No marks found!
</div>
</div>
);
}
Expand Down
2 changes: 1 addition & 1 deletion src-client/src/components/marks/MarkState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class MarkState {
this.internalPresent(this.rawData);
} else {
let re = new RegExp(args);
let nextState = this.rawData.filter(t => re.exec(t.url));
let nextState = this.rawData.filter(t => re.exec(t.url) || re.exec(t.title));
this.internalPresent(nextState);
}
}
Expand Down

0 comments on commit c219353

Please sign in to comment.