feat: customize login page images and backgrounds#8398
feat: customize login page images and backgrounds#8398f2c-ci-robot[bot] merged 1 commit intodev-v2from
Conversation
|
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
|
||
| onMounted(() => { | ||
| getStatus(); | ||
| }); |
There was a problem hiding this comment.
The provided code has several issues and areas for improvement:
- The
loadImagefunction is repetitive and can be simplified. - There are duplicate references to certain files (
@/assets/images/1panel-login.jpg) that could potentially cause confusion or errors.
Here's an improved version of the code with some potential optimizations:
import { ref, onMounted, defineComponent } from 'vue';
import LoginForm from './components/login-form.vue';
import { GlobalStore } from '@/store';
const globalStore = GlobalStore();
const showLogoVar =
process.env.NODE_ENV !== 'production' &&
window.location.host.toLowerCase().indexOf('.dev.') !== -1;
let imageUrl = '';
onMounted(() => {
if (process.env.IS_DEVELOPMENT && window.location.host.toLowerCase().indexOf('.dev.') !== -1) {
imageUrl = '/api/v2/images/dev_login-image.png?t=' + Date.now();
}
getStatus();
});In this version, we have removed the redundant reference to logoImage and used a condition to determine whether to set imageUrl. We've also moved loading logic into the component itself using the setup option and removed unnecessary imports. Additionally, we've added a variable to handle development mode and use it to dynamically load images based on environment variables.
| bgColor: 'Warna Latar', | ||
| }, | ||
| helper: { | ||
| wafTitle1: 'Peta Pencegahan', |
There was a problem hiding this comment.
The provided code snippet seems to be part of a translation file for an interface in Indonesian. Here are some observations and suggestions:
-
Variable Names:
- The variable names (
setDefault,setHelper, etc.) have been translated to their印尼 counterparts, which is appropriate.
- The variable names (
-
Reset Command:
- The "reset" command has replaced "
Tetapkan Semula", suggesting that this function might now allow users to reset all settings back to default instead of just setting defaults.
- The "reset" command has replaced "
-
Undo HTML Content Placeholder:
- The placeholder text "
{0}" within the "revertHtml" label remains intact, indicating it can still be used with a dynamic URL when applicable.
- The placeholder text "
-
New Logo Group:
- A new group "logoGroup" has been added, with subgroups like "imageGroup".
-
Login Image Labels:
- New labels such as "loginImage", "loginImageHelper", "loginBgType", "loginBgImage", "loginBgImageHelper", "loginBgColor", and "loginBgColorHelper" have been introduced, each explaining different properties about login images.
-
General Image and Background Color Labels:
- Two more general groups are added for images ("image") and background colors ("bgColor").
Overall, the changes aim to expand the interface's localization while maintaining clarity and consistency in the translations. Additionally, incorporating new sections regarding specific login image properties aligns well with improving user experience on interfaces handling account authentication.
| bgColor: 'Cor de Fundo', | ||
| }, | ||
| helper: { | ||
| wafTitle1: 'Mapa de Interceptação', |
There was a problem hiding this comment.
The changes appear to be correcting typos and formatting errors within the translation strings of a messaging dialog. The most significant corrections include:
- Fixed typos in variable names like
setHelperand changed them to more descriptive words likesetDefaultHelper. - Corrected misspelling of "helper" in some phrases.
- Updated punctuation marks where necessary.
Overall, these modifications improve readability and grammatical accuracy of the translations within the context provided.
|
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: wanghe-fit2cloud The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |



No description provided.