@vuetify/one 0.1.2 → 0.2.0
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/index.js +265 -228
- package/package.json +3 -2
- package/dist/index.d.ts +0 -636
package/dist/index.js
CHANGED
|
@@ -1,19 +1,44 @@
|
|
|
1
|
-
import { reactive as
|
|
2
|
-
import { defineStore as
|
|
1
|
+
import { reactive as Z, toRefs as K, ref as j, shallowRef as T, computed as D, watch as F, defineComponent as L, openBlock as g, createBlock as y, unref as a, withCtx as p, createVNode as d, createTextVNode as w, toDisplayString as $, createCommentVNode as Q, mergeProps as tt, createElementVNode as _, createElementBlock as et, Fragment as ot, renderList as st, pushScopeId as nt, popScopeId as it, onBeforeMount as rt } from "vue";
|
|
2
|
+
import { defineStore as x } from "pinia";
|
|
3
3
|
import { merge as I } from "lodash-es";
|
|
4
|
-
import { mdiDiscord as
|
|
5
|
-
import { VListItem as
|
|
6
|
-
import { VAvatar as
|
|
7
|
-
import { VBtn as
|
|
8
|
-
import { VMenu as
|
|
9
|
-
import { VSkeletonLoader as
|
|
10
|
-
import { useDisplay as
|
|
11
|
-
import { VCard as
|
|
12
|
-
import { VDialog as
|
|
13
|
-
import { VImg as
|
|
14
|
-
import { VFooter as
|
|
15
|
-
import { VIcon as
|
|
16
|
-
const
|
|
4
|
+
import { mdiDiscord as P, mdiGithub as E, mdiViewDashboard as at, mdiLogoutVariant as lt, mdiLogin as ct, mdiShieldStarOutline as ut, mdiReddit as ft } from "@mdi/js";
|
|
5
|
+
import { VListItem as G, VList as M, VListSubheader as dt } from "vuetify/lib/components/VList/index.mjs";
|
|
6
|
+
import { VAvatar as pt } from "vuetify/lib/components/VAvatar/index.mjs";
|
|
7
|
+
import { VBtn as J } from "vuetify/lib/components/VBtn/index.mjs";
|
|
8
|
+
import { VMenu as mt } from "vuetify/lib/components/VMenu/index.mjs";
|
|
9
|
+
import { VSkeletonLoader as ht } from "vuetify/lib/components/VSkeletonLoader/index.mjs";
|
|
10
|
+
import { useDisplay as vt, useTheme as gt } from "vuetify";
|
|
11
|
+
import { VCard as yt, VCardTitle as bt, VCardSubtitle as _t } from "vuetify/lib/components/VCard/index.mjs";
|
|
12
|
+
import { VDialog as wt } from "vuetify/lib/components/VDialog/index.mjs";
|
|
13
|
+
import { VImg as W } from "vuetify/lib/components/VImg/index.mjs";
|
|
14
|
+
import { VFooter as Lt } from "vuetify/lib/components/VFooter/index.mjs";
|
|
15
|
+
import { VIcon as xt } from "vuetify/lib/components/VIcon/index.mjs";
|
|
16
|
+
const C = x("http", {
|
|
17
|
+
state: () => ({
|
|
18
|
+
url: ""
|
|
19
|
+
}),
|
|
20
|
+
actions: {
|
|
21
|
+
async fetch(o, e = {}) {
|
|
22
|
+
return (await fetch(`${this.url}${o}`, {
|
|
23
|
+
credentials: "include",
|
|
24
|
+
...e
|
|
25
|
+
})).json();
|
|
26
|
+
},
|
|
27
|
+
async post(o, e, s = {}) {
|
|
28
|
+
return this.fetch(o, {
|
|
29
|
+
method: "POST",
|
|
30
|
+
headers: {
|
|
31
|
+
"Content-Type": "application/json"
|
|
32
|
+
},
|
|
33
|
+
body: JSON.stringify(e),
|
|
34
|
+
...s
|
|
35
|
+
});
|
|
36
|
+
},
|
|
37
|
+
async get(o, e = {}) {
|
|
38
|
+
return this.fetch(o, e);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}), A = typeof window < "u", R = {
|
|
17
42
|
v: 4,
|
|
18
43
|
api: "link-only",
|
|
19
44
|
avatar: "",
|
|
@@ -40,206 +65,194 @@ const A = typeof window < "u", U = {
|
|
|
40
65
|
jobs: null
|
|
41
66
|
}
|
|
42
67
|
}
|
|
43
|
-
},
|
|
44
|
-
const
|
|
45
|
-
function
|
|
68
|
+
}, q = x("user", () => {
|
|
69
|
+
const o = Z(I({}, R));
|
|
70
|
+
function e() {
|
|
46
71
|
if (!A)
|
|
47
72
|
return;
|
|
48
|
-
const r = localStorage.getItem("vuetify@user"),
|
|
49
|
-
|
|
73
|
+
const r = localStorage.getItem("vuetify@user"), t = r ? JSON.parse(r) : {}, h = t.v === o.v;
|
|
74
|
+
t.v || (t.pwaRefresh = !0, typeof t.api == "boolean" && (t.api = t.api ? "inline" : "link-only"), typeof t.rtl == "boolean" && (t.direction = t.rtl ? "rtl" : "ltr", delete t.rtl), typeof t.theme == "object" && (t.mixedTheme = t.theme.mixed, t.theme = t.theme.system ? "system" : t.theme.dark ? "dark" : "light"), Array.isArray(t.notifications) && (t.notifications = { read: t.notifications }), typeof t.last == "object" && (t.notifications.last = t.last, delete t.last)), t.v === 1 && (Array.isArray(t.composition) && (t.composition = "composition"), Array.isArray(t.notifications.last.banner) || (t.notifications = t.notifications || {}, t.notifications.last = t.notifications.last || {}, t.notifications.last.banner = [])), t.v === 2 && (t.syncSettings = !0, t.disableAds = !1, t.v = 3), t.v === 3 && (t.quickbar = !1), t.v = o.v, Object.assign(o, I(o, t)), h && s();
|
|
50
75
|
}
|
|
51
76
|
function s() {
|
|
52
|
-
A && localStorage.setItem("vuetify@user", JSON.stringify(
|
|
77
|
+
A && localStorage.setItem("vuetify@user", JSON.stringify(o, null, 2));
|
|
53
78
|
}
|
|
54
|
-
function
|
|
55
|
-
A && (Object.assign(
|
|
79
|
+
function i() {
|
|
80
|
+
A && (Object.assign(o, I({}, R)), s());
|
|
56
81
|
}
|
|
57
|
-
return
|
|
58
|
-
...
|
|
59
|
-
load:
|
|
82
|
+
return e(), {
|
|
83
|
+
...K(o),
|
|
84
|
+
load: e,
|
|
60
85
|
save: s,
|
|
61
|
-
reset:
|
|
86
|
+
reset: i
|
|
62
87
|
};
|
|
63
|
-
}),
|
|
64
|
-
const
|
|
65
|
-
var
|
|
66
|
-
return !
|
|
88
|
+
}), V = x("auth", () => {
|
|
89
|
+
const o = j(null), e = C(), s = q(), i = T(!1), r = D(() => {
|
|
90
|
+
var n, l;
|
|
91
|
+
return !e.url || ((n = o.value) == null ? void 0 : n.isAdmin) || ((l = o.value) == null ? void 0 : l.sponsorships.some((S) => S.isActive));
|
|
67
92
|
});
|
|
68
|
-
let
|
|
69
|
-
|
|
70
|
-
if (!(
|
|
93
|
+
let t = !1;
|
|
94
|
+
F(o, (n) => {
|
|
95
|
+
if (!(n != null && n.settings))
|
|
71
96
|
return;
|
|
72
97
|
const l = localStorage.getItem("vuetify@user") || "{}";
|
|
73
|
-
JSON.stringify(
|
|
74
|
-
}),
|
|
75
|
-
|
|
98
|
+
JSON.stringify(n.settings, null, 2) !== l && (t = !0, Object.assign(s, n.settings));
|
|
99
|
+
}), s.$subscribe(() => {
|
|
100
|
+
t || h(), t = !1;
|
|
76
101
|
});
|
|
77
|
-
async function
|
|
102
|
+
async function h() {
|
|
78
103
|
try {
|
|
79
|
-
await
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
headers: {
|
|
83
|
-
"Content-Type": "application/json"
|
|
84
|
-
},
|
|
85
|
-
body: JSON.stringify({
|
|
86
|
-
settings: t.$state
|
|
87
|
-
})
|
|
88
|
-
});
|
|
89
|
-
} catch (o) {
|
|
90
|
-
console.error(o);
|
|
104
|
+
await e.post("/user/settings", { settings: s.$state });
|
|
105
|
+
} catch (n) {
|
|
106
|
+
console.error(n);
|
|
91
107
|
}
|
|
92
108
|
}
|
|
93
|
-
async function c(
|
|
109
|
+
async function c(n = !1) {
|
|
94
110
|
if (c.promise)
|
|
95
111
|
return c.promise;
|
|
96
|
-
|
|
112
|
+
i.value = !0, c.promise = fetch(`${e.url}/auth/verify`, {
|
|
97
113
|
credentials: "include",
|
|
98
|
-
headers:
|
|
114
|
+
headers: n ? {
|
|
99
115
|
"Cache-Control": "no-cache"
|
|
100
116
|
} : void 0
|
|
101
117
|
}).then(
|
|
102
118
|
async (l) => {
|
|
103
|
-
l.ok ?
|
|
119
|
+
l.ok ? o.value = (await l.json()).user : l.status === 401 ? o.value = null : console.error(l.statusText);
|
|
104
120
|
},
|
|
105
121
|
() => {
|
|
106
122
|
}
|
|
107
123
|
).finally(() => {
|
|
108
|
-
|
|
124
|
+
i.value = !1, c.promise = null;
|
|
109
125
|
});
|
|
110
126
|
}
|
|
111
127
|
c.promise = null;
|
|
112
|
-
async function
|
|
113
|
-
|
|
114
|
-
const l = `${
|
|
128
|
+
async function f(n = "github") {
|
|
129
|
+
i.value = !0;
|
|
130
|
+
const l = `${e.url}/auth/${n}/redirect`, S = 400, O = 600, X = window.screenX + (window.innerWidth - S) / 2, Y = window.screenY + (window.innerHeight - O) / 2, v = window.open(
|
|
115
131
|
"",
|
|
116
132
|
"vuetify:authorize:popup",
|
|
117
|
-
`popup,left=${
|
|
133
|
+
`popup,left=${X},top=${Y},width=${S},height=${O},resizable`
|
|
118
134
|
);
|
|
119
|
-
if (!
|
|
135
|
+
if (!v) {
|
|
120
136
|
console.error("Failed to open popup");
|
|
121
137
|
return;
|
|
122
138
|
}
|
|
123
|
-
|
|
124
|
-
let
|
|
125
|
-
function
|
|
126
|
-
var
|
|
127
|
-
|
|
139
|
+
v.location.href = l;
|
|
140
|
+
let H = -1, B = -1;
|
|
141
|
+
function N(b) {
|
|
142
|
+
var U;
|
|
143
|
+
b.origin === e.url && ((U = b.data) == null ? void 0 : U.type) === "auth-response" && (b.data.status === "success" ? (o.value || localStorage.setItem("vuetify@lastLoginProvider", n), o.value = b.data.body.user) : console.error(b.data.message), k());
|
|
128
144
|
}
|
|
129
145
|
function k() {
|
|
130
|
-
window.removeEventListener("message",
|
|
146
|
+
window.removeEventListener("message", N), window.clearInterval(H), window.clearTimeout(B), v == null || v.close(), i.value = !1;
|
|
131
147
|
}
|
|
132
|
-
window.addEventListener("message",
|
|
133
|
-
!
|
|
134
|
-
}, 1e3),
|
|
148
|
+
window.addEventListener("message", N), H = window.setInterval(() => {
|
|
149
|
+
!v || v.closed ? (console.error("Auth popup closed"), k()) : v.postMessage({ type: "auth-request" }, "*");
|
|
150
|
+
}, 1e3), B = window.setTimeout(() => {
|
|
135
151
|
k(), console.error("Auth timed out");
|
|
136
152
|
}, 120 * 1e3);
|
|
137
153
|
}
|
|
138
|
-
async function
|
|
139
|
-
|
|
154
|
+
async function u() {
|
|
155
|
+
i.value = !0;
|
|
140
156
|
try {
|
|
141
|
-
await
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}), await c(!0), i.value = null;
|
|
145
|
-
} catch (o) {
|
|
146
|
-
console.error(o);
|
|
157
|
+
await e.post("/auth/logout"), await c(!0), o.value = null;
|
|
158
|
+
} catch (n) {
|
|
159
|
+
console.error(n);
|
|
147
160
|
} finally {
|
|
148
|
-
|
|
161
|
+
i.value = !1;
|
|
149
162
|
}
|
|
150
163
|
}
|
|
151
|
-
function
|
|
164
|
+
function m() {
|
|
152
165
|
return localStorage.getItem("vuetify@lastLoginProvider");
|
|
153
166
|
}
|
|
154
|
-
return
|
|
155
|
-
user:
|
|
156
|
-
url:
|
|
157
|
-
isLoading:
|
|
167
|
+
return m() && c(), {
|
|
168
|
+
user: o,
|
|
169
|
+
url: e.url,
|
|
170
|
+
isLoading: i,
|
|
158
171
|
verify: c,
|
|
159
|
-
login:
|
|
160
|
-
logout:
|
|
161
|
-
isSubscriber:
|
|
162
|
-
lastLoginProvider:
|
|
172
|
+
login: f,
|
|
173
|
+
logout: u,
|
|
174
|
+
isSubscriber: r,
|
|
175
|
+
lastLoginProvider: m
|
|
163
176
|
};
|
|
164
|
-
}),
|
|
177
|
+
}), Vt = /* @__PURE__ */ L({
|
|
165
178
|
__name: "VoDiscordLogin",
|
|
166
|
-
setup(
|
|
167
|
-
const
|
|
168
|
-
return (s,
|
|
169
|
-
"prepend-icon": `svg:${a(
|
|
170
|
-
title: a(
|
|
171
|
-
subtitle: !a(
|
|
179
|
+
setup(o) {
|
|
180
|
+
const e = V();
|
|
181
|
+
return (s, i) => (g(), y(G, {
|
|
182
|
+
"prepend-icon": `svg:${a(P)}`,
|
|
183
|
+
title: a(e).user ? "Connect Discord" : "Log in with Discord",
|
|
184
|
+
subtitle: !a(e).user && a(e).lastLoginProvider() === "discord" ? "Last Used" : "",
|
|
172
185
|
nav: "",
|
|
173
186
|
"base-color": "#5865F2",
|
|
174
187
|
slim: "",
|
|
175
188
|
variant: "flat",
|
|
176
|
-
onClick:
|
|
189
|
+
onClick: i[0] || (i[0] = (r) => a(e).login("discord"))
|
|
177
190
|
}, null, 8, ["prepend-icon", "title", "subtitle"]));
|
|
178
191
|
}
|
|
179
|
-
}),
|
|
192
|
+
}), St = /* @__PURE__ */ L({
|
|
180
193
|
__name: "VoGithubLogin",
|
|
181
|
-
setup(
|
|
182
|
-
const
|
|
183
|
-
return (s,
|
|
184
|
-
"prepend-icon": `svg:${a(
|
|
185
|
-
title: a(
|
|
186
|
-
subtitle: !a(
|
|
194
|
+
setup(o) {
|
|
195
|
+
const e = V();
|
|
196
|
+
return (s, i) => (g(), y(G, {
|
|
197
|
+
"prepend-icon": `svg:${a(E)}`,
|
|
198
|
+
title: a(e).user ? "Connect GitHub" : "Log in with GitHub",
|
|
199
|
+
subtitle: !a(e).user && a(e).lastLoginProvider() === "github" ? "Last Used" : "",
|
|
187
200
|
"base-color": "#2a2a2a",
|
|
188
201
|
nav: "",
|
|
189
202
|
slim: "",
|
|
190
203
|
variant: "flat",
|
|
191
|
-
onClick:
|
|
204
|
+
onClick: i[0] || (i[0] = (r) => a(e).login("github"))
|
|
192
205
|
}, null, 8, ["prepend-icon", "title", "subtitle"]));
|
|
193
206
|
}
|
|
194
|
-
}), $
|
|
207
|
+
}), $t = /* @__PURE__ */ L({
|
|
195
208
|
__name: "VoUserBtn",
|
|
196
209
|
props: {
|
|
197
210
|
external: Boolean
|
|
198
211
|
},
|
|
199
|
-
setup(
|
|
200
|
-
const
|
|
212
|
+
setup(o) {
|
|
213
|
+
const e = o, s = V(), i = q(), r = [
|
|
201
214
|
{ title: "Options", type: "subheader" },
|
|
202
215
|
{
|
|
203
216
|
title: "My Dashboard",
|
|
204
|
-
appendIcon: `svg:${
|
|
205
|
-
to:
|
|
206
|
-
href:
|
|
207
|
-
target:
|
|
217
|
+
appendIcon: `svg:${at}`,
|
|
218
|
+
to: e.external ? void 0 : "/user/dashboard",
|
|
219
|
+
href: e.external ? "https://vuetifyjs.com/user/dashboard/" : void 0,
|
|
220
|
+
target: e.external ? "_blank" : void 0
|
|
208
221
|
},
|
|
209
222
|
{
|
|
210
223
|
title: "Logout",
|
|
211
|
-
appendIcon: `svg:${
|
|
224
|
+
appendIcon: `svg:${lt}`,
|
|
212
225
|
onClick: () => {
|
|
213
226
|
s.logout();
|
|
214
227
|
}
|
|
215
228
|
}
|
|
216
229
|
];
|
|
217
|
-
return (
|
|
230
|
+
return (t, h) => (g(), y(J, {
|
|
218
231
|
class: "vo-user-btn",
|
|
219
232
|
loading: a(s).isLoading,
|
|
220
233
|
icon: ""
|
|
221
234
|
}, {
|
|
222
|
-
loader:
|
|
223
|
-
|
|
235
|
+
loader: p(() => [
|
|
236
|
+
d(ht, { type: "avatar" })
|
|
224
237
|
]),
|
|
225
|
-
default:
|
|
226
|
-
|
|
238
|
+
default: p(() => [
|
|
239
|
+
d(mt, {
|
|
227
240
|
disabled: !a(s).user || a(s).isLoading,
|
|
228
241
|
activator: "parent",
|
|
229
242
|
location: "bottom end"
|
|
230
243
|
}, {
|
|
231
|
-
default:
|
|
232
|
-
|
|
244
|
+
default: p(() => [
|
|
245
|
+
d(M, {
|
|
233
246
|
items: r,
|
|
234
247
|
lines: !1,
|
|
235
248
|
density: "compact",
|
|
236
249
|
"item-props": "",
|
|
237
250
|
nav: ""
|
|
238
251
|
}, {
|
|
239
|
-
subheader:
|
|
240
|
-
|
|
241
|
-
default:
|
|
242
|
-
w(
|
|
252
|
+
subheader: p(({ props: c }) => [
|
|
253
|
+
d(dt, { class: "text-high-emphasis text-uppercase font-weight-black" }, {
|
|
254
|
+
default: p(() => [
|
|
255
|
+
w($(c.title), 1)
|
|
243
256
|
]),
|
|
244
257
|
_: 2
|
|
245
258
|
}, 1024)
|
|
@@ -249,33 +262,33 @@ const A = typeof window < "u", U = {
|
|
|
249
262
|
]),
|
|
250
263
|
_: 1
|
|
251
264
|
}, 8, ["disabled"]),
|
|
252
|
-
a(s).user ? (
|
|
265
|
+
a(s).user ? (g(), y(pt, {
|
|
253
266
|
key: 0,
|
|
254
|
-
image: a(
|
|
267
|
+
image: a(i).avatar || a(s).user.picture || ""
|
|
255
268
|
}, null, 8, ["image"])) : Q("", !0)
|
|
256
269
|
]),
|
|
257
270
|
_: 1
|
|
258
271
|
}, 8, ["loading"]));
|
|
259
272
|
}
|
|
260
273
|
});
|
|
261
|
-
const
|
|
262
|
-
const s =
|
|
263
|
-
for (const [
|
|
264
|
-
s[
|
|
274
|
+
const z = (o, e) => {
|
|
275
|
+
const s = o.__vccOpts || o;
|
|
276
|
+
for (const [i, r] of e)
|
|
277
|
+
s[i] = r;
|
|
265
278
|
return s;
|
|
266
|
-
},
|
|
279
|
+
}, kt = /* @__PURE__ */ z($t, [["__scopeId", "data-v-8e6fff6f"]]), It = { class: "text-center mb-6" }, At = /* @__PURE__ */ L({
|
|
267
280
|
__name: "VoAuthDialog",
|
|
268
|
-
setup(
|
|
269
|
-
const
|
|
270
|
-
return (
|
|
281
|
+
setup(o) {
|
|
282
|
+
const e = V(), { mdAndDown: s, lgAndUp: i } = vt(), r = gt();
|
|
283
|
+
return (t, h) => !a(e).user && !a(e).isLoading ? (g(), y(wt, {
|
|
271
284
|
key: 0,
|
|
272
285
|
"max-width": "480"
|
|
273
286
|
}, {
|
|
274
|
-
activator:
|
|
275
|
-
|
|
276
|
-
...
|
|
277
|
-
[`${a(
|
|
278
|
-
text: a(
|
|
287
|
+
activator: p(({ props: c }) => [
|
|
288
|
+
d(J, tt({
|
|
289
|
+
...c,
|
|
290
|
+
[`${a(i) ? "append-" : ""}icon`]: `svg:${a(ct)}`,
|
|
291
|
+
text: a(i) ? "Login" : void 0
|
|
279
292
|
}, {
|
|
280
293
|
rounded: a(s),
|
|
281
294
|
class: "text-none",
|
|
@@ -283,36 +296,36 @@ const q = (i, t) => {
|
|
|
283
296
|
variant: "outlined"
|
|
284
297
|
}), null, 16, ["rounded"])
|
|
285
298
|
]),
|
|
286
|
-
default:
|
|
287
|
-
|
|
288
|
-
default:
|
|
289
|
-
|
|
299
|
+
default: p(() => [
|
|
300
|
+
d(yt, { class: "pt-6 pb-1 pb-sm-4 px-4 px-sm-8" }, {
|
|
301
|
+
default: p(() => [
|
|
302
|
+
d(W, {
|
|
290
303
|
src: `https://cdn.vuetifyjs.com/docs/images/logos/vuetify-logo-v3-slim-text-${a(r).name.value}.svg`,
|
|
291
304
|
class: "mb-4",
|
|
292
305
|
height: "30"
|
|
293
306
|
}, null, 8, ["src"]),
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
default:
|
|
297
|
-
w(
|
|
307
|
+
_("div", It, [
|
|
308
|
+
d(bt, { class: "text-h5 mb-1 text-md-h4 font-weight-bold" }, {
|
|
309
|
+
default: p(() => [
|
|
310
|
+
w($(a(e).lastLoginProvider() ? "Welcome Back" : "Log in to Vuetify"), 1)
|
|
298
311
|
]),
|
|
299
312
|
_: 1
|
|
300
313
|
}),
|
|
301
|
-
|
|
302
|
-
default:
|
|
314
|
+
d(_t, { class: "text-wrap" }, {
|
|
315
|
+
default: p(() => [
|
|
303
316
|
w(" Sign in with GitHub or Discord to save your settings and unlock exclusive subscriber perks. ")
|
|
304
317
|
]),
|
|
305
318
|
_: 1
|
|
306
319
|
})
|
|
307
320
|
]),
|
|
308
|
-
|
|
321
|
+
d(M, {
|
|
309
322
|
class: "mx-auto",
|
|
310
323
|
"max-width": "300",
|
|
311
324
|
width: "100%"
|
|
312
325
|
}, {
|
|
313
|
-
default:
|
|
314
|
-
|
|
315
|
-
|
|
326
|
+
default: p(() => [
|
|
327
|
+
d(St, { class: "mb-3" }),
|
|
328
|
+
d(Vt)
|
|
316
329
|
]),
|
|
317
330
|
_: 1
|
|
318
331
|
})
|
|
@@ -321,24 +334,24 @@ const q = (i, t) => {
|
|
|
321
334
|
})
|
|
322
335
|
]),
|
|
323
336
|
_: 1
|
|
324
|
-
})) : (
|
|
337
|
+
})) : (g(), y(kt, { key: 1 }));
|
|
325
338
|
}
|
|
326
|
-
}),
|
|
339
|
+
}), jt = (o) => (nt("data-v-6f6b85b8"), o = o(), it(), o), Dt = {
|
|
327
340
|
class: "d-inline-block me-2 text-decoration-none text-primary",
|
|
328
341
|
href: "https://vuetifyjs.com/",
|
|
329
342
|
target: "_blank",
|
|
330
343
|
title: "Vuetify Documentation",
|
|
331
344
|
rel: "noopener noreferrer"
|
|
332
|
-
},
|
|
345
|
+
}, Ct = ["href", "title"], Ot = {
|
|
333
346
|
class: "text-caption",
|
|
334
347
|
style: { position: "absolute", right: "16px" }
|
|
335
|
-
},
|
|
348
|
+
}, Ht = /* @__PURE__ */ jt(() => /* @__PURE__ */ _("span", { class: "d-none d-sm-inline-block" }, "Vuetify, LLC", -1)), Bt = /* @__PURE__ */ L({
|
|
336
349
|
__name: "VoFooter",
|
|
337
|
-
setup(
|
|
338
|
-
const
|
|
350
|
+
setup(o) {
|
|
351
|
+
const e = [
|
|
339
352
|
{
|
|
340
353
|
title: "Vuetify Support",
|
|
341
|
-
icon: `svg:${
|
|
354
|
+
icon: `svg:${ut}`,
|
|
342
355
|
href: "https://support.vuetifyjs.com/"
|
|
343
356
|
},
|
|
344
357
|
{
|
|
@@ -348,34 +361,34 @@ const q = (i, t) => {
|
|
|
348
361
|
},
|
|
349
362
|
{
|
|
350
363
|
title: "Vuetify GitHub",
|
|
351
|
-
icon: `svg:${
|
|
364
|
+
icon: `svg:${E}`,
|
|
352
365
|
href: "https://github.com/vuetifyjs/vuetify"
|
|
353
366
|
},
|
|
354
367
|
{
|
|
355
368
|
title: "Vuetify Discord",
|
|
356
|
-
icon: `svg:${
|
|
369
|
+
icon: `svg:${P}`,
|
|
357
370
|
href: "https://community.vuetifyjs.com/"
|
|
358
371
|
},
|
|
359
372
|
{
|
|
360
373
|
title: "Vuetify Reddit",
|
|
361
|
-
icon: `svg:${
|
|
374
|
+
icon: `svg:${ft}`,
|
|
362
375
|
href: "https://reddit.com/r/vuetifyjs"
|
|
363
376
|
}
|
|
364
377
|
];
|
|
365
|
-
return (s,
|
|
378
|
+
return (s, i) => (g(), y(Lt, {
|
|
366
379
|
class: "vo-footer",
|
|
367
380
|
theme: "dark",
|
|
368
381
|
height: "40"
|
|
369
382
|
}, {
|
|
370
|
-
default:
|
|
371
|
-
|
|
372
|
-
|
|
383
|
+
default: p(() => [
|
|
384
|
+
_("a", Dt, [
|
|
385
|
+
d(W, {
|
|
373
386
|
alt: "Vuetify logo",
|
|
374
387
|
src: "https://cdn.vuetifyjs.com/docs/images/logos/v.svg",
|
|
375
388
|
width: "32"
|
|
376
389
|
})
|
|
377
390
|
]),
|
|
378
|
-
(
|
|
391
|
+
(g(), et(ot, null, st(e, (r) => _("a", {
|
|
379
392
|
key: r.title,
|
|
380
393
|
href: r.href,
|
|
381
394
|
title: r.title,
|
|
@@ -383,104 +396,128 @@ const q = (i, t) => {
|
|
|
383
396
|
target: "_blank",
|
|
384
397
|
rel: "noopener noreferrer"
|
|
385
398
|
}, [
|
|
386
|
-
|
|
387
|
-
default:
|
|
388
|
-
w(
|
|
399
|
+
d(xt, { size: "18" }, {
|
|
400
|
+
default: p(() => [
|
|
401
|
+
w($(r.icon), 1)
|
|
389
402
|
]),
|
|
390
403
|
_: 2
|
|
391
404
|
}, 1024)
|
|
392
|
-
], 8,
|
|
393
|
-
|
|
394
|
-
w(" © 2016-" +
|
|
395
|
-
|
|
405
|
+
], 8, Ct)), 64)),
|
|
406
|
+
_("div", Ot, [
|
|
407
|
+
w(" © 2016-" + $((/* @__PURE__ */ new Date()).getFullYear()) + " ", 1),
|
|
408
|
+
Ht
|
|
396
409
|
])
|
|
397
410
|
]),
|
|
398
411
|
_: 1
|
|
399
412
|
}));
|
|
400
413
|
}
|
|
401
414
|
});
|
|
402
|
-
const
|
|
403
|
-
const
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
415
|
+
const Nt = /* @__PURE__ */ z(Bt, [["__scopeId", "data-v-6f6b85b8"]]), Kt = x("bins", () => {
|
|
416
|
+
const o = C(), e = j([]), s = j();
|
|
417
|
+
async function i() {
|
|
418
|
+
const f = await o.get("/one/bins");
|
|
419
|
+
e.value = f.bins;
|
|
420
|
+
}
|
|
421
|
+
async function r(f) {
|
|
422
|
+
const u = await o.post("/one/bins", { bin: f });
|
|
423
|
+
return e.value.push(u.bin), s.value = u.bin, u;
|
|
424
|
+
}
|
|
425
|
+
async function t(f, u) {
|
|
426
|
+
const m = await o.post(`/one/bins/${u}`, { bin: f }), n = e.value.findIndex((l) => l.id === u);
|
|
427
|
+
return e.value.splice(n, 1, m.bin), s.value = m.bin, m;
|
|
428
|
+
}
|
|
429
|
+
async function h(f, u) {
|
|
430
|
+
const m = u ? await t(f, u) : await r(f);
|
|
431
|
+
return s.value = m.bin, m;
|
|
432
|
+
}
|
|
433
|
+
async function c(f) {
|
|
434
|
+
const u = await o.get(`/one/bins/${f}`);
|
|
435
|
+
return s.value = u.bin, u;
|
|
436
|
+
}
|
|
437
|
+
return {
|
|
438
|
+
all: e,
|
|
439
|
+
create: r,
|
|
440
|
+
current: s,
|
|
441
|
+
find: c,
|
|
442
|
+
get: i,
|
|
443
|
+
update: t,
|
|
444
|
+
updateOrCreate: h
|
|
445
|
+
};
|
|
446
|
+
}), Qt = x("one", () => {
|
|
447
|
+
const e = new URLSearchParams(window.location.search).get("session_id"), s = V(), i = C(), r = T(!1), t = D(() => {
|
|
448
|
+
var n;
|
|
449
|
+
return (n = s.user) == null ? void 0 : n.sponsorships.find((l) => l.platform === "stripe" && l.tierName.startsWith("sub_"));
|
|
450
|
+
}), h = D(() => {
|
|
451
|
+
var n;
|
|
452
|
+
return (n = t.value) == null ? void 0 : n.isActive;
|
|
409
453
|
});
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
}),
|
|
413
|
-
|
|
454
|
+
rt(async () => {
|
|
455
|
+
e && await c();
|
|
456
|
+
}), F(h, (n) => {
|
|
457
|
+
n && m();
|
|
414
458
|
});
|
|
415
459
|
async function c() {
|
|
416
460
|
try {
|
|
417
|
-
|
|
418
|
-
const
|
|
419
|
-
|
|
420
|
-
credentials: "include",
|
|
421
|
-
headers: {
|
|
422
|
-
"Content-Type": "application/json"
|
|
423
|
-
},
|
|
424
|
-
body: JSON.stringify({ sessionId: t })
|
|
425
|
-
}).then((l) => l.json());
|
|
426
|
-
s.user = o.user;
|
|
461
|
+
r.value = !0;
|
|
462
|
+
const n = await i.post("/one/activate", { sessionId: e });
|
|
463
|
+
s.user = n.user;
|
|
427
464
|
} catch {
|
|
428
465
|
} finally {
|
|
429
|
-
|
|
466
|
+
r.value = !1;
|
|
430
467
|
}
|
|
431
468
|
}
|
|
432
|
-
async function
|
|
433
|
-
|
|
469
|
+
async function f() {
|
|
470
|
+
r.value = !0, window.location.href = `${i.url}/one/subscribe`;
|
|
434
471
|
}
|
|
435
|
-
async function
|
|
436
|
-
var
|
|
437
|
-
if (
|
|
472
|
+
async function u() {
|
|
473
|
+
var n;
|
|
474
|
+
if (t.value)
|
|
438
475
|
try {
|
|
439
|
-
|
|
440
|
-
const l = await
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
}).then((f) => f.json());
|
|
476
|
+
r.value = !0;
|
|
477
|
+
const l = await i.post(
|
|
478
|
+
`/one/cancel?subscriptionId=${(n = t.value) == null ? void 0 : n.tierName}`
|
|
479
|
+
);
|
|
444
480
|
s.user = l.user;
|
|
445
481
|
} catch {
|
|
446
482
|
} finally {
|
|
447
|
-
|
|
483
|
+
r.value = !1;
|
|
448
484
|
}
|
|
449
485
|
}
|
|
450
|
-
async function
|
|
451
|
-
var
|
|
452
|
-
if (
|
|
486
|
+
async function m() {
|
|
487
|
+
var n;
|
|
488
|
+
if (t.value)
|
|
453
489
|
try {
|
|
454
|
-
|
|
455
|
-
const l = await
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
}).then((f) => f.json());
|
|
490
|
+
r.value = !0;
|
|
491
|
+
const l = await i.post(
|
|
492
|
+
`/one/verify?subscriptionId=${(n = t.value) == null ? void 0 : n.tierName}`
|
|
493
|
+
);
|
|
459
494
|
s.user = l.user;
|
|
460
495
|
} catch {
|
|
461
496
|
} finally {
|
|
462
|
-
|
|
497
|
+
r.value = !1;
|
|
463
498
|
}
|
|
464
499
|
}
|
|
465
500
|
return {
|
|
466
501
|
activate: c,
|
|
467
|
-
cancel:
|
|
468
|
-
subscribe:
|
|
469
|
-
verify:
|
|
470
|
-
subscription:
|
|
471
|
-
isLoading:
|
|
472
|
-
isSubscriber:
|
|
502
|
+
cancel: u,
|
|
503
|
+
subscribe: f,
|
|
504
|
+
verify: m,
|
|
505
|
+
subscription: t,
|
|
506
|
+
isLoading: r,
|
|
507
|
+
isSubscriber: h
|
|
473
508
|
};
|
|
474
509
|
});
|
|
475
|
-
function
|
|
476
|
-
function
|
|
477
|
-
|
|
510
|
+
function te() {
|
|
511
|
+
function o(e) {
|
|
512
|
+
e.component("VoAuthDialog", At), e.component("VoFooter", Nt);
|
|
478
513
|
}
|
|
479
|
-
return { install:
|
|
514
|
+
return { install: o };
|
|
480
515
|
}
|
|
481
516
|
export {
|
|
482
|
-
|
|
517
|
+
te as createOne,
|
|
483
518
|
V as useAuthStore,
|
|
484
|
-
|
|
485
|
-
|
|
519
|
+
Kt as useBinsStore,
|
|
520
|
+
C as useHttpStore,
|
|
521
|
+
Qt as useOneStore,
|
|
522
|
+
q as useUserStore
|
|
486
523
|
};
|