Browse Source

fix: refactor user list

pull/6459/head
sreehari jayaraj 1 year ago
parent
commit
024e4f6ada
  1. 3
      packages/nc-gui/components/account/UserList.vue
  2. 2
      packages/nc-gui/components/dashboard/settings/AppStore.vue
  3. 17
      packages/nc-gui/pages/reset/[id].vue

3
packages/nc-gui/components/account/UserList.vue

@ -2,7 +2,7 @@
import { OrgUserRoles } from 'nocodb-sdk'
import type { OrgUserReqType, RequestParams, Roles, UserType } from 'nocodb-sdk'
import type { User } from '#imports'
import { extractSdkResponseErrorMsg, iconMap, useApi, useCopy, useDashboard, useNuxtApp } from '#imports'
import { extractSdkResponseErrorMsg, iconMap, useApi, useCopy, useDashboard, useDebounceFn, useNuxtApp } from '#imports'
const { api, isLoading } = useApi()
@ -329,7 +329,6 @@ const copyPasswordResetUrl = async (user: User) => {
</span>
</template>
</GeneralDeleteModal>
>>>>>>> 85fee1233 (feat: pagination)
<LazyAccountUsersModal :key="userMadalKey" :show="showUserModal" @closed="showUserModal = false" @reload="loadUsers" />
</div>

2
packages/nc-gui/components/dashboard/settings/AppStore.vue

@ -102,7 +102,7 @@ onMounted(async () => {
{{ `Click on confirm to reset ${pluginApp && pluginApp.title}` }}
</div>
<div class="flex mt-6 justify-center space-x-2">
<NcButton type="ghost" @click="showPluginUninstallModal = false"> {{ $t('general.cancel') }} </NcButton>
<NcButton type="secondary" @click="showPluginUninstallModal = false"> {{ $t('general.cancel') }} </NcButton>
<NcButton type="danger" @click="resetPlugin"> {{ $t('general.confirm') }} </NcButton>
</div>
</div>

17
packages/nc-gui/pages/reset/[id].vue

@ -1,6 +1,17 @@
<script setup lang="ts">
import { validatePassword } from 'nocodb-sdk'
import { definePageMeta, iconMap, reactive, ref, useApi } from '#imports'
import {
definePageMeta,
extractSdkResponseErrorMsg,
iconMap,
message,
reactive,
ref,
useApi,
useI18n,
useRoute,
useRouter,
} from '#imports'
definePageMeta({
requiresAuth: false,
@ -16,6 +27,8 @@ const form = reactive({
newPassword: '',
})
const { t } = useI18n()
const formValidator = ref()
async function resetPassword() {
@ -38,7 +51,7 @@ async function resetPassword() {
})
navigator.push(`/#/sigin`)
} catch (e: any) {
await extractSdkResponseErrorMsg(e)
message.error(await extractSdkResponseErrorMsg(e))
}
}

Loading…
Cancel
Save