fix: moved change password modal in global modals

This commit is contained in:
Shariq Ansari 2025-06-19 15:07:57 +05:30
parent 7f1db0b444
commit dc82f837aa
4 changed files with 13 additions and 11 deletions

View File

@ -172,6 +172,7 @@ import {
import { usersStore } from '@/stores/users' import { usersStore } from '@/stores/users'
import { sessionStore } from '@/stores/session' import { sessionStore } from '@/stores/session'
import { showSettings, activeSettingsPage } from '@/composables/settings' import { showSettings, activeSettingsPage } from '@/composables/settings'
import { showChangePasswordModal } from '@/composables/modals'
import { FeatherIcon, call } from 'frappe-ui' import { FeatherIcon, call } from 'frappe-ui'
import { import {
SignupBanner, SignupBanner,
@ -329,8 +330,7 @@ const steps = reactive([
completed: false, completed: false,
onClick: () => { onClick: () => {
minimize.value = true minimize.value = true
showSettings.value = true showChangePasswordModal.value = true
activeSettingsPage.value = 'Profile'
}, },
}, },
{ {

View File

@ -16,9 +16,14 @@
v-model="showAddressModal" v-model="showAddressModal"
v-bind="addressProps" v-bind="addressProps"
/> />
<ChangePasswordModal
v-if="showChangePasswordModal"
v-model="showChangePasswordModal"
/>
<AboutModal v-model="showAboutModal" /> <AboutModal v-model="showAboutModal" />
</template> </template>
<script setup> <script setup>
import ChangePasswordModal from '@/components/Modals/ChangePasswordModal.vue'
import CreateDocumentModal from '@/components/Modals/CreateDocumentModal.vue' import CreateDocumentModal from '@/components/Modals/CreateDocumentModal.vue'
import QuickEntryModal from '@/components/Modals/QuickEntryModal.vue' import QuickEntryModal from '@/components/Modals/QuickEntryModal.vue'
import AddressModal from '@/components/Modals/AddressModal.vue' import AddressModal from '@/components/Modals/AddressModal.vue'
@ -34,6 +39,7 @@ import {
quickEntryProps, quickEntryProps,
showAddressModal, showAddressModal,
addressProps, addressProps,
showAboutModal showAboutModal,
showChangePasswordModal,
} from '@/composables/modals' } from '@/composables/modals'
</script> </script>

View File

@ -66,10 +66,6 @@
icon-left="lock" icon-left="lock"
@click="showChangePasswordModal = true" @click="showChangePasswordModal = true"
/> />
<ChangePasswordModal
v-if="showChangePasswordModal"
v-model="showChangePasswordModal"
/>
</div> </div>
<div class="flex flex-col gap-4"> <div class="flex flex-col gap-4">
<div class="flex justify-between gap-4"> <div class="flex justify-between gap-4">
@ -102,9 +98,9 @@
</template> </template>
<script setup> <script setup>
import CameraIcon from '@/components/Icons/CameraIcon.vue' import CameraIcon from '@/components/Icons/CameraIcon.vue'
import ChangePasswordModal from '@/components/Modals/ChangePasswordModal.vue'
import { usersStore } from '@/stores/users' import { usersStore } from '@/stores/users'
import { validateIsImageFile } from '@/utils' import { validateIsImageFile } from '@/utils'
import { showChangePasswordModal } from '@/composables/modals'
import { import {
Dropdown, Dropdown,
FileUploader, FileUploader,
@ -118,8 +114,6 @@ const { getUser, users } = usersStore()
const user = computed(() => getUser() || {}) const user = computed(() => getUser() || {})
const showChangePasswordModal = ref(false)
const profile = ref({}) const profile = ref({})
const error = ref('') const error = ref('')

View File

@ -6,4 +6,6 @@ export const quickEntryProps = ref({});
export const showAddressModal = ref(false); export const showAddressModal = ref(false);
export const addressProps = ref({}); export const addressProps = ref({});
export const showAboutModal = ref(false); export const showAboutModal = ref(false);
export const showChangePasswordModal = ref(false);