Skip to content

Commit

Permalink
Rename Colophon to About
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-martinek committed Jun 28, 2022
1 parent bc5d972 commit 9084c7d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/js/components/position/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export class Position extends React.Component<IProps> {
const ro = this.props.readingOrder;
if (ro.length === 0) return null;

const colophon = Object.values(this.props.documents).find(doc => doc.role === DocRole.Colophon);
const about = Object.values(this.props.documents).find(doc => doc.role === DocRole.About);

return (
<SeqReturn
Expand All @@ -105,7 +105,7 @@ export class Position extends React.Component<IProps> {
setPosition={this.setPosition}
sequential={this.props.sequential}
startLink={this.props.documents[ro[0]].file}
colophonLink={colophon ? colophon.file : null}
aboutLink={about ? about.file : null}
/>
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/js/components/seq-return.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ interface IProps extends WithTranslation {
docRole: DocRole;
setPosition(resetSequence: boolean): void;
startLink: string;
colophonLink: string | null;
aboutLink: string | null;
}

interface IState {
Expand Down
8 changes: 4 additions & 4 deletions src/js/components/toc/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ function Toc(props: Props) {
});
}

if (docInfo.links.colophon !== null) {
if (docInfo.links.about !== null) {
otherLinks.push({
classes: docInfo.role === DocRole.Colophon ? 'current-chapter' : undefined,
href: docInfo.links.colophon,
text: t('colophon'),
classes: docInfo.role === DocRole.About ? 'current-chapter' : undefined,
href: docInfo.links.about,
text: t('about'),
});
}

Expand Down
4 changes: 2 additions & 2 deletions src/js/doc-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function getRole() {
if (value === DocRole.Chapter) return DocRole.Chapter;
if (value === DocRole.Break) return DocRole.Break;
if (value === DocRole.Cover) return DocRole.Cover;
if (value === DocRole.Colophon) return DocRole.Colophon;
if (value === DocRole.About) return DocRole.About;
else return DocRole.Other;
}

Expand Down Expand Up @@ -82,7 +82,7 @@ export const links = {
manifest: getLinkRel(LinkRel.Publication),
prev: getLinkRel(LinkRel.Prev),
next: getLinkRel(LinkRel.Next),
colophon: getLinkRel(LinkRel.Colophon),
about: getLinkRel(LinkRel.About),
license: getLinkRel(LinkRel.License),
};

Expand Down

0 comments on commit 9084c7d

Please sign in to comment.