Skip to content
Closed
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
23,503 changes: 27 additions & 23,476 deletions package-lock.json

Large diffs are not rendered by default.

60 changes: 26 additions & 34 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,18 @@
"node": "^22.13.1"
},
"dependencies": {
"@solidjs/router": "^0.14.0",
"date-fns": "^2.9.0",
"dotenv": "^15.0.0",
"fast-sort": "^3.2.0",
"haversine": "^1.1.0",
"leaflet": "^1.9.2",
"popper.js": "^1.14.5",
"@solidjs/router": "^0.15.3",
"date-fns": "^2.30.0",
"dotenv": "^16.4.5",
"fast-sort": "^3.4.0",
"haversine": "^1.1.4",
"leaflet": "^1.9.4",
"snarkdown": "^2.0.0",
"solid-icons": "^1.0.4",
"solid-js": "^1.9.0",
"solid-styled-components": "^0.28.5",
"typescript": "^4.8.2",
"url-polyfill": "^1.0.11",
"vite": "^7.1.6",
"solid-icons": "^1.1.0",
"solid-js": "^1.9.9",
"solid-styled-components": "^0.29.4",
"vite-plugin-pwa": "^1.0.3",
"vite-plugin-solid": "^2.10.0",
"whatwg-fetch": "^3.0.0"
"vite-plugin-solid": "^2.11.10"
},
"scripts": {
"start": "vite",
Expand All @@ -41,25 +36,22 @@
},
"license": "MIT",
"devDependencies": {
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^12.1.2",
"@types/haversine": "^1.1.0",
"@types/leaflet": "^1.9.0",
"@types/semver": "^7.1.0",
"@typescript-eslint/eslint-plugin": "^5.30.6",
"@typescript-eslint/parser": "^5.30.6",
"babel-jest": "^28.1.3",
"eslint": "^8.27.0",
"eslint-plugin-solid": "^0.8.0",
"jest": "^28.1.3",
"jest-environment-jsdom": "^28.1.3",
"npm-run-all": "^4.1.2",
"prettier": "^1.16.1",
"ts-jest": "^28.0.7"
},
"resolutions": {
"ajv": "8.11.0",
"react": "17.0.2"
"@testing-library/jest-dom": "^6.4.0",
"@types/haversine": "^1.1.7",
"@types/leaflet": "^1.9.11",
"@types/semver": "^7.5.8",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"babel-jest": "^29.7.0",
"eslint": "^8.57.1",
"eslint-plugin-solid": "^0.13.1",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"npm-run-all": "^4.1.5",
"prettier": "^3.3.3",
"ts-jest": "^29.2.5",
"typescript": "^5.6.3",
"vite": "^5.4.8"
},
"jest": {
"moduleFileExtensions": [
Expand Down
2 changes: 1 addition & 1 deletion src/admin/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default function Editor(props: Props) {
</For>
</div>
<div>
<Button type="submit" color="primary">
<Button type="submit">
{props.mode === 'creating' ? 'Create' : 'Save'}
</Button>
{' '}
Expand Down
46 changes: 24 additions & 22 deletions src/admin/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,28 @@ export default function Admin() {
checkAuth();
});

const Login = () => (
<form
onSubmit={login}
style={{
position: 'absolute',
top: '50%',
left: '50%',
transform: 'translateY(-50%) translateX(-50%)'
}}
>
<Input
type="password"
label="Password"
autoComplete="current-password"
/>
&nbsp;
<Button type="submit">
Log in
</Button>
</form>
);

function Model() {
const params = useParams();
const model = () => models.find(m => m.key === params.model);
Expand All @@ -120,7 +142,7 @@ export default function Admin() {
{state.updatingRestaurants ? 'Updating...' : 'Update menus'}
</Button>
{' '}
<Button color="secondary" onClick={logout}>
<Button onClick={logout} secondary>
Log out
</Button>
</div>
Expand All @@ -140,27 +162,7 @@ export default function Admin() {
<Router>
<Route
path="/login"
element={
<form
onSubmit={login}
style={{
position: 'absolute',
top: '50%',
left: '50%',
transform: 'translateY(-50%) translateX(-50%)'
}}
>
<Input
type="password"
label="Password"
autoComplete="current-password"
/>
&nbsp;
<Button type="submit" color="primary">
Log in
</Button>
</form>
}
component={Login}
/>
<Route path="/model/:model" component={Model} />
</Router>
Expand Down
12 changes: 6 additions & 6 deletions src/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@ export default function App(props: any) {

createEffect(() => {
const isDev =
// @ts-ignore
// @ts-expect-error -- devtools globals are injected by browser extensions
!!window.__REACT_DEVTOOLS_GLOBAL_HOOK__ ||
// @ts-ignore
// @ts-expect-error -- devtools globals are injected by browser extensions
!!window.__REDUX_DEVTOOLS_EXTENSION__ ||
// @ts-ignore
// @ts-expect-error -- devtools globals are injected by browser extensions
!!window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ||
// @ts-ignore
// @ts-expect-error -- devtools globals are injected by browser extensions
!!window.__VUE_DEVTOOLS_GLOBAL_HOOK__ ||
// @ts-ignore
// @ts-expect-error -- devtools globals are injected by browser extensions
!!window.__SVELTE_DEVTOOLS_HOOK__ ||
// @ts-ignore
// @ts-expect-error -- devtools globals are injected by browser extensions
typeof window.ng !== 'undefined';

if (isDev) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/ReportModal/LocationEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default (props: FormProps) => {
label={computedState.translations().address}
disabled={props.isSending}
/>
<Button disabled={props.isSending} type="submit" color="primary">
<Button disabled={props.isSending} type="submit">
{computedState.translations().send}
</Button>
&nbsp;
Expand Down
Loading
Loading