@dao42/d42paas-front 0.7.52 → 0.7.56

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.
@@ -15087,18 +15087,29 @@ create$5((set2) => ({
15087
15087
  syncCursor: arg
15088
15088
  }))
15089
15089
  }));
15090
+ const followingUserStore = create$5((set2) => ({
15091
+ followingUsers: [],
15092
+ setFollowingUsers: (arg) => set2(() => ({
15093
+ followingUsers: arg
15094
+ }))
15095
+ }));
15090
15096
  const shadowUserStore = create$5(persist((set2) => ({
15091
15097
  shadowUser: {},
15092
15098
  switchShadowUser: (id2) => set2(() => {
15093
- var _a2;
15099
+ const followingUser = userStore.getState().userInfo;
15100
+ const io = useOT.getState().socket;
15094
15101
  let user;
15095
15102
  if (id2 !== void 0) {
15096
15103
  user = userListStore.getState().userList.find((user2) => user2.userId === id2);
15097
- (_a2 = useOT.getState().socket) == null ? void 0 : _a2.emit("following", {
15098
- user
15099
- });
15100
15104
  console.log(`\u5DF2\u5207\u6362\u81F3\u3010${user.username}\u3011\u89C6\u89D2`);
15105
+ io == null ? void 0 : io.emit("following", {
15106
+ user,
15107
+ followingUser
15108
+ });
15101
15109
  } else {
15110
+ io == null ? void 0 : io.emit("unFollowing", {
15111
+ followingUser
15112
+ });
15102
15113
  console.log(`\u5DF2\u9000\u51FA\u8DDF\u968F\u89C6\u89D2`);
15103
15114
  }
15104
15115
  return {
@@ -28606,6 +28617,24 @@ const PlaygroundInit = (arg) => {
28606
28617
  })];
28607
28618
  setUserList(userInfoList);
28608
28619
  });
28620
+ io.on("following", (d2) => {
28621
+ const users_server = JSON.parse(d2);
28622
+ const followingUsers = users_server.filter(({
28623
+ user
28624
+ }) => IsMe(user));
28625
+ followingUserStore.getState().setFollowingUsers(followingUsers.map(({
28626
+ followingUser
28627
+ }) => followingUser));
28628
+ });
28629
+ io.on("unFollowing", (d2) => {
28630
+ const {
28631
+ followingUsers,
28632
+ setFollowingUsers
28633
+ } = followingUserStore.getState();
28634
+ const user = JSON.parse(d2);
28635
+ followingUsers.splice(lodash$2.exports.findIndex(followingUsers, (f2) => f2.userId === user.followingUser.userId), 1);
28636
+ setFollowingUsers(followingUsers);
28637
+ });
28609
28638
  io.on("playgroundInfo", (data) => {
28610
28639
  var _a2;
28611
28640
  const {
@@ -44751,23 +44780,32 @@ class DaoPaaS {
44751
44780
  this.messageAndErrorInjection();
44752
44781
  }
44753
44782
  messageAndErrorInjection() {
44754
- dockerState.subscribe((state2) => state2, (pre, next2) => {
44755
- this.trigger(lodash$2.exports.pick(pre, ["dockerStatus"]), lodash$2.exports.pick(next2, ["dockerStatus"]));
44783
+ dockerState.subscribe((state2) => state2, (next2, pre) => {
44784
+ this.trigger(lodash$2.exports.pick(next2, ["dockerStatus"]), lodash$2.exports.pick(next2, ["dockerStatus"]));
44785
+ this.trigger(lodash$2.exports.pick(next2, ["lan"]), lodash$2.exports.pick(next2, ["dockerStatus"]));
44756
44786
  });
44757
- oTStore.subscribe((state2) => state2, (pre, next2) => {
44758
- this.trigger(lodash$2.exports.pick(pre, ["playgroundStatus"]), lodash$2.exports.pick(next2, ["playgroundStatus"]));
44787
+ oTStore.subscribe((state2) => state2, (next2, pre) => {
44788
+ this.trigger(lodash$2.exports.pick(next2, ["playgroundStatus"]), lodash$2.exports.pick(next2, ["playgroundStatus"]));
44789
+ this.trigger(lodash$2.exports.pick(next2.dockerInfo, ["language"]), lodash$2.exports.pick(next2.dockerInfo, ["language"]));
44759
44790
  });
44760
44791
  ErrorMsgState.subscribe((state2) => state2, (next2, pre) => {
44761
44792
  this.trigger("error", lodash$2.exports.pick(next2, "message"));
44762
44793
  });
44763
44794
  userListStore.subscribe((next2, pre) => {
44764
- this.trigger(lodash$2.exports.pick(pre, ["userList"]), lodash$2.exports.pick(next2, ["userList"]));
44795
+ this.trigger(lodash$2.exports.pick(next2, ["userList"]), lodash$2.exports.pick(next2, ["userList"]));
44765
44796
  });
44766
44797
  shadowUserStore.subscribe((next2, pre) => {
44767
44798
  this.trigger({
44768
- followingUser: pre.shadowUser
44799
+ followingUser: next2.shadowUser
44769
44800
  }, {
44770
- followingUser: pre.shadowUser
44801
+ followingUser: next2.shadowUser
44802
+ });
44803
+ });
44804
+ followingUserStore.subscribe((next2, pre) => {
44805
+ this.trigger({
44806
+ usersFollowYou: next2.followingUsers
44807
+ }, {
44808
+ usersFollowYou: next2.followingUsers
44771
44809
  });
44772
44810
  });
44773
44811
  }
@@ -44881,14 +44919,14 @@ class DaoPaaS {
44881
44919
  props: arg.props || omitObj
44882
44920
  });
44883
44921
  break;
44884
- case "Browser":
44885
- this.Browser({
44922
+ case "Shell":
44923
+ this.Shell({
44886
44924
  container: arg.container,
44887
44925
  props: arg.props || omitObj
44888
44926
  });
44889
44927
  break;
44890
- case "Shell":
44891
- this.Shell({
44928
+ case "Browser":
44929
+ this.Browser({
44892
44930
  container: arg.container,
44893
44931
  props: arg.props || omitObj
44894
44932
  });