Office.MailboxEnums.OWAView enum

Stellt die aktuelle Ansicht von Outlook im Web dar.

Hinweise

Verwendet von

Beispiele

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-diagnostic-information.yaml

// This function gets a mailbox's diagnostic information, such as Outlook client and version, and logs it to the console.
const diagnostics = Office.context.mailbox.diagnostics;
console.log(`Client application: ${diagnostics.hostName}`);
console.log(`Client version: ${diagnostics.hostVersion}`);

switch (diagnostics.OWAView) {
  case undefined:
    console.log("Current view (Outlook on the web only): Not applicable. An Outlook desktop client is in use.");
    break;
  case Office.MailboxEnums.OWAView.OneColumnNarrow:
    console.log("Current view (Outlook on the web only): Viewed from an older generation mobile phone");
    break;
  case Office.MailboxEnums.OWAView.OneColumn:
    console.log("Current view (Outlook on the web only): Viewed from a newer generation mobile phone");
    break;
  case Office.MailboxEnums.OWAView.TwoColumns:
    console.log("Current view (Outlook on the web only): Viewed from a tablet");
    break;
  case Office.MailboxEnums.OWAView.ThreeColumns:
    console.log("Current view (Outlook on the web only): Viewed from a desktop computer");
    break;
}

if (Office.context.requirements.isSetSupported("Mailbox", "1.16")) {
  const ewsTokenStatus = diagnostics.ews;
  ewsTokenStatus.getTokenStatusAsync({ isRest: false }, (result) => {
    if (result.status === Office.AsyncResultStatus.Failed) {
      console.log(result.error.message);
      return;
    }

    const status = result.value;
    switch (status) {
      case Office.MailboxEnums.TokenStatus.Enabled:
        console.log("EWS token status: EWS callback tokens are enabled.");
        break;
      case Office.MailboxEnums.TokenStatus.Disabled:
        console.log("EWS token status: EWS callback tokens are disabled.");
        break;
      case Office.MailboxEnums.TokenStatus.Removed:
        console.log("EWS token status: The organization has an Exchange Online environment. Legacy Exchange tokens are no longer supported.");
        break;
    }
  });
}

Felder

OneColumnNarrow = "OneColumnNarrow"

Schmale einspaltige Ansicht. Wird angezeigt, wenn die Bildschirmbreite weniger als 436 Pixel beträgt. Beispielsweise verwendet Outlook im Web diese Ansicht auf dem gesamten Bildschirm älterer Smartphones.

OneColumn = "OneColumn"

Ansicht in einer Spalte. Wird angezeigt, wenn die Bildschirmbreite größer oder gleich 436 Pixel, aber kleiner als 536 Pixel ist. Beispielsweise verwendet Outlook im Web diese Ansicht auf dem gesamten Bildschirm neuerer Smartphones.

TwoColumns = "TwoColumns"

Ansicht in zwei Spalten. Wird angezeigt, wenn die Bildschirmbreite größer oder gleich 536 Pixel, aber kleiner als 780 Pixel ist. Beispielsweise verwendet Outlook im Web diese Ansicht auf den meisten Tablets.

ThreeColumns = "ThreeColumns"

Drei-Spalten-Ansicht. Wird angezeigt, wenn die Bildschirmbreite mindestens 780 Pixel beträgt. Beispielsweise verwendet Outlook im Web diese Ansicht in einem Vollbildfenster auf einem Desktopcomputer.