mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
214 lines
6.0 KiB
214 lines
6.0 KiB
4 years ago
|
<template>
|
||
|
<div>
|
||
2 years ago
|
<h3 class="text-center mb-5">Version And Update</h3>
|
||
4 years ago
|
|
||
|
<v-simple-table dense>
|
||
3 years ago
|
<template #default>
|
||
4 years ago
|
<tbody>
|
||
3 years ago
|
<tr>
|
||
2 years ago
|
<td>Version</td>
|
||
3 years ago
|
<td>
|
||
3 years ago
|
<span @contextmenu="rightClick">{{ $store.state.settings.version }}</span>
|
||
3 years ago
|
</td>
|
||
|
</tr>
|
||
|
<!-- <tr>-->
|
||
|
<!-- <td>-->
|
||
|
<!-- Check for updates-->
|
||
|
<!-- </td>-->
|
||
|
<!-- <td>-->
|
||
|
<!-- <v-switch-->
|
||
|
<!-- flat-->
|
||
|
<!-- v-model="checkForUpdate"-->
|
||
|
<!-- color="grey "-->
|
||
|
<!-- ></v-switch>-->
|
||
|
<!-- </td>-->
|
||
|
<!-- </tr>-->
|
||
|
<tr @dblclick="enableAppRefresh = true">
|
||
2 years ago
|
<td>Auto update</td>
|
||
3 years ago
|
<td>
|
||
2 years ago
|
<v-switch v-model="autoUpdate" flat color="grey " />
|
||
3 years ago
|
</td>
|
||
|
</tr>
|
||
|
<tr v-if="enableAppRefresh">
|
||
2 years ago
|
<td>Application refresh</td>
|
||
3 years ago
|
<td>
|
||
2 years ago
|
<v-btn @click="applicationRefresh"> Refresh </v-btn>
|
||
3 years ago
|
</td>
|
||
|
</tr>
|
||
4 years ago
|
</tbody>
|
||
|
</template>
|
||
|
</v-simple-table>
|
||
|
|
||
|
<dlgLabelSubmitCancel
|
||
|
v-if="dialogShow"
|
||
3 years ago
|
:dialog-show="gaDialogShow"
|
||
|
:actions-mtd="gaDialogFunction"
|
||
4 years ago
|
heading="Click submit to disable Google Analytics."
|
||
|
type="primary"
|
||
|
/>
|
||
|
|
||
|
<dlgLabelSubmitCancel
|
||
|
v-if="dialogShow"
|
||
3 years ago
|
:dialog-show="logReportDialogShow"
|
||
|
:actions-mtd="logReportDialogFunction"
|
||
4 years ago
|
heading="Error reporting helps us to build a better product. Press cancel to help us build a better product ?"
|
||
|
type="primary"
|
||
|
/>
|
||
|
</div>
|
||
|
</template>
|
||
|
<script>
|
||
2 years ago
|
import dlgLabelSubmitCancel from '../../utils/DlgLabelSubmitCancel';
|
||
4 years ago
|
|
||
|
export default {
|
||
3 years ago
|
components: { dlgLabelSubmitCancel },
|
||
4 years ago
|
|
||
3 years ago
|
data() {
|
||
4 years ago
|
return {
|
||
|
rightClickCount: 0,
|
||
|
enableAppRefresh: false,
|
||
|
gaDialogShow: false,
|
||
|
logReportDialogShow: false,
|
||
|
languages: [
|
||
2 years ago
|
{ label: 'English', value: 'en' },
|
||
4 years ago
|
// {label: 'Japanese', value: 'ja'},
|
||
|
// {label: 'Chinese', value: 'zh'}
|
||
|
],
|
||
2 years ago
|
item: 'default',
|
||
|
};
|
||
4 years ago
|
},
|
||
|
computed: {
|
||
|
checkForUpdate: {
|
||
3 years ago
|
get() {
|
||
2 years ago
|
return this.$store.state.settings.checkForUpdate;
|
||
3 years ago
|
},
|
||
3 years ago
|
set(value) {
|
||
2 years ago
|
this.$store.commit('settings/MutCheckForUpdate', value);
|
||
|
},
|
||
4 years ago
|
},
|
||
|
autoUpdate: {
|
||
3 years ago
|
get() {
|
||
2 years ago
|
return this.$store.state.settings.downloadAndUpdateRelease;
|
||
3 years ago
|
},
|
||
3 years ago
|
set(value) {
|
||
2 years ago
|
this.$store.commit('settings/MutDownloadAndUpdateRelease', value);
|
||
|
},
|
||
4 years ago
|
},
|
||
|
isGaEnabled: {
|
||
3 years ago
|
get() {
|
||
2 years ago
|
return this.$store.state.settings.isGaEnabled;
|
||
3 years ago
|
},
|
||
3 years ago
|
set(value) {
|
||
2 years ago
|
this.$store.commit('settings/MutToggleGaEnabled', value);
|
||
|
},
|
||
4 years ago
|
},
|
||
|
isErrorReportingEnabled: {
|
||
3 years ago
|
get() {
|
||
2 years ago
|
return this.$store.state.settings.isErrorReportingEnabled;
|
||
3 years ago
|
},
|
||
3 years ago
|
set(value) {
|
||
2 years ago
|
this.$store.commit('settings/MutToggleErrorReportingEnabled', value);
|
||
|
},
|
||
4 years ago
|
},
|
||
|
isTelemetryEnabled: {
|
||
3 years ago
|
get() {
|
||
2 years ago
|
return this.$store.state.settings.isErrorReportingEnabled;
|
||
3 years ago
|
},
|
||
3 years ago
|
set(value) {
|
||
2 years ago
|
this.$store.commit('settings/MutToggleTelemetryEnabled', value);
|
||
|
},
|
||
4 years ago
|
},
|
||
|
dialogShow: {
|
||
3 years ago
|
get() {
|
||
2 years ago
|
return this.value;
|
||
3 years ago
|
},
|
||
3 years ago
|
set(val) {
|
||
2 years ago
|
this.$emit('input', val);
|
||
|
},
|
||
4 years ago
|
},
|
||
|
language: {
|
||
3 years ago
|
get() {
|
||
2 years ago
|
return this.$store.state.settings.language;
|
||
3 years ago
|
},
|
||
3 years ago
|
set(val) {
|
||
2 years ago
|
this.$store.commit('settings/MutSetLanguage', val);
|
||
|
},
|
||
|
},
|
||
4 years ago
|
},
|
||
|
methods: {
|
||
3 years ago
|
rightClick() {
|
||
2 years ago
|
this.rightClickCount++;
|
||
4 years ago
|
if (this.rightClickCount > 5) {
|
||
|
// require('electron').remote.getCurrentWindow().toggleDevTools();
|
||
2 years ago
|
this.rightClickCount = 0;
|
||
4 years ago
|
}
|
||
|
},
|
||
3 years ago
|
async applicationRefresh() {
|
||
2 years ago
|
localStorage.removeItem('vuex');
|
||
|
location.reload();
|
||
4 years ago
|
},
|
||
3 years ago
|
toggleGa(event) {
|
||
4 years ago
|
if (this.isGaEnabled) {
|
||
2 years ago
|
this.gaDialogShow = true;
|
||
|
} else {
|
||
|
this.isGaEnabled = true;
|
||
|
}
|
||
4 years ago
|
},
|
||
3 years ago
|
toggleLogReport(event) {
|
||
4 years ago
|
if (this.isErrorReportingEnabled) {
|
||
2 years ago
|
this.logReportDialogShow = true;
|
||
|
} else {
|
||
|
this.isErrorReportingEnabled = true;
|
||
|
}
|
||
4 years ago
|
},
|
||
3 years ago
|
logReportDialogFunction(action) {
|
||
4 years ago
|
if (action !== 'hideDialog' && this.$store.state.users.user && this.$store.state.users.user.email) {
|
||
2 years ago
|
this.isErrorReportingEnabled = false;
|
||
4 years ago
|
} else {
|
||
2 years ago
|
this.$toast
|
||
|
.error('Only a registered user can disable Error Reporting, Please Login then disable.')
|
||
|
.goAway(5000);
|
||
4 years ago
|
}
|
||
2 years ago
|
this.logReportDialogShow = false;
|
||
4 years ago
|
},
|
||
3 years ago
|
gaDialogFunction(action) {
|
||
4 years ago
|
if (action !== 'hideDialog') {
|
||
|
if (this.$store.state.users.user && this.$store.state.users.user.email) {
|
||
2 years ago
|
this.isGaEnabled = false;
|
||
4 years ago
|
} else {
|
||
2 years ago
|
this.$toast
|
||
|
.error('Only a registered user can disable Google Analytics, Please Login then disable.')
|
||
|
.goAway(5000);
|
||
4 years ago
|
}
|
||
|
}
|
||
2 years ago
|
this.gaDialogShow = false;
|
||
|
},
|
||
|
},
|
||
|
};
|
||
4 years ago
|
</script>
|
||
|
|
||
2 years ago
|
<style scoped></style>
|
||
4 years ago
|
<!--
|
||
|
/**
|
||
|
* @copyright Copyright (c) 2021, Xgene Cloud Ltd
|
||
|
*
|
||
|
* @author Naveen MR <oof1lab@gmail.com>
|
||
|
* @author Pranav C Balan <pranavxc@gmail.com>
|
||
|
*
|
||
|
* @license GNU AGPL version 3 or any later version
|
||
|
*
|
||
|
* This program is free software: you can redistribute it and/or modify
|
||
|
* it under the terms of the GNU Affero General Public License as
|
||
|
* published by the Free Software Foundation, either version 3 of the
|
||
|
* License, or (at your option) any later version.
|
||
|
*
|
||
|
* This program is distributed in the hope that it will be useful,
|
||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
* GNU Affero General Public License for more details.
|
||
|
*
|
||
|
* You should have received a copy of the GNU Affero General Public License
|
||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||
|
*
|
||
|
*/
|
||
|
-->
|