diff --git a/app/javascript/vue/repository/state_menu.vue b/app/javascript/vue/repository/state_menu.vue index 7e798ccdb..015a1cf81 100644 --- a/app/javascript/vue/repository/state_menu.vue +++ b/app/javascript/vue/repository/state_menu.vue @@ -20,14 +20,15 @@ export default { props: { viewMode: { type: String, required: true }, activeUrl: { type: String, required: true }, - archivedUrl: { type: String, required: true } + archivedUrl: { type: String, required: true }, + disabled: { type: String, default: 'false' } }, beforeDestroy() { delete window.initRepositoryStateMenu; }, computed: { disabled() { - return this.viewMode === 'archived' ? ' disabled' : ''; + return this.disabled === 'true' ? ' disabled' : ''; }, btnText() { return I18n.t(`toolbar.${this.viewMode}_state`); diff --git a/app/views/repositories/_toolbar_buttons.html.erb b/app/views/repositories/_toolbar_buttons.html.erb index 6324d6887..39408b711 100644 --- a/app/views/repositories/_toolbar_buttons.html.erb +++ b/app/views/repositories/_toolbar_buttons.html.erb @@ -58,6 +58,7 @@