@tapni/auth 1.0.61 → 1.0.66

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.
Files changed (53) hide show
  1. package/dist/.vite/manifest.json +69 -0
  2. package/dist/Apps-BGr6XXC1.js +109 -0
  3. package/dist/CustomApp-CUbr7Yc0.js +83 -0
  4. package/dist/QR-C-hIeHAf.js +41 -0
  5. package/dist/TapniAuth.es.js +4 -0
  6. package/dist/TapniAuth.umd.js +167 -0
  7. package/dist/install-NW33kPfJ.js +20276 -0
  8. package/dist/style.css +1 -0
  9. package/dist/web-LIfHmYL2.js +54 -0
  10. package/dist/web-UrTMimK1.js +86 -0
  11. package/dist/web-XbruGdlD.js +121 -0
  12. package/package.json +3 -2
  13. package/src/App.vue +78 -5
  14. package/src/index.js +4 -0
  15. package/src/services/Api.js +3 -3
  16. package/src/store/auth.js +23 -19
  17. package/src/store/constants.js +2 -2
  18. package/src/store/locales/cn.js +33 -31
  19. package/src/store/locales/de.js +38 -36
  20. package/src/store/locales/en.js +454 -513
  21. package/src/store/locales/es.js +34 -32
  22. package/src/store/locales/fr.js +33 -31
  23. package/src/store/locales/it.js +34 -32
  24. package/src/store/locales/ja.js +488 -0
  25. package/src/store/locales/kr.js +34 -32
  26. package/src/store/locales/lang.js +8 -0
  27. package/src/store/locales/pt.js +488 -0
  28. package/src/store/locales/sr.js +37 -35
  29. package/src/store/locales/tr.js +40 -38
  30. package/src/views/Account.vue +14 -2
  31. package/src/views/Billing.vue +216 -40
  32. package/src/views/General.vue +152 -168
  33. package/src/views/Welcome.vue +85 -66
  34. package/dist/assets/Apps-DRNQ66T5.css +0 -1
  35. package/dist/assets/Apps-Y4SdRTLA.js +0 -1
  36. package/dist/assets/Billing-Bwm-D3JZ.js +0 -1
  37. package/dist/assets/Billing-COZeuzks.css +0 -1
  38. package/dist/assets/CustomApp-BCUrlnlC.js +0 -1
  39. package/dist/assets/CustomApp-EflPiIBk.css +0 -1
  40. package/dist/assets/Inter-ZO3WBJgw.ttf +0 -0
  41. package/dist/assets/QR-DmlpvOTV.js +0 -1
  42. package/dist/assets/fontawesome-webfont-CQDK8MU3.ttf +0 -0
  43. package/dist/assets/fontawesome-webfont-DXgy9qkh.svg +0 -2671
  44. package/dist/assets/fontawesome-webfont-G5YE5S7X.eot +0 -0
  45. package/dist/assets/index-B2NkTeng.js +0 -181
  46. package/dist/assets/index-BrLpR8cl.css +0 -1
  47. package/dist/assets/web-0Odj9drH.js +0 -1
  48. package/dist/assets/web-B6dACyEr.js +0 -5
  49. package/dist/assets/web-Cw9PHD75.js +0 -1
  50. package/dist/assets/web-CzLXrrwg.js +0 -1
  51. package/dist/assets/web-D_iNPwxM.js +0 -1
  52. package/dist/assets/web-DnM9fFvq.js +0 -1
  53. package/dist/index.html +0 -39
