Skip to content

Commit 5392e6e

Browse files
committed
Ask confirmation to clear history
1 parent f7692c4 commit 5392e6e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

electron_app/src/components/History.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
</template>
6969
<script>
7070
import ImageItem from '../components/ImageItem.vue'
71+
import {native_confirm} from "../native_functions_vue_bridge.js";
7172
import {share_on_arthub} from '../utils.js'
7273
7374
import Vue from 'vue'
@@ -135,8 +136,10 @@ export default {
135136
return r;
136137
},
137138
138-
clear_history(){
139-
Vue.set( this.app_state.app_data, "history", {});
139+
clear_history(){
140+
if (native_confirm("Are you sure you want to clear history?")){
141+
Vue.set( this.app_state.app_data, "history", {});
142+
}
140143
},
141144
142145
share_on_arthub(box){

0 commit comments

Comments
 (0)