Skip to content
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

fix(web): fix cron example & fix function page layout & hide email #1521

Merged
merged 1 commit into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 changes: 1 addition & 1 deletion web/public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@
},
"TriggerPanel": {
"AddTrigger": "Add Trigger",
"CornTip": "Example: 0/1 * * * * ? \nIndicates that the task is executed every 1 second",
"CornTip": "Example: * * * * * \nIndicates that the task is executed every 1 minute",
"DeleteConfirm": "Are you sure you want to delete this trigger",
"Express": "expression",
"Function": "Correlation function",
Expand Down
2 changes: 1 addition & 1 deletion web/public/locales/zh-CN/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@
},
"TriggerPanel": {
"AddTrigger": "新建触发器",
"CornTip": "例:0/1 * * * * \n表示每 1 秒执行任务",
"CornTip": "例: * * * * * \n表示每 1 分钟执行任务",
"DeleteConfirm": "确定删除该触发器吗",
"Express": "表达式",
"Function": "关联函数",
Expand Down
2 changes: 1 addition & 1 deletion web/public/locales/zh/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@
},
"TriggerPanel": {
"AddTrigger": "新建触发器",
"CornTip": "例:0/1 * * * * \n表示每 1 秒执行任务",
"CornTip": "例 * * * * * \n表示每 1 分钟执行任务",
"DeleteConfirm": "确定删除该触发器吗",
"Express": "表达式",
"Function": "关联函数",
Expand Down
75 changes: 38 additions & 37 deletions web/src/layouts/Function.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,43 +48,44 @@ export default function FunctionLayout() {
}, [currentApp, init, pageId, setCurrentPage]);

return (
<div>
<div
style={{
height: "100vh",
overflow: "hidden",
position: "relative",
}}
>
{loading || !currentApp?.appid ? (
<Center height={200}>
<Spinner />
</Center>
) : (
<>
{currentApp?.phase !== APP_PHASE_STATUS.Started &&
currentApp?.phase !== APP_PHASE_STATUS.Stopped &&
currentApp?.phase !== APP_PHASE_STATUS.Deleted ? (
<div
className={clsx(
"absolute bottom-0 left-0 right-0 top-0 z-[999] flex flex-col items-center justify-center opacity-70 ",
darkMode ? "bg-lafDark-100" : "bg-lafWhite-600",
)}
>
<Spinner
thickness="4px"
speed="0.65s"
emptyColor="gray.200"
color="blue.500"
size="xl"
/>
<Badge className="mt-4">{currentApp.phase}...</Badge>
</div>
) : null}
<Outlet />
</>
)}
</div>
<div
style={{
overflow: "hidden",
position: "absolute",
top: 0,
left: 0,
right: 0,
bottom: 0,
}}
>
{loading || !currentApp?.appid ? (
<Center height={200}>
<Spinner />
</Center>
) : (
<>
{currentApp?.phase !== APP_PHASE_STATUS.Started &&
currentApp?.phase !== APP_PHASE_STATUS.Stopped &&
currentApp?.phase !== APP_PHASE_STATUS.Deleted ? (
<div
className={clsx(
"absolute bottom-0 left-0 right-0 top-0 z-[999] flex flex-col items-center justify-center opacity-70 ",
darkMode ? "bg-lafDark-100" : "bg-lafWhite-600",
)}
>
<Spinner
thickness="4px"
speed="0.65s"
emptyColor="gray.200"
color="blue.500"
size="xl"
/>
<Badge className="mt-4">{currentApp.phase}...</Badge>
</div>
) : null}
<Outlet />
</>
)}
</div>
);
}
4 changes: 2 additions & 2 deletions web/src/pages/app/setting/UserInfo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export default function UserInfo() {
</span>
</div>
)}
<div className="flex flex-col pb-4">
{/* <div className="flex flex-col pb-4">
<span className={clsx("pb-3 text-xl", !darkMode && "text-grayModern-900")}>
{t("SettingPanel.Email")}
</span>
Expand All @@ -205,7 +205,7 @@ export default function UserInfo() {
{t("UserInfo.Change")} <ChevronRightIcon boxSize={5} />
</span>
</span>
</div>
</div> */}
</Box>
</>
)}
Expand Down