package/dist/style.css ADDED
@@ -0,0 +1 @@
1
+ .app-store-icon[data-v-465df13a]{box-shadow:0 4px 10px #00000017;border-radius:12px}#codeInput[data-v-6ab8e3d4],#emailInput[data-v-6ab8e3d4]{text-align:center;padding-right:15%;font-size:17px}.firstRow img[data-v-64ae2517]{width:25px;height:25px;position:absolute;top:50%;right:0;transform:translate(-50%,-50%)}#emailInput[data-v-707a4b16]{text-align:center;padding-right:15%;font-size:17px}html *{font-family:Inter,sans-serif}#bodyId{padding-top:3%;max-width:667px!important;margin:1.5% auto auto;height:95%!important;border-radius:20px}.action-block-top .default-text,.action-block-top .default-text:after{border-radius:50%;width:10em!important;height:10em!important}.action-block-top .default-text{margin:10px auto;font-size:3px;position:relative;text-indent:-9999em;border-left:.5em solid #000000;border-top:.5em solid rgba(0,0,0,.2);border-right:.5em solid rgba(0,0,0,.2);border-bottom:.5em solid rgba(0,0,0,.2);-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0);-webkit-animation:load8 1.1s infinite linear;animation:load8 1.1s infinite linear}@-webkit-keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.smartbanner-ios{background:linear-gradient(to bottom,#f4f4f4,#f4f4f4);box-shadow:0 0 #fff;border-bottom:1px solid #dddddd}.smartbanner-icon{border-radius:16px}.smartbanner-ios .smartbanner-button{font-size:13px;padding:9px 0;height:40px;border-radius:13px;background:#f4f4f4;color:#0a99d2;border:none;box-shadow:none;text-transform:uppercase}.snack-body{display:none;border-radius:40px;font-size:15px!important}#errorSnack{background-color:#fee3e3!important;border:2px solid #edd9d9!important;color:#000}#successSnack{background-color:#eff5eb!important;border:2px solid #e3ecd7!important;color:#000}.grecaptcha-badge{visibility:hidden}.header-logo{position:absolute;left:50%;transform:translate(-50%,-50%);margin-top:16px;z-index:2}.header-logo-img{height:40px;margin-top:10px}@media (max-width: 768px){#bodyId{margin-top:0;border-radius:0;height:100%!important}.header-logo{margin-top:16px}}.withBackground[data-v-2f7f5584],.withBackground[data-v-36b27d1f]{height:50px}
@@ -0,0 +1,54 @@
1
+ import { WebPlugin as p } from "@capacitor/core";
2
+ class f extends p {
3
+ constructor() {
4
+ super(...arguments), this.group = "CapacitorStorage";
5
+ }
6
+ async configure({ group: e }) {
7
+ typeof e == "string" && (this.group = e);
8
+ }
9
+ async get(e) {
10
+ return { value: this.impl.getItem(this.applyPrefix(e.key)) };
11
+ }
12
+ async set(e) {
13
+ this.impl.setItem(this.applyPrefix(e.key), e.value);
14
+ }
15
+ async remove(e) {
16
+ this.impl.removeItem(this.applyPrefix(e.key));
17
+ }
18
+ async keys() {
19
+ return { keys: this.rawKeys().map((t) => t.substring(this.prefix.length)) };
20
+ }
21
+ async clear() {
22
+ for (const e of this.rawKeys())
23
+ this.impl.removeItem(e);
24
+ }
25
+ async migrate() {
26
+ var e;
27
+ const t = [], s = [], n = "_cap_", o = Object.keys(this.impl).filter((i) => i.indexOf(n) === 0);
28
+ for (const i of o) {
29
+ const r = i.substring(n.length), a = (e = this.impl.getItem(i)) !== null && e !== void 0 ? e : "", { value: l } = await this.get({ key: r });
30
+ typeof l == "string" ? s.push(r) : (await this.set({ key: r, value: a }), t.push(r));
31
+ }
32
+ return { migrated: t, existing: s };
33
+ }
34
+ async removeOld() {
35
+ const e = "_cap_", t = Object.keys(this.impl).filter((s) => s.indexOf(e) === 0);
36
+ for (const s of t)
37
+ this.impl.removeItem(s);
38
+ }
39
+ get impl() {
40
+ return window.localStorage;
41
+ }
42
+ get prefix() {
43
+ return this.group === "NativeStorage" ? "" : `${this.group}.`;
44
+ }
45
+ rawKeys() {
46
+ return Object.keys(this.impl).filter((e) => e.indexOf(this.prefix) === 0);
47
+ }
48
+ applyPrefix(e) {
49
+ return this.prefix + e;
50
+ }
51
+ }
52
+ export {
53
+ f as PreferencesWeb
54
+ };
@@ -0,0 +1,86 @@
1
+ import { WebPlugin as c } from "@capacitor/core";
2
+ class g extends c {
3
+ constructor() {
4
+ super();
5
+ }
6
+ loadScript() {
7
+ if (typeof document > "u")
8
+ return;
9
+ const e = "gapi";
10
+ if (document == null ? void 0 : document.getElementById(e))
11
+ return;
12
+ const n = document.getElementsByTagName("head")[0], t = document.createElement("script");
13
+ t.type = "text/javascript", t.defer = !0, t.async = !0, t.id = e, t.onload = this.platformJsLoaded.bind(this), t.src = "https://apis.google.com/js/platform.js", n.appendChild(t);
14
+ }
15
+ initialize(e = {
16
+ clientId: "",
17
+ scopes: [],
18
+ grantOfflineAccess: !1
19
+ }) {
20
+ var s, n;
21
+ if (typeof window > "u")
22
+ return;
23
+ const t = (s = document.getElementsByName("google-signin-client_id")[0]) === null || s === void 0 ? void 0 : s.content, i = e.clientId || t || "";
24
+ return i || console.warn("GoogleAuthPlugin - clientId is empty"), this.options = {
25
+ clientId: i,
26
+ grantOfflineAccess: (n = e.grantOfflineAccess) !== null && n !== void 0 ? n : !1,
27
+ scopes: e.scopes || []
28
+ }, this.gapiLoaded = new Promise((o) => {
29
+ window.gapiResolve = o, this.loadScript();
30
+ }), this.addUserChangeListener(), this.gapiLoaded;
31
+ }
32
+ platformJsLoaded() {
33
+ gapi.load("auth2", () => {
34
+ const e = {
35
+ client_id: this.options.clientId,
36
+ plugin_name: "CodetrixStudioCapacitorGoogleAuth"
37
+ };
38
+ this.options.scopes.length && (e.scope = this.options.scopes.join(" ")), gapi.auth2.init(e), window.gapiResolve();
39
+ });
40
+ }
41
+ async signIn() {
42
+ return new Promise(async (e, s) => {
43
+ var n;
44
+ try {
45
+ let t;
46
+ const i = (n = this.options.grantOfflineAccess) !== null && n !== void 0 ? n : !1;
47
+ i ? t = (await gapi.auth2.getAuthInstance().grantOfflineAccess()).code : await gapi.auth2.getAuthInstance().signIn();
48
+ const o = gapi.auth2.getAuthInstance().currentUser.get();
49
+ i && await o.reloadAuthResponse();
50
+ const a = this.getUserFrom(o);
51
+ a.serverAuthCode = t, e(a);
52
+ } catch (t) {
53
+ s(t);
54
+ }
55
+ });
56
+ }
57
+ async refresh() {
58
+ const e = await gapi.auth2.getAuthInstance().currentUser.get().reloadAuthResponse();
59
+ return {
60
+ accessToken: e.access_token,
61
+ idToken: e.id_token,
62
+ refreshToken: ""
63
+ };
64
+ }
65
+ async signOut() {
66
+ return gapi.auth2.getAuthInstance().signOut();
67
+ }
68
+ async addUserChangeListener() {
69
+ await this.gapiLoaded, gapi.auth2.getAuthInstance().currentUser.listen((e) => {
70
+ this.notifyListeners("userChange", e.isSignedIn() ? this.getUserFrom(e) : null);
71
+ });
72
+ }
73
+ getUserFrom(e) {
74
+ const s = {}, n = e.getBasicProfile();
75
+ s.email = n.getEmail(), s.familyName = n.getFamilyName(), s.givenName = n.getGivenName(), s.id = n.getId(), s.imageUrl = n.getImageUrl(), s.name = n.getName();
76
+ const t = e.getAuthResponse(!0);
77
+ return s.authentication = {
78
+ accessToken: t.access_token,
79
+ idToken: t.id_token,
80
+ refreshToken: ""
81
+ }, s;
82
+ }
83
+ }
84
+ export {
85
+ g as GoogleAuthWeb
86
+ };
@@ -0,0 +1,121 @@
1
+ import { WebPlugin as j } from "@capacitor/core";
2
+ var w = { exports: {} };
3
+ /*!
4
+ * $script.js JS loader & dependency manager
5
+ * https://github.com/ded/script.js
6
+ * (c) Dustin Diaz 2014 | License MIT
7
+ */
8
+ (function(y) {
9
+ (function(i, p) {
10
+ y.exports ? y.exports = p() : this[i] = p();
11
+ })("$script", function() {
12
+ var i = document, p = i.getElementsByTagName("head")[0], I = !1, m = "push", S = "readyState", A = "onreadystatechange", s = {}, o = {}, d = {}, f, v;
13
+ function g(e, t) {
14
+ for (var n = 0, u = e.length; n < u; ++n) if (!t(e[n])) return I;
15
+ return 1;
16
+ }
17
+ function h(e, t) {
18
+ g(e, function(n) {
19
+ return t(n), 1;
20
+ });
21
+ }
22
+ function l(e, t, n) {
23
+ e = e[m] ? e : [e];
24
+ var u = t && t.call, r = u ? t : n, N = u ? e.join("") : t, U = e.length;
25
+ function b(c) {
26
+ return c.call ? c() : s[c];
27
+ }
28
+ function _() {
29
+ if (!--U) {
30
+ s[N] = 1, r && r();
31
+ for (var c in o)
32
+ g(c.split("|"), b) && !h(o[c], b) && (o[c] = []);
33
+ }
34
+ }
35
+ return setTimeout(function() {
36
+ h(e, function c(a, W) {
37
+ if (a === null) return _();
38
+ if (!W && !/^https?:\/\//.test(a) && f && (a = a.indexOf(".js") === -1 ? f + a + ".js" : f + a), d[a])
39
+ return d[a] == 2 ? _() : setTimeout(function() {
40
+ c(a, !0);
41
+ }, 0);
42
+ d[a] = 1, x(a, _);
43
+ });
44
+ }, 0), l;
45
+ }
46
+ function x(e, t) {
47
+ var n = i.createElement("script"), u;
48
+ n.onload = n.onerror = n[A] = function() {
49
+ n[S] && !/^c|loade/.test(n[S]) || u || (n.onload = n[A] = null, u = 1, d[e] = 2, t());
50
+ }, n.async = 1, n.src = v ? e + (e.indexOf("?") === -1 ? "?" : "&") + v : e, p.insertBefore(n, p.lastChild);
51
+ }
52
+ return l.get = x, l.order = function(e, t, n) {
53
+ (function u(r) {
54
+ r = e.shift(), e.length ? l(r, u) : l(r, t, n);
55
+ })();
56
+ }, l.path = function(e) {
57
+ f = e;
58
+ }, l.urlArgs = function(e) {
59
+ v = e;
60
+ }, l.ready = function(e, t, n) {
61
+ e = e[m] ? e : [e];
62
+ var u = [];
63
+ return !h(e, function(r) {
64
+ s[r] || u[m](r);
65
+ }) && g(e, function(r) {
66
+ return s[r];
67
+ }) ? t() : function(r) {
68
+ o[r] = o[r] || [], o[r][m](t), n && n(u);
69
+ }(e.join("|")), l;
70
+ }, l.done = function(e) {
71
+ l([null], e);
72
+ }, l;
73
+ });
74
+ })(w);
75
+ var z = w.exports;
76
+ class P extends j {
77
+ constructor() {
78
+ super({
79
+ name: "SignInWithApple",
80
+ platforms: ["web"]
81
+ }), this.appleScriptUrl = "https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js", this.isAppleScriptLoaded = !1;
82
+ }
83
+ async authorize(i) {
84
+ return new Promise((p, I) => {
85
+ i ? this.loadSignInWithAppleJS().then((m) => {
86
+ var S, A, s;
87
+ this.isAppleScriptLoaded = m, this.isAppleScriptLoaded ? (AppleID.auth.init({
88
+ clientId: i.clientId,
89
+ redirectURI: i.redirectURI,
90
+ scope: (S = i.scopes) !== null && S !== void 0 ? S : void 0,
91
+ state: (A = i.state) !== null && A !== void 0 ? A : void 0,
92
+ nonce: (s = i.nonce) !== null && s !== void 0 ? s : void 0,
93
+ usePopup: !0
94
+ }), AppleID.auth.signIn().then((o) => {
95
+ var d, f, v, g, h;
96
+ const l = {
97
+ response: {
98
+ user: null,
99
+ email: (d = o.user) === null || d === void 0 ? void 0 : d.email,
100
+ givenName: (v = (f = o.user) === null || f === void 0 ? void 0 : f.name) === null || v === void 0 ? void 0 : v.firstName,
101
+ familyName: (h = (g = o.user) === null || g === void 0 ? void 0 : g.name) === null || h === void 0 ? void 0 : h.lastName,
102
+ identityToken: o.authorization.id_token,
103
+ authorizationCode: o.authorization.code
104
+ }
105
+ };
106
+ p(l);
107
+ }).catch((o) => {
108
+ I(o);
109
+ })) : I("Unable to load Sign in with Apple JS framework.");
110
+ }) : I("No options were provided.");
111
+ });
112
+ }
113
+ loadSignInWithAppleJS() {
114
+ return new Promise((i) => {
115
+ this.isAppleScriptLoaded ? i(!0) : typeof window !== void 0 ? z.get(this.appleScriptUrl, () => i(!0)) : i(!1);
116
+ });
117
+ }
118
+ }
119
+ export {
120
+ P as SignInWithAppleWeb
121
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tapni/auth",
3
- "version": "1.0.61",
3
+ "version": "1.0.66",
4
4
  "type": "module",
5
5
  "main": "./dist/TapniAuth.umd.js",
6
6
  "module": "./dist/TapniAuth.es.js",
@@ -22,6 +22,7 @@
22
22
  "preview": "vite preview",
23
23
  "build-lib": "vite build --config=vite-lib.config.js",
24
24
  "build-lib:dev": "vite build --config=vite-lib.config.js --mode development",
25
+ "build-lib:staging": "vite build --config=vite-lib.config.js --mode staging",
25
26
  "lint": "eslint src",
26
27
  "format": "prettier . --write"
27
28
  },
@@ -64,4 +65,4 @@
64
65
  "vite": "^5.4.11",
65
66
  "vite-plugin-node-polyfills": "^0.22.0"
66
67
  }
67
- }
68
+ }
package/src/App.vue CHANGED
@@ -12,7 +12,7 @@ document.addEventListener('DOMContentLoaded', function () {
12
12
 
13
13
  <template>
14
14
  <div id="ssoapp" :style="containerStyle">
15
- <a v-if="display === 'redirect' || renderView.includes('Auth')" href="/" class="header-logo"><img src="https://cdn.tapni.co/images/logo-dark.png" class="header-logo-img" /></a>
15
+ <a v-if="display === 'redirect' || renderView.includes('Auth')" href="/" class="header-logo"><img :src="headerLogoUrl" class="header-logo-img" /></a>
16
16
 
17
17
  <AuthWelcome v-if="initialized && renderView === 'AuthWelcome'" />
18
18
  <AuthLogin v-else-if="initialized && renderView === 'AuthLogin'" :isModal="isModal" />
@@ -21,6 +21,7 @@ document.addEventListener('DOMContentLoaded', function () {
21
21
  <AuthRegister v-else-if="initialized && renderView === 'AuthRegister'" :isModal="isModal" />
22
22
  <AuthVerify v-else-if="initialized && renderView === 'AuthVerify'" :isModal="isModal" />
23
23
  <AuthSecurity v-else-if="initialized && renderView === 'AuthSecurity'" :isModal="isModal" :payload="payload" @update:viewProp="setView" />
24
+ <AuthBilling v-else-if="initialized && renderView === 'AuthBilling'" :isModal="isModal" :payload="payload" @update:viewProp="setView" />
24
25
  <AuthReset v-else-if="initialized && renderView === 'AuthReset'" />
25
26
  <AuthCallback v-else-if="initialized && renderView === 'AuthCallback'" />
26
27
  <RouterView v-else-if="display !== 'npm'" />
@@ -49,6 +50,7 @@ import AuthAccount from '@/views/Account.vue';
49
50
  import AuthRegister from '@/views/Register.vue';
50
51
  import AuthVerify from '@/views/Verify.vue';
51
52
  import AuthSecurity from '@/views/Security.vue';
53
+ import AuthBilling from '@/views/Billing.vue';
52
54
  import AuthGeneral from '@/views/General.vue';
53
55
  import AuthReset from '@/views/Reset.vue';
54
56
  import AuthCallback from '@/views/Callback.vue';
@@ -65,7 +67,8 @@ export default {
65
67
  data() {
66
68
  return {
67
69
  storeInterval: null,
68
- isSetup: false
70
+ isSetup: false,
71
+ isTapstackOrigin: typeof window !== 'undefined' ? /(^|\.)tapstack\.com$/i.test(new URL(window.location.origin).hostname) : false
69
72
  };
70
73
  },
71
74
  components: {
@@ -76,6 +79,7 @@ export default {
76
79
  AuthRegister,
77
80
  AuthLogin,
78
81
  AuthAccount,
82
+ AuthBilling,
79
83
  AuthWelcome,
80
84
  AuthGeneral
81
85
  },
@@ -109,17 +113,26 @@ export default {
109
113
  initialized() {
110
114
  return this.isSetup || this.isModal;
111
115
  },
116
+ headerLogoUrl() {
117
+ return this.isTapstackOrigin ? 'https://cdn.tapni.co/company-media/e411a6e5-e8c1-40b3-aa4c-1214cfb43e8a/gallery/image/f910fa207addf7d3f7337faf098c4f82c79f755a3cf0032099655f2204e6a1e6.png' : 'https://cdn.tapni.co/images/logo-dark.png';
118
+ },
112
119
  containerStyle() {
113
120
  return {
114
121
  maxHeight: this.isModal ? '90vh' : 'auto',
115
122
  overflowY: this.isModal ? 'auto' : 'hidden'
116
- }
123
+ };
117
124
  }
118
125
  },
119
126
  async mounted() {
127
+ // Check for clean=true query parameter and clear storage if present
128
+ this.checkAndClearStorage();
129
+
120
130
  this.applyBgStyle();
121
131
  this.setView(this.viewProp);
122
132
 
133
+ // Update metadata based on platform
134
+ this.updateMetadata();
135
+
123
136
  EventBus.$on('ssoEvent', this.ssoOutgoingEvent);
124
137
  EventBus.$on('ssoLogout', (data) => this.logout(data));
125
138
  EventBus.$on('getLoggedInAccounts', () => this.getLoggedInAccounts());
@@ -131,8 +144,29 @@ export default {
131
144
  if (import.meta.env.VITE_APP_COMPARE_LANGUAGE_KEYS === 'true') {
132
145
  UtilService.compareLangKeys();
133
146
  }
147
+
148
+ if (this.isNative) {
149
+ this.$store.auth.state.allowedOriginsAuth.push('capacitor://localhost');
150
+ }
134
151
  },
135
152
  methods: {
153
+ checkAndClearStorage() {
154
+ const urlParams = new URLSearchParams(window.location.search);
155
+ if (urlParams.get('clean') === 'true') {
156
+ // Clear all localStorage
157
+ localStorage.clear();
158
+
159
+ // Clear sessionStorage as well
160
+ sessionStorage.clear();
161
+
162
+ // Remove the clean parameter from URL without page reload
163
+ urlParams.delete('clean');
164
+ const newUrl = window.location.pathname + (urlParams.toString() ? '?' + urlParams.toString() : '') + window.location.hash;
165
+ window.history.replaceState({}, '', newUrl);
166
+
167
+ console.log('Storage cleared due to clean=true parameter');
168
+ }
169
+ },
136
170
  async init() {
137
171
  this.$store.commit('auth/setApiRoot', this.$apiRoot || process.env.VITE_APP_API_ROOT);
138
172
 
@@ -154,6 +188,45 @@ export default {
154
188
  ssoIncomingEvent(data) {
155
189
  EventBus.$emit(data.name, data.data);
156
190
  },
191
+ updateMetadata() {
192
+ if (typeof window === 'undefined') return;
193
+
194
+ if (this.isTapstackOrigin) {
195
+ // Tapstack metadata
196
+ document.title = 'Tapstack - The modern stack for interactive docs and tools';
197
+
198
+ // Update meta description
199
+ const metaDescription = document.querySelector('meta[name="description"]');
200
+ if (metaDescription) {
201
+ metaDescription.setAttribute('content', 'The modern stack for interactive docs and tools. Build better documentation and developer experiences with Tapstack.');
202
+ }
203
+
204
+ // Update Open Graph metadata
205
+ const ogTitle = document.querySelector('meta[property="og:title"]');
206
+ if (ogTitle) {
207
+ ogTitle.setAttribute('content', 'Tapstack - The modern stack for interactive docs and tools');
208
+ }
209
+
210
+ const ogDescription = document.querySelector('meta[property="og:description"]');
211
+ if (ogDescription) {
212
+ ogDescription.setAttribute('content', 'The modern stack for interactive docs and tools. Build better documentation and developer experiences.');
213
+ }
214
+
215
+ // Update Twitter metadata
216
+ const twitterTitle = document.querySelector('meta[property="twitter:title"]');
217
+ if (twitterTitle) {
218
+ twitterTitle.setAttribute('content', 'Tapstack - The modern stack for interactive docs and tools');
219
+ }
220
+
221
+ const twitterDescription = document.querySelector('meta[property="twitter:description"]');
222
+ if (twitterDescription) {
223
+ twitterDescription.setAttribute('content', 'The modern stack for interactive docs and tools. Build better documentation and developer experiences with Tapstack.');
224
+ }
225
+ } else {
226
+ // Default Tapni metadata (already set in HTML)
227
+ document.title = 'Tapni - Share everything with just a tap';
228
+ }
229
+ },
157
230
  applyBgStyle() {
158
231
  if (this.display === 'redirect') {
159
232
  document.getElementsByTagName('html')[0].style = 'background: #dfeefe;';
@@ -299,7 +372,7 @@ html * {
299
372
  position: absolute;
300
373
  left: 50%;
301
374
  transform: translate(-50%, -50%);
302
- margin-top: 0px;
375
+ margin-top: 16px;
303
376
  z-index: 2;
304
377
  }
305
378
 
@@ -316,7 +389,7 @@ html * {
316
389
  }
317
390
 
318
391
  .header-logo {
319
- margin-top: 15px;
392
+ margin-top: 16px;
320
393
  }
321
394
  }
322
395
  </style>
package/src/index.js ADDED
@@ -0,0 +1,4 @@
1
+ import TapniAuth from './components/TapniAuth.vue';
2
+
3
+ export { TapniAuth };
4
+ export default TapniAuth;
@@ -3,12 +3,12 @@ import { jwtDecode } from 'jwt-decode';
3
3
  import { version } from '../../package.json';
4
4
  import store from '../store/store.js';
5
5
 
6
- export default (refreshTokenAction = null) => {
6
+ export default (refreshTokenAction = null, version = 'v1') => {
7
7
  const appInfo = version;
8
- let baseURL = import.meta.env.VITE_APP_API_ROOT + '/v1/';
8
+ let baseURL = import.meta.env.VITE_APP_API_ROOT + '/' + version + '/';
9
9
 
10
10
  if (store.getters['auth/apiRoot']) {
11
- baseURL = store.getters['auth/apiRoot'] + '/v1/';
11
+ baseURL = store.getters['auth/apiRoot'] + '/' + version + '/';
12
12
  }
13
13
 
14
14
  let apiInstance = axios.create({
package/src/store/auth.js CHANGED
@@ -1,20 +1,22 @@
1
- import to from "await-to-js";
2
- import UserService from "../services/UserService";
3
- import DeviceService from "../services/DeviceService";
4
- import AuthService from "../services/AuthService";
5
- import CompanyService from "../services/CompanyService";
6
- import { Device } from "@capacitor/device";
7
- import axios from "axios";
8
- import en from "../store/locales/en.js";
9
- import de from "../store/locales/de.js";
10
- import es from "../store/locales/es.js";
11
- import fr from "../store/locales/fr.js";
12
- import it from "../store/locales/it.js";
13
- import sr from "../store/locales/sr.js";
14
- import tr from "../store/locales/tr.js";
15
- import cn from "../store/locales/cn.js";
16
- import kr from "../store/locales/kr.js";
17
- import { EventBus } from "@/store/event-bus.js";
1
+ import to from 'await-to-js';
2
+ import UserService from '../services/UserService';
3
+ import DeviceService from '../services/DeviceService';
4
+ import AuthService from '../services/AuthService';
5
+ import CompanyService from '../services/CompanyService';
6
+ import { Device } from '@capacitor/device';
7
+ import axios from 'axios';
8
+ import en from '../store/locales/en.js';
9
+ import de from '../store/locales/de.js';
10
+ import es from '../store/locales/es.js';
11
+ import fr from '../store/locales/fr.js';
12
+ import it from '../store/locales/it.js';
13
+ import sr from '../store/locales/sr.js';
14
+ import tr from '../store/locales/tr.js';
15
+ import cn from '../store/locales/cn.js';
16
+ import kr from '../store/locales/kr.js';
17
+ import ja from '../store/locales/ja.js';
18
+ import pt from '../store/locales/pt.js';
19
+ import { EventBus } from '@/store/event-bus.js';
18
20
  import router from '../router/index.js';
19
21
  export default {
20
22
  namespaced: true,
@@ -38,13 +40,15 @@ export default {
38
40
  sr: sr.state,
39
41
  tr: tr.state,
40
42
  cn: cn.state,
41
- kr: kr.state
43
+ kr: kr.state,
44
+ pt: pt.state,
45
+ ja: ja.state
42
46
  },
43
47
  display: import.meta.env.VITE_APP_MODE,
44
48
  redirect_uri: import.meta.env.VITE_APP_APP_ROOT + '/app/callback/auth',
45
49
  response_type: 'token',
46
50
  state: '',
47
- allowedOriginsAuth: ['https://business.tapni.com', 'https://business-dev.tapni.com', 'https://tapni.com', 'https://tapni.co', 'https://t.link', 'https://my.tapni.com', 'https://my.tapni.co', 'https://dev.tapni.co', 'https://dev.tapni.com', 'https://auth.tapni.com', 'https://auth.tapni.co', 'https://mailsign.link', 'https://sign.tapni.com', 'https://qrcodetoolkit.com', 'https://qr.tapni.com', 'https://designer.tapni.com', 'https://designer-dev.tapni.com', 'http://localhost:8080', 'http://localhost:8081', 'http://localhost:7777', 'https://localhost:7777', 'http://localhost:8086', 'https://localhost:8085', 'http://localhost:8085', 'http://localhost', 'https://localhost', 'https://bigeye.tapni.com', 'https://bigeye-dev.tapni.com', 'capacitor://localhost']
51
+ allowedOriginsAuth: ['https://business.tapni.com', 'https://business-dev.tapni.com', 'https://tapni.com', 'https://tapni.co', 'https://t.link', 'https://my.tapni.com', 'https://my.tapni.co', 'https://dev.tapni.co', 'https://dev.tapni.com', 'https://auth.tapni.com', 'https://auth.tapni.co', 'https://dev.mailsign.link', 'https://mailsign.link', 'https://sign.tapni.com', 'https://qrcodetoolkit.com', 'https://qr.tapni.com', 'https://designer.tapni.com', 'https://designer-dev.tapni.com', 'http://localhost:8080', 'https://localhost:8080', 'http://localhost:8081', 'http://localhost:7777', 'https://localhost:7777', 'http://localhost:8086', 'https://localhost:8085', 'http://localhost:8085', 'http://localhost', 'https://localhost', 'https://bigeye.tapni.com', 'https://bigeye-dev.tapni.com']
48
52
  },
49
53
  mutations: {
50
54
  setAccountSettings(state, account) {
@@ -1,4 +1,4 @@
1
1
  export default {
2
2
  WEB_VERSION: '1.0.1',
3
- SUPPORTED_LANGUAGES: ['en', 'de', 'es', 'kr', 'it', 'fr', 'sr', 'tr', 'cn'],
4
- }
3
+ SUPPORTED_LANGUAGES: ['en', 'de', 'es', 'kr', 'it', 'fr', 'sr', 'tr', 'cn', 'pt', 'ja']
4
+ };
@@ -9,6 +9,8 @@ export default {
9
9
  serbian: '塞尔维亚文',
10
10
  turkish: '土耳其文',
11
11
  chinese: '簡体中文',
12
+ japanese: '日语',
13
+ portuguese: '葡萄牙语',
12
14
  app_language: '语言',
13
15
  profile_preview: '个人资料预览',
14
16
  edit_profile: '编辑个人资料',
@@ -443,36 +445,36 @@ export default {
443
445
  choose_other_login_methods: '选择其他登录方法',
444
446
  no_sso_logins: '您的公司不使用 SSO 登录。 请联系您的管理员',
445
447
 
446
- mfa: "多重驗證(MFA)",
447
- otp_title: "輸入 MFA 代碼以繼續",
448
- otp_code: "MFA 代碼",
449
- otp_subtitle: "請輸入認證應用程式中的代碼",
450
- otp_p1: "若您在使用 MFA 時遇到問題,<br> 請聯繫我們:",
451
- change_language: "切換語言",
452
- welcome_account: "歡迎使用帳號中心",
453
- security: "安全",
454
- security_p: "管理驗證選項與帳號狀態",
455
- general: "一般",
456
- general_p: "管理個人資料與偏好設定",
457
- billing: "帳單",
458
- billing_p: "管理訂閱與付款資料",
459
- apps: "應用",
460
- apps_p: "檢視您的啟用應用並探索更多",
461
- apps_my: "我的應用",
462
- mfa_auth: "雙因素驗證",
463
- mfa_auth_enabled: "您的帳號已使用 MFA 保護。",
464
- mfa_auth_p: "啟用多重驗證(MFA)以防止未授權存取",
465
- mfa_auth_qr: "掃描上方 QR 碼或將密鑰輸入認證應用程式。",
466
- change_password: "變更密碼",
467
- active_account: "啟用帳號",
468
- active_account_p: "關閉時,帳號將暫時停用,直到您再次啟用。",
469
- delete_account: "刪除帳號",
470
- delete_account_p: "刪除帳號",
471
- permanent_delete: "永久刪除",
472
- permanent_delete_p: "刪除後所有資料將被移除且無法復原。若不確定,可先暫時停用。",
473
- personal_details: "個人資料",
474
- app_language_p: "將應用程式切換成您偏好的語言",
475
- app_region: "地區",
476
- app_region_p: "選擇您的地區以獲得個人化的帳單與支援服務"
448
+ mfa: '多重驗證(MFA)',
449
+ otp_title: '輸入 MFA 代碼以繼續',
450
+ otp_code: 'MFA 代碼',
451
+ otp_subtitle: '請輸入認證應用程式中的代碼',
452
+ otp_p1: '若您在使用 MFA 時遇到問題,<br> 請聯繫我們:',
453
+ change_language: '切換語言',
454
+ welcome_account: '歡迎使用帳號中心',
455
+ security: '安全',
456
+ security_p: '管理驗證選項與帳號狀態',
457
+ general: '一般',
458
+ general_p: '管理個人資料與偏好設定',
459
+ billing: '帳單',
460
+ billing_p: '管理訂閱與付款資料',
461
+ apps: '應用',
462
+ apps_p: '檢視您的啟用應用並探索更多',
463
+ apps_my: '我的應用',
464
+ mfa_auth: '雙因素驗證',
465
+ mfa_auth_enabled: '您的帳號已使用 MFA 保護。',
466
+ mfa_auth_p: '啟用多重驗證(MFA)以防止未授權存取',
467
+ mfa_auth_qr: '掃描上方 QR 碼或將密鑰輸入認證應用程式。',
468
+ change_password: '變更密碼',
469
+ active_account: '啟用帳號',
470
+ active_account_p: '關閉時,帳號將暫時停用,直到您再次啟用。',
471
+ delete_account: '刪除帳號',
472
+ delete_account_p: '刪除帳號',
473
+ permanent_delete: '永久刪除',
474
+ permanent_delete_p: '刪除後所有資料將被移除且無法復原。若不確定,可先暫時停用。',
475
+ personal_details: '個人資料',
476
+ app_language_p: '將應用程式切換成您偏好的語言',
477
+ app_region: '地區',
478
+ app_region_p: '選擇您的地區以獲得個人化的帳單與支援服務'
477
479
  }
478
480
  };