Skip to content

Commit

Permalink
Added target to OpenInAppURL object (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
glpatcern authored Jul 27, 2023
1 parent 39a7ab7 commit cfd1ad2
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 2 deletions.
12 changes: 12 additions & 0 deletions cs3/app/provider/v1beta1/resources.proto
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ message OpenInAppURL {
// OPTIONAL.
// The headers to be added to the request.
map<string, string> headers = 4;
// REQUIRED.
// Whether the target for the app URL is an iframe or a new page.
Target target = 5;
}

// Defines the view modes.
Expand All @@ -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;
}
6 changes: 5 additions & 1 deletion cs3/app/registry/v1beta1/resources.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down
52 changes: 51 additions & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,10 @@ <h2>Table of Contents</h2>
</li>


<li>
<a href="#cs3.app.provider.v1beta1.Target"><span class="badge">E</span>Target</a>
</li>

<li>
<a href="#cs3.app.provider.v1beta1.ViewMode"><span class="badge">E</span>ViewMode</a>
</li>
Expand Down Expand Up @@ -5781,6 +5785,14 @@ <h3 id="cs3.app.provider.v1beta1.OpenInAppURL">OpenInAppURL</h3>
The headers to be added to the request. </p></td>
</tr>

<tr>
<td>target</td>
<td><a href="#cs3.app.provider.v1beta1.Target">Target</a></td>
<td></td>
<td><p>REQUIRED.
Whether the target for the app URL is an iframe or a new page. </p></td>
</tr>

</tbody>
</table>

Expand Down Expand Up @@ -5852,6 +5864,35 @@ <h3 id="cs3.app.provider.v1beta1.OpenInAppURL.HeadersEntry">OpenInAppURL.Headers



<h3 id="cs3.app.provider.v1beta1.Target">Target</h3>
<p>Defines the valid targets for an app URL.</p>
<table class="enum-table">
<thead>
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
</thead>
<tbody>

<tr>
<td>TARGET_INVALID</td>
<td>0</td>
<td><p></p></td>
</tr>

<tr>
<td>TARGET_IFRAME</td>
<td>1</td>
<td><p>The app URL is to be opened within an iframe</p></td>
</tr>

<tr>
<td>TARGET_BLANK</td>
<td>2</td>
<td><p>The app URL is to be opened on a new blank page</p></td>
</tr>

</tbody>
</table>

<h3 id="cs3.app.provider.v1beta1.ViewMode">ViewMode</h3>
<p>Defines the view modes.</p>
<table class="enum-table">
Expand Down Expand Up @@ -6521,7 +6562,7 @@ <h3 id="cs3.app.registry.v1beta1.ProviderInfo">ProviderInfo</h3>
<td></td>
<td><p>REQUIRED.
The address where the app provider can be reached.
For example, tcp://localhost:1099. </p></td>
For example, localhost:1099. </p></td>
</tr>

<tr>
Expand Down Expand Up @@ -6565,6 +6606,15 @@ <h3 id="cs3.app.registry.v1beta1.ProviderInfo">ProviderInfo</h3>
Whether the app can be opened only on desktop </p></td>
</tr>

<tr>
<td>action</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p>OPTIONAL.
The action to be displayed to the user on the context menu.
By default this is &#34;Open with&#34;. </p></td>
</tr>

</tbody>
</table>

Expand Down

0 comments on commit cfd1ad2

Please sign in to comment.