Skip to content

Commit

Permalink
feat(ui): add integration details external links
Browse files Browse the repository at this point in the history
  • Loading branch information
gabaldon committed Mar 1, 2022
1 parent 6cea900 commit 9ef3e60
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
26 changes: 20 additions & 6 deletions packages/ui/components/IntegrationDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@
{{ $t('data_feed_details.integration_details_description', [network]) }}
</p>
<div class="bottom">
<Button class="btn">{{
$t('data_feed_details.integrate_proxy')
}}</Button>
<Button class="btn">{{
$t('data_feed_details.integrate_directly')
}}</Button>
<a :href="integrateThroughProxyBaseUrl" target="_blank">
<Button class="btn">
{{ $t('data_feed_details.integrate_proxy') }}</Button
>
</a>
<a :href="integrateDirectlyBaseUrl" target="_blank">
<Button class="btn">
{{ $t('data_feed_details.integrate_directly') }}</Button
>
</a>
<p class="subtitle testing">
{{ $t('data_feed_details.recommended_for_testing') }}
</p>
Expand Down Expand Up @@ -45,6 +49,10 @@
</template>

<script>
import {
integrateDirectlyBaseUrl,
integrateThroughProxyBaseUrl,
} from '../constants'
export default {
props: {
network: {
Expand Down Expand Up @@ -72,6 +80,12 @@ export default {
required: true,
},
},
data() {
return {
integrateDirectlyBaseUrl,
integrateThroughProxyBaseUrl,
}
},
}
</script>

Expand Down
4 changes: 4 additions & 0 deletions packages/ui/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ export const requestDataFeedUrl = 'https://witnet.io'
export const documentationUrl = 'https://docs.witnet.io/'
export const useDataFeedUrl = 'https://docs.witnet.io/'
export const witnetUrl = 'https://witnet.io'
export const integrateDirectlyBaseUrl =
'https://new-docs.witnet.io/DMN1zqRk2UYuGzmQGcMt/smart-contracts/witnet-data-feeds/using-witnet-data-feeds#reading-last-price-and-timestamp-from-a-price-feed-contract-serving-a-given-currency-pair'
export const integrateThroughProxyBaseUrl =
'https://new-docs.witnet.io/DMN1zqRk2UYuGzmQGcMt/smart-contracts/witnet-data-feeds/using-witnet-data-feeds#reading-multiple-currency-pairs-from-the-router'

export const languages = [
{
Expand Down

0 comments on commit 9ef3e60

Please sign in to comment.