@@ -28,7 +28,7 @@ export const AiImage: FC<{
2828 const t = useT ( ) ;
2929 const { value, onChange } = props ;
3030 const [ loading , setLoading ] = useState ( false ) ;
31- const setLocked = useLaunchStore ( p => p . setLocked ) ;
31+ const setLocked = useLaunchStore ( ( p ) => p . setLocked ) ;
3232 const fetch = useFetch ( ) ;
3333 const generateImage = useCallback (
3434 ( type : string ) => async ( ) => {
@@ -59,7 +59,7 @@ ${type}
5959 ) ;
6060 return (
6161 < div className = "relative group" >
62- < Button
62+ < div
6363 { ...( value . length < 30
6464 ? {
6565 'data-tooltip-id' : 'tooltip' ,
@@ -68,13 +68,13 @@ ${type}
6868 }
6969 : { } ) }
7070 className = { clsx (
71- 'relative ms-[10px ] rounded-[4px] gap-[8px] !text-primary justify-center items-center flex border border-dashed border-newBgLineColor bg-newColColor' ,
72- value . length < 30 && 'opacity-25 '
71+ 'cursor-pointer h-[30px ] rounded-[6px] justify-center items-center flex bg-newColColor px-[8px] ' ,
72+ value . length < 30 && 'opacity-50 '
7373 ) }
7474 >
7575 { loading && (
7676 < div className = "absolute start-[50%] -translate-x-[50%]" >
77- < Loading height = { 30 } width = { 30 } type = "spin" color = "#fff" />
77+ < Loading height = { 15 } width = { 15 } type = "spin" color = "#fff" />
7878 </ div >
7979 ) }
8080 < div
@@ -86,24 +86,32 @@ ${type}
8686 < div >
8787 < svg
8888 xmlns = "http://www.w3.org/2000/svg"
89- width = "24 "
90- height = "24 "
91- viewBox = "0 0 24 24 "
89+ width = "16 "
90+ height = "16 "
91+ viewBox = "0 0 16 16 "
9292 fill = "none"
9393 >
94- < path
95- d = "M19.5 3H7.5C7.10218 3 6.72064 3.15804 6.43934 3.43934C6.15804 3.72064 6 4.10218 6 4.5V6H4.5C4.10218 6 3.72064 6.15804 3.43934 6.43934C3.15804 6.72064 3 7.10218 3 7.5V19.5C3 19.8978 3.15804 20.2794 3.43934 20.5607C3.72064 20.842 4.10218 21 4.5 21H16.5C16.8978 21 17.2794 20.842 17.5607 20.5607C17.842 20.2794 18 19.8978 18 19.5V18H19.5C19.8978 18 20.2794 17.842 20.5607 17.5607C20.842 17.2794 21 16.8978 21 16.5V4.5C21 4.10218 20.842 3.72064 20.5607 3.43934C20.2794 3.15804 19.8978 3 19.5 3ZM7.5 4.5H19.5V11.0044L17.9344 9.43875C17.6531 9.15766 17.2717 8.99976 16.8741 8.99976C16.4764 8.99976 16.095 9.15766 15.8137 9.43875L8.75344 16.5H7.5V4.5ZM16.5 19.5H4.5V7.5H6V16.5C6 16.8978 6.15804 17.2794 6.43934 17.5607C6.72064 17.842 7.10218 18 7.5 18H16.5V19.5ZM19.5 16.5H10.875L16.875 10.5L19.5 13.125V16.5ZM11.25 10.5C11.695 10.5 12.13 10.368 12.5 10.1208C12.87 9.87357 13.1584 9.52217 13.3287 9.11104C13.499 8.6999 13.5436 8.2475 13.4568 7.81105C13.37 7.37459 13.1557 6.97368 12.841 6.65901C12.5263 6.34434 12.1254 6.13005 11.689 6.04323C11.2525 5.95642 10.8001 6.00097 10.389 6.17127C9.97783 6.34157 9.62643 6.62996 9.37919 6.99997C9.13196 7.36998 9 7.80499 9 8.25C9 8.84674 9.23705 9.41903 9.65901 9.84099C10.081 10.2629 10.6533 10.5 11.25 10.5ZM11.25 7.5C11.3983 7.5 11.5433 7.54399 11.6667 7.6264C11.79 7.70881 11.8861 7.82594 11.9429 7.96299C11.9997 8.10003 12.0145 8.25083 11.9856 8.39632C11.9566 8.5418 11.8852 8.67544 11.7803 8.78033C11.6754 8.88522 11.5418 8.95665 11.3963 8.98559C11.2508 9.01453 11.1 8.99968 10.963 8.94291C10.8259 8.88614 10.7088 8.79001 10.6264 8.66668C10.544 8.54334 10.5 8.39834 10.5 8.25C10.5 8.05109 10.579 7.86032 10.7197 7.71967C10.8603 7.57902 11.0511 7.5 11.25 7.5Z"
96- fill = "currentColor"
97- />
94+ < g clip-path = "url(#clip0_2352_53053)" >
95+ < path
96+ d = "M8.33333 2.00033H5.2C4.07989 2.00033 3.51984 2.00033 3.09202 2.21831C2.71569 2.41006 2.40973 2.71602 2.21799 3.09234C2 3.52017 2 4.08022 2 5.20032V10.8003C2 11.9204 2 12.4805 2.21799 12.9083C2.40973 13.2846 2.71569 13.5906 3.09202 13.7823C3.51984 14.0003 4.07989 14.0003 5.2 14.0003H11.3333C11.9533 14.0003 12.2633 14.0003 12.5176 13.9322C13.2078 13.7472 13.7469 13.2081 13.9319 12.518C14 12.2636 14 11.9536 14 11.3337M7 5.66699C7 6.40337 6.40305 7.00033 5.66667 7.00033C4.93029 7.00033 4.33333 6.40337 4.33333 5.66699C4.33333 4.93061 4.93029 4.33366 5.66667 4.33366C6.40305 4.33366 7 4.93061 7 5.66699ZM9.99336 7.94576L4.3541 13.0724C4.03691 13.3607 3.87831 13.5049 3.86429 13.6298C3.85213 13.738 3.89364 13.8454 3.97546 13.9173C4.06985 14.0003 4.28419 14.0003 4.71286 14.0003H10.9707C11.9301 14.0003 12.4098 14.0003 12.7866 13.8391C13.2596 13.6368 13.6365 13.2599 13.8388 12.7869C14 12.4101 14 11.9304 14 10.971C14 10.6482 14 10.4867 13.9647 10.3364C13.9204 10.1475 13.8353 9.97056 13.7155 9.81792C13.6202 9.69646 13.4941 9.59562 13.242 9.39396L11.3772 7.9021C11.1249 7.70026 10.9988 7.59935 10.8599 7.56373C10.7374 7.53234 10.6086 7.53641 10.4884 7.57545C10.352 7.61975 10.2324 7.72842 9.99336 7.94576ZM13 1.01074L12.5932 1.82425C12.4556 2.09958 12.3868 2.23724 12.2948 2.35653C12.2132 2.46238 12.1183 2.55728 12.0125 2.63887C11.8932 2.73083 11.7555 2.79966 11.4802 2.93732L10.6667 3.34408L11.4802 3.75083C11.7555 3.88849 11.8932 3.95732 12.0125 4.04928C12.1183 4.13087 12.2132 4.22577 12.2948 4.33162C12.3868 4.45091 12.4556 4.58857 12.5932 4.8639L13 5.67741L13.4068 4.8639C13.5444 4.58857 13.6132 4.45091 13.7052 4.33162C13.7868 4.22577 13.8817 4.13087 13.9875 4.04928C14.1068 3.95732 14.2445 3.88849 14.5198 3.75083L15.3333 3.34408L14.5198 2.93732C14.2445 2.79966 14.1068 2.73083 13.9875 2.63887C13.8817 2.55728 13.7868 2.46238 13.7052 2.35653C13.6132 2.23724 13.5444 2.09958 13.4068 1.82425L13 1.01074Z"
97+ stroke = "currentColor"
98+ strokeWidth = "1.2"
99+ strokeLinecap = "round"
100+ strokeLinejoin = "round"
101+ />
102+ </ g >
103+ < defs >
104+ < clipPath id = "clip0_2352_53053" >
105+ < rect width = "16" height = "16" fill = "currentColor" />
106+ </ clipPath >
107+ </ defs >
98108 </ svg >
99109 </ div >
100- < div className = "text-[12px] font-[500] !text-current" >
101- { t ( 'ai' , 'AI' ) } Image
102- </ div >
110+ < div className = "text-[10px] font-[600] iconBreak:hidden block" > { t ( 'ai' , 'AI' ) } Image</ div >
103111 </ div >
104- </ Button >
112+ </ div >
105113 { value . length >= 30 && ! loading && (
106- < div className = "text-[12px] ms-[10px] - mt-[10px] w-[200px] absolute top -[100%] z-[500] start-0 hidden group-hover:block" >
114+ < div className = "text-[12px] - mt-[10px] w-[200px] absolute bottom -[100%] z-[500] start-0 hidden group-hover:block" >
107115 < ul className = "cursor-pointer rounded-[4px] border border-dashed mt-[3px] p-[5px] border-newBgLineColor bg-newColColor" >
108116 { list . map ( ( p ) => (
109117 < li onClick = { generateImage ( p ) } key = { p } className = "hover:bg-sixth" >
0 commit comments