-
Notifications
You must be signed in to change notification settings - Fork 8
Group all toggles in one component #4161
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
Open
samaradel
wants to merge
24
commits into
development
Choose a base branch
from
dev_toggles_component
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+214
−356
Open
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
3f7cce2
Group all toggles in one component
samaradel fa4f269
- Fix type check
samaradel 760518e
Set default values for props
samaradel 6204356
Verify passed value type
samaradel 41d3b58
Avoid inline assignments
samaradel f611dfe
Handle null values
samaradel 2d45b5f
Removed the onUpdated functions
samaradel 14684ef
Fix types
samaradel e5d8373
Get the old changes back
samaradel 8aa1d50
Move rental switchs component inside selection details component
samaradel 6080d4b
Merge branch 'development' into dev_toggles_component
samaradel 33a4aff
Remove the default true value
samaradel 4364f4f
Merge branch 'development' into dev_toggles_component
samaradel 5e9df5d
Remove static showGPU prop
samaradel 7088c08
Fix conflicts
samaradel 0b0a8fc
Fix eslint config file
samaradel 286647e
Merge branch 'development' into dev_toggles_component
samaradel 599346c
lint fix
samaradel 6148f14
Merge branch 'development' into dev_toggles_component
samaradel 29dace4
Remove unrelated changes
samaradel 1b40ce9
Merge branch 'development' into dev_toggles_component
samaradel 236c0f2
Update eslint.config.js
samaradel 2673096
Revert unwanted changes
samaradel 770abe7
Removed the unnecessary handler functions
samaradel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
71 changes: 71 additions & 0 deletions
71
packages/playground/src/components/filters/TfRentalFilterSwitches.vue
This file contains hidden or 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,71 @@ | ||
<template> | ||
<div class="flex flex-col gap-4"> | ||
<input-tooltip | ||
v-if="showGPU" | ||
inline | ||
tooltip=" | ||
Selecting a Node with GPU. | ||
When selecting a node with GPU resources, please make sure that you have a rented node. To rent a node and gain access to GPU capabilities, you can use our dashboard. | ||
" | ||
> | ||
<v-switch v-model="hasGPUModel" color="primary" inset label="GPU" hide-details /> | ||
</input-tooltip> | ||
|
||
<v-switch v-model="rentedByMeModel" color="primary" inset label="Rented By Me" hide-details /> | ||
|
||
<input-tooltip inline tooltip="Click to know more about dedicated machines." :href="manual?.dedicated_machines"> | ||
<v-switch v-model="dedicatedModel" color="primary" inset label="Rentable" hide-details /> | ||
</input-tooltip> | ||
|
||
<input-tooltip inline tooltip="Renting capacity on certified nodes is charged 25% extra."> | ||
<v-switch v-model="certifiedModel" color="primary" inset label="Certified" hide-details /> | ||
</input-tooltip> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { computed } from "vue"; | ||
|
||
import { manual } from "@/utils/manual"; | ||
import { solutionType } from "@/types"; | ||
|
||
import { useRoute } from "vue-router"; | ||
|
||
const props = defineProps({ | ||
rentedByMe: Boolean, | ||
dedicated: Boolean, | ||
certified: Boolean, | ||
hasGPU: Boolean, | ||
}); | ||
const emit = defineEmits(["update:rentedByMe", "update:dedicated", "update:certified", "update:hasGPU"]); | ||
|
||
const route = useRoute(); | ||
|
||
const rentedByMeModel = computed({ | ||
get: () => !!props.rentedByMe, | ||
set: val => emit("update:rentedByMe", val), | ||
}); | ||
|
||
const dedicatedModel = computed({ | ||
get: () => !!props.dedicated, | ||
set: val => emit("update:dedicated", val), | ||
}); | ||
0oM4R marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
const certifiedModel = computed({ | ||
get: () => !!props.certified, | ||
set: val => emit("update:certified", val), | ||
}); | ||
|
||
const hasGPUModel = computed({ | ||
get: () => !!props.hasGPU, | ||
set: val => emit("update:hasGPU", val), | ||
}); | ||
|
||
const showGPU = computed(() => route.meta.title == solutionType.fullvm || route.meta.title == solutionType.openwebui); | ||
</script> | ||
|
||
<script lang="ts"> | ||
export default { | ||
name: "RentalFilterSwitches", | ||
}; | ||
</script> |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can just remove this v-if condition and remove showGPU prop since it will always be true
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same, it's just check for only 2 solutions not the rest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please refer to replies above