Browse Source

make the Anonymous icon to be blank, plus some other renaming & task cleanup

miscellany
Trent Larson 1 year ago
parent
commit
9486142b2a
  1. 4
      project.task.yaml
  2. 15
      src/components/EntityIcon.vue
  3. 2
      src/router/index.ts
  4. 4
      src/views/ContactGiftingView.vue
  5. 2
      src/views/DiscoverView.vue
  6. 2
      src/views/HomeView.vue
  7. 2
      src/views/ProjectViewView.vue

4
project.task.yaml

@ -1,8 +1,8 @@
tasks:
- fix "any" warnings
- mount folder for persistent sqlite DB outside of container
- fix missing updateAllFeed in ContactGiftingView page
- check that Anonymous users jdenticon are nulls (not "Anonymous")
- test alerts on all pages -- or refactor to new "notify" (since AlertMessage refactoring may require a change, et. ContactQRScanShowView)
- .2 bug - on contacts view, click on "to" & "from" and nothing happens
- 40 notifications :

15
src/components/EntityIcon.vue

@ -5,13 +5,26 @@
import { Vue, Component, Prop } from "vue-facing-decorator";
import { toSvg } from "jdenticon";
const BLANK_CONFIG = {
lightness: {
color: [1.0, 1.0],
grayscale: [1.0, 1.0],
},
saturation: {
color: 0.0,
grayscale: 0.0,
},
backColor: "#0000",
};
@Component
export default class EntityIcon extends Vue {
@Prop entityId = "";
@Prop iconSize = 0;
generateIdenticon() {
const svgString = toSvg(this.entityId, this.iconSize);
const config = this.entityId ? undefined : BLANK_CONFIG;
const svgString = toSvg(this.entityId, this.iconSize, config);
return svgString;
}
}

2
src/router/index.ts

@ -189,7 +189,7 @@ const routes: Array<RouteRecordRaw> = [
name: "contact-gives",
component: () =>
import(
/* webpackChunkName: "statistics" */ "../views/ContactGiftingView.vue"
/* webpackChunkName: "contact-gives" */ "../views/ContactGiftingView.vue"
),
},
];

4
src/views/ContactGiftingView.vue

@ -26,7 +26,7 @@
<h2 class="text-base flex gap-4 items-center">
<span class="grow italic text-slate-500"
><EntityIcon
entityId="Anonymous"
:entityId="null"
:iconSize="32"
class="opacity-50 inline-block align-middle border border-dashed border-slate-400 bg-slate-200 rounded-md mr-1"
></EntityIcon>
@ -108,7 +108,7 @@ interface Notification {
@Component({
components: { GiftedDialog, QuickNav, EntityIcon },
})
export default class HomeView extends Vue {
export default class ContactGiftingView extends Vue {
$notify!: (notification: Notification, timeout?: number) => void;
activeDid = "";

2
src/views/DiscoverView.vue

@ -56,7 +56,7 @@
searchAll();
"
>
Remote
Anywhere
<span
class="font-semibold text-sm bg-slate-200 px-1.5 py-0.5 rounded-md"
>{{ remoteCount }}</span

2
src/views/HomeView.vue

@ -116,7 +116,7 @@
<ul class="grid grid-cols-4 gap-x-3 gap-y-5 text-center mb-5">
<li @click="openDialog()">
<EntityIcon
:entityId="Anonymous"
:entityId="null"
:iconSize="64"
class="mx-auto border border-slate-300 rounded-md mb-1"
></EntityIcon>

2
src/views/ProjectViewView.vue

@ -95,7 +95,7 @@
<ul class="grid grid-cols-4 gap-x-3 gap-y-5 text-center mb-5">
<li @click="openDialog()">
<EntityIcon
:entityId="Anonymous"
:entityId="null"
:iconSize="64"
class="mx-auto border border-slate-300 rounded-md mb-1"
></EntityIcon>

Loading…
Cancel
Save