1
0
mirror of https://github.com/Segate-ekb/publicator.git synced 2024-11-16 09:58:27 +02:00

Фиксы

This commit is contained in:
ivanovEV 2023-05-24 12:04:17 +03:00
parent 47f3c1625c
commit dd8989ffcb
8 changed files with 14 additions and 12 deletions

View File

@ -29,11 +29,11 @@ export const restartServer = async (showSnackbar) => {
};
export const getConfig = async (showSnackbar) => {
return sendRequest(`https://publicator.1cdevelopers.ru/api/v1/config/getconfig`, showSnackbar);
return sendRequest(`/api/v1/config/getconfig`, showSnackbar);
};
export const getSettings = async (showSnackbar) => {
return sendRequest(`https://publicator.1cdevelopers.ru/api/v1/config/getsettings`, showSnackbar);
return sendRequest(`/api/v1/config/getsettings`, showSnackbar);
};
const sendPostRequest = async (url, data, showSnackbar) => {

View File

@ -30,7 +30,7 @@ const StyledSpeedDial = styled(SpeedDial)(({ theme }) => ({
}));
const CrsList = ({ crs, handleEditDialogOpen }) => {
const { showSnackbar } = useContext(AppContext);
const { showSnackbar, state } = useContext(AppContext);
const handleCopy = async (server) => {
@ -40,7 +40,9 @@ const CrsList = ({ crs, handleEditDialogOpen }) => {
}
try {
const serverAddress = `${server.tcpAddress}/${server.name}/repo.1ccr`;
const cleanedBaseUrl = state.settings.publicationServerUrl.replace(/\/+$/, ""); // убираем слэши в конце строки
const cleanedPublicationName = server.name.replace(/^\/+/, "");
const serverAddress = `${cleanedBaseUrl}/${cleanedPublicationName}/repo.1ccr`;
await navigator.clipboard.writeText(serverAddress);
showSnackbar('Адрес сервера скопирован в буфер обмена.', 'success');
} catch (err) {

View File

@ -1,10 +1,10 @@
{
"files": {
"main.js": "/static/js/main.c3f0d7f3.js",
"main.js": "/static/js/main.817c1955.js",
"index.html": "/index.html",
"main.c3f0d7f3.js.map": "/static/js/main.c3f0d7f3.js.map"
"main.817c1955.js.map": "/static/js/main.817c1955.js.map"
},
"entrypoints": [
"static/js/main.c3f0d7f3.js"
"static/js/main.817c1955.js"
]
}

View File

@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="/favicon.ico"/><meta name="viewport" content="initial-scale=1,width=device-width,shrink-to-fit=no"/><meta name="theme-color" content="#000000"/><link rel="apple-touch-icon" href="/icon-192x192.png"/><link rel="icon" href="/icon-512x512.png" sizes="512x512" type="image/png"/><link rel="manifest" href="/manifest.json"/><title>Публикатор 1с</title><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"/><script defer="defer" src="/static/js/main.c3f0d7f3.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="/favicon.ico"/><meta name="viewport" content="initial-scale=1,width=device-width,shrink-to-fit=no"/><meta name="theme-color" content="#000000"/><link rel="apple-touch-icon" href="/icon-192x192.png"/><link rel="icon" href="/icon-512x512.png" sizes="512x512" type="image/png"/><link rel="manifest" href="/manifest.json"/><title>Публикатор 1с</title><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"/><script defer="defer" src="/static/js/main.817c1955.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long