web/satellite: fix for open bucket and bucket search issues
Fixed bucket search not being cleared on component unmount. Fixed open bucket issue for project dashboard presented by the conflict with vue-click-outside directive. Change-Id: I3682c6b131dcdb902369cf74b31c1b270cd15b08
This commit is contained in:
parent
01932bda42
commit
dcb16d83dd
@ -152,7 +152,7 @@ export default class AccountArea extends Vue {
|
||||
this.$store.dispatch(NOTIFICATION_ACTIONS.CLEAR),
|
||||
this.$store.dispatch(BUCKET_ACTIONS.CLEAR),
|
||||
this.$store.dispatch(OBJECTS_ACTIONS.CLEAR),
|
||||
this.$store.dispatch(APP_STATE_ACTIONS.CLOSE_POPUPS),
|
||||
this.$store.dispatch(APP_STATE_ACTIONS.CLEAR),
|
||||
this.$store.dispatch(PAYMENTS_ACTIONS.CLEAR_PAYMENT_INFO),
|
||||
this.$store.dispatch(AB_TESTING_ACTIONS.RESET),
|
||||
this.$store.dispatch('files/clear'),
|
||||
|
@ -65,7 +65,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, ref } from 'vue';
|
||||
import { computed, onBeforeUnmount, ref } from 'vue';
|
||||
|
||||
import { BUCKET_ACTIONS } from '@/store/modules/buckets';
|
||||
import { OBJECTS_ACTIONS } from '@/store/modules/objects';
|
||||
@ -211,6 +211,10 @@ function openBucket(bucketName: string): void {
|
||||
|
||||
store.commit(APP_STATE_MUTATIONS.TOGGLE_OPEN_BUCKET_MODAL_SHOWN);
|
||||
}
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
store.dispatch(BUCKET_ACTIONS.SET_SEARCH, '');
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
@ -208,6 +208,8 @@ export const appStateModule = {
|
||||
state.appState.isAGDatePickerShown = false;
|
||||
state.appState.isChartsDatePickerShown = false;
|
||||
state.appState.isBucketNamesDropdownShown = false;
|
||||
},
|
||||
[APP_STATE_MUTATIONS.CLEAR](state: State): void {
|
||||
state.appState.isAddTeamMembersModalShown = false;
|
||||
state.appState.isEditProfileModalShown = false;
|
||||
state.appState.isChangePasswordModalShown = false;
|
||||
@ -407,6 +409,10 @@ export const appStateModule = {
|
||||
[APP_STATE_ACTIONS.CLOSE_POPUPS]: function ({ commit }: AppContext): void {
|
||||
commit(APP_STATE_MUTATIONS.CLOSE_ALL);
|
||||
},
|
||||
[APP_STATE_ACTIONS.CLEAR]: function ({ commit }: AppContext): void {
|
||||
commit(APP_STATE_MUTATIONS.CLOSE_ALL);
|
||||
commit(APP_STATE_MUTATIONS.CLEAR);
|
||||
},
|
||||
[APP_STATE_ACTIONS.CHANGE_STATE]: function ({ commit }: AppContext, newFetchState: AppState): void {
|
||||
commit(APP_STATE_MUTATIONS.CHANGE_STATE, newFetchState);
|
||||
},
|
||||
|
@ -49,6 +49,7 @@ export const APP_STATE_MUTATIONS = {
|
||||
SHOW_DELETE_PAYMENT_METHOD_POPUP: 'SHOW_DELETE_PAYMENT_METHOD_POPUP',
|
||||
SHOW_SET_DEFAULT_PAYMENT_METHOD_POPUP: 'SHOW_SET_DEFAULT_PAYMENT_METHOD_POPUP',
|
||||
CLOSE_ALL: 'CLOSE_ALL',
|
||||
CLEAR: 'CLEAR_APPSTATE',
|
||||
CLOSE_BILLING_NOTIFICATION: 'closeBillingNotification',
|
||||
CHANGE_STATE: 'CHANGE_STATE',
|
||||
TOGGLE_PAYMENT_SELECTION: 'TOGGLE_PAYMENT_SELECTION',
|
||||
|
@ -23,6 +23,7 @@ export const APP_STATE_ACTIONS = {
|
||||
SHOW_DELETE_PAYMENT_METHOD_POPUP: 'showDeletePaymentMethodPopup',
|
||||
CLOSE_DELETE_PAYMENT_METHOD_POPUP: 'closeDeletePaymentMethodPopup',
|
||||
CLOSE_POPUPS: 'closePopups',
|
||||
CLEAR: 'clearAppstate',
|
||||
CHANGE_STATE: 'changeFetchState',
|
||||
TOGGLE_PAYMENT_SELECTION: 'TOGGLE_PAYMENT_SELECTION',
|
||||
SET_SATELLITE_NAME: 'SET_SATELLITE_NAME',
|
||||
|
@ -515,7 +515,7 @@ export default class DashboardArea extends Vue {
|
||||
this.$store.dispatch(NOTIFICATION_ACTIONS.CLEAR),
|
||||
this.$store.dispatch(BUCKET_ACTIONS.CLEAR),
|
||||
this.$store.dispatch(OBJECTS_ACTIONS.CLEAR),
|
||||
this.$store.dispatch(APP_STATE_ACTIONS.CLOSE_POPUPS),
|
||||
this.$store.dispatch(APP_STATE_ACTIONS.CLEAR),
|
||||
this.$store.dispatch(PAYMENTS_ACTIONS.CLEAR_PAYMENT_INFO),
|
||||
this.$store.dispatch(AB_TESTING_ACTIONS.RESET),
|
||||
this.$store.dispatch('files/clear'),
|
||||
|
Loading…
Reference in New Issue
Block a user