diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..59ba35f --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,7 @@ +services: + client: + build: . + image: 10.2.101.91:5000/mp_update_client:latest + platform: linux/amd64 + ports: + - "3000:3000" \ No newline at end of file diff --git a/next.config.mjs b/next.config.mjs index d5a22f1..1160208 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,6 +1,7 @@ /** @type {import('next').NextConfig} */ const nextConfig = { - reactStrictMode: false + reactStrictMode: false, + output: "standalone" }; export default nextConfig; diff --git a/package.json b/package.json index 7413a2c..eb603ed 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "axios": "^1.7.9", "graphql": "^16.9.0", "js-cookie": "^3.0.5", + "lodash": "^4.17.21", "next": "14.2.5", "react": "^18", "react-dom": "^18" diff --git a/src/app/my/application/[appId]/page.js b/src/app/my/application/[appId]/page.js index 059fc01..cfdbac4 100644 --- a/src/app/my/application/[appId]/page.js +++ b/src/app/my/application/[appId]/page.js @@ -5,6 +5,7 @@ import Title from "@/components/my/application/title" import AddUpdate from "@/components/my/application/addUpdateModal"; import {useEffect, useState} from "react"; import AppService from "@/services/appService"; +import _ from "lodash"; @@ -32,7 +33,7 @@ const ApplicationPage = ({params: { appId }}) => { - + -o.versionCode)} /> ) } diff --git a/src/app/my/page.js b/src/app/my/page.js index 23b7477..050aa6d 100644 --- a/src/app/my/page.js +++ b/src/app/my/page.js @@ -4,6 +4,7 @@ import {useEffect, useState} from "react"; import CreateAppModal from "@/components/my/createAppModal"; import {useRouter} from "next/navigation"; import AppService from "@/services/appService"; +import _ from "lodash"; const MyPage = () => { @@ -47,13 +48,15 @@ const MyPage = () => { - {d.versions[0].id}}/> + {_.last(d.versions).id}}/> { return } }> + }> +
diff --git a/src/components/my/application/updationTable.js b/src/components/my/application/updationTable.js index d0653e1..384c8ab 100644 --- a/src/components/my/application/updationTable.js +++ b/src/components/my/application/updationTable.js @@ -11,6 +11,7 @@ export default function UpdationTable({dataSource}) { }/> + }> ) diff --git a/src/components/my/createAppModal.jsx b/src/components/my/createAppModal.jsx index 6839d54..9f5152f 100644 --- a/src/components/my/createAppModal.jsx +++ b/src/components/my/createAppModal.jsx @@ -7,12 +7,11 @@ import AppService from "@/services/appService"; const CreateAppModal = ({isOpen, handleCancel}) => { const router = useRouter() - const [isTitleFocused, setIsTitleFocused] = useState(false) - const [appName, setAppName] = useState("Название приложения") + const [appName, setAppName] = useState("") const [appVersion, setAppVersion] = useState("") const [appDescription, setAppDescription] = useState("") - const [link, setLink] = useState() - const [appId, setAppId] = useState() + const [link, setLink] = useState("") + const [appId, setAppId] = useState("") const [progressUpload, setProgressUpload] = useState(0) @@ -39,17 +38,18 @@ const CreateAppModal = ({isOpen, handleCancel}) => { })} onCancel={handleCancel} width={"50%"} + okButtonProps={{disabled: link === "" || appName === "" || appVersion === "" || appDescription === ""}} > Создание приложения
- - setIsTitleFocused(true)}>{appName} - setAppName(e.target.value)} className={isTitleFocused ? "inline": "!hidden"} /> - + + setAppName(e.target.value)}/> + + diff --git a/src/services/default.js b/src/services/default.js index 9aae95a..e285b9e 100644 --- a/src/services/default.js +++ b/src/services/default.js @@ -1,6 +1,6 @@ import axios from "axios"; -export const BASE_URL = "http://localhost:8001/api" +export const BASE_URL = "http://10.2.101.91:8005/api" const $instance = axios.create({ baseURL: BASE_URL