@dao42/d42paas-front 0.7.64 → 0.7.65
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/DaoPaaS.es.js +20 -5
- package/dist/DaoPaaS.umd.js +117 -117
- package/package.json +1 -3
package/dist/DaoPaaS.es.js
CHANGED
|
@@ -15036,7 +15036,7 @@ const userStore = create$4(persist((set) => ({
|
|
|
15036
15036
|
}))
|
|
15037
15037
|
}), {
|
|
15038
15038
|
name: "userInfo",
|
|
15039
|
-
getStorage: () =>
|
|
15039
|
+
getStorage: () => sessionStorage
|
|
15040
15040
|
}));
|
|
15041
15041
|
create$4((set) => ({
|
|
15042
15042
|
syncCursor: true,
|
|
@@ -15080,7 +15080,7 @@ const shadowUserStore = create$4(persist((set) => ({
|
|
|
15080
15080
|
const userListStore = create$4(persist((set) => ({
|
|
15081
15081
|
userList: [],
|
|
15082
15082
|
setUserList: (arg) => set(() => ({
|
|
15083
|
-
userList: arg
|
|
15083
|
+
userList: arg.filter((x2) => x2.agentUserId)
|
|
15084
15084
|
}))
|
|
15085
15085
|
}), {
|
|
15086
15086
|
name: "userList",
|
|
@@ -15136,7 +15136,7 @@ const isDev = () => {
|
|
|
15136
15136
|
const strPoints = ["localhost", "127.0.", "192.168."];
|
|
15137
15137
|
return strPoints.some((point2) => window.location.hostname.includes(point2));
|
|
15138
15138
|
};
|
|
15139
|
-
const [host, port] = [
|
|
15139
|
+
const [host, port] = ["", {}.SOCKET_INSTANCE_CLIENT_PORT];
|
|
15140
15140
|
const useOT = create$4((set) => ({
|
|
15141
15141
|
socket: void 0,
|
|
15142
15142
|
socketHeader: null,
|
|
@@ -15151,7 +15151,13 @@ class sockerIO {
|
|
|
15151
15151
|
constructor(auth) {
|
|
15152
15152
|
console.log(isDev());
|
|
15153
15153
|
const SOCKET_INSTANCE = (!isDev() ? "" : `ws://${host}:4001`) || auth.ioPath;
|
|
15154
|
-
|
|
15154
|
+
const {
|
|
15155
|
+
agentUserId
|
|
15156
|
+
} = userStore.getState().userInfo;
|
|
15157
|
+
auth.agentUserId = agentUserId;
|
|
15158
|
+
useOT.getState().setSocketHeader(__spreadProps(__spreadValues({}, auth), {
|
|
15159
|
+
agentUserId
|
|
15160
|
+
}));
|
|
15155
15161
|
return lookup(SOCKET_INSTANCE, {
|
|
15156
15162
|
transports: ["websocket"],
|
|
15157
15163
|
auth
|
|
@@ -27603,6 +27609,7 @@ const PlaygroundInit = (arg) => {
|
|
|
27603
27609
|
ResetPlayground();
|
|
27604
27610
|
window.clearCache = () => {
|
|
27605
27611
|
localStorage.clear();
|
|
27612
|
+
sessionStorage.clear();
|
|
27606
27613
|
resetDB();
|
|
27607
27614
|
socket2.emit("clearCache");
|
|
27608
27615
|
};
|
|
@@ -27636,6 +27643,15 @@ const PlaygroundInit = (arg) => {
|
|
|
27636
27643
|
let originUser = userStore.getState().userInfo;
|
|
27637
27644
|
const userData = JSON.parse(data);
|
|
27638
27645
|
const color2 = roleColors(userData.onlineCount - 1);
|
|
27646
|
+
if (originUser.agentUserId && originUser.agentUserId === userData.agentUserId) {
|
|
27647
|
+
originUser = lodash$2.exports.omit(__spreadProps(__spreadValues({}, userData), {
|
|
27648
|
+
color: color2
|
|
27649
|
+
}), "coUsers");
|
|
27650
|
+
setUserInfo(originUser);
|
|
27651
|
+
if (daoStore.getState().playgroundStatus === "INACTIVE") {
|
|
27652
|
+
socket2 == null ? void 0 : socket2.emit("active");
|
|
27653
|
+
}
|
|
27654
|
+
}
|
|
27639
27655
|
if (!originUser.agentUserId) {
|
|
27640
27656
|
originUser = lodash$2.exports.omit(__spreadProps(__spreadValues({}, userData), {
|
|
27641
27657
|
color: color2
|
|
@@ -162328,7 +162344,6 @@ const FileTree = ({
|
|
|
162328
162344
|
const {
|
|
162329
162345
|
agentUserId
|
|
162330
162346
|
} = userStore.getState().userInfo;
|
|
162331
|
-
debugger;
|
|
162332
162347
|
const crdt = {
|
|
162333
162348
|
timestamp: Date.now(),
|
|
162334
162349
|
agentUserId,
|