-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display confirmation dialog and toasts on toggling file to public #198
Conversation
Toasts are also displayed when toggling file to private
Code Climate has analyzed commit f6485a5 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 0.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 24.6% (0.0% change). View more on Code Climate. |
acceptLabel: 'Confirm', | ||
rejectLabel: 'Cancel', | ||
accept: () => { | ||
objectStore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a show stopper, just for future reference. Consider moving logic into a separate function, which can be called in multiple places.
@@ -66,6 +66,7 @@ onBeforeMount(() => { | |||
class="ml-4" | |||
:bucket-id="object.bucketId" | |||
:object-id="object.id" | |||
:object-name="object.name" | |||
:object-public="object.public" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i guess we could just pass the whole object
in one binding (:object="object"
) instead of 4 separate ones, and break it down in the child component, and i think we've found some other ways since adopting this pattern early on.. but this is fine for now.
Description
Setting the "set to public" switch to "on" (in both the object table and file permissions modal) now opens an additional modal that asks the user to confirm before doing so:
(this dialog is only displayed when toggling a file from private to public)
A toast is then displayed:
A toast is also displayed when toggling a file from public to private:
https://apps.nrs.gov.bc.ca/int/jira/browse/SHOWCASE-3667
Types of changes
New feature (non-breaking change which adds functionality)
Checklist
Further comments
N/A