Skip to content

Commit

Permalink
Merge branch 'v3' into dk/rating-boolean-conditions-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
danielklein-arch committed Sep 20, 2024
2 parents 23a2126 + 370adcb commit 588ed8a
Show file tree
Hide file tree
Showing 5 changed files with 254 additions and 1,078 deletions.
2 changes: 1 addition & 1 deletion components/Project/Create/Categories/Privacy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ defineExpose({
<ProjectCreateComponentsSelectChips
v-model="signRequirements"
label="Sign-in requirements"
:options="signInRequirmentsData.map(s => ({ label: s.name, value: s.id }))"
:options="signInRequirmentsData?.map(s => ({ label: s.name, value: s.id }))"
placeholder="Add requirement"
hint="What do you need to provide to use your project?"
/>
Expand Down
4 changes: 2 additions & 2 deletions components/Project/Create/Categories/Technology.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ defineExpose({
/>
<ProjectCreateComponentsRadio
v-model="version"
:options="projectPhaseData.map(p => ({ label: p.name, value: p.id }))"
:options="projectPhaseData?.map(p => ({ label: p.name, value: p.id }))"
/>
<ProjectCreateComponentsCategoryDivider
w-full
Expand All @@ -71,7 +71,7 @@ defineExpose({
</div>
<ProjectCreateComponentsSelect
v-model="assetType"
:options="assetCustodyData.map(c => ({ label: c.name, value: c.id }))"
:options="assetCustodyData?.map(c => ({ label: c.name, value: c.id }))"
label="Asset custody type"
placeholder="Select custody type"
hint="How are user’s fund handled? (non-custody, multisig, pool,...)"
Expand Down
17 changes: 1 addition & 16 deletions components/Project/ProjectRating.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,11 @@ const backgroundColorByScore = computed(() => {
const colorIndex = Math.floor(normalizedPercentage / 10)
return colors[colorIndex]
})
const isLargeScreen = useMediaQuery('(min-width: 1024px)')
function onClick() {
if (isLargeScreen.value)
return
if (props.disablePopover)
emits('selected')
else
isPopoverVisible.value = !isPopoverVisible.value
}
const isPopoverVisible = ref(false)
let hideTimeout: ReturnType<typeof setTimeout> | null = null
const showPopover = () => {
if (!isLargeScreen.value)
return
console.log('show')
if (hideTimeout) {
clearTimeout(hideTimeout)
hideTimeout = null
Expand All @@ -57,8 +44,6 @@ const showPopover = () => {
}
const hidePopover = () => {
if (!isLargeScreen.value)
return
hideTimeout = setTimeout(() => {
isPopoverVisible.value = false
}, 100) // Delay of 200ms before hiding
Expand All @@ -83,7 +68,7 @@ const hidePopover = () => {
cursor-pointer
@mouseenter="showPopover"
@mouseleave="hidePopover"
@click.prevent="onClick()"
@click.prevent=" emits('selected')"
>
<div
v-for="point of [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]"
Expand Down
2 changes: 1 addition & 1 deletion composables/useData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const useData = defineStore('data', () => {
features.value = data.features
ranks.value = data.ranks

projectPhase.value = data.project_phase.map(p => ({ id: p.id.toLowerCase(), name: p.name }))
projectPhase.value = data.project_phase?.map(p => ({ id: p.id.toLowerCase(), name: p.name }))
assetCustody.value = data.asset_custody_type.map(a => ({ id: a.id.toLowerCase(), name: a.name }))
signInRequirments.value = data.sign_in_type_requirments.map(s => ({ id: s.id.toLowerCase(), name: s.name }))
}
Expand Down
Loading

0 comments on commit 588ed8a

Please sign in to comment.