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

View File

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

View File

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

View File

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