@tapni/auth 0.0.168 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/manifest.json +48 -10
- package/dist/Account-IR-XgmiM.js +153 -0
- package/dist/Apps-CQXLKu2F.js +112 -0
- package/dist/CustomApp-FxfYHVid.js +112 -0
- package/dist/General-BVjTsECb.js +477 -0
- package/dist/{QR-UQySwgoT.js → QR-B60f-H2Q.js} +11 -11
- package/dist/TapniAuth.es.js +1 -1
- package/dist/TapniAuth.umd.js +17 -17
- package/dist/index.css +193 -0
- package/dist/{install-KFv1Z6O7.js → install-BOPYSGGa.js} +3487 -3504
- package/dist/style.css +1 -1
- package/dist/{web-NrPZl3qD.js → web-XbruGdlD.js} +2 -5
- package/package.json +3 -3
- package/src/App.vue +6 -19
- package/src/components/{Language.vue → DELETE_Language.vue} +26 -16
- package/src/components/{LinkIcon.vue → DELETE_LinkIcon.vue} +1 -1
- package/src/components/{ModalOverlay.vue → DELETE_ModalOverlay.vue} +2 -2
- package/src/components/{OTP.vue → DELETE_OTP.vue} +3 -3
- package/src/main.js +1 -0
- package/src/mixins/DELETE_mfa-auth.mixin.js +53 -0
- package/src/mixins/auth.mixin.js +7 -1
- package/src/mixins/global.mixin.js +7 -0
- package/src/routes.js +27 -15
- package/src/store/auth.js +1 -1
- package/src/store/constants.js +2 -6
- package/src/store/locales/cn.js +1 -1
- package/src/store/locales/en.js +28 -3
- package/src/views/Account.vue +72 -110
- package/src/views/Apps.vue +106 -0
- package/src/views/CustomApp.vue +106 -0
- package/src/views/General.vue +192 -0
- package/src/views/Login.vue +27 -10
- package/src/views/QR.vue +1 -1
- package/src/views/Security.vue +322 -0
- package/src/views/Welcome.vue +10 -4
- package/dist/Account-uZVmDKkt.js +0 -113
- package/src/mixins/mfa-auth.mixin.js +0 -76
- package/src/views/MFA.vue +0 -117
- /package/dist/{web-L3jORB19.js → web-AXRKjAOB.js} +0 -0
- /package/dist/{web-5VtGcKeU.js → web-IFGkBi0t.js} +0 -0
- /package/dist/{web-AImUTDQQ.js → web-LIfHmYL2.js} +0 -0
package/src/views/Account.vue
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="page-login content-boxed content-boxed-padding center-text" style="margin-top: -1px; overflow: hidden; border: solid 0px #ffffff;">
|
|
3
3
|
<br>
|
|
4
|
-
<
|
|
5
|
-
<
|
|
4
|
+
<img v-if="false" :src="account.photo" class="user-photo margin-center" style="max-width: 110px;" alt="">
|
|
5
|
+
<h1 class="bold full-top no-bottom center-text">{{ssoLang[appLanguage].welcome_account}}</h1>
|
|
6
|
+
<p class="full-bottom half-top center-text font-16">{{account.email}}</p>
|
|
6
7
|
|
|
7
8
|
<div v-if="display !== 'npm' && false" class="full-top full-bottom">
|
|
8
9
|
<a @click="continueTo('app')" class="button-center button button-90 google-button bg-tapni-grey pointer">
|
|
@@ -15,7 +16,7 @@
|
|
|
15
16
|
</div>
|
|
16
17
|
</div>
|
|
17
18
|
|
|
18
|
-
<div class="container">
|
|
19
|
+
<div class="container left-text">
|
|
19
20
|
<div v-if="false" class="accountCard pointer" @click="expanded = !expanded">
|
|
20
21
|
<div class="activeAccount">
|
|
21
22
|
<div class="left" v-if="$storex.username">
|
|
@@ -78,69 +79,75 @@
|
|
|
78
79
|
</div>
|
|
79
80
|
</div>
|
|
80
81
|
|
|
81
|
-
<
|
|
82
|
-
<div class="
|
|
83
|
-
<
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
<
|
|
90
|
-
<h4>{{ssoLang[appLanguage].mfa }}</h4>
|
|
91
|
-
</div>
|
|
92
|
-
<div class="right">
|
|
93
|
-
<img
|
|
94
|
-
src="https://cdn.tapni.co/icons/newArrowRight.svg"
|
|
95
|
-
/>
|
|
96
|
-
</div>
|
|
82
|
+
<router-link to="/general" class="settingRow">
|
|
83
|
+
<div class="firstRow">
|
|
84
|
+
<img
|
|
85
|
+
:src="getIcon('user-black.svg')"
|
|
86
|
+
class="withBackground"
|
|
87
|
+
/>
|
|
88
|
+
<h4>{{ssoLang[appLanguage].general }}</h4>
|
|
89
|
+
|
|
90
|
+
<img :src="getIcon('arrow-gray-right.svg')" />
|
|
97
91
|
</div>
|
|
92
|
+
</router-link>
|
|
98
93
|
|
|
99
|
-
|
|
94
|
+
<router-link to="/security" class="settingRow">
|
|
95
|
+
<div class="firstRow">
|
|
96
|
+
<img
|
|
97
|
+
:src="getIcon('shield-black.svg')"
|
|
98
|
+
class="withBackground"
|
|
99
|
+
/>
|
|
100
|
+
<h4>{{ssoLang[appLanguage].security }}</h4>
|
|
100
101
|
|
|
101
|
-
|
|
102
|
-
<div class="left">
|
|
103
|
-
<img
|
|
104
|
-
src="https://cdn.tapni.co/icons/newPublicProfile.svg"
|
|
105
|
-
style="width: 50px; border-radius: 20px"
|
|
106
|
-
/>
|
|
107
|
-
</div>
|
|
108
|
-
<div class="middle">
|
|
109
|
-
<h4>{{ssoLang[appLanguage].change_language }}</h4>
|
|
110
|
-
</div>
|
|
111
|
-
<div class="right">
|
|
112
|
-
<img
|
|
113
|
-
src="https://cdn.tapni.co/icons/newArrowRight.svg"
|
|
114
|
-
/>
|
|
115
|
-
</div>
|
|
102
|
+
<img :src="getIcon('arrow-gray-right.svg')" />
|
|
116
103
|
</div>
|
|
104
|
+
</router-link>
|
|
117
105
|
|
|
118
|
-
|
|
106
|
+
<router-link to="/apps" class="settingRow">
|
|
107
|
+
<div class="firstRow">
|
|
108
|
+
<img
|
|
109
|
+
:src="getIcon('apps-black.svg')"
|
|
110
|
+
class="withBackground"
|
|
111
|
+
/>
|
|
112
|
+
<h4>{{ssoLang[appLanguage].apps }}</h4>
|
|
119
113
|
|
|
120
|
-
|
|
121
|
-
<div class="left">
|
|
122
|
-
<img
|
|
123
|
-
src="https://cdn.tapni.co/icons/newLogout.svg"
|
|
124
|
-
style="width: 50px; border-radius: 20px"
|
|
125
|
-
/>
|
|
126
|
-
</div>
|
|
127
|
-
<div class="middle">
|
|
128
|
-
<h4>{{ssoLang[appLanguage].logout }}</h4>
|
|
129
|
-
</div>
|
|
130
|
-
<div class="right">
|
|
131
|
-
<img
|
|
132
|
-
src="https://cdn.tapni.co/icons/newArrowRight.svg"
|
|
133
|
-
/>
|
|
134
|
-
</div>
|
|
114
|
+
<img :src="getIcon('arrow-gray-right.svg')" />
|
|
135
115
|
</div>
|
|
116
|
+
</router-link>
|
|
136
117
|
|
|
137
|
-
|
|
138
|
-
<div
|
|
139
|
-
<
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
118
|
+
<router-link to="/billing" class="settingRow">
|
|
119
|
+
<div class="firstRow">
|
|
120
|
+
<img
|
|
121
|
+
:src="getIcon('billing-card-black.svg')"
|
|
122
|
+
class="withBackground"
|
|
123
|
+
/>
|
|
124
|
+
<h4>{{ssoLang[appLanguage].billing }}</h4>
|
|
125
|
+
|
|
126
|
+
<img :src="getIcon('arrow-gray-right.svg')" />
|
|
143
127
|
</div>
|
|
128
|
+
</router-link>
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
<div class="settingRow" @click="logoutAccount">
|
|
132
|
+
<div class="firstRow">
|
|
133
|
+
<img
|
|
134
|
+
:src="getIcon('logout-red.svg')"
|
|
135
|
+
class="withBackground"
|
|
136
|
+
/>
|
|
137
|
+
<h4 class="red-text">{{ssoLang[appLanguage].logout }}</h4>
|
|
138
|
+
|
|
139
|
+
<img
|
|
140
|
+
:src="getIcon('arrow-gray-right.svg')"
|
|
141
|
+
/>
|
|
142
|
+
</div>
|
|
143
|
+
</div>
|
|
144
|
+
|
|
145
|
+
<!-- Additional items can be added here in the future -->
|
|
146
|
+
<div class="moreFooter">
|
|
147
|
+
<p class="app-version" style="margin-top: 10px">
|
|
148
|
+
{{ssoLang[appLanguage].version }}: {{ appVersion }}
|
|
149
|
+
</p>
|
|
150
|
+
<h4 v-if="false">{{ssoLang[appLanguage].terms_and_privacy }}</h4>
|
|
144
151
|
</div>
|
|
145
152
|
</div>
|
|
146
153
|
</div>
|
|
@@ -149,16 +156,20 @@
|
|
|
149
156
|
<script>
|
|
150
157
|
import AuthMixin from "../mixins/auth.mixin";
|
|
151
158
|
import { EventBus } from "../store/event-bus.js";
|
|
152
|
-
import
|
|
159
|
+
import CONSTANTS from "../store/constants.js";
|
|
153
160
|
export default {
|
|
154
161
|
mixins: [AuthMixin],
|
|
155
162
|
data () {
|
|
156
163
|
return {
|
|
157
164
|
expanded: false,
|
|
158
165
|
addAccountReady: false,
|
|
159
|
-
appVersion: import.meta.env.APP_VERSION,
|
|
160
166
|
}
|
|
161
167
|
},
|
|
168
|
+
computed: {
|
|
169
|
+
appVersion() {
|
|
170
|
+
return CONSTANTS.WEB_VERSION;
|
|
171
|
+
},
|
|
172
|
+
},
|
|
162
173
|
async mounted () {
|
|
163
174
|
if (!this.isLoggedIn) {
|
|
164
175
|
return this.$router.push('/');
|
|
@@ -175,10 +186,6 @@ export default {
|
|
|
175
186
|
switchAccount (username) {
|
|
176
187
|
console.log('switch', username);
|
|
177
188
|
},
|
|
178
|
-
toggleAccountSettingsModal () {
|
|
179
|
-
this.$router.push('/mfa');
|
|
180
|
-
// EventBus.$emit('toggleAccountSettingsModal')
|
|
181
|
-
},
|
|
182
189
|
toggleLanguageModal () {
|
|
183
190
|
EventBus.$emit('toggleSSOLanguageModal')
|
|
184
191
|
},
|
|
@@ -189,51 +196,6 @@ export default {
|
|
|
189
196
|
};
|
|
190
197
|
</script>
|
|
191
198
|
|
|
192
|
-
<style
|
|
193
|
-
|
|
194
|
-
padding: 20px !important;
|
|
195
|
-
display: flex;
|
|
196
|
-
flex-direction: column;
|
|
197
|
-
gap: 20px;
|
|
198
|
-
padding-bottom: 100px !important;
|
|
199
|
-
}
|
|
200
|
-
.settingsCard {
|
|
201
|
-
background-color: white;
|
|
202
|
-
padding: 20px;
|
|
203
|
-
border-radius: 26px;
|
|
204
|
-
align-items: center;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.device {
|
|
208
|
-
display: flex;
|
|
209
|
-
align-items: center;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
h4 {
|
|
213
|
-
margin-left: 20px;
|
|
214
|
-
font-weight: bold;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
.middle {
|
|
218
|
-
flex: 1;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
.left img {
|
|
222
|
-
background-color: #f7f8f9;
|
|
223
|
-
border-radius: 20px;
|
|
224
|
-
padding: 10px;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
.divider {
|
|
228
|
-
height: 1px;
|
|
229
|
-
background-color: #f0f0f0;
|
|
230
|
-
margin: 20px 0;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
.moreFooter {
|
|
234
|
-
display: flex;
|
|
235
|
-
align-items: center;
|
|
236
|
-
justify-content: space-between;
|
|
237
|
-
padding: 0 10px;
|
|
238
|
-
}
|
|
199
|
+
<style>
|
|
200
|
+
|
|
239
201
|
</style>
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="page-login content-boxed content-boxed-padding">
|
|
3
|
+
<a v-if="isModal" @click="close" class="color-black pull-right pointer" style="margin-top: 0px; position: absolute; right: -20px; text-align: right;">
|
|
4
|
+
<i class="font-17 color-black">
|
|
5
|
+
<img src="https://cdn.tapni.co/icons/down-arrow.png" class="responsive-image" style="width: 35%;"/>
|
|
6
|
+
</i>
|
|
7
|
+
</a>
|
|
8
|
+
<div class="subheaderContainer full-top">
|
|
9
|
+
<!-- Back Button -->
|
|
10
|
+
<router-link to="/account" class="button gray-button pointer left-button">
|
|
11
|
+
<img
|
|
12
|
+
:src="getIcon('arrow-gray-right.svg')"
|
|
13
|
+
height="20"
|
|
14
|
+
width="20"
|
|
15
|
+
class="btn-icon"
|
|
16
|
+
style="rotate: 180deg;"
|
|
17
|
+
/>
|
|
18
|
+
</router-link>
|
|
19
|
+
|
|
20
|
+
<!-- Centered Text -->
|
|
21
|
+
<h2 class="center-text" style="flex-grow: 1; text-align: center; margin: 0; font-weight: 600;">
|
|
22
|
+
{{ssoLang[appLanguage].apps }}
|
|
23
|
+
</h2>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<div class="container left-text">
|
|
27
|
+
<p class="center-text">{{ssoLang[appLanguage].apps_p }}</p>
|
|
28
|
+
|
|
29
|
+
<div class="full-top">
|
|
30
|
+
<h3 v-if="false" class="full-top bold small-bottom">{{ssoLang[appLanguage].apps_my}}</h3>
|
|
31
|
+
|
|
32
|
+
<router-link to="/apps/tapni" class="settingRow">
|
|
33
|
+
<div class="firstRow">
|
|
34
|
+
<img
|
|
35
|
+
:src="getIcon('tapni-logo-small-black.png')"
|
|
36
|
+
class="withBackground"
|
|
37
|
+
/>
|
|
38
|
+
<h4>Tapni</h4>
|
|
39
|
+
|
|
40
|
+
<img :src="getIcon('arrow-gray-right.svg')" />
|
|
41
|
+
</div>
|
|
42
|
+
</router-link>
|
|
43
|
+
|
|
44
|
+
<router-link to="/apps/mailsign" class="settingRow half-top">
|
|
45
|
+
<div class="firstRow">
|
|
46
|
+
<img
|
|
47
|
+
:src="getIcon('app-logo-mailsign.svg')"
|
|
48
|
+
class="withBackground"
|
|
49
|
+
/>
|
|
50
|
+
<h4>MailSign</h4>
|
|
51
|
+
|
|
52
|
+
<img :src="getIcon('arrow-gray-right.svg')" />
|
|
53
|
+
</div>
|
|
54
|
+
</router-link>
|
|
55
|
+
|
|
56
|
+
<router-link v-if="false" to="/apps/qrcodetoolkit" class="settingRow half-top">
|
|
57
|
+
<div class="firstRow">
|
|
58
|
+
<img
|
|
59
|
+
:src="getIcon('app-logo-qrcodetoolkit.svg')"
|
|
60
|
+
class="withBackground"
|
|
61
|
+
/>
|
|
62
|
+
<h4>QRCode Toolkit</h4>
|
|
63
|
+
|
|
64
|
+
<img :src="getIcon('arrow-gray-right.svg')" />
|
|
65
|
+
</div>
|
|
66
|
+
</router-link>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
</template>
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
<script>
|
|
74
|
+
import AuthMixin from "../mixins/auth.mixin";
|
|
75
|
+
import {EventBus} from "@/store/event-bus.js";
|
|
76
|
+
|
|
77
|
+
export default {
|
|
78
|
+
name: "AuthSecurity",
|
|
79
|
+
mixins: [AuthMixin],
|
|
80
|
+
props: {
|
|
81
|
+
payload: {
|
|
82
|
+
type: Object,
|
|
83
|
+
default: {}
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
data () {
|
|
87
|
+
return {
|
|
88
|
+
loading: false,
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
async mounted() {
|
|
92
|
+
if (!this.isLoggedIn) this.$router.push('/login');
|
|
93
|
+
},
|
|
94
|
+
methods: {
|
|
95
|
+
close () {
|
|
96
|
+
EventBus.$emit('ssoEvent', {name: 'toggleAuthModal', data: true})
|
|
97
|
+
},
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
</script>
|
|
101
|
+
|
|
102
|
+
<style scoped>
|
|
103
|
+
.withBackground {
|
|
104
|
+
height: 50px;
|
|
105
|
+
}
|
|
106
|
+
</style>
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="page-login content-boxed content-boxed-padding">
|
|
3
|
+
<a v-if="isModal" @click="close" class="color-black pull-right pointer" style="margin-top: 0px; position: absolute; right: -20px; text-align: right;">
|
|
4
|
+
<i class="font-17 color-black">
|
|
5
|
+
<img src="https://cdn.tapni.co/icons/down-arrow.png" class="responsive-image" style="width: 35%;"/>
|
|
6
|
+
</i>
|
|
7
|
+
</a>
|
|
8
|
+
<div class="subheaderContainer full-top">
|
|
9
|
+
<!-- Back Button -->
|
|
10
|
+
<router-link to="/account" class="button gray-button pointer left-button">
|
|
11
|
+
<img
|
|
12
|
+
:src="getIcon('arrow-gray-right.svg')"
|
|
13
|
+
height="20"
|
|
14
|
+
width="20"
|
|
15
|
+
class="btn-icon"
|
|
16
|
+
style="rotate: 180deg;"
|
|
17
|
+
/>
|
|
18
|
+
</router-link>
|
|
19
|
+
|
|
20
|
+
<!-- Centered Text -->
|
|
21
|
+
<h2 class="center-text" style="flex-grow: 1; text-align: center; margin: 0; font-weight: 600;">
|
|
22
|
+
{{$route.params.app }}
|
|
23
|
+
</h2>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<div class="container left-text">
|
|
27
|
+
<p class="center-text">{{ssoLang[appLanguage].apps_p }}</p>
|
|
28
|
+
|
|
29
|
+
<div class="full-top">
|
|
30
|
+
<h3 v-if="false" class="full-top bold small-bottom">{{ssoLang[appLanguage].apps_my}}</h3>
|
|
31
|
+
|
|
32
|
+
<router-link to="/apps/tapni" class="settingRow">
|
|
33
|
+
<div class="firstRow">
|
|
34
|
+
<img
|
|
35
|
+
:src="getIcon('tapni-logo-small-black.png')"
|
|
36
|
+
class="withBackground"
|
|
37
|
+
/>
|
|
38
|
+
<h4>Tapni</h4>
|
|
39
|
+
|
|
40
|
+
<img :src="getIcon('arrow-gray-right.svg')" />
|
|
41
|
+
</div>
|
|
42
|
+
</router-link>
|
|
43
|
+
|
|
44
|
+
<router-link to="/apps/mailsign" class="settingRow half-top">
|
|
45
|
+
<div class="firstRow">
|
|
46
|
+
<img
|
|
47
|
+
:src="getIcon('app-logo-mailsign.svg')"
|
|
48
|
+
class="withBackground"
|
|
49
|
+
/>
|
|
50
|
+
<h4>MailSign</h4>
|
|
51
|
+
|
|
52
|
+
<img :src="getIcon('arrow-gray-right.svg')" />
|
|
53
|
+
</div>
|
|
54
|
+
</router-link>
|
|
55
|
+
|
|
56
|
+
<router-link v-if="false" to="/apps/qrcodetoolkit" class="settingRow half-top">
|
|
57
|
+
<div class="firstRow">
|
|
58
|
+
<img
|
|
59
|
+
:src="getIcon('app-logo-qrcodetoolkit.svg')"
|
|
60
|
+
class="withBackground"
|
|
61
|
+
/>
|
|
62
|
+
<h4>QRCode Toolkit</h4>
|
|
63
|
+
|
|
64
|
+
<img :src="getIcon('arrow-gray-right.svg')" />
|
|
65
|
+
</div>
|
|
66
|
+
</router-link>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
</template>
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
<script>
|
|
74
|
+
import AuthMixin from "../mixins/auth.mixin";
|
|
75
|
+
import {EventBus} from "@/store/event-bus.js";
|
|
76
|
+
|
|
77
|
+
export default {
|
|
78
|
+
name: "AuthSecurity",
|
|
79
|
+
mixins: [AuthMixin],
|
|
80
|
+
props: {
|
|
81
|
+
payload: {
|
|
82
|
+
type: Object,
|
|
83
|
+
default: {}
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
data () {
|
|
87
|
+
return {
|
|
88
|
+
loading: false,
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
async mounted() {
|
|
92
|
+
if (!this.isLoggedIn) this.$router.push('/login');
|
|
93
|
+
},
|
|
94
|
+
methods: {
|
|
95
|
+
close () {
|
|
96
|
+
EventBus.$emit('ssoEvent', {name: 'toggleAuthModal', data: true})
|
|
97
|
+
},
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
</script>
|
|
101
|
+
|
|
102
|
+
<style scoped>
|
|
103
|
+
.withBackground {
|
|
104
|
+
height: 50px;
|
|
105
|
+
}
|
|
106
|
+
</style>
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="page-login content-boxed content-boxed-padding">
|
|
3
|
+
<a v-if="isModal" @click="close" class="color-black pull-right pointer" style="margin-top: 0px; position: absolute; right: -20px; text-align: right;">
|
|
4
|
+
<i class="font-17 color-black">
|
|
5
|
+
<img src="https://cdn.tapni.co/icons/down-arrow.png" class="responsive-image" style="width: 35%;"/>
|
|
6
|
+
</i>
|
|
7
|
+
</a>
|
|
8
|
+
<div class="subheaderContainer full-top">
|
|
9
|
+
<!-- Back Button -->
|
|
10
|
+
<router-link to="/account" class="button gray-button pointer left-button">
|
|
11
|
+
<img
|
|
12
|
+
:src="getIcon('arrow-gray-right.svg')"
|
|
13
|
+
height="20"
|
|
14
|
+
width="20"
|
|
15
|
+
class="btn-icon"
|
|
16
|
+
style="rotate: 180deg;"
|
|
17
|
+
/>
|
|
18
|
+
</router-link>
|
|
19
|
+
|
|
20
|
+
<!-- Centered Text -->
|
|
21
|
+
<h2 class="center-text" style="flex-grow: 1; text-align: center; margin: 0; font-weight: 600;">
|
|
22
|
+
{{ssoLang[appLanguage].general }}
|
|
23
|
+
</h2>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<div class="container left-text">
|
|
27
|
+
<p class="center-text">{{ssoLang[appLanguage].general_p }}</p>
|
|
28
|
+
|
|
29
|
+
<form class="full-top" @submit.prevent="submitGeneralUpdate">
|
|
30
|
+
|
|
31
|
+
<h3 class="full-top bold small-bottom">{{ssoLang[appLanguage].personal_details}}</h3>
|
|
32
|
+
|
|
33
|
+
<input type="text" v-model="account.name" :placeholder="ssoLang[appLanguage].name"
|
|
34
|
+
class="edit-input h-40 lh-40 small-bottom" required style="width: 100%"/>
|
|
35
|
+
|
|
36
|
+
<input disabled type="email" v-model="account.email" :placeholder="ssoLang[appLanguage].email"
|
|
37
|
+
class="bg-white edit-input h-40 lh-40 small-bottom" required style="width: 100%"/>
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
<h3 class="full-top bold">{{ssoLang[appLanguage].app_region}}</h3>
|
|
41
|
+
<VueSelect
|
|
42
|
+
v-model="region"
|
|
43
|
+
:options="[
|
|
44
|
+
{ label: 'United States', value: 'us' },
|
|
45
|
+
{ label: 'United Kingdom', value: 'uk' },
|
|
46
|
+
{ label: 'European Union', value: 'eu' },
|
|
47
|
+
{ label: 'Mexico', value: 'mx' },
|
|
48
|
+
{ label: 'Mauritius', value: 'mu' },
|
|
49
|
+
{ label: 'Colombia', value: 'co' },
|
|
50
|
+
{ label: 'Serbia', value: 'sr' },
|
|
51
|
+
{ label: 'China', value: 'cn' },
|
|
52
|
+
]"
|
|
53
|
+
:isClearable="false"
|
|
54
|
+
placeholder="Select region"
|
|
55
|
+
/>
|
|
56
|
+
<p>Default currency for this region is {{account.billing?.currency?.toUpperCase()}}</p>
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
<h3 class="full-top bold">{{ssoLang[appLanguage].app_language}}</h3>
|
|
60
|
+
<VueSelect
|
|
61
|
+
v-model="account.lang"
|
|
62
|
+
:options="[
|
|
63
|
+
{ label: ssoLang[appLanguage].english, value: 'en' },
|
|
64
|
+
{ label: ssoLang[appLanguage].german, value: 'de' },
|
|
65
|
+
{ label: ssoLang[appLanguage].spanish, value: 'es' },
|
|
66
|
+
{ label: ssoLang[appLanguage].italian, value: 'it' },
|
|
67
|
+
{ label: ssoLang[appLanguage].french, value: 'fr' },
|
|
68
|
+
{ label: ssoLang[appLanguage].turkish, value: 'tr' },
|
|
69
|
+
{ label: ssoLang[appLanguage].serbian, value: 'sr' },
|
|
70
|
+
{ label: ssoLang[appLanguage].korean, value: 'kr' },
|
|
71
|
+
{ label: ssoLang[appLanguage].chinese, value: 'cn' },
|
|
72
|
+
]"
|
|
73
|
+
:isClearable="false"
|
|
74
|
+
placeholder="Select language"
|
|
75
|
+
/>
|
|
76
|
+
<p>Translate the app on your preferred language.</p>
|
|
77
|
+
|
|
78
|
+
<button
|
|
79
|
+
type="submit"
|
|
80
|
+
class="button black-button button-full google-button bg-tapni-grey button-90 button-center uppercase bold full-top pointer"
|
|
81
|
+
>
|
|
82
|
+
<span v-if="!loading">{{ ssoLang[appLanguage].save }}</span>
|
|
83
|
+
<span v-else class="button--loading button__loader"></span>
|
|
84
|
+
</button>
|
|
85
|
+
</form>
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
</template>
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
<script>
|
|
92
|
+
import AuthMixin from "../mixins/auth.mixin";
|
|
93
|
+
import AuthService from '../services/AuthService'
|
|
94
|
+
import to from "await-to-js";
|
|
95
|
+
import {EventBus} from "@/store/event-bus.js";
|
|
96
|
+
import VueSelect from "vue3-select-component";
|
|
97
|
+
|
|
98
|
+
export default {
|
|
99
|
+
name: "AuthSecurity",
|
|
100
|
+
mixins: [AuthMixin],
|
|
101
|
+
components: {
|
|
102
|
+
VueSelect
|
|
103
|
+
},
|
|
104
|
+
props: {
|
|
105
|
+
payload: {
|
|
106
|
+
type: Object,
|
|
107
|
+
default: {}
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
data () {
|
|
111
|
+
return {
|
|
112
|
+
loading: false,
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
async mounted() {
|
|
116
|
+
if (!this.isLoggedIn) this.$router.push('/login');
|
|
117
|
+
},
|
|
118
|
+
methods: {
|
|
119
|
+
close () {
|
|
120
|
+
EventBus.$emit('ssoEvent', {name: 'toggleAuthModal', data: true})
|
|
121
|
+
},
|
|
122
|
+
async submitGeneralUpdate () {
|
|
123
|
+
if (this.password.length < 8) return this.errorSnack(this.ssoLang[this.appLanguage].password_8_chars)
|
|
124
|
+
|
|
125
|
+
this.loading = true;
|
|
126
|
+
const result = await this.newPassword({
|
|
127
|
+
|
|
128
|
+
})
|
|
129
|
+
if (result === true) {
|
|
130
|
+
this.successSnack(this.ssoLang[this.appLanguage].password_change_success)
|
|
131
|
+
this.changePassword = false;
|
|
132
|
+
}
|
|
133
|
+
this.loading = false;
|
|
134
|
+
},
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
</script>
|
|
138
|
+
|
|
139
|
+
<style scoped>
|
|
140
|
+
:deep(.vue-select) {
|
|
141
|
+
padding: 5px 0;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
:deep(.vue-select .dropdown-icon) {
|
|
145
|
+
color: #1d1d1d;
|
|
146
|
+
width: 25px!important;
|
|
147
|
+
height: 25px!important;
|
|
148
|
+
}
|
|
149
|
+
:deep(.vue-select .menu-option:hover) {
|
|
150
|
+
background-color: #D9D9D9;
|
|
151
|
+
}
|
|
152
|
+
:deep(.vue-select .menu-option.focused) {
|
|
153
|
+
background-color: #f4f4f4;
|
|
154
|
+
}
|
|
155
|
+
:deep(.vue-select .menu-option) {
|
|
156
|
+
border-bottom: 1px solid #D9D9D9;
|
|
157
|
+
font-size: 15px;
|
|
158
|
+
color: #151515;
|
|
159
|
+
}
|
|
160
|
+
:deep(.vue-select .menu-option:last-child) {
|
|
161
|
+
border-bottom: none;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
:deep(.vue-select .menu) {
|
|
165
|
+
border-radius: 10px;
|
|
166
|
+
border: none;
|
|
167
|
+
}
|
|
168
|
+
:deep(.vue-select .control.focused) {
|
|
169
|
+
border: none;
|
|
170
|
+
box-shadow: none;
|
|
171
|
+
}
|
|
172
|
+
:deep(.vue-select .control) {
|
|
173
|
+
min-height: 54px!important;
|
|
174
|
+
background-color: #F4F4F4;
|
|
175
|
+
border: none;
|
|
176
|
+
border-radius: 10px;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
:deep(.vue-select .menu-option.selected) {
|
|
180
|
+
background-color: #E4E4E4;
|
|
181
|
+
}
|
|
182
|
+
:deep(.vue-select .indicators-container) {
|
|
183
|
+
padding: 5px 15px!important
|
|
184
|
+
}
|
|
185
|
+
:deep(.vue-select .value-container) {
|
|
186
|
+
padding: 5px 15px;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
:deep(.vue-select .menu-option) {
|
|
190
|
+
background-color: #f4f4f4;
|
|
191
|
+
}
|
|
192
|
+
</style>
|