Browse Source

chore: clean up console logs

pull/142/head
Matthew Raymer 20 hours ago
parent
commit
c628c78565
  1. 6
      src/services/platforms/WebPlatformService.ts
  2. 5
      src/utils/PlatformServiceMixin.ts
  3. 6
      src/views/AccountViewView.vue
  4. 10
      src/views/ContactsView.vue
  5. 1
      src/views/DIDView.vue
  6. 2
      src/views/GiftedDetailsView.vue
  7. 4
      src/views/HelpNotificationsView.vue
  8. 6
      src/views/HomeView.vue
  9. 2
      src/views/ImportAccountView.vue
  10. 2
      src/views/ShareMyContactInfoView.vue
  11. 1
      test-playwright/60-new-activity.spec.ts

6
src/services/platforms/WebPlatformService.ts

@ -693,7 +693,11 @@ export class WebPlatformService implements PlatformService {
const setClause = keys.map((key) => `${key} = ?`).join(", ");
const sql = `UPDATE settings SET ${setClause} WHERE accountDid = ?`;
const params = [...keys.map((key) => settings[key]), did];
console.log("[WebPlatformService] updateDidSpecificSettings", sql, JSON.stringify(params, null, 2));
console.log(
"[WebPlatformService] updateDidSpecificSettings",
sql,
JSON.stringify(params, null, 2),
);
await this.dbExec(sql, params);
}

5
src/utils/PlatformServiceMixin.ts

