Add sort fields to rss.

- #348
This commit is contained in:
Dessalines 2019-12-01 22:20:01 -08:00
parent 32c1d56bc7
commit fab840a759
3 changed files with 12 additions and 3 deletions

View File

@ -175,7 +175,10 @@ export class Community extends Component<any, State> {
<div class="mb-2">
<SortSelect sort={this.state.sort} onChange={this.handleSortChange} />
<a
href={`${document.location.origin}/feeds/c/${this.state.communityName}.xml`}
href={`/feeds/c/${this.state.communityName}.xml?sort=${
SortType[this.state.sort]
}`}
target="_blank"
>
<svg class="icon mx-2 text-muted small">
<use xlinkHref="#icon-rss">#</use>

View File

@ -435,7 +435,10 @@ export class Main extends Component<any, MainState> {
<SortSelect sort={this.state.sort} onChange={this.handleSortChange} />
</span>
{this.state.type_ == ListingType.All && (
<a href={`${document.location.origin}/feeds/all.xml`}>
<a
href={`/feeds/all.xml?sort=${SortType[this.state.sort]}`}
target="_blank"
>
<svg class="icon mx-1 text-muted small">
<use xlinkHref="#icon-rss">#</use>
</svg>

View File

@ -250,7 +250,10 @@ export class User extends Component<any, UserState> {
/>
</span>
<a
href={`${document.location.origin}/feeds/u/${this.state.username}.xml`}
href={`/feeds/u/${this.state.username}.xml?sort=${
SortType[this.state.sort]
}`}
target="_blank"
>
<svg class="icon mx-2 text-muted small">
<use xlinkHref="#icon-rss">#</use>