diff --git a/src/_components/layout/Header.vue b/src/_components/layout/Header.vue index a180d39..0755e23 100644 --- a/src/_components/layout/Header.vue +++ b/src/_components/layout/Header.vue @@ -2,7 +2,9 @@ +
+ +

+ {{ + flexRegion + ? messages.field_label_flex_region_description + : messages.field_label_exact_region_description + }} +

+
+
@@ -233,6 +328,9 @@ export default { paymentMethodType: null, paymentInfo: null, }, + forkHost: '', + syncAccount: true, + launchLock: false, sendErrors: true, sendMetrics: true, }, @@ -245,11 +343,20 @@ export default { region: '', sshKey: '', }, + flexRegion: true, cloudRegionUuid: '', + networkType: 'bubble', + submitted: false, }), computed: { - ...mapState('system', ['configs', 'messages', 'locales', 'timezones']), + ...mapState('system', [ + 'configs', + 'messages', + 'locales', + 'timezones', + 'detectedTimezone', + ]), ...mapState('domains', ['domains']), ...mapState('networks', ['nearestRegions', 'newNodeNotification']), ...mapState('footprints', ['footprints']), @@ -267,6 +374,19 @@ export default { return tz_objects; }, + networkTypeOptions: function() { + return [ + { + name: this.messages.field_label_network_type_regular, + value: 'bubble', + }, + { + name: this.messages.field_label_network_type_fork, + value: 'fork', + }, + ]; + }, + isComplete() { return ( (this.accountPlan.name !== '' || this.accountPlan.forkHost !== '') && @@ -301,6 +421,16 @@ export default { })) : []; }, + + showForkOption() { + return ( + this.configs && + this.configs.sageLauncher && + this.configs.sageLauncher === true && + this.user && + this.user.admin === true + ); + }, }, methods: { @@ -309,6 +439,7 @@ export default { ...mapActions('footprints', ['getAllFootprints']), ...mapActions('users', ['listSshKeysByUserId']), ...mapGetters('networks', ['loading']), + ...mapActions('paymentMethods', ['getAllAccountPaymentMethods']), setAccountPaymentMethod(apm) { this.accountPlan.paymentMethodObject = { @@ -348,6 +479,11 @@ export default { messages: this.messages, errors: this.errors, }); + this.getAllAccountPaymentMethods({ + userId: currentUser.uuid, + messages: this.messages, + errors: this.errors, + }); this.onUpdateSSH(); }, @@ -446,6 +582,7 @@ export default { this.defaults.domain = doms[0].name; } }, + detectedTimezone(tz) { if (tz && tz.timeZoneId) { if ( @@ -457,6 +594,7 @@ export default { this.defaults.timezone = tz.timeZoneId; } }, + detectedLocale(loc) { if (loc) { if (this.accountPlan.locale === null || this.accountPlan.locale === '') @@ -464,57 +602,16 @@ export default { this.defaults.locale = loc; } }, + newNodeNotification(nn) { if (nn && nn.uuid) { - this.$router.push({ path: '/new_pages/launching-bubble/' + nn.networkName }); + this.$router.push({ + path: '/launching-bubble/' + nn.networkName, + }); this.submitted = false; } }, - nearestRegions(regions) { - if (regions) { - this.regions = regions; - if ( - this.cloudRegionUuid === null || - typeof regions.find((r) => r.uuid === this.cloudRegionUuid) === - 'undefined' - ) { - this.cloudRegionUuid = regions[0].uuid; - } - if ( - this.defaults.region === '' || - typeof regions.find((r) => r.uuid === this.defaults.region.uuid) === - 'undefined' - ) { - this.defaults.region = regions[0]; - } - } - }, - domains(doms) { - if (doms && doms[0]) { - if (this.accountPlan.domain == null || this.accountPlan.domain === '') - this.accountPlan.domain = doms[0].name; - this.defaults.domain = doms[0].name; - } - }, - detectedTimezone(tz) { - if (tz && tz.timeZoneId) { - if ( - this.accountPlan.timezone == null || - this.accountPlan.timezone === '' - ) - this.accountPlan.timezone = tz.timeZoneId; - if (this.defaults.timezone == null || this.defaults.timezone === '') - this.defaults.timezone = tz.timeZoneId; - } - }, - detectedLocale(loc) { - if (loc) { - if (this.accountPlan.locale === null || this.accountPlan.locale === '') - this.accountPlan.locale = loc; - this.defaults.locale = loc; - } - }, nearestRegions(regions) { if (regions) { this.regions = regions; @@ -534,6 +631,7 @@ export default { } } }, + accountPaymentMethods(pms) { if (pms) { const payMethods = []; diff --git a/src/_components/modals/index.js b/src/_components/modals/index.js index 249dd20..b8323d1 100644 --- a/src/_components/modals/index.js +++ b/src/_components/modals/index.js @@ -2,5 +2,5 @@ * Copyright (c) 2020 Bubble, Inc. All rights reserved. * For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ */ -export { default as AdvancedSettingsModal } from './AdvancedSettings'; +export { default as LaunchBubbleSettingsModal } from './LaunchBubbleSettingsModal'; export { default as AddSSHKeyModal } from './AddSshKey'; diff --git a/src/_helpers/util.js b/src/_helpers/util.js index 7b03530..af8c9ed 100644 --- a/src/_helpers/util.js +++ b/src/_helpers/util.js @@ -314,7 +314,7 @@ export const util = { }, validateAccount: function (vue) { - vue.me = vue.$route.path.startsWith('/me/') || vue.$route.path.startsWith('/new_pages/me/'); + vue.me = vue.$route.path.startsWith('/me/'); if (vue.me) { vue.linkPrefix = '/me'; if (vue.currentUser === null) { diff --git a/src/_pages/main/bubble/LaunchBubble.vue b/src/_pages/main/bubble/LaunchBubble.vue index dba0473..65794f4 100644 --- a/src/_pages/main/bubble/LaunchBubble.vue +++ b/src/_pages/main/bubble/LaunchBubble.vue @@ -2,7 +2,10 @@ @@ -58,28 +61,150 @@