Skip to content
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
9 changes: 6 additions & 3 deletions server/src/models/Gym.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ module.exports = class Gym extends Model {
})
}
}
if (actualBadge === 'none') {
if (actualBadge === 'none' && onlyGymBadges) {
gym.orWhereNotIn(
isMad ? 'gym.gym_id' : 'id',
userBadges.map((badge) => badge.gymId) || [],
Expand Down Expand Up @@ -369,7 +369,10 @@ module.exports = class Gym extends Model {
newGym.hasRaid = true
}
if (
(onlyAllGyms || onlyExEligible || onlyArEligible || onlyInBattle) &&
(onlyAllGyms ||
(onlyExEligible && newGym.ex_raid_eligible) ||
(onlyArEligible && newGym.ar_scan_eligible) ||
(onlyInBattle && newGym.in_battle)) &&
(finalTeams.includes(gym.team_id) ||
finalSlots[gym.team_id]?.includes(gym.available_slots))
) {
Expand All @@ -378,7 +381,7 @@ module.exports = class Gym extends Model {
if (
newGym.hasRaid ||
newGym.badge ||
actualBadge === 'none' ||
(actualBadge === 'none' && onlyGymBadges) ||
newGym.hasGym
) {
filteredResults.push(newGym)
Expand Down
5 changes: 3 additions & 2 deletions server/src/services/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,9 @@ Object.keys(config.scanner || {}).forEach((key) => {
})

if (
!config.authentication.strategies.length ||
!config.authentication.strategies.find((strategy) => strategy.enabled)
!config.authentication.alwaysEnabledPerms.length &&
(!config.authentication.strategies.length ||
!config.authentication.strategies.find((strategy) => strategy.enabled))
) {
const enabled = Object.keys(config.authentication.perms).filter(
(perm) => config.authentication.perms[perm].enabled,
Expand Down
2 changes: 1 addition & 1 deletion src/components/layout/dialogs/UserProfile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ const BadgeTile = ({ data, rowIndex, columnIndex, style }) => {
onClick={() => map.flyTo([item.lat, item.lon], 16)}
>
<img
src={item.url ? item.url.replace('http', 'https') : ''}
src={item.url ? item.url.replace('http://', 'https://') : ''}
alt={item.url}
style={{
width: 48,
Expand Down
2 changes: 1 addition & 1 deletion src/components/markers/gym.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export default function GymMarker(
width: 46,
height: 46,
backgroundImage: `url(${
gym.url ? gym.url.replace('http', 'https') : ''
gym.url ? gym.url.replace('http://', 'https://') : ''
})`,
backgroundSize: 'cover',
backgroundRepeat: 'no-repeat',
Expand Down
50 changes: 24 additions & 26 deletions src/components/popups/Pokemon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -503,14 +503,13 @@ const Footer = ({ pokemon, popups, setPopups, hasPvp, classes, Icons }) => {
const ExtraInfo = ({ pokemon, perms, userSettings, t, Icons }) => {
const { moves } = useStatic((state) => state.masterfile)

const { move_1, move_2, weight, height, first_seen_timestamp, updated, iv } =
pokemon
const { move_1, move_2, first_seen_timestamp, updated, iv } = pokemon

return (
<Grid container alignItems="center" justifyContent="center">
{perms.iv &&
iv !== null &&
[move_1, move_2].map((move, i) => {
[move_1, move_2].map((move) => {
if (!move) return null
return (
<Fragment key={move}>
Expand All @@ -524,50 +523,49 @@ const ExtraInfo = ({ pokemon, perms, userSettings, t, Icons }) => {
backgroundImage: `url(${Icons.getTypes(moves[move].type)})`,
}}
/>
<Grid item xs={6}>
<Grid item xs={4}>
<Typography variant="caption">{t(`move_${move}`)}</Typography>
</Grid>
<Grid item xs={3} style={{ textAlign: 'right' }}>
{/* <Grid item xs={3} style={{ textAlign: 'right' }}>
<Typography variant="caption">
{i
? `${weight ? weight.toFixed(2) : '? '}${t('kilogram')}`
: `${height ? height.toFixed(2) : '? '}${t('meter')}`}
</Typography>
</Grid>
</Grid> */}
</Fragment>
)
})}
<Divider
flexItem
style={{ width: '100%', height: 2, margin: '10px 0' }}
/>
{[first_seen_timestamp, updated].map((time, i) =>
time ? (
<Fragment key={`${time}-${i ? 'updated' : 'first'}`}>
<Grid
item
xs={t('popup_pokemon_description_width')}
style={{ textAlign: 'center' }}
>
<Typography variant="caption">
<Grid
container
item
xs={6}
key={`${time}-${i ? 'updated' : 'first'}`}
style={{ flexGrow: i ? 0 : 1, textAlign: 'center' }}
direction="column"
>
<Grid item>
<Typography variant="subtitle2">
{i ? t('last_seen') : t('first_seen')}:
</Typography>
</Grid>
<Grid
item
xs={t('popup_pokemon_seen_timer_width')}
style={{ textAlign: 'right' }}
>
<GenericTimer expireTime={time} />
</Grid>
<Grid
item
xs={t('popup_pokemon_data_width')}
style={{ textAlign: 'right' }}
>
<Grid item>
<Typography variant="caption">
{new Date(time * 1000).toLocaleTimeString(
localStorage.getItem('i18nextLng') || 'en',
)}
</Typography>
</Grid>
</Fragment>
<Grid item>
<GenericTimer expireTime={time} />
</Grid>
</Grid>
) : null,
)}
{process.env.NODE_ENV === 'development' && (
Expand Down