web/satellite: disable buckets checkbox if all buckets are selected

Disable buckets checkbox if all buckets option is selected for new access grant flow.
This would disallow unchecking all buckets checkbox if none of the specific buckets is selected.

Change-Id: I81a9f03d49d2cde862fd0afbc2fde0abeb0b31ce
This commit is contained in:
Vitalii 2023-03-06 14:44:01 +02:00
parent 6737d427e4
commit 45a47f654e
2 changed files with 4 additions and 1 deletions

View File

@ -4,7 +4,7 @@
<template>
<div class="toggle">
<label class="toggle__input-container">
<input :id="id || label" :checked="checked" type="checkbox" @change="onCheck">
<input :id="id || label" :checked="checked" :disabled="disabled" type="checkbox" @change="onCheck">
<span />
</label>
<label class="toggle__label" :for="id || label">{{ label }}</label>
@ -45,12 +45,14 @@ const props = withDefaults(defineProps<{
id?: string;
onShowHideAll?: () => void;
allShown?: boolean;
disabled?: boolean;
}>(), {
checked: false,
label: '',
id: '',
onCheck: () => {},
onShowHideAll: undefined,
disabled: false,
});
</script>

View File

@ -45,6 +45,7 @@
id="allBuckets"
:checked="selectedBuckets.length === 0"
label="All"
:disabled="selectedBuckets.length === 0"
:on-check="selectAllBuckets"
:on-show-hide-all="toggleBucketsVisibility"
:all-shown="searchBucketsShown"