Skip to content

Commit

Permalink
Fix capitalisation & punctuation
Browse files Browse the repository at this point in the history
  • Loading branch information
3lviend committed Sep 25, 2024
1 parent 57c4fc2 commit 1da036d
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion public/css/app.min.css

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions public/js/hit.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,19 +99,20 @@ export default class extends Component {
}

headerJSX() {
var meta = `length: ${this.hitLength().toLocaleString()}`;
var length = `length: ${this.hitLength().toLocaleString()}`;
var meta = length.charAt(0).toUpperCase() + length.slice(1);

if (this.props.showQueryCrumbs && this.props.showHitCrumbs) {
// Multiper queries, multiple hits
meta = `hit ${this.props.hit.number} of query ${this.props.query.number}, ` + meta;
meta = `hit ${this.props.hit.number} of query ${this.props.query.number}. ` + meta;
}
else if (this.props.showQueryCrumbs && !this.props.showHitCrumbs) {
// Multiple queries, single hit
meta = `the only hit of query ${this.props.query.number}, ` + meta;
meta = `the only hit of query ${this.props.query.number}. ` + meta;
}
else if (!this.props.showQueryCrumbs && this.props.showHitCrumbs) {
// Single query, multiple hits
meta = `hit ${this.props.hit.number}, ` + meta;
meta = `hit ${this.props.hit.number}. ` + meta;
}

return <div className="section-header border-b border-seqorange flex flex-col sm:flex-row sm:justify-between w-full">
Expand All @@ -122,7 +123,7 @@ export default class extends Component {
</div>
<span className="ml-1">{this.props.hit.title}</span>
</h4>
<span className="label text-sm font-normal text-inherit cursor-text">{meta}</span>
<span className="label first-letter:capitalize text-sm font-normal text-inherit cursor-text">{meta}</span>
</div>;
}

Expand Down
8 changes: 5 additions & 3 deletions public/js/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,18 @@ export class ReportQuery extends Component {
return this.props.query.hits.length;
}
headerJSX() {
var meta = `length: ${this.queryLength().toLocaleString()}`;
var length = `length: ${this.queryLength().toLocaleString()}`;
var meta = length.charAt(0).toUpperCase() + length.slice(1);

if (this.props.showQueryCrumbs) {
meta = `query ${this.props.query.number}, ` + meta;
meta = `query ${this.props.query.number}. ` + meta;
}
return <div className="section-header border-b border-seqorange justify-between w-full flex flex-col sm:flex-row gap-4">
<h3 className="text-base cursor-pointer flex flex-col sm:flex-row items-start">
<strong>Query=<span className="ml-1">{this.props.query.id}</span></strong>
<span className="ml-1">{this.props.query.title}</span>
</h3>
<span className="label text-sm text-right font-normal text-inherit pt-0 px-0">{meta}</span>
<span className="label first-letter:capitalize text-sm text-right font-normal text-inherit pt-0 px-0">{meta}</span>
</div>;
}

Expand Down
2 changes: 1 addition & 1 deletion public/sequenceserver-report.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/sequenceserver-report.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/sequenceserver-search.min.js.map

Large diffs are not rendered by default.

0 comments on commit 1da036d

Please sign in to comment.