enhancement/implement_tooltips_for_xpath3 (#242)

Co-authored-by: widlam <mikolaj.widla@gmail.com>
Reviewed-on: #242
This commit is contained in:
2023-08-21 14:15:07 +02:00
parent 6319d7c427
commit a78f3bd52b
9 changed files with 9194 additions and 2749 deletions

View File

@@ -0,0 +1,49 @@
<script setup lang="ts">
import xpathDiffs from '@/assets/tooltips/xpath/xpathdiffs.json';
import { ref } from 'vue';
import TooltipCategoryComponent from './TooltipCategoryComponent.vue';
const isEntryHidden = ref(true)
function getDiffEntry(toolVersion : String) : string[] {
switch(toolVersion){
case "2.0" : {
return xpathDiffs.VersionDiffs[0].diffs
}
case "3.0" : {
return xpathDiffs.VersionDiffs[1].diffs
}
case "3.1" : {
return xpathDiffs.VersionDiffs[2].diffs
}
default: {
return xpathDiffs.VersionDiffs[0].diffs
}
}
}
const props = defineProps({
toolName: {type: String, required: true},
toolVersion: {type: String, required: true}
})
</script>
<template>
<TooltipCategoryComponent :name="xpathDiffs.universalInfo[0].category">
<span class="text-center">
{{ xpathDiffs.universalInfo[0].description }}
</span>
</TooltipCategoryComponent>
<TooltipCategoryComponent v-if="toolVersion !== '1.0'" :name="'What\'s new in ' + toolName + ' ' + toolVersion ">
<span v-for=" diff in getDiffEntry(toolVersion)" v-bind:key="diff" class=" text-justify" >
* {{ diff }}
</span>
</TooltipCategoryComponent>
</template>