Skip to content

Commit

Permalink
fix(projects): Remove inop deploy option (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
mammerla authored Sep 16, 2024
1 parent df770c7 commit 1f3440c
Showing 1 changed file with 1 addition and 65 deletions.
66 changes: 1 addition & 65 deletions app/src/UX/ProjectEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ export default class ProjectEditor extends Component<IProjectEditorProps, IProje
this._handleConvertToClick = this._handleConvertToClick.bind(this);
this._handleDialogDataUpdated = this._handleDialogDataUpdated.bind(this);
this._handleGetShareableLinkClick = this._handleGetShareableLinkClick.bind(this);
this._handleWebLocalDeployClick = this._handleWebLocalDeployClick.bind(this);
this._handleChangeWorldSettingsClick = this._handleChangeWorldSettingsClick.bind(this);
this._handleDownloadMCWorldWithPacks = this._handleDownloadMCWorldWithPacks.bind(this);
this._handleDeployDownloadWorldWithPacks = this._handleDeployDownloadWorldWithPacks.bind(this);
Expand Down Expand Up @@ -224,7 +223,6 @@ export default class ProjectEditor extends Component<IProjectEditorProps, IProje
this._handleExportMenuOpen = this._handleExportMenuOpen.bind(this);
this._handleDeployMenuOpen = this._handleDeployMenuOpen.bind(this);
this._handleViewMenuOpen = this._handleViewMenuOpen.bind(this);
this._handleWebLocalDeployOK = this._handleWebLocalDeployOK.bind(this);
this._handleConvertOK = this._handleConvertOK.bind(this);
this._handleIntegrateItemOK = this._handleIntegrateItemOK.bind(this);
this._handleDeployWorldAndTestAssetsPackClick = this._handleDeployWorldAndTestAssetsPackClick.bind(this);
Expand Down Expand Up @@ -678,20 +676,6 @@ export default class ProjectEditor extends Component<IProjectEditorProps, IProje
}
}

private async _handleWebLocalDeployOK() {
this._handleDialogDone();

if (this.props.carto.activeMinecraft) {
const operId = await this.props.carto.notifyOperationStarted(
"Deploying project '" + this.props.project.name + "'..."
);

await this.props.carto.activeMinecraft.syncWithDeployment();

await this.props.carto.notifyOperationEnded(operId, "Deployed '" + this.props.project.name + "'.");
}
}

private async _handleIntegrateItemOK() {
this._handleDialogDone();

Expand Down Expand Up @@ -1628,42 +1612,6 @@ export default class ProjectEditor extends Component<IProjectEditorProps, IProje
}, 2);
}

private async _handleWebLocalDeployClick(e: SyntheticEvent | undefined, data: MenuItemProps | undefined) {
if (this.props.project == null || !data || !data.icon) {
return;
}

window.setTimeout(() => {
this.setState({
activeProjectItem: this.state.activeProjectItem,
tentativeProjectItem: this.state.tentativeProjectItem,
activeReference: this.state.activeReference,
menuState: this.state.menuState,
mode: this.state.mode,
viewMode: this.state.viewMode,
allInfoSet: this.props.project.infoSet,
allInfoSetGenerated: this.props.project.infoSet.completedGeneration,
displayFileView: this.state.displayFileView,
forceRawView: this.state.forceRawView,
filteredItems: this.state.filteredItems,
searchFilter: this.state.searchFilter,
effectMode: this.state.effectMode,
dragStyle: this.state.dragStyle,
visualSeed: this.state.visualSeed,
dialog: ProjectEditorDialog.webLocalDeploy,
dialogData: this.state.dialogData,
dialogActiveItem: this.state.dialogActiveItem,
statusAreaMode: this.state.statusAreaMode,
lastDeployKey: (data.icon as any).key,
lastExportKey: this.state.lastExportKey,
lastDeployFunction: this._handleWebLocalDeployClick,
lastExportFunction: this.state.lastExportFunction,
lastDeployData: data,
lastExportData: this.state.lastExportData,
});
}, 2);
}

private async _handleChangeWorldSettingsClick(e: SyntheticEvent | undefined, data: MenuItemProps | undefined) {
if (this.props.project == null || !data || !data.icon) {
return;
Expand Down Expand Up @@ -3010,7 +2958,7 @@ export default class ProjectEditor extends Component<IProjectEditorProps, IProje
icon: <FontAwesomeIcon icon={faBox} key={nextExportKey} className="fa-lg" />,
content: "Add-On File",
onClick: this._handleExportMCAddonClick,
title: "Exports this set of project files as a MCA, for use in Minecraft",
title: "Exports this set of project files as a MCAddon, for use in Minecraft",
};
exportMenu.push(exportKeys[nextExportKey]);

Expand Down Expand Up @@ -3091,18 +3039,6 @@ export default class ProjectEditor extends Component<IProjectEditorProps, IProje

const deployMenu: any = [];

if (CartoApp.isWeb) {
const deployWebLocalKey = "deployToLocalFolder";
deployKeys[deployWebLocalKey] = {
key: deployWebLocalKey + "A",
icon: <FontAwesomeIcon icon={faBox} key={deployWebLocalKey} className="fa-lg" />,
content: "Deploy to local Minecraft folder",
onClick: this._handleWebLocalDeployClick,
title: "Deploys this to a remote Dev Tools server",
};
deployMenu.push(deployKeys[deployWebLocalKey]);
}

for (let i = 0; i < this.props.project.items.length; i++) {
const pi = this.props.project.items[i];

Expand Down

0 comments on commit 1f3440c

Please sign in to comment.