Skip to content

Commit

Permalink
Merge pull request #3704 from illacloud/Release/4.5.4
Browse files Browse the repository at this point in the history
Release/4.5.4
  • Loading branch information
Wangtaofeng authored Feb 18, 2024
2 parents a5c7421 + 085c93c commit 8cc2b71
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 45 deletions.
5 changes: 0 additions & 5 deletions README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,7 @@ ILLA CLI 使您能够以超乎想象的速度部署 ILLA Builder。 [单击此

加入微信群:

<<<<<<< HEAD
![img_v3_0286_e3c1da11-83a3-46bc-bea1-eb11228e6c8h](https://github.com/illacloud/illa-builder/assets/73595134/81fdb2bc-61b9-474c-b385-556dfc13c274)
=======
![IMG_5468](https://github.com/illacloud/illa-builder/assets/112603073/bbdc47f4-97bd-4258-bc89-893ce28cbe53)

>>>>>>> beta


Discord与Github社区入口
Expand Down
2 changes: 1 addition & 1 deletion apps/builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"private": true,
"author": "ILLA Cloud <[email protected]>",
"license": "Apache-2.0",
"version": "4.5.3",
"version": "4.5.4",
"scripts": {
"dev": "vite --strictPort --force",
"build-cloud": "NODE_OPTIONS=--max-old-space-size=12288 vite build --mode cloud",
Expand Down
1 change: 0 additions & 1 deletion apps/builder/src/page/AI/AIAgent/aiagent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,6 @@ export const AIAgent: FC = () => {
agentInfo,
variableKeyMapInputNodeDisplayName,
)
// TODO: need add batch creation
await createAction(appInfoResp.data.appId, agentActionInfo)
window.open(
`${getILLABuilderURL(window.customDomain)}/${teamIdentifier}/app/${
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
INIT_ACTION_ADVANCED_CONFIG,
INIT_ACTION_MOCK_CONFIG,
actionItemInitial,
generateBaseActionItem,
getInitialContent,
} from "@illa-public/public-configs"
import {
Expand Down Expand Up @@ -165,21 +166,15 @@ export const ActionListWithNewButton: FC<ListWithNewButtonProps> = (props) => {
dispatch(configActions.changeSelectedAction(createActionData))
break
}
// TODO: WTF add new method
case "illadrive": {
const displayName = DisplayNameGenerator.generateDisplayName(type)
const initialContent = getInitialContent(type)
const data: Omit<ActionItem<ActionContent>, "actionID"> = {
const baseData = generateBaseActionItem(displayName, "")
const data = {
...baseData,
actionType: type,
displayName,
content: initialContent,
isVirtualResource: true,
config: {
public: false,
advancedConfig: INIT_ACTION_ADVANCED_CONFIG,
mockConfig: INIT_ACTION_MOCK_CONFIG,
},
...actionItemInitial,
}

if (isGuideMode) {
Expand Down
8 changes: 2 additions & 6 deletions apps/builder/src/services/apps.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { fetchBatchCreateAction } from "@illa-public/create-app"
import { builderRequest } from "@illa-public/illa-net"
import { AppInfoShape, ComponentTreeNode } from "@illa-public/public-types"
import { createAction } from "@/api/actions"
import { DeployResp } from "@/page/App/Module/PageNavBar/resp"
import { CurrentAppResp } from "@/page/App/resp/currentAppResp"
import { getActionList } from "@/redux/currentApp/action/actionSelector"
Expand Down Expand Up @@ -205,11 +205,7 @@ export const forkCurrentApp = async (appName: string) => {
buildTreeByMapNode("root", componentsMap),
)
// fork actions
await Promise.all(
actions.map((data) => {
return createAction(appId, data)
}),
)
await fetchBatchCreateAction(getCurrentTeamID()!, appId, actions)
return appId
}

Expand Down
26 changes: 4 additions & 22 deletions apps/builder/src/widgetLibrary/ImageWidget/image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,12 @@ import {
} from "@/widgetLibrary/ImageWidget/style"
import { AutoHeightContainer } from "@/widgetLibrary/PublicSector/AutoHeightContainer"
import { TooltipWrapper } from "@/widgetLibrary/PublicSector/TooltipWrapper"
import {
DynamicHeight,
ImageWidgetProps,
ObjectFit,
WrappedImageProps,
} from "./interface"
import { DynamicHeight, ImageWidgetProps, WrappedImageProps } from "./interface"

const getHeight = (
dynamicHeight: DynamicHeight,
aspectRatio: number,
width: number,
objectFit?: ObjectFit,
) => {
if (dynamicHeight === "auto") {
if (aspectRatio && aspectRatio > 0) {
Expand All @@ -36,9 +30,7 @@ const getHeight = (
return `${width}px`
}
} else {
return dynamicHeight === "fixed" || objectFit === "contain"
? "100%"
: "auto"
return dynamicHeight === "fixed" ? "100%" : "auto"
}
}

Expand All @@ -62,19 +54,9 @@ export const WrappedImage: FC<WrappedImageProps> = (props) => {
? "100%"
: "auto"

const height = getHeight(
dynamicHeight,
aspectRatio,
imageBouds.width,
objectFit,
)
const height = getHeight(dynamicHeight, aspectRatio, imageBouds.width)

const finalObjectFit =
dynamicHeight === "auto"
? "cover"
: dynamicHeight === "fixed" && objectFit === "contain"
? undefined
: "cover"
const finalObjectFit = dynamicHeight === "auto" ? "cover" : objectFit

return (
<Image
Expand Down
2 changes: 1 addition & 1 deletion apps/builder/src/widgetLibrary/MenuWidget/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export function applyMenuBrandContainerStyle(mode: MenuMode): SerializedStyles {
display: inline-flex;
flex-direction: row;
align-items: center;
padding: ${mode === "horizontal" ? "0px" : "16px"} 24px;
padding: ${mode === "horizontal" ? "0px" : "16px"} 16px;
padding-bottom: ${mode === "horizontal" ? "0px" : "8px"};
margin-right: ${mode === "horizontal" ? "16px" : "0px"};
`
Expand Down

0 comments on commit 8cc2b71

Please sign in to comment.