diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-15 00:08:30 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-15 00:08:30 +0300 |
commit | a64e7a40667471a1a6594df04476b3c99cabbe3c (patch) | |
tree | 8f89c98a3c152934bcac96b4976c1a430ffe32c6 /app | |
parent | 870dfaa9127e114a6ea2066220760815063fb3de (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/integrations/edit/components/dynamic_field.vue | 18 | ||||
-rw-r--r-- | app/assets/javascripts/integrations/edit/components/integration_form.vue | 9 | ||||
-rw-r--r-- | app/assets/javascripts/integrations/edit/index.js | 1 | ||||
-rw-r--r-- | app/helpers/avatars_helper.rb | 2 | ||||
-rw-r--r-- | app/helpers/page_layout_helper.rb | 4 | ||||
-rw-r--r-- | app/models/user.rb | 1 |
6 files changed, 26 insertions, 9 deletions
diff --git a/app/assets/javascripts/integrations/edit/components/dynamic_field.vue b/app/assets/javascripts/integrations/edit/components/dynamic_field.vue index 4260a224ca8..904e5639cac 100644 --- a/app/assets/javascripts/integrations/edit/components/dynamic_field.vue +++ b/app/assets/javascripts/integrations/edit/components/dynamic_field.vue @@ -74,7 +74,7 @@ export default { }; }, computed: { - ...mapGetters(['isInheriting']), + ...mapGetters(['isInheriting', 'propsSource']), isCheckbox() { return this.type === 'checkbox'; }, @@ -116,11 +116,18 @@ export default { name: this.fieldName, state: this.valid, readonly: this.isInheriting, + disabled: this.isDisabled, }; }, valid() { return !this.required || !isEmpty(this.model) || this.isNonEmptyPassword || !this.isValidated; }, + isInheritingOrDisabled() { + return this.isInheriting || this.isDisabled; + }, + isDisabled() { + return !this.propsSource.editable; + }, }, created() { if (this.isNonEmptyPassword) { @@ -143,7 +150,7 @@ export default { <template v-if="isCheckbox"> <input :name="fieldName" type="hidden" :value="model || false" /> - <gl-form-checkbox :id="fieldId" v-model="model" :disabled="isInheriting"> + <gl-form-checkbox :id="fieldId" v-model="model" :disabled="isInheritingOrDisabled"> {{ checkboxLabel || humanizedTitle }} <template #help> <span v-safe-html="help"></span> @@ -152,7 +159,12 @@ export default { </template> <template v-else-if="isSelect"> <input type="hidden" :name="fieldName" :value="model" /> - <gl-form-select :id="fieldId" v-model="model" :options="options" :disabled="isInheriting" /> + <gl-form-select + :id="fieldId" + v-model="model" + :options="options" + :disabled="isInheritingOrDisabled" + /> </template> <gl-form-textarea v-else-if="isTextarea" diff --git a/app/assets/javascripts/integrations/edit/components/integration_form.vue b/app/assets/javascripts/integrations/edit/components/integration_form.vue index 3471c1746a9..a9cb569d823 100644 --- a/app/assets/javascripts/integrations/edit/components/integration_form.vue +++ b/app/assets/javascripts/integrations/edit/components/integration_form.vue @@ -229,7 +229,10 @@ export default { billingPlanNames, slackUpgradeInfo: { title: s__( - `SlackIntegration|Notifications only work if you're on the latest version of the GitLab for Slack app`, + `SlackIntegration|Update to the latest version of GitLab for Slack to get notifications`, + ), + text: s__( + `SlackIntegration|Update to the latest version to receive notifications from GitLab.`, ), btnText: s__('SlackIntegration|Update to the latest version'), }, @@ -290,11 +293,11 @@ export default { <gl-alert :dismissible="false" :title="$options.slackUpgradeInfo.title" - variant="warning" :primary-button-link="customState.upgradeSlackUrl" :primary-button-text="$options.slackUpgradeInfo.btnText" class="gl-mb-8 gl-mt-5" - /> + >{{ $options.slackUpgradeInfo.text }}</gl-alert + > </div> <template v-if="hasSections"> diff --git a/app/assets/javascripts/integrations/edit/index.js b/app/assets/javascripts/integrations/edit/index.js index f15ad5e052e..b53bcd50f16 100644 --- a/app/assets/javascripts/integrations/edit/index.js +++ b/app/assets/javascripts/integrations/edit/index.js @@ -108,6 +108,7 @@ export default function initIntegrationSettingsForm() { const initialState = { defaultState: null, customState: customSettingsProps, + editable: customSettingsProps.editable && !customSettingsProps.shouldUpgradeSlack, }; if (defaultSettingsEl) { initialState.defaultState = Object.freeze(parseDatasetToProps(defaultSettingsEl.dataset)); diff --git a/app/helpers/avatars_helper.rb b/app/helpers/avatars_helper.rb index 798bb7b64a4..0fac2cb5fc5 100644 --- a/app/helpers/avatars_helper.rb +++ b/app/helpers/avatars_helper.rb @@ -91,7 +91,7 @@ module AvatarsHelper title: user_name } - tag(:img, image_options) + tag.img(**image_options) end def user_avatar(options = {}) diff --git a/app/helpers/page_layout_helper.rb b/app/helpers/page_layout_helper.rb index c0665463706..6f7b2877100 100644 --- a/app/helpers/page_layout_helper.rb +++ b/app/helpers/page_layout_helper.rb @@ -80,8 +80,8 @@ module PageLayoutHelper tags = [] page_card_attributes.each_with_index do |pair, i| - tags << tag(:meta, property: "twitter:label#{i + 1}", content: pair[0]) - tags << tag(:meta, property: "twitter:data#{i + 1}", content: pair[1]) + tags << tag.meta(property: "twitter:label#{i + 1}", content: pair[0]) + tags << tag.meta(property: "twitter:data#{i + 1}", content: pair[1]) end tags.join.html_safe diff --git a/app/models/user.rb b/app/models/user.rb index d50605b4aa3..ba3f7922c9c 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -1890,6 +1890,7 @@ class User < ApplicationRecord def invalidate_issue_cache_counts Rails.cache.delete(['users', id, 'assigned_open_issues_count']) + Rails.cache.delete(['users', id, 'max_assigned_open_issues_count']) if Feature.enabled?(:limit_assigned_issues_count) end def invalidate_merge_request_cache_counts |