forked from jsnbuchanan/crowd-funder-for-time-pwa
refactor(logging): replace console.* and reclassify log levels in HomeView.vue, FeedFilters.vue
- Remove all console.* calls from FeedFilters.vue - Reclassify 12 logger.info calls to logger.debug in HomeView.vue for diagnostic messages - Add logger import to FeedFilters.vue - Maintain existing logging patterns and behavior
This commit is contained in:
@@ -101,6 +101,7 @@ import {
|
||||
import { Router } from "vue-router";
|
||||
|
||||
import { PlatformServiceMixin } from "@/utils/PlatformServiceMixin";
|
||||
import { logger } from "@/utils/logger";
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
@@ -140,44 +141,26 @@ export default class FeedFilters extends Vue {
|
||||
this.settingChanged = true;
|
||||
this.hasVisibleDid = !this.hasVisibleDid;
|
||||
|
||||
if (this.activeDid) {
|
||||
await this.$updateSettings(
|
||||
{
|
||||
filterFeedByVisible: this.hasVisibleDid,
|
||||
},
|
||||
this.activeDid,
|
||||
);
|
||||
} else {
|
||||
await this.$updateSettings({
|
||||
filterFeedByVisible: this.hasVisibleDid,
|
||||
});
|
||||
}
|
||||
await this.$updateSettings({
|
||||
filterFeedByVisible: this.hasVisibleDid,
|
||||
});
|
||||
}
|
||||
|
||||
async toggleNearby() {
|
||||
this.settingChanged = true;
|
||||
this.isNearby = !this.isNearby;
|
||||
|
||||
console.log("[FeedFilters] 🔄 Toggling nearby filter:", {
|
||||
logger.debug("[FeedFilters] 🔄 Toggling nearby filter:", {
|
||||
newValue: this.isNearby,
|
||||
settingChanged: this.settingChanged,
|
||||
activeDid: this.activeDid,
|
||||
});
|
||||
|
||||
if (this.activeDid) {
|
||||
await this.$updateSettings(
|
||||
{
|
||||
filterFeedByNearby: this.isNearby,
|
||||
},
|
||||
this.activeDid,
|
||||
);
|
||||
} else {
|
||||
await this.$updateSettings({
|
||||
filterFeedByNearby: this.isNearby,
|
||||
});
|
||||
}
|
||||
await this.$updateSettings({
|
||||
filterFeedByNearby: this.isNearby,
|
||||
});
|
||||
|
||||
console.log("[FeedFilters] ✅ Nearby filter updated in settings");
|
||||
logger.debug("[FeedFilters] ✅ Nearby filter updated in settings");
|
||||
}
|
||||
|
||||
async clearAll() {
|
||||
@@ -185,20 +168,10 @@ export default class FeedFilters extends Vue {
|
||||
this.settingChanged = true;
|
||||
}
|
||||
|
||||
if (this.activeDid) {
|
||||
await this.$updateSettings(
|
||||
{
|
||||
filterFeedByNearby: false,
|
||||
filterFeedByVisible: false,
|
||||
},
|
||||
this.activeDid,
|
||||
);
|
||||
} else {
|
||||
await this.$updateSettings({
|
||||
filterFeedByNearby: false,
|
||||
filterFeedByVisible: false,
|
||||
});
|
||||
}
|
||||
await this.$updateSettings({
|
||||
filterFeedByNearby: false,
|
||||
filterFeedByVisible: false,
|
||||
});
|
||||
|
||||
this.hasVisibleDid = false;
|
||||
this.isNearby = false;
|
||||
@@ -209,40 +182,30 @@ export default class FeedFilters extends Vue {
|
||||
this.settingChanged = true;
|
||||
}
|
||||
|
||||
if (this.activeDid) {
|
||||
await this.$updateSettings(
|
||||
{
|
||||
filterFeedByNearby: true,
|
||||
filterFeedByVisible: true,
|
||||
},
|
||||
this.activeDid,
|
||||
);
|
||||
} else {
|
||||
await this.$updateSettings({
|
||||
filterFeedByNearby: true,
|
||||
filterFeedByVisible: true,
|
||||
});
|
||||
}
|
||||
await this.$updateSettings({
|
||||
filterFeedByNearby: true,
|
||||
filterFeedByVisible: true,
|
||||
});
|
||||
|
||||
this.hasVisibleDid = true;
|
||||
this.isNearby = true;
|
||||
}
|
||||
|
||||
close() {
|
||||
console.log("[FeedFilters] 🚪 Closing dialog:", {
|
||||
logger.debug("[FeedFilters] 🚪 Closing dialog:", {
|
||||
settingChanged: this.settingChanged,
|
||||
hasCallback: !!this.onCloseIfChanged,
|
||||
});
|
||||
|
||||
if (this.settingChanged) {
|
||||
console.log("[FeedFilters] 🔄 Settings changed, calling callback");
|
||||
logger.debug("[FeedFilters] 🔄 Settings changed, calling callback");
|
||||
this.onCloseIfChanged();
|
||||
}
|
||||
this.visible = false;
|
||||
}
|
||||
|
||||
done() {
|
||||
console.log("[FeedFilters] ✅ Done button clicked");
|
||||
logger.debug("[FeedFilters] ✅ Done button clicked");
|
||||
this.close();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user