diff --git a/addon/apex-runner.js b/addon/apex-runner.js index a389e054..1675fa01 100644 --- a/addon/apex-runner.js +++ b/addon/apex-runner.js @@ -1244,6 +1244,9 @@ class App extends React.Component { render() { let {model} = this.props; + let hostArg = new URLSearchParams(); + hostArg.set("host", model.sfHost); + hostArg.set("tab", 5); let suggestionHelper = ""; if (!model.disableSuggestionOverText) { if (model.displaySuggestion) { @@ -1271,7 +1274,10 @@ class App extends React.Component { h("div", {className: "slds-spinner__dot-a"}), h("div", {className: "slds-spinner__dot-b"}), ), - h("a", {href: "#", id: "help-btn", title: "Execute Help", onClick: this.onToggleHelp}, + h("a", {href: "options.html?" + hostArg, className: "top-btn", id: "options-btn", title: "Option", target: "_blank"}, + h("div", {className: "icon"}) + ), + h("a", {href: "#", className: "top-btn", id: "help-btn", title: "Execute Help", onClick: this.onToggleHelp}, h("div", {className: "icon"}) ), ), diff --git a/addon/data-export.css b/addon/data-export.css index cd1b1bbc..66977283 100644 --- a/addon/data-export.css +++ b/addon/data-export.css @@ -328,7 +328,7 @@ textarea[readonly] { border-top: 1px solid #DDDBDA; } -#help-btn { +.top-btn { margin-left: auto; text-decoration: none; font-size: 1.5rem; @@ -338,11 +338,11 @@ textarea[readonly] { align-items: center; } -#help-btn:hover .icon { +.top-btn:hover .icon { background-color: #818181; } -#help-btn .icon { +.top-btn .icon { display: inline-block; width: 1.4rem; height: 1.4rem; @@ -350,11 +350,18 @@ textarea[readonly] { -webkit-mask-repeat: no-repeat; -webkit-mask-size: 1.4rem; ; - -webkit-mask-image: url('chrome-extension://__MSG_@@extension_id__/images/help.svg'); -webkit-mask-position: center; background-color: #919191; } +#help-btn .icon { + -webkit-mask-image: url('chrome-extension://__MSG_@@extension_id__/images/help.svg'); +} +#options-btn .icon { + -webkit-mask-image: url('chrome-extension://__MSG_@@extension_id__/images/settings.svg'); +} + + #spinner { left: -15px; top: 9px; diff --git a/addon/data-export.js b/addon/data-export.js index 912c85b3..309dd595 100644 --- a/addon/data-export.js +++ b/addon/data-export.js @@ -2075,6 +2075,10 @@ class App extends React.Component { } render() { let {model} = this.props; + let hostArg = new URLSearchParams(); + hostArg.set("host", model.sfHost); + hostArg.set("tab", 3); + let suggestionHelper = ""; if (!model.disableSuggestionOverText) { if (model.displaySuggestion) { @@ -2116,7 +2120,10 @@ class App extends React.Component { h("div", {className: "slds-spinner__dot-a"}), h("div", {className: "slds-spinner__dot-b"}), ), - h("a", {href: "#", id: "help-btn", title: "Export Help", onClick: this.onToggleHelp}, + h("a", {href: "options.html?" + hostArg, className: "top-btn", id: "options-btn", title: "Option", target: "_blank"}, + h("div", {className: "icon"}) + ), + h("a", {href: "#", className: "top-btn", id: "help-btn", title: "Export Help", onClick: this.onToggleHelp}, h("div", {className: "icon"}) ), ), diff --git a/addon/data-import.css b/addon/data-import.css index 48074d5f..ffda179e 100644 --- a/addon/data-import.css +++ b/addon/data-import.css @@ -104,7 +104,8 @@ body { border-radius: 2px; fill: white; } -#help-btn { + +.top-btn { margin-left: auto; text-decoration: none; font-size: 1.5rem; @@ -113,19 +114,29 @@ body { display: flex; align-items: center; } -#help-btn:hover .icon{ + +.top-btn:hover .icon { background-color: #818181; } -#help-btn .icon { + +.top-btn .icon { display: inline-block; width: 1.4rem; - height: 1.4rem;; + height: 1.4rem; + ; -webkit-mask-repeat: no-repeat; - -webkit-mask-size: 1.4rem;; - -webkit-mask-image: url('chrome-extension://__MSG_@@extension_id__/images/help.svg'); + -webkit-mask-size: 1.4rem; + ; -webkit-mask-position: center; background-color: #919191; } + +#help-btn .icon { + -webkit-mask-image: url('chrome-extension://__MSG_@@extension_id__/images/help.svg'); +} +#options-btn .icon { + -webkit-mask-image: url('chrome-extension://__MSG_@@extension_id__/images/settings.svg'); +} #spinner { left: -15px; top: 9px; diff --git a/addon/data-import.js b/addon/data-import.js index 85b0a0a5..63012a78 100644 --- a/addon/data-import.js +++ b/addon/data-import.js @@ -1267,6 +1267,9 @@ class App extends React.Component { } render() { let {model} = this.props; + let hostArg = new URLSearchParams(); + hostArg.set("host", model.sfHost); + hostArg.set("tab", 4); return h("div", {onClick: this.onClick}, h("div", {id: "user-info"}, h("a", {href: model.sfLink, className: "sf-link"}, @@ -1283,7 +1286,10 @@ class App extends React.Component { h("div", {className: "slds-spinner__dot-a"}), h("div", {className: "slds-spinner__dot-b"}), ), - h("a", {href: "#", id: "help-btn", title: "Import Help", onClick: this.onToggleHelpClick}, + h("a", {href: "options.html?" + hostArg, className: "top-btn", id: "options-btn", title: "Option", target: "_blank"}, + h("div", {className: "icon"}) + ), + h("a", {href: "#", className: "top-btn", id: "help-btn", title: "Import Help", onClick: this.onToggleHelpClick}, h("div", {className: "icon"}) ), ), diff --git a/addon/log.css b/addon/log.css index 72cb91e8..746bdd6b 100644 --- a/addon/log.css +++ b/addon/log.css @@ -249,4 +249,33 @@ position: sticky; top: 0; }*/ - \ No newline at end of file + +.top-btn { + margin-left: auto; + text-decoration: none; + font-size: 1.5rem; + font-weight: 700; + color: #919191; + display: flex; + align-items: center; +} + +.top-btn:hover .icon { + background-color: #818181; +} + +.top-btn .icon { + display: inline-block; + width: 1.4rem; + height: 1.4rem; + ; + -webkit-mask-repeat: no-repeat; + -webkit-mask-size: 1.4rem; + ; + -webkit-mask-position: center; + background-color: #919191; +} + +#options-btn .icon { + -webkit-mask-image: url('chrome-extension://__MSG_@@extension_id__/images/settings.svg'); +} \ No newline at end of file diff --git a/addon/log.js b/addon/log.js index 2350564c..f7571684 100644 --- a/addon/log.js +++ b/addon/log.js @@ -878,6 +878,9 @@ class App extends React.Component { render() { let {model} = this.props; + let hostArg = new URLSearchParams(); + hostArg.set("host", model.sfHost); + hostArg.set("tab", 5); return h("div", {}, h("div", {id: "user-info"}, h("a", {href: model.sfLink, className: "sf-link"}, @@ -894,6 +897,9 @@ class App extends React.Component { h("div", {className: "slds-spinner__dot-a"}), h("div", {className: "slds-spinner__dot-b"}), ), + h("a", {href: "options.html?" + hostArg, className: "top-btn", id: "options-btn", title: "Option", target: "_blank"}, + h("div", {className: "icon"}) + ), ), ), h("div", {className: "area"}, diff --git a/addon/options.js b/addon/options.js index e43f5a26..77ce7533 100644 --- a/addon/options.js +++ b/addon/options.js @@ -9,9 +9,9 @@ function cleanInputValue(value) { class Model { - constructor(sfHost) { + constructor(sfHost, tab) { this.sfHost = sfHost; - + this.tab = tab; this.sfLink = "https://" + this.sfHost; this.userInfo = "..."; if (localStorage.getItem(sfHost + "_isSandbox") != "true") { @@ -68,8 +68,9 @@ class OptionsTabSelector extends React.Component { super(props); this.model = props.model; this.sfHost = this.model.sfHost; + let tab = props.model.tab || 1; this.state = { - selectedTabId: 1 + selectedTabId: tab }; this.tabs = [ { @@ -692,11 +693,12 @@ class App extends React.Component { let args = new URLSearchParams(location.search.slice(1)); let sfHost = args.get("host"); + let tab = args.get("tab") ? parseInt(args.get("tab")) : 1; initButton(sfHost, true); sfConn.getSession(sfHost).then(() => { let root = document.getElementById("root"); - let model = new Model(sfHost); + let model = new Model(sfHost, tab); model.reactCallback = cb => { ReactDOM.render(h(App, {model}), root, cb); };