@sprucelabs/spruce-profile-utils 3.0.14 → 3.0.16

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.
@@ -76,13 +76,16 @@ class ProfileCardViewController extends AbstractViewController {
76
76
  });
77
77
  const loggedInPerson = this.authenticator.getPerson();
78
78
  const updatedPerson = Object.assign(Object.assign({}, this.person), values);
79
- if (loggedInPerson.id === ((_b = this.person) === null || _b === void 0 ? void 0 : _b.id)) {
79
+ const isMe = loggedInPerson.id === ((_b = this.person) === null || _b === void 0 ? void 0 : _b.id);
80
+ if (isMe) {
80
81
  const token = this.authenticator.getSessionToken();
81
82
  (_c = this.authenticator) === null || _c === void 0 ? void 0 : _c.setSessionToken(token, updatedPerson);
82
83
  }
83
84
  yield this.alert({
84
85
  title: 'Changes saved!',
85
- message: 'Your profile has been updated. This is so much fun!',
86
+ message: isMe
87
+ ? 'Your profile has been updated. This is so much fun!'
88
+ : `Profile saved!`,
86
89
  style: 'success',
87
90
  });
88
91
  yield ((_d = this.onSubmitHandler) === null || _d === void 0 ? void 0 : _d.call(this, updatedPerson));
@@ -68,13 +68,16 @@ class ProfileCardViewController extends heartwood_view_controllers_1.AbstractVie
68
68
  });
69
69
  const loggedInPerson = this.authenticator.getPerson();
70
70
  const updatedPerson = Object.assign(Object.assign({}, this.person), values);
71
- if (loggedInPerson.id === ((_b = this.person) === null || _b === void 0 ? void 0 : _b.id)) {
71
+ const isMe = loggedInPerson.id === ((_b = this.person) === null || _b === void 0 ? void 0 : _b.id);
72
+ if (isMe) {
72
73
  const token = this.authenticator.getSessionToken();
73
74
  (_c = this.authenticator) === null || _c === void 0 ? void 0 : _c.setSessionToken(token, updatedPerson);
74
75
  }
75
76
  await this.alert({
76
77
  title: 'Changes saved!',
77
- message: 'Your profile has been updated. This is so much fun!',
78
+ message: isMe
79
+ ? 'Your profile has been updated. This is so much fun!'
80
+ : `Profile saved!`,
78
81
  style: 'success',
79
82
  });
80
83
  await ((_d = this.onSubmitHandler) === null || _d === void 0 ? void 0 : _d.call(this, updatedPerson));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sprucelabs/spruce-profile-utils",
3
3
  "description": "Useeful utilities",
4
- "version": "3.0.14",
4
+ "version": "3.0.16",
5
5
  "skill": {
6
6
  "namespace": "profile"
7
7
  },