Browse Source

chore: fluff

pull/142/head
Matthew Raymer 3 weeks ago
parent
commit
1eb14ca379
  1. 132
      src/views/TestView.vue

132
src/views/TestView.vue

@ -38,28 +38,16 @@
<div class="mt-8"> <div class="mt-8">
<h2 class="text-xl font-bold mb-4">SQL Operations</h2> <h2 class="text-xl font-bold mb-4">SQL Operations</h2>
<div class="flex gap-2 mt-2"> <div class="flex gap-2 mt-2">
<button <button :class="sqlLinkClasses" @click="setAllTablesQuery">
:class="sqlLinkClasses"
@click="setAllTablesQuery"
>
All Tables All Tables
</button> </button>
<button <button :class="sqlLinkClasses" @click="setAccountsQuery">
:class="sqlLinkClasses"
@click="setAccountsQuery"
>
Accounts Accounts
</button> </button>
<button <button :class="sqlLinkClasses" @click="setContactsQuery">
:class="sqlLinkClasses"
@click="setContactsQuery"
>
Contacts Contacts
</button> </button>
<button <button :class="sqlLinkClasses" @click="setSettingsQuery">
:class="sqlLinkClasses"
@click="setSettingsQuery"
>
Settings Settings
</button> </button>
</div> </div>
@ -71,10 +59,7 @@
></textarea> ></textarea>
</div> </div>
<div class="mt-4"> <div class="mt-4">
<button <button :class="primaryButtonClasses" @click="executeSql">
:class="primaryButtonClasses"
@click="executeSql"
>
Execute Execute
</button> </button>
</div> </div>
@ -114,10 +99,7 @@
<div> <div>
Register Passkey Register Passkey
<button <button :class="primaryButtonClasses" @click="register()">
:class="primaryButtonClasses"
@click="register()"
>
Simplewebauthn Simplewebauthn
</button> </button>
</div> </div>
@ -130,40 +112,25 @@
> >
Simplewebauthn Simplewebauthn
</button> </button>
<button <button :class="primaryButtonClasses" @click="createJwtNavigator()">
:class="primaryButtonClasses"
@click="createJwtNavigator()"
>
Navigator Navigator
</button> </button>
</div> </div>
<div v-if="jwt"> <div v-if="jwt">
Verify New JWT Verify New JWT
<button <button :class="primaryButtonClasses" @click="verifySimplewebauthn()">
:class="primaryButtonClasses"
@click="verifySimplewebauthn()"
>
Simplewebauthn Simplewebauthn
</button> </button>
<button <button :class="primaryButtonClasses" @click="verifyWebCrypto()">
:class="primaryButtonClasses"
@click="verifyWebCrypto()"
>
WebCrypto WebCrypto
</button> </button>
<button <button :class="primaryButtonClasses" @click="verifyP256()">
:class="primaryButtonClasses"
@click="verifyP256()"
>
p256 - broken p256 - broken
</button> </button>
</div> </div>
<div v-else>Verify New JWT -- requires creation first</div> <div v-else>Verify New JWT -- requires creation first</div>
<button <button :class="primaryButtonClasses" @click="verifyMyJwt()">
:class="primaryButtonClasses"
@click="verifyMyJwt()"
>
Verify Hard-Coded JWT Verify Hard-Coded JWT
</button> </button>
</div> </div>
@ -205,7 +172,7 @@ import { AppString, NotificationIface } from "../constants/app";
import { import {
NOTIFY_SQL_ERROR, NOTIFY_SQL_ERROR,
createSqlErrorMessage, createSqlErrorMessage,
createPasskeyNameModal createPasskeyNameModal,
} from "../constants/notifications"; } from "../constants/notifications";
import * as vcLib from "../libs/crypto/vc"; import * as vcLib from "../libs/crypto/vc";
import * as cryptoLib from "../libs/crypto"; import * as cryptoLib from "../libs/crypto";
@ -411,9 +378,9 @@ export default class Help extends Vue {
label: "Toast", label: "Toast",
classes: this.darkButtonClasses, classes: this.darkButtonClasses,
notification: { notification: {
group: 'alert', group: "alert",
type: 'toast', type: "toast",
title: 'Toast', title: "Toast",
text: "I'm a toast. Without a timeout, I'm stuck.", text: "I'm a toast. Without a timeout, I'm stuck.",
}, },
timeout: 5000, timeout: 5000,
@ -422,10 +389,10 @@ export default class Help extends Vue {
label: "Info", label: "Info",
classes: this.secondaryButtonClasses, classes: this.secondaryButtonClasses,
notification: { notification: {
group: 'alert', group: "alert",
type: 'info', type: "info",
title: 'Information Alert', title: "Information Alert",
text: 'Just wanted you to know.', text: "Just wanted you to know.",
}, },
timeout: 5000, timeout: 5000,
}, },
@ -433,10 +400,10 @@ export default class Help extends Vue {
label: "Success", label: "Success",
classes: this.successButtonClasses, classes: this.successButtonClasses,
notification: { notification: {
group: 'alert', group: "alert",
type: 'success', type: "success",
title: 'Success Alert', title: "Success Alert",
text: 'Congratulations!', text: "Congratulations!",
}, },
timeout: 5000, timeout: 5000,
}, },
@ -444,10 +411,10 @@ export default class Help extends Vue {
label: "Warning", label: "Warning",
classes: this.warningButtonClasses, classes: this.warningButtonClasses,
notification: { notification: {
group: 'alert', group: "alert",
type: 'warning', type: "warning",
title: 'Warning Alert', title: "Warning Alert",
text: 'You might wanna look at this.', text: "You might wanna look at this.",
}, },
timeout: 5000, timeout: 5000,
}, },
@ -455,10 +422,10 @@ export default class Help extends Vue {
label: "Danger", label: "Danger",
classes: this.dangerButtonClasses, classes: this.dangerButtonClasses,
notification: { notification: {
group: 'alert', group: "alert",
type: 'danger', type: "danger",
title: 'Danger Alert', title: "Danger Alert",
text: 'Something terrible has happened!', text: "Something terrible has happened!",
}, },
timeout: 5000, timeout: 5000,
}, },
@ -466,10 +433,10 @@ export default class Help extends Vue {
label: "Notif ON", label: "Notif ON",
classes: this.secondaryButtonClasses, classes: this.secondaryButtonClasses,
notification: { notification: {
group: 'modal', group: "modal",
type: 'notification-permission', type: "notification-permission",
title: 'Notification Permission', title: "Notification Permission",
text: 'Enable notifications?', text: "Enable notifications?",
}, },
timeout: -1, timeout: -1,
}, },
@ -477,10 +444,10 @@ export default class Help extends Vue {
label: "Notif MUTE", label: "Notif MUTE",
classes: this.secondaryButtonClasses, classes: this.secondaryButtonClasses,
notification: { notification: {
group: 'modal', group: "modal",
type: 'notification-mute', type: "notification-mute",
title: 'Notification Settings', title: "Notification Settings",
text: 'Notifications muted', text: "Notifications muted",
}, },
timeout: -1, timeout: -1,
}, },
@ -488,10 +455,10 @@ export default class Help extends Vue {
label: "Notif OFF", label: "Notif OFF",
classes: this.secondaryButtonClasses, classes: this.secondaryButtonClasses,
notification: { notification: {
group: 'modal', group: "modal",
type: 'notification-off', type: "notification-off",
title: 'Notifications', title: "Notifications",
text: 'Notifications turned off', text: "Notifications turned off",
}, },
timeout: -1, timeout: -1,
}, },
@ -553,17 +520,14 @@ export default class Help extends Vue {
// Use service methods for temp table operations // Use service methods for temp table operations
const temp = await this.$getTemp(SHARED_PHOTO_BASE64_KEY); const temp = await this.$getTemp(SHARED_PHOTO_BASE64_KEY);
if (temp) { if (temp) {
await this.$updateEntity( await this.$updateEntity("temp", { blobB64 }, "id = ?", [
"temp", SHARED_PHOTO_BASE64_KEY,
{ blobB64 }, ]);
"id = ?",
[SHARED_PHOTO_BASE64_KEY]
);
} else { } else {
await this.$insertEntity( await this.$insertEntity(
"temp", "temp",
{ id: SHARED_PHOTO_BASE64_KEY, blobB64 }, { id: SHARED_PHOTO_BASE64_KEY, blobB64 },
["id", "blobB64"] ["id", "blobB64"],
); );
} }
} }
@ -596,7 +560,7 @@ export default class Help extends Vue {
}, },
async () => { async () => {
this.$router.push({ name: "new-edit-account" }); this.$router.push({ name: "new-edit-account" });
} },
); );
this.$notify(modalConfig, -1); this.$notify(modalConfig, -1);

Loading…
Cancel
Save