-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/deeplinks #155
Merged
Merged
Feature/deeplinks #155
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Deeplink configuration defaults | ||
# | ||
# This role requires the following variables to be set: | ||
# | ||
#prefix: example- | ||
#domain: example.com | ||
#deeplink_title: Example Environment | ||
|
||
assetsURL: "https://{{ prefix }}s3.{{ domain }}" | ||
deeplink_config_json: "{{ assetsURL }}/public/deeplink.json" | ||
backendURL: "https://{{ prefix }}https.{{ domain }}" | ||
backendWSURL: "https://{{ prefix }}ssl.{{ domain }}" | ||
teamsURL: "https://{{ prefix }}team.{{ domain }}" | ||
accountsURL: "https://{{ prefix }}account.{{ domain }}" | ||
|
||
# FUTUREWORK: | ||
# Note the website, for Wire, points to https://wire.com | ||
# There is currently no equivalent for custom backends | ||
# So all URLs in the mobile app that point to a url on the wire website will | ||
# not work, as the default of 'www' points nowhere. | ||
websiteURL: "https://{{ prefix }}www.{{ domain }}" | ||
|
||
# This currently assumes android clients only | ||
blackListURL: "{{ assetsURL }}/public/blacklist/android.json" | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"oldestAccepted": 322, | ||
"blacklisted": [ 0, 108 ] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"min_version": "1", | ||
"exclude": ["1896", "1921", "1963", "1992", "2006", "2032", "2093", "2135", "2161", "2173", "2191", "2222", "2252", "2301", "2319", "2365", "2377", "2395", "2406", "2424", "2472", "2484", "2516", "2521", "2531", "2538", "2549", "2565", "2584", "2585", "2592", "2620", "2629", "2635", "2650", "2669", "2670", "2675", "2681", "2702", "2713", "2720", "2731", "2735", "2742", "2752", "2766", "2772", "2780", "2787", "2795", "2811"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
- name: "create deeplink template files" | ||
template: | ||
src: "{{ item }}.j2" | ||
dest: "/tmp/{{ item }}" | ||
run_once: true | ||
with_items: | ||
- deeplink.html | ||
- deeplink.json | ||
tags: deeplink | ||
|
||
- name: "Add deeplink files to minio" | ||
shell: "mc cp /tmp/{{ item }} local/public/{{ item }}" | ||
run_once: true | ||
with_items: | ||
- deeplink.html | ||
- deeplink.json | ||
tags: deeplink | ||
|
||
- name: "copy blacklist files" | ||
copy: | ||
src: "{{ item }}" | ||
dest: "/tmp/{{ item }}" | ||
run_once: true | ||
with_items: | ||
- android.json | ||
- ios.json | ||
tags: blacklist | ||
|
||
- name: "Add blacklist files to minio" | ||
shell: "mc cp /tmp/{{ item }} local/public/blacklist/{{ item }}" | ||
run_once: true | ||
with_items: | ||
- android.json | ||
- ios.json | ||
tags: blacklist |
12 changes: 12 additions & 0 deletions
12
ansible/roles/minio-static-files/templates/deeplink.html.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<body> | ||
<h1 align="left" style="font-family: Verdana, Geneva, sans-serif"> | ||
<a href="wire://access/?config={{ deeplink_config_json }}">CLICK ME TO CONFIGURE</a></h1> | ||
<p> Clicking the above link will use the following json configuration file: | ||
<code>wire://access/?config={{ deeplink_config_json }}</code></p> | ||
</body> | ||
|
||
</html> | ||
|
11 changes: 11 additions & 0 deletions
11
ansible/roles/minio-static-files/templates/deeplink.json.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"endpoints": { | ||
"backendURL": "{{ backendURL }}", | ||
"backendWSURL": "{{ backendWSURL }}", | ||
"blackListURL": "{{ blackListURL }}", | ||
"teamsURL": "{{ teamsURL }}", | ||
"accountsURL": "{{ accountsURL }}", | ||
"websiteURL": "{{ websiteURL }}" | ||
}, | ||
"title": "{{ deeplink_title }}" | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just use
{{ assetsURL }}/public/blacklist
and let clients add the suffix?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I briefly looked into the code of android, and they seem to have
"blacklistHost": "https://clientblacklist.wire.com/prod/android"
, i.e. the full path. If that changes, we can adapt this to be only a prefix.