@trifle/trifle-hub 1.0.158 → 1.0.159
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/AccountIndex-I_m-xJA2.js +119 -0
- package/dist/Earn-eUazTpJq.js +521 -0
- package/dist/{ExchangeController-O21rDxQI.js → ExchangeController-DV12Cckz.js} +1 -1
- package/dist/{Games-urE8dCiQ.js → Games-_af0-zsI.js} +126 -100
- package/dist/{HelpersUtil-CTL0zzpL.js → HelpersUtil-DffXsS4s.js} +2 -2
- package/dist/{Leaderboard-p6FRl_qo.js → Leaderboard-CdNJ6RpN.js} +78 -74
- package/dist/Profile-DQwKnS5C.js +1619 -0
- package/dist/{ReownAuthentication-z0Hzyrdn.js → ReownAuthentication-4hJzNS3a.js} +4 -4
- package/dist/{SocialsButtons-CE7zWqqh.js → SocialsButtons-BXUP5WJn.js} +1 -1
- package/dist/{SwapController-D-08czsg.js → SwapController-RS74Rf8y.js} +1 -1
- package/dist/{TrifleGuide-DBjZze_W.js → TrifleGuide-DV95aOiF.js} +1 -1
- package/dist/components/ReferralSection.vue.d.ts +2 -0
- package/dist/components/TwitterEngagementQuest.vue.d.ts +2 -0
- package/dist/components/TwitterTweetSummary.vue.d.ts +2 -0
- package/dist/config/pointsConfig.d.ts +0 -13
- package/dist/{data-capture-BurHpsk0.js → data-capture-4Zt7Mh-x.js} +10 -10
- package/dist/{email-caSfULEh.js → email-keN3MwiL.js} +8 -8
- package/dist/{embedded-wallet-CEz0Lhvv.js → embedded-wallet-4uVCFENX.js} +15 -15
- package/dist/{features-BwTHxbfn.js → features-DP96zO-E.js} +1 -1
- package/dist/{if-defined-BNumhkgE.js → if-defined-DWpQnkBo.js} +1 -1
- package/dist/{index-C_2OLYwS.js → index-B5bAjn80.js} +5 -5
- package/dist/{index-DodtoSGj.js → index-B6qbfcv3.js} +3 -3
- package/dist/{index-C7eEhpa8.js → index-B8IL-7_U.js} +4 -4
- package/dist/{index-89vSMSlU.js → index-BBl5qF2M.js} +3 -3
- package/dist/{index-CQFGvnA-.js → index-BO7qLY_A.js} +7 -7
- package/dist/{index-msSimcJK.js → index-BPs0GUi0.js} +4 -4
- package/dist/{index-Cb7k9l7V.js → index-Bs_op1YX.js} +3 -3
- package/dist/{index-B6GGU_Yv.js → index-BxFE2Unj.js} +23 -23
- package/dist/{index-K1xv67LI.js → index-C0G7EHjl.js} +29 -29
- package/dist/{index-Dg7_cwWU.js → index-C1P1tCug.js} +5 -5
- package/dist/{index-Bkj3uNfm.js → index-C8z4JeX0.js} +5 -5
- package/dist/{index-B3Kw351e.js → index-CIz85z2d.js} +2 -2
- package/dist/{index-D76hQfB6.js → index-CWQmRKXJ.js} +4 -4
- package/dist/{index-CwAgKs0q.js → index-CcH4ohJ_.js} +4 -4
- package/dist/{index-DXVkuTgx.js → index-CfQ4XGey.js} +5 -5
- package/dist/{index-BHgZhZnd.js → index-CpFp2zWs.js} +2 -2
- package/dist/{index-BestOUlf.js → index-Csp20V_C.js} +97 -58
- package/dist/{index-pCBpwyph.js → index-CyTfW7bb.js} +6 -6
- package/dist/{index-Co_urUVD.js → index-D1PtCSNo.js} +2 -2
- package/dist/{index-B4ypbAaJ.js → index-DDxhg6X6.js} +2 -2
- package/dist/{index-D-P8X6DA.js → index-DKPj-Jsc.js} +3 -3
- package/dist/{index-DpIl6Wev.js → index-DN-NdrN8.js} +3 -3
- package/dist/{index-C7xl7pFK.js → index-DOVqr745.js} +31 -31
- package/dist/{index-BMPcBhgi.js → index-DPm1qXRL.js} +8 -8
- package/dist/{index-5_bOFSu-.js → index-DaRwVfNh.js} +8 -8
- package/dist/{index-BvQv0KlV.js → index-DhdIiv9I.js} +4 -4
- package/dist/{index-DfgpBvgd.js → index-DlHufcDq.js} +7 -7
- package/dist/{index-FhNgcqVw.js → index-DnZf5kFT.js} +4 -4
- package/dist/{index-DkZ5owF-.js → index-E6-HL-vX.js} +5 -5
- package/dist/{index-gh4E7rPC.js → index-G7BEtCTt.js} +3 -3
- package/dist/{index-0UckIGq1.js → index-QJqrYOWX.js} +5 -5
- package/dist/{index-hrWlsaQz.js → index-QxHb_qeo.js} +5 -5
- package/dist/{index-BFnZ3glo.js → index-SB-6jek0.js} +4 -4
- package/dist/{index-C1gHFH6V.js → index-UnIJhvbF.js} +1 -1
- package/dist/{index-DVj-n2n2.js → index-dR4kMyJ7.js} +1 -1
- package/dist/{index-PnMkyIQv.js → index-gjTnuwmH.js} +2 -2
- package/dist/index.es.js +2 -2
- package/dist/{onramp-DDMX8dgQ.js → onramp-BfgwVaz4.js} +23 -23
- package/dist/{pay-with-exchange-DupicqoA.js → pay-with-exchange-IINfHruD.js} +15 -15
- package/dist/{receive-CslAXVA7.js → receive-tK9feGwv.js} +7 -7
- package/dist/{ref-CJX9F_fb.js → ref-CDkfw-zs.js} +2 -2
- package/dist/{send-DkMybs9S.js → send-mES3HGGI.js} +15 -15
- package/dist/{socials-DbW23ibQ.js → socials-U7A0qfan.js} +16 -16
- package/dist/{swaps-4_FZwgjm.js → swaps-CVIliCpc.js} +11 -11
- package/dist/{transactions-CDTgv5JK.js → transactions-C1kMLLvz.js} +3 -3
- package/dist/{w3m-modal-CRjTiieg.js → w3m-modal-DYHBxO0T.js} +12 -12
- package/package.json +1 -1
- package/dist/AccountIndex-Tw5xY7ab.js +0 -1140
- package/dist/AccountLayout-DtKvcqQk.js +0 -28
- package/dist/Earn-wpObjq-V.js +0 -306
- package/dist/Profile-BXTdPhEU.js +0 -246
- /package/dist/{views/Account/UserAccount.vue.d.ts → components/AccountSettings.vue.d.ts} +0 -0
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { createElementBlock as _, openBlock as l, createElementVNode as e, renderSlot as s } from "vue";
|
|
2
|
-
import { _ as o } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
3
|
-
const c = {}, n = { class: "_p-5 _w-full _flex _flex-col _gap-6 _items-center _overflow-y-scroll-masked _no-scrollbar _relative" }, r = { class: "_absolute _top-4 _left-4 _z-10" }, a = { class: "_mt-8 _w-full _text-center" }, i = { class: "_size-24 _rounded-full _mx-auto" }, d = { class: "_mt-5 _flex _flex-col _gap-3 _w-full" }, f = { class: "_text-5xl _tracking-wide _w-full _text-center _min-w-0" }, m = { class: "_w-full _flex-1 _flex _flex-col _gap-3" };
|
|
4
|
-
function u(t, p) {
|
|
5
|
-
return l(), _("div", n, [
|
|
6
|
-
e("div", r, [
|
|
7
|
-
s(t.$slots, "admin-controls")
|
|
8
|
-
]),
|
|
9
|
-
e("header", a, [
|
|
10
|
-
e("div", i, [
|
|
11
|
-
s(t.$slots, "avatar")
|
|
12
|
-
]),
|
|
13
|
-
e("div", d, [
|
|
14
|
-
e("h2", f, [
|
|
15
|
-
s(t.$slots, "title")
|
|
16
|
-
]),
|
|
17
|
-
s(t.$slots, "description")
|
|
18
|
-
])
|
|
19
|
-
]),
|
|
20
|
-
e("section", m, [
|
|
21
|
-
s(t.$slots, "default")
|
|
22
|
-
])
|
|
23
|
-
]);
|
|
24
|
-
}
|
|
25
|
-
const w = /* @__PURE__ */ o(c, [["render", u]]);
|
|
26
|
-
export {
|
|
27
|
-
w as A
|
|
28
|
-
};
|
package/dist/Earn-wpObjq-V.js
DELETED
|
@@ -1,306 +0,0 @@
|
|
|
1
|
-
import { inject as H, ref as m, computed as Q, watch as G, onMounted as Y, createElementBlock as s, openBlock as n, createElementVNode as t, createVNode as g, createCommentVNode as u, withCtx as y, createTextVNode as h, unref as p, normalizeStyle as j, toDisplayString as v, normalizeClass as f, TransitionGroup as J, Fragment as A, renderList as E, createBlock as R, resolveDynamicComponent as Z } from "vue";
|
|
2
|
-
import { m as K, n as W, o as M } from "./index-BestOUlf.js";
|
|
3
|
-
import { H as X } from "./HubPageHeader-VDMilTIN.js";
|
|
4
|
-
import { storeToRefs as q } from "pinia";
|
|
5
|
-
import { _ as ee } from "./SocialsButtons-CE7zWqqh.js";
|
|
6
|
-
import { _ as le, a as te } from "./SwapBalls-D14eVMm3.js";
|
|
7
|
-
import { _ as ne } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
|
-
const se = { class: "_flex-1 _overflow-y-scroll-masked _no-scrollbar _px-5 _w-full _flex _flex-col" }, oe = { class: "_-mt-3.5 _space-y-3.5" }, ie = {
|
|
9
|
-
key: 0,
|
|
10
|
-
class: "_mt-4 _px-3.5 _py-3 _flex _flex-col _gap-3 _rounded-lg _overflow-hidden _shadow-panel _bg-metallic-cone"
|
|
11
|
-
}, ae = { class: "_relative _flex _flex-col _gap-2.5" }, re = { class: "_flex _justify-between _items-center" }, _e = { class: "_flex _items-center _min-w-0 _flex-1" }, de = { class: "_text-right _min-w-0 _truncate _text-stroke-3xl" }, ce = { class: "_gap-[0.45rem] _mt-6 _grid _grid-cols-2 _text-stroke-2xl _text-xl _tracking-wide _mb-3" }, ue = {
|
|
12
|
-
key: 0,
|
|
13
|
-
class: "_space-y-4"
|
|
14
|
-
}, me = {
|
|
15
|
-
key: 0,
|
|
16
|
-
class: "_space-y-2"
|
|
17
|
-
}, pe = {
|
|
18
|
-
key: 1,
|
|
19
|
-
class: "_p-4 _bg-red-100 _text-red-700 _rounded-lg"
|
|
20
|
-
}, fe = {
|
|
21
|
-
key: 2,
|
|
22
|
-
class: "_space-y-3"
|
|
23
|
-
}, ge = { class: "_flex _w-full _gap-2.5" }, ve = { class: "_size-[1.7em]" }, xe = ["src"], be = { class: "_flex-1" }, ke = { class: "_flex _items-center _h-[1.7em] _gap-0.5 _relative _text-em-sm" }, ye = {
|
|
24
|
-
key: 0,
|
|
25
|
-
class: "_rounded-full _bg-metallic-cone _shadow-panel _px-[0.5em]"
|
|
26
|
-
}, he = {
|
|
27
|
-
key: 1,
|
|
28
|
-
class: "_rounded-full _bg-metallic-cone _shadow-panel _pr-[0.5em] _pl-[0.25em] _flex _gap-[0.1em]"
|
|
29
|
-
}, we = { key: 0 }, Le = { key: 1 }, $e = {
|
|
30
|
-
key: 0,
|
|
31
|
-
class: "_flex _items-start _gap-3 _pr-3"
|
|
32
|
-
}, Ce = ["innerHTML"], ze = {
|
|
33
|
-
key: 0,
|
|
34
|
-
class: "_absolute _top-0 _right-1 _flex _items-center _justify-center"
|
|
35
|
-
}, Be = {
|
|
36
|
-
key: 1,
|
|
37
|
-
class: "_space-y-3"
|
|
38
|
-
}, Te = { class: "_bg-metallic-linearff _p-2.5 _rounded-lg _shadow-panel-insetff _border-4 _border-dashed _border-black/20 _text-center _flex _flex-col _gap-4" }, Pe = { class: "_flex _items-center _gap-[0.75em] _justify-center _leading-none _mt-2 _-mb-1" }, je = { class: "_flex _items-center _gap-[0.5em]" }, Se = { class: "_flex-1 _text-center _text-lg _text-stroke-2xl" }, De = { class: "_mt-6 _bg-metallic-linear _p-4 _rounded-lg _shadow-panel _text-center _flex _flex-col _gap-3.5 _pb-5" }, He = { class: "_grid _grid-cols-2 _gap-2" }, Ae = {
|
|
39
|
-
__name: "Earn",
|
|
40
|
-
setup(Ee) {
|
|
41
|
-
const d = H("TrifleHub/store"), { openHub: x } = H("hub"), w = m([]), L = m(!0), b = m(null), $ = m(0), C = m("all"), _ = m("earn"), { backendUrl: F, isAuthenticated: k } = q(d), N = (i) => {
|
|
42
|
-
i == "spend" ? _.value = "spend" : x(i);
|
|
43
|
-
}, O = () => {
|
|
44
|
-
var i;
|
|
45
|
-
d.setProfileUsername((i = d.user) == null ? void 0 : i.username), x("profile");
|
|
46
|
-
}, U = Q(() => {
|
|
47
|
-
let i = [];
|
|
48
|
-
const e = w.value.filter((o) => !o.hiddenFromQuests);
|
|
49
|
-
return C.value === "all" ? i = e : C.value === "once" ? i = e.filter((o) => o.once) : C.value === "ongoing" ? i = e.filter((o) => !o.once) : i = e, i.slice().sort((o, a) => {
|
|
50
|
-
if (o.enabled && !a.enabled) return -1;
|
|
51
|
-
if (!o.enabled && a.enabled) return 1;
|
|
52
|
-
if (o.enabled && a.enabled) {
|
|
53
|
-
const c = o.completed && o.once, l = a.completed && a.once;
|
|
54
|
-
if (c && !l) return 1;
|
|
55
|
-
if (!c && l) return -1;
|
|
56
|
-
}
|
|
57
|
-
return 0;
|
|
58
|
-
});
|
|
59
|
-
}), S = async () => {
|
|
60
|
-
var i, e, o, a, c;
|
|
61
|
-
L.value = !0, b.value = null;
|
|
62
|
-
try {
|
|
63
|
-
if (k.value || (e = (i = d.isFarcaster) == null ? void 0 : i.user) != null && e.id) {
|
|
64
|
-
const l = await fetch(`${F.value}/balls/point-categories-with-counts`, {
|
|
65
|
-
method: "POST",
|
|
66
|
-
headers: {
|
|
67
|
-
"Content-Type": "application/json"
|
|
68
|
-
// Authorization: `Bearer ${auth.authToken}`
|
|
69
|
-
},
|
|
70
|
-
body: JSON.stringify({
|
|
71
|
-
userId: ((o = d.user) == null ? void 0 : o.id) || ((c = (a = d.isFarcaster) == null ? void 0 : a.user) == null ? void 0 : c.id)
|
|
72
|
-
})
|
|
73
|
-
});
|
|
74
|
-
if (!l.ok)
|
|
75
|
-
throw new Error(`HTTP error! status: ${l.status}`);
|
|
76
|
-
const z = await l.json();
|
|
77
|
-
$.value = z.balls.total, w.value = M.map((r) => {
|
|
78
|
-
const B = z.balls.data.filter((P) => P.name === r.id), D = B.length > 0;
|
|
79
|
-
let T = null;
|
|
80
|
-
if (!r.once && D)
|
|
81
|
-
if (r.id === "gm") {
|
|
82
|
-
const P = (/* @__PURE__ */ new Date()).toDateString(), V = B.filter(
|
|
83
|
-
(I) => new Date(I.createdAt).toDateString() === P
|
|
84
|
-
);
|
|
85
|
-
T = Math.min(V.length / 10 * 100, 100);
|
|
86
|
-
} else r.id === "burn-kudzu" && (T = Math.min(B.length % 10 * 10, 100));
|
|
87
|
-
return {
|
|
88
|
-
...r,
|
|
89
|
-
completed: D,
|
|
90
|
-
progress: T,
|
|
91
|
-
requiresLogin: !1,
|
|
92
|
-
enabled: r.enabled !== void 0 ? r.enabled : !0,
|
|
93
|
-
link: r.link || null
|
|
94
|
-
};
|
|
95
|
-
});
|
|
96
|
-
} else
|
|
97
|
-
$.value = 0, w.value = M.map((l) => ({
|
|
98
|
-
...l,
|
|
99
|
-
completed: !1,
|
|
100
|
-
progress: null,
|
|
101
|
-
requiresLogin: !0,
|
|
102
|
-
enabled: l.enabled !== void 0 ? l.enabled : !0,
|
|
103
|
-
link: l.link || null
|
|
104
|
-
}));
|
|
105
|
-
} catch (l) {
|
|
106
|
-
console.error("Error fetching quest data:", l), b.value = "Failed to load quest data. Please try again later.";
|
|
107
|
-
} finally {
|
|
108
|
-
L.value = !1;
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
return G(k, () => {
|
|
112
|
-
S();
|
|
113
|
-
}), Y(() => {
|
|
114
|
-
S();
|
|
115
|
-
}), (i, e) => {
|
|
116
|
-
var o, a, c;
|
|
117
|
-
return n(), s("div", se, [
|
|
118
|
-
t("header", oe, [
|
|
119
|
-
g(X, null, {
|
|
120
|
-
icon: y(() => e[5] || (e[5] = [
|
|
121
|
-
t("img", {
|
|
122
|
-
src: K,
|
|
123
|
-
alt: "📈🪩",
|
|
124
|
-
class: "_h-[1.75em]"
|
|
125
|
-
}, null, -1)
|
|
126
|
-
])),
|
|
127
|
-
default: y(() => [
|
|
128
|
-
e[6] || (e[6] = h(" BALL$ "))
|
|
129
|
-
]),
|
|
130
|
-
_: 1
|
|
131
|
-
}),
|
|
132
|
-
p(k) ? u("", !0) : (n(), s("section", ie, [
|
|
133
|
-
t("div", ae, [
|
|
134
|
-
e[9] || (e[9] = t("div", null, [
|
|
135
|
-
t("p", { class: "_text-mlg" }, "You might have 🪩BALL$ to claim!")
|
|
136
|
-
], -1)),
|
|
137
|
-
t("div", re, [
|
|
138
|
-
e[8] || (e[8] = t("p", { class: "_italic _text-[#888] _text-em-sm _animate-blink" }, "Login to claim →", -1)),
|
|
139
|
-
t("button", {
|
|
140
|
-
class: "_bubble-btn _px-6 _py-2",
|
|
141
|
-
style: { filter: "hue-rotate(-340deg) saturate(1.8)" },
|
|
142
|
-
onClick: e[0] || (e[0] = (l) => p(x)("account"))
|
|
143
|
-
}, e[7] || (e[7] = [
|
|
144
|
-
t("span", { style: { filter: "hue-rotate(340deg) saturate(0.5)" } }, "Login", -1)
|
|
145
|
-
]))
|
|
146
|
-
])
|
|
147
|
-
])
|
|
148
|
-
])),
|
|
149
|
-
p(k) ? (n(), s("section", {
|
|
150
|
-
key: 1,
|
|
151
|
-
class: "_px-3 _py-3 _bg-metallic-cone _rounded-lg _shadow-panel _flex _justify-between _items-center _flex-wrap _gap-2 _leading-none _text-3xl _cursor-pointer _whitespace-nowrap",
|
|
152
|
-
onClick: O
|
|
153
|
-
}, [
|
|
154
|
-
t("div", _e, [
|
|
155
|
-
(o = p(d).user) != null && o.avatar ? (n(), s("div", {
|
|
156
|
-
key: 0,
|
|
157
|
-
class: "_size-[1.125em] _block _rounded-full _shadow-panel-inset _bg-cover _bg-center",
|
|
158
|
-
style: j({ backgroundImage: `url(${(a = p(d).user) == null ? void 0 : a.avatar})` })
|
|
159
|
-
}, null, 4)) : u("", !0),
|
|
160
|
-
e[10] || (e[10] = t("div", { class: "_opacity-30 _text-mlg _text-stroke-lg _ml-[0.37em] _min-w-0 _truncate" }, " Your Balance ", -1))
|
|
161
|
-
]),
|
|
162
|
-
t("div", de, v(((c = $.value) == null ? void 0 : c.toLocaleString()) || "???"), 1),
|
|
163
|
-
e[11] || (e[11] = t("div", { class: "_flex-shrink-0" }, "🪩", -1))
|
|
164
|
-
])) : u("", !0)
|
|
165
|
-
]),
|
|
166
|
-
t("nav", ce, [
|
|
167
|
-
t("button", {
|
|
168
|
-
class: f(["_bubble-btn _px-4.5 _h-16", { "_animate-wiggle-sm": _.value === "earn" }]),
|
|
169
|
-
onClick: e[1] || (e[1] = (l) => _.value = "earn"),
|
|
170
|
-
style: j(_.value === "earn" ? "filter: hue-rotate(-70deg) saturate(2.1)" : "")
|
|
171
|
-
}, " earn ", 6),
|
|
172
|
-
t("button", {
|
|
173
|
-
class: f(["_bubble-btn _px-4.5 _h-16", { "_animate-wiggle-sm": _.value === "spend" }]),
|
|
174
|
-
onClick: e[2] || (e[2] = (l) => _.value = "spend"),
|
|
175
|
-
style: j(_.value === "spend" ? "filter: hue-rotate(-345deg) saturate(2.5)" : "")
|
|
176
|
-
}, " redeem ", 6)
|
|
177
|
-
]),
|
|
178
|
-
g(J, { name: "thub-page-group" }, {
|
|
179
|
-
default: y(() => [
|
|
180
|
-
_.value === "earn" ? (n(), s("div", ue, [
|
|
181
|
-
L.value ? (n(), s("div", me, [
|
|
182
|
-
(n(), s(A, null, E(3, (l) => t("div", {
|
|
183
|
-
key: `loader-${l}`,
|
|
184
|
-
class: "_flex _items-center _gap-3 _p-3 _bg-zinc-200 _rounded-lg animate-pulse"
|
|
185
|
-
}, e[12] || (e[12] = [
|
|
186
|
-
t("div", { class: "_size-8 _rounded-full _bg-zinc-400" }, null, -1),
|
|
187
|
-
t("div", { class: "_flex-1 _space-y-2" }, [
|
|
188
|
-
t("div", { class: "_h-4 _bg-zinc-400 _rounded w-3/4" }),
|
|
189
|
-
t("div", { class: "_h-3 _bg-zinc-400 _rounded w-1/2" })
|
|
190
|
-
], -1),
|
|
191
|
-
t("div", { class: "_h-6 _w-12 _bg-zinc-400 _rounded" }, null, -1)
|
|
192
|
-
]))), 64))
|
|
193
|
-
])) : b.value ? (n(), s("div", pe, v(b.value), 1)) : (n(), s("div", fe, [
|
|
194
|
-
(n(!0), s(A, null, E(U.value, (l) => (n(), R(Z(l.link ? typeof l.link == "string" ? "a" : "button" : "div"), {
|
|
195
|
-
key: l.id,
|
|
196
|
-
fid: l.fid,
|
|
197
|
-
href: typeof l.link == "string" ? l.link : void 0,
|
|
198
|
-
target: typeof l.link == "string" ? "_blank" : void 0,
|
|
199
|
-
rel: typeof l.link == "string" ? "noopener noreferrer" : void 0,
|
|
200
|
-
onClick: (z) => {
|
|
201
|
-
var r;
|
|
202
|
-
return ((r = l.link) == null ? void 0 : r.to) && N(l.link.to);
|
|
203
|
-
},
|
|
204
|
-
class: f(["_w-full _block _relative", { "_pointer-events-none": l.completed && l.once }])
|
|
205
|
-
}, {
|
|
206
|
-
default: y(() => [
|
|
207
|
-
t("div", {
|
|
208
|
-
class: f(["_bg-metallic-linear _w-full _flex _flex-col _gap-0.5 _p-2.5 _min-h-14 _rounded-lg _transition-colors _text-mlg _relative _justify-center", [
|
|
209
|
-
{
|
|
210
|
-
"mouse:hover:_scale-[1.006] _duration-100": l.link,
|
|
211
|
-
"_opacity-40": l.completed && l.once,
|
|
212
|
-
"_shadow-panel": !(l.completed && l.conce)
|
|
213
|
-
}
|
|
214
|
-
]])
|
|
215
|
-
}, [
|
|
216
|
-
t("header", ge, [
|
|
217
|
-
t("div", ve, [
|
|
218
|
-
t("img", {
|
|
219
|
-
src: l.icon,
|
|
220
|
-
class: "_w-full _h-full _rounded-lg _block"
|
|
221
|
-
}, null, 8, xe)
|
|
222
|
-
]),
|
|
223
|
-
t("div", be, [
|
|
224
|
-
t("div", {
|
|
225
|
-
class: f(["_min-h-[1.7em] _flex _items-center _justify-start _text-left _py-[0.06em] _text-stroke-xl _leading-snug", { "_line-through": l.completed && l.once }])
|
|
226
|
-
}, v(l.name), 3)
|
|
227
|
-
]),
|
|
228
|
-
t("div", ke, [
|
|
229
|
-
l.enabled ? (n(), s("div", he, [
|
|
230
|
-
e[13] || (e[13] = t("div", null, "🪩", -1)),
|
|
231
|
-
typeof l.pachinkoBalls == "string" ? (n(), s("span", we, v(l.pachinkoBalls), 1)) : (n(), s("span", Le, v(l.pachinkoBalls), 1))
|
|
232
|
-
])) : (n(), s("div", ye, " soon ")),
|
|
233
|
-
(n(), s("svg", {
|
|
234
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
235
|
-
viewBox: "0 0 20 20",
|
|
236
|
-
fill: "black",
|
|
237
|
-
class: f(["_size-6 sm:_size-7 _opacity-50 sm:_ml-0.5", { "_invisible _ml-4.5": l.completed && l.once }])
|
|
238
|
-
}, e[14] || (e[14] = [
|
|
239
|
-
t("path", {
|
|
240
|
-
"fill-rule": "evenodd",
|
|
241
|
-
d: "M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z",
|
|
242
|
-
"clip-rule": "evenodd"
|
|
243
|
-
}, null, -1)
|
|
244
|
-
]), 2))
|
|
245
|
-
])
|
|
246
|
-
]),
|
|
247
|
-
l.description ? (n(), s("div", $e, [
|
|
248
|
-
e[15] || (e[15] = t("div", { class: "_w-[1.7em] _flex-shrink-0" }, null, -1)),
|
|
249
|
-
t("p", {
|
|
250
|
-
class: "_flex-1 _text-md _text-gray-500 _text-stroke-lg _text-left",
|
|
251
|
-
innerHTML: l.description
|
|
252
|
-
}, null, 8, Ce)
|
|
253
|
-
])) : u("", !0)
|
|
254
|
-
], 2),
|
|
255
|
-
l.completed && l.once ? (n(), s("div", ze, e[16] || (e[16] = [
|
|
256
|
-
t("img", {
|
|
257
|
-
src: W,
|
|
258
|
-
class: "_size-[2.5em]"
|
|
259
|
-
}, null, -1)
|
|
260
|
-
]))) : u("", !0)
|
|
261
|
-
]),
|
|
262
|
-
_: 2
|
|
263
|
-
}, 1032, ["fid", "href", "target", "rel", "onClick", "class"]))), 128))
|
|
264
|
-
]))
|
|
265
|
-
])) : u("", !0),
|
|
266
|
-
_.value === "spend" ? (n(), s("div", Be, [
|
|
267
|
-
t("section", Te, [
|
|
268
|
-
t("header", Pe, [
|
|
269
|
-
e[17] || (e[17] = t("div", { class: "_text-[2.5em] _animate-wiggle-sm" }, "🪩", -1)),
|
|
270
|
-
e[18] || (e[18] = t("div", { class: "_text-[1.75em]" }, "➡️", -1)),
|
|
271
|
-
g(le, { class: "_h-[2.5em]" })
|
|
272
|
-
]),
|
|
273
|
-
t("div", je, [
|
|
274
|
-
t("p", Se, [
|
|
275
|
-
e[19] || (e[19] = h(" Swap BALL$ for ")),
|
|
276
|
-
e[20] || (e[20] = t("span", { class: "_inline-block" }, "lotto-balls", -1)),
|
|
277
|
-
e[21] || (e[21] = t("br", null, null, -1)),
|
|
278
|
-
e[22] || (e[22] = h(" in the ")),
|
|
279
|
-
t("button", {
|
|
280
|
-
class: "_underline",
|
|
281
|
-
onClick: e[3] || (e[3] = (l) => p(x)("games"))
|
|
282
|
-
}, "weekly USDC lottery"),
|
|
283
|
-
e[23] || (e[23] = h("! "))
|
|
284
|
-
])
|
|
285
|
-
]),
|
|
286
|
-
g(te, {
|
|
287
|
-
onGetBallsClick: e[4] || (e[4] = (l) => _.value = "earn")
|
|
288
|
-
})
|
|
289
|
-
])
|
|
290
|
-
])) : u("", !0)
|
|
291
|
-
]),
|
|
292
|
-
_: 1
|
|
293
|
-
}),
|
|
294
|
-
t("section", De, [
|
|
295
|
-
e[24] || (e[24] = t("div", { class: "_opacity-30 _animate-wiggle-sm" }, "follow for more BALL$", -1)),
|
|
296
|
-
t("div", He, [
|
|
297
|
-
g(ee)
|
|
298
|
-
])
|
|
299
|
-
])
|
|
300
|
-
]);
|
|
301
|
-
};
|
|
302
|
-
}
|
|
303
|
-
}, Qe = /* @__PURE__ */ ne(Ae, [["__scopeId", "data-v-c637c01c"]]);
|
|
304
|
-
export {
|
|
305
|
-
Qe as default
|
|
306
|
-
};
|
package/dist/Profile-BXTdPhEU.js
DELETED
|
@@ -1,246 +0,0 @@
|
|
|
1
|
-
import { computed as N, createBlock as T, openBlock as a, resolveDynamicComponent as q, mergeProps as J, withCtx as C, createElementVNode as e, createElementBlock as n, createCommentVNode as M, Fragment as g, createTextVNode as w, toDisplayString as c, defineAsyncComponent as W, inject as F, ref as d, onMounted as A, renderList as Y, createVNode as G, normalizeClass as R, unref as z } from "vue";
|
|
2
|
-
import { storeToRefs as K } from "pinia";
|
|
3
|
-
import { A as Q } from "./AccountLayout-DtKvcqQk.js";
|
|
4
|
-
import { o as X, q as Z } from "./index-BestOUlf.js";
|
|
5
|
-
const ee = { class: "_flex _w-full _gap-2.5 _items-stretch" }, te = { class: "_size-9 _flex-shrink-0" }, ae = ["src"], ne = { class: "_flex-1 _flex _flex-col _gap-[0.25em] _justify-center _min-h-8 _text-left _leading-normal _min-w-0" }, oe = { class: "_min-w-0 _leading-[1.1]" }, se = {
|
|
6
|
-
key: 0,
|
|
7
|
-
class: "_weight-semiboldff"
|
|
8
|
-
}, le = {
|
|
9
|
-
key: 0,
|
|
10
|
-
class: "_text-em-2xs _opacity-25 _leading-none _flex _gap-[0.35em]"
|
|
11
|
-
}, ie = { class: "_flex _items-center _h-9 _text-em-sm _flex-shrink-0 sm:_text-mlg" }, re = { class: "_rounded-full _bg-metallic-linear _shadow-panel _pr-[0.5em] _pl-[0.25em] _flex _gap-[0.15em]" }, ce = {
|
|
12
|
-
__name: "PointCard",
|
|
13
|
-
props: { point: Object },
|
|
14
|
-
setup(i) {
|
|
15
|
-
const P = i, m = N(
|
|
16
|
-
() => X.find((t) => t.name === P.point.name || t.id === P.point.name)
|
|
17
|
-
), U = (t) => {
|
|
18
|
-
if (!t) return "";
|
|
19
|
-
const o = /* @__PURE__ */ new Date(), v = new Date(t), _ = o - v, p = Math.floor(_ / (1e3 * 60)), f = Math.floor(_ / (1e3 * 60 * 60)), h = Math.floor(_ / (1e3 * 60 * 60 * 24)), b = Math.floor(h / 7), $ = Math.floor(h / 30), S = Math.floor(h / 365);
|
|
20
|
-
return p < 60 ? `${p}m` : f < 24 ? `${f}h` : h < 7 ? `${h}d` : b < 4 ? `${b}wk` : $ < 12 ? `${$}mo` : `${S}y`;
|
|
21
|
-
}, x = (t) => (t = Number(t), t % 1 === 0 ? t : t.toFixed(2)), k = (t) => {
|
|
22
|
-
if (!t) return "";
|
|
23
|
-
const o = new Date(t), v = o.toLocaleString("en-US", { month: "short" }).toUpperCase(), _ = o.toLocaleString("en-US", { day: "2-digit" });
|
|
24
|
-
return `${v} ${_}`;
|
|
25
|
-
}, l = N(() => {
|
|
26
|
-
var o;
|
|
27
|
-
let t;
|
|
28
|
-
try {
|
|
29
|
-
t = new URL((o = m.value) == null ? void 0 : o.link), ["farcaster", "discord"].includes(t.host.split(".")[0]) && (t = { host: "trifle", origin: t.href });
|
|
30
|
-
} catch {
|
|
31
|
-
}
|
|
32
|
-
return t;
|
|
33
|
-
});
|
|
34
|
-
return (t, o) => (a(), T(q(l.value ? "a" : "div"), J(l.value ? { href: l.value.origin, target: "_blank" } : {}, {
|
|
35
|
-
class: ["_bg-metallic-linear _shadow-panel _w-full _p-2 _px-2.5 _pr-3 _rounded-lg _block _flex _items-center _min-h-14", { "mouse:hover:_scale-[1.01] _origin-center _duration-150 _group": l.value }]
|
|
36
|
-
}), {
|
|
37
|
-
default: C(() => {
|
|
38
|
-
var v, _;
|
|
39
|
-
return [
|
|
40
|
-
e("header", ee, [
|
|
41
|
-
e("div", te, [
|
|
42
|
-
m.value && m.value.icon ? (a(), n("img", {
|
|
43
|
-
key: 0,
|
|
44
|
-
src: m.value.icon,
|
|
45
|
-
class: "_w-full _h-full _rounded-lg _block"
|
|
46
|
-
}, null, 8, ae)) : M("", !0)
|
|
47
|
-
]),
|
|
48
|
-
e("div", ne, [
|
|
49
|
-
e("div", oe, [
|
|
50
|
-
i.point.name === "anybody-daily" ? (a(), n(g, { key: 0 }, [
|
|
51
|
-
w("Solved " + c(k(i.point.createdAt)), 1)
|
|
52
|
-
], 64)) : i.point.name === "gm" ? (a(), n(g, { key: 1 }, [
|
|
53
|
-
w('"' + c(i.point.extra) + '"', 1)
|
|
54
|
-
], 64)) : i.point.name === "gm-react" ? (a(), n(g, { key: 2 }, [
|
|
55
|
-
w(c(!i.point.giver || i.point.giver === "???" ? "someone" : i.point.giver) + " ♥︎ ", 1),
|
|
56
|
-
i.point.gmMessage ? (a(), n("span", se, '"' + c(i.point.gmMessage) + '"', 1)) : (a(), n(g, { key: 1 }, [
|
|
57
|
-
w("your gm")
|
|
58
|
-
], 64))
|
|
59
|
-
], 64)) : (a(), n(g, { key: 3 }, [
|
|
60
|
-
w(c(((v = m.value) == null ? void 0 : v.activityText) || ((_ = m.value) == null ? void 0 : _.name) || i.point.name), 1)
|
|
61
|
-
], 64))
|
|
62
|
-
]),
|
|
63
|
-
l.value ? (a(), n("div", le, [
|
|
64
|
-
e("span", null, c(U(i.point.createdAt)) + " ago", 1),
|
|
65
|
-
o[0] || (o[0] = e("span", null, "·", -1)),
|
|
66
|
-
e("u", null, c(l.value.host), 1)
|
|
67
|
-
])) : M("", !0)
|
|
68
|
-
]),
|
|
69
|
-
e("div", ie, [
|
|
70
|
-
e("div", re, [
|
|
71
|
-
o[1] || (o[1] = e("div", null, "🪩", -1)),
|
|
72
|
-
e("span", null, c(x(i.point.value)), 1)
|
|
73
|
-
])
|
|
74
|
-
])
|
|
75
|
-
])
|
|
76
|
-
];
|
|
77
|
-
}),
|
|
78
|
-
_: 1
|
|
79
|
-
}, 16, ["class"]));
|
|
80
|
-
}
|
|
81
|
-
}, ue = { class: "_h-12 _flex _items-center _gap-1 _w-full _justify-center _border _border-transparent" }, _e = { class: "_text-stroke-2xl _min-w-0 _px-0.5" }, de = { class: "_flex _justify-center _gap-1 _h-10 _items-center" }, fe = { class: "_text-stroke-xl" }, me = { class: "_w-full _max-w-2xl _mt-6ff" }, ve = {
|
|
82
|
-
key: 0,
|
|
83
|
-
class: "_text-center _py-10"
|
|
84
|
-
}, he = {
|
|
85
|
-
key: 1,
|
|
86
|
-
class: "_p-4 _bg-red-100 _text-red-700 _rounded-lg _mt-4"
|
|
87
|
-
}, ge = {
|
|
88
|
-
key: 2,
|
|
89
|
-
class: "_flex _flex-col _gap-4"
|
|
90
|
-
}, pe = {
|
|
91
|
-
key: 0,
|
|
92
|
-
class: "_text-center _py-6"
|
|
93
|
-
}, ye = {
|
|
94
|
-
key: 1,
|
|
95
|
-
class: "_p-2 _bg-red-100 _text-red-700 _rounded-lg"
|
|
96
|
-
}, xe = { class: "_space-y-2" }, be = { class: "_grid _grid-cols-2 _gap-1" }, we = ["disabled"], ke = ["disabled"], $e = { class: "_text-center _text-xs _opacity-50 _-mt-2" }, Ce = { key: 0 }, D = 10, je = {
|
|
97
|
-
__name: "Profile",
|
|
98
|
-
setup(i) {
|
|
99
|
-
const P = W(() => import("./TrifleBall-BzjRmmn0.js")), m = F("hub"), U = F("TrifleHub/store"), { currentProfileUsername: x, backendUrl: k } = K(U), l = d(null), t = d(!0), o = d(null), v = d([]), _ = d(!1), p = d(null), f = d(1), h = d(!1), b = d(0), $ = d([]), S = d(null), B = () => {
|
|
100
|
-
U.setProfileUsername(null), m.openHub("earn");
|
|
101
|
-
}, E = N(() => Math.max(1, Math.ceil(b.value / D))), H = async () => {
|
|
102
|
-
t.value = !0, o.value = null;
|
|
103
|
-
try {
|
|
104
|
-
const u = await fetch(
|
|
105
|
-
`${k.value}/auth/by-username?username=${encodeURIComponent(
|
|
106
|
-
x.value
|
|
107
|
-
)}`
|
|
108
|
-
);
|
|
109
|
-
if (!u.ok) throw new Error("Failed to fetch user");
|
|
110
|
-
const r = await u.json();
|
|
111
|
-
console.log({ data: r }), l.value = r.user, console.log({ user: l });
|
|
112
|
-
} catch (u) {
|
|
113
|
-
o.value = u.message;
|
|
114
|
-
} finally {
|
|
115
|
-
t.value = !1;
|
|
116
|
-
}
|
|
117
|
-
}, I = async () => {
|
|
118
|
-
var u;
|
|
119
|
-
try {
|
|
120
|
-
const r = await fetch(`${k.value}/balls/point-categories-with-counts`, {
|
|
121
|
-
method: "POST",
|
|
122
|
-
headers: { "Content-Type": "application/json" },
|
|
123
|
-
body: JSON.stringify({ userId: l.value.id })
|
|
124
|
-
});
|
|
125
|
-
if (!r.ok) throw new Error("Failed to fetch categories");
|
|
126
|
-
const s = await r.json();
|
|
127
|
-
$.value = (((u = s.balls) == null ? void 0 : u.data) || []).map((y) => y.name);
|
|
128
|
-
} catch {
|
|
129
|
-
$.value = [];
|
|
130
|
-
}
|
|
131
|
-
}, j = async () => {
|
|
132
|
-
_.value = !0, p.value = null;
|
|
133
|
-
try {
|
|
134
|
-
let u = `${k.value}/balls/list?page=${f.value}&limit=${D}&username=${encodeURIComponent(x.value)}`;
|
|
135
|
-
S.value && (u += `&ballName=${encodeURIComponent(S.value)}`);
|
|
136
|
-
const r = await fetch(u);
|
|
137
|
-
if (!r.ok) throw new Error("Failed to fetch points");
|
|
138
|
-
const s = await r.json();
|
|
139
|
-
v.value = s.data, h.value = s.data.length === D, b.value = s.total || 0;
|
|
140
|
-
} catch (u) {
|
|
141
|
-
p.value = u.message;
|
|
142
|
-
} finally {
|
|
143
|
-
_.value = !1;
|
|
144
|
-
}
|
|
145
|
-
}, V = () => {
|
|
146
|
-
f.value > 1 && (f.value--, j());
|
|
147
|
-
}, O = () => {
|
|
148
|
-
h.value && (f.value++, j());
|
|
149
|
-
};
|
|
150
|
-
A(async () => {
|
|
151
|
-
if (console.log("onMounted", x.value), !x.value) {
|
|
152
|
-
m.openHub("account");
|
|
153
|
-
return;
|
|
154
|
-
}
|
|
155
|
-
await H(), await I(), await j();
|
|
156
|
-
});
|
|
157
|
-
const L = d(!1);
|
|
158
|
-
return A(() => {
|
|
159
|
-
setTimeout(() => {
|
|
160
|
-
L.value = !0;
|
|
161
|
-
}, 350);
|
|
162
|
-
}), (u, r) => (a(), T(Q, null, {
|
|
163
|
-
avatar: C(() => {
|
|
164
|
-
var s, y;
|
|
165
|
-
return [
|
|
166
|
-
e("div", {
|
|
167
|
-
class: R(["_size-full _flex _items-center _justify-center _rounded-full _duration-150 _delay-50", { "_opacity-0": !L.value }]),
|
|
168
|
-
style: { "box-shadow": "0 16px 24px 2px rgba(0, 0, 0, 0.4)" }
|
|
169
|
-
}, [
|
|
170
|
-
L.value ? (a(), T(z(P), {
|
|
171
|
-
key: l.value && ((s = l.value) == null ? void 0 : s.avatar) || "smiley-face",
|
|
172
|
-
mode: "glass-inner-wall",
|
|
173
|
-
"image-source": l.value && ((y = l.value) == null ? void 0 : y.avatar) || z(Z),
|
|
174
|
-
style: { width: "175%", height: "175%" },
|
|
175
|
-
class: "_cursor-grab"
|
|
176
|
-
}, null, 8, ["image-source"])) : M("", !0)
|
|
177
|
-
], 2)
|
|
178
|
-
];
|
|
179
|
-
}),
|
|
180
|
-
title: C(() => {
|
|
181
|
-
var s;
|
|
182
|
-
return [
|
|
183
|
-
e("div", ue, [
|
|
184
|
-
e("span", _e, c(((s = l.value) == null ? void 0 : s.username) || "User Profile"), 1)
|
|
185
|
-
])
|
|
186
|
-
];
|
|
187
|
-
}),
|
|
188
|
-
description: C(() => {
|
|
189
|
-
var s, y;
|
|
190
|
-
return [
|
|
191
|
-
e("div", de, [
|
|
192
|
-
e("span", {
|
|
193
|
-
onClick: B,
|
|
194
|
-
class: "_text-xl _shadow-panel _pl-[0.3em] _pr-[0.5em] _rounded-full _bg-metallic-cone _leading-none _py-[0.25em] _flex _gap-[0.2em] _cursor-pointer"
|
|
195
|
-
}, [
|
|
196
|
-
r[0] || (r[0] = e("span", null, "🪩", -1)),
|
|
197
|
-
e("span", fe, c(((y = (s = l.value) == null ? void 0 : s.totalPoints) == null ? void 0 : y.toLocaleString()) || 0), 1)
|
|
198
|
-
])
|
|
199
|
-
])
|
|
200
|
-
];
|
|
201
|
-
}),
|
|
202
|
-
default: C(() => [
|
|
203
|
-
e("section", me, [
|
|
204
|
-
r[1] || (r[1] = e("h3", { class: "_weight-boldff _text-xs _opacity-30 _text-left _ml-2 _-mt-6 _mb-1" }, "activity", -1)),
|
|
205
|
-
t.value ? (a(), n("div", ve, "Loading profile...")) : o.value ? (a(), n("div", he, c(o.value), 1)) : (a(), n("section", ge, [
|
|
206
|
-
_.value ? (a(), n("div", pe, "Loading points...")) : p.value ? (a(), n("div", ye, c(p.value), 1)) : (a(), n(g, { key: 2 }, [
|
|
207
|
-
e("ul", xe, [
|
|
208
|
-
(a(!0), n(g, null, Y(v.value, (s) => (a(), n("li", {
|
|
209
|
-
key: s.id
|
|
210
|
-
}, [
|
|
211
|
-
G(ce, { point: s }, null, 8, ["point"])
|
|
212
|
-
]))), 128))
|
|
213
|
-
]),
|
|
214
|
-
E.value > 1 ? (a(), n(g, { key: 0 }, [
|
|
215
|
-
e("nav", be, [
|
|
216
|
-
e("button", {
|
|
217
|
-
class: "_flex-1 _bubble-btn _p-4.5",
|
|
218
|
-
onClick: V,
|
|
219
|
-
disabled: f.value === 1
|
|
220
|
-
}, [
|
|
221
|
-
e("span", {
|
|
222
|
-
class: R({ "_opacity-30": f.value === 1 })
|
|
223
|
-
}, "Prev", 2)
|
|
224
|
-
], 8, we),
|
|
225
|
-
e("button", {
|
|
226
|
-
class: "_flex-1 _bubble-btn _p-4.5",
|
|
227
|
-
onClick: O,
|
|
228
|
-
disabled: !h.value
|
|
229
|
-
}, " Next ", 8, ke)
|
|
230
|
-
]),
|
|
231
|
-
e("div", $e, [
|
|
232
|
-
w(" Page " + c(f.value), 1),
|
|
233
|
-
b.value ? (a(), n("span", Ce, " of " + c(E.value), 1)) : M("", !0)
|
|
234
|
-
])
|
|
235
|
-
], 64)) : M("", !0)
|
|
236
|
-
], 64))
|
|
237
|
-
]))
|
|
238
|
-
])
|
|
239
|
-
]),
|
|
240
|
-
_: 1
|
|
241
|
-
}));
|
|
242
|
-
}
|
|
243
|
-
};
|
|
244
|
-
export {
|
|
245
|
-
je as default
|
|
246
|
-
};
|
|
File without changes
|