revert: remove logout button; auto login at webapp signin page

pull/18706/head
NFish 1 year ago
parent dbd139a696
commit 33cde0cee6

@ -8,7 +8,6 @@ import cn from '@/utils/classnames'
import Toast from '@/app/components/base/toast' import Toast from '@/app/components/base/toast'
import { fetchWebOAuth2SSOUrl, fetchWebOIDCSSOUrl, fetchWebSAMLSSOUrl } from '@/service/share' import { fetchWebOAuth2SSOUrl, fetchWebOIDCSSOUrl, fetchWebSAMLSSOUrl } from '@/service/share'
import { setAccessToken } from '@/app/components/share/utils' import { setAccessToken } from '@/app/components/share/utils'
import Button from '@/app/components/base/button'
import { useGlobalPublicStore } from '@/context/global-public-context' import { useGlobalPublicStore } from '@/context/global-public-context'
import { SSOProtocol } from '@/types/feature' import { SSOProtocol } from '@/types/feature'
import Loading from '@/app/components/base/loading' import Loading from '@/app/components/base/loading'
@ -97,10 +96,11 @@ const WebSSOForm: FC = () => {
if (systemFeatures.webapp_auth.enabled) { if (systemFeatures.webapp_auth.enabled) {
if (systemFeatures.webapp_auth.allow_sso) { if (systemFeatures.webapp_auth.allow_sso) {
handleSSOLogin()
return ( return (
<div className="flex items-center justify-center h-full"> <div className="flex items-center justify-center h-full">
<div className={cn('flex flex-col items-center w-full grow justify-center', 'px-6', 'md:px-[108px]')}> <div className={cn('flex flex-col items-center w-full grow justify-center', 'px-6', 'md:px-[108px]')}>
<Button variant='primary' onClick={() => { handleSSOLogin() }}>{t('login.withSSO')}</Button> <Loading />
</div> </div>
</div> </div>
) )

@ -83,7 +83,7 @@ const MenuDropdown: FC<Props> = ({
}} }}
className='system-md-regular cursor-pointer rounded-lg px-3 py-1.5 text-text-secondary hover:bg-state-base-hover' className='system-md-regular cursor-pointer rounded-lg px-3 py-1.5 text-text-secondary hover:bg-state-base-hover'
>{t('common.userProfile.about')}</div> >{t('common.userProfile.about')}</div>
{!hideLogout && ( {false && (
<> <>
<Divider /> <Divider />
<div <div

Loading…
Cancel
Save