Skip to content

Commit cfd1ad2

Browse files
authored
Added target to OpenInAppURL object (#212)
1 parent 39a7ab7 commit cfd1ad2

File tree

3 files changed

+68
-2
lines changed

3 files changed

+68
-2
lines changed

cs3/app/provider/v1beta1/resources.proto

+12
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ message OpenInAppURL {
4444
// OPTIONAL.
4545
// The headers to be added to the request.
4646
map<string, string> headers = 4;
47+
// REQUIRED.
48+
// Whether the target for the app URL is an iframe or a new page.
49+
Target target = 5;
4750
}
4851

4952
// Defines the view modes.
@@ -62,3 +65,12 @@ enum ViewMode {
6265
// then this mode MUST fall back to READ_WRITE.
6366
VIEW_MODE_PREVIEW = 4;
6467
}
68+
69+
// Defines the valid targets for an app URL.
70+
enum Target {
71+
TARGET_INVALID = 0;
72+
// The app URL is to be opened within an iframe
73+
TARGET_IFRAME = 1;
74+
// The app URL is to be opened on a new blank page
75+
TARGET_BLANK = 2;
76+
}

cs3/app/registry/v1beta1/resources.proto

+5-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ message ProviderInfo {
4040
repeated string mime_types = 2;
4141
// REQUIRED.
4242
// The address where the app provider can be reached.
43-
// For example, tcp://localhost:1099.
43+
// For example, localhost:1099.
4444
string address = 3;
4545
// REQUIRED.
4646
// The capability of the underlying app.
@@ -66,6 +66,10 @@ message ProviderInfo {
6666
// OPTIONAL.
6767
// Whether the app can be opened only on desktop
6868
bool desktop_only = 8;
69+
// OPTIONAL.
70+
// The action to be displayed to the user on the context menu.
71+
// By default this is "Open with".
72+
string action = 9;
6973
}
7074

7175
// Represents a mime type and its corresponding file extension.

docs/index.html

+51-1
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,10 @@ <h2>Table of Contents</h2>
593593
</li>
594594

595595

596+
<li>
597+
<a href="#cs3.app.provider.v1beta1.Target"><span class="badge">E</span>Target</a>
598+
</li>
599+
596600
<li>
597601
<a href="#cs3.app.provider.v1beta1.ViewMode"><span class="badge">E</span>ViewMode</a>
598602
</li>
@@ -5781,6 +5785,14 @@ <h3 id="cs3.app.provider.v1beta1.OpenInAppURL">OpenInAppURL</h3>
57815785
The headers to be added to the request. </p></td>
57825786
</tr>
57835787

5788+
<tr>
5789+
<td>target</td>
5790+
<td><a href="#cs3.app.provider.v1beta1.Target">Target</a></td>
5791+
<td></td>
5792+
<td><p>REQUIRED.
5793+
Whether the target for the app URL is an iframe or a new page. </p></td>
5794+
</tr>
5795+
57845796
</tbody>
57855797
</table>
57865798

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

58535865

58545866

5867+
<h3 id="cs3.app.provider.v1beta1.Target">Target</h3>
5868+
<p>Defines the valid targets for an app URL.</p>
5869+
<table class="enum-table">
5870+
<thead>
5871+
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
5872+
</thead>
5873+
<tbody>
5874+
5875+
<tr>
5876+
<td>TARGET_INVALID</td>
5877+
<td>0</td>
5878+
<td><p></p></td>
5879+
</tr>
5880+
5881+
<tr>
5882+
<td>TARGET_IFRAME</td>
5883+
<td>1</td>
5884+
<td><p>The app URL is to be opened within an iframe</p></td>
5885+
</tr>
5886+
5887+
<tr>
5888+
<td>TARGET_BLANK</td>
5889+
<td>2</td>
5890+
<td><p>The app URL is to be opened on a new blank page</p></td>
5891+
</tr>
5892+
5893+
</tbody>
5894+
</table>
5895+
58555896
<h3 id="cs3.app.provider.v1beta1.ViewMode">ViewMode</h3>
58565897
<p>Defines the view modes.</p>
58575898
<table class="enum-table">
@@ -6521,7 +6562,7 @@ <h3 id="cs3.app.registry.v1beta1.ProviderInfo">ProviderInfo</h3>
65216562
<td></td>
65226563
<td><p>REQUIRED.
65236564
The address where the app provider can be reached.
6524-
For example, tcp://localhost:1099. </p></td>
6565+
For example, localhost:1099. </p></td>
65256566
</tr>
65266567

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

6609+
<tr>
6610+
<td>action</td>
6611+
<td><a href="#string">string</a></td>
6612+
<td></td>
6613+
<td><p>OPTIONAL.
6614+
The action to be displayed to the user on the context menu.
6615+
By default this is &#34;Open with&#34;. </p></td>
6616+
</tr>
6617+
65686618
</tbody>
65696619
</table>
65706620

0 commit comments

Comments
 (0)