Browse Source

make the user-name pop-up the preferred way to set the name

pull/121/head^2
Trent Larson 4 weeks ago
parent
commit
e24cd06e3d
  1. 22
      src/views/AccountViewView.vue
  2. 13
      src/views/ContactQRScanShowView.vue
  3. 2
      src/views/ShareMyContactInfoView.vue

22
src/views/AccountViewView.vue

@ -55,14 +55,17 @@
</div> </div>
<span <span
v-else v-else
class="block w-full text-center text-md bg-amber-200 text-blue-500 uppercase border border-dashed border-slate-400 px-1.5 py-2 rounded-md mb-2" class="block w-full text-center text-md bg-amber-200 border border-dashed border-slate-400 px-1.5 py-2 rounded-md mb-2"
> >
<router-link <span
:to="{ name: 'new-edit-account' }" @click="
class="inline-block text-md bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-4 py-2 rounded-md" () => $refs.userNameDialog.open((name) => (this.givenName = name))
"
class="inline-block text-md uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-4 py-2 rounded-md"
> >
Set Your Name Set Your Name
</router-link> </span>
<UserNameDialog ref="userNameDialog" />
</span> </span>
<div class="flex justify-center mt-4"> <div class="flex justify-center mt-4">
<span v-if="profileImageUrl" class="flex justify-between"> <span v-if="profileImageUrl" class="flex justify-between">
@ -720,6 +723,7 @@ import EntityIcon from "@/components/EntityIcon.vue";
import ImageMethodDialog from "@/components/ImageMethodDialog.vue"; import ImageMethodDialog from "@/components/ImageMethodDialog.vue";
import QuickNav from "@/components/QuickNav.vue"; import QuickNav from "@/components/QuickNav.vue";
import TopMessage from "@/components/TopMessage.vue"; import TopMessage from "@/components/TopMessage.vue";
import UserNameDialog from "@/components/UserNameDialog.vue";
import { import {
AppString, AppString,
DEFAULT_IMAGE_API_SERVER, DEFAULT_IMAGE_API_SERVER,
@ -750,7 +754,13 @@ import { getAccount } from "@/libs/util";
const inputImportFileNameRef = ref<Blob>(); const inputImportFileNameRef = ref<Blob>();
@Component({ @Component({
components: { EntityIcon, ImageMethodDialog, QuickNav, TopMessage }, components: {
EntityIcon,
ImageMethodDialog,
QuickNav,
TopMessage,
UserNameDialog,
},
}) })
export default class AccountViewView extends Vue { export default class AccountViewView extends Vue {
$notify!: (notification: NotificationIface, timeout?: number) => void; $notify!: (notification: NotificationIface, timeout?: number) => void;

13
src/views/ContactQRScanShowView.vue

@ -25,13 +25,16 @@
<span class="text-red">Beware!</span> <span class="text-red">Beware!</span>
You aren't sharing your name, so quickly You aren't sharing your name, so quickly
<br /> <br />
<router-link <span
:to="{ name: 'new-edit-account' }" @click="
() => $refs.userNameDialog.open((name) => (this.givenName = name))
"
class="bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-1 rounded-md" class="bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-1 rounded-md"
> >
click here to set it for them. click here to set it for them.
</router-link> </span>
</p> </p>
<UserNameDialog ref="userNameDialog" />
</div> </div>
<div <div
@ -50,7 +53,7 @@
class="flex justify-center" class="flex justify-center"
/> />
<span> <span>
Click this or QR code to copy your contact URL to your clipboard. Click the QR code to copy your contact info to your clipboard.
</span> </span>
</div> </div>
<div v-else-if="activeDid" class="text-center"> <div v-else-if="activeDid" class="text-center">
@ -96,6 +99,7 @@ import { QrcodeStream } from "vue-qrcode-reader";
import { useClipboard } from "@vueuse/core"; import { useClipboard } from "@vueuse/core";
import QuickNav from "@/components/QuickNav.vue"; import QuickNav from "@/components/QuickNav.vue";
import UserNameDialog from "@/components/UserNameDialog.vue";
import { NotificationIface } from "@/constants/app"; import { NotificationIface } from "@/constants/app";
import { accountsDB, db } from "@/db/index"; import { accountsDB, db } from "@/db/index";
import { Contact } from "@/db/tables/contacts"; import { Contact } from "@/db/tables/contacts";
@ -121,6 +125,7 @@ import { ETHR_DID_PREFIX } from "@/libs/crypto/vc";
QrcodeStream, QrcodeStream,
QRCodeVue3, QRCodeVue3,
QuickNav, QuickNav,
UserNameDialog,
}, },
}) })
export default class ContactQRScanShow extends Vue { export default class ContactQRScanShow extends Vue {

2
src/views/ShareMyContactInfoView.vue

@ -84,7 +84,7 @@ export default class ShareMyContactInfoView extends Vue {
group: "alert", group: "alert",
type: "info", type: "info",
title: "Copied", title: "Copied",
text: "Those contacts were copied to the clipboard. Have them paste it in the box on their 'Contacts' screen.", text: "Your contact info was copied to the clipboard. Have them paste it in the box on their 'Contacts' screen.",
}, },
5000, 5000,
); );

Loading…
Cancel
Save