forked from trent_larson/crowd-funder-for-time-pwa
Compare commits
6 Commits
world-fix
...
quicknav-c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5be67fd4c9 | ||
|
|
dda3ad057d | ||
|
|
cf54096326 | ||
| 49c3971cf2 | |||
| cd8bc73bac | |||
|
|
4758a740de |
@@ -40,50 +40,59 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script lang="ts">
|
||||||
export default {
|
import { Vue, Component, Prop, Emit } from "vue-facing-decorator";
|
||||||
props: ["message"],
|
|
||||||
data() {
|
@Component
|
||||||
return {
|
export default class GiftedDialog extends Vue {
|
||||||
giver: null,
|
@Prop message = "";
|
||||||
description: "",
|
|
||||||
hours: "0",
|
giver = null;
|
||||||
visible: false,
|
description = "";
|
||||||
|
hours = "0";
|
||||||
|
visible = false;
|
||||||
|
|
||||||
|
open(giver) {
|
||||||
|
// giver: GiverInputInfo
|
||||||
|
this.giver = giver;
|
||||||
|
this.visible = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
close() {
|
||||||
|
this.visible = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
increment() {
|
||||||
|
this.hours = `${(parseFloat(this.hours) || 0) + 1}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
decrement() {
|
||||||
|
this.hours = `${Math.max(0, (parseFloat(this.hours) || 1) - 1)}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Emit("dialog-result")
|
||||||
|
confirm() {
|
||||||
|
const result = {
|
||||||
|
action: "confirm",
|
||||||
|
giver: this.giver,
|
||||||
|
hours: parseFloat(this.hours),
|
||||||
|
description: this.description,
|
||||||
};
|
};
|
||||||
},
|
this.close();
|
||||||
methods: {
|
this.description = "";
|
||||||
open(giver) {
|
this.giver = null;
|
||||||
// giver: GiverInputInfo
|
this.hours = "0";
|
||||||
this.giver = giver;
|
|
||||||
this.visible = true;
|
return result;
|
||||||
},
|
}
|
||||||
close() {
|
|
||||||
this.visible = false;
|
@Emit("dialog-result")
|
||||||
},
|
cancel() {
|
||||||
increment() {
|
const result = { action: "cancel" };
|
||||||
this.hours = `${(parseFloat(this.hours) || 0) + 1}`;
|
this.close();
|
||||||
},
|
return result;
|
||||||
decrement() {
|
}
|
||||||
this.hours = `${Math.max(0, (parseFloat(this.hours) || 1) - 1)}`;
|
}
|
||||||
},
|
|
||||||
confirm() {
|
|
||||||
this.close();
|
|
||||||
this.$emit("dialog-result", {
|
|
||||||
action: "confirm",
|
|
||||||
giver: this.giver,
|
|
||||||
hours: parseFloat(this.hours),
|
|
||||||
description: this.description,
|
|
||||||
});
|
|
||||||
this.description = "";
|
|
||||||
this.giver = null;
|
|
||||||
this.hours = "0";
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
this.close();
|
|
||||||
this.$emit("dialog-result", { action: "cancel" });
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
93
src/components/QuickNav.vue
Normal file
93
src/components/QuickNav.vue
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
<template>
|
||||||
|
<!-- QUICK NAV -->
|
||||||
|
<nav id="QuickNav" class="fixed bottom-0 left-0 right-0 bg-slate-200 z-50">
|
||||||
|
<ul class="flex text-2xl p-2 gap-2">
|
||||||
|
<!-- Home Feed -->
|
||||||
|
<li
|
||||||
|
:class="{
|
||||||
|
'basis-1/5': true,
|
||||||
|
'rounded-md': true,
|
||||||
|
'bg-slate-400 text-white': selected === 'Home',
|
||||||
|
'text-slate-500': selected !== 'Home',
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<router-link :to="{ name: 'home' }" class="block text-center py-3 px-1">
|
||||||
|
<fa icon="house-chimney" class="fa-fw"></fa>
|
||||||
|
</router-link>
|
||||||
|
</li>
|
||||||
|
<!-- Search -->
|
||||||
|
<li
|
||||||
|
:class="{
|
||||||
|
'basis-1/5': true,
|
||||||
|
'rounded-md': true,
|
||||||
|
'bg-slate-400 text-white': selected === 'Discover',
|
||||||
|
'text-slate-500': selected !== 'Discover',
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<router-link
|
||||||
|
:to="{ name: 'discover' }"
|
||||||
|
class="block text-center py-3 px-1"
|
||||||
|
>
|
||||||
|
<fa icon="magnifying-glass" class="fa-fw"></fa>
|
||||||
|
</router-link>
|
||||||
|
</li>
|
||||||
|
<!-- Projects -->
|
||||||
|
<li
|
||||||
|
:class="{
|
||||||
|
'basis-1/5': true,
|
||||||
|
'rounded-md': true,
|
||||||
|
'bg-slate-400 text-white': selected === 'Projects',
|
||||||
|
'text-slate-500': selected !== 'Projects',
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<router-link
|
||||||
|
:to="{ name: 'projects' }"
|
||||||
|
class="block text-center py-3 px-1"
|
||||||
|
>
|
||||||
|
<fa icon="folder-open" class="fa-fw"></fa>
|
||||||
|
</router-link>
|
||||||
|
</li>
|
||||||
|
<!-- Contacts -->
|
||||||
|
<li
|
||||||
|
:class="{
|
||||||
|
'basis-1/5': true,
|
||||||
|
'rounded-md': true,
|
||||||
|
'bg-slate-400 text-white': selected === 'Contacts',
|
||||||
|
'text-slate-500': selected !== 'Contacts',
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<router-link
|
||||||
|
:to="{ name: 'contacts' }"
|
||||||
|
class="block text-center py-3 px-1"
|
||||||
|
>
|
||||||
|
<fa icon="users" class="fa-fw"></fa>
|
||||||
|
</router-link>
|
||||||
|
</li>
|
||||||
|
<!-- Profile -->
|
||||||
|
<li
|
||||||
|
:class="{
|
||||||
|
'basis-1/5': true,
|
||||||
|
'rounded-md': true,
|
||||||
|
'bg-slate-400 text-white': selected === 'Profile',
|
||||||
|
'text-slate-500': selected !== 'Profile',
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<router-link
|
||||||
|
:to="{ name: 'account' }"
|
||||||
|
class="block text-center py-3 px-1"
|
||||||
|
>
|
||||||
|
<fa icon="circle-user" class="fa-fw"></fa>
|
||||||
|
</router-link>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
import { Component, Vue, Prop } from "vue-facing-decorator";
|
||||||
|
|
||||||
|
@Component
|
||||||
|
export default class QuickNav extends Vue {
|
||||||
|
@Prop selected = "";
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -90,7 +90,7 @@ export function didInfo(did, identifiers, contacts) {
|
|||||||
if (contact) {
|
if (contact) {
|
||||||
return contact.name || "Someone Unnamed in Contacts";
|
return contact.name || "Someone Unnamed in Contacts";
|
||||||
} else if (!did) {
|
} else if (!did) {
|
||||||
return "Unpecified Person";
|
return "Unspecified Person";
|
||||||
} else if (isHiddenDid(did)) {
|
} else if (isHiddenDid(did)) {
|
||||||
return "Someone Not In Network";
|
return "Someone Not In Network";
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -1,52 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- QUICK NAV -->
|
<QuickNav selected="Profile"></QuickNav>
|
||||||
<nav id="QuickNav" class="fixed bottom-0 left-0 right-0 bg-slate-200 z-50">
|
|
||||||
<ul class="flex text-2xl p-2 gap-2">
|
|
||||||
<!-- Home Feed -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link :to="{ name: 'home' }" class="block text-center py-3 px-1">
|
|
||||||
<fa icon="house-chimney" class="fa-fw"></fa>
|
|
||||||
</router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Search -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'discover' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
>
|
|
||||||
<fa icon="magnifying-glass" class="fa-fw"></fa>
|
|
||||||
</router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Projects -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'projects' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
>
|
|
||||||
<fa icon="folder-open" class="fa-fw"></fa>
|
|
||||||
</router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Contacts -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'contacts' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
>
|
|
||||||
<fa icon="users" class="fa-fw"></fa>
|
|
||||||
</router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Profile -->
|
|
||||||
<li class="basis-1/5 rounded-md bg-slate-400 text-white">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'account' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
>
|
|
||||||
<fa icon="circle-user" class="fa-fw"></fa>
|
|
||||||
</router-link>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<!-- CONTENT -->
|
<!-- CONTENT -->
|
||||||
<section id="Content" class="p-6 pb-24">
|
<section id="Content" class="p-6 pb-24">
|
||||||
<!-- Heading -->
|
<!-- Heading -->
|
||||||
@@ -326,6 +279,7 @@ import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
|
|||||||
import { accessToken } from "@/libs/crypto";
|
import { accessToken } from "@/libs/crypto";
|
||||||
import { AxiosError } from "axios/index";
|
import { AxiosError } from "axios/index";
|
||||||
import AlertMessage from "@/components/AlertMessage";
|
import AlertMessage from "@/components/AlertMessage";
|
||||||
|
import QuickNav from "@/components/QuickNav";
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||||
const Buffer = require("buffer/").Buffer;
|
const Buffer = require("buffer/").Buffer;
|
||||||
@@ -339,7 +293,7 @@ interface RateLimits {
|
|||||||
nextWeekBeginDateTime: string;
|
nextWeekBeginDateTime: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Component({ components: { AlertMessage } })
|
@Component({ components: { AlertMessage, QuickNav } })
|
||||||
export default class AccountViewView extends Vue {
|
export default class AccountViewView extends Vue {
|
||||||
Constants = AppString;
|
Constants = AppString;
|
||||||
|
|
||||||
|
|||||||
@@ -1,52 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- QUICK NAV -->
|
<QuickNav selected="Profile"></QuickNav>
|
||||||
<nav id="QuickNav" class="fixed bottom-0 left-0 right-0 bg-slate-200 z-50">
|
|
||||||
<ul class="flex text-2xl p-2 gap-2">
|
|
||||||
<!-- Home Feed -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link :to="{ name: 'home' }" class="block text-center py-3 px-1">
|
|
||||||
<fa icon="house-chimney" class="fa-fw"></fa>
|
|
||||||
</router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Search -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'discover' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
>
|
|
||||||
<fa icon="magnifying-glass" class="fa-fw"></fa>
|
|
||||||
</router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Projects -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'projects' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
>
|
|
||||||
<fa icon="folder-open" class="fa-fw"></fa>
|
|
||||||
</router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Contacts -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'contacts' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
>
|
|
||||||
<fa icon="users" class="fa-fw"></fa>
|
|
||||||
</router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Profile -->
|
|
||||||
<li class="basis-1/5 rounded-md bg-slate-400 text-white">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'account' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
>
|
|
||||||
<fa icon="circle-user" class="fa-fw"></fa>
|
|
||||||
</router-link>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<!-- CONTENT -->
|
<!-- CONTENT -->
|
||||||
<section id="Content" class="p-6 pb-24">
|
<section id="Content" class="p-6 pb-24">
|
||||||
<!-- Heading -->
|
<!-- Heading -->
|
||||||
@@ -80,6 +33,7 @@ import * as R from "ramda";
|
|||||||
import { SimpleSigner } from "@/libs/crypto";
|
import { SimpleSigner } from "@/libs/crypto";
|
||||||
import * as didJwt from "did-jwt";
|
import * as didJwt from "did-jwt";
|
||||||
import AlertMessage from "@/components/AlertMessage";
|
import AlertMessage from "@/components/AlertMessage";
|
||||||
|
import QuickNav from "@/components/QuickNav";
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||||
const Buffer = require("buffer/").Buffer;
|
const Buffer = require("buffer/").Buffer;
|
||||||
@@ -88,6 +42,7 @@ const Buffer = require("buffer/").Buffer;
|
|||||||
components: {
|
components: {
|
||||||
QRCodeVue3,
|
QRCodeVue3,
|
||||||
AlertMessage,
|
AlertMessage,
|
||||||
|
QuickNav,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
export default class ContactQRScanShow extends Vue {
|
export default class ContactQRScanShow extends Vue {
|
||||||
@@ -95,7 +50,6 @@ export default class ContactQRScanShow extends Vue {
|
|||||||
apiServer = "";
|
apiServer = "";
|
||||||
qrValue = "";
|
qrValue = "";
|
||||||
|
|
||||||
// 'created' hook runs when the Vue instance is first created
|
|
||||||
async created() {
|
async created() {
|
||||||
await db.open();
|
await db.open();
|
||||||
const settings = await db.settings.get(MASTER_SETTINGS_KEY);
|
const settings = await db.settings.get(MASTER_SETTINGS_KEY);
|
||||||
|
|||||||
@@ -1,48 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- QUICK NAV -->
|
<QuickNav selected="Contacts"></QuickNav>
|
||||||
<nav id="QuickNav" class="fixed bottom-0 left-0 right-0 bg-slate-200 z-50">
|
|
||||||
<ul class="flex text-2xl p-2 gap-2">
|
|
||||||
<!-- Home Feed -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link :to="{ name: 'home' }" class="block text-center py-3 px-1"
|
|
||||||
><fa icon="house-chimney" class="fa-fw"></fa
|
|
||||||
></router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Search -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'discover' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
><fa icon="magnifying-glass" class="fa-fw"></fa
|
|
||||||
></router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Contacts -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'projects' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
><fa icon="folder-open" class="fa-fw"></fa
|
|
||||||
></router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Contacts -->
|
|
||||||
<li class="basis-1/5 rounded-md bg-slate-400 text-white">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'contacts' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
><fa icon="users" class="fa-fw"></fa
|
|
||||||
></router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Profile -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'account' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
><fa icon="circle-user" class="fa-fw"></fa
|
|
||||||
></router-link>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<section id="Content" class="p-6 pb-24">
|
<section id="Content" class="p-6 pb-24">
|
||||||
<!-- Heading -->
|
<!-- Heading -->
|
||||||
<h1 id="ViewHeading" class="text-4xl text-center font-light pt-4 mb-8">
|
<h1 id="ViewHeading" class="text-4xl text-center font-light pt-4 mb-8">
|
||||||
@@ -254,12 +211,14 @@ import {
|
|||||||
RegisterVerifiableCredential,
|
RegisterVerifiableCredential,
|
||||||
SERVICE_ID,
|
SERVICE_ID,
|
||||||
} from "@/libs/endorserServer";
|
} from "@/libs/endorserServer";
|
||||||
|
import AlertMessage from "@/components/AlertMessage";
|
||||||
|
import QuickNav from "@/components/QuickNav";
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||||
const Buffer = require("buffer/").Buffer;
|
const Buffer = require("buffer/").Buffer;
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
components: { AlertMessage },
|
components: { AlertMessage, QuickNav },
|
||||||
})
|
})
|
||||||
export default class ContactsView extends Vue {
|
export default class ContactsView extends Vue {
|
||||||
activeDid = "";
|
activeDid = "";
|
||||||
|
|||||||
@@ -1,47 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- QUICK NAV -->
|
<QuickNav selected="Discover"></QuickNav>
|
||||||
<nav id="QuickNav" class="fixed bottom-0 left-0 right-0 bg-slate-200 z-50">
|
|
||||||
<ul class="flex text-2xl p-2 gap-2">
|
|
||||||
<!-- Home Feed -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link :to="{ name: 'home' }" class="block text-center py-3 px-1"
|
|
||||||
><fa icon="house-chimney" class="fa-fw"></fa
|
|
||||||
></router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Search -->
|
|
||||||
<li class="basis-1/5 rounded-md bg-slate-400 text-white">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'discover' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
><fa icon="magnifying-glass" class="fa-fw"></fa
|
|
||||||
></router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Projects -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'projects' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
><fa icon="folder-open" class="fa-fw"></fa
|
|
||||||
></router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Contacts -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'contacts' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
><fa icon="users" class="fa-fw"></fa
|
|
||||||
></router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Profile -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'account' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
><fa icon="circle-user" class="fa-fw"></fa
|
|
||||||
></router-link>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<!-- CONTENT -->
|
<!-- CONTENT -->
|
||||||
<section id="Content" class="p-6 pb-24">
|
<section id="Content" class="p-6 pb-24">
|
||||||
@@ -168,16 +126,16 @@ import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
|
|||||||
import * as R from "ramda";
|
import * as R from "ramda";
|
||||||
import { accessToken } from "@/libs/crypto";
|
import { accessToken } from "@/libs/crypto";
|
||||||
import AlertMessage from "@/components/AlertMessage";
|
import AlertMessage from "@/components/AlertMessage";
|
||||||
|
import QuickNav from "@/components/QuickNav";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
components: { AlertMessage },
|
components: { AlertMessage, QuickNav },
|
||||||
})
|
})
|
||||||
export default class DiscoverView extends Vue {
|
export default class DiscoverView extends Vue {
|
||||||
activeDid = "";
|
activeDid = "";
|
||||||
apiServer = "";
|
apiServer = "";
|
||||||
searchTerms = "";
|
searchTerms = "";
|
||||||
|
|
||||||
// 'mounted' hook runs after initial render
|
|
||||||
async mounted() {
|
async mounted() {
|
||||||
await db.open();
|
await db.open();
|
||||||
const settings = await db.settings.get(MASTER_SETTINGS_KEY);
|
const settings = await db.settings.get(MASTER_SETTINGS_KEY);
|
||||||
|
|||||||
@@ -1,52 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- QUICK NAV -->
|
<QuickNav selected="Profile"></QuickNav>
|
||||||
<nav id="QuickNav" class="fixed bottom-0 left-0 right-0 bg-slate-200 z-50">
|
|
||||||
<ul class="flex text-2xl p-2 gap-2">
|
|
||||||
<!-- Home Feed -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link :to="{ name: 'home' }" class="block text-center py-3 px-1">
|
|
||||||
<fa icon="house-chimney" class="fa-fw"></fa>
|
|
||||||
</router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Search -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'discover' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
>
|
|
||||||
<fa icon="magnifying-glass" class="fa-fw"></fa>
|
|
||||||
</router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Projects -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'projects' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
>
|
|
||||||
<fa icon="folder-open" class="fa-fw"></fa>
|
|
||||||
</router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Contacts -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'contacts' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
>
|
|
||||||
<fa icon="users" class="fa-fw"></fa>
|
|
||||||
</router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Profile -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-400">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'account' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
>
|
|
||||||
<fa icon="circle-user" class="fa-fw"></fa>
|
|
||||||
</router-link>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<!-- CONTENT -->
|
<!-- CONTENT -->
|
||||||
<section id="Content" class="p-6 pb-24">
|
<section id="Content" class="p-6 pb-24">
|
||||||
<!-- Heading -->
|
<!-- Heading -->
|
||||||
@@ -228,8 +181,9 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import * as Package from "../../package.json";
|
import * as Package from "../../package.json";
|
||||||
import { Component, Vue } from "vue-facing-decorator";
|
import { Component, Vue } from "vue-facing-decorator";
|
||||||
|
import QuickNav from "@/components/QuickNav";
|
||||||
|
|
||||||
@Component
|
@Component({ components: { QuickNav } })
|
||||||
export default class Help extends Vue {
|
export default class Help extends Vue {
|
||||||
package = Package;
|
package = Package;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,48 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- QUICK NAV -->
|
<QuickNav selected="Home"></QuickNav>
|
||||||
<nav id="QuickNav" class="fixed bottom-0 left-0 right-0 bg-slate-200 z-50">
|
|
||||||
<ul class="flex text-2xl p-2 gap-2">
|
|
||||||
<!-- Home Feed -->
|
|
||||||
<li class="basis-1/5 rounded-md bg-slate-400 text-white">
|
|
||||||
<router-link :to="{ name: 'home' }" class="block text-center py-3 px-1"
|
|
||||||
><fa icon="house-chimney" class="fa-fw"></fa
|
|
||||||
></router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Search -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'discover' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
><fa icon="magnifying-glass" class="fa-fw"></fa
|
|
||||||
></router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Projects -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'projects' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
><fa icon="folder-open" class="fa-fw"></fa
|
|
||||||
></router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Contacts -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'contacts' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
><fa icon="users" class="fa-fw"></fa
|
|
||||||
></router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Profile -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'account' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
><fa icon="circle-user" class="fa-fw"></fa
|
|
||||||
></router-link>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<!-- CONTENT -->
|
<!-- CONTENT -->
|
||||||
<section id="Content" class="p-6 pb-24">
|
<section id="Content" class="p-6 pb-24">
|
||||||
<h1 id="ViewHeading" class="text-4xl text-center font-light pt-4 mb-8">
|
<h1 id="ViewHeading" class="text-4xl text-center font-light pt-4 mb-8">
|
||||||
@@ -124,9 +81,10 @@ import { createAndSubmitGive, didInfo } from "@/libs/endorserServer";
|
|||||||
import { Account } from "@/db/tables/accounts";
|
import { Account } from "@/db/tables/accounts";
|
||||||
import { Contact } from "@/db/tables/contacts";
|
import { Contact } from "@/db/tables/contacts";
|
||||||
import AlertMessage from "@/components/AlertMessage";
|
import AlertMessage from "@/components/AlertMessage";
|
||||||
|
import QuickNav from "@/components/QuickNav";
|
||||||
|
|
||||||
@Options({
|
@Options({
|
||||||
components: { GiftedDialog, AlertMessage },
|
components: { GiftedDialog, AlertMessage, QuickNav },
|
||||||
})
|
})
|
||||||
export default class HomeView extends Vue {
|
export default class HomeView extends Vue {
|
||||||
activeDid = "";
|
activeDid = "";
|
||||||
|
|||||||
@@ -1,52 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- QUICK NAV -->
|
<QuickNav selected="Profile"></QuickNav>
|
||||||
<nav id="QuickNav" class="fixed bottom-0 left-0 right-0 bg-slate-200 z-50">
|
|
||||||
<ul class="flex text-2xl p-2 gap-2">
|
|
||||||
<!-- Home Feed -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link :to="{ name: 'home' }" class="block text-center py-3 px-1">
|
|
||||||
<fa icon="house-chimney" class="fa-fw"></fa>
|
|
||||||
</router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Search -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'discover' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
>
|
|
||||||
<fa icon="magnifying-glass" class="fa-fw"></fa>
|
|
||||||
</router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Projects -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'projects' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
>
|
|
||||||
<fa icon="folder-open" class="fa-fw"></fa>
|
|
||||||
</router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Contacts -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'contacts' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
>
|
|
||||||
<fa icon="users" class="fa-fw"></fa>
|
|
||||||
</router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Profile -->
|
|
||||||
<li class="basis-1/5 rounded-md bg-slate-400 text-white">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'account' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
>
|
|
||||||
<fa icon="circle-user" class="fa-fw"></fa>
|
|
||||||
</router-link>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<!-- CONTENT -->
|
<!-- CONTENT -->
|
||||||
<section id="Content" class="p-6 pb-24">
|
<section id="Content" class="p-6 pb-24">
|
||||||
<!-- Heading -->
|
<!-- Heading -->
|
||||||
@@ -90,8 +43,9 @@ import { Component, Vue } from "vue-facing-decorator";
|
|||||||
import { accountsDB, db } from "@/db";
|
import { accountsDB, db } from "@/db";
|
||||||
import { deriveAddress, generateSeed, newIdentifier } from "@/libs/crypto";
|
import { deriveAddress, generateSeed, newIdentifier } from "@/libs/crypto";
|
||||||
import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
|
import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
|
||||||
|
import QuickNav from "@/components/QuickNav";
|
||||||
|
|
||||||
@Component
|
@Component({ components: { QuickNav } })
|
||||||
export default class AccountViewView extends Vue {
|
export default class AccountViewView extends Vue {
|
||||||
loading = true;
|
loading = true;
|
||||||
|
|
||||||
|
|||||||
@@ -1,48 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- QUICK NAV -->
|
<QuickNav selected="Projects"></QuickNav>
|
||||||
<nav id="QuickNav" class="fixed bottom-0 left-0 right-0 bg-slate-200 z-50">
|
|
||||||
<ul class="flex text-2xl p-2 gap-2">
|
|
||||||
<!-- Home Feed -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link :to="{ name: 'home' }" class="block text-center py-3 px-1"
|
|
||||||
><fa icon="house-chimney" class="fa-fw"></fa
|
|
||||||
></router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Search -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'discover' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
><fa icon="magnifying-glass" class="fa-fw"></fa
|
|
||||||
></router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Projects -->
|
|
||||||
<li class="basis-1/5 rounded-md bg-slate-400 text-white">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'projects' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
><fa icon="folder-open" class="fa-fw"></fa
|
|
||||||
></router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Contacts -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'contacts' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
><fa icon="hand" class="fa-fw"></fa
|
|
||||||
></router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Profile -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'account' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
><fa icon="circle-user" class="fa-fw"></fa
|
|
||||||
></router-link>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<!-- CONTENT -->
|
<!-- CONTENT -->
|
||||||
<section id="Content" class="p-6 pb-24">
|
<section id="Content" class="p-6 pb-24">
|
||||||
<!-- Breadcrumb -->
|
<!-- Breadcrumb -->
|
||||||
@@ -200,9 +157,10 @@ import { createAndSubmitGive } from "@/libs/endorserServer";
|
|||||||
import { accessToken } from "@/libs/crypto";
|
import { accessToken } from "@/libs/crypto";
|
||||||
import { IIdentifier } from "@veramo/core";
|
import { IIdentifier } from "@veramo/core";
|
||||||
import AlertMessage from "@/components/AlertMessage";
|
import AlertMessage from "@/components/AlertMessage";
|
||||||
|
import QuickNav from "@/components/QuickNav";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
components: { GiftedDialog, AlertMessage },
|
components: { GiftedDialog, AlertMessage, QuickNav },
|
||||||
})
|
})
|
||||||
export default class ProjectViewView extends Vue {
|
export default class ProjectViewView extends Vue {
|
||||||
activeDid = "";
|
activeDid = "";
|
||||||
|
|||||||
@@ -1,47 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- QUICK NAV -->
|
<QuickNav selected="Projects"></QuickNav>
|
||||||
<nav id="QuickNav" class="fixed bottom-0 left-0 right-0 bg-slate-200 z-50">
|
|
||||||
<ul class="flex text-2xl p-2 gap-2">
|
|
||||||
<!-- Home Feed -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link :to="{ name: 'home' }" class="block text-center py-3 px-1"
|
|
||||||
><fa icon="house-chimney" class="fa-fw"></fa
|
|
||||||
></router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Search -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'discover' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
><fa icon="magnifying-glass" class="fa-fw"></fa
|
|
||||||
></router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Projects -->
|
|
||||||
<li class="basis-1/5 rounded-md bg-slate-400 text-white">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'projects' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
><fa icon="folder-open" class="fa-fw"></fa
|
|
||||||
></router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Contacts -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'contacts' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
><fa icon="users" class="fa-fw"></fa
|
|
||||||
></router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Profile -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'account' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
><fa icon="circle-user" class="fa-fw"></fa
|
|
||||||
></router-link>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
<section id="Content" class="p-6 pb-24">
|
<section id="Content" class="p-6 pb-24">
|
||||||
<!-- Heading -->
|
<!-- Heading -->
|
||||||
<h1 id="ViewHeading" class="text-4xl text-center font-light pt-4 mb-8">
|
<h1 id="ViewHeading" class="text-4xl text-center font-light pt-4 mb-8">
|
||||||
@@ -123,6 +81,7 @@ import { accessToken } from "@/libs/crypto";
|
|||||||
import { IIdentifier } from "@veramo/core";
|
import { IIdentifier } from "@veramo/core";
|
||||||
import InfiniteScroll from "@/components/InfiniteScroll";
|
import InfiniteScroll from "@/components/InfiniteScroll";
|
||||||
import AlertMessage from "@/components/AlertMessage";
|
import AlertMessage from "@/components/AlertMessage";
|
||||||
|
import QuickNav from "@/components/QuickNav";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents data about a project
|
* Represents data about a project
|
||||||
@@ -147,7 +106,7 @@ interface ProjectData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
components: { InfiniteScroll, AlertMessage },
|
components: { InfiniteScroll, AlertMessage, QuickNav },
|
||||||
})
|
})
|
||||||
export default class ProjectsView extends Vue {
|
export default class ProjectsView extends Vue {
|
||||||
apiServer = "";
|
apiServer = "";
|
||||||
|
|||||||
@@ -1,52 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- QUICK NAV -->
|
<QuickNav selected="Profile"></QuickNav>
|
||||||
<nav id="QuickNav" class="fixed bottom-0 left-0 right-0 bg-slate-200 z-50">
|
|
||||||
<ul class="flex text-2xl p-2 gap-2">
|
|
||||||
<!-- Home Feed -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link :to="{ name: 'home' }" class="block text-center py-3 px-1">
|
|
||||||
<fa icon="house-chimney" class="fa-fw"></fa>
|
|
||||||
</router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Search -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'discover' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
>
|
|
||||||
<fa icon="magnifying-glass" class="fa-fw"></fa>
|
|
||||||
</router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Projects -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'projects' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
>
|
|
||||||
<fa icon="folder-open" class="fa-fw"></fa>
|
|
||||||
</router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Contacts -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'contacts' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
>
|
|
||||||
<fa icon="users" class="fa-fw"></fa>
|
|
||||||
</router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Profile -->
|
|
||||||
<li class="basis-1/5 rounded-md bg-slate-400 text-white">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'account' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
>
|
|
||||||
<fa icon="circle-user" class="fa-fw"></fa>
|
|
||||||
</router-link>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<!-- CONTENT -->
|
<!-- CONTENT -->
|
||||||
<section id="Content" class="p-6 pb-24">
|
<section id="Content" class="p-6 pb-24">
|
||||||
<!-- Heading -->
|
<!-- Heading -->
|
||||||
@@ -98,8 +51,9 @@ import { accountsDB, db } from "@/db";
|
|||||||
import * as R from "ramda";
|
import * as R from "ramda";
|
||||||
import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
|
import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
|
||||||
import AlertMessage from "@/components/AlertMessage";
|
import AlertMessage from "@/components/AlertMessage";
|
||||||
|
import QuickNav from "@/components/QuickNav";
|
||||||
|
|
||||||
@Component({ components: { AlertMessage } })
|
@Component({ components: { AlertMessage, QuickNav } })
|
||||||
export default class SeedBackupView extends Vue {
|
export default class SeedBackupView extends Vue {
|
||||||
activeAccount = null;
|
activeAccount = null;
|
||||||
showSeed = false;
|
showSeed = false;
|
||||||
|
|||||||
@@ -1,52 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- QUICK NAV -->
|
<QuickNav selected="Profile"></QuickNav>
|
||||||
<nav id="QuickNav" class="fixed bottom-0 left-0 right-0 bg-slate-200 z-50">
|
|
||||||
<ul class="flex text-2xl p-2 gap-2">
|
|
||||||
<!-- Home Feed -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link :to="{ name: 'home' }" class="block text-center py-3 px-1">
|
|
||||||
<fa icon="house-chimney" class="fa-fw"></fa>
|
|
||||||
</router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Search -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'discover' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
>
|
|
||||||
<fa icon="magnifying-glass" class="fa-fw"></fa>
|
|
||||||
</router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Projects -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'projects' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
>
|
|
||||||
<fa icon="folder-open" class="fa-fw"></fa>
|
|
||||||
</router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Contacts -->
|
|
||||||
<li class="basis-1/5 rounded-md text-slate-500">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'contacts' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
>
|
|
||||||
<fa icon="users" class="fa-fw"></fa>
|
|
||||||
</router-link>
|
|
||||||
</li>
|
|
||||||
<!-- Profile -->
|
|
||||||
<li class="basis-1/5 rounded-md bg-slate-400 text-white">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'account' }"
|
|
||||||
class="block text-center py-3 px-1"
|
|
||||||
>
|
|
||||||
<fa icon="circle-user" class="fa-fw"></fa>
|
|
||||||
</router-link>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<!-- CONTENT -->
|
<!-- CONTENT -->
|
||||||
<section id="Content" class="p-6 pb-24">
|
<section id="Content" class="p-6 pb-24">
|
||||||
<!-- Heading -->
|
<!-- Heading -->
|
||||||
@@ -86,25 +39,34 @@
|
|||||||
:alertMessage="alertMessage"
|
:alertMessage="alertMessage"
|
||||||
></AlertMessage>
|
></AlertMessage>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template> /**
|
||||||
|
// from https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob#examples
|
||||||
|
// Adds a blank image const dataBlob = document
|
||||||
|
.querySelector("#scene-container") .firstChild.toBlob((blob) => { const newImg =
|
||||||
|
document.createElement("img"); const url = URL.createObjectURL(blob);
|
||||||
|
newImg.onload = () => { // no longer need to read the blob so it's revoked
|
||||||
|
URL.revokeObjectURL(url); }; newImg.src = url;
|
||||||
|
document.body.appendChild(newImg); }); **/
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { SVGRenderer } from "three/addons/renderers/SVGRenderer.js";
|
import { SVGRenderer } from "three/addons/renderers/SVGRenderer.js";
|
||||||
import { Component, Vue } from "vue-facing-decorator";
|
import { Component, Vue } from "vue-facing-decorator";
|
||||||
import { World } from "@/components/World/World.js";
|
import { World } from "@/components/World/World.js";
|
||||||
import AlertMessage from "@/components/AlertMessage";
|
import AlertMessage from "@/components/AlertMessage";
|
||||||
|
import QuickNav from "@/components/QuickNav";
|
||||||
|
|
||||||
interface WorldProperties {
|
interface WorldProperties {
|
||||||
startTime?: string;
|
startTime?: string;
|
||||||
endTime?: string;
|
endTime?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Component({ components: { AlertMessage, World } })
|
@Component({ components: { AlertMessage, World, QuickNav } })
|
||||||
export default class StatisticsView extends Vue {
|
export default class StatisticsView extends Vue {
|
||||||
world: World;
|
world: World;
|
||||||
worldProperties: WorldProperties = {};
|
worldProperties: WorldProperties = {};
|
||||||
|
alertTitle = "";
|
||||||
|
alertMessage = "";
|
||||||
|
|
||||||
// 'mounted' hook runs after initial render
|
|
||||||
mounted() {
|
mounted() {
|
||||||
try {
|
try {
|
||||||
const container = document.querySelector("#scene-container");
|
const container = document.querySelector("#scene-container");
|
||||||
@@ -114,68 +76,12 @@ export default class StatisticsView extends Vue {
|
|||||||
this.world = newWorld;
|
this.world = newWorld;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
|
this.alertTitle = "Mounting error";
|
||||||
|
this.alertMessage = err.message;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public captureGraphics() {
|
public captureGraphics() {
|
||||||
/**
|
|
||||||
// from https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob#examples
|
|
||||||
// Adds a blank image
|
|
||||||
const dataBlob = document
|
|
||||||
.querySelector("#scene-container")
|
|
||||||
.firstChild.toBlob((blob) => {
|
|
||||||
const newImg = document.createElement("img");
|
|
||||||
const url = URL.createObjectURL(blob);
|
|
||||||
|
|
||||||
newImg.onload = () => {
|
|
||||||
// no longer need to read the blob so it's revoked
|
|
||||||
URL.revokeObjectURL(url);
|
|
||||||
};
|
|
||||||
|
|
||||||
newImg.src = url;
|
|
||||||
document.body.appendChild(newImg);
|
|
||||||
});
|
|
||||||
**/
|
|
||||||
|
|
||||||
/**
|
|
||||||
// Yields a blank page with the iframe below
|
|
||||||
const dataUrl = document
|
|
||||||
.querySelector("#scene-container")
|
|
||||||
.firstChild.toDataURL("image/png");
|
|
||||||
**/
|
|
||||||
|
|
||||||
/**
|
|
||||||
// Yields a blank page with the iframe below
|
|
||||||
const dataUrl = this.world.renderer.domElement.toDataURL("image/png");
|
|
||||||
**/
|
|
||||||
|
|
||||||
/**
|
|
||||||
// Show the image in a new tab
|
|
||||||
const iframe = `
|
|
||||||
<iframe
|
|
||||||
src="${dataUrl}"
|
|
||||||
frameborder="0"
|
|
||||||
style="border:0; top:0px; left:0px; bottom:0px; right:0px; width:100%; height:100%;"
|
|
||||||
allowfullscreen>
|
|
||||||
</iframe>`;
|
|
||||||
const win = window.open();
|
|
||||||
win.document.open();
|
|
||||||
win.document.write(iframe);
|
|
||||||
win.document.close();
|
|
||||||
**/
|
|
||||||
|
|
||||||
// from https://stackoverflow.com/a/17407392/845494
|
|
||||||
// This yields a file with funny formatting.
|
|
||||||
//const image = const dataUrl.replace("image/png", "image/octet-stream");
|
|
||||||
|
|
||||||
/**
|
|
||||||
// Yields a blank image at the bottom of the page
|
|
||||||
// from https://discourse.threejs.org/t/save-screenshot-on-server/39900/3
|
|
||||||
const img = new Image();
|
|
||||||
img.src = this.world.renderer.domElement.toDataURL();
|
|
||||||
document.body.appendChild(img);
|
|
||||||
**/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This yields an SVG that only shows white and black highlights
|
* This yields an SVG that only shows white and black highlights
|
||||||
// from https://stackoverflow.com/questions/27632621/exporting-from-three-js-scene-to-svg-or-other-vector-format
|
// from https://stackoverflow.com/questions/27632621/exporting-from-three-js-scene-to-svg-or-other-vector-format
|
||||||
@@ -183,16 +89,12 @@ export default class StatisticsView extends Vue {
|
|||||||
const rendererSVG = new SVGRenderer();
|
const rendererSVG = new SVGRenderer();
|
||||||
rendererSVG.setSize(window.innerWidth, window.innerHeight);
|
rendererSVG.setSize(window.innerWidth, window.innerHeight);
|
||||||
rendererSVG.render(this.world.scene, this.world.camera);
|
rendererSVG.render(this.world.scene, this.world.camera);
|
||||||
//document.body.appendChild(rendererSVG.domElement);
|
|
||||||
ExportToSVG(rendererSVG, "test.svg");
|
ExportToSVG(rendererSVG, "test.svg");
|
||||||
}
|
}
|
||||||
|
|
||||||
public setWorldProperty(propertyName, propertyValue) {
|
public setWorldProperty(propertyName, propertyValue) {
|
||||||
this.worldProperties[propertyName] = propertyValue;
|
this.worldProperties[propertyName] = propertyValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
alertTitle = "";
|
|
||||||
alertMessage = "";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function ExportToSVG(rendererSVG, filename) {
|
function ExportToSVG(rendererSVG, filename) {
|
||||||
|
|||||||
Reference in New Issue
Block a user