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

fixed reading params from link #743

Merged
merged 1 commit into from
Aug 8, 2024
Merged
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
12 changes: 6 additions & 6 deletions src/components/cloud/modules/keyweb/panels/os.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
:label="`${capitalize($t('clientinfo.username'))}:`"
>
<a-input
v-model:value="authData.username"
:value="authData.username"
:style="{
boxShadow: (authData.username.length < 2) ? '0 0 2px 2px var(--err)' : null
}"
@change="setOptions('config.username', $event)"
@update:value="authData.username = $event; setOptions('config.username', $event)"
/>

<div v-if="authData.username.length < 2" style="line-height: 1.5; color: var(--err)">
Expand All @@ -43,11 +43,11 @@
:label="`${capitalize($t('hostname'))}:`"
>
<a-input
v-model:value="authData.hostname"
:value="authData.hostname"
:style="{
boxShadow: (authData.hostname.length < 2) ? '0 0 2px 2px var(--err)' : null
}"
@change="setOptions('config.hostname', $event)"
@update:value="authData.hostname = $event; setOptions('config.hostname', $event)"
/>

<div v-if="authData.hostname.length < 2" style="line-height: 1.5; color: var(--err)">
Expand All @@ -68,9 +68,9 @@
/>

<a-input-password
v-model:value="authData.password"
:value="authData.password"
class="password"
@change="setOptions('config.password', $event)"
@update:value="authData.password = $event; setOptions('config.password', $event)"
/>
</a-form-item>
</a-col>
Expand Down
14 changes: 12 additions & 2 deletions src/components/cloud/modules/keyweb/panels/plan.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@

<script setup>
import { inject, nextTick, watch, computed, ref } from 'vue'
import { useRoute } from 'vue-router'
import { EditorContainer } from 'nocloud-ui'
import { useCloudStore } from '@/stores/cloud.js'
import { getPeriods } from '@/functions.js'
import { useSlider } from '@/hooks/utils'
Expand All @@ -59,13 +61,21 @@ watch(() => props.productSize, (value) => {
emits('update:periods', getPeriods(value, props.plans))
})
const route = useRoute()
const cloudStore = useCloudStore()
const [product] = inject('useProduct', () => [])()
const [, setOptions] = inject('useOptions', () => [])()
const [, setPrice] = inject('usePriceOVH', () => [])()
if (props.products.length > 0) setProduct(props.products[1] ?? props.products[0])
else resetData()
if (props.products.length > 0) {
const data = localStorage.getItem('data') ?? route.query.data
const { productSize } = JSON.parse(data ?? '{}')
if (productSize) setProduct(productSize)
else setProduct(props.products[1] ?? props.products[0])
} else {
resetData()
}
watch(() => props.products, (value) => {
if (value.length < 1) resetData()
Expand Down
3 changes: 2 additions & 1 deletion src/components/services/custom/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,8 @@ export default {

this.checkedType = group
this.options.size = data.productSize
} else return
return
}

if (keys && this.options.period) {
this.options.size = keys[this.options.period]
Expand Down
Loading