@@ -3,21 +3,15 @@
|
|||||||
"id": "caca4ff9-050c-4643-936c-d0f29a0f9532",
|
"id": "caca4ff9-050c-4643-936c-d0f29a0f9532",
|
||||||
"alias": "RequestPortalWebPart",
|
"alias": "RequestPortalWebPart",
|
||||||
"componentType": "WebPart",
|
"componentType": "WebPart",
|
||||||
|
|
||||||
// The "*" signifies that the version should be taken from the package.json
|
|
||||||
"version": "*",
|
"version": "*",
|
||||||
"manifestVersion": 2,
|
"manifestVersion": 2,
|
||||||
|
|
||||||
// If true, the component can only be installed on sites where Custom Script is allowed.
|
|
||||||
// Components that allow authors to embed arbitrary script code should set this to true.
|
|
||||||
// https://support.office.com/en-us/article/Turn-scripting-capabilities-on-or-off-1f2c515f-5d7e-448a-9fd7-835da935584f
|
|
||||||
"requiresCustomScript": false,
|
"requiresCustomScript": false,
|
||||||
"supportedHosts": ["SharePointWebPart", "TeamsPersonalApp", "TeamsTab", "SharePointFullPage"],
|
"supportedHosts": ["SharePointWebPart", "TeamsPersonalApp", "TeamsTab", "SharePointFullPage"],
|
||||||
"supportsThemeVariants": true,
|
"supportsThemeVariants": true,
|
||||||
"supportsFullBleed": true,
|
"supportsFullBleed": true,
|
||||||
|
|
||||||
"preconfiguredEntries": [{
|
"preconfiguredEntries": [{
|
||||||
"groupId": "5c03119e-3074-46fd-976b-c60198311f70", // Advanced
|
"groupId": "5c03119e-3074-46fd-976b-c60198311f70",
|
||||||
"group": { "default": "Advanced" },
|
"group": { "default": "Advanced" },
|
||||||
"title": { "default": "request-portal" },
|
"title": { "default": "request-portal" },
|
||||||
"description": { "default": "request-portal description" },
|
"description": { "default": "request-portal description" },
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ export default class RequestPortalWebPart extends BaseClientSideWebPart<IRequest
|
|||||||
if (!!this.context.sdks.microsoftTeams) { // running in Teams, office.com or Outlook
|
if (!!this.context.sdks.microsoftTeams) { // running in Teams, office.com or Outlook
|
||||||
return this.context.sdks.microsoftTeams.teamsJs.app.getContext()
|
return this.context.sdks.microsoftTeams.teamsJs.app.getContext()
|
||||||
.then(context => {
|
.then(context => {
|
||||||
let environmentMessage: string = '';
|
let environmentMessage: string;
|
||||||
switch (context.app.host.name) {
|
switch (context.app.host.name) {
|
||||||
case 'Office': // running in Office
|
case 'Office': // running in Office
|
||||||
environmentMessage = this.context.isServedFromLocalhost ? strings.AppLocalEnvironmentOffice : strings.AppOfficeEnvironment;
|
environmentMessage = this.context.isServedFromLocalhost ? strings.AppLocalEnvironmentOffice : strings.AppOfficeEnvironment;
|
||||||
|
|||||||
Reference in New Issue
Block a user