Skip to content

Commit

Permalink
Don't show google play button if in standalone mode. Closes #145
Browse files Browse the repository at this point in the history
  • Loading branch information
AchoArnold committed Dec 12, 2023
1 parent 346dd5b commit 1085b31
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions web/src/views/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
Live Demo
</v-btn>
<a
v-if="!isInStandaloneMode"
class="ml-n4"
:href="
this.appData.androidAppUrl +
Expand Down Expand Up @@ -240,6 +241,10 @@ export default class Home extends Vue {
return process.env.VUE_APP_GITHUB_LINK as string;
}
get isInStandaloneMode(): boolean {
return (window.matchMedia('(display-mode: standalone)').matches) || (window.navigator.standalone) || document.referrer.includes('android-app://');
}
get canDownloadApp(): boolean {
return isAndroid() && !isInStandaloneMode();
}
Expand Down

0 comments on commit 1085b31

Please sign in to comment.