Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[popup] Store org instance in session #208

Merged
merged 3 commits into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Version 1.21

- Org instance in not correct with after Hyperforce migration: store org instance in sessionStorage to retrieve it once per session [issue 167](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/167)
- Add Salesforce SObject documentation links [feature 219](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/219) (idea by [Antoine Audollent])

## Version 1.20.1
Expand Down
8 changes: 4 additions & 4 deletions addon/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ class App extends React.PureComponent {
removeEventListener("keydown", this.onShortcutKey);
}
getOrgInstance(sfHost) {
let orgInstance = localStorage.getItem(sfHost + "_orgInstance");
let orgInstance = sessionStorage.getItem(sfHost + "_orgInstance");
if (orgInstance == null) {
sfConn.rest("/services/data/v" + apiVersion + "/query/?q=SELECT+InstanceName+FROM+Organization").then(res => {
orgInstance = res.records[0].InstanceName;
localStorage.setItem(sfHost + "_orgInstance", orgInstance);
sessionStorage.setItem(sfHost + "_orgInstance", orgInstance);
});
}
return orgInstance;
Expand Down Expand Up @@ -237,8 +237,8 @@ class App extends React.PureComponent {
h("div", {className: "slds-grid slds-theme_shade slds-p-around_small slds-border_top"},
h("div", {className: "slds-col slds-size_5-of-12 footer-small-text slds-m-top_xx-small"},
h("a", {href: "https://tprouvot.github.io/Salesforce-Inspector-reloaded/release-note/", title: "Release note", target: linkTarget}, "v" + addonVersion),
h("span", {}, " / "),
h("a", {href: "https://status.salesforce.com/instances/" + orgInstance, title: "Instance status", target: linkTarget}, orgInstance),
orgInstance ? h("span", {}, " / ") : "",
orgInstance ? h("a", {href: "https://status.salesforce.com/instances/" + orgInstance, title: "Instance status", target: linkTarget}, orgInstance) : "",
h("span", {}, " / "),
h("input", {
className: "api-input",
Expand Down