Skip to content

Commit

Permalink
Add test link
Browse files Browse the repository at this point in the history
  • Loading branch information
ydogandjiev committed Sep 30, 2024
1 parent ad7f15c commit 7119930
Show file tree
Hide file tree
Showing 9 changed files with 2,272 additions and 37 deletions.
2,233 changes: 2,233 additions & 0 deletions public/app.37d1cd962cc36d5b382f.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions public/app.37d1cd962cc36d5b382f.js.map

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions public/auth_end.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!doctype html><html><head><script defer="defer" src="app.5f6e07b54704341b77cd.js"></script></head><body><script>const params = new URLSearchParams(window.location.search);
const result = params.get('code');
const { authId, method } = JSON.parse(params.get('state'));
if (method === 'deeplink') {
window.location.href = `msteams://teams.microsoft.com/l/auth-callback?authId=${authId}&result=${result}`
} else {
microsoftTeams.initialize(undefined, ["https://teams.microsoftonline.cn"]);
microsoftTeams.authentication.notifySuccess(result);
<!doctype html><html><head><script defer="defer" src="app.37d1cd962cc36d5b382f.js"></script></head><body><script>const params = new URLSearchParams(window.location.search);
const result = params.get('code');
const { authId, method } = JSON.parse(params.get('state'));
if (method === 'deeplink') {
window.location.href = `msteams://teams.microsoft.com/l/auth-callback?authId=${authId}&result=${result}`
} else {
microsoftTeams.initialize(undefined, ["https://teams.microsoftonline.cn"]);
microsoftTeams.authentication.notifySuccess(result);
}</script></body></html>
50 changes: 25 additions & 25 deletions public/auth_start.html
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
<!doctype html><html><head><script defer="defer" src="app.5f6e07b54704341b77cd.js"></script></head><body><script>const params = new URLSearchParams(window.location.search);
const mockOAuth = params.get('mockOAuth');
const authId = params.get('authId');
const method = params.get('oauthRedirectMethod');
const redirectUrl = params.get('hostRedirectUrl');
const state = `{"authId":"${authId}","method":"${method}"}`;

const getRedirectUri = () => {
const idx = window.location.href.lastIndexOf('/');
return `${window.location.href.slice(0, idx)}/auth_end.html`;
};

if (mockOAuth === 'true') {
window.location.href = `auth_end.html?state=${state}&code=${redirectUrl ? '1234-r' : '1234'}`
} else {
const queryObj = {
state,
client_id: '1073583513214-oplf5k63msf7at9rcj68vbrh265803vo.apps.googleusercontent.com',
response_type: 'code',
access_type: 'offline',
scope: 'email%20profile'
};
const query = Object.entries(queryObj).map(([k, v]) => `&${k}=${v}`).join('');

window.location.href = `https://accounts.google.com/o/oauth2/v2/auth?redirect_uri=${getRedirectUri()}${query}`;
<!doctype html><html><head><script defer="defer" src="app.37d1cd962cc36d5b382f.js"></script></head><body><script>const params = new URLSearchParams(window.location.search);
const mockOAuth = params.get('mockOAuth');
const authId = params.get('authId');
const method = params.get('oauthRedirectMethod');
const redirectUrl = params.get('hostRedirectUrl');
const state = `{"authId":"${authId}","method":"${method}"}`;

const getRedirectUri = () => {
const idx = window.location.href.lastIndexOf('/');
return `${window.location.href.slice(0, idx)}/auth_end.html`;
};

if (mockOAuth === 'true') {
window.location.href = `auth_end.html?state=${state}&code=${redirectUrl ? '1234-r' : '1234'}`
} else {
const queryObj = {
state,
client_id: '1073583513214-oplf5k63msf7at9rcj68vbrh265803vo.apps.googleusercontent.com',
response_type: 'code',
access_type: 'offline',
scope: 'email%20profile'
};
const query = Object.entries(queryObj).map(([k, v]) => `&${k}=${v}`).join('');

window.location.href = `https://accounts.google.com/o/oauth2/v2/auth?redirect_uri=${getRedirectUri()}${query}`;
}</script></body></html>
2 changes: 1 addition & 1 deletion public/frame.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html><head><title>Test Tab</title><meta property="og:description" content="App for testing Teams SDK"/><link href="./app.css" rel="stylesheet"/><script defer="defer" src="app.5f6e07b54704341b77cd.js"></script></head><body><div id="myModal" class="modal"><div class="modal-content"><span class="close">&times;</span><div id="errorMessage" class="error-message">Error</div></div></div><div class="searchContainer"><input placeholder="Filter..." name="search" id="searchInput"></div><div class="moduleContainer"><div><div class="sectionTitle">Download</div><a href="./placeholder_largeimage.png" download="appIcon">Download Icon</a><br/><a id="downloadLink" download="DownloadViaLink.csv">In-Memory Download Link</a><br/><button id="downloadButton">In-Memory Download Button</button></div><div uploadfilesection><div class="sectionTitle">Upload</div><label for="image_uploads">Choose images to upload (PNG, JPG)</label> <input type="file" id="image_uploads" name="image_uploads" accept=".jpg, .jpeg, .png" multiple="multiple"><div class="fileUploadPreview"><p>No files currently selected for upload</p></div></div><div><div class="sectionTitle">Implicit Teams Deep Link</div><button onclick="enableImplicitExecuteDeepLink()">enable Implicit ExecuteDeepLink</button><div><a href="https://teams.microsoft.com/l/app/f46ad259-0fe5-4f12-872d-c737b174bcb4">https://teams.microsoft.com/_#/l/app/f46ad259-0fe5-4f12-872d-c737b174bcb4</a></div><div><a href="https://teams.microsoft.com/l/entity/com.microsoft.teamspace.tab.planner/All" target="_blank">https://teams.microsoft.com/l/entity/com.microsoft.teamspace.tab.planner/All</a></div><div><a href="https://microsoft.com/" target="_blank">https://microsoft.com/ (non teams deep link)</a></div></div><div><div class="sectionTitle">Print</div><button onclick="enablePrintCapability()">enablePrintCapability</button> <button onclick="printHandler()">Print this page</button></div><div><div class="sectionTitle">URIs</div><div><a href="tel:1234567890">Telephone URI</a></div><div><a href="tel:1234567890" target="_blank">Telephone URI (New Window)</a></div><div><a href="sip:yudogan@microsoft.com">Yuri Dogandjiev SIP URI</a></div><div><a href="sip:yudogan@microsoft.com" target="_blank">Yuri Dogandjiev SIP URI (New Window)</a></div><div><a href="search-ms:query=Microsoft_Teams_Update.exe">Search protocol link</a></div><div><a href="search-ms:query=Microsoft_Teams_Update.exe" target="_blank">Search protocol link (New Window)</a></div><div><a href="msteams://teams.microsoft.com/l/entity/0d820ecd-def2-4297-adad-78056cde7c78/MyNotebook">OneNote app via msteams protocol</a></div><div><a href="msteams://teams.microsoft.com/l/entity/0d820ecd-def2-4297-adad-78056cde7c78/MyNotebook" target="_blank">OneNote app via msteams protocol (New Window)</a></div><div><a href="ms-teams://teams.microsoft.com/l/entity/0d820ecd-def2-4297-adad-78056cde7c78/MyNotebook">OneNote app via ms-teams protocol</a></div><div><a href="ms-teams://teams.microsoft.com/l/entity/0d820ecd-def2-4297-adad-78056cde7c78/MyNotebook" target="_blank">OneNote app via ms-teams protocol (New Window)</a></div></div><div><div class="sectionTitle">Re-navigation</div><div><a href="/page1.html">Page 1</a></div><div><a href="/page2.html">Page 2</a></div><div><a href="/scroll.html">Scroll</a></div><div><a href="/download.html">Download</a></div></div><div><div class="sectionTitle">External links</div><div><a href="https://www.bing.com" target="_blank">Bing via anchor tag</a></div><button onclick="window.open('https://www.bing.com')">Bing via window.open</button></div></div></body></html>
<!doctype html><html><head><title>Test Tab</title><meta property="og:description" content="App for testing Teams SDK"/><link href="./app.css" rel="stylesheet"/><script defer="defer" src="app.37d1cd962cc36d5b382f.js"></script></head><body><div id="myModal" class="modal"><div class="modal-content"><span class="close">&times;</span><div id="errorMessage" class="error-message">Error</div></div></div><div class="searchContainer"><input placeholder="Filter..." name="search" id="searchInput"></div><div class="moduleContainer"><div><div class="sectionTitle">Download</div><a href="./placeholder_largeimage.png" download="appIcon">Download Icon</a><br/><a id="downloadLink" download="DownloadViaLink.csv">In-Memory Download Link</a><br/><button id="downloadButton">In-Memory Download Button</button></div><div uploadfilesection><div class="sectionTitle">Upload</div><label for="image_uploads">Choose images to upload (PNG, JPG)</label> <input type="file" id="image_uploads" name="image_uploads" accept=".jpg, .jpeg, .png" multiple="multiple"><div class="fileUploadPreview"><p>No files currently selected for upload</p></div></div><div><div class="sectionTitle">Implicit Teams Deep Link</div><button onclick="enableImplicitExecuteDeepLink()">enable Implicit ExecuteDeepLink</button><div><a href="https://teams.microsoft.com/l/app/f46ad259-0fe5-4f12-872d-c737b174bcb4">https://teams.microsoft.com/_#/l/app/f46ad259-0fe5-4f12-872d-c737b174bcb4</a></div><div><a href="https://teams.microsoft.com/l/entity/com.microsoft.teamspace.tab.planner/All" target="_blank">https://teams.microsoft.com/l/entity/com.microsoft.teamspace.tab.planner/All</a></div><div><a href="https://microsoft.com/" target="_blank">https://microsoft.com/ (non teams deep link)</a></div></div><div><div class="sectionTitle">Print</div><button onclick="enablePrintCapability()">enablePrintCapability</button> <button onclick="printHandler()">Print this page</button></div><div><div class="sectionTitle">URIs</div><div><a href="tel:1234567890">Telephone URI</a></div><div><a href="tel:1234567890" target="_blank">Telephone URI (New Window)</a></div><div><a href="sip:yudogan@microsoft.com">Yuri Dogandjiev SIP URI</a></div><div><a href="sip:yudogan@microsoft.com" target="_blank">Yuri Dogandjiev SIP URI (New Window)</a></div><div><a href="search-ms:query=Microsoft_Teams_Update.exe">Search protocol link</a></div><div><a href="search-ms:query=Microsoft_Teams_Update.exe" target="_blank">Search protocol link (New Window)</a></div><div><a href="msteams://teams.microsoft.com/l/entity/0d820ecd-def2-4297-adad-78056cde7c78/MyNotebook">OneNote app via msteams protocol</a></div><div><a href="msteams://teams.microsoft.com/l/entity/0d820ecd-def2-4297-adad-78056cde7c78/MyNotebook" target="_blank">OneNote app via msteams protocol (New Window)</a></div><div><a href="ms-teams://teams.microsoft.com/l/entity/0d820ecd-def2-4297-adad-78056cde7c78/MyNotebook">OneNote app via ms-teams protocol</a></div><div><a href="ms-teams://teams.microsoft.com/l/entity/0d820ecd-def2-4297-adad-78056cde7c78/MyNotebook" target="_blank">OneNote app via ms-teams protocol (New Window)</a></div></div><div><div class="sectionTitle">Re-navigation</div><div><a href="/page1.html">Page 1</a></div><div><a href="/page2.html">Page 2</a></div><div><a href="/scroll.html">Scroll</a></div><div><a href="/download.html">Download</a></div></div><div><div class="sectionTitle">External links</div><div><a href="https://www.bing.com" target="_blank">Bing via anchor tag</a></div><button onclick="window.open('https://www.bing.com')">Bing via window.open</button></div></div></body></html>
Loading

0 comments on commit 7119930

Please sign in to comment.