Skip to content
Open
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
107 changes: 107 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,110 @@
# [1.30.0-develop.1](https://github.com/mkllrtxn/ReactMap/compare/v1.29.6...v1.30.0-develop.1) (2024-05-04)


### Bug Fixes

* `onlyShowAvailable` for nests selector ([068dac2](https://github.com/mkllrtxn/ReactMap/commit/068dac25f7ffbb0594619202b85fa64801c835c8))
* 0iv/100iv overrides in a specific scenario ([aebebf1](https://github.com/mkllrtxn/ReactMap/commit/aebebf10f86a0562fd4eb098fbe0cf364453dc4b))
* 0s in gym popup ([2d9bdc1](https://github.com/mkllrtxn/ReactMap/commit/2d9bdc1665715d7d3dfa6bd3b6f05b9471b12abe))
* actions ([079de55](https://github.com/mkllrtxn/ReactMap/commit/079de5592667c92edd2d1e518e49ad7054eabe81))
* add log to indicate config env var ([ba25048](https://github.com/mkllrtxn/ReactMap/commit/ba2504890e755aa5a805710be6602e16ec17a051))
* add missing `key` prop & simplify ([05be65c](https://github.com/mkllrtxn/ReactMap/commit/05be65c93537c061c91db870f9f39a59da2684d1))
* add new dist folders to lint ignores ([9a870cd](https://github.com/mkllrtxn/ReactMap/commit/9a870cd0a8f2ec9669163488cab0d2f77aa163e9))
* added migration for gym badges, fixed gold badge count not appearing on profile ([e9f9474](https://github.com/mkllrtxn/ReactMap/commit/e9f947436d62e68b46ade0948441d2507dbf01d5))
* adjust wayfarer line weights ([e6c0696](https://github.com/mkllrtxn/ReactMap/commit/e6c0696159c1feceda41aea12b9e16b2a5cd7838))
* ai generated locales ([2d0e7fb](https://github.com/mkllrtxn/ReactMap/commit/2d0e7fb2ab9b33b020a016ce9654338975c18dd7))
* alert state ([a39154d](https://github.com/mkllrtxn/ReactMap/commit/a39154d5014d66a5c1a91e6e36e888e5e0c8440c))
* area selected translation ([bbe49e1](https://github.com/mkllrtxn/ReactMap/commit/bbe49e1dc45b93ba52d96c7cf8f70a1b088a27c1))
* asset options ([e56b0dd](https://github.com/mkllrtxn/ReactMap/commit/e56b0dd81e06af23226db73f86481c41cd804bf7))
* asset updating ([a8f1e9c](https://github.com/mkllrtxn/ReactMap/commit/a8f1e9c1ca0ea9df7da4e12a0c48e080a97556c4))
* attempt to keep available/masterfile more in sync ([1961af3](https://github.com/mkllrtxn/ReactMap/commit/1961af3e3f1953c19f330bec3d191a3b6ef5dca3))
* better selector tiles for colorblind users ([0256b5b](https://github.com/mkllrtxn/ReactMap/commit/0256b5b9b0db60ef9ab1b9e1b922db2030f2575d))
* cache most things at process exit instead ([56eb47e](https://github.com/mkllrtxn/ReactMap/commit/56eb47eca6e05f78e4b0b518b6d7fb6a5c901bc2))
* check for multidomains in areas ([e5b8a9c](https://github.com/mkllrtxn/ReactMap/commit/e5b8a9ccaf2bf00af5784107768dffc68fa2673e))
* check for networkError null ([e8bcb79](https://github.com/mkllrtxn/ReactMap/commit/e8bcb797ac4122ed281981d3aee97009dbcfd5b2))
* ci ([6b4fa8a](https://github.com/mkllrtxn/ReactMap/commit/6b4fa8a5316454d2da32c1999271835f83822a99))
* ci ([c657ddd](https://github.com/mkllrtxn/ReactMap/commit/c657ddd83079286c42f24e0a2f5e0847e7e822bd))
* clipped classname ([2563fb7](https://github.com/mkllrtxn/ReactMap/commit/2563fb70e5ef6500e5929325279ad390138f33c0))
* config getters ([494639a](https://github.com/mkllrtxn/ReactMap/commit/494639a28289fac90e0898cf2d443ba7a2c5c41d))
* couple of queries ([460f66e](https://github.com/mkllrtxn/ReactMap/commit/460f66e0cc6c76d854bf47bce948d91be841b960))
* css className that got clipped ([1abe5e3](https://github.com/mkllrtxn/ReactMap/commit/1abe5e3cce0b111a4a616e530e2ed768f0efb656))
* custom favicons for each domain ([f470f53](https://github.com/mkllrtxn/ReactMap/commit/f470f53fe3995e72391012a54c02ff5661660f5c))
* dont log golbat 404 pokemon id errors ([7292d13](https://github.com/mkllrtxn/ReactMap/commit/7292d13f9b7460a7b40d1b3bcb45c751d183b953))
* early version check ([c9d1295](https://github.com/mkllrtxn/ReactMap/commit/c9d129597d00fbcc19b4f164f4ea1ca468f09fed))
* express session augmentation ([35533e9](https://github.com/mkllrtxn/ReactMap/commit/35533e9b86518d496e71ff6a3fb93f54ad51864c))
* fallback obj ([b6470f4](https://github.com/mkllrtxn/ReactMap/commit/b6470f43ca5118c11951fec24e7dc735aca4c463))
* favicon error catching for dummies ([b6c0fae](https://github.com/mkllrtxn/ReactMap/commit/b6c0fae43ef8e4312bc61c265c8c16cd4a0c1ee5))
* favicon instructions ([1851505](https://github.com/mkllrtxn/ReactMap/commit/185150552e47980f91a5a257906ccb9b478a4dce))
* feedback from naji ([72344a0](https://github.com/mkllrtxn/ReactMap/commit/72344a024fff3387fc22c5de9b2780d8264afd93))
* file caching for multi ([2acf34a](https://github.com/mkllrtxn/ReactMap/commit/2acf34a2f014d8b362184554061b709c2bf6abba))
* fixed new badge type in profile, refactored ternary in a positive way ([8bd1f90](https://github.com/mkllrtxn/ReactMap/commit/8bd1f905347933e68dd00d8708067cb7ea29dfe8))
* gym badge counts ([67f3b0d](https://github.com/mkllrtxn/ReactMap/commit/67f3b0de9837924b0e6e37645a199f2b0b54e795))
* hopefully final fix for leaflet.locatecontrol ([e08e3f2](https://github.com/mkllrtxn/ReactMap/commit/e08e3f2cd3c6f219d8b2d6c4c448f6a86f333a1e))
* importing ([89b7fce](https://github.com/mkllrtxn/ReactMap/commit/89b7fcebca0a58959ecc29418db4a75390072ffd))
* improved jsdocs for search method ([5dcf288](https://github.com/mkllrtxn/ReactMap/commit/5dcf28810be5ad1063abee7ae234993a3c42be57))
* less strict searching for `'` ([ca08a69](https://github.com/mkllrtxn/ReactMap/commit/ca08a690fca54f90132b4688b5700532958b60f5))
* **lint:** prettier lint ([5f87694](https://github.com/mkllrtxn/ReactMap/commit/5f8769481d723d2a7e6040b63c08ba8c96ce99cb))
* local assets ([615c3b8](https://github.com/mkllrtxn/ReactMap/commit/615c3b81244925c1860ea7c48b00f8ee38c697d1))
* locate translations / unit of measurement ([704423b](https://github.com/mkllrtxn/ReactMap/commit/704423b46cff627d902c2d2b905497f9bc941469))
* logging uncaughtException error ([6848cdc](https://github.com/mkllrtxn/ReactMap/commit/6848cdce4d858b2a0e39b33e7998751416c8c3d0))
* map dependency checks ([85c992d](https://github.com/mkllrtxn/ReactMap/commit/85c992dc499f0c25dff2ba00ec75e4bb20911bab))
* maybe fix missing ci secret ([15058dc](https://github.com/mkllrtxn/ReactMap/commit/15058dc77045fd1db99b543f2c42da724ff54aa7))
* Merge pull request [#963](https://github.com/mkllrtxn/ReactMap/issues/963) from ReuschelCGN/translation ([cbc0160](https://github.com/mkllrtxn/ReactMap/commit/cbc0160f6820a68fed04c9b7b57a287cfaf66f58))
* misc icons ([f4423a9](https://github.com/mkllrtxn/ReactMap/commit/f4423a9e05f47bf1f59baf0d0d6f753f787ba2b4))
* mobile friendly :| ([b259e42](https://github.com/mkllrtxn/ReactMap/commit/b259e4274cab22bfee450ef950b3c54616dca1e7))
* more client ts checks ([5028cb2](https://github.com/mkllrtxn/ReactMap/commit/5028cb2221ac44e65620927bd69a10f4958f6d9c))
* more consistent gender filtering ([a3b24cb](https://github.com/mkllrtxn/ReactMap/commit/a3b24cb6d4625c23d8d341c4b7cad62846b184c3))
* nest name memoization ([ec56d7d](https://github.com/mkllrtxn/ReactMap/commit/ec56d7d79e0a5d53599307e2e3768b8dddce7852))
* **nest:** make it compatible with previous tools ([9d97481](https://github.com/mkllrtxn/ReactMap/commit/9d97481039356de2c1e6165abbb207a7d7af6cce))
* **nest:** query only active nests ([ebb5295](https://github.com/mkllrtxn/ReactMap/commit/ebb529578207e1d6a11f40a99e942030ec95c3e0))
* no floats ([b8f645e](https://github.com/mkllrtxn/ReactMap/commit/b8f645e8847f301be60ebffcc235f047669b48ed))
* normal form check ([47e358b](https://github.com/mkllrtxn/ReactMap/commit/47e358b5cc01d75eb49cfa3b4654adf09b23af28))
* oops, swap ternary ([bdcfaf4](https://github.com/mkllrtxn/ReactMap/commit/bdcfaf4d92fc64d1776e6f87e11713736621874d))
* pass ref props for tooltip ([9d55d4c](https://github.com/mkllrtxn/ReactMap/commit/9d55d4c445c106626149319df1db8dd3017e99b6))
* pokemon ui inconsistency ([0cb334c](https://github.com/mkllrtxn/ReactMap/commit/0cb334c44748dbbe2a591cc5b61c466b7487f3bf))
* pvp filter in when `all` is set ([2acf75f](https://github.com/mkllrtxn/ReactMap/commit/2acf75fb107f2b06f31a9e195b1d3ae158c8368a))
* react leaflet locate control fixes ([d01beb0](https://github.com/mkllrtxn/ReactMap/commit/d01beb0ab4c1e096fb613f398bc7766970b88258))
* reading other config files ([ef30f33](https://github.com/mkllrtxn/ReactMap/commit/ef30f33c18146b2f14584e3639162cce16cc78a0))
* refine ci ([515de64](https://github.com/mkllrtxn/ReactMap/commit/515de64e6a7275b6b7afbdb287e18be15f373e4d))
* remove log ([86c5854](https://github.com/mkllrtxn/ReactMap/commit/86c585472061d9a27d380a335787165c7580f3ea))
* remove useeffect dep ([00d9bfc](https://github.com/mkllrtxn/ReactMap/commit/00d9bfc6d662b5bdb825c4af9954ee79ddb19ce6))
* respect quest layer when searching ([4b0e0cc](https://github.com/mkllrtxn/ReactMap/commit/4b0e0cc273b0e3c4988d4d3f0ded13053e3c75b6)), closes [#950](https://github.com/mkllrtxn/ReactMap/issues/950)
* rounding & icon for missing ai ([4ed05ff](https://github.com/mkllrtxn/ReactMap/commit/4ed05ff5d53435880d7388eaa11faac69a0ab77f))
* safe 0 fallback ([45795a8](https://github.com/mkllrtxn/ReactMap/commit/45795a80d114f7b638ff6a7a0d0438811dd86511))
* scan areas ([8dbc1f3](https://github.com/mkllrtxn/ReactMap/commit/8dbc1f374bfae204db79d30b9f8989aa86e15d9c))
* scan cells ([b6b45ca](https://github.com/mkllrtxn/ReactMap/commit/b6b45ca1057ebaad06ef794d20fdc486a4ceda0f))
* semi fix for the leaflet.locatecontrol issue ([4cb5882](https://github.com/mkllrtxn/ReactMap/commit/4cb5882a79bfd7e55a79848d03f5d3a6ef6a55c4))
* server side routes ([77eafa9](https://github.com/mkllrtxn/ReactMap/commit/77eafa91c492e6a25ce63918ad46226899b96d6c))
* simplify ([b48bcb3](https://github.com/mkllrtxn/ReactMap/commit/b48bcb31d329b8027fdbfef397fb89ef56c34a5a))
* some clipped imports ([ed65bc0](https://github.com/mkllrtxn/ReactMap/commit/ed65bc059e63c93afa31cf4d84edc9782230c4d8))
* some incorrect feature imports ([a36ea7c](https://github.com/mkllrtxn/ReactMap/commit/a36ea7ccb79684738d43ab7995cb171c03726d18))
* still define obj though ([e98bb92](https://github.com/mkllrtxn/ReactMap/commit/e98bb9280e1f9be998aa59d8003c6949a9bee408))
* swapped ivOr stores ([98fe335](https://github.com/mkllrtxn/ReactMap/commit/98fe3358815b7316ccdd98343390217886b7dd26))
* throw error at a different point ([825b2d9](https://github.com/mkllrtxn/ReactMap/commit/825b2d90494fa354366fdcb8a2b5f683a1d7f4bb))
* throw error if missing openai key ([de939e2](https://github.com/mkllrtxn/ReactMap/commit/de939e2de5e910ea51fad425ce336c9e2ec926f6))
* try/catch on expert filter just in case ([4e430e6](https://github.com/mkllrtxn/ReactMap/commit/4e430e6e1e1729ef56095b7a414f9521c6d27d75))
* tutorial crash issue ([4fcc100](https://github.com/mkllrtxn/ReactMap/commit/4fcc100cb6532aa55536bb41b87c60efd8fa8f46))
* types ([4b78846](https://github.com/mkllrtxn/ReactMap/commit/4b78846a7b8636031e015902007f9e5f2212821b))
* unnecessary call ([3c983d3](https://github.com/mkllrtxn/ReactMap/commit/3c983d370e292e6cfd3b7b79f7acdeb76a39a4ed))
* updating translations based on feedback from Fabio1988 and lenisko ([7d9ec75](https://github.com/mkllrtxn/ReactMap/commit/7d9ec75886b0fa0365b37d86c4377011ec39cd6c))
* user options state ([1e23a55](https://github.com/mkllrtxn/ReactMap/commit/1e23a5571c7ef945f7204092628591541ae835f9))
* various small things ([ada7947](https://github.com/mkllrtxn/ReactMap/commit/ada7947313300864da5a524c0233bb8c31d5c1bc))
* various text fixes ([6eb9c6a](https://github.com/mkllrtxn/ReactMap/commit/6eb9c6aed1d0ba557220799560ec498fc6f7e6dc)), closes [#967](https://github.com/mkllrtxn/ReactMap/issues/967)
* webhook gym searching ([dc8ff8b](https://github.com/mkllrtxn/ReactMap/commit/dc8ff8bc489bfd55fbd207d71c381ce01a25eb05))


### Features

* add icon overrides in config for troubleshooting/trolling ([d34b69a](https://github.com/mkllrtxn/ReactMap/commit/d34b69a444aae78cc7c8818a5c0a6ad3254a90af))
* added "basic" level gym badge ([4c4d3a4](https://github.com/mkllrtxn/ReactMap/commit/4c4d3a4ee131a65c5c55f1c42f3972245de54f0f))
* data management page ([561c031](https://github.com/mkllrtxn/ReactMap/commit/561c031e0f290d7c63e17b6a645e8b145cf2e4d1))
* locales editing page ([bfbd15a](https://github.com/mkllrtxn/ReactMap/commit/bfbd15a55605505da7753a664f8257b243f28d18))
* lots of docs & examples ([1a33c5e](https://github.com/mkllrtxn/ReactMap/commit/1a33c5ece9605e4a9c6fc0a10ae0fc2e554962f7))
* new approach to multi domain ([aa5602b](https://github.com/mkllrtxn/ReactMap/commit/aa5602b36bd78f88c75e9f2b0f367ff8da4b997d))
* pkmn filter diagram ([a40b201](https://github.com/mkllrtxn/ReactMap/commit/a40b20123a78f3d565a47ed9266c16da3b979bdb))
* spacial rend range ([374c5eb](https://github.com/mkllrtxn/ReactMap/commit/374c5eb09986307fb5e2e59930e18a066b22df47))
* update polish locales ([#959](https://github.com/mkllrtxn/ReactMap/issues/959)) ([d28dc0a](https://github.com/mkllrtxn/ReactMap/commit/d28dc0af8445002f0f9b52e87f6eb08966182d24))

# [1.33.0-develop.3](https://github.com/WatWowMap/ReactMap/compare/v1.33.0-develop.2...v1.33.0-develop.3) (2024-04-27)


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "reactmap",
"version": "1.33.0-develop.3",
"version": "1.30.0-develop.1",
"private": true,
"description": "React based frontend map.",
"license": "MIT",
Expand Down
3 changes: 2 additions & 1 deletion packages/locales/lib/human/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -781,5 +781,6 @@
"locale_instructions_7": "Create a pull request",
"locale_instructions_8": "Wait for the pull request to be reviewed and merged",
"enter_translation": "Enter Translation",
"individual_filters": "Partially Filtered"
"individual_filters": "Partially Filtered",
"copy_id": "Copy ID"
}
3 changes: 2 additions & 1 deletion packages/locales/lib/human/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -615,5 +615,6 @@
"show_editor": "Mostrar Editor",
"hide_editor": "Ocultar Editor",
"reported_error": "Este error ha sido reportado al servidor con el identificador",
"dark_mode": "Modo Oscuro"
"dark_mode": "Modo Oscuro",
"copy_id": "Copiar ID"
}
10 changes: 10 additions & 0 deletions src/features/gym/GymPopup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ const DropdownOptions = ({
raid_level,
}) => {
const { t } = useTranslation()
const admin = useMemory((s) => s.auth.perms.admin)

const { gyms, raids, gymBadges, webhooks } = useMemory((s) => s.auth.perms)
const gymValidDataLimit = useMemory((s) => s.gymValidDataLimit)
Expand Down Expand Up @@ -208,6 +209,11 @@ const DropdownOptions = ({
})
}

const copyId = () => {
handleClose()
navigator.clipboard.writeText(id)
}

const options = [{ name: 'hide', action: handleHide }]

if (gyms) {
Expand Down Expand Up @@ -251,6 +257,10 @@ const DropdownOptions = ({
})
}

if (admin) {
options.push({ name: 'copy_id', action: copyId })
}

return options.filter(Boolean).map((option) => (
<MenuItem key={option.key || option.name} onClick={option.action} dense>
{typeof option.name === 'string' ? t(option.name) : option.name}
Expand Down
15 changes: 13 additions & 2 deletions src/features/nest/NestPopup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ export function NestPopup({
submitted_by = '',
}) {
const { t } = useTranslation()
const { perms } = useMemory((s) => s.auth)

const admin = useMemory((s) => s.auth.perms.admin)
const nestSubmissions = useMemory((s) => s.auth.perms.nestSubmissions)

const [parkName, setParkName] = React.useState(true)
const [anchorEl, setAnchorEl] = React.useState(null)
Expand All @@ -76,13 +78,22 @@ export function NestPopup({
setDeepStore(`filters.nests.filter.${key}.enabled`, false)
}

const copyId = () => {
setAnchorEl(null)
navigator.clipboard.writeText(id)
}

useAnalytics('Popup', `Name: ${name} Pokemon: ${pokemon_id}`, 'Nest')

const options = [
{ name: 'hide', action: handleHide },
{ name: 'exclude', action: handleExclude },
]

if (admin) {
options.push({ name: 'copy_id', action: copyId })
}

return (
<ErrorBoundary noRefresh variant="h5">
<Grid
Expand Down Expand Up @@ -179,7 +190,7 @@ export function NestPopup({
</Typography>
)}
</Grid>
{perms.nestSubmissions && (
{nestSubmissions && (
<Grid xs={12} textAlign="center">
<Button
color="secondary"
Expand Down
11 changes: 11 additions & 0 deletions src/features/pokestop/PokestopPopup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ const MenuActions = ({
invasions,
}) => {
const { t } = useTranslation()
const admin = useMemory((s) => s.auth.perms.admin)
const masterfile = useMemory((s) => s.masterfile)
const filters = useStorage((s) => s.filters)

Expand Down Expand Up @@ -354,6 +355,11 @@ const MenuActions = ({
})
}

const copyId = () => {
setAnchorEl(null)
navigator.clipboard.writeText(id)
}

const options = [{ name: 'hide', action: handleHide }]

if (hasQuest) {
Expand Down Expand Up @@ -459,6 +465,11 @@ const MenuActions = ({
}
options.push({ name: 'timer', action: handleTimer })
}

if (admin) {
options.push({ name: 'copy_id', action: copyId })
}

return (
<Grid xs={2} textAlign="right">
<IconButton aria-haspopup="true" onClick={handleClick} size="large">
Expand Down
41 changes: 40 additions & 1 deletion src/features/spawnpoint/SpawnpointPopup.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
// @ts-check
import * as React from 'react'
import Typography from '@mui/material/Typography'
import Menu from '@mui/material/Menu'
import MenuItem from '@mui/material/MenuItem'
import { useTranslation } from 'react-i18next'

import { useMemory } from '@store/useMemory'
import { ErrorBoundary } from '@components/ErrorBoundary'
import { dayCheck } from '@utils/dayCheck'

Expand All @@ -11,14 +14,50 @@ import { dayCheck } from '@utils/dayCheck'
* @param {import('@rm/types').Spawnpoint} props
* @returns
*/
export function SpawnpointPopup({ despawn_sec, lat, lon, updated }) {
export function SpawnpointPopup({ id, despawn_sec, lat, lon, updated }) {
const { t } = useTranslation()
const { perms } = useMemory((s) => s.auth)

const [anchorEl, setAnchorEl] = React.useState(null)

const minute = despawn_sec > 60 ? Math.round(despawn_sec / 60) : despawn_sec
const minuteFixed = minute < 10 ? `0${minute}` : minute

const handleClose = () => {
setAnchorEl(null)
}

const copyId = () => {
setAnchorEl(null)
navigator.clipboard.writeText(id)
}

const options = []

if (perms.admin) {
options.push({ name: 'Copy ID', action: copyId })
}

return (
<ErrorBoundary noRefresh style={{}} variant="h5">
<Menu
anchorEl={anchorEl}
keepMounted
open={!!anchorEl}
onClose={handleClose}
PaperProps={{
style: {
maxHeight: 216,
minWidth: '20ch',
},
}}
>
{options.map((option) => (
<MenuItem key={option.key || option.name} onClick={option.action}>
{typeof option.name === 'string' ? t(option.name) : option.name}
</MenuItem>
))}
</Menu>
<Typography variant="h5" align="center">
{t('spawnpoint')}
</Typography>
Expand Down