Compare commits
No commits in common. "main" and "v1.0.2" have entirely different histories.
|
@ -1,9 +1,9 @@
|
|||
FROM --platform=$BUILDPLATFORM node:23.4-alpine AS install
|
||||
FROM --platform=$BUILDPLATFORM node:23-alpine AS install
|
||||
RUN mkdir -p /temp/prod
|
||||
COPY package*.json /temp/prod/
|
||||
RUN cd /temp/prod && npm install --frozen-lockfile
|
||||
COPY . /temp/prod/
|
||||
RUN cd /temp/prod && npm run build
|
||||
|
||||
FROM nginx:1.27.3-alpine3.20-slim AS release
|
||||
FROM nginx AS release
|
||||
COPY --from=install /temp/prod/dist /usr/share/nginx/html
|
||||
|
|
12
compose.yaml
12
compose.yaml
|
@ -1,7 +1,7 @@
|
|||
services:
|
||||
mongodb:
|
||||
image: mongo:bionic
|
||||
container_name: mongodb-fe
|
||||
container_name: mongodb
|
||||
ports:
|
||||
- "27017:27017"
|
||||
environment:
|
||||
|
@ -14,9 +14,9 @@ services:
|
|||
|
||||
bot-api:
|
||||
image: git.fai.st/fedi-image-bot/bot-api:latest
|
||||
container_name: bot-api-fe
|
||||
container_name: bot-api
|
||||
ports:
|
||||
- 8080:8080
|
||||
- "8080:8080"
|
||||
depends_on:
|
||||
- mongodb
|
||||
environment:
|
||||
|
@ -28,9 +28,9 @@ services:
|
|||
|
||||
fe-middleware:
|
||||
image: git.fai.st/fedi-image-bot/fe-middleware:latest
|
||||
container_name: fe-middleware-fe
|
||||
container_name: fe-middleware
|
||||
ports:
|
||||
- 8081:8081
|
||||
- "8081:8081"
|
||||
depends_on:
|
||||
- bot-api
|
||||
environment:
|
||||
|
@ -43,7 +43,7 @@ services:
|
|||
build: .
|
||||
container_name: bot-image-moderation-fe
|
||||
ports:
|
||||
- 80:80
|
||||
- "80:80"
|
||||
develop:
|
||||
watch:
|
||||
- action: rebuild
|
||||
|
|
|
@ -8,12 +8,14 @@
|
|||
"name": "bot-image-moderation-fe",
|
||||
"version": "0.0.0",
|
||||
"dependencies": {
|
||||
"react-dom": "^19.0.0",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"typescript": "^5.2.2",
|
||||
"vite": "^6.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react-dom": "^19.0.0",
|
||||
"@types/react": "^18.2.43",
|
||||
"@types/react-dom": "^18.2.17",
|
||||
"@vitejs/plugin-react-swc": "^3.5.0"
|
||||
}
|
||||
},
|
||||
|
@ -146,25 +148,26 @@
|
|||
"undici-types": "~5.26.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/prop-types": {
|
||||
"version": "15.7.13",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/react": {
|
||||
"version": "19.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-19.0.1.tgz",
|
||||
"integrity": "sha512-YW6614BDhqbpR5KtUYzTA+zlA7nayzJRA9ljz9CQoxthR0sDisYZLuvSMsil36t4EH/uAt8T52Xb4sVw17G+SQ==",
|
||||
"version": "18.3.12",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@types/prop-types": "*",
|
||||
"csstype": "^3.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/react-dom": {
|
||||
"version": "19.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.0.2.tgz",
|
||||
"integrity": "sha512-c1s+7TKFaDRRxr1TxccIX2u7sfCnc3RxkVyBIUA2lCpyqCF+QoAwQ/CBg7bsMdVwP120HEH143VQezKtef5nCg==",
|
||||
"version": "18.3.1",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"@types/react": "^19.0.0"
|
||||
"dependencies": {
|
||||
"@types/react": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@vitejs/plugin-react-swc": {
|
||||
|
@ -181,8 +184,7 @@
|
|||
"node_modules/csstype": {
|
||||
"version": "3.1.3",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/esbuild": {
|
||||
"version": "0.24.0",
|
||||
|
@ -221,6 +223,20 @@
|
|||
"@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": {
|
||||
"version": "3.3.8",
|
||||
"funding": [
|
||||
|
@ -268,25 +284,24 @@
|
|||
}
|
||||
},
|
||||
"node_modules/react": {
|
||||
"version": "19.0.0",
|
||||
"resolved": "https://registry.npmjs.org/react/-/react-19.0.0.tgz",
|
||||
"integrity": "sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==",
|
||||
"version": "18.3.1",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"loose-envify": "^1.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/react-dom": {
|
||||
"version": "19.0.0",
|
||||
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.0.0.tgz",
|
||||
"integrity": "sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ==",
|
||||
"version": "18.3.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"scheduler": "^0.25.0"
|
||||
"loose-envify": "^1.1.0",
|
||||
"scheduler": "^0.23.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^19.0.0"
|
||||
"react": "^18.3.1"
|
||||
}
|
||||
},
|
||||
"node_modules/rollup": {
|
||||
|
@ -325,10 +340,11 @@
|
|||
}
|
||||
},
|
||||
"node_modules/scheduler": {
|
||||
"version": "0.25.0",
|
||||
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.25.0.tgz",
|
||||
"integrity": "sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA==",
|
||||
"license": "MIT"
|
||||
"version": "0.23.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"loose-envify": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/source-map-js": {
|
||||
"version": "1.2.1",
|
||||
|
@ -355,9 +371,9 @@
|
|||
"peer": true
|
||||
},
|
||||
"node_modules/vite": {
|
||||
"version": "6.0.3",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-6.0.3.tgz",
|
||||
"integrity": "sha512-Cmuo5P0ENTN6HxLSo6IHsjCLn/81Vgrp81oaiFFMRa8gGDj5xEjIcEpf2ZymZtZR8oU0P2JX5WuUp/rlXcHkAw==",
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-6.0.2.tgz",
|
||||
"integrity": "sha512-XdQ+VsY2tJpBsKGs0wf3U/+azx8BBpYRHFAyKm5VeEZNOJZRB63q7Sc8Iup3k0TrN3KO6QgyzFf+opSbfY1y0g==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"esbuild": "^0.24.0",
|
||||
|
|
|
@ -8,12 +8,14 @@
|
|||
"build": "tsc && vite build"
|
||||
},
|
||||
"dependencies": {
|
||||
"react-dom": "^19.0.0",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"typescript": "^5.2.2",
|
||||
"vite": "^6.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react-dom": "^19.0.0",
|
||||
"@types/react": "^18.2.43",
|
||||
"@types/react-dom": "^18.2.17",
|
||||
"@vitejs/plugin-react-swc": "^3.5.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,14 +11,20 @@ function App() {
|
|||
|
||||
if (token) {
|
||||
return (
|
||||
<>
|
||||
<ImageModerator
|
||||
token={token}
|
||||
apiUrl={apiUrl}
|
||||
middlewareUrl={middlewareUrl}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
} else {
|
||||
return <Login setRemote={setRemote} />;
|
||||
return (
|
||||
<>
|
||||
<Login setRemote={setRemote} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,6 @@ export default function ImageModerator({
|
|||
const url = data.url;
|
||||
const tags = data.tags;
|
||||
setImageData({ url, tags });
|
||||
setImageAlt(url);
|
||||
})
|
||||
.catch((error) => {
|
||||
setImageAlt("Error");
|
||||
|
|
Loading…
Reference in New Issue