1
1
<!DOCTYPE html>
2
- < html class ="h-100 ">
2
+ < html class ="h-100 " lang =" en " >
3
3
4
4
< head >
5
5
< title > Algo VPN</ title >
10
10
integrity ="sha256-NSuqgY2hCZJUN6hDMFfdxvkexI7+iLxXQbL540RQ/c4= " crossorigin ="anonymous "> </ script >
11
11
< link rel ="
stylesheet "
href ="
https://cdn.jsdelivr.net/npm/[email protected] /dist/css/bootstrap.min.css "
12
12
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 >
13
21
</ head >
14
22
15
23
< body class ="d-flex flex-column h-100 ">
16
24
< div class ="container " id ="algo ">
17
25
< 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 >
26
41
</ div >
27
42
28
43
< script >
29
44
new window . Vue ( {
30
45
el : '#algo' ,
31
46
data : {
32
47
playbook : { } ,
48
+ step : 'setup' ,
33
49
extra_args : {
34
50
server_name : "algo" ,
35
51
ondemand_cellular : false ,
@@ -51,17 +67,15 @@ <h1 class="mb-5 text-center">{{ title }}</h1>
51
67
'provider-setup' : window . httpVueLoader ( '/static/provider-setup.vue' ) ,
52
68
} ,
53
69
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 ;
57
72
} ,
58
- on_provider_submit : function ( extra_args ) {
73
+ update_extra_args : function ( extra_args ) {
59
74
Object . assign ( this . extra_args , extra_args ) ;
60
- debugger ;
61
75
}
62
76
}
63
77
} )
64
78
</ script >
65
79
</ body >
66
80
67
- </ html >
81
+ </ html >
0 commit comments