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