mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
refactor(console): add another button (#2653)
This commit is contained in:
parent
9345c10301
commit
6441a38c13
21 changed files with 23 additions and 22 deletions
|
@ -1,5 +1,3 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="M8.00017 1.33325C6.68162 1.33325 5.39269 1.72425 4.29636 2.45679C3.20004 3.18933 2.34555 4.23052 1.84097 5.4487C1.33638 6.66687 1.20436 8.00731 1.4616 9.30052C1.71883 10.5937 2.35377 11.7816 3.28612 12.714C4.21847 13.6463 5.40636 14.2813 6.69956 14.5385C7.99277 14.7957 9.33321 14.6637 10.5514 14.1591C11.7696 13.6545 12.8108 12.8 13.5433 11.7037C14.2758 10.6074 14.6668 9.31846 14.6668 7.99992C14.6668 7.12444 14.4944 6.25753 14.1594 5.4487C13.8243 4.63986 13.3333 3.90493 12.7142 3.28587C12.0952 2.66682 11.3602 2.17575 10.5514 1.84072C9.74255 1.50569 8.87564 1.33325 8.00017 1.33325ZM8.00017 13.3333C6.94533 13.3333 5.91419 13.0205 5.03712 12.4344C4.16006 11.8484 3.47648 11.0154 3.07281 10.0409C2.66914 9.06636 2.56352 7.994 2.76931 6.95944C2.9751 5.92487 3.48305 4.97456 4.22893 4.22868C4.97481 3.4828 5.92512 2.97485 6.95968 2.76906C7.99425 2.56328 9.0666 2.66889 10.0411 3.07256C11.0157 3.47623 11.8486 4.15982 12.4347 5.03688C13.0207 5.91394 13.3335 6.94509 13.3335 7.99992C13.3335 9.41441 12.7716 10.771 11.7714 11.7712C10.7712 12.7713 9.41465 13.3333 8.00017 13.3333ZM10.6668 7.33325H8.66683V5.33325C8.66683 5.15644 8.59659 4.98687 8.47157 4.86185C8.34655 4.73682 8.17698 4.66659 8.00017 4.66659C7.82335 4.66659 7.65379 4.73682 7.52876 4.86185C7.40374 4.98687 7.3335 5.15644 7.3335 5.33325V7.33325H5.3335C5.15669 7.33325 4.98712 7.40349 4.86209 7.52851C4.73707 7.65354 4.66683 7.82311 4.66683 7.99992C4.66683 8.17673 4.73707 8.3463 4.86209 8.47132C4.98712 8.59635 5.15669 8.66659 5.3335 8.66659H7.3335V10.6666C7.3335 10.8434 7.40374 11.013 7.52876 11.138C7.65379 11.263 7.82335 11.3333 8.00017 11.3333C8.17698 11.3333 8.34655 11.263 8.47157 11.138C8.59659 11.013 8.66683 10.8434 8.66683 10.6666V8.66659H10.6668C10.8436 8.66659 11.0132 8.59635 11.1382 8.47132C11.2633 8.3463 11.3335 8.17673 11.3335 7.99992C11.3335 7.82311 11.2633 7.65354 11.1382 7.52851C11.0132 7.40349 10.8436 7.33325 10.6668 7.33325Z"
|
||||
fill="currentColor" />
|
||||
<path d="M7.99998 1.33325C6.68144 1.33325 5.39251 1.72425 4.29618 2.45679C3.19985 3.18933 2.34537 4.23052 1.84079 5.4487C1.3362 6.66687 1.20418 8.00731 1.46141 9.30052C1.71865 10.5937 2.35359 11.7816 3.28594 12.714C4.21829 13.6463 5.40617 14.2813 6.69938 14.5385C7.99259 14.7957 9.33303 14.6637 10.5512 14.1591C11.7694 13.6545 12.8106 12.8 13.5431 11.7037C14.2757 10.6074 14.6666 9.31846 14.6666 7.99992C14.6666 7.12444 14.4942 6.25753 14.1592 5.4487C13.8241 4.63986 13.3331 3.90493 12.714 3.28587C12.095 2.66682 11.36 2.17575 10.5512 1.84072C9.74237 1.50569 8.87546 1.33325 7.99998 1.33325V1.33325ZM7.99998 13.3333C6.94515 13.3333 5.914 13.0205 5.03694 12.4344C4.15988 11.8484 3.47629 11.0154 3.07263 10.0409C2.66896 9.06636 2.56334 7.994 2.76913 6.95944C2.97492 5.92487 3.48287 4.97456 4.22875 4.22868C4.97463 3.4828 5.92494 2.97485 6.9595 2.76906C7.99407 2.56328 9.06642 2.66889 10.041 3.07256C11.0155 3.47623 11.8485 4.15982 12.4345 5.03688C13.0205 5.91394 13.3333 6.94509 13.3333 7.99992C13.3333 9.41441 12.7714 10.771 11.7712 11.7712C10.771 12.7713 9.41447 13.3333 7.99998 13.3333V13.3333ZM10.6666 7.33325H8.66665V5.33325C8.66665 5.15644 8.59641 4.98687 8.47139 4.86185C8.34636 4.73682 8.17679 4.66659 7.99998 4.66659C7.82317 4.66659 7.6536 4.73682 7.52858 4.86185C7.40355 4.98687 7.33332 5.15644 7.33332 5.33325V7.33325H5.33332C5.1565 7.33325 4.98694 7.40349 4.86191 7.52851C4.73689 7.65354 4.66665 7.82311 4.66665 7.99992C4.66665 8.17673 4.73689 8.3463 4.86191 8.47132C4.98694 8.59635 5.1565 8.66659 5.33332 8.66659H7.33332V10.6666C7.33332 10.8434 7.40355 11.013 7.52858 11.138C7.6536 11.263 7.82317 11.3333 7.99998 11.3333C8.17679 11.3333 8.34636 11.263 8.47139 11.138C8.59641 11.013 8.66665 10.8434 8.66665 10.6666V8.66659H10.6666C10.8435 8.66659 11.013 8.59635 11.1381 8.47132C11.2631 8.3463 11.3333 8.17673 11.3333 7.99992C11.3333 7.82311 11.2631 7.65354 11.1381 7.52851C11.013 7.40349 10.8435 7.33325 10.6666 7.33325Z" fill="currentColor"/>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2 KiB |
|
@ -40,9 +40,8 @@
|
|||
}
|
||||
|
||||
.icon {
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
&:not(:last-child) {
|
||||
margin-right: _.unit(2);
|
||||
|
@ -62,6 +61,12 @@
|
|||
&.text {
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.icon {
|
||||
&:not(:last-child) {
|
||||
margin-right: _.unit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.medium {
|
||||
|
|
|
@ -5,6 +5,7 @@ import type { KeyboardEvent } from 'react';
|
|||
import { useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import CirclePlus from '@/assets/images/circle-plus.svg';
|
||||
import Minus from '@/assets/images/minus.svg';
|
||||
|
||||
import Button from '../Button';
|
||||
|
@ -106,6 +107,7 @@ const MultiTextInput = ({
|
|||
type="text"
|
||||
title="general.add_another"
|
||||
className={styles.addAnother}
|
||||
icon={<CirclePlus />}
|
||||
onClick={handleAdd}
|
||||
/>
|
||||
<ConfirmModal
|
||||
|
|
|
@ -3,6 +3,7 @@ import classNames from 'classnames';
|
|||
import { useTranslation } from 'react-i18next';
|
||||
import { snakeCase } from 'snake-case';
|
||||
|
||||
import CirclePlus from '@/assets/images/circle-plus.svg';
|
||||
import Plus from '@/assets/images/plus.svg';
|
||||
import ActionMenu from '@/components/ActionMenu';
|
||||
import type { Props as ButtonProps } from '@/components/Button';
|
||||
|
@ -33,6 +34,7 @@ const AddButton = ({ options, onSelected, hasSelectedIdentifiers }: Props) => {
|
|||
type: 'text',
|
||||
size: 'small',
|
||||
title: 'general.add_another',
|
||||
icon: <CirclePlus />,
|
||||
};
|
||||
|
||||
return (
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import classNames from 'classnames';
|
||||
|
||||
import CirclePlus from '@/assets/images/circle-plus.svg';
|
||||
import Plus from '@/assets/images/plus.svg';
|
||||
import ActionMenu from '@/components/ActionMenu';
|
||||
import type { Props as ButtonProps } from '@/components/Button';
|
||||
|
@ -32,6 +33,7 @@ const AddButton = ({ options, onSelected, hasSelectedConnectors }: Props) => {
|
|||
type: 'text',
|
||||
size: 'small',
|
||||
title: 'general.add_another',
|
||||
icon: <CirclePlus />,
|
||||
};
|
||||
|
||||
return (
|
||||
|
|
|
@ -33,7 +33,6 @@ const application_details = {
|
|||
cors_allowed_origins_placeholder: 'https://your.website.de',
|
||||
cors_allowed_origins_tip:
|
||||
'Es sind standardmäßig alle Umleitungs-URI Origins erlaubt. Normalerweise ist dieses Feld nicht erforderlich. See the <a>MDN doc</a> for detailed info.', // UNTRANSLATED
|
||||
add_another: 'Weitere hinzufügen',
|
||||
id_token_expiration: 'ID Token Ablaufzeit',
|
||||
refresh_token_expiration: 'Refresh Token Ablaufzeit',
|
||||
token_endpoint: 'Token Endpoint',
|
||||
|
|
|
@ -30,7 +30,7 @@ const general = {
|
|||
copying: 'Kopiere',
|
||||
copied: 'Kopiert',
|
||||
required: 'Erforderlich',
|
||||
add_another: '+ Weitere hinzufügen',
|
||||
add_another: 'Weitere hinzufügen',
|
||||
deletion_confirmation: 'Willst du {{title}} wirklich löschen?',
|
||||
settings_nav: 'Einstellungen',
|
||||
unsaved_changes_warning:
|
||||
|
|
|
@ -33,7 +33,6 @@ const application_details = {
|
|||
cors_allowed_origins_placeholder: 'https://your.website.com',
|
||||
cors_allowed_origins_tip:
|
||||
'By default, all the origins of Redirect URIs will be allowed. Usually no action is required for this field. See the <a>MDN doc</a> for detailed info.',
|
||||
add_another: 'Add Another',
|
||||
id_token_expiration: 'ID Token expiration',
|
||||
refresh_token_expiration: 'Refresh Token expiration',
|
||||
token_endpoint: 'Token Endpoint',
|
||||
|
|
|
@ -30,7 +30,7 @@ const general = {
|
|||
copying: 'Copying',
|
||||
copied: 'Copied',
|
||||
required: 'Required',
|
||||
add_another: '+ Add Another',
|
||||
add_another: 'Add Another',
|
||||
deletion_confirmation: 'Are you sure you want to delete this {{title}}?',
|
||||
settings_nav: 'Settings',
|
||||
unsaved_changes_warning: 'You have made some changes. Are you sure you want to leave this page?',
|
||||
|
|
|
@ -33,7 +33,6 @@ const application_details = {
|
|||
cors_allowed_origins_placeholder: 'https://votre.site.com',
|
||||
cors_allowed_origins_tip:
|
||||
"Par défaut, toutes les origines des URI de redirection seront autorisées. En général, aucune action n'est requise pour ce champ. See the <a>MDN doc</a> for detailed info.", // UNTRANSLATED
|
||||
add_another: 'Ajouter un autre',
|
||||
id_token_expiration: "Expiration du jeton d'identification",
|
||||
refresh_token_expiration: "Rafraîchir l'expiration du jeton",
|
||||
token_endpoint: 'Token Endpoint',
|
||||
|
|
|
@ -30,7 +30,7 @@ const general = {
|
|||
copying: 'Copie',
|
||||
copied: 'Copié',
|
||||
required: 'Requis',
|
||||
add_another: '+ Ajouter un autre',
|
||||
add_another: 'Ajouter un autre',
|
||||
deletion_confirmation: 'Êtes-vous sûr de vouloir supprimer ce {{title}} ?',
|
||||
settings_nav: 'Paramètres',
|
||||
unsaved_changes_warning:
|
||||
|
|
|
@ -33,7 +33,6 @@ const application_details = {
|
|||
cors_allowed_origins_placeholder: 'https://your.website.com',
|
||||
cors_allowed_origins_tip:
|
||||
'기본으로 모든 리다이렉트의 오리진들은 허용되요. 대체적으로 이 값을 건들 필요는 없어요. See the <a>MDN doc</a> for detailed info.', // UNTRANSLATED
|
||||
add_another: '새로 추가',
|
||||
id_token_expiration: 'ID 토큰 만료',
|
||||
refresh_token_expiration: 'Refresh 토큰 만료',
|
||||
token_endpoint: '토큰 End-Point',
|
||||
|
|
|
@ -30,7 +30,7 @@ const general = {
|
|||
copying: '복사 중',
|
||||
copied: '복사됨',
|
||||
required: '필수',
|
||||
add_another: '+ 새로 추가',
|
||||
add_another: '새로 추가',
|
||||
deletion_confirmation: '정말로 {{title}}을/를 삭제할까요?',
|
||||
settings_nav: '설정',
|
||||
unsaved_changes_warning: '수정된 내용이 있어요. 정말로 현재 페이지를 벗어날까요?',
|
||||
|
|
|
@ -33,7 +33,6 @@ const application_details = {
|
|||
cors_allowed_origins_placeholder: 'https://your.website.com',
|
||||
cors_allowed_origins_tip:
|
||||
'Por padrão, todas as origens de URIs de redirecionamento serão permitidas. Normalmente, nenhuma ação é necessária para este campo. See the <a>MDN doc</a> for detailed info.', // UNTRANSLATED
|
||||
add_another: 'Adicionar outro',
|
||||
id_token_expiration: 'Expiração do token de ID',
|
||||
refresh_token_expiration: 'Expiração Refresh Token',
|
||||
token_endpoint: 'Token Endpoint',
|
||||
|
|
|
@ -30,7 +30,7 @@ const general = {
|
|||
copying: 'Copiando',
|
||||
copied: 'Copiado',
|
||||
required: 'Obrigatório',
|
||||
add_another: '+ Adicionar outro',
|
||||
add_another: 'Adicionar outro',
|
||||
deletion_confirmation: 'Tem certeza de que deseja excluir este {{title}}?',
|
||||
settings_nav: 'Configurações',
|
||||
unsaved_changes_warning:
|
||||
|
|
|
@ -33,7 +33,6 @@ const application_details = {
|
|||
cors_allowed_origins_placeholder: 'https://your.website.com',
|
||||
cors_allowed_origins_tip:
|
||||
'Por padrão, todas as origens de redirecionamento serão permitidas. Recomenda-se restringir isto. See the <a>MDN doc</a> for detailed info.', // UNTRANSLATED
|
||||
add_another: 'Adicionar outro',
|
||||
id_token_expiration: 'Expiração do token de ID',
|
||||
refresh_token_expiration: 'Expiração do token de atualização',
|
||||
token_endpoint: 'Endpoint Token',
|
||||
|
|
|
@ -30,7 +30,7 @@ const general = {
|
|||
copying: 'Copiando',
|
||||
copied: 'Copiado',
|
||||
required: 'Necessário',
|
||||
add_another: '+ Adicionar outro',
|
||||
add_another: 'Adicionar outro',
|
||||
deletion_confirmation: 'Tem a certeza que deseja eliminar isso {{title}}?',
|
||||
settings_nav: 'Definições',
|
||||
unsaved_changes_warning: 'Fez algumas alterações. Tem a certeza que deseja sair desta página?',
|
||||
|
|
|
@ -33,7 +33,6 @@ const application_details = {
|
|||
cors_allowed_origins_placeholder: 'https://your.website.com',
|
||||
cors_allowed_origins_tip:
|
||||
'Varsayılan olarak, Yönlendirme URIlerinin tüm originlerine izin verilir. Genellikle bu alan için herhangi bir işlem gerekmez. See the <a>MDN doc</a> for detailed info.', // UNTRANSLATED
|
||||
add_another: 'Bir tane daha ekle',
|
||||
id_token_expiration: 'ID Token sona erme süresi',
|
||||
refresh_token_expiration: 'Refresh Token sona erme süresi',
|
||||
token_endpoint: 'Token bitiş noktası',
|
||||
|
|
|
@ -30,7 +30,7 @@ const general = {
|
|||
copying: 'Kopyalanıyor',
|
||||
copied: 'Kopyalandı',
|
||||
required: 'Gerekli',
|
||||
add_another: '+ Bir tane daha ekle',
|
||||
add_another: 'Bir tane daha ekle',
|
||||
deletion_confirmation: 'Bu dosyayı silmek istediğinize emin misiniz: {{title}}?',
|
||||
settings_nav: 'Ayarlar',
|
||||
unsaved_changes_warning:
|
||||
|
|
|
@ -33,7 +33,6 @@ const application_details = {
|
|||
cors_allowed_origins_placeholder: 'https://your.website.com',
|
||||
cors_allowed_origins_tip:
|
||||
'所有 Redirect URI 的 origin 将默认被允许。通常不需要对此字段进行操作。参见 <a>MDN 文档</a>以了解更多',
|
||||
add_another: '新增',
|
||||
id_token_expiration: 'ID Token 过期时间',
|
||||
refresh_token_expiration: 'Refresh Token 过期时间',
|
||||
token_endpoint: 'Token Endpoint',
|
||||
|
|
|
@ -30,7 +30,7 @@ const general = {
|
|||
copying: '复制中',
|
||||
copied: '已复制',
|
||||
required: '必填',
|
||||
add_another: '+ 新增',
|
||||
add_another: '新增',
|
||||
deletion_confirmation: '你确定要删除这个 {{title}} 吗?',
|
||||
settings_nav: '设置',
|
||||
unsaved_changes_warning: '还有未保存的变更, 确定要离开吗?',
|
||||
|
|
Loading…
Reference in a new issue