web/satellite: migrate CLIInstall component to use SFC composition api
Change-Id: Ic72c4e229ddc218fe8984b72d03450d8a9b50295
This commit is contained in:
parent
401c8aaf99
commit
670d9fdc6b
@ -123,11 +123,10 @@
|
|||||||
</CLIFlowContainer>
|
</CLIFlowContainer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script setup lang="ts">
|
||||||
import { Component, Vue } from 'vue-property-decorator';
|
|
||||||
|
|
||||||
import { RouteConfig } from '@/router';
|
import { RouteConfig } from '@/router';
|
||||||
import { AnalyticsHttpApi } from '@/api/analytics';
|
import { AnalyticsHttpApi } from '@/api/analytics';
|
||||||
|
import { useRouter } from '@/utils/hooks';
|
||||||
|
|
||||||
import CLIFlowContainer from '@/components/onboardingTour/steps/common/CLIFlowContainer.vue';
|
import CLIFlowContainer from '@/components/onboardingTour/steps/common/CLIFlowContainer.vue';
|
||||||
import OSContainer from '@/components/onboardingTour/steps/common/OSContainer.vue';
|
import OSContainer from '@/components/onboardingTour/steps/common/OSContainer.vue';
|
||||||
@ -135,34 +134,24 @@ import TabWithCopy from '@/components/onboardingTour/steps/common/TabWithCopy.vu
|
|||||||
|
|
||||||
import Icon from '@/../static/images/onboardingTour/cliSetupStep.svg';
|
import Icon from '@/../static/images/onboardingTour/cliSetupStep.svg';
|
||||||
|
|
||||||
// @vue/component
|
const router = useRouter();
|
||||||
@Component({
|
|
||||||
components: {
|
|
||||||
CLIFlowContainer,
|
|
||||||
Icon,
|
|
||||||
OSContainer,
|
|
||||||
TabWithCopy,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
export default class CLIInstall extends Vue {
|
|
||||||
|
|
||||||
private readonly analytics: AnalyticsHttpApi = new AnalyticsHttpApi();
|
const analytics: AnalyticsHttpApi = new AnalyticsHttpApi();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds on back button click logic.
|
* Holds on back button click logic.
|
||||||
*/
|
*/
|
||||||
public async onBackClick(): Promise<void> {
|
async function onBackClick(): Promise<void> {
|
||||||
this.analytics.pageVisit(RouteConfig.OnboardingTour.with(RouteConfig.OnbCLIStep.with(RouteConfig.APIKey)).path);
|
analytics.pageVisit(RouteConfig.OnboardingTour.with(RouteConfig.OnbCLIStep.with(RouteConfig.APIKey)).path);
|
||||||
await this.$router.push(RouteConfig.OnboardingTour.with(RouteConfig.OnbCLIStep.with(RouteConfig.APIKey)).path);
|
await router.push(RouteConfig.OnboardingTour.with(RouteConfig.OnbCLIStep.with(RouteConfig.APIKey)).path);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds on next button click logic.
|
* Holds on next button click logic.
|
||||||
*/
|
*/
|
||||||
public async onNextClick(): Promise<void> {
|
async function onNextClick(): Promise<void> {
|
||||||
this.analytics.pageVisit(RouteConfig.OnboardingTour.with(RouteConfig.OnbCLIStep.with(RouteConfig.CLISetup)).path);
|
analytics.pageVisit(RouteConfig.OnboardingTour.with(RouteConfig.OnbCLIStep.with(RouteConfig.CLISetup)).path);
|
||||||
await this.$router.push(RouteConfig.OnboardingTour.with(RouteConfig.OnbCLIStep.with(RouteConfig.CLISetup)).path);
|
await router.push(RouteConfig.OnboardingTour.with(RouteConfig.OnbCLIStep.with(RouteConfig.CLISetup)).path);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user