Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement subtree search #296

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions components/Btn.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
<template>
<button :class="classes" @click="onclick" type="button">
<button :class="classes" @click="onclick" type="button" :disabled="disabled">
<component v-if="icon" :is="icon" class="icon"></component>
<slot></slot>
</button>
</template>

<script lang="ts">
import { defineComponent } from "vue";

export default defineComponent({
props: {
full: { type: Boolean, default: false },
Expand All @@ -21,11 +19,12 @@ export default defineComponent({
iconRight: { type: Boolean, default: false },
bgColor: { type: String, default: "bg-accent" },
borderColor: { type: String, default: "border-accent" },
disabled: { type: Boolean, default: false },
},
emits: ["click"],
setup(props, { emit }) {
function onclick() {
emit("click", true);
if (!props.disabled) emit("click", true);
}

const textColor = computed(() => {
Expand All @@ -39,6 +38,7 @@ export default defineComponent({
sm: props.sm,
"flex-row-reverse": props.iconRight,
"text-center justify-center w-full": props.full,
"opacity-50 cursor-not-allowed": props.disabled,
},
props.primary && !props.secondary && !props.tertiary
? `primary ${props.bgColor} text-primary hover:${props.bgColor} border ${props.borderColor} hover:ring-4 md:hover:ring-8 hover:ring-tertiary`
Expand Down
5 changes: 2 additions & 3 deletions components/input/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div>
<div class="flex flex-wrap gap-card-sm items-center">
<label
v-if="!noLabel"
v-if="!noLabel && label != ''"
class="text-body-2 text-body font-body block mb-2"
:for="id ?? label"
>
Expand Down Expand Up @@ -40,6 +40,7 @@
/>

<p
v-if="error"
class="pt-2 text-xs relative z-0 transition ease-out duration-500 text-error"
:class="
error ? 'translate-y-0 opacity-100' : 'translate-y-[-100%] opacity-0'
Expand All @@ -51,8 +52,6 @@
</template>

<script lang="ts">
import { defineComponent } from "vue";
import type { PropType } from "vue";
import { useI18n } from "vue-i18n";

export default defineComponent({
Expand Down
5 changes: 2 additions & 3 deletions components/skill-tree/Node.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<svg :x="cx" :y="cy" ref="nodeRef" @click="ondblclick">
<svg :x="cx" :y="cy" ref="nodeRef" @click="ondblclick" class="duration-300" :class="isNotInSearch ? 'opacity-35' : ''">
<SkillTreeNodeSvg
v-if="isFilled"
:size="nodeSize"
Expand Down Expand Up @@ -49,6 +49,7 @@ export default defineComponent({
zoomLevel: { type: Number, default: 2 },
viewSubtree: { type: Boolean, default: false },
viewSkill: { type: Boolean, default: false },
isNotInSearch: { type: Boolean, default: false },
},
emits: ['node', 'size', 'selected', 'move', 'ref'],
setup(props, { emit }) {
Expand Down Expand Up @@ -139,5 +140,3 @@ export default defineComponent({
},
});
</script>

<style scoped></style>