feat: integrate Microsoft Power Apps SDK and enhance email handling
- Added dependency for @microsoft/power-apps to package.json. - Updated power.config.json to include appId, environmentId, and connection references. - Implemented sanitisation function for HTML content in App.tsx to prevent XSS. - Enhanced error handling in email loading and marking as read functionalities. - Updated email display logic to handle HTML content and previews. - Refactored OutlookService to use auto-generated service from @microsoft/power-apps. - Added new methods for sending, marking as read, and deleting emails in OutlookService. - Updated types for Email to include bodyPreview, isHtml, hasAttachments, and importance. - Configured Vite to exclude @microsoft/power-apps/data from the build. - Created .gitignore to exclude build artifacts and environment files. - Added local development shim for @microsoft/power-apps/data to support local testing. - Defined type stubs for @microsoft/power-apps/data to facilitate local development.
This commit is contained in:
@@ -1,14 +1,16 @@
|
||||
{
|
||||
"$schema": "https://aka.ms/power-apps/code/power.config.schema.json",
|
||||
"version": "1.0",
|
||||
"app": {
|
||||
"name": "outlook-lite",
|
||||
"displayName": "Outlook Lite — Code Apps Demo",
|
||||
"description": "Email client built with React + Fluent UI, powered by Power Platform connectors"
|
||||
},
|
||||
"dataSources": [],
|
||||
"appId": "<your-app-id>",
|
||||
"appDisplayName": "Outlook Lite",
|
||||
"region": "prod",
|
||||
"environmentId": "<your-environment-id>",
|
||||
"description": "Email client built with React + Fluent UI, powered by Power Platform connectors",
|
||||
"buildPath": "dist",
|
||||
"buildEntryPoint": "index.html",
|
||||
"localAppUrl": "http://localhost:5173",
|
||||
"logoPath": "Default",
|
||||
"connectionReferences": {
|
||||
"e9a483eb-1c10-473e-8d5c-a71f3f1f79a1": {
|
||||
"<your-connection-reference-id>": {
|
||||
"id": "/providers/Microsoft.PowerApps/apis/shared_outlook",
|
||||
"displayName": "Outlook.com",
|
||||
"dataSources": [
|
||||
@@ -16,5 +18,6 @@
|
||||
],
|
||||
"dataSets": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"databaseReferences": {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user