Compare commits

...

18 Commits
v1.0.2 ... main

Author SHA1 Message Date
Alie 6dab85e168 show image url as alt
Build image / build (push) Successful in 1m4s Details
2024-12-12 13:01:23 +01:00
Alie 5296f27ed0 remove uneeded tags 2024-12-12 12:58:48 +01:00
Alie cb81c4f20b update dockerfile 2024-12-12 12:58:48 +01:00
bizcochito c795ca0d14 Merge pull request 'chore(deps): update dependency @types/react-dom to v19.0.2' (#27) from renovate/react-dom-19.x-lockfile into main
Build image / build (push) Successful in 2m53s Details
Reviewed-on: #27
2024-12-10 09:28:50 +00:00
Renovate Bot 7e952c1ef8 chore(deps): update dependency @types/react-dom to v19.0.2 2024-12-09 20:03:08 +00:00
Alie 7ebb596e83 uodate nginx 2024-12-09 10:36:19 +01:00
Renovate Bot cdd3d58b09 chore(deps): update dependency react-dom to v19 2024-12-09 10:36:19 +01:00
Alie e69435efab delete react since react-dom has react as dependency 2024-12-09 10:23:30 +01:00
Alie afb37d98b4 cambios docker compose 2024-12-09 09:49:13 +01:00
Alie 131d99a4f3 delete react since react-dom has react as dependency 2024-12-09 09:47:07 +01:00
bizcochito e798837998 Merge pull request 'chore(deps): update dependency @types/react-dom to v18.3.2' (#23) from renovate/react-dom-18.x-lockfile into main
Reviewed-on: #23
2024-12-06 10:08:00 +00:00
bizcochito 8a32a4967b Merge pull request 'chore(deps): update dependency @types/react to v18.3.14' (#22) from renovate/react-18.x-lockfile into main
Reviewed-on: #22
2024-12-06 10:07:35 +00:00
Renovate Bot d63adfb17d chore(deps): update dependency @types/react-dom to v18.3.2 2024-12-05 20:01:52 +00:00
Renovate Bot 8f3d7ded67 chore(deps): update dependency @types/react to v18.3.14 2024-12-05 20:01:40 +00:00
bizcochito 85d4cf1b93 Merge pull request 'chore(deps): update dependency @types/react to v18.3.13' (#20) from renovate/react-18.x-lockfile into main
Reviewed-on: #20
2024-12-05 17:58:40 +00:00
bizcochito bff65c4f7d Merge pull request 'chore(deps): update dependency vite to v6.0.3' (#21) from renovate/vite-6.x-lockfile into main
Reviewed-on: #21
2024-12-05 17:55:59 +00:00
Renovate Bot aa41495512 chore(deps): update dependency vite to v6.0.3 2024-12-05 16:01:29 +00:00
Renovate Bot 35f3d56e95 chore(deps): update dependency @types/react to v18.3.13 2024-12-04 17:01:38 +00:00
6 changed files with 46 additions and 69 deletions

View File

@ -1,9 +1,9 @@
FROM --platform=$BUILDPLATFORM node:23-alpine AS install FROM --platform=$BUILDPLATFORM node:23.4-alpine AS install
RUN mkdir -p /temp/prod RUN mkdir -p /temp/prod
COPY package*.json /temp/prod/ COPY package*.json /temp/prod/
RUN cd /temp/prod && npm install --frozen-lockfile RUN cd /temp/prod && npm install --frozen-lockfile
COPY . /temp/prod/ COPY . /temp/prod/
RUN cd /temp/prod && npm run build RUN cd /temp/prod && npm run build
FROM nginx AS release FROM nginx:1.27.3-alpine3.20-slim AS release
COPY --from=install /temp/prod/dist /usr/share/nginx/html COPY --from=install /temp/prod/dist /usr/share/nginx/html

View File

@ -1,7 +1,7 @@
services: services:
mongodb: mongodb:
image: mongo:bionic image: mongo:bionic
container_name: mongodb container_name: mongodb-fe
ports: ports:
- "27017:27017" - "27017:27017"
environment: environment:
@ -14,9 +14,9 @@ services:
bot-api: bot-api:
image: git.fai.st/fedi-image-bot/bot-api:latest image: git.fai.st/fedi-image-bot/bot-api:latest
container_name: bot-api container_name: bot-api-fe
ports: ports:
- "8080:8080" - 8080:8080
depends_on: depends_on:
- mongodb - mongodb
environment: environment:
@ -28,9 +28,9 @@ services:
fe-middleware: fe-middleware:
image: git.fai.st/fedi-image-bot/fe-middleware:latest image: git.fai.st/fedi-image-bot/fe-middleware:latest
container_name: fe-middleware container_name: fe-middleware-fe
ports: ports:
- "8081:8081" - 8081:8081
depends_on: depends_on:
- bot-api - bot-api
environment: environment:
@ -43,7 +43,7 @@ services:
build: . build: .
container_name: bot-image-moderation-fe container_name: bot-image-moderation-fe
ports: ports:
- "80:80" - 80:80
develop: develop:
watch: watch:
- action: rebuild - action: rebuild

74
package-lock.json generated
View File

@ -8,14 +8,12 @@
"name": "bot-image-moderation-fe", "name": "bot-image-moderation-fe",
"version": "0.0.0", "version": "0.0.0",
"dependencies": { "dependencies": {
"react": "^18.2.0", "react-dom": "^19.0.0",
"react-dom": "^18.2.0",
"typescript": "^5.2.2", "typescript": "^5.2.2",
"vite": "^6.0.0" "vite": "^6.0.0"
}, },
"devDependencies": { "devDependencies": {
"@types/react": "^18.2.43", "@types/react-dom": "^19.0.0",
"@types/react-dom": "^18.2.17",
"@vitejs/plugin-react-swc": "^3.5.0" "@vitejs/plugin-react-swc": "^3.5.0"
} }
}, },
@ -148,26 +146,25 @@
"undici-types": "~5.26.4" "undici-types": "~5.26.4"
} }
}, },
"node_modules/@types/prop-types": {
"version": "15.7.13",
"dev": true,
"license": "MIT"
},
"node_modules/@types/react": { "node_modules/@types/react": {
"version": "18.3.12", "version": "19.0.1",
"resolved": "https://registry.npmjs.org/@types/react/-/react-19.0.1.tgz",
"integrity": "sha512-YW6614BDhqbpR5KtUYzTA+zlA7nayzJRA9ljz9CQoxthR0sDisYZLuvSMsil36t4EH/uAt8T52Xb4sVw17G+SQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"@types/prop-types": "*",
"csstype": "^3.0.2" "csstype": "^3.0.2"
} }
}, },
"node_modules/@types/react-dom": { "node_modules/@types/react-dom": {
"version": "18.3.1", "version": "19.0.2",
"resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.0.2.tgz",
"integrity": "sha512-c1s+7TKFaDRRxr1TxccIX2u7sfCnc3RxkVyBIUA2lCpyqCF+QoAwQ/CBg7bsMdVwP120HEH143VQezKtef5nCg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "peerDependencies": {
"@types/react": "*" "@types/react": "^19.0.0"
} }
}, },
"node_modules/@vitejs/plugin-react-swc": { "node_modules/@vitejs/plugin-react-swc": {
@ -184,7 +181,8 @@
"node_modules/csstype": { "node_modules/csstype": {
"version": "3.1.3", "version": "3.1.3",
"dev": true, "dev": true,
"license": "MIT" "license": "MIT",
"peer": true
}, },
"node_modules/esbuild": { "node_modules/esbuild": {
"version": "0.24.0", "version": "0.24.0",
@ -223,20 +221,6 @@
"@esbuild/win32-x64": "0.24.0" "@esbuild/win32-x64": "0.24.0"
} }
}, },
"node_modules/js-tokens": {
"version": "4.0.0",
"license": "MIT"
},
"node_modules/loose-envify": {
"version": "1.4.0",
"license": "MIT",
"dependencies": {
"js-tokens": "^3.0.0 || ^4.0.0"
},
"bin": {
"loose-envify": "cli.js"
}
},
"node_modules/nanoid": { "node_modules/nanoid": {
"version": "3.3.8", "version": "3.3.8",
"funding": [ "funding": [
@ -284,24 +268,25 @@
} }
}, },
"node_modules/react": { "node_modules/react": {
"version": "18.3.1", "version": "19.0.0",
"resolved": "https://registry.npmjs.org/react/-/react-19.0.0.tgz",
"integrity": "sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==",
"license": "MIT", "license": "MIT",
"dependencies": { "peer": true,
"loose-envify": "^1.1.0"
},
"engines": { "engines": {
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/react-dom": { "node_modules/react-dom": {
"version": "18.3.1", "version": "19.0.0",
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.0.0.tgz",
"integrity": "sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"loose-envify": "^1.1.0", "scheduler": "^0.25.0"
"scheduler": "^0.23.2"
}, },
"peerDependencies": { "peerDependencies": {
"react": "^18.3.1" "react": "^19.0.0"
} }
}, },
"node_modules/rollup": { "node_modules/rollup": {
@ -340,11 +325,10 @@
} }
}, },
"node_modules/scheduler": { "node_modules/scheduler": {
"version": "0.23.2", "version": "0.25.0",
"license": "MIT", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.25.0.tgz",
"dependencies": { "integrity": "sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA==",
"loose-envify": "^1.1.0" "license": "MIT"
}
}, },
"node_modules/source-map-js": { "node_modules/source-map-js": {
"version": "1.2.1", "version": "1.2.1",
@ -371,9 +355,9 @@
"peer": true "peer": true
}, },
"node_modules/vite": { "node_modules/vite": {
"version": "6.0.2", "version": "6.0.3",
"resolved": "https://registry.npmjs.org/vite/-/vite-6.0.2.tgz", "resolved": "https://registry.npmjs.org/vite/-/vite-6.0.3.tgz",
"integrity": "sha512-XdQ+VsY2tJpBsKGs0wf3U/+azx8BBpYRHFAyKm5VeEZNOJZRB63q7Sc8Iup3k0TrN3KO6QgyzFf+opSbfY1y0g==", "integrity": "sha512-Cmuo5P0ENTN6HxLSo6IHsjCLn/81Vgrp81oaiFFMRa8gGDj5xEjIcEpf2ZymZtZR8oU0P2JX5WuUp/rlXcHkAw==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"esbuild": "^0.24.0", "esbuild": "^0.24.0",

View File

@ -8,14 +8,12 @@
"build": "tsc && vite build" "build": "tsc && vite build"
}, },
"dependencies": { "dependencies": {
"react": "^18.2.0", "react-dom": "^19.0.0",
"react-dom": "^18.2.0",
"typescript": "^5.2.2", "typescript": "^5.2.2",
"vite": "^6.0.0" "vite": "^6.0.0"
}, },
"devDependencies": { "devDependencies": {
"@types/react": "^18.2.43", "@types/react-dom": "^19.0.0",
"@types/react-dom": "^18.2.17",
"@vitejs/plugin-react-swc": "^3.5.0" "@vitejs/plugin-react-swc": "^3.5.0"
} }
} }

View File

@ -11,20 +11,14 @@ function App() {
if (token) { if (token) {
return ( return (
<>
<ImageModerator <ImageModerator
token={token} token={token}
apiUrl={apiUrl} apiUrl={apiUrl}
middlewareUrl={middlewareUrl} middlewareUrl={middlewareUrl}
/> />
</>
); );
} else { } else {
return ( return <Login setRemote={setRemote} />;
<>
<Login setRemote={setRemote} />
</>
);
} }
} }

View File

@ -65,6 +65,7 @@ export default function ImageModerator({
const url = data.url; const url = data.url;
const tags = data.tags; const tags = data.tags;
setImageData({ url, tags }); setImageData({ url, tags });
setImageAlt(url);
}) })
.catch((error) => { .catch((error) => {
setImageAlt("Error"); setImageAlt("Error");