forked from trent_larson/crowd-funder-for-time-pwa
fix linting
This commit is contained in:
@@ -255,12 +255,12 @@ import EntityIcon from "../components/EntityIcon.vue";
|
||||
|
||||
/**
|
||||
* DIDView Component
|
||||
*
|
||||
*
|
||||
* Displays detailed information about a DID (Decentralized Identifier) entity, including:
|
||||
* - Basic identity information (name, profile image)
|
||||
* - Contact management controls (visibility, registration status)
|
||||
* - Associated claims and their details
|
||||
*
|
||||
*
|
||||
* The view supports both viewing one's own DID and other contacts' DIDs.
|
||||
* It provides infinite scrolling for claims and interactive controls for contact management.
|
||||
*/
|
||||
@@ -300,7 +300,7 @@ export default class DIDView extends Vue {
|
||||
|
||||
/**
|
||||
* Initializes the view with DID information
|
||||
*
|
||||
*
|
||||
* Workflow:
|
||||
* 1. Retrieves active account settings (DID and API server)
|
||||
* 2. Determines which DID to display from URL params or defaults to active DID
|
||||
@@ -334,14 +334,14 @@ export default class DIDView extends Vue {
|
||||
private async determineDIDToDisplay() {
|
||||
const pathParam = window.location.pathname.substring("/did/".length);
|
||||
let showDid = pathParam;
|
||||
|
||||
|
||||
if (!showDid) {
|
||||
showDid = this.activeDid;
|
||||
if (showDid) {
|
||||
this.notifyDefaultToActiveDID();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (showDid) {
|
||||
this.viewingDid = decodeURIComponent(showDid);
|
||||
}
|
||||
@@ -368,7 +368,7 @@ export default class DIDView extends Vue {
|
||||
*/
|
||||
private async loadContactInformation() {
|
||||
if (!this.viewingDid) return;
|
||||
|
||||
|
||||
this.contactFromDid = await db.contacts.get(this.viewingDid);
|
||||
if (this.contactFromDid) {
|
||||
this.contactYaml = yaml.dump(this.contactFromDid);
|
||||
@@ -380,7 +380,7 @@ export default class DIDView extends Vue {
|
||||
*/
|
||||
private async checkIfOwnDID() {
|
||||
if (!this.viewingDid) return;
|
||||
|
||||
|
||||
const allAccountDids = await libsUtil.retrieveAccountDids();
|
||||
this.isMyDid = allAccountDids.includes(this.viewingDid);
|
||||
}
|
||||
@@ -388,7 +388,7 @@ export default class DIDView extends Vue {
|
||||
/**
|
||||
* Loads additional claims when user scrolls to bottom
|
||||
* Used by infinite scroll component to implement pagination
|
||||
*
|
||||
*
|
||||
* @param payload - Boolean indicating if more data should be loaded
|
||||
*/
|
||||
async loadMoreData(payload: boolean) {
|
||||
@@ -400,7 +400,7 @@ export default class DIDView extends Vue {
|
||||
/**
|
||||
* Prompts user to confirm contact deletion
|
||||
* Shows additional warning if contact has visibility permissions
|
||||
*
|
||||
*
|
||||
* @param contact - Contact object to be deleted
|
||||
*/
|
||||
confirmDeleteContact(contact: Contact) {
|
||||
@@ -428,7 +428,7 @@ export default class DIDView extends Vue {
|
||||
|
||||
/**
|
||||
* Deletes contact from local database and navigates back to contacts list
|
||||
*
|
||||
*
|
||||
* @param contact - Contact object to be deleted
|
||||
*/
|
||||
async deleteContact(contact: Contact) {
|
||||
@@ -449,7 +449,7 @@ export default class DIDView extends Vue {
|
||||
/**
|
||||
* Prompts user to confirm registering a contact
|
||||
* Shows additional warning if contact is already registered
|
||||
*
|
||||
*
|
||||
* @param contact - Contact to be registered
|
||||
*/
|
||||
async confirmRegister(contact: Contact) {
|
||||
@@ -476,7 +476,7 @@ export default class DIDView extends Vue {
|
||||
/**
|
||||
* Registers a contact with the endorser server
|
||||
* Updates local database with registration status
|
||||
*
|
||||
*
|
||||
* @param contact - Contact to register
|
||||
*/
|
||||
async register(contact: Contact) {
|
||||
@@ -609,7 +609,7 @@ export default class DIDView extends Vue {
|
||||
|
||||
/**
|
||||
* Navigates to detailed claim view
|
||||
*
|
||||
*
|
||||
* @param jwtId - JWT ID of the claim to view
|
||||
*/
|
||||
onClickLoadClaim(jwtId: string) {
|
||||
@@ -622,7 +622,7 @@ export default class DIDView extends Vue {
|
||||
/**
|
||||
* Extracts and formats claim amount information
|
||||
* Handles different claim types (GiveAction, Offer)
|
||||
*
|
||||
*
|
||||
* @param claim - Claim object to process
|
||||
* @returns Formatted amount string or empty string if no amount
|
||||
*/
|
||||
@@ -657,7 +657,7 @@ export default class DIDView extends Vue {
|
||||
/**
|
||||
* Extracts claim description
|
||||
* Falls back to name if no description available
|
||||
*
|
||||
*
|
||||
* @param claim - Claim to get description from
|
||||
* @returns Description string or empty string
|
||||
*/
|
||||
@@ -667,7 +667,7 @@ export default class DIDView extends Vue {
|
||||
|
||||
/**
|
||||
* Prompts user to confirm visibility change for a contact
|
||||
*
|
||||
*
|
||||
* @param contact - Contact to modify visibility for
|
||||
* @param visibility - New visibility state to set
|
||||
*/
|
||||
@@ -694,7 +694,7 @@ export default class DIDView extends Vue {
|
||||
|
||||
/**
|
||||
* Updates contact visibility on server and local database
|
||||
*
|
||||
*
|
||||
* @param contact - Contact to update visibility for
|
||||
* @param visibility - New visibility state
|
||||
* @param showSuccessAlert - Whether to show success notification
|
||||
@@ -752,7 +752,7 @@ export default class DIDView extends Vue {
|
||||
/**
|
||||
* Checks current visibility status of contact on server
|
||||
* Updates local database with current status
|
||||
*
|
||||
*
|
||||
* @param contact - Contact to check visibility for
|
||||
*/
|
||||
async checkVisibility(contact: Contact) {
|
||||
|
||||
Reference in New Issue
Block a user