From 9ff9abacc3adec08202a4141437c9e82c8be04c0 Mon Sep 17 00:00:00 2001 From: vjrj Date: Wed, 22 Jul 2026 01:01:59 +0200 Subject: [PATCH] bootstrap: lang/type dropdowns jQuery -> react-bootstrap The false-positive-type selector (Fires.js) and the language selector (Profile.js) used Bootstrap's jQuery dropdown (`data-toggle="dropdown"`), the last widgets depending on the BS4 jQuery JS that goes away with the CSS swap. Replace both with react-bootstrap // (open/close in React, no jQuery). Keeps the `.lang-selector` hook and `.btn-group` layout; works on the current BS4 CSS. Full-app build boots clean. --- imports/ui/pages/Fires/Fires.js | 25 ++++++++++--------------- imports/ui/pages/Profile/Profile.js | 23 +++++++++-------------- 2 files changed, 19 insertions(+), 29 deletions(-) diff --git a/imports/ui/pages/Fires/Fires.js b/imports/ui/pages/Fires/Fires.js index 12da3be..7406935 100644 --- a/imports/ui/pages/Fires/Fires.js +++ b/imports/ui/pages/Fires/Fires.js @@ -6,7 +6,7 @@ import React, { Fragment } from 'react'; import PropTypes from 'prop-types'; import { withTracker } from 'meteor/react-meteor-data'; import { withTranslation, Trans } from 'react-i18next'; -import { Row, Col, Alert, Form } from 'react-bootstrap'; +import { Row, Col, Alert, Form, Dropdown } from 'react-bootstrap'; import { Meteor } from 'meteor/meteor'; import { Bert } from 'meteor/themeteorchef:bert'; import { Helmet } from 'react-helmet-async'; @@ -204,24 +204,19 @@ class Fire extends React.Component { Indícanos de que tipo de fuego se trata y ayúdanos así a mejorar nuestras notificaciones: -
- -
+ + {Object.keys(FalsePositiveTypes).map(key => ( - + this.onTypeSelect(key)}> + {FalsePositiveTypes[key]} + )) } -
-
+ +
} diff --git a/imports/ui/pages/Profile/Profile.js b/imports/ui/pages/Profile/Profile.js index e381bda..02faada 100644 --- a/imports/ui/pages/Profile/Profile.js +++ b/imports/ui/pages/Profile/Profile.js @@ -3,7 +3,7 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { Row, Form, Button } from 'react-bootstrap'; +import { Row, Form, Button, Dropdown } from 'react-bootstrap'; import _ from 'lodash'; import { Meteor } from 'meteor/meteor'; import { Accounts } from 'meteor/accounts-base'; @@ -200,24 +200,19 @@ class Profile extends React.Component { {this.t('Idioma')} -
- -
+ + {enabledLangs.map(lang => ( - + )) } -
-
+ +
{this.t('Puedes participar en las traducciones')}