diff --git a/manifest.xml b/manifest.xml index b47b791..5366163 100644 --- a/manifest.xml +++ b/manifest.xml @@ -20,6 +20,8 @@ + + @@ -65,6 +67,82 @@ + + + + + <Description resid="GetStarted.Description"/> + <LearnMoreUrl resid="GetStarted.LearnMoreUrl"/> + </GetStarted> + <FunctionFile resid="Commands.Url"/> + <ExtensionPoint xsi:type="PrimaryCommandSurface"> + <OfficeTab id="TabHome"> + <Group id="CommandsGroup"> + <Label resid="CommandsGroup.Label"/> + <Icon> + <bt:Image size="16" resid="Icon.16x16"/> + <bt:Image size="32" resid="Icon.32x32"/> + <bt:Image size="80" resid="Icon.80x80"/> + </Icon> + <Control xsi:type="Button" id="TaskpaneButton"> + <Label resid="TaskpaneButton.Label"/> + <Supertip> + <Title resid="TaskpaneButton.Label"/> + <Description resid="TaskpaneButton.Tooltip"/> + </Supertip> + <Icon> + <bt:Image size="16" resid="Icon.16x16"/> + <bt:Image size="32" resid="Icon.32x32"/> + <bt:Image size="80" resid="Icon.80x80"/> + </Icon> + <Action xsi:type="ShowTaskpane"> + <TaskpaneId>ButtonId1</TaskpaneId> + <SourceLocation resid="Taskpane.Url"/> + </Action> + </Control> + </Group> + </OfficeTab> + </ExtensionPoint> + </DesktopFormFactor> + </Host> + <Host xsi:type="Presentation"> + <DesktopFormFactor> + <GetStarted> + <Title resid="GetStarted.Title"/> + <Description resid="GetStarted.Description"/> + <LearnMoreUrl resid="GetStarted.LearnMoreUrl"/> + </GetStarted> + <FunctionFile resid="Commands.Url"/> + <ExtensionPoint xsi:type="PrimaryCommandSurface"> + <OfficeTab id="TabHome"> + <Group id="CommandsGroup"> + <Label resid="CommandsGroup.Label"/> + <Icon> + <bt:Image size="16" resid="Icon.16x16"/> + <bt:Image size="32" resid="Icon.32x32"/> + <bt:Image size="80" resid="Icon.80x80"/> + </Icon> + <Control xsi:type="Button" id="TaskpaneButton"> + <Label resid="TaskpaneButton.Label"/> + <Supertip> + <Title resid="TaskpaneButton.Label"/> + <Description resid="TaskpaneButton.Tooltip"/> + </Supertip> + <Icon> + <bt:Image size="16" resid="Icon.16x16"/> + <bt:Image size="32" resid="Icon.32x32"/> + <bt:Image size="80" resid="Icon.80x80"/> + </Icon> + <Action xsi:type="ShowTaskpane"> + <TaskpaneId>ButtonId1</TaskpaneId> + <SourceLocation resid="Taskpane.Url"/> + </Action> + </Control> + </Group> + </OfficeTab> + </ExtensionPoint> + </DesktopFormFactor> + </Host> </Hosts> <Resources> <bt:Images> diff --git a/src/taskpane/taskpane.html b/src/taskpane/taskpane.html index 2d127b8..1a6034e 100644 --- a/src/taskpane/taskpane.html +++ b/src/taskpane/taskpane.html @@ -34,15 +34,15 @@ <div class="ezp-panel"> <div class="ezp-hero"> <img - src="https://cdn.ezeep.com/ezeep-msoffice-addin/v1.0.27/assets/hero.png" - srcset="https://cdn.ezeep.com/ezeep-msoffice-addin/v1.0.27/assets/hero.png 1x, https://cdn.ezeep.com/ezeep-msoffice-addin/v1.0.27/assets/hero@2x.png 2x" + src="https://cdn.ezeep.com/ezeep-msoffice-addin/v1.0.28/assets/hero.png" + srcset="https://cdn.ezeep.com/ezeep-msoffice-addin/v1.0.28/assets/hero.png 1x, https://cdn.ezeep.com/ezeep-msoffice-addin/v1.0.28/assets/hero@2x.png 2x" alt="ezeep Hero" /> </div> <div class="ezp-logo"> <img - src="https://cdn.ezeep.com/ezeep-msoffice-addin/v1.0.27/assets/logo.png" - srcset="https://cdn.ezeep.com/ezeep-msoffice-addin/v1.0.27/assets/logo.png 1x, https://cdn.ezeep.com/ezeep-msoffice-addin/v1.0.27/assets/logo@2x.png 2x" + src="https://cdn.ezeep.com/ezeep-msoffice-addin/v1.0.28/assets/logo.png" + srcset="https://cdn.ezeep.com/ezeep-msoffice-addin/v1.0.28/assets/logo.png 1x, https://cdn.ezeep.com/ezeep-msoffice-addin/v1.0.28/assets/logo@2x.png 2x" alt="ezeep Logo" /> </div> @@ -56,7 +56,7 @@ </div> <ezp-printing clientid="WnjHlEm0TYYJDt8dovTqUDJMa4ifB2C9eehABA1U" - redirecturi="https://cdn.ezeep.com/ezeep-msoffice-addin/v1.0.27/authRedirect.html" + redirecturi="https://cdn.ezeep.com/ezeep-msoffice-addin/v1.0.28/authRedirect.html" trigger="custom" filetype="pdf" appearance="light" @@ -76,15 +76,15 @@ <div class="ezp-panel"> <div class="ezp-hero"> <img - src="https://cdn.ezeep.com/ezeep-msoffice-addin/v1.0.27/assets/hero.png" - srcset="https://cdn.ezeep.com/ezeep-msoffice-addin/v1.0.27/assets/hero.png 1x, https://cdn.ezeep.com/ezeep-msoffice-addin/v1.0.27/assets/hero@2x.png 2x" + src="https://cdn.ezeep.com/ezeep-msoffice-addin/v1.0.28/assets/hero.png" + srcset="https://cdn.ezeep.com/ezeep-msoffice-addin/v1.0.28/assets/hero.png 1x, https://cdn.ezeep.com/ezeep-msoffice-addin/v1.0.28/assets/hero@2x.png 2x" alt="ezeep Hero" /> </div> <div class="ezp-logo"> <img - src="https://cdn.ezeep.com/ezeep-msoffice-addin/v1.0.27/assets/logo.png" - srcset="https://cdn.ezeep.com/ezeep-msoffice-addin/v1.0.27/assets/logo.png 1x, https://cdn.ezeep.com/ezeep-msoffice-addin/v1.0.27/assets/logo@2x.png 2x" + src="https://cdn.ezeep.com/ezeep-msoffice-addin/v1.0.28/assets/logo.png" + srcset="https://cdn.ezeep.com/ezeep-msoffice-addin/v1.0.28/assets/logo.png 1x, https://cdn.ezeep.com/ezeep-msoffice-addin/v1.0.28/assets/logo@2x.png 2x" alt="ezeep Logo" /> </div> diff --git a/src/taskpane/taskpane.ts b/src/taskpane/taskpane.ts index 4ed8c16..cd9c7bf 100644 --- a/src/taskpane/taskpane.ts +++ b/src/taskpane/taskpane.ts @@ -49,11 +49,14 @@ Office.onReady(async (info) => { language = Office.context.displayLanguage.toLowerCase(); await initi18n(language); translate(); - - if (info.host === Office.HostType.Word) { - authorized = await ezpPrinting.checkAuth(); - authSection.style.display = authorized ? "none" : "block"; - + authorized = await ezpPrinting.checkAuth(); + authSection.style.display = authorized ? "none" : "block"; + + if ( + info.host === Office.HostType.Word || + info.host === Office.HostType.Excel || + info.host === Office.HostType.PowerPoint + ) { getFile().then(() => { if (authorized) { authSection.style.display = "none"; @@ -65,6 +68,8 @@ Office.onReady(async (info) => { loadingSection.style.display = "none"; } }); + } else if (info.host === Office.HostType.Outlook) { + // get email file } }); @@ -133,6 +138,7 @@ async function onGotAllSlices(docdataSlices) { fileData = docdata; const filearray = new Uint8Array(fileData); const filestring = filearray.toString(); + // console.log(filestring); ezpPrinting.setAttribute("filedata", filestring); ezpPrinting.setAttribute("filename", "test.pdf"); if (authorized) ezpPrinting.open().then(() => (loadingSection.style.display = "none"));