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