diff options
author | Jose Vargas <jvargas@gitlab.com> | 2019-02-06 16:19:08 -0600 |
---|---|---|
committer | Jose Vargas <jvargas@gitlab.com> | 2019-02-07 09:19:46 -0600 |
commit | 71c33e95fbdbc19c49cb6c0f9595836b05d9a288 (patch) | |
tree | f10764c43a99358f30dffa464b62403864817c75 | |
parent | 8920224f057672a986edd04bdf6a70421054a68a (diff) | |
download | gitlab-ce-71c33e95fbdbc19c49cb6c0f9595836b05d9a288.tar.gz |
Clarified initial state for the project listtr-error-tracking-project-selection
Inlined translations
-rw-r--r-- | app/assets/javascripts/error_tracking_settings/components/project_dropdown.vue | 18 | ||||
-rw-r--r-- | app/assets/javascripts/error_tracking_settings/store/state.js | 2 |
2 files changed, 8 insertions, 12 deletions
diff --git a/app/assets/javascripts/error_tracking_settings/components/project_dropdown.vue b/app/assets/javascripts/error_tracking_settings/components/project_dropdown.vue index 0bf3ff089d1..363f609d6a7 100644 --- a/app/assets/javascripts/error_tracking_settings/components/project_dropdown.vue +++ b/app/assets/javascripts/error_tracking_settings/components/project_dropdown.vue @@ -12,12 +12,6 @@ export default { GlDropdownItem, Icon, }, - noAuthTokenText: s__('ErrorTracking|To enable project selection, enter a valid Auth Token'), - noConnectionText: s__( - "ErrorTracking|Click 'Connect' to re-establish the connection to Sentry and activate the dropdown.", - ), - noProjectsText: s__('ErrorTracking|No projects available'), - selectProjectText: s__('ErrorTracking|Select project'), computed: { ...mapState(['token', 'projects', 'selectedProject']), dropdownText() { @@ -25,15 +19,17 @@ export default { return this.getDisplayName(this.selectedProject); } if (!this.areProjectsLoaded || this.isProjectListEmpty) { - return this.$options.noProjectsText; + return s__('ErrorTracking|No projects available'); } - return this.$options.selectProjectText; + return s__('ErrorTracking|Select project'); }, projectSelectionText() { if (this.token) { - return this.$options.noConnectionText; + return s__( + "ErrorTracking|Click 'Connect' to re-establish the connection to Sentry and activate the dropdown.", + ); } - return this.$options.noAuthTokenText; + return s__('ErrorTracking|To enable project selection, enter a valid Auth Token'); }, isProjectListEmpty() { return this.areProjectsLoaded && this.projects.length === 0; @@ -46,7 +42,7 @@ export default { ); }, areProjectsLoaded() { - return this.projects !== null; + return this.projects.length; }, isDropdownDisabled() { return !this.areProjectsLoaded || this.isProjectListEmpty; diff --git a/app/assets/javascripts/error_tracking_settings/store/state.js b/app/assets/javascripts/error_tracking_settings/store/state.js index e0d8856dcfa..7af9eb0bd97 100644 --- a/app/assets/javascripts/error_tracking_settings/store/state.js +++ b/app/assets/javascripts/error_tracking_settings/store/state.js @@ -2,7 +2,7 @@ export default () => ({ apiHost: '', enabled: false, token: '', - projects: null, + projects: [], selectedProject: null, settingsLoading: false, connectSuccessful: false, |