diff options
author | Mark Powers <mark@marks.kitchen> | 2021-12-23 16:50:42 -0600 |
---|---|---|
committer | Mark Powers <mark@marks.kitchen> | 2021-12-23 16:50:42 -0600 |
commit | 1d3574d38909bc9aae2792d839023e296fb25791 (patch) | |
tree | c409fbff38083b85356498f636714e6ec74f95e4 /src/html/admin.html | |
parent | 85a103d6a02a50ce28cbb44c2e693000d9b7388d (diff) |
Add email unsubcribe link, update about me, add hello.js
Diffstat (limited to 'src/html/admin.html')
-rw-r--r-- | src/html/admin.html | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/html/admin.html b/src/html/admin.html index 29e4b87..d15598a 100644 --- a/src/html/admin.html +++ b/src/html/admin.html @@ -18,7 +18,7 @@ showSessionTable: false, showUrlTable: false, showLogData: false, - showEmailData: false, + showEmailData: true, }, created() { fetch(new Request('/admin/stats')).then(response => response.json()) @@ -28,6 +28,15 @@ } }); } + function delete_email(id, name){ + if (confirm(`Delete ${name}?`)) { + let path = `/admin/email/${id}` + fetch(new Request(path, { + method: 'delete', + })).then(response => response.json()) + .then(response => this.emails = response); + } + } </script> </head> @@ -130,10 +139,12 @@ <tr> <th>Name</th> <th>Address</th> + <th></th> </tr> <tr v-for="item in emails"> <td>{{item.name}}</td> <td>{{item.address}}</td> + <td><button v-on:click="delete_email(item.id, item.name)">X</button></td> </tr> </table> </div> |