Disable insecure

This commit is contained in:
Troplo 2021-04-11 16:57:56 +10:00
parent 596f3f9d6c
commit e2aa17b738
2 changed files with 15 additions and 2 deletions

View File

@ -106,7 +106,9 @@
<p>Build Date: {{$store.state.client.buildDate}}</p>
<p v-if="$store.state.client.development">!! DEVELOPMENT MODE !! {{$store.state.client.domain}}</p>
<p style="color: red" v-if="!$store.state.client.secure">!! BEING ACCESSED INSECURELY !!</p>
<p style="color: red" v-if="checkInsecure && $store.state.client.secure">!! INSECURE WARNING OVERRIDE !!</p>
<div class="buttons">
<b-button class="is-danger" @click="disableInsecure()" v-if="$store.state.debug && !$store.state.secure && !$store.state.client.development">Debug: Disable insecure warning</b-button>
<b-button type="is-info" @click="langModal = true">{{ $t("languages.title") }}</b-button>
<b-button type="is-info" @click="feedbackModal = true">Provide Feedback</b-button>
</div>
@ -115,7 +117,7 @@
<script>
import AjaxErrorHandler from ".././assets/js/errorHandler";
export default {
name: "locale-changer",
name: "Footer",
data() {
return {
feedbackModal: false,
@ -131,7 +133,15 @@ export default {
},
};
},
computed: {
checkInsecure() {
return window.location.protocol === "http:";
}
},
methods: {
disableInsecure() {
this.$store.commit("setSecure", true);
},
doFeedback() {
this.feedback.loading = true;
this.axios

View File

@ -179,7 +179,10 @@ export default new Vuex.Store({
},
setCurrentConversation(state, id) {
state.user.currentConversation = id
}
},
setSecure(state, value) {
state.client.secure = value;
},
},
actions: {},
modules: {}