Skip to content

Commit 9f31832

Browse files
committed
fix: clean up code formatting and adjust user model is_active field to null
1 parent 83a53e6 commit 9f31832

File tree

2 files changed

+29
-24
lines changed

2 files changed

+29
-24
lines changed

ui/src/views/chat/user-login/index.vue

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
class="mr-8"
1010
style="background: none"
1111
>
12-
<img :src="chatUser.chat_profile?.icon" alt="" />
12+
<img :src="chatUser.chat_profile?.icon" alt=""/>
1313
</el-avatar>
14-
<LogoIcon v-else height="32px" class="mr-8" />
14+
<LogoIcon v-else height="32px" class="mr-8"/>
1515
<h1>{{ chatUser.chat_profile?.application_name }}</h1>
1616
</div>
1717
<!-- 移动端头部标题-->
@@ -25,9 +25,9 @@
2525
:size="32"
2626
style="background: none"
2727
>
28-
<img :src="chatUser.chat_profile?.icon" alt="" />
28+
<img :src="chatUser.chat_profile?.icon" alt=""/>
2929
</el-avatar>
30-
<LogoIcon v-else height="32px" />
30+
<LogoIcon v-else height="32px"/>
3131
</div>
3232

3333
<h4
@@ -118,7 +118,7 @@
118118
</el-button>
119119
</div>
120120
<div v-if="showQrCodeTab">
121-
<QrCodeTab :tabs="orgOptions" />
121+
<QrCodeTab :tabs="orgOptions"/>
122122
</div>
123123
<div class="login-gradient-divider lighter mt-24" v-if="modeList.length > 1">
124124
<span>{{ $t('views.login.moreMethod') }}</span>
@@ -137,7 +137,7 @@
137137
'font-size': item === 'OAUTH2' ? '8px' : '10px',
138138
color: theme.themeInfo?.theme,
139139
}"
140-
>{{ item }}</span
140+
>{{ item }}</span
141141
>
142142
</el-button>
143143
<el-button
@@ -147,7 +147,7 @@
147147
class="login-button-circle color-secondary"
148148
@click="changeMode('QR_CODE')"
149149
>
150-
<img src="@/assets/icon_qr_outlined.svg" width="25px" />
150+
<img src="@/assets/icon_qr_outlined.svg" width="25px"/>
151151
</el-button>
152152
<el-button
153153
v-if="item === 'LOCAL' && loginMode != 'LOCAL'"
@@ -165,31 +165,32 @@
165165
</UserLoginLayout>
166166
</template>
167167
<script setup lang="ts">
168-
import { onMounted, ref, onBeforeMount, computed } from 'vue'
169-
import { useRoute, useRouter } from 'vue-router'
170-
import type { FormInstance, FormRules } from 'element-plus'
171-
import type { LoginRequest } from '@/api/type/login'
168+
import {onMounted, ref, onBeforeMount, computed} from 'vue'
169+
import {useRoute, useRouter} from 'vue-router'
170+
import type {FormInstance, FormRules} from 'element-plus'
171+
import type {LoginRequest} from '@/api/type/login'
172172
import UserLoginLayout from '@/layout/login-layout/UserLoginLayout.vue'
173173
import loginApi from '@/api/chat/chat.ts'
174-
import { t } from '@/locales'
174+
import {t} from '@/locales'
175175
import useResize from '@/layout/hooks/useResize'
176176
import useStore from '@/stores'
177-
import { useI18n } from 'vue-i18n'
177+
import {useI18n} from 'vue-i18n'
178178
import QrCodeTab from '@/views/chat/user-login/scanCompinents/QrCodeTab.vue'
179-
import { MsgConfirm, MsgError } from '@/utils/message.ts'
179+
import {MsgConfirm, MsgError} from '@/utils/message.ts'
180180
import PasswordAuth from '@/views/chat/auth/component/password.vue'
181-
import { isAppIcon } from '@/utils/common'
181+
import {isAppIcon} from '@/utils/common'
182+
182183
useResize()
183184
const router = useRouter()
184185
185-
const { theme, chatUser, common } = useStore()
186-
const { locale } = useI18n({ useScope: 'global' })
186+
const {theme, chatUser, common} = useStore()
187+
const {locale} = useI18n({useScope: 'global'})
187188
const loading = ref<boolean>(false)
188189
const route = useRoute()
189190
const identifyCode = ref<string>('')
190191
const {
191-
params: { accessToken },
192-
query: { mode },
192+
params: {accessToken},
193+
query: {mode},
193194
} = route as any
194195
195196
const isPc = computed(() => {
@@ -241,15 +242,15 @@ const loginHandle = () => {
241242
chatUser.ldapLogin(loginForm.value).then((ok) => {
242243
router.push({
243244
name: 'chat',
244-
params: { accessToken: chatUser.accessToken },
245+
params: {accessToken: chatUser.accessToken},
245246
query: route.query,
246247
})
247248
})
248249
} else {
249250
chatUser.login(loginForm.value).then((ok) => {
250251
router.push({
251252
name: 'chat',
252-
params: { accessToken: chatUser.accessToken },
253+
params: {accessToken: chatUser.accessToken},
253254
query: route.query,
254255
})
255256
})
@@ -330,7 +331,8 @@ function redirectAuth(authType: string, needMessage: boolean = false) {
330331
.then(() => {
331332
window.location.href = url
332333
})
333-
.catch(() => {})
334+
.catch(() => {
335+
})
334336
} else {
335337
console.log('url', url)
336338
window.location.href = url
@@ -378,7 +380,7 @@ onBeforeMount(() => {
378380
// modeList需要去掉lark wecom dingtalk
379381
modeList.value = modeList.value.filter((item) => !['lark', 'wecom', 'dingtalk'].includes(item))
380382
if (QrList.value.length > 0) {
381-
modeList.value.push('QR_CODE')
383+
modeList.value = ['QR_CODE', ...modeList.value]
382384
QrList.value.forEach((item) => {
383385
orgOptions.value.push({
384386
key: item,
@@ -409,12 +411,15 @@ onBeforeMount(() => {
409411
border-bottom: 1px solid var(--el-border-color);
410412
}
411413
}
414+
412415
.user-login-container {
413416
width: 480px;
417+
414418
.login-card {
415419
padding: 18px;
416420
}
417421
}
422+
418423
.login-gradient-divider {
419424
position: relative;
420425
text-align: center;

ui/src/views/system/user-manage/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ const search_form = ref<{
312312
username: '',
313313
nick_name: '',
314314
email: '',
315-
is_active: true,
315+
is_active: null,
316316
source: '',
317317
})
318318

0 commit comments

Comments
 (0)