Skip to content

Commit

Permalink
Annual leave was missing shim. (#732)
Browse files Browse the repository at this point in the history
* Annual leave was missing shim.

* Add support for emails in browser.
  • Loading branch information
johnman authored Jun 18, 2024
1 parent 1d69ea1 commit 1aa09a3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
rel="stylesheet"
/>
<link rel="stylesheet" href="../common/style.css" />
<script src="https://built-on-openfin.github.io/web-starter/web/v18.0.0/web-client-api/js/shim.api.bundle.js"></script>
<script type="module" src="./index.js"></script>
</head>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,12 @@ async function initDom() {
memberNameElem.classList.add('team-member-name');
memberNameElem.textContent = teamMember.name;
memberNameElem.addEventListener('click', () => {
fin.System.openUrlWithBrowser(`mailto:${teamMember.email}`);
const address = `mailto:${teamMember.email}`;
if (window.fin.me.isBrowserEnvironment()) {
window.open(address);
} else {
fin.System.openUrlWithBrowser(address);
}
});

const memberRoleElem = document.createElement('div');
Expand Down

0 comments on commit 1aa09a3

Please sign in to comment.