11<!DOCTYPE html>
2- < html class ="h-100 ">
2+ < html class ="h-100 " lang =" en " >
33
44< head >
55 < title > Algo VPN</ title >
1010 integrity ="sha256-NSuqgY2hCZJUN6hDMFfdxvkexI7+iLxXQbL540RQ/c4= " crossorigin ="anonymous "> </ script >
1111 < link rel ="
stylesheet "
href ="
https://cdn.jsdelivr.net/npm/[email protected] /dist/css/bootstrap.min.css "
1212 integrity ="sha256-L/W5Wfqfa0sdBNIKN9cG6QA5F2qx4qICmU2VgLruv9Y= " crossorigin ="anonymous ">
13+ < style >
14+ .fade-enter-active , .fade-leave-active {
15+ transition : opacity 300ms ease-in-out;
16+ }
17+ .fade-enter , .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
18+ opacity : 0 ;
19+ }
20+ </ style >
1321</ head >
1422
1523< body class ="d-flex flex-column h-100 ">
1624 < div class ="container " id ="algo ">
1725 < h1 class ="mb-5 text-center "> {{ title }}</ h1 >
18- < div class ="row ">
19- < user-config class ="col-md-4 order-md-2 mb-4 "> </ user-config >
20- < vpn-setup class ="col-md-8 order-md-1 "
21- v-bind:extra_args ="extra_args "
22- v-on:submit ="on_setup_submit "> </ vpn-setup >
23- </ div >
24- < provider-setup v-bind:extra_args ="extra_args " v-on:submit ="on_provider_submit ">
25- </ provider-setup >
26+ < transition name ="fade ">
27+ < div class ="row " v-if ="step == 'setup' ">
28+ < user-config class ="col-md-4 order-md-2 mb-4 "> </ user-config >
29+ < vpn-setup class ="col-md-8 order-md-1 "
30+ v-bind:extra_args ="extra_args "
31+ v-on:submit ="set_step('provider'); update_extra_args "> </ vpn-setup >
32+ </ div >
33+ </ transition >
34+ < transition name ="fade ">
35+ < provider-setup v-if ="step == 'provider' "
36+ v-bind:extra_args ="extra_args "
37+ v-on:submit ="update_extra_args "
38+ v-on:back ="set_step('setup') ">
39+ </ provider-setup >
40+ </ transition >
2641 </ div >
2742
2843 < script >
2944 new window . Vue ( {
3045 el : '#algo' ,
3146 data : {
3247 playbook : { } ,
48+ step : 'setup' ,
3349 extra_args : {
3450 server_name : "algo" ,
3551 ondemand_cellular : false ,
@@ -51,17 +67,15 @@ <h1 class="mb-5 text-center">{{ title }}</h1>
5167 'provider-setup' : window . httpVueLoader ( '/static/provider-setup.vue' ) ,
5268 } ,
5369 methods : {
54- on_setup_submit : function ( extra_args ) {
55- Object . assign ( this . extra_args , extra_args ) ;
56- debugger ;
70+ set_step : function ( step ) {
71+ this . step = step ;
5772 } ,
58- on_provider_submit : function ( extra_args ) {
73+ update_extra_args : function ( extra_args ) {
5974 Object . assign ( this . extra_args , extra_args ) ;
60- debugger ;
6175 }
6276 }
6377 } )
6478 </ script >
6579</ body >
6680
67- </ html >
81+ </ html >
0 commit comments