Skip to content

Commit

Permalink
Merge pull request #2495 from threefoldtech/development_configure_manual
Browse files Browse the repository at this point in the history
Configure manual as a global prop
  • Loading branch information
zaelgohary authored Apr 1, 2024
2 parents eb5ebff + 5d4f741 commit 5c12959
Show file tree
Hide file tree
Showing 35 changed files with 46 additions and 51 deletions.
1 change: 1 addition & 0 deletions packages/playground/public/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ window.env = {
STATS_URL: "https://stats.dev.grid.tf",
TIMEOUT: +"10000",
PAGE_SIZE: +"20",
MANUAL_URL: "https://www.manual.grid.tf",
};
6 changes: 3 additions & 3 deletions packages/playground/scripts/build-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ STELLAR_NETWORK="${STELLAR_NETWORK:=test}"
TIMEOUT="${TIMEOUT:=10000}"
PAGE_SIZE="${PAGE_SIZE:=20}"
MINTING_URL="https://alpha.minting.tfchain.grid.tf"
STATS_URL="https://stats.grid.tf"

MANUAL_URL="${MANUAL_URL:-https://www.manual.grid.tf}"

STELLAR_ENV_Vars=(
STELLAR_HORIZON_URL
Expand Down Expand Up @@ -93,7 +92,8 @@ window.env = {
MINTING_URL: '$MINTING_URL',
STATS_URL: '$STATS_URL',
TIMEOUT: +'$TIMEOUT',
PAGE_SIZE: +'$PAGE_SIZE'
PAGE_SIZE: +'$PAGE_SIZE',
MANUAL_URL: '$MANUAL_URL'
};
"

Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/components/caprover_worker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<input-tooltip
inline
tooltip="Click to know more about dedicated machines."
href="https://www.manual.grid.tf/documentation/dashboard/deploy/dedicated_machines.html"
:href="`${MANUAL_URL}/documentation/dashboard/deploy/dedicated_machines.html`"
>
<v-switch color="primary" inset label="Dedicated" v-model="$props.modelValue.dedicated" />
</input-tooltip>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
Metaverse and more.
</p>
<div class="d-flex justify-center align-center flex-wrap my-4">
<v-btn color="secondary" variant="outlined" class="mr-2" target="_blank" href="https://manual.grid.tf/">
<v-btn color="secondary" variant="outlined" class="mr-2" target="_blank" :href="MANUAL_URL">
Learn about the grid
</v-btn>
</div>
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/components/deposit_dialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<v-btn
variant="outlined"
color="secondary"
href="https://www.manual.grid.tf/documentation/threefold_token/tft_bridges/tft_bridges.html"
:href="`${MANUAL_URL}/documentation/threefold_token/tft_bridges/tft_bridges.html`"
target="_blank"
>Learn more?</v-btn
>
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/components/funds_card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
icon
small
@click.stop
href="https://www.manual.grid.tf/documentation/threefold_token/buy_sell_tft/buy_sell_tft.html"
:href="`${MANUAL_URL}/documentation/threefold_token/buy_sell_tft/buy_sell_tft.html`"
target="_blank"
><v-icon>mdi-information-outline</v-icon></v-btn
>
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/components/k8s_worker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
<input-tooltip
inline
tooltip="Click to know more about dedicated machines."
href="https://www.manual.grid.tf/documentation/dashboard/deploy/dedicated_machines.html"
:href="`${MANUAL_URL}/documentation/dashboard/deploy/dedicated_machines.html`"
>
<v-switch color="primary" inset label="Dedicated" v-model="$props.modelValue.dedicated" />
</input-tooltip>
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/components/logged_in_landing.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
</p>

<div class="d-flex justify-center align-center flex-wrap my-4">
<v-btn color="secondary" variant="outlined" class="mr-2" target="_blank" href="https://manual.grid.tf/">
<v-btn color="secondary" variant="outlined" class="mr-2" target="_blank" :href="MANUAL_URL">
Learn about the grid
</v-btn>
</div>
Expand Down
6 changes: 3 additions & 3 deletions packages/playground/src/components/main_footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,23 @@
<div>
<a
color="error"
href="https://www.manual.grid.tf/documentation/threefold_token/buy_sell_tft/buy_sell_tft.html"
:href="`${MANUAL_URL}/documentation/threefold_token/buy_sell_tft/buy_sell_tft.html`"
class="app-link text-subtitle-2"
target="_blank"
>Buy the Token</a
>
</div>
<div>
<a
href="https://www.manual.grid.tf/documentation/farmers/farmers.html"
:href="`${MANUAL_URL}/documentation/farmers/farmers.html`"
class="app-link text-subtitle-2"
target="_blank"
>Start Farming</a
>
</div>
<div>
<a
href="https://manual.grid.tf/knowledge_base/about/governance.html"
:href="`${MANUAL_URL}/knowledge_base/about/governance.html`"
class="app-link text-subtitle-2"
target="_blank"
>Governance</a
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/components/weblet_layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
</div>
</div>
<a href="https://www.manual.grid.tf/knowledge_base/cloud/pricing/pricing.html" target="_blank" class="app-link">
<a :href="`${MANUAL_URL}/knowledge_base/cloud/pricing/pricing.html`" target="_blank" class="app-link">
Learn more about the pricing and how to unlock discounts.
</a>
</v-alert>
Expand Down
3 changes: 3 additions & 0 deletions packages/playground/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,7 @@ function defineGlobalComponents(app: App<Element>) {

function defineGlobalProps(app: App<Element>) {
app.config.globalProperties.validators = validators;
app.config.globalProperties.MANUAL_URL = window.env.MANUAL_URL;
}

export const MANUAL_URL = window.env.MANUAL_URL;
6 changes: 2 additions & 4 deletions packages/playground/src/dashboard/bridge_view.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,14 @@ onMounted(async () => {
});
function navigation() {
window.open(
"https://www.manual.grid.tf/documentation/threefold_token/tft_bridges/tfchain_stellar_bridge.html",
"_blank",
);
window.open(`${MANUAL_URL}/documentation/threefold_token/tft_bridges/tfchain_stellar_bridge.html`, "_blank");
}
</script>
<script lang="ts">
import DepositDialog from "@/components/deposit_dialog.vue";
import WithdrawDialog from "@/components/withdraw_dialog.vue";
import { MANUAL_URL } from "@/config";
export default {
name: "Bridge",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,7 @@
<li>
{{ activeTab == 1 ? "You receive " : "You'll receive " }} 50% discount
{{ activeTab == 1 ? " as you reserve the " : " if you reserve an " }} entire
<a
target="_blank"
href="https://manual.grid.tf/dashboard/deploy/dedicated_machines.html#billing--pricing"
>
<a target="_blank" :href="`${MANUAL_URL}/dashboard/deploy/dedicated_machines.html#billing--pricing`">
node
</a>
</li>
Expand All @@ -55,7 +52,7 @@
as per the
<a
target="_blank"
href="https://manual.grid.tf/wiki/cloudunits/pricing/staking_discount_levels.html#staking-discount-levels"
:href="`${MANUAL_URL}/wiki/cloudunits/pricing/staking_discount_levels.html#staking-discount-levels`"
>
<p style="display: inline">staking discounts</p>
</a>
Expand Down
4 changes: 1 addition & 3 deletions packages/playground/src/dashboard/dao_view.vue
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,7 @@
<span>
If the vote count is insufficient and the time limit is reached, the proposal will be rejected.
</span>
<a href="https://www.manual.grid.tf/documentation/dashboard/tfchain/tf_dao.html" target="_blank"
>How to vote?</a
>
<a :href="`${MANUAL_URL}/documentation/dashboard/tfchain/tf_dao.html`" target="_blank">How to vote?</a>
<br />
<br />
<h3>How do we count weight:</h3>
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/dashboard/twin_view.vue
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
Scan the QR code using
<a
class="app-link"
href="https://www.manual.grid.tf/documentation/threefold_token/storing_tft/tf_connect_app.html"
:href="`${MANUAL_URL}/documentation/threefold_token/storing_tft/tf_connect_app.html`"
target="_blank"
>
ThreeFold Connect
Expand Down
2 changes: 2 additions & 0 deletions packages/playground/src/global-components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ declare module "@vue/runtime-core" {

interface ComponentCustomProperties {
validators: typeof validators;
MANUAL_URL: typeof MANUAL_URL;
}
}

Expand All @@ -52,6 +53,7 @@ declare global {
STATS_URL: string;
TIMEOUT: number;
PAGE_SIZE: number;
MANUAL_URL: string;
};
}
}
2 changes: 1 addition & 1 deletion packages/playground/src/weblets/freeflow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<input-tooltip
inline
tooltip="Click to know more about dedicated machines."
href="https://www.manual.grid.tf/documentation/dashboard/deploy/dedicated_machines.html"
:href="`${MANUAL_URL}/documentation/dashboard/deploy/dedicated_machines.html`"
>
<v-switch color="primary" inset label="Dedicated" v-model="dedicated" hide-details />
</input-tooltip>
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/weblets/full_vm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<input-tooltip
inline
tooltip="Click to know more about dedicated machines."
href="https://www.manual.grid.tf/documentation/dashboard/deploy/dedicated_machines.html"
:href="`${MANUAL_URL}/documentation/dashboard/deploy/dedicated_machines.html`"
>
<v-switch color="primary" inset label="Dedicated" v-model="dedicated" hide-details />
</input-tooltip>
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/weblets/micro_vm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<input-tooltip
inline
tooltip="Click to know more about dedicated machines."
href="https://www.manual.grid.tf/documentation/dashboard/deploy/dedicated_machines.html"
:href="`${MANUAL_URL}/documentation/dashboard/deploy/dedicated_machines.html`"
>
<v-switch color="primary" inset label="Dedicated" v-model="dedicated" hide-details />
</input-tooltip>
Expand Down
10 changes: 3 additions & 7 deletions packages/playground/src/weblets/profile_manager.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
height="24px"
width="24px"
class="ml-2"
href="https://www.manual.grid.tf/documentation/developers/tfchain/tfchain.html#contract-locking"
:href="`${MANUAL_URL}/documentation/developers/tfchain/tfchain.html#contract-locking`"
target="_blank"
/>
</template>
Expand Down Expand Up @@ -69,11 +69,7 @@
<v-alert variant="tonal" class="mb-6">
<p :style="{ maxWidth: '880px' }">
Please visit
<a
class="app-link"
href="https://manual.grid.tf/threefold_token/storing_tft/tf_connect_app.html"
target="_blank"
>
<a class="app-link" :href="`${MANUAL_URL}/threefold_token/storing_tft/tf_connect_app.html`" target="_blank">
the manual
</a>
get started.
Expand Down Expand Up @@ -396,7 +392,7 @@
Scan the QR code using
<a
class="app-link"
href="https://www.manual.grid.tf/documentation/threefold_token/storing_tft/tf_connect_app.html"
:href="`${MANUAL_URL}/documentation/threefold_token/storing_tft/tf_connect_app.html`"
target="_blank"
>
ThreeFold Connect
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/weblets/tf_algorand.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
<input-tooltip
inline
tooltip="Click to know more about dedicated machines."
href="https://www.manual.grid.tf/documentation/dashboard/deploy/dedicated_machines.html"
:href="`${MANUAL_URL}/documentation/dashboard/deploy/dedicated_machines.html`"
>
<v-switch color="primary" inset label="Dedicated" v-model="dedicated" hide-details />
</input-tooltip>
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/weblets/tf_caprover.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
If you don't know what the Captain root domain is, make sure to read the
<a
target="_blank"
href="https://www.manual.grid.tf/documentation/dashboard/solutions/caprover.html"
:href="`${MANUAL_URL}/documentation/dashboard/solutions/caprover.html`"
:style="{ color: 'inherit' }"
>
quick start documentation.
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/weblets/tf_casperlabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<input-tooltip
inline
tooltip="Click to know more about dedicated machines."
href="https://www.manual.grid.tf/documentation/dashboard/deploy/dedicated_machines.html"
:href="`${MANUAL_URL}/documentation/dashboard/deploy/dedicated_machines.html`"
>
<v-switch color="primary" inset label="Dedicated" v-model="dedicated" hide-details />
</input-tooltip>
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/weblets/tf_discourse.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<input-tooltip
inline
tooltip="Click to know more about dedicated machines."
href="https://www.manual.grid.tf/documentation/dashboard/deploy/dedicated_machines.html"
:href="`${MANUAL_URL}/documentation/dashboard/deploy/dedicated_machines.html`"
>
<v-switch color="primary" inset label="Dedicated" v-model="dedicated" hide-details />
</input-tooltip>
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/weblets/tf_funkwhale.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
<input-tooltip
inline
tooltip="Click to know more about dedicated machines."
href="https://www.manual.grid.tf/documentation/dashboard/deploy/dedicated_machines.html"
:href="`${MANUAL_URL}/documentation/dashboard/deploy/dedicated_machines.html`"
>
<v-switch color="primary" inset label="Dedicated" v-model="dedicated" hide-details />
</input-tooltip>
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/weblets/tf_mattermost.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<input-tooltip
inline
tooltip="Click to know more about dedicated machines."
href="https://www.manual.grid.tf/documentation/dashboard/deploy/dedicated_machines.html"
:href="`${MANUAL_URL}/documentation/dashboard/deploy/dedicated_machines.html`"
>
<v-switch color="primary" inset label="Dedicated" v-model="dedicated" hide-details />
</input-tooltip>
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/weblets/tf_nextcloud.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<input-tooltip
inline
tooltip="Click to know more about dedicated machines."
href="https://www.manual.grid.tf/documentation/dashboard/deploy/dedicated_machines.html"
:href="`${MANUAL_URL}/documentation/dashboard/deploy/dedicated_machines.html`"
>
<v-switch color="primary" inset label="Dedicated" v-model="dedicated" hide-details />
</input-tooltip>
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/weblets/tf_node_pilot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<input-tooltip
inline
tooltip="Click to know more about dedicated machines."
href="https://www.manual.grid.tf/documentation/dashboard/deploy/dedicated_machines.html"
:href="`${MANUAL_URL}/documentation/dashboard/deploy/dedicated_machines.html`"
>
<v-switch color="primary" inset label="Dedicated" v-model="dedicated" hide-details />
</input-tooltip>
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/weblets/tf_owncloud.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
<input-tooltip
inline
tooltip="Click to know more about dedicated machines."
href="https://www.manual.grid.tf/documentation/dashboard/deploy/dedicated_machines.html"
:href="`${MANUAL_URL}/documentation/dashboard/deploy/dedicated_machines.html`"
>
<v-switch color="primary" inset label="Dedicated" v-model="dedicated" hide-details />
</input-tooltip>
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/weblets/tf_peertube.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<input-tooltip
inline
tooltip="Click to know more about dedicated machines."
href="https://www.manual.grid.tf/documentation/dashboard/deploy/dedicated_machines.html"
:href="`${MANUAL_URL}/documentation/dashboard/deploy/dedicated_machines.html`"
>
<v-switch color="primary" inset label="Dedicated" v-model="dedicated" hide-details />
</input-tooltip>
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/weblets/tf_presearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<input-tooltip
inline
tooltip="Click to know more about dedicated machines."
href="https://www.manual.grid.tf/documentation/dashboard/deploy/dedicated_machines.html"
:href="`${MANUAL_URL}/documentation/dashboard/deploy/dedicated_machines.html`"
>
<v-switch color="primary" inset label="Dedicated" v-model="dedicated" hide-details />
</input-tooltip>
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/weblets/tf_subsquid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<input-tooltip
inline
tooltip="Click to know more about dedicated machines."
href="https://www.manual.grid.tf/documentation/dashboard/deploy/dedicated_machines.html"
:href="`${MANUAL_URL}/documentation/dashboard/deploy/dedicated_machines.html`"
>
<v-switch color="primary" inset label="Dedicated" v-model="dedicated" hide-details />
</input-tooltip>
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/weblets/tf_taiga.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
<input-tooltip
inline
tooltip="Click to know more about dedicated machines."
href="https://www.manual.grid.tf/documentation/dashboard/deploy/dedicated_machines.html"
:href="`${MANUAL_URL}/documentation/dashboard/deploy/dedicated_machines.html`"
>
<v-switch color="primary" inset label="Dedicated" v-model="dedicated" hide-details />
</input-tooltip>
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/weblets/tf_umbrel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
<input-tooltip
inline
tooltip="Click to know more about dedicated machines."
href="https://www.manual.grid.tf/documentation/dashboard/deploy/dedicated_machines.html"
:href="`${MANUAL_URL}/documentation/dashboard/deploy/dedicated_machines.html`"
>
<v-switch color="primary" inset label="Dedicated" v-model="dedicated" hide-details />
</input-tooltip>
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/weblets/tf_wordpress.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
<input-tooltip
inline
tooltip="Click to know more about dedicated machines."
href="https://www.manual.grid.tf/documentation/dashboard/deploy/dedicated_machines.html"
:href="`${MANUAL_URL}/documentation/dashboard/deploy/dedicated_machines.html`"
>
<v-switch color="primary" inset label="Dedicated" v-model="dedicated" hide-details />
</input-tooltip>
Expand Down

0 comments on commit 5c12959

Please sign in to comment.