diff options
Diffstat (limited to 'app/assets/javascripts/registry/settings/components/expiration_toggle.vue')
-rw-r--r-- | app/assets/javascripts/registry/settings/components/expiration_toggle.vue | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/app/assets/javascripts/registry/settings/components/expiration_toggle.vue b/app/assets/javascripts/registry/settings/components/expiration_toggle.vue deleted file mode 100644 index 6aa78c69ba9..00000000000 --- a/app/assets/javascripts/registry/settings/components/expiration_toggle.vue +++ /dev/null @@ -1,62 +0,0 @@ -<script> -import { GlFormGroup, GlToggle, GlSprintf } from '@gitlab/ui'; -import { s__ } from '~/locale'; -import { ENABLED_TOGGLE_DESCRIPTION, DISABLED_TOGGLE_DESCRIPTION } from '../constants'; - -export default { - i18n: { - toggleLabel: s__('ContainerRegistry|Enable expiration policy'), - }, - components: { - GlFormGroup, - GlToggle, - GlSprintf, - }, - props: { - disabled: { - type: Boolean, - required: false, - default: false, - }, - value: { - type: Boolean, - required: false, - default: false, - }, - }, - computed: { - enabled: { - get() { - return this.value; - }, - set(value) { - this.$emit('input', value); - }, - }, - toggleText() { - return this.enabled ? ENABLED_TOGGLE_DESCRIPTION : DISABLED_TOGGLE_DESCRIPTION; - }, - }, -}; -</script> - -<template> - <gl-form-group id="expiration-policy-toggle-group" label-for="expiration-policy-toggle"> - <div class="gl-display-flex"> - <gl-toggle - id="expiration-policy-toggle" - v-model="enabled" - :label="$options.i18n.toggleLabel" - label-position="hidden" - :disabled="disabled" - /> - <span class="gl-ml-5 gl-line-height-24" data-testid="description"> - <gl-sprintf :message="toggleText"> - <template #strong="{ content }"> - <strong>{{ content }}</strong> - </template> - </gl-sprintf> - </span> - </div> - </gl-form-group> -</template> |