From cfd1ad29fdf00c79c2a321de7b1a60d0725fe4e8 Mon Sep 17 00:00:00 2001 From: Giuseppe Lo Presti Date: Thu, 27 Jul 2023 11:35:40 +0200 Subject: [PATCH] Added target to OpenInAppURL object (#212) --- cs3/app/provider/v1beta1/resources.proto | 12 ++++++ cs3/app/registry/v1beta1/resources.proto | 6 ++- docs/index.html | 52 +++++++++++++++++++++++- 3 files changed, 68 insertions(+), 2 deletions(-) diff --git a/cs3/app/provider/v1beta1/resources.proto b/cs3/app/provider/v1beta1/resources.proto index 59f69665..a7cc1b5d 100644 --- a/cs3/app/provider/v1beta1/resources.proto +++ b/cs3/app/provider/v1beta1/resources.proto @@ -44,6 +44,9 @@ message OpenInAppURL { // OPTIONAL. // The headers to be added to the request. map headers = 4; + // REQUIRED. + // Whether the target for the app URL is an iframe or a new page. + Target target = 5; } // Defines the view modes. @@ -62,3 +65,12 @@ enum ViewMode { // then this mode MUST fall back to READ_WRITE. VIEW_MODE_PREVIEW = 4; } + +// Defines the valid targets for an app URL. +enum Target { + TARGET_INVALID = 0; + // The app URL is to be opened within an iframe + TARGET_IFRAME = 1; + // The app URL is to be opened on a new blank page + TARGET_BLANK = 2; +} diff --git a/cs3/app/registry/v1beta1/resources.proto b/cs3/app/registry/v1beta1/resources.proto index 0333d42d..0c8570f4 100644 --- a/cs3/app/registry/v1beta1/resources.proto +++ b/cs3/app/registry/v1beta1/resources.proto @@ -40,7 +40,7 @@ message ProviderInfo { repeated string mime_types = 2; // REQUIRED. // The address where the app provider can be reached. - // For example, tcp://localhost:1099. + // For example, localhost:1099. string address = 3; // REQUIRED. // The capability of the underlying app. @@ -66,6 +66,10 @@ message ProviderInfo { // OPTIONAL. // Whether the app can be opened only on desktop bool desktop_only = 8; + // OPTIONAL. + // The action to be displayed to the user on the context menu. + // By default this is "Open with". + string action = 9; } // Represents a mime type and its corresponding file extension. diff --git a/docs/index.html b/docs/index.html index a3b6ce83..24b1d5af 100644 --- a/docs/index.html +++ b/docs/index.html @@ -593,6 +593,10 @@

Table of Contents

+
  • + ETarget +
  • +
  • EViewMode
  • @@ -5781,6 +5785,14 @@

    OpenInAppURL

    The headers to be added to the request.

    + + target + Target + +

    REQUIRED. +Whether the target for the app URL is an iframe or a new page.

    + + @@ -5852,6 +5864,35 @@

    OpenInAppURL.Headers +

    Target

    +

    Defines the valid targets for an app URL.

    + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameNumberDescription
    TARGET_INVALID0

    TARGET_IFRAME1

    The app URL is to be opened within an iframe

    TARGET_BLANK2

    The app URL is to be opened on a new blank page

    +

    ViewMode

    Defines the view modes.

    @@ -6521,7 +6562,7 @@

    ProviderInfo

    +For example, localhost:1099.

    @@ -6565,6 +6606,15 @@

    ProviderInfo

    Whether the app can be opened only on desktop

    + + + + + + +

    REQUIRED. The address where the app provider can be reached. -For example, tcp://localhost:1099.

    actionstring

    OPTIONAL. +The action to be displayed to the user on the context menu. +By default this is "Open with".