Add:Chromecast non-secure alert

This commit is contained in:
advplyr 2022-02-23 17:01:11 -06:00
parent d2c6f1bab1
commit 1a89b6e493

View File

@ -15,6 +15,9 @@
<span v-if="showExperimentalFeatures" class="material-icons text-4xl text-warning pr-0 sm:pr-2 md:pr-4">logo_dev</span> <span v-if="showExperimentalFeatures" class="material-icons text-4xl text-warning pr-0 sm:pr-2 md:pr-4">logo_dev</span>
<ui-tooltip v-if="isChromecastInitialized && !isHttps" direction="bottom" text="Casting requires a secure connection" class="flex items-center">
<span class="material-icons-outlined text-warning text-opacity-50"> cast </span>
</ui-tooltip>
<div v-if="isChromecastInitialized" class="w-6 h-6 mr-2 cursor-pointer"> <div v-if="isChromecastInitialized" class="w-6 h-6 mr-2 cursor-pointer">
<google-cast-launcher></google-cast-launcher> <google-cast-launcher></google-cast-launcher>
</div> </div>
@ -130,6 +133,9 @@ export default {
}, },
isChromecastInitialized() { isChromecastInitialized() {
return this.$store.state.globals.isChromecastInitialized return this.$store.state.globals.isChromecastInitialized
},
isHttps() {
return location.protocol === 'https:' || process.env.NODE_ENV === 'development'
} }
}, },
methods: { methods: {