Compare commits

..

No commits in common. "a092132b9f6040ca6a62306a6314213826faf921" and "a0964efa08a9fe7272f9b47859908115059e16dd" have entirely different histories.

3 changed files with 5 additions and 11 deletions

View File

@ -2,13 +2,12 @@ import { useContext } from 'react'
import { useMessage } from '@/hooks/useMessage'
import { useForm } from 'react-hook-form'
import { sessionStore } from '@/store/commonAtom'
import { useRecoilState, useRecoilValue } from 'recoil'
import { useRecoilValue, useRecoilState } from 'recoil'
import { useAxios } from '@/hooks/useAxios'
import { globalLocaleStore } from '@/store/localeAtom'
import { login, logout, setSession } from '@/lib/authActions'
import { logout, setSession, login } from '@/lib/authActions'
import { useSwal } from '@/hooks/useSwal'
import { QcastContext } from '@/app/QcastProvider'
import { useRouter } from 'next/navigation'
export default function ChangePasswordPop(props) {
const globalLocaleState = useRecoilValue(globalLocaleStore)
@ -19,7 +18,6 @@ export default function ChangePasswordPop(props) {
const { patch } = useAxios(globalLocaleState)
const { getMessage } = useMessage()
const [sessionState, setSessionState] = useRecoilState(sessionStore)
const router = useRouter()
const formInitValue = {
password1: '',
password2: '',
@ -130,14 +128,12 @@ export default function ChangePasswordPop(props) {
} else {
setIsGlobalLoading(false)
logout()
router.replace('/login', undefined, { shallow: true })
console.log('code not 200 error')
}
})
.catch((error) => {
setIsGlobalLoading(false)
logout()
router.replace('/login', undefined, { shallow: true })
console.log('catch::::::::', error)
})
}
@ -211,7 +207,6 @@ export default function ChangePasswordPop(props) {
className="btn-origin grey"
onClick={() => {
logout()
router.replace('/login', undefined, { shallow: true })
}}
>
{getMessage('main.popup.login.btn2')}

View File

@ -3094,7 +3094,7 @@ export const useTrestle = () => {
)
}
if (!halfBottomRightModule) {
halfBottomRightPoint = { x: x + w, y: y + height / 2 }
halfBottomRightPoint = { x: x + w, y: y - height / 2 }
halfBottomRightModule = centerPoints.find(
(centerPoint) => Math.abs(centerPoint.x - halfBottomRightPoint.x) < maxX && Math.abs(centerPoint.y - halfBottomRightPoint.y) < maxY,
)

View File

@ -10,7 +10,7 @@ import {
} from '@/store/canvasAtom'
import { QLine } from '@/components/fabric/QLine'
import { basicSettingState } from '@/store/settingAtom'
import { calcLineActualSizeByLineLength, calcLinePlaneSize } from '@/util/qpolygon-utils'
import { calcLineActualSizeByLineLength } from '@/util/qpolygon-utils'
import { getDegreeByChon } from '@/util/canvas-util'
import { useText } from '@/hooks/useText'
import { fontSelector } from '@/store/fontAtom'
@ -31,7 +31,6 @@ export const useLine = () => {
const addLine = (points = [], options) => {
const line = new QLine(points, {
...options,
attributes: {},
fontSize: lengthText.fontSize.value,
fontFamily: lengthText.fontFamily.value,
})
@ -39,7 +38,7 @@ export const useLine = () => {
if (line.length < 1) {
return null
}
line.attributes.planeSize = calcLinePlaneSize(line)
canvas?.add(line)
return line
}