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

PAC UI Support #912

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
130 changes: 130 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,52 @@
"command": "microsoft-powerapps-portals.webExtension.init",
"title": "%microsoft-powerapps-portals.webExtension.init.title%"
},
{
"command": "powerpages.websitePanel.refresh",
"title": "Refresh",
"icon": "$(refresh)"
},
{
"command": "powerpages.websitePanel.downloadWebsite",
"title": "Download Website",
"icon": "$(arrow-down)"
},
{
"command": "powerpages.websitePanel.uploadWebsite",
"title": "Upload Website",
"icon": "$(arrow-up)"
},
{
"command": "powerpages.websitePanel.uploadWebsiteForceAll",
"title": "Upload Website (force all)"
},
{
"command": "powerpages.websitePanel.bootstrap-migration",
"title": "Bootstrap Migration"
},
{
"command": "powerpages.websitePanel.refresh",
"title": "Refresh",
"icon": "$(refresh)"
},
{
"command": "powerpages.websitePanel.downloadWebsite",
"title": "Download Website",
"icon": "$(arrow-down)"
},
{
"command": "powerpages.websitePanel.uploadWebsite",
"title": "Upload Website",
"icon": "$(arrow-up)"
},
{
"command": "powerpages.websitePanel.uploadWebsiteForceAll",
"title": "Upload Website (force all)"
},
{
"command": "powerpages.websitePanel.bootstrap-migration",
"title": "Bootstrap Migration"
},
{
"command": "microsoft-powerapps-portals.webpage",
"category": "Powerpages",
Expand Down Expand Up @@ -672,6 +718,26 @@
"command": "microsoft-powerapps-portals.preview-show",
"when": "never"
},
{
"command": "powerpages.websitePanel.refresh",
"when": "never"
},
{
"command": "powerpages.websitePanel.downloadWebsite",
"when": "never"
},
{
"command": "powerpages.websitePanel.uploadWebsite",
"when": "never"
},
{
"command": "powerpages.websitePanel.bootstrap-migration",
"when": "never"
},
{
"command": "powerpages.websitePanel.uploadWebsiteForceAll",
"when": "never"
},
{
"command": "pacCLI.authPanel.refresh",
"when": "never"
Expand Down Expand Up @@ -830,6 +896,11 @@
"command": "powerpages.copilot.clearConversation",
"when": "view == powerpages.copilot",
"group": "navigation"
},
{
"command": "powerpages.websitePanel.refresh",
"when": "!virtualWorkspace && view == powerpages.websitePanel",
"group": "navigation@1"
}
],
"view/item/context": [
Expand Down Expand Up @@ -891,6 +962,20 @@
"command": "pacCLI.envAndSolutionsPanel.copyOrganizationId",
"when": "!virtualWorkspace && view == pacCLI.envAndSolutionsPanel && viewItem == ENVIRONMENT"
},
{
"command": "powerpages.websitePanel.downloadWebsite",
"when": "!virtualWorkspace && view == powerpages.websitePanel",
"group": "inline"
},
{
"command": "powerpages.websitePanel.uploadWebsite",
"when": "!virtualWorkspace && view == powerpages.websitePanel",
"group": "inline"
},
{
"command": "powerpages.websitePanel.bootstrap-migration",
"when": "!virtualWorkspace && view == powerpages.websitePanel"
},
{
"command": "powerpages.collaboration.openTeamsChat",
"group": "inline",
Expand All @@ -900,17 +985,57 @@
"command": "powerpages.collaboration.openMail",
"group": "inline",
"when": "viewItem == userNode"
},
{
"submenu": "microsoft-powerpages-download"
},
{
"submenu": "microsoft-powerpages-upload"
}

],
"microsoft-powerpages-download":[
{
"command": "powerpages.websitePanel.downloadWebsite",
"when": "!virtualWorkspace && view == powerpages.websitePanel"
}
],
"microsoft-powerpages-upload":[
{
"command": "powerpages.websitePanel.uploadWebsite",
"when": "!virtualWorkspace && view == powerpages.websitePanel"
},
{
"command": "powerpages.websitePanel.uploadWebsiteForceAll",
"when": "!virtualWorkspace && view == powerpages.websitePanel"
}
]

},
"submenus": [
{
"id": "microsoft-powerapps-portals.powerpages",
"label": "Power Pages"
},
{
"id": "microsoft-powerpages-download",
"label": "Download"
},
{
"id": "microsoft-powerpages-upload",
"label": "Upload"
},
{
"id": "microsoft-powerapps-portals.powerpages-copilot",
"label": "Copilot In Power Pages"
},
{
"id": "microsoft-powerpages-download",
"label": "Download"
},
{
"id": "microsoft-powerpages-upload",
"label": "Upload"
}
],
"viewsContainers": {
Expand All @@ -934,6 +1059,11 @@
"name": "%pacCLI.envAndSolutionsPanel.title%",
"when": "!virtualWorkspace && !config.powerPlatform.experimental.disableActivityBarPanels"
},
{
"id": "powerpages.websitePanel",
"name": "Power Pages Websites",
"when": "!virtualWorkspace"
},
{
"type": "webview",
"id": "powerpages.copilot",
Expand Down
5 changes: 4 additions & 1 deletion src/client/lib/PacActivityBarUI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { AuthTreeView } from './AuthPanelView';
import { EnvAndSolutionTreeView } from './EnvAndSolutionTreeView';
import { PowerPagesCopilot } from '../../common/copilot/PowerPagesCopilot';
import { ITelemetry } from '../telemetry/ITelemetry';
import { WebsiteTreeView } from './PowerPagesWebsiteView';

export function RegisterPanels(pacWrapper: PacWrapper, context: vscode.ExtensionContext, telemetry: ITelemetry): vscode.Disposable[] {
const authPanel = new AuthTreeView(() => pacWrapper.authList(), pacWrapper);
Expand All @@ -17,6 +18,8 @@ export function RegisterPanels(pacWrapper: PacWrapper, context: vscode.Extension
(environmentUrl) => pacWrapper.solutionListFromEnvironment(environmentUrl),
authPanel.onDidChangeTreeData,
pacWrapper);

const websitePanel = new WebsiteTreeView(() => pacWrapper.websiteList(), pacWrapper);

const copilotPanel = new PowerPagesCopilot(context.extensionUri, context, telemetry, pacWrapper);

Expand All @@ -26,5 +29,5 @@ export function RegisterPanels(pacWrapper: PacWrapper, context: vscode.Extension
},
});

