Skip to content

Commit

Permalink
- Fixed some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
639852 committed Aug 3, 2023
1 parent 9b9a27a commit 857c33b
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 18 deletions.
6 changes: 4 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ export default {
sessionStorage.removeItem("user");
if (data.uuid) {
this.$router.replace({ name: 'openCloud_new', params: { uuid: data.uuid } });
setTimeout(() => { location.reload() }, 100);
setTimeout(() => {
this.$router.replace({ name: 'openCloud_new', params: { uuid: data.uuid } });
location.reload();
}, 100);
} else if (this.$route.name.includes('login')) {
this.$router.replace({ name: 'root' });
location.reload();
Expand Down
5 changes: 2 additions & 3 deletions src/components/appMain/cloud/openCloud_new.vue
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ export default {
display: grid;
grid-template-columns: 20% 1fr 20%;
justify-items: center;
align-items: center;
align-items: start;
}
.Fcloud__header-title {
position: relative;
Expand All @@ -777,9 +777,8 @@ export default {
width: 15px;
background-color: var(--bright_font);
border-radius: 50%;
top: 55%;
bottom: 5px;
left: -25px;
transform: translateY(-50%);
}
.Fcloud__buttons {
display: flex;
Expand Down
12 changes: 9 additions & 3 deletions src/components/appMain/modules/ovh cloud/createInstance.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<a-col>
<span style="display: inline-block">{{ $t('cpu') }}: (cores)</span>
</a-col>
<a-col :span="20">
<a-col :span="24" :md="20">
<a-slider
range
style="margin-top: 10px"
Expand All @@ -47,7 +47,7 @@
<a-col>
<span style="display: inline-block">{{ $t('ram') }}: (Gb)</span>
</a-col>
<a-col :span="20">
<a-col :span="24" :md="20">
<a-slider
range
style="margin-top: 10px"
Expand All @@ -64,7 +64,7 @@
<a-col>
<span style="display: inline-block">{{ $t("Drive") }}: (Gb)</span>
</a-col>
<a-col :span="20">
<a-col :span="24" :md="20">
<a-slider
range
style="margin-top: 10px"
Expand Down Expand Up @@ -309,4 +309,10 @@ export default {
background-color: var(--main);
color: #fff;
}

@media (max-width: 576px) {
.order__grid {
grid-template-columns: 1fr 1fr;
}
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -427,4 +427,10 @@ export default {
background-color: var(--main);
color: #fff;
}

@media (max-width: 576px) {
.order__grid {
grid-template-columns: 1fr 1fr;
}
}
</style>
5 changes: 3 additions & 2 deletions src/components/appMain/modules/ovh vps/createInstance.vue
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export default {
const addons = { backup: {}, snapshot: {}, disk: {} };
Object.keys(addons).forEach((addon) => {
this.getPlan.resources?.forEach(({ price, key }) => {
this.getPlan.resources?.forEach(({ price, key, title }) => {
const { value } = this.plans.find((el) => el.value.includes(this.planKey)) || {};
const addonKey = key.split(' ')[1];
Expand All @@ -173,8 +173,9 @@ export default {
const isInclude = this.allAddons[value]?.includes(addonKey);
const isEqualMode = period.pricingMode === this.mode;
if (title === '') title = addonKey;
if (isInclude && key.includes(addon) && isEqualMode) {
addons[addon][addonKey] = { periods: [period], title: addonKey };
addons[addon][addonKey] = { periods: [period], title };
}
});
});
Expand Down
4 changes: 2 additions & 2 deletions src/components/appMain/newPaaS.vue
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@
<script>
import { mapGetters } from "vuex";
import { NcMap } from "nocloud-ui";
import { NcMap } from "../../../../nocloud-ui";
import loading from "../loading/loading";
import addFunds from '../balance/addFunds.vue';
import notification from "@/mixins/notification.js";
Expand Down Expand Up @@ -681,7 +681,7 @@ export default {
showcase.locations?.forEach((location) => {
const sp = this.getSP.find(({ locations, type }) =>
locations.find(({ id, type: locationType }) =>
location.id.includes(id) && locationType.includes(type)
location.id.includes(id) && ((locationType === '') ? true : locationType.includes(type))
)
);
Expand Down
6 changes: 6 additions & 0 deletions src/components/appMain/ovhCreationTemplate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -545,4 +545,10 @@ export default {
background-color: var(--main);
color: #fff;
}
@media (max-width: 576px) {
.order__grid {
grid-template-columns: 1fr 1fr;
}
}
</style>
3 changes: 3 additions & 0 deletions src/components/services/iaas/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -930,6 +930,9 @@ export default {
.product__specs td:last-child::before {
transform: translate(-10px, -50%);
}
.order__grid {
grid-template-columns: 1fr 1fr;
}
}

.specs-enter-active,
Expand Down
2 changes: 1 addition & 1 deletion src/components/userProducts/userProducts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ export default {
case 'Date':
return new Date(a.date).getTime() - new Date(b.date).getTime();
case 'Name' :
return a.productname.toLowerCase() < b.productname.toLowerCase();
return a.productname?.toLowerCase() < b.productname?.toLowerCase();
case 'Cost':
return parseFloat(a.orderamount) - parseFloat(b.orderamount);
}
Expand Down
4 changes: 0 additions & 4 deletions src/routes/register.vue
Original file line number Diff line number Diff line change
Expand Up @@ -519,10 +519,6 @@ export default {
justify-content: center;
}
.login__forgot{
margin-top: 40px;
}
#qrcode{
display: inline-block;
}
Expand Down
2 changes: 1 addition & 1 deletion src/store/products.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default {
return new Promise((resolve, reject) => {
api.get(rootState.nocloud.auth.baseURL, { params: { userid, run: 'get_active_products' } })
.then(res => {
const products = Object.values(res ?? []);
const products = Object.values((res.ERROR) ? {} : res);

commit('setProducts', products);
commit('setProductsLoading', false);
Expand Down

0 comments on commit 857c33b

Please sign in to comment.