translate

This commit is contained in:
thek4n 2026-03-23 15:28:25 +03:00
parent 4c242d48d8
commit 492a9ece75
3 changed files with 12 additions and 10 deletions

View File

@ -116,7 +116,7 @@ fn resolve_addr(host: &str, port: u16) -> io::Result<SocketAddr> {
addr_str addr_str
.to_socket_addrs()? .to_socket_addrs()?
.next() .next()
.ok_or_else(|| io::Error::new(io::ErrorKind::NotFound, "Не удалось разрешить адрес")) .ok_or_else(|| io::Error::new(io::ErrorKind::NotFound, "Cannot resolve addr"))
} }
async fn root(State(state): State<AppState>) -> Result<Html<String>, StatusCode> { async fn root(State(state): State<AppState>) -> Result<Html<String>, StatusCode> {

View File

@ -3,7 +3,7 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Обзор директории</title> <title>Directory</title>
<style> <style>
body { body {
background-color: #121212; background-color: #121212;
@ -73,17 +73,18 @@
padding-top: 15px; padding-top: 15px;
} }
.footer a { .footer a {
padding: 1em;
color: #757575; color: #757575;
} }
</style> </style>
</head> </head>
<body> <body>
<div class="content"> <div class="content">
<h1>📂 Обзор директории: /{{TITLE_PATH}}</h1> <h1>📂 Directory: /{{TITLE_PATH}}</h1>
{{FILE_LIST}} {{FILE_LIST}}
<div class="footer"> <div class="footer">
<a href="/">На главную</a> <a href="/">Main</a>
<a href="/random">🎲 Случайный файл</a> <a href="/random">🎲 Random note</a>
</div> </div>
</div> </div>
</body> </body>

View File

@ -155,6 +155,7 @@
padding-top: 15px; padding-top: 15px;
} }
.footer a { .footer a {
padding: 1em;
color: #757575; color: #757575;
} }
.back-link { .back-link {
@ -185,14 +186,14 @@
<div class="content"> <div class="content">
<div style="margin-bottom: 20px;"> <div style="margin-bottom: 20px;">
<a href="{{BACK_LINK}}" class="back-link" onmouseover="this.style.color='#ffffff'" onmouseout="this.style.color='#90a4ae'"> <a href="{{BACK_LINK}}" class="back-link" onmouseover="this.style.color='#ffffff'" onmouseout="this.style.color='#90a4ae'">
<span></span> Назад <span></span> Back
</a> </a>
</div> </div>
{{CONTENT}} {{CONTENT}}
<div class="footer"> <div class="footer">
<a href="/">На главную</a> <a href="/">Main</a>
<a href="/random">🎲 Случайный файл</a> <a href="/random">🎲 Random note</a>
</div> </div>
</div> </div>
@ -207,7 +208,7 @@
setTimeout(connect, 3000); setTimeout(connect, 3000);
}; };
evtSource.addEventListener("reload", (event) => { evtSource.addEventListener("reload", (event) => {
console.log("Получено событие обновления"); console.log("Get new update event");
location.reload(); location.reload();
}); });
} }
@ -232,7 +233,7 @@
button.style.color = ''; button.style.color = '';
}, 2000); }, 2000);
}).catch(err => { }).catch(err => {
console.error('Ошибка копирования:', err); console.error('Error copying:', err);
button.innerText = 'Error'; button.innerText = 'Error';
}); });
} }