chore: updating some of the repo picker

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2024-08-20 09:52:31 +02:00
parent c7a3611cf3
commit 52408cbbdf
5 changed files with 11 additions and 14 deletions
+5 -5
View File
@@ -150,11 +150,11 @@ export const scaffolderTranslationRef: TranslationRef<
readonly 'fields.gitlabRepoPicker.owner.title': 'Owner Available';
readonly 'fields.gitlabRepoPicker.owner.description': 'GitLab namespace where this repository will belong to. It can be the name of organization, group, subgroup, user, or the project.';
readonly 'fields.gitlabRepoPicker.owner.inputTitle': 'Owner';
readonly 'fields.repoUrlPickerHost.host.title': 'Host';
readonly 'fields.repoUrlPickerHost.host.description': 'The host where the repository will be created';
readonly 'fields.repoUrlPickerRepoName.repository.title': 'Repositories Available';
readonly 'fields.repoUrlPickerRepoName.repository.description': 'The name of the repository';
readonly 'fields.repoUrlPickerRepoName.repository.inputTitle': 'Repository';
readonly 'fields.repoUrlPicker.host.title': 'Host';
readonly 'fields.repoUrlPicker.host.description': 'The host where the repository will be created';
readonly 'fields.repoUrlPicker.repository.title': 'Repositories Available';
readonly 'fields.repoUrlPicker.repository.description': 'The name of the repository';
readonly 'fields.repoUrlPicker.repository.inputTitle': 'Repository';
readonly 'actionsPage.content.emptyState.title': 'No information to display';
readonly 'actionsPage.content.emptyState.description': 'There are no actions installed or there was an issue communicating with backend.';
readonly 'actionsPage.content.tableCell.type': 'Type';
@@ -15,7 +15,6 @@
*/
import React from 'react';
import FormControl from '@material-ui/core/FormControl';
import FormHelperText from '@material-ui/core/FormHelperText';
import TextField from '@material-ui/core/TextField';
import { BaseRepoUrlPickerProps } from './types';
import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
@@ -76,7 +76,7 @@ export const RepoUrlPickerHost = (props: {
<Select
native
disabled={hosts?.length === 1}
label={t('fields.repoUrlPickerHost.host.title')}
label={t('fields.repoUrlPicker.host.title')}
onChange={s => onChange(String(Array.isArray(s) ? s[0] : s))}
selected={host}
items={hostsOptions}
@@ -84,7 +84,7 @@ export const RepoUrlPickerHost = (props: {
/>
<FormHelperText>
{t('fields.repoUrlPickerHost.host.description')}
{t('fields.repoUrlPicker.host.description')}
</FormHelperText>
</FormControl>
</>
@@ -56,7 +56,7 @@ export const RepoUrlPickerRepoName = (props: {
{allowedRepos?.length ? (
<Select
native
label={t('fields.repoUrlPickerRepoName.repository.title')}
label={t('fields.repoUrlPicker.repository.title')}
onChange={selected =>
onChange(String(Array.isArray(selected) ? selected[0] : selected))
}
@@ -74,7 +74,7 @@ export const RepoUrlPickerRepoName = (props: {
renderInput={params => (
<TextField
{...params}
label={t('fields.repoUrlPickerRepoName.repository.inputTitle')}
label={t('fields.repoUrlPicker.repository.inputTitle')}
required
/>
)}
@@ -83,7 +83,7 @@ export const RepoUrlPickerRepoName = (props: {
/>
)}
<FormHelperText>
{t('fields.repoUrlPickerRepoName.repository.description')}
{t('fields.repoUrlPicker.repository.description')}
</FormHelperText>
</FormControl>
</>
+1 -3
View File
@@ -125,13 +125,11 @@ export const scaffolderTranslationRef = createTranslationRef({
'GitLab namespace where this repository will belong to. It can be the name of organization, group, subgroup, user, or the project.',
},
},
repoUrlPickerHost: {
repoUrlPicker: {
host: {
title: 'Host',
description: 'The host where the repository will be created',
},
},
repoUrlPickerRepoName: {
repository: {
title: 'Repositories Available',
inputTitle: 'Repository',