fix: TXT file correctly read and imported on desktop apps, closes #756 (#757)

This commit is contained in:
Huang Xin
2025-03-30 02:11:41 +08:00
committed by GitHub
parent 4acc0d8e12
commit ffd179bb06
23 changed files with 110 additions and 49 deletions
+14 -14
View File
@@ -21,7 +21,20 @@ const Popup = ({
}) => (
<div>
<div
className={`triangle text-base-300 absolute z-40 ${triangleClassName}`}
id='popup-container'
className={`bg-base-300 absolute rounded-lg font-sans shadow-xl ${className}`}
style={{
width: `${width}px`,
height: `${height}px`,
left: `${position ? position.point.x : -999}px`,
top: `${position ? position.point.y : -999}px`,
...additionalStyle,
}}
>
{children}
</div>
<div
className={`triangle text-base-300 absolute ${triangleClassName}`}
style={{
left:
trianglePosition?.dir === 'left'
@@ -65,19 +78,6 @@ const Popup = ({
: 'translateX(-50%)',
}}
/>
<div
id='popup-container'
className={`bg-base-300 absolute z-30 rounded-lg font-sans shadow-xl ${className}`}
style={{
width: `${width}px`,
height: `${height}px`,
left: `${position ? position.point.x : -999}px`,
top: `${position ? position.point.y : -999}px`,
...additionalStyle,
}}
>
{children}
</div>
</div>
);
+6 -1
View File
@@ -69,7 +69,12 @@ export const Toast = () => {
messageClass.current,
)}
>
{toastMessage}
{toastMessage.split('\n').map((line, idx) => (
<React.Fragment key={idx}>
{line || <>&nbsp;</>}
<br />
</React.Fragment>
))}
</span>
</div>
</div>