Add history + more components
This commit is contained in:
@@ -35,6 +35,7 @@ const approuter = new Vue({
|
||||
el: "#main",
|
||||
data: {
|
||||
uuid: "{{ user_settings.id }}",
|
||||
ready: null,
|
||||
},
|
||||
|
||||
computed: {
|
||||
@@ -43,7 +44,33 @@ const approuter = new Vue({
|
||||
}
|
||||
},
|
||||
|
||||
mounted: function() {},
|
||||
async created () {
|
||||
|
||||
if (operations == undefined) {
|
||||
|
||||
Swal.fire({title: "{{_('The application cannot be launched. Webcrypto is not available.<br><br>Try another browser!') | escapejs}}", icon: "error", showConfirmButton: false})
|
||||
|
||||
this.ready = false
|
||||
|
||||
} else {
|
||||
|
||||
// Try to generate a random keyPair and encrypting stuff before accepting the client
|
||||
try {
|
||||
|
||||
const keyPair = await this.generateKeyPair()
|
||||
|
||||
this.ready = true
|
||||
|
||||
} catch (err) {
|
||||
|
||||
Swal.fire({title: "{{_('An error occured during testing Webcrypto. Please use a compatible browser.') | escapejs}}", icon: "error", showConfirmButton: false})
|
||||
|
||||
this.ready = false
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
async load_keys (aes_key) {
|
||||
@@ -63,7 +90,7 @@ const approuter = new Vue({
|
||||
|
||||
this.$store.commit('encryption/updateKeyPair', keyPair)
|
||||
|
||||
Swal.fire({title: "Successfully loaded K356!", icon: "success", position:"top-end", showConfirmButton: false, toast: true, timer: 1000});
|
||||
Swal.fire({title: "{{_('Successfully loaded K356!') | escapejs}}", icon: "success", position:"top-end", showConfirmButton: false, toast: true, timer: 1000});
|
||||
|
||||
} else {
|
||||
|
||||
@@ -79,7 +106,7 @@ const approuter = new Vue({
|
||||
|
||||
this.$store.commit('encryption/updateKeyPair', keyPair)
|
||||
|
||||
Swal.fire({title: "Successfully created K356!", icon: "success", position:"top-end", showConfirmButton: false, toast: true, timer: 1000});
|
||||
Swal.fire({title: "{{_('Successfully created K356!') | escapejs}}", icon: "success", position:"top-end", showConfirmButton: false, toast: true, timer: 1000});
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -94,6 +94,7 @@ const relationStore = {__proto__: storeMixin, namespaced: true}
|
||||
const propertyStore = {__proto__: storeMixin, namespaced: true}
|
||||
const linkedPropertyStore = {__proto__: storeMixin, namespaced: true}
|
||||
const relationPropertyStore = {__proto__: storeMixin, namespaced: true}
|
||||
const history = {__proto__: storeMixin, namespaced: true}
|
||||
|
||||
const store = new Vuex.Store({
|
||||
modules: {
|
||||
@@ -104,5 +105,6 @@ const store = new Vuex.Store({
|
||||
properties: propertyStore,
|
||||
linkedProperties: linkedPropertyStore,
|
||||
relationProperties: relationPropertyStore,
|
||||
history: history,
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user