Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[APP SEPARATION] [BOT] / maryia / feat: make work journal tab of run panel, adapt filters, text content #23

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions public/assets/icons/IcFilter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions src/components/download/download.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@
padding: 12px;
padding-left: 16px;
border: solid 1px var(--general-section-1);

.download__button,
&__view-detail-button {
height: 3.2rem;
}
}
}

.run-panel__info {
.download__button {
height: 3.2rem;
}
}
7 changes: 3 additions & 4 deletions src/components/journal/journal-components/filters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ const Filters = ({
return (
<Checkbox
key={item.id}
classNameLabel={classNameLabel}
value={hasFilter}
defaultChecked={hasFilter}
labelClassName={classNameLabel}
checked={hasFilter}
label={item.label}
onChange={() => filterMessage(!hasFilter, item.id)}
/>
name={item.id} />
);
})}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const JournalTools = ({
<div className='journal-tools__container'>
<Download tab='journal' />
<div ref={toggle_ref} className='journal-tools__container-filter' onClick={toggleFilterDialog}>
<Text size='xs' className='journal-tools__container-filter--label'>
<Text size='sm' weight='normal' className='journal-tools__container-filter--label'>
<Localize i18n_default_text='Filters' />
</Text>
<Icon icon='IcFilter' size={16} />
Expand Down
4 changes: 4 additions & 0 deletions src/components/journal/journal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@
&--label {
margin-inline-end: 0.8rem;
}

.deriv-text {
font-weight: lighter;
}
}
}
}
Expand Down
18 changes: 9 additions & 9 deletions src/components/journal/journal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,41 +53,41 @@ const Journal = observer(() => {
) : (
<>
{contract_stage >= contract_stages.STARTING &&
!!Object.keys(checked_filters as TCheckedFilters).length &&
!unfiltered_messages_length &&
is_stop_button_visible ? (
!!Object.keys(checked_filters as TCheckedFilters).length &&
!unfiltered_messages_length &&
is_stop_button_visible ? (
<JournalLoader is_mobile={is_mobile} />
) : (
<div className='journal-empty'>
<Icon icon='IcBox' className='journal-empty__icon' size={64} color='secondary' />
<Text
as='h4'
size='xs'
size='sm'
weight='bold'
align='center'
color='less-prominent'
lineHeight='xs'
lineHeight='sm'
className='journal-empty__header'
>
{localize('There are no messages to display')}
</Text>
<div className='journal-empty__message'>
<Text size='xs' color='less-prominent'>
<Text size='xs' lineHeight='3xl' color='less-prominent'>
{localize('Here are the possible reasons:')}
</Text>
<ul className='journal-empty__list'>
<li>
<Text size='xs' color='less-prominent'>
<Text size='xs' lineHeight='3xl' color='less-prominent'>
{localize('The bot is not running')}
</Text>
</li>
<li>
<Text size='xs' color='less-prominent'>
<Text size='xs' lineHeight='3xl' color='less-prominent'>
{localize('The stats are cleared')}
</Text>
</li>
<li>
<Text size='xs' color='less-prominent'>
<Text size='xs' lineHeight='3xl' color='less-prominent'>
{localize('All messages are filtered out')}
</Text>
</li>
Expand Down
5 changes: 5 additions & 0 deletions src/components/summary/summary-card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
width: 100%;
}

.deriv-text {
font-weight: lighter;
text-align: center;
}

&--inactive {
color: var(--text-general);
font-size: 14px;
Expand Down
2 changes: 1 addition & 1 deletion src/components/summary/summary-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const SummaryCard = observer(({ contract_info, is_contract_loading }: TSummaryCa
</ContractCard>
)}
{!is_contract_loading && !contract_info && (
<Text as='p' LineHeight='sm' size='xs'>
<Text as='p' LineHeight='md' size='sm' weight='lighter'>
{localize('When you’re ready to trade, hit ')}
<strong>{localize('Run')}</strong>
{localize('. You’ll be able to track your bot’s performance here.')}
Expand Down
2 changes: 1 addition & 1 deletion src/components/transactions/transactions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
list-style-type: disc;
margin-left: 2rem;
font-size: var(--text-size-xxs);
line-height: var(--text-lh-xl);
line-height: var(--text-lh-xxl);
color: var(--text-less-prominent);
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/components/transactions/transactions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -200,17 +200,17 @@ const Transactions = observer(({ is_drawer_open }: TTransactions) => {
</div>
<Text
as='h4'
size='xs'
size='sm'
weight='bold'
align='center'
color='less-prominent'
lineHeight='xs'
lineHeight='sm'
className='transactions-empty__header'
>
{localize('There are no transactions to display')}
</Text>
<div className='transactions-empty__message'>
<Text size='xs' color='less-prominent'>
<Text size='xs' color='less-prominent' lineHeight='3xl'>
{localize('Here are the possible reasons:')}
</Text>
<ul className='transactions-empty__list'>
Expand Down
Loading