Displaying translators as twitter photos
This commit is contained in:
parent
85f471ad08
commit
debcd1808e
@ -229,6 +229,16 @@ class Server {
|
|||||||
res.status(500).end();
|
res.status(500).end();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
.get(config.MEMPOOL.API_URL_PREFIX + 'translators/images/:id', async (req, res) => {
|
||||||
|
try {
|
||||||
|
const response = await axios.get('https://mempool.space/api/v1/translators/images/' + req.params.id, {
|
||||||
|
responseType: 'stream', timeout: 10000
|
||||||
|
});
|
||||||
|
response.data.pipe(res);
|
||||||
|
} catch (e) {
|
||||||
|
res.status(500).end();
|
||||||
|
}
|
||||||
|
})
|
||||||
;
|
;
|
||||||
|
|
||||||
if (config.STATISTICS.ENABLED && config.DATABASE.ENABLED) {
|
if (config.STATISTICS.ENABLED && config.DATABASE.ENABLED) {
|
||||||
|
@ -165,16 +165,17 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ng-container *ngIf="translators$ | async | keyvalue as translators else loadingSponsors">
|
<ng-container *ngIf="translators$ | async | keyvalue as translators else loadingSponsors">
|
||||||
<div class="maintainers">
|
<div class="community-sponsor">
|
||||||
<h3 i18n="about.translators">Translators</h3>
|
<h3 i18n="about.translators">Translators</h3>
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<ng-template ngFor let-translator [ngForOf]="translators">
|
<ng-template ngFor let-translator [ngForOf]="translators">
|
||||||
<a [href]="'https://twitter.com/' + translator.value" target="_blank" [title]="translator.key">
|
<a [href]="'https://twitter.com/' + translator.value" target="_blank" [title]="translator.key">
|
||||||
<span>{{ translator.value }}</span>
|
<img class="image" [src]="'/api/v1/translators/images/' + translator.value" />
|
||||||
</a>,
|
</a>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<br>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container *ngIf="allContributors$ | async as contributors else loadingSponsors">
|
<ng-container *ngIf="allContributors$ | async as contributors else loadingSponsors">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user