Use configured IPFS gateway URL on contributor profile
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import Controller from '@ember/controller';
|
import Controller from '@ember/controller';
|
||||||
import { computed } from '@ember/object';
|
import { computed } from '@ember/object';
|
||||||
|
import config from 'kredits-web/config/environment';
|
||||||
|
|
||||||
export default Controller.extend({
|
export default Controller.extend({
|
||||||
|
|
||||||
@@ -7,6 +8,10 @@ export default Controller.extend({
|
|||||||
if (this.model.isCore) return 'Core Contributor';
|
if (this.model.isCore) return 'Core Contributor';
|
||||||
if (this.model.totalKreditsEarned <= 5000) return 'Newcomer';
|
if (this.model.totalKreditsEarned <= 5000) return 'Newcomer';
|
||||||
return 'Contributor';
|
return 'Contributor';
|
||||||
})
|
}),
|
||||||
|
|
||||||
|
ipfsGatewayUrl: computed(function() {
|
||||||
|
return config.ipfs.gatewayUrl;
|
||||||
|
}).volatile()
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
<p>
|
<p>
|
||||||
<a href="https://rinkeby.etherscan.io/address/{{model.account}}" class="button small" target="_blank" rel="noopener">Inspect Ethereum transactions</a>
|
<a href="https://rinkeby.etherscan.io/address/{{model.account}}" class="button small" target="_blank" rel="noopener">Inspect Ethereum transactions</a>
|
||||||
{{#if model.ipfsHash}}
|
{{#if model.ipfsHash}}
|
||||||
<a href="https://ipfs.io/ipfs/{{model.ipfsHash}}" class="button small" target="_blank" rel="noopener">Inspect IPFS profile</a>
|
<a href="{{ipfsGatewayUrl}}/{{model.ipfsHash}}" class="button small" target="_blank" rel="noopener">Inspect IPFS profile</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{link-to "Edit profile" "contributors.edit" model class="button small"}}
|
{{link-to "Edit profile" "contributors.edit" model class="button small"}}
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user