-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include abilities and modifiers in navigation.
- Loading branch information
Showing
9 changed files
with
101 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<script setup lang="ts"> | ||
import { ref, computed, inject, Ref, } from 'vue' | ||
import { RouterLink } from 'vue-router'; | ||
import NavItem from '@/components/NavItem.vue' | ||
import { Ability, TaskContext, TaskContextType, getTaskContext } from '@/sources/ability'; | ||
const commitId = inject<string>('commitId') as string | ||
const search = inject<Ref<string>>('search') as Ref<string> | ||
const taskContext = ref<TaskContext>(await getTaskContext(commitId, TaskContextType.All)) | ||
const abilitiesSearchResults = computed(() => allAbilities()) | ||
function allAbilities() : Ability[] | ||
{ | ||
return Object.values(taskContext.value.Abilities) | ||
.filter(v => v.Name.toLowerCase().includes(search.value.toLowerCase())) | ||
.sort((a, b) => a.Name > b.Name ? 1 : -1) | ||
} | ||
</script> | ||
|
||
<template> | ||
<NavItem v-for="ability in abilitiesSearchResults" :key="ability.Name"> | ||
<RouterLink :to="{ name:'ability', params:{ commitId: commitId, abilityId: ability.Name }}"> | ||
<span :title="ability.Name">{{ ability.Name }}</span> | ||
</RouterLink> | ||
</NavItem> | ||
</template> | ||
|
||
<style scoped> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<script setup lang="ts"> | ||
import { ref, computed, inject, Ref, } from 'vue' | ||
import { RouterLink } from 'vue-router'; | ||
import NavItem from '@/components/NavItem.vue' | ||
import { Modifier, TaskContext, TaskContextType, getTaskContext } from '@/sources/ability'; | ||
const commitId = inject<string>('commitId') as string | ||
const search = inject<Ref<string>>('search') as Ref<string> | ||
const taskContext = ref<TaskContext>(await getTaskContext(commitId, TaskContextType.All)) | ||
const modifiersSearchResults = computed(() => allModifiers()) | ||
function allModifiers() : Modifier[] | ||
{ | ||
return Object.values(taskContext.value.Modifiers) | ||
.filter(v => v.Name.toLowerCase().includes(search.value.toLowerCase())) | ||
.sort((a, b) => a.Name > b.Name ? 1 : -1) | ||
} | ||
</script> | ||
|
||
<template> | ||
<NavItem v-for="modifier in modifiersSearchResults" :key="modifier.Name"> | ||
<RouterLink :to="{ name:'modifier', params:{ commitId: commitId, modifierId: modifier.Name }}"> | ||
<span :title="modifier.Name">{{ modifier.Name }}</span> | ||
</RouterLink> | ||
</NavItem> | ||
</template> | ||
|
||
<style scoped> | ||
</style> |