Skip to content

Commit 447bbe6

Browse files
yakuteroguzhaninanFaruk Oruçdependabot[bot]
authored
Version v1.2.1 (#62)
* Update version * Add auth expire check * Add linux build script and update installer scripts * auth and UI bug fix * update electron version for dynamically change top bar (#37) * Update: Electron version to 7.0.0 * Add: Operating system dark mode support * Update: Private notes size is enlarged * add menu item became singular * fix import function (#38) * Fix import bug after electron update to 7.0.0 * Fix openexternal link issue and add success callback to paddle upgrade * Refactor copy content functions * Add detail mixin and implement for all detail pages * Fix server detail page * update servers * Improve search function * pre-release * change company logo at detail and create * added Generate tooltip * Add custom title bar * Implement a global search on the title bar * added closeDevTools * Update login page style * fix height * Fix title-bar drag issue * added server field * Update login page * Fix quit issue * update version 1.0.2 * add nvm usage to README * Update electron and axios * updated electron version * fix top bar links * removed paddle script * add http cookie authentication * fix check update url * update version to 1.0.3 * Bump path-parse from 1.0.6 to 1.0.7 (#50) Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7. - [Release notes](https://github.com/jbgutierrez/path-parse/releases) - [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7) --- updated-dependencies: - dependency-name: path-parse dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump dns-packet from 1.3.1 to 1.3.4 (#49) Bumps [dns-packet](https://github.com/mafintosh/dns-packet) from 1.3.1 to 1.3.4. - [Release notes](https://github.com/mafintosh/dns-packet/releases) - [Changelog](https://github.com/mafintosh/dns-packet/blob/master/CHANGELOG.md) - [Commits](mafintosh/dns-packet@v1.3.1...v1.3.4) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump hosted-git-info from 2.8.8 to 2.8.9 (#48) Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9. - [Release notes](https://github.com/npm/hosted-git-info/releases) - [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md) - [Commits](npm/hosted-git-info@v2.8.8...v2.8.9) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * upgrade electron builder version for mac arm * update readme for build * add build information * add password check and refactor password buttons * add hover color to button components * refactor delete and edit buttons on detail pages * Refactor detail delete buttons * refactor textarea components * feature always on top * update version and readme * refactor: refactor export logic * refactor: refactor export * Bump terser from 4.8.0 to 4.8.1 (#59) Bumps [terser](https://github.com/terser/terser) from 4.8.0 to 4.8.1. - [Release notes](https://github.com/terser/terser/releases) - [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md) - [Commits](https://github.com/terser/terser/commits) --- updated-dependencies: - dependency-name: terser dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump electron from 11.5.0 to 15.5.5 (#58) Bumps [electron](https://github.com/electron/electron) from 11.5.0 to 15.5.5. - [Release notes](https://github.com/electron/electron/releases) - [Changelog](https://github.com/electron/electron/blob/main/docs/breaking-changes.md) - [Commits](electron/electron@v11.5.0...v15.5.5) --- updated-dependencies: - dependency-name: electron dependency-type: direct:development ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump eventsource from 1.1.0 to 1.1.1 (#57) Bumps [eventsource](https://github.com/EventSource/eventsource) from 1.1.0 to 1.1.1. - [Release notes](https://github.com/EventSource/eventsource/releases) - [Changelog](https://github.com/EventSource/eventsource/blob/master/HISTORY.md) - [Commits](EventSource/eventsource@v1.1.0...v1.1.1) --- updated-dependencies: - dependency-name: eventsource dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump ejs from 3.1.6 to 3.1.8 (#61) Bumps [ejs](https://github.com/mde/ejs) from 3.1.6 to 3.1.8. - [Release notes](https://github.com/mde/ejs/releases) - [Changelog](https://github.com/mde/ejs/blob/main/CHANGELOG.md) - [Commits](mde/ejs@v3.1.6...v3.1.8) --- updated-dependencies: - dependency-name: ejs dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump plist from 3.0.4 to 3.0.6 (#60) Bumps [plist](https://github.com/TooTallNate/node-plist) from 3.0.4 to 3.0.6. - [Release notes](https://github.com/TooTallNate/node-plist/releases) - [Changelog](https://github.com/TooTallNate/plist.js/blob/master/History.md) - [Commits](https://github.com/TooTallNate/node-plist/commits) --- updated-dependencies: - dependency-name: plist dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * refactor: update version to 1.2.1 Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Oguzhan INAN <[email protected]> Co-authored-by: Faruk Oruç <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent 36e83ec commit 447bbe6

File tree

4 files changed

+169
-80
lines changed

4 files changed

+169
-80
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "passwall",
3-
"version": "1.0.4",
3+
"version": "1.2.1",
44
"author": "PassWall <[email protected]>",
55
"description": "PassWall Desktop",
66
"license": "MIT",
@@ -100,7 +100,7 @@
100100
"css-loader": "^0.28.11",
101101
"del": "^3.0.0",
102102
"devtron": "^1.4.0",
103-
"electron": "^11.4.1",
103+
"electron": "^15.5.5",
104104
"electron-builder": "^22.11.7",
105105
"electron-debug": "^1.5.0",
106106
"electron-devtools-installer": "^2.2.4",

src/renderer/App.vue

Lines changed: 81 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,12 @@
5050

5151
<script>
5252
import fs from 'fs'
53+
import path from 'path'
5354
import Papa from 'papaparse'
5455
import { remote, ipcRenderer } from 'electron'
5556
import { mapActions, mapMutations, mapState } from 'vuex'
5657
import CryptoUtils from '@/utils/crypto'
58+
import SystemService from '@/api/services/System'
5759
5860
export default {
5961
data() {
@@ -96,20 +98,89 @@ export default {
9698
},
9799
98100
async onExport() {
99-
const filePath = remote.dialog.showSaveDialogSync(null)
101+
const dir = remote.dialog.showOpenDialogSync({
102+
title: 'Select Export Directory',
103+
properties: ['openDirectory', 'createDirectory']
104+
})
100105
101-
if (!filePath) {
106+
if (dir.length === 0) {
102107
return
103108
}
104-
109+
105110
try {
106-
const data = await this.Export()
107-
108-
const itemList = JSON.parse(CryptoUtils.aesDecrypt(data))
109-
itemList.forEach(item => CryptoUtils.decryptFields(item))
110-
111-
const csvContent = Papa.unparse(itemList)
112-
fs.writeFileSync(filePath, csvContent)
111+
const { data } = await SystemService.Export()
112+
113+
const itemList = JSON.parse(CryptoUtils.aesDecrypt(data.data))
114+
115+
// console.log(itemList.Logins)
116+
const LoginEncryptedFields = ['username', 'password', 'extra']
117+
itemList.Logins.forEach(item => CryptoUtils.decryptFields(item, LoginEncryptedFields))
118+
119+
const ServerEncryptedFields = ['ip','username','password','hosting_username','hosting_password','admin_username','admin_password','extra']
120+
itemList.Servers.forEach(item => CryptoUtils.decryptFields(item, ServerEncryptedFields))
121+
122+
const NoteEncryptedFields = ['note']
123+
itemList.Notes.forEach(item => CryptoUtils.decryptFields(item, NoteEncryptedFields))
124+
125+
const EmailEncryptedFields = ['email', 'password']
126+
itemList.Emails.forEach(item => CryptoUtils.decryptFields(item, EmailEncryptedFields))
127+
128+
const CreditCardEncryptedFields = ['type', 'number', 'expiry_date', 'cardholder_name', 'verification_number']
129+
itemList.CreditCards.forEach(item => CryptoUtils.decryptFields(item, CreditCardEncryptedFields))
130+
131+
const BankAccountEncryptedFields = ['account_name', 'account_number', 'iban', 'currency', 'password']
132+
itemList.BankAccounts.forEach(item => CryptoUtils.decryptFields(item, BankAccountEncryptedFields))
133+
134+
const contentLogins = Papa.unparse(itemList.Logins)
135+
fs.writeFile(path.join(dir[0],"logins.csv"), contentLogins, function (err) {
136+
if (err) {
137+
this.$notifyError(this.$t('Something went wrong.'))
138+
console.log(err)
139+
}
140+
});
141+
142+
const contentServer = Papa.unparse(itemList.Servers)
143+
fs.writeFile(path.join(dir[0],"servers.csv"), contentServer, function (err) {
144+
if (err) {
145+
this.$notifyError(this.$t('Something went wrong.'))
146+
console.log(err)
147+
}
148+
});
149+
150+
const contentNote = Papa.unparse(itemList.Notes)
151+
fs.writeFile(path.join(dir[0],"notes.csv"), contentNote, function (err) {
152+
if (err) {
153+
this.$notifyError(this.$t('Something went wrong.'))
154+
console.log(err)
155+
}
156+
});
157+
158+
const contentEmail = Papa.unparse(itemList.Emails)
159+
fs.writeFile(path.join(dir[0],"emails.csv"), contentEmail, function (err) {
160+
if (err) {
161+
this.$notifyError(this.$t('Something went wrong.'))
162+
console.log(err)
163+
}
164+
});
165+
166+
const contentCreditCard = Papa.unparse(itemList.CreditCards)
167+
fs.writeFile(path.join(dir[0],"credit_cards.csv"), contentCreditCard, function (err) {
168+
if (err) {
169+
this.$notifyError(this.$t('Something went wrong.'))
170+
console.log(err)
171+
}
172+
});
173+
174+
const contentBankAccount = Papa.unparse(itemList.BankAccounts)
175+
fs.writeFile(path.join(dir[0],"credit_cards.csv"), contentBankAccount, function (err) {
176+
if (err) {
177+
this.$notifyError(this.$t('Something went wrong.'))
178+
console.log(err)
179+
}
180+
});
181+
182+
this.$notifySuccess(this.$t(`All records exported successfully.`))
183+
113184
} catch (error) {
114185
this.$notifyError(this.$t('Something went wrong.'))
115186
console.log(error)

src/renderer/api/services/System.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ export default class SystemService {
1010
}
1111

1212
static async Export() {
13-
return HTTPClient.post(`/api/system/export`)
13+
return HTTPClient.get(`/api/system/export`)
1414
}
1515
}

0 commit comments

Comments
 (0)