Skip to content

Commit

Permalink
Add Link Generating Button to Search
Browse files Browse the repository at this point in the history
  • Loading branch information
savage13 committed Apr 16, 2024
1 parent 9dc18bc commit 6d4ece1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/components/AppMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,16 @@ export default class AppMap extends mixins(MixinUtil) {
this.searchThrottler();
}

searchSetLink() {
const query = this.searchGetQuery();
this.$router.replace({
path: this.$route.fullPath,
query: {
q: query,
}
})
}

searchOnAdd() {
this.searchAddGroup(this.searchGetQuery());
this.searchQuery = '';
Expand Down
1 change: 1 addition & 0 deletions src/components/AppMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@
<span v-show="this.searchResults.length >= this.MAX_SEARCH_RESULT_COUNT">Showing only the first {{MAX_SEARCH_RESULT_COUNT}} results.<br></span>
<b-btn size="sm" variant="link" @click="searchOnAdd"><i class="fa fa-plus"></i> Add to map</b-btn>
<b-btn size="sm" variant="link" @click="searchOnExclude"><i class="far fa-eye-slash"></i> Hide</b-btn>
<b-btn size="sm" variant="link" @click="searchSetLink"><i class="fas fa-link"></i> Link</b-btn>
</p>
<ObjectInfo v-for="(result, idx) in searchResults" :obj="result" :is-static="false" :key="result.objid" @click.native="searchJumpToResult(idx)" />
</div>
Expand Down

0 comments on commit 6d4ece1

Please sign in to comment.