Skip to content

Commit

Permalink
fix(web): fix cron example & fix function page layout & hide email (l…
Browse files Browse the repository at this point in the history
  • Loading branch information
newfish-cmyk authored Sep 7, 2023
1 parent 46e412b commit 4ef265c
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 42 deletions.
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

0 comments on commit 4ef265c

Please sign in to comment.