Skip to content

Commit

Permalink
Merge pull request #181 from rupato-deriv/Rupato/BOT-2595/Fix--mobile…
Browse files Browse the repository at this point in the history
…-bot-builder-tour

Rupato/BOT-2595/fix: mobile bot builder tour
  • Loading branch information
farabi-deriv authored Dec 11, 2024
2 parents c1c01e8 + b1c8f12 commit ce22bfa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/pages/main/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,8 @@
height: 2.5rem !important;
width: 2.5rem !important;
padding: 0.2rem 0;

@include flex-center;
}

.beta-server-bot {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,11 @@ const BotBuilderTourMobile = observer(() => {
const test_id = tour_step === 3 ? 'finish-bot-builder-tour' : 'next-bot-builder-tour';

React.useEffect(() => {
if (active_tour === '') return;
setTourActiveStep(tour_step);
//component does not rerender so calling this to highlight
!show_mobile_tour_dialog && highlightLoadModalButton(active_tour, tour_step);
if (tour_step === 2) toggleTourLoadModal(true);
else toggleTourLoadModal(false);
else if (active_tour !== '') toggleTourLoadModal(false);
const token = getSetting('bot_builder_token');
if (!token && active_tab === 1) {
if (is_open) {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/tutorials/dbot-tours/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const setTourType = (param: string) => {
};

export const highlightLoadModalButton = (tour_active: string, step: number) => {
const el_ref = document.querySelector('.toolbar__group-btn svg:nth-child(2)');
const el_ref = document.querySelector('#db-toolbar__import-button');
if (tour_active && step === 1) {
el_ref?.classList.add('dbot-tour-blink');
} else {
Expand Down

0 comments on commit ce22bfa

Please sign in to comment.