@articles-media/articles-dev-box 1.3.7 → 1.3.9
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/FriendsList.js +2 -0
- package/dist/GlobalBody.js +4 -62
- package/dist/GlobalClientModals.js +65 -5
- package/dist/PageTemplateLandingPage.js +1 -1
- package/dist/{SettingsModal-BTGNqh2d.js → SettingsModal-Bs-HN9bH.js} +1 -1
- package/dist/SettingsModal.js +1 -1
- package/dist/{StatusModal-DkHAimHp.js → StatusModal-DrPXOA_k.js} +59 -28
- package/dist/index.js +1 -1
- package/dist/typicalZustandStoreStateSlice.js +4 -0
- package/package.json +1 -1
- /package/dist/{useAuthSiteStatus-D-D-KwEN.js → useAuthSiteStatus-DDN0q8T0.js} +0 -0
package/dist/FriendsList.js
CHANGED
|
@@ -41,6 +41,7 @@ function FriendsList({ show, setShow, componentType, className, style = {}, id =
|
|
|
41
41
|
variant: "articles",
|
|
42
42
|
onClick: () => {
|
|
43
43
|
console.log("View friend details for ", friend);
|
|
44
|
+
window.open(`https://articles.media/settings/friends?friend_relationship_id=${friend?._id}`, "_blank");
|
|
44
45
|
},
|
|
45
46
|
children: /* @__PURE__ */ jsx("i", { className: "fad fa-info me-0" })
|
|
46
47
|
}),
|
|
@@ -48,6 +49,7 @@ function FriendsList({ show, setShow, componentType, className, style = {}, id =
|
|
|
48
49
|
variant: "articles",
|
|
49
50
|
onClick: () => {
|
|
50
51
|
console.log("Start Message");
|
|
52
|
+
window.open(`https://articles.media/messages?startMsg=${friend?.friend_id}`, "_blank");
|
|
51
53
|
},
|
|
52
54
|
children: /* @__PURE__ */ jsx("i", { className: "fad fa-envelope me-0" })
|
|
53
55
|
})
|
package/dist/GlobalBody.js
CHANGED
|
@@ -1,70 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { Suspense, lazy, memo, useState } from "react";
|
|
5
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { memo } from "react";
|
|
3
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
6
4
|
//#region src/components/Global/GlobalBody.jsx
|
|
7
|
-
var import_classnames = /* @__PURE__ */ __toESM(require_classnames(), 1);
|
|
8
|
-
var StatusModal = lazy(() => import("./StatusModal-DkHAimHp.js"));
|
|
9
5
|
function GlobalBody({ fontawesome = true }) {
|
|
10
|
-
|
|
11
|
-
const { data: mainSiteStatus, error: mainSiteStatusError, isLoading: mainSiteStatusLoading, mutate: mainSiteStatusMutate } = useMainSiteStatus({ disable: process.env.NODE_ENV !== "development" || process.env.NEXT_PUBLIC_ENABLE_ARTICLES === "false" });
|
|
12
|
-
const { data: authSiteStatus, error: authSiteStatusError, isLoading: authSiteStatusLoading, mutate: authSiteStatusMutate } = useAuthSiteStatus({ disable: process.env.NODE_ENV !== "development" || process.env.NEXT_PUBLIC_ENABLE_ARTICLES === "false" });
|
|
13
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [fontawesome && /* @__PURE__ */ jsx("link", {
|
|
6
|
+
return /* @__PURE__ */ jsx(Fragment, { children: fontawesome && /* @__PURE__ */ jsx("link", {
|
|
14
7
|
rel: "stylesheet",
|
|
15
8
|
href: `https://cdn.articles.media/fonts/fontawesome/css/all.min.css`
|
|
16
|
-
})
|
|
17
|
-
/* @__PURE__ */ jsx("style", { children: `
|
|
18
|
-
@keyframes grow-shrink {
|
|
19
|
-
0% { transform: translateY(-50px); }
|
|
20
|
-
50% { transform: translateY(0px); }
|
|
21
|
-
100% { transform: translateY(-50px); }
|
|
22
|
-
}
|
|
23
|
-
.articles-global-body {
|
|
24
|
-
transform: translateY(-40px);
|
|
25
|
-
z-index: 1055!important;
|
|
26
|
-
position: absolute;
|
|
27
|
-
top: 0;
|
|
28
|
-
left: 0;
|
|
29
|
-
display: flex;
|
|
30
|
-
justify-content: center;
|
|
31
|
-
align-items: center;
|
|
32
|
-
width: 50px;
|
|
33
|
-
height: 50px;
|
|
34
|
-
margin: 0;
|
|
35
|
-
padding: 0;
|
|
36
|
-
background-color: yellow;
|
|
37
|
-
color: #FFFFFF;
|
|
38
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
|
39
|
-
animation: grow-shrink 2s ease-in;
|
|
40
|
-
border: 4px solid red;
|
|
41
|
-
cursor: pointer;
|
|
42
|
-
}
|
|
43
|
-
.articles-global-body.main-connected {
|
|
44
|
-
background-color: green;
|
|
45
|
-
}
|
|
46
|
-
.articles-global-body.auth-connected {
|
|
47
|
-
border-color: blue;
|
|
48
|
-
}
|
|
49
|
-
` }),
|
|
50
|
-
/* @__PURE__ */ jsx("div", {
|
|
51
|
-
onClick: () => {
|
|
52
|
-
setStatusModal(true);
|
|
53
|
-
},
|
|
54
|
-
className: (0, import_classnames.default)(`articles-global-body`, {
|
|
55
|
-
"main-connected": mainSiteStatus,
|
|
56
|
-
"auth-connected": authSiteStatus
|
|
57
|
-
}),
|
|
58
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
59
|
-
className: "content",
|
|
60
|
-
children: /* @__PURE__ */ jsx("i", { className: "fas fa-thumbs-up" })
|
|
61
|
-
})
|
|
62
|
-
}),
|
|
63
|
-
statusModal && /* @__PURE__ */ jsx(Suspense, { children: /* @__PURE__ */ jsx(StatusModal, {
|
|
64
|
-
show: statusModal,
|
|
65
|
-
setShow: setStatusModal
|
|
66
|
-
}) })
|
|
67
|
-
] })] });
|
|
9
|
+
}) });
|
|
68
10
|
}
|
|
69
11
|
var GlobalBody_default = memo(GlobalBody);
|
|
70
12
|
//#endregion
|
|
@@ -1,14 +1,69 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import { n as __toESM, t as require_classnames } from "./classnames-No-mjhw1.js";
|
|
3
|
+
import { n as useMainSiteStatus, t as useAuthSiteStatus } from "./useAuthSiteStatus-DDN0q8T0.js";
|
|
4
4
|
import { lazy } from "react";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/Global/ArticlesDevStatusBadge.jsx
|
|
7
|
+
var import_classnames = /* @__PURE__ */ __toESM(require_classnames(), 1);
|
|
8
|
+
function ArticlesDevStatusBadge({ useStore }) {
|
|
9
|
+
const { data: mainSiteStatus, error: mainSiteStatusError, isLoading: mainSiteStatusLoading, mutate: mainSiteStatusMutate } = useMainSiteStatus({ disable: process.env.NODE_ENV !== "development" || process.env.NEXT_PUBLIC_ENABLE_ARTICLES === "false" });
|
|
10
|
+
const { data: authSiteStatus, error: authSiteStatusError, isLoading: authSiteStatusLoading, mutate: authSiteStatusMutate } = useAuthSiteStatus({ disable: process.env.NODE_ENV !== "development" || process.env.NEXT_PUBLIC_ENABLE_ARTICLES === "false" });
|
|
11
|
+
useStore((state) => state.showDevStatusModal);
|
|
12
|
+
const setShowDevStatusModal = useStore((state) => state.setShowDevStatusModal);
|
|
13
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("style", { children: `
|
|
14
|
+
@keyframes grow-shrink {
|
|
15
|
+
0% { transform: translateY(-50px); }
|
|
16
|
+
50% { transform: translateY(0px); }
|
|
17
|
+
100% { transform: translateY(-50px); }
|
|
18
|
+
}
|
|
19
|
+
.articles-dev-status {
|
|
20
|
+
transform: translateY(-40px);
|
|
21
|
+
z-index: 1055!important;
|
|
22
|
+
position: absolute;
|
|
23
|
+
top: 0;
|
|
24
|
+
left: 0;
|
|
25
|
+
display: flex;
|
|
26
|
+
justify-content: center;
|
|
27
|
+
align-items: center;
|
|
28
|
+
width: 50px;
|
|
29
|
+
height: 50px;
|
|
30
|
+
margin: 0;
|
|
31
|
+
padding: 0;
|
|
32
|
+
background-color: yellow;
|
|
33
|
+
color: #FFFFFF;
|
|
34
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
|
35
|
+
animation: grow-shrink 2s ease-in;
|
|
36
|
+
border: 4px solid red;
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
}
|
|
39
|
+
.articles-dev-status.main-connected {
|
|
40
|
+
background-color: green;
|
|
41
|
+
}
|
|
42
|
+
.articles-dev-status.auth-connected {
|
|
43
|
+
border-color: blue;
|
|
44
|
+
}
|
|
45
|
+
` }), /* @__PURE__ */ jsx("div", {
|
|
46
|
+
onClick: () => {
|
|
47
|
+
setShowDevStatusModal(true);
|
|
48
|
+
},
|
|
49
|
+
className: (0, import_classnames.default)(`articles-dev-status`, {
|
|
50
|
+
"main-connected": mainSiteStatus,
|
|
51
|
+
"auth-connected": authSiteStatus
|
|
52
|
+
}),
|
|
53
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
54
|
+
className: "content",
|
|
55
|
+
children: /* @__PURE__ */ jsx("i", { className: "fas fa-thumbs-up" })
|
|
56
|
+
})
|
|
57
|
+
})] });
|
|
58
|
+
}
|
|
59
|
+
//#endregion
|
|
6
60
|
//#region src/components/Global/GlobalClientModals.jsx
|
|
7
61
|
var InfoModal = lazy(() => import("./InfoModal.js"));
|
|
8
62
|
var CreditsModal = lazy(() => import("./CreditsModal.js"));
|
|
9
63
|
var FriendsList = lazy(() => import("./FriendsList.js"));
|
|
10
64
|
var SettingsModal = lazy(() => import("./SettingsModal.js"));
|
|
11
65
|
var InviteModal = lazy(() => import("./InviteModal.js"));
|
|
66
|
+
var StatusModal = lazy(() => import("./StatusModal-DrPXOA_k.js"));
|
|
12
67
|
function GlobalClientModals({ useStore, useAudioStore, useTouchControlsStore, useSocketStore, packageInfo, settingsModalConfig, infoModalConfig }) {
|
|
13
68
|
const showInfoModal = useStore((state) => state.showInfoModal);
|
|
14
69
|
const setShowInfoModal = useStore((state) => state.setShowInfoModal);
|
|
@@ -20,8 +75,8 @@ function GlobalClientModals({ useStore, useAudioStore, useTouchControlsStore, us
|
|
|
20
75
|
const setShowFriendsModal = useStore((state) => state.setShowFriendsModal);
|
|
21
76
|
const showInviteModal = useStore((state) => state.showInviteModal);
|
|
22
77
|
const setShowInviteModal = useStore((state) => state.setShowInviteModal);
|
|
23
|
-
const
|
|
24
|
-
const
|
|
78
|
+
const showDevStatusModal = useStore((state) => state.showDevStatusModal);
|
|
79
|
+
const setShowDevStatusModal = useStore((state) => state.setShowDevStatusModal);
|
|
25
80
|
if (!settingsModalConfig) {
|
|
26
81
|
console.error("GlobalClientModals: settingsModalConfig is not provided!");
|
|
27
82
|
return;
|
|
@@ -56,7 +111,12 @@ function GlobalClientModals({ useStore, useAudioStore, useTouchControlsStore, us
|
|
|
56
111
|
show: showInviteModal,
|
|
57
112
|
setShow: setShowInviteModal,
|
|
58
113
|
useSocketStore
|
|
59
|
-
})
|
|
114
|
+
}),
|
|
115
|
+
/* @__PURE__ */ jsxs(Fragment, { children: [showDevStatusModal && /* @__PURE__ */ jsx(StatusModal, {
|
|
116
|
+
show: showDevStatusModal,
|
|
117
|
+
setShow: setShowDevStatusModal,
|
|
118
|
+
useSocketStore
|
|
119
|
+
}), process.env.NODE_ENV === "development" && /* @__PURE__ */ jsx(ArticlesDevStatusBadge, { useStore })] })
|
|
60
120
|
] });
|
|
61
121
|
}
|
|
62
122
|
//#endregion
|
|
@@ -224,7 +224,7 @@ function OnlinePlayers({ useStore, multiplayerConfig }) {
|
|
|
224
224
|
" online."
|
|
225
225
|
]
|
|
226
226
|
}), /* @__PURE__ */ jsxs("div", {
|
|
227
|
-
className: "d-flex justify-content-center mb-
|
|
227
|
+
className: "d-flex justify-content-center mb-2",
|
|
228
228
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
229
229
|
className: "badge bg-black text-white me-1",
|
|
230
230
|
children: [landing_player_count || 0, " in lobby"]
|
|
@@ -246,7 +246,7 @@ function OtherTab({ useStore, config }) {
|
|
|
246
246
|
var package_default = {
|
|
247
247
|
name: "@articles-media/articles-dev-box",
|
|
248
248
|
description: "Shared code, functions, and components for different Articles Media projects.",
|
|
249
|
-
version: "1.3.
|
|
249
|
+
version: "1.3.9",
|
|
250
250
|
type: "module",
|
|
251
251
|
sideEffects: false,
|
|
252
252
|
imports: { "#root/src/*": "./src/*" },
|
package/dist/SettingsModal.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as SettingsModal } from "./SettingsModal-
|
|
1
|
+
import { t as SettingsModal } from "./SettingsModal-Bs-HN9bH.js";
|
|
2
2
|
export { SettingsModal as default };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { t as ArticlesButton } from "./Button-DvEZjsVV.js";
|
|
2
|
-
import { n as useMainSiteStatus, t as useAuthSiteStatus } from "./useAuthSiteStatus-
|
|
2
|
+
import { n as useMainSiteStatus, t as useAuthSiteStatus } from "./useAuthSiteStatus-DDN0q8T0.js";
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { Modal } from "react-bootstrap";
|
|
6
6
|
//#region src/components/Global/StatusModal.jsx
|
|
7
|
-
function StatusModal({ show, setShow }) {
|
|
7
|
+
function StatusModal({ show, setShow, useSocketStore }) {
|
|
8
|
+
const socket = useSocketStore((state) => state.socket);
|
|
8
9
|
const [showMainDetails, setShowMainDetails] = useState(false);
|
|
9
10
|
const [showAuthDetails, setShowAuthDetails] = useState(false);
|
|
10
11
|
const getStatusCode = (data, error, loading) => {
|
|
@@ -15,6 +16,12 @@ function StatusModal({ show, setShow }) {
|
|
|
15
16
|
};
|
|
16
17
|
const { data: mainSiteStatus, error: mainSiteStatusError, isLoading: mainSiteStatusLoading, mutate: mainSiteStatusMutate } = useMainSiteStatus({ disable: process.env.NODE_ENV !== "development" });
|
|
17
18
|
const { data: authSiteStatus, error: authSiteStatusError, isLoading: authSiteStatusLoading, mutate: authSiteStatusMutate } = useAuthSiteStatus({ disable: process.env.NODE_ENV !== "development" });
|
|
19
|
+
function openFolder(folderName) {
|
|
20
|
+
socket.emit("open-folder", folderName, (response) => {
|
|
21
|
+
if (response.success) console.log(`Opened folder: ${folderName}`);
|
|
22
|
+
else console.error(`Failed to open folder: ${folderName}`, response.error);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
18
25
|
return /* @__PURE__ */ jsxs(Modal, {
|
|
19
26
|
show,
|
|
20
27
|
size: "md",
|
|
@@ -26,19 +33,31 @@ function StatusModal({ show, setShow }) {
|
|
|
26
33
|
/* @__PURE__ */ jsxs(Modal.Body, { children: [
|
|
27
34
|
/* @__PURE__ */ jsxs("div", {
|
|
28
35
|
className: "d-flex align-items-center mb-2",
|
|
29
|
-
children: [
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ jsxs("h5", {
|
|
38
|
+
className: "mb-0 me-2",
|
|
39
|
+
children: ["Main Site Status: ", /* @__PURE__ */ jsx("span", {
|
|
40
|
+
className: `badge ${mainSiteStatus ? "bg-success" : "bg-danger"}`,
|
|
41
|
+
children: getStatusCode(mainSiteStatus, mainSiteStatusError, mainSiteStatusLoading)
|
|
42
|
+
})]
|
|
43
|
+
}),
|
|
44
|
+
/* @__PURE__ */ jsxs(ArticlesButton, {
|
|
45
|
+
variant: "link",
|
|
46
|
+
size: "sm",
|
|
47
|
+
className: "p-0",
|
|
48
|
+
onClick: () => setShowMainDetails(!showMainDetails),
|
|
49
|
+
children: [showMainDetails ? "Hide" : "View", " More"]
|
|
50
|
+
}),
|
|
51
|
+
/* @__PURE__ */ jsx(ArticlesButton, {
|
|
52
|
+
variant: "link",
|
|
53
|
+
size: "sm",
|
|
54
|
+
className: "p-0 d-inline-block ms-2",
|
|
55
|
+
onClick: () => {
|
|
56
|
+
openFolder("articles.media");
|
|
57
|
+
},
|
|
58
|
+
children: "Open Folder"
|
|
59
|
+
})
|
|
60
|
+
]
|
|
42
61
|
}),
|
|
43
62
|
showMainDetails && /* @__PURE__ */ jsxs("pre", { children: [
|
|
44
63
|
mainSiteStatusLoading && "Loading...",
|
|
@@ -47,19 +66,31 @@ function StatusModal({ show, setShow }) {
|
|
|
47
66
|
] }),
|
|
48
67
|
/* @__PURE__ */ jsxs("div", {
|
|
49
68
|
className: "d-flex align-items-center mb-2",
|
|
50
|
-
children: [
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
69
|
+
children: [
|
|
70
|
+
/* @__PURE__ */ jsxs("h5", {
|
|
71
|
+
className: "mb-0 me-2",
|
|
72
|
+
children: ["Auth Site Status: ", /* @__PURE__ */ jsx("span", {
|
|
73
|
+
className: `badge ${authSiteStatus ? "bg-success" : "bg-danger"}`,
|
|
74
|
+
children: getStatusCode(authSiteStatus, authSiteStatusError, authSiteStatusLoading)
|
|
75
|
+
})]
|
|
76
|
+
}),
|
|
77
|
+
/* @__PURE__ */ jsxs(ArticlesButton, {
|
|
78
|
+
variant: "link",
|
|
79
|
+
size: "sm",
|
|
80
|
+
className: "p-0",
|
|
81
|
+
onClick: () => setShowAuthDetails(!showAuthDetails),
|
|
82
|
+
children: [showAuthDetails ? "Hide" : "View", " More"]
|
|
83
|
+
}),
|
|
84
|
+
/* @__PURE__ */ jsx(ArticlesButton, {
|
|
85
|
+
variant: "link",
|
|
86
|
+
size: "sm",
|
|
87
|
+
className: "p-0 d-inline-block ms-2",
|
|
88
|
+
onClick: () => {
|
|
89
|
+
openFolder("accounts.articles.media");
|
|
90
|
+
},
|
|
91
|
+
children: "Open Folder"
|
|
92
|
+
})
|
|
93
|
+
]
|
|
63
94
|
}),
|
|
64
95
|
showAuthDetails && /* @__PURE__ */ jsxs("pre", { children: [
|
|
65
96
|
authSiteStatusLoading && "Loading...",
|
package/dist/index.js
CHANGED
|
@@ -16,7 +16,7 @@ import { t as GameScoreboard } from "./GameScoreboard-BvE_sIDW.js";
|
|
|
16
16
|
import PageTemplateLandingPage from "./PageTemplateLandingPage.js";
|
|
17
17
|
import GlobalHead from "./GlobalHead.js";
|
|
18
18
|
import GlobalBody_default from "./GlobalBody.js";
|
|
19
|
-
import { t as SettingsModal } from "./SettingsModal-
|
|
19
|
+
import { t as SettingsModal } from "./SettingsModal-Bs-HN9bH.js";
|
|
20
20
|
import CreditsModal from "./CreditsModal.js";
|
|
21
21
|
import InfoModal from "./InfoModal.js";
|
|
22
22
|
import DarkModeHandler from "./DarkModeHandler.js";
|
|
@@ -70,6 +70,10 @@ var typicalZustandStoreStateSlice = (set, get, generateRandomNickname) => ({
|
|
|
70
70
|
setShowInviteModal: (newValue) => {
|
|
71
71
|
set((prev) => ({ showInviteModal: newValue }));
|
|
72
72
|
},
|
|
73
|
+
showDevStatusModal: false,
|
|
74
|
+
setShowDevStatusModal: (newValue) => {
|
|
75
|
+
set((prev) => ({ showDevStatusModal: newValue }));
|
|
76
|
+
},
|
|
73
77
|
graphicsQuality: "High",
|
|
74
78
|
setGraphicsQuality: (value) => set({ graphicsQuality: value }),
|
|
75
79
|
lobbyDetails: {
|
package/package.json
CHANGED
|
File without changes
|