Skip to content
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
4 changes: 3 additions & 1 deletion src/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,10 @@
"errorReplaceCertificate": "Error replacing certificate.",
"errorGenerateCsr": "Error generating CSR.",
"successAddCertificate": "Successfully added %{certificate}.",
"successAddedHTTPCertificate": "Successfully added %{certificate}. Reload the browser page to see the changes.",
"successDeleteCertificate": "Successfully deleted %{certificate}.",
"successReplaceCertificate": "Successfully replaced %{certificate}."
"successReplaceCertificate": "Successfully replaced %{certificate}.",
"successReplacedHTTPCertificate": "Successfully replaced %{certificate}. Reload the browser page to see the changes."
}
},
"pageChangePassword": {
Expand Down
39 changes: 30 additions & 9 deletions src/store/modules/SecurityAndAccess/CertificatesStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,21 @@ export const CertificatesStore = defineStore('certificates', {
})
.then(() => this.getCertificates())
.then(() => {
return i18n.global.t('pageCertificates.toast.successAddCertificate', {
certificate: getCertificateProp(type, 'label'),
});
if (typeOfCertificate === 'HTTPS Certificate') {
return i18n.global.t(
'pageCertificates.toast.successAddedHTTPCertificate',
{
certificate: getCertificateProp(type, 'label'),
}
);
} else {
return i18n.global.t(
'pageCertificates.toast.successAddCertificate',
{
certificate: getCertificateProp(type, 'label'),
}
);
}
})
.catch((error) => {
console.log(error);
Expand Down Expand Up @@ -269,12 +281,21 @@ export const CertificatesStore = defineStore('certificates', {
this.getCertificates();
})
.then(() => {
return i18n.global.t(
'pageCertificates.toast.successReplaceCertificate',
{
certificate: getCertificateProp(type, 'label'),
}
);
if (typeOfCertificate === 'HTTPS Certificate') {
return i18n.global.t(
'pageCertificates.toast.successReplacedHTTPCertificate',
{
certificate: getCertificateProp(type, 'label'),
}
);
} else {
return i18n.global.t(
'pageCertificates.toast.successReplaceCertificate',
{
certificate: getCertificateProp(type, 'label'),
}
);
}
})
.catch((error) => {
console.log(error);
Expand Down