Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit85cd8e9

Browse files
committed
Remove reload and use link for new tab
1 parent35f6d0e commit85cd8e9

File tree

1 file changed

+7
-28
lines changed

1 file changed

+7
-28
lines changed

‎site/src/pages/TaskPage/TaskAppIframe.tsx

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,11 @@ import {
66
DropdownMenuItem,
77
DropdownMenuTrigger,
88
}from"components/DropdownMenu/DropdownMenu";
9-
import{
10-
EllipsisVertical,
11-
ExternalLinkIcon,
12-
HouseIcon,
13-
RotateCwIcon,
14-
}from"lucide-react";
15-
import{openAppInNewWindow}from"modules/apps/apps";
9+
import{EllipsisVertical,ExternalLinkIcon,HouseIcon}from"lucide-react";
1610
import{useAppLink}from"modules/apps/useAppLink";
1711
importtype{Task}from"modules/tasks/tasks";
1812
import{typeFC,useRef}from"react";
13+
import{LinkasRouterLink}from"react-router-dom";
1914
import{cn}from"utils/cn";
2015

2116
typeTaskAppIFrameProps={
@@ -64,20 +59,6 @@ export const TaskAppIFrame: FC<TaskAppIFrameProps> = ({
6459
return(
6560
<divclassName={cn([active ?"flex" :"hidden","w-full h-full flex-col"])}>
6661
<divclassName="bg-surface-tertiary flex items-center p-2 py-1 gap-1">
67-
<Button
68-
size="icon"
69-
variant="subtle"
70-
onClick={(e)=>{
71-
e.preventDefault();
72-
if(frameRef.current?.contentWindow){
73-
frameRef.current.contentWindow.location.reload();
74-
}
75-
}}
76-
>
77-
<RotateCwIcon/>
78-
<spanclassName="sr-only">Refresh</span>
79-
</Button>
80-
8162
<Button
8263
size="icon"
8364
variant="subtle"
@@ -104,13 +85,11 @@ export const TaskAppIFrame: FC<TaskAppIFrameProps> = ({
10485
</Button>
10586
</DropdownMenuTrigger>
10687
<DropdownMenuContentalign="end">
107-
<DropdownMenuItem
108-
onClick={()=>{
109-
openAppInNewWindow(frameSrc);
110-
}}
111-
>
112-
<ExternalLinkIcon/>
113-
Open app in new tab
88+
<DropdownMenuItemasChild>
89+
<RouterLinkto={frameSrc}target="_blank">
90+
<ExternalLinkIcon/>
91+
Open app in new tab
92+
</RouterLink>
11493
</DropdownMenuItem>
11594
</DropdownMenuContent>
11695
</DropdownMenu>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp