mirror of
https://github.com/plankanban/planka.git
synced 2025-08-09 23:45:31 +02:00
#27 update file picker appearance
This commit is contained in:
parent
d6fd7796bd
commit
7596f5348c
3 changed files with 18 additions and 13 deletions
|
@ -1,7 +1,7 @@
|
||||||
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { Button, Form, Divider, Menu } from 'semantic-ui-react';
|
import { Button, Form, Menu } from 'semantic-ui-react';
|
||||||
import { withPopup } from '../../lib/popup';
|
import { withPopup } from '../../lib/popup';
|
||||||
import { Input, Popup, FilePicker } from '../../lib/custom-ui';
|
import { Input, Popup, FilePicker } from '../../lib/custom-ui';
|
||||||
|
|
||||||
|
@ -74,17 +74,17 @@ const AddStep = React.memo(({ onCreate, onImport, onClose }) => {
|
||||||
className={styles.field}
|
className={styles.field}
|
||||||
onChange={handleFieldChange}
|
onChange={handleFieldChange}
|
||||||
/>
|
/>
|
||||||
<Divider />
|
<Menu secondary vertical className={styles.menu}>
|
||||||
<FilePicker onSelect={handleFileSelect} accept=".json">
|
<FilePicker onSelect={handleFileSelect} accept=".json">
|
||||||
<Menu.Item className={styles.menuItem}>
|
<Menu.Item className={styles.menuItem}>
|
||||||
{selectedFile
|
{selectedFile
|
||||||
? selectedFile.name
|
? selectedFile.name
|
||||||
: t('common.uploadTrelloFile', {
|
: t('common.uploadTrelloFile', {
|
||||||
context: 'title',
|
context: 'title',
|
||||||
})}
|
})}
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
</FilePicker>
|
</FilePicker>
|
||||||
<Divider />
|
</Menu>
|
||||||
<Button
|
<Button
|
||||||
positive
|
positive
|
||||||
content={selectedFile ? t('action.importTrelloBoard') : t('action.createBoard')}
|
content={selectedFile ? t('action.importTrelloBoard') : t('action.createBoard')}
|
||||||
|
|
|
@ -2,4 +2,9 @@
|
||||||
.field {
|
.field {
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.menu {
|
||||||
|
margin: 0px 0px 4px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -143,7 +143,7 @@ export default {
|
||||||
time: 'Time',
|
time: 'Time',
|
||||||
timer: 'Timer',
|
timer: 'Timer',
|
||||||
title: 'Title',
|
title: 'Title',
|
||||||
uploadTrelloFile_title: 'Import Trello JSON File',
|
uploadTrelloFile_title: 'Import Board from Trello',
|
||||||
userActions_title: 'User Actions',
|
userActions_title: 'User Actions',
|
||||||
userAddedThisCardToList: '<0>{{user}}</0><1> added this card to {{list}}</1>',
|
userAddedThisCardToList: '<0>{{user}}</0><1> added this card to {{list}}</1>',
|
||||||
userLeftNewCommentToCard: '{{user}} left a new comment «{{comment}}» to <2>{{card}}</2>',
|
userLeftNewCommentToCard: '{{user}} left a new comment «{{comment}}» to <2>{{card}}</2>',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue