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