Merge pull request 'dev' (#583) from dev into prd-deploy

Reviewed-on: #583
This commit is contained in:
qcast3 2026-01-15 18:34:18 +09:00
commit a092132b9f
3 changed files with 11 additions and 5 deletions

View File

@ -2,12 +2,13 @@ import { useContext } from 'react'
import { useMessage } from '@/hooks/useMessage'
import { useForm } from 'react-hook-form'
import { sessionStore } from '@/store/commonAtom'
import { useRecoilValue, useRecoilState } from 'recoil'
import { useRecoilState, useRecoilValue } from 'recoil'
import { useAxios } from '@/hooks/useAxios'
import { globalLocaleStore } from '@/store/localeAtom'
import { logout, setSession, login } from '@/lib/authActions'
import { login, logout, setSession } 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)
@ -18,6 +19,7 @@ export default function ChangePasswordPop(props) {
const { patch } = useAxios(globalLocaleState)
const { getMessage } = useMessage()
const [sessionState, setSessionState] = useRecoilState(sessionStore)
const router = useRouter()
const formInitValue = {
password1: '',
password2: '',
@ -128,12 +130,14 @@ 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)
})
}
@ -207,6 +211,7 @@ 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 } from '@/util/qpolygon-utils'
import { calcLineActualSizeByLineLength, calcLinePlaneSize } from '@/util/qpolygon-utils'
import { getDegreeByChon } from '@/util/canvas-util'
import { useText } from '@/hooks/useText'
import { fontSelector } from '@/store/fontAtom'
@ -31,6 +31,7 @@ export const useLine = () => {
const addLine = (points = [], options) => {
const line = new QLine(points, {
...options,
attributes: {},
fontSize: lengthText.fontSize.value,
fontFamily: lengthText.fontFamily.value,
})
@ -38,7 +39,7 @@ export const useLine = () => {
if (line.length < 1) {
return null
}
line.attributes.planeSize = calcLinePlaneSize(line)
canvas?.add(line)
return line
}