translate

This commit is contained in:
thek4n 2026-03-23 15:28:25 +03:00
parent 4c242d48d8
commit 83728379fe
3 changed files with 9 additions and 9 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;
@ -79,11 +79,11 @@
</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

@ -191,8 +191,8 @@
{{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 +207,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 +232,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';
}); });
} }