Skip to content

Fix: new upgrade page #12417

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Mar 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
525bde2
fix: adjust cloud service
douxc Jan 3, 2025
47637da
wip: adjust self hosted page style
douxc Jan 6, 2025
e46a334
fix: new upgrade page
douxc Jan 7, 2025
ab2e69f
fix: plan item can not show all content if language is jp
douxc Jan 7, 2025
4f0ecdb
fix: use repeat-linear-gradient for GridMask to improve darkmode support
douxc Jan 7, 2025
508005b
fix: replace contact sales url address
douxc Jan 8, 2025
d5c31f8
fix: update billing i18n in setting modal
douxc Jan 8, 2025
a697bbd
fix: update i18n
douxc Jan 9, 2025
49415e5
fix: update Knowledge Request Ratelimit tooltip text
douxc Jan 14, 2025
066516b
fix: update document limit tooltip content
douxc Jan 14, 2025
ffa5af1
fix: supports number format
douxc Jan 22, 2025
3fcf7e8
fix: UI adjust
douxc Jan 22, 2025
10991cb
fix: update bill page background image
douxc Jan 23, 2025
c2671c1
fix: update bill page background opacity
douxc Jan 23, 2025
5d4e517
fix: update billing button disabled style
douxc Jan 23, 2025
278adbc
fix: update jp translate error
douxc Jan 23, 2025
5673f03
fix: update documentsRequestQuota value
douxc Jan 23, 2025
7f49f96
fix: update team members value
douxc Jan 23, 2025
aafab1b
fix: update sandbox log histroy value
douxc Jan 23, 2025
a4a4542
fix: update sandbox log history value in jp
douxc Jan 23, 2025
6e8601b
Merge branch 'main' into fix/adjust-price-frontend
douxc Feb 27, 2025
cf75fcd
fix: merge main
douxc Feb 27, 2025
1099027
Merge branch 'main' into fix/adjust-price-frontend
douxc Mar 5, 2025
2a1f848
fix: remove console.log
douxc Mar 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,146 changes: 2,146 additions & 0 deletions web/app/components/base/grid-mask/Grid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
77 changes: 5 additions & 72 deletions web/app/components/base/grid-mask/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { FC } from 'react'
import { useCallback, useEffect, useRef } from 'react'
import Style from './style.module.css'
import classNames from '@/utils/classnames'

type GridMaskProps = {
children: React.ReactNode
Expand All @@ -13,78 +14,10 @@ const GridMask: FC<GridMaskProps> = ({
canvasClassName,
gradientClassName,
}) => {
const canvasRef = useRef<HTMLCanvasElement | null>(null)
const ctxRef = useRef<CanvasRenderingContext2D | null>(null)
const initCanvas = () => {
const dpr = window.devicePixelRatio || 1

if (canvasRef.current) {
const { width: cssWidth, height: cssHeight } = canvasRef.current?.getBoundingClientRect()

canvasRef.current.width = dpr * cssWidth
canvasRef.current.height = dpr * cssHeight

const ctx = canvasRef.current.getContext('2d')
if (ctx) {
ctx.scale(dpr, dpr)
ctx.strokeStyle = '#D1E0FF'
ctxRef.current = ctx
}
}
}

const drawRecord = useCallback(() => {
const canvas = canvasRef.current!
const ctx = ctxRef.current!
const rowNumber = Number.parseInt(`${canvas.width / 24}`)
const colNumber = Number.parseInt(`${canvas.height / 24}`)

ctx.clearRect(0, 0, canvas.width, canvas.height)
ctx.beginPath()
for (let i = 0; i < rowNumber; i++) {
for (let j = 0; j < colNumber; j++) {
const x = i * 24
const y = j * 24
if (j === 0) {
ctx.moveTo(x, y + 2)
ctx.arc(x + 2, y + 2, 2, Math.PI, Math.PI * 1.5)
ctx.lineTo(x + 22, y)
ctx.arc(x + 22, y + 2, 2, Math.PI * 1.5, Math.PI * 2)
ctx.lineTo(x + 24, y + 22)
ctx.arc(x + 22, y + 22, 2, 0, Math.PI * 0.5)
ctx.lineTo(x + 2, y + 24)
ctx.arc(x + 2, y + 22, 2, Math.PI * 0.5, Math.PI)
}
else {
ctx.moveTo(x + 2, y)
ctx.arc(x + 2, y + 2, 2, Math.PI * 1.5, Math.PI, true)
ctx.lineTo(x, y + 22)
ctx.arc(x + 2, y + 22, 2, Math.PI, Math.PI * 0.5, true)
ctx.lineTo(x + 22, y + 24)
ctx.arc(x + 22, y + 22, 2, Math.PI * 0.5, 0, true)
ctx.lineTo(x + 24, y + 2)
ctx.arc(x + 22, y + 2, 2, 0, Math.PI * 1.5, true)
}
}
}
ctx.stroke()
ctx.closePath()
}, [])

const handleStartDraw = () => {
if (canvasRef.current && ctxRef.current)
drawRecord()
}

useEffect(() => {
initCanvas()
handleStartDraw()
}, [])

return (
<div className={`relative bg-components-panel-bg ${wrapperClassName}`}>
<canvas ref={canvasRef} className={`absolute inset-0 w-full h-full ${canvasClassName}`} />
<div className={`absolute w-full h-full z-[1] bg-gradient-to-b from-background-body to-background-gradient-mask-transparent rounded-lg ${gradientClassName}`} />
<div className={classNames('relative bg-saas-background', wrapperClassName)}>
<div className={classNames('absolute inset-0 w-full h-full z-0 opacity-70', canvasClassName, Style.gridBg)} />
<div className={classNames('absolute w-full h-full z-[1] bg-grid-mask-background rounded-lg', gradientClassName)} />
<div className='relative z-[2]'>{children}</div>
</div>
)
Expand Down
5 changes: 5 additions & 0 deletions web/app/components/base/grid-mask/style.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.gridBg{
background-image: url(./Grid.svg);
background-repeat: repeat;
background-position: 0 0;
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading