Skip to content

Commit

Permalink
Added Multi-Pastes and edit for pastes
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianFun123 committed Jul 4, 2021
1 parent 377e4d0 commit d3ac359
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions frontend/src/views/Paste.vue
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export default {
}
this.title = CryptoJS.AES.decrypt(paste.title, key).toString(CryptoJS.enc.Utf8);
console.log(this.title)
this.rawContent = CryptoJS.AES.decrypt(paste.content, key).toString(CryptoJS.enc.Utf8);
if (this.rawContent === "")
this.validPassword = false
Expand All @@ -129,10 +129,12 @@ export default {
} else
this.validPassword = true
if (paste.type == 'PASTE')
if (paste.type == 'PASTE') {
this.highlight(this.title, this.rawContent)
else if (paste.type == 'MULTI_PASTE') {
this.multiPastes = JSON.parse(paste.content)
} else if (paste.type == 'MULTI_PASTE') {
console.log();
this.multiPastes = JSON.parse(this.rawContent)
this.changeTab(0)
}
} else
Expand Down

0 comments on commit d3ac359

Please sign in to comment.