@ -707,7 +707,10 @@ export const PlatformServiceMixin = {
// Merge with any provided defaults (these take highest precedence)
const finalSettings = { ...mergedSettings, ...defaults };
console.log("[PlatformServiceMixin] $accountSettings", JSON.stringify(finalSettings, null, 2));
console.log(
"[PlatformServiceMixin] $accountSettings",
JSON.stringify(finalSettings, null, 2),
);
return finalSettings;
} catch (error) {
logger.error(

6
src/views/AccountViewView.vue

@ -143,9 +143,7 @@
</section>
<PushNotificationPermission ref="pushNotificationPermission" />
<LocationSearchSection
:search-box="searchBox"
/>
<LocationSearchSection :search-box="searchBox" />
<!-- User Profile -->
<section
@ -1369,7 +1367,6 @@ export default class AccountViewView extends Vue {
`Import progress: ${progress.completedRows} of ${progress.totalRows} rows completed.`,
);
if (progress.done) {
// console.log(`Imported ${progress.completedTables} tables.`);
this.notify.success(
ACCOUNT_VIEW_CONSTANTS.SUCCESS.IMPORT_COMPLETE,
TIMEOUTS.LONG,
@ -1466,7 +1463,6 @@ export default class AccountViewView extends Vue {
profileImageUrl: imgUrl,
});
this.profileImageUrl = imgUrl;
//console.log("Got image URL:", imgUrl);
},
IMAGE_TYPE_PROFILE,
true,

10
src/views/ContactsView.vue

@ -828,19 +828,16 @@ export default class ContactsView extends Vue {
* Handle registration prompt for new contacts
*/
private async handleRegistrationPrompt(newContact: Contact): Promise<void> {
console.log("[ContactsView] handleRegistrationPrompt", this.isRegistered, this.hideRegisterPromptOnNewContact, newContact.registered);
if (
this.isRegistered === false || // the current Identity is not registered OR
this.hideRegisterPromptOnNewContact === true || // the user has hidden the registrationprompt OR
newContact.registered === true // the new contact is already registered
) {
// if any of the above are true, we do not want to show the registration prompt
console.log("[ContactsView] handleRegistrationPrompt we do not want to show the registration prompt");
return;
}
setTimeout(() => {
console.log("[ContactsView] handleRegistrationPrompt setTimeout");
this.$notify(
{
group: "modal",
@ -848,22 +845,18 @@ export default class ContactsView extends Vue {
title: "Register",
text: "Do you want to register them?",
onCancel: async (stopAsking?: boolean) => {
console.log("[ContactsView] handleRegistrationPrompt onCancel", stopAsking);
await this.handleRegistrationPromptResponse(stopAsking);
},
onNo: async (stopAsking?: boolean) => {
console.log("[ContactsView] handleRegistrationPrompt onNo", stopAsking);
await this.handleRegistrationPromptResponse(stopAsking);
},
onYes: async () => {
console.log("[ContactsView] handleRegistrationPrompt onYes");
await this.register(newContact);
},
promptToStopAsking: true,
},
-1,
);
console.log("[ContactsView] handleRegistrationPrompt setTimeout done");
}, 1000);
}
@ -1254,17 +1247,14 @@ export default class ContactsView extends Vue {
*/
public handleQRCodeClick() {
console.log("[ContactsView] handleQRCodeClick method called");
this.$logAndConsole(
"[ContactsView] handleQRCodeClick method called",
false,
);
if (Capacitor.isNativePlatform()) {
console.log("[ContactsView] Navigating to contact-qr-scan-full");
this.$router.push({ name: "contact-qr-scan-full" });
} else {
console.log("[ContactsView] Navigating to contact-qr");
this.$router.push({ name: "contact-qr" });
}
}

1
src/views/DIDView.vue

@ -758,7 +758,6 @@ export default class DIDView extends Vue {
if (resp.status === 200) {
const visibility = resp.data;
contact.seesMe = visibility;
//console.log("Visi check:", visibility, contact.seesMe, contact.did);
await this.$updateContact(contact.did, { seesMe: visibility });
const message =

2
src/views/GiftedDetailsView.vue

@ -490,7 +490,6 @@ export default class GiftedDetails extends Vue {
this.showGeneralAdvanced = !!settings.showGeneralAdvanced;
if (this.fulfillsProjectId) {
// console.log("Getting project name from cache", this.fulfillsProjectId);
const fulfillsProject = await getPlanFromCache(
this.fulfillsProjectId,
this.axios,
@ -502,7 +501,6 @@ export default class GiftedDetails extends Vue {
: "a project";
}
if (this.providerProjectId) {
// console.log("Getting project name from cache", this.providerProjectId);
const providerProject = await getPlanFromCache(
this.providerProjectId,
this.axios,

4
src/views/HelpNotificationsView.vue

@ -454,10 +454,6 @@ export default class HelpNotificationsView extends Vue {
* Useful for troubleshooting push notification issues and verifying subscription status.
*/
alertWebPushSubscription() {
// console.log(
// "Web push subscription:",
// JSON.parse(JSON.stringify(this.subscriptionJSON)), // gives more info than plain console logging
// );
alert(JSON.stringify(this.subscriptionJSON));
}

6
src/views/HomeView.vue

@ -9,7 +9,11 @@ Raymer * @version 1.0.0 */
<TopMessage />
<!-- CONTENT -->
<section id="Content" class="p-6 pb-24 max-w-3xl mx-auto" :data-active-did="activeDid">
<section
id="Content"
class="p-6 pb-24 max-w-3xl mx-auto"
:data-active-did="activeDid"
>
<h1 id="ViewHeading" class="text-4xl text-center font-light mb-8">
{{ AppString.APP_NAME }}
<span class="text-xs text-gray-500">{{ package.version }}</span>

2
src/views/ImportAccountView.vue

@ -189,7 +189,6 @@ export default class ImportAccountView extends Vue {
* Uses importFromMnemonic utility for secure import
*/
public async onImportClick() {
console.log("[ImportAccountView] onImportClick", this.mnemonic);
if (!this.mnemonic?.trim()) {
this.notify.warning(
"Seed phrase is required to import an account.",
@ -207,7 +206,6 @@ export default class ImportAccountView extends Vue {
// Check what was actually imported
const settings = await this.$accountSettings();
console.log("[ImportAccountView] settings", JSON.stringify(settings, null, 2));
// Check account-specific settings
if (settings?.activeDid) {

2
src/views/ShareMyContactInfoView.vue

@ -82,10 +82,8 @@ export default class ShareMyContactInfoView extends Vue {
// @ts-expect-error - Debug property for testing contact sharing functionality
window.__SHARE_CONTACT_DEBUG__ = { settings, activeDid };
// eslint-disable-next-line no-console
console.log("[ShareMyContactInfoView] mounted", { settings, activeDid });
if (!activeDid) {
// eslint-disable-next-line no-console
console.log("[ShareMyContactInfoView] No activeDid, redirecting to root");
this.$router.push({ name: "home" });
}
}

1
test-playwright/60-new-activity.spec.ts

@ -7,7 +7,6 @@ test('New offers for another user', async ({ page }) => {
// Get the auto-created DID from the HomeView
await page.waitForLoadState('networkidle');
const autoCreatedDid = await page.getAttribute('#Content', 'data-active-did');
console.log("[New offers for another user] Auto-created DID:", autoCreatedDid);
if (!autoCreatedDid) {
throw new Error('Auto-created DID not found in HomeView');

Loading…
Cancel
Save