Use configured IPFS gateway URL for button

This commit is contained in:
2019-09-05 11:53:20 +02:00
parent f8f1ad644c
commit 494b5d9bdd
2 changed files with 14 additions and 2 deletions
@@ -0,0 +1,12 @@
import Controller from '@ember/controller';
import { computed } from '@ember/object';
import config from 'kredits-web/config/environment';
export default Controller.extend({
ipfsGatewayUrl: computed(function() {
return config.ipfs.gatewayUrl;
}).volatile()
});
@@ -42,7 +42,7 @@
kredits will be issued.
</p>
<p>
{{link-to "Re-submit contribution" "signup" class="button small green"}}.
{{link-to "Re-submit contribution" "signup" class="button small green"}}.
</p>
</div>
{{/if}}
@@ -51,7 +51,7 @@
<div class="actions">
<p>
{{#if model.ipfsHash}}
<a href="https://ipfs.io/ipfs/{{model.ipfsHash}}"
<a href="{{ipfsGatewayUrl}}/{{model.ipfsHash}}"
class="button small" target="_blank" rel="noopener">
Inspect IPFS data
</a>