From 890ebad0b2b221aac81ff5479bf0cc60dc426094 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 b736f8162a9b31cd4d12b6d47ecd39410ed8c24f 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 a82f5bcb449527cf1ce155ee8eede4d558d62f93 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) {