From fa131f927a5460899a410496ef3f692a542b5262 Mon Sep 17 00:00:00 2001 From: lianahus Date: Wed, 27 Jan 2021 18:14:23 +0100 Subject: [PATCH 1/3] add warning to reload the page --- apps/remix-ide/src/app/tabs/settings-tab.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide/src/app/tabs/settings-tab.js b/apps/remix-ide/src/app/tabs/settings-tab.js index 67bdbcddb3..09ef865400 100644 --- a/apps/remix-ide/src/app/tabs/settings-tab.js +++ b/apps/remix-ide/src/app/tabs/settings-tab.js @@ -77,10 +77,24 @@ module.exports = class SettingsTab extends ViewPlugin { const gistAccessToken = yo`` if (token) gistAccessToken.value = token const removeToken = () => { self.config.set('settings/gist-access-token', ''); gistAccessToken.value = ''; tooltip('Access token removed') } - const saveToken = () => { this.config.set('settings/gist-access-token', gistAccessToken.value); tooltip('Access token saved') } + const saveToken = () => { + this.config.set('settings/gist-access-token', gistAccessToken.value) + tooltip('Access token has been saved. RELOAD the page to apply it.') + } const gistAddToken = yo` saveToken()} value="Save" type="button">` const gistRemoveToken = yo`` - this._view.gistToken = yo`
${gistAccessToken}
${copyToClipboard(() => gistAccessToken.value)}${gistAddToken}${gistRemoveToken}
` + this._view.gistToken = yo` +
+ ${gistAccessToken} +
+ ${copyToClipboard(() => gistAccessToken.value)}${gistAddToken}${gistRemoveToken} +
+

+ + PAGE RELOAD REQUIRED AFTER SAVING A NEW TOKEN: (this step is temprorary, will be fixed soon) +

+
+ ` this._view.optionVM = yo`` this._view.optionVMLabel = yo`` if (this.config.get('settings/always-use-vm') === undefined) this.config.set('settings/always-use-vm', true) From b524c8252b02513ff878a5d7b11a99ab4d5c7f4d Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 28 Jan 2021 10:52:24 +0100 Subject: [PATCH 2/3] update label --- apps/remix-ide/src/app/tabs/settings-tab.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide/src/app/tabs/settings-tab.js b/apps/remix-ide/src/app/tabs/settings-tab.js index 09ef865400..2c304465c2 100644 --- a/apps/remix-ide/src/app/tabs/settings-tab.js +++ b/apps/remix-ide/src/app/tabs/settings-tab.js @@ -91,7 +91,7 @@ module.exports = class SettingsTab extends ViewPlugin {

- PAGE RELOAD REQUIRED AFTER SAVING A NEW TOKEN: (this step is temprorary, will be fixed soon) + Please reload Remix after having saved the token.

` From 2a48af0f1d2b783a77e3accd691045b4905d196d Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 28 Jan 2021 12:42:15 +0100 Subject: [PATCH 3/3] fix tests --- apps/remix-ide-e2e/src/tests/generalSettings.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/generalSettings.test.ts b/apps/remix-ide-e2e/src/tests/generalSettings.test.ts index f06d093ea6..8fbdf2ae51 100644 --- a/apps/remix-ide-e2e/src/tests/generalSettings.test.ts +++ b/apps/remix-ide-e2e/src/tests/generalSettings.test.ts @@ -41,7 +41,7 @@ module.exports = { .setValue('*[data-id="settingsTabGistAccessToken"]', '**********') .click('*[data-id="settingsTabSaveGistToken"]') .waitForElementVisible('*[data-shared="tooltipPopup"]:nth-last-of-type(1)', 5000) - .assert.containsText('*[data-shared="tooltipPopup"]:nth-last-of-type(1)', 'Access token saved') + .assert.containsText('*[data-shared="tooltipPopup"]:nth-last-of-type(1)', 'Access token has been saved') }, 'Should copy github access token to clipboard': function (browser: NightwatchBrowser) {