}>
-
+
{fetchingUser ? (
diff --git a/src/components/instance/config/Details.js b/src/components/instance/config/Details.js
index 797125dbc..056bf3afb 100644
--- a/src/components/instance/config/Details.js
+++ b/src/components/instance/config/Details.js
@@ -21,9 +21,9 @@ function Details({ clusterNodeName, instanceConfig }) {
const authHeader = auth?.user ? `${btoa(`${auth.user}:${auth.pass}`)}` : '...';
const iopsString = is_local ? 'HARDWARE LIMIT' : `${storage?.iops}`;
const formatted_creation_date = creation_date ? new Date(creation_date).toLocaleDateString() : 'N/A';
- const { hostname } = window.location;
+ const { hostname, origin } = window.location;
- const urlObject = new URL(url);
+ const urlObject = new URL(config.is_local_studio ? origin : url);
const operationsApiURL = !config.is_local_studio
? `${instanceConfig.operationsApi?.network?.securePort ? 'https://' : 'http://'}${urlObject.hostname}:${
diff --git a/src/components/instances/new/Confirm.js b/src/components/instances/new/Confirm.js
index ccf078ea2..7411449b3 100644
--- a/src/components/instances/new/Confirm.js
+++ b/src/components/instances/new/Confirm.js
@@ -24,6 +24,7 @@ function Confirm() {
const is_unpaid = useStoreState(appState, (s) => s.customer.is_unpaid);
const unlimited_local_install = useStoreState(appState, (s) => s.customer.unlimited_local_install);
const stripeCoupons = useStoreState(appState, (s) => s.customer?.stripe_coupons);
+ const usedFreetrial = stripeCoupons.find((c) => c.name === 'FREETRIAL');
const subdomain = useStoreState(appState, (s) => s.customer?.subdomain);
const totalPrice = (newInstance?.compute_price || 0) + (newInstance?.storage_price || 0);
const allPrePaid = newInstance.compute_subscription_id && (newInstance.is_local || newInstance.storage_subscription_id);
@@ -171,19 +172,6 @@ function Confirm() {
{totalPriceString}
- {newInstance.trial_period_days && (
- <>
-
-
-
- Free Trial Period
-
-
- {newInstance.trial_period_days} Days
-
-
- >
- )}
@@ -191,13 +179,21 @@ function Confirm() {
) : unlimited_local_install ? (
- ) : stripeCoupons?.length ? (
-
- This organization has {stripeCoupons.length} coupon{stripeCoupons.length > 1 && 's'} on file, good for a total product credit of{' '}
- ${stripeCoupons.reduce((total, coupon) => total + parseInt(coupon.amount_off / 100, 10), 0)}. Charges beyond that amount will be billed to your card.
-
) : (
+ {stripeCoupons?.length > 0 && (
+
+ This organization has {stripeCoupons.length} coupon{stripeCoupons.length > 1 && 's'} on file, good for a total product credit of{' '}
+ ${stripeCoupons.reduce((total, coupon) => total + parseInt(coupon.amount_off / 100, 10), 0)}. Charges beyond that amount will be billed to your card.
+
+ )}
+ {!usedFreetrial && (
+
+ This organization is entitled to a credit equal to 1 month of 1GB RAM/1GB Disk (a $33 value) with coupon code FREETRIAL. Enter the
+ code into the form below to receive the credit.
+
+ )}
+
)}
diff --git a/src/components/instances/new/MetaLocal.js b/src/components/instances/new/MetaLocal.js
index 5c8d6af76..e5d06bbdd 100644
--- a/src/components/instances/new/MetaLocal.js
+++ b/src/components/instances/new/MetaLocal.js
@@ -208,7 +208,7 @@ function MetaLocal() {
{formState.url && (
-
+
)}
diff --git a/src/components/instances/new/Payment.js b/src/components/instances/new/Payment.js
index a3d0d8503..e823ece2a 100644
--- a/src/components/instances/new/Payment.js
+++ b/src/components/instances/new/Payment.js
@@ -20,6 +20,8 @@ function Payment() {
const auth = useStoreState(appState, (s) => s.auth);
const hasCard = useStoreState(appState, (s) => s.hasCard);
const stripeId = useStoreState(appState, (s) => s.customer?.stripe_id);
+ const stripeCoupons = useStoreState(appState, (s) => s.customer?.stripe_coupons);
+ const usedFreetrial = stripeCoupons.find((c) => c.name === 'FREETRIAL');
const products = useStoreState(appState, (s) => s.products);
const [newInstance] = useNewInstance({});
const [formData, setFormData] = useState({ postal_code: false, card: false, expire: false, cvc: false });
@@ -105,13 +107,7 @@ function Payment() {
{computeProduct?.value?.compute_price ? (
- The selected instance type has a cost of {computeProduct?.value?.compute_price_string_with_interval}
- {computeProduct?.value?.trial_period_days && (
-
- , which will begin after your {computeProduct?.value?.trial_period_days} free trial
-
- )}
- .
+ The selected instance type has a cost of {computeProduct?.value?.compute_price_string_with_interval}.
) : null}
{storageProduct?.value?.storage_price ? (
@@ -119,7 +115,13 @@ function Payment() {
The selected
storage size has a cost of
{storageProduct?.value?.storage_price_string_with_interval}.
) : null}
- Please add a credit card to your account using the form below. If you registered using a promo code, your card will not be charged until your promo credits run out.
+ {!usedFreetrial && (
+
+ This organization is entitled to a credit equal to 1 month of 1GB RAM/1GB Disk (a $33 value) with coupon code FREETRIAL. Enter the
+ code into the form on the next page to receive the credit.
+
+ )}
+ Please add a credit card to your account using the form below. If you have a coupon code, your card will not be charged until your credits run out.