mirror of
https://github.com/logto-io/logto.git
synced 2025-01-06 20:40:08 -05:00
feat(console): submit form changes action bar (#2458)
This commit is contained in:
parent
4dc4322504
commit
3c9edb9ca4
9 changed files with 55 additions and 0 deletions
|
@ -0,0 +1,19 @@
|
||||||
|
@use '@/scss/underscore' as _;
|
||||||
|
|
||||||
|
.container {
|
||||||
|
position: sticky;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 60px;
|
||||||
|
border: 1px solid var(--color-line-divider);
|
||||||
|
display: flex;
|
||||||
|
padding: _.unit(3) _.unit(8);
|
||||||
|
justify-content: flex-end;
|
||||||
|
background-color: var(--color-layer-1);
|
||||||
|
box-shadow: var(--shadow-3);
|
||||||
|
border-radius: 12px 12px 0 0;
|
||||||
|
|
||||||
|
> :not(:first-child) {
|
||||||
|
margin-left: _.unit(3);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,29 @@
|
||||||
|
import Button from '../Button';
|
||||||
|
import * as styles from './index.module.scss';
|
||||||
|
|
||||||
|
type Props = {
|
||||||
|
isOpen: boolean;
|
||||||
|
isSubmitting: boolean;
|
||||||
|
onDiscard: () => void;
|
||||||
|
};
|
||||||
|
|
||||||
|
const SubmitFormChangesActionBar = ({ isOpen, isSubmitting, onDiscard }: Props) => {
|
||||||
|
if (!isOpen) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className={styles.container}>
|
||||||
|
<Button size="medium" title="general.discard" disabled={isSubmitting} onClick={onDiscard} />
|
||||||
|
<Button
|
||||||
|
isLoading={isSubmitting}
|
||||||
|
htmlType="submit"
|
||||||
|
type="primary"
|
||||||
|
size="medium"
|
||||||
|
title="general.save_changes"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default SubmitFormChangesActionBar;
|
|
@ -10,6 +10,7 @@ const general = {
|
||||||
save: 'Speichern',
|
save: 'Speichern',
|
||||||
save_changes: 'Änderungen speichern',
|
save_changes: 'Änderungen speichern',
|
||||||
saved: 'Gespeichert!',
|
saved: 'Gespeichert!',
|
||||||
|
discard: 'Discard', // UNTRANSLATED
|
||||||
loading: 'Lade...',
|
loading: 'Lade...',
|
||||||
redirecting: 'Weiterleiten...',
|
redirecting: 'Weiterleiten...',
|
||||||
add: 'Hinzufügen',
|
add: 'Hinzufügen',
|
||||||
|
|
|
@ -10,6 +10,7 @@ const general = {
|
||||||
save: 'Save',
|
save: 'Save',
|
||||||
save_changes: 'Save Changes',
|
save_changes: 'Save Changes',
|
||||||
saved: 'Saved!',
|
saved: 'Saved!',
|
||||||
|
discard: 'Discard',
|
||||||
loading: 'Loading...',
|
loading: 'Loading...',
|
||||||
redirecting: 'Redirecting...',
|
redirecting: 'Redirecting...',
|
||||||
add: 'Add',
|
add: 'Add',
|
||||||
|
|
|
@ -10,6 +10,7 @@ const general = {
|
||||||
save: 'Sauvegarder',
|
save: 'Sauvegarder',
|
||||||
save_changes: 'Sauvegarder les modifications',
|
save_changes: 'Sauvegarder les modifications',
|
||||||
saved: 'Sauvegardé !',
|
saved: 'Sauvegardé !',
|
||||||
|
discard: 'Discard', // UNTRANSLATED
|
||||||
loading: 'Chargement...',
|
loading: 'Chargement...',
|
||||||
redirecting: 'Redirection...',
|
redirecting: 'Redirection...',
|
||||||
add: 'Ajouter',
|
add: 'Ajouter',
|
||||||
|
|
|
@ -10,6 +10,7 @@ const general = {
|
||||||
save: '저장',
|
save: '저장',
|
||||||
save_changes: '변경 내용 저장',
|
save_changes: '변경 내용 저장',
|
||||||
saved: '저장됨!',
|
saved: '저장됨!',
|
||||||
|
discard: 'Discard', // UNTRANSLATED
|
||||||
loading: '로딩 중...',
|
loading: '로딩 중...',
|
||||||
redirecting: '리다이렉팅 중...',
|
redirecting: '리다이렉팅 중...',
|
||||||
add: '추가',
|
add: '추가',
|
||||||
|
|
|
@ -10,6 +10,7 @@ const general = {
|
||||||
save: 'Guardar',
|
save: 'Guardar',
|
||||||
save_changes: 'Guardar Alterações',
|
save_changes: 'Guardar Alterações',
|
||||||
saved: 'Guardado!',
|
saved: 'Guardado!',
|
||||||
|
discard: 'Discard', // UNTRANSLATED
|
||||||
loading: 'Carregando...',
|
loading: 'Carregando...',
|
||||||
redirecting: 'Redirecionando...',
|
redirecting: 'Redirecionando...',
|
||||||
add: 'Adicionar',
|
add: 'Adicionar',
|
||||||
|
|
|
@ -10,6 +10,7 @@ const general = {
|
||||||
save: 'Kaydet',
|
save: 'Kaydet',
|
||||||
save_changes: 'Değişiklikleri Kaydet',
|
save_changes: 'Değişiklikleri Kaydet',
|
||||||
saved: 'Kaydedildi!',
|
saved: 'Kaydedildi!',
|
||||||
|
discard: 'Discard', // UNTRANSLATED
|
||||||
loading: 'Yükleniyor...',
|
loading: 'Yükleniyor...',
|
||||||
redirecting: 'Yönlendiriliyor...',
|
redirecting: 'Yönlendiriliyor...',
|
||||||
add: 'Ekle',
|
add: 'Ekle',
|
||||||
|
|
|
@ -10,6 +10,7 @@ const general = {
|
||||||
save: '保存',
|
save: '保存',
|
||||||
save_changes: '保存更改',
|
save_changes: '保存更改',
|
||||||
saved: '保存成功!',
|
saved: '保存成功!',
|
||||||
|
discard: 'Discard', // UNTRANSLATED
|
||||||
loading: '读取中...',
|
loading: '读取中...',
|
||||||
redirecting: '页面跳转中...',
|
redirecting: '页面跳转中...',
|
||||||
add: '添加',
|
add: '添加',
|
||||||
|
|
Loading…
Reference in a new issue