diff --git a/.yarnrc.yml b/.yarnrc.yml index c167cc7bc37..741eac0d3cb 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -1,5 +1,3 @@ -approvedGitRepositories: - - "**" enableScripts: false diff --git a/docs/.vitepress/theme/components/price-estimator/LabCard.vue b/docs/.vitepress/theme/components/price-estimator/LabCard.vue index 7bdfebc66ec..dc275f821bd 100644 --- a/docs/.vitepress/theme/components/price-estimator/LabCard.vue +++ b/docs/.vitepress/theme/components/price-estimator/LabCard.vue @@ -17,6 +17,24 @@ const showLocalComputeSummary = ref(false) const showLocalStorageSummary = ref(false) let editingComputeItem: ComputeUnit | null = null +// Collapse state +const isCollapsed = ref(props.lab.collapse === undefined ? true : props.lab.collapse) +const toggleCollapse = () => { + isCollapsed.value = !isCollapsed.value + priceEstimatorStore.updateLabCollapse(props.lab.id, isCollapsed.value) +} + +const changeSubscription = () => { + let subscription = props.lab.subscription + if (subscription == "1Y") { + subscription = "3Y" + } else { + subscription = "1Y" + } + + priceEstimatorStore.updateLabSubscription(props.lab.id, subscription) +} + const computeHeaders = ref([ { title: "Name", align: "start", sortable: true, key: "name" }, { title: "Machine type", align: "start", sortable: true, key: "machine_type" }, @@ -153,28 +171,48 @@ const removeStorageById = (storageId: number) => {