stash
This commit is contained in:
parent
9814ec7ecd
commit
197f173097
14 changed files with 170 additions and 89 deletions
|
|
@ -37,9 +37,11 @@
|
|||
<div class="mb-3">
|
||||
<label class="form-label
|
||||
d-block">Delete your data</label>
|
||||
<button type="button" class="btn btn-danger" @click="deleteData">
|
||||
<guarded-button type="button" class="btn btn-danger"
|
||||
confirm-message="Are you sure you want to permanently delete all your data (inventory, locations, settings, friends and files)? Your account itself will stay - this cannot be undone."
|
||||
@confirm="deleteData">
|
||||
Delete
|
||||
</button>
|
||||
</guarded-button>
|
||||
<br>
|
||||
<small>Delete all your data including photos, videos,
|
||||
comments, profile information and more</small>
|
||||
|
|
@ -78,12 +80,15 @@
|
|||
<script>
|
||||
import {mapActions, mapGetters} from 'vuex';
|
||||
import router from "@/router";
|
||||
import GuardedButton from "@/components/GuardedButton.vue";
|
||||
|
||||
//import VueQrcode from '@chenfengyuan/vue-qrcode';
|
||||
|
||||
export default {
|
||||
name: 'Data',
|
||||
components: {},
|
||||
components: {
|
||||
GuardedButton
|
||||
},
|
||||
data: () => ({
|
||||
selectedFile: null,
|
||||
localUserIdentityRecord: null,
|
||||
|
|
@ -106,10 +111,6 @@ export default {
|
|||
async deleteData() {
|
||||
this.deleteError = null;
|
||||
this.deleteSuccess = null;
|
||||
if (!confirm('Are you sure you want to permanently delete all your data (inventory, locations, ' +
|
||||
'settings, friends and files)? Your account itself will stay - this cannot be undone.')) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
const servers = await this.getHomeServers();
|
||||
const response = await servers.delete(this.signAuth, '/api/v1/account_data/');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue