|
|
@ -352,9 +352,9 @@ export default class DiscoverView extends Vue { |
|
|
|
allMyDids: Array<string> = []; |
|
|
|
apiServer = ""; |
|
|
|
isLoading = false; |
|
|
|
isLocalActive = true; |
|
|
|
isLocalActive = false; |
|
|
|
isMappedActive = false; |
|
|
|
isAnywhereActive = false; |
|
|
|
isAnywhereActive = true; |
|
|
|
isProjectsActive = true; |
|
|
|
isPeopleActive = false; |
|
|
|
isSearchVisible = true; |
|
|
@ -375,6 +375,11 @@ export default class DiscoverView extends Vue { |
|
|
|
didInfo = didInfo; |
|
|
|
|
|
|
|
async mounted() { |
|
|
|
|
|
|
|
this.searchTerms = this.$route.query["searchText"]?.toString() || ""; |
|
|
|
|
|
|
|
const searchPeople = !!this.$route.query["searchPeople"]; |
|
|
|
|
|
|
|
const settings = await retrieveSettingsForActiveAccount(); |
|
|
|
this.activeDid = (settings.activeDid as string) || ""; |
|
|
|
this.apiServer = (settings.apiServer as string) || ""; |
|
|
@ -386,26 +391,30 @@ export default class DiscoverView extends Vue { |
|
|
|
|
|
|
|
this.allMyDids = await retrieveAccountDids(); |
|
|
|
|
|
|
|
this.searchTerms = this.$route.query["searchText"]?.toString() || ""; |
|
|
|
|
|
|
|
if (!settings.finishedOnboarding) { |
|
|
|
(this.$refs.onboardingDialog as OnboardingDialog).open( |
|
|
|
OnboardPage.Discover, |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
if (this.searchBox) { |
|
|
|
await this.searchLocal(); |
|
|
|
|
|
|
|
const bbox = this.searchBox.bbox; |
|
|
|
this.localCenterLat = (bbox.maxLat + bbox.minLat) / 2; |
|
|
|
this.localCenterLong = (bbox.eastLong + bbox.westLong) / 2; |
|
|
|
} else { |
|
|
|
this.isLocalActive = false; |
|
|
|
this.isMappedActive = false; |
|
|
|
this.isAnywhereActive = true; |
|
|
|
await this.searchAll(); |
|
|
|
// Someday we'll have enough people that we can default to their local area. |
|
|
|
// if (this.searchBox) { |
|
|
|
// this.isLocalActive = true; |
|
|
|
// this.isAnywhereActive = false; |
|
|
|
// await this.searchLocal(); |
|
|
|
// |
|
|
|
// const bbox = this.searchBox.bbox; |
|
|
|
// this.localCenterLat = (bbox.maxLat + bbox.minLat) / 2; |
|
|
|
// this.localCenterLong = (bbox.eastLong + bbox.westLong) / 2; |
|
|
|
// } else { |
|
|
|
|
|
|
|
if (searchPeople) { |
|
|
|
this.isPeopleActive = true; |
|
|
|
this.isProjectsActive = false; |
|
|
|
this.isMappedActive = true; |
|
|
|
this.isAnywhereActive = false; |
|
|
|
} |
|
|
|
await this.searchAll(); |
|
|
|
} |
|
|
|
|
|
|
|
public resetCounts() { |
|
|
|