+
+
+ If you make any changes to the passwords, make sure to Encrypt & Save them before closing the page.
+
+
+
+
+
+ `,
+ methods: {
+ async setupWebAssembly() {
+ const go = new Go();
+ const result = await WebAssembly.instantiateStreaming(fetch("mykeys.wasm"), go.importObject);
+ go.run(result.instance);
+ },
+ checkURLParams() {
+ const urlQuery = window.location.search;
+ const urlParams = new URLSearchParams(urlQuery);
+ this.content = urlParams.get("data");
+ },
+ newFile() {
+ this.content = "";
+ this.passphrase = "";
+ this.showOpenFileModal = false;
+ },
+ loadFile(content, passphrase, passwords) {
+ this.content = content;
+ this.passphrase = passphrase;
+ this.passwords = passwords;
+ this.showOpenFileModal = false;
+ },
+ onSave(newContent) {
+ this.content = newContent;
+ window.history.pushState({}, null, `?data=${this.content}`);
+ }
+ },
+ components: {
+ Modal, OpenPasswords, SavePasswords, ListPasswords
+ }
+});
+
+app.mount('#app');
\ No newline at end of file
diff --git a/web/src/components/ListPasswords.js b/web/src/components/ListPasswords.js
new file mode 100644
index 0000000..2022c1d
--- /dev/null
+++ b/web/src/components/ListPasswords.js
@@ -0,0 +1,144 @@
+export default {
+ emits: ['update:passwords', 'done'],
+ props: ['passwords'],
+ data() {
+ return {
+ filterText: "",
+ isMobile: window.innerWidth < 800,
+ cardView: window.innerWidth < 800,
+ styles: {
+ stickyHeader: {
+ position: "sticky",
+ top: "0",
+ background: "white",
+ zIndex: "1"
+ }
+ }
+ }
+ },
+ computed: {
+ filteredPasswords() {
+ return this.passwords.filter(pass => pass.alias.toLowerCase().includes(this.filterText.toLowerCase()));
+ }
+ },
+ template: `
+