return [authPanel, envAndSolutionPanel, copilotPanel];
return [authPanel, envAndSolutionPanel, copilotPanel, websitePanel];
}
4 changes: 4 additions & 0 deletions src/client/lib/PacTerminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ export class PacTerminal implements vscode.Disposable {
vscode.commands.registerCommand('pacCLI.pacPackageHelp', () => PacTerminal.getTerminal().sendText("pac package help")),
vscode.commands.registerCommand('pacCLI.pacPcfHelp', () => PacTerminal.getTerminal().sendText("pac pcf help")),
vscode.commands.registerCommand('pacCLI.pacSolutionHelp', () => PacTerminal.getTerminal().sendText("pac solution help")));
vscode.commands.registerCommand('pacCLI.pacPaportalDownload', (websiteId, path) => PacTerminal.getTerminal().sendText(`pac paportal download -id ${websiteId} -p ${path}`));
vscode.commands.registerCommand('pacCLI.pacPaportalUpload', (path, modelVersion) => PacTerminal.getTerminal().sendText(`pac paportal upload -p ${path} -mv ${modelVersion}`))
vscode.commands.registerCommand('pacCLI.pacPaportalUploadForce', (path, modelVersion) => PacTerminal.getTerminal().sendText(`pac paportal upload -p ${path} -mv ${modelVersion} -f`))
vscode.commands.registerCommand('pacCLI.pacPaportalBootstrapMigration', (path) => PacTerminal.getTerminal().sendText(`pac paportal bootstrap-migrate -p ${path}`))

this._cmdDisposables.push(vscode.commands.registerCommand(`pacCLI.enableTelemetry`, async () => {
const result = await this._pacWrapper.enableTelemetry();
Expand Down
Loading
Loading