Compare commits

...

4 commits

Author SHA1 Message Date
06e8f6ce41 doc: update about page 2023-04-27 19:01:46 +03:00
24046c0f32 feat: source code link in about page 2023-04-27 18:56:35 +03:00
962cec0875 refactor: get localisation file 2023-04-27 18:50:27 +03:00
4e946879a2 doc: add feature to changelog 2023-04-27 18:45:40 +03:00
7 changed files with 39 additions and 11 deletions

View file

@ -23,7 +23,8 @@
- [ ] Settings for publish notes, such as: delete after reading, number of reads before deleting, adding your own data (name, picture, status in the settings) to the note.
- [ ] Api for upload photos
- [ ] Inserting a photo in a note
- [x] Maintaining statistics on sent notes, the number of notes received, number of deleted notes
- [x] Maintaining statistics on sent notes, the number of notes received, number of deleted notes (#8)
- [ ] Encrypting notes in the database
# AnoPaper v1.0.0

View file

@ -1,8 +1,10 @@
## Anopaper - anonymous notes service
## AnoPaper allows you to save and share notes anonymously.
---
### Functionality:
#### AnoPaper allows you to save and share notes anonymously.
##### Functionality:
- Notes support markdown format. For example, the entry: `### Level 3 Heading` would look like this:
@ -13,3 +15,5 @@
- Public notes are available only by link.
- When you click on the link, the note is saved locally and deleted from the server.
- Non-public notes are saved locally and are not sent to the server.`
---

View file

@ -1,8 +1,10 @@
## Anopaper - сервис анонимных записок
## AnoPaper позволяет анонимно сохранять и публиковать заметки.
---
### Функционал:
#### AnoPaper позволяет анонимно сохранять и публиковать заметки.
##### Функционал:
- Заметки поддерживают формат markdown. Например запись: `### Заголовок 3-го уровня` будет выглядеть так:
@ -13,3 +15,5 @@
- Публичные заметки доступны только по ссылке.
- При переходе по ссылке заметка сохраняется локально и удаляется с сервера.
- Не публичные заметки сохраняются локально и не отправляются на сервер.`
---

View file

@ -31,6 +31,8 @@ import socket from "./components/socket";
import Settings from "./pages/settings";
import { useState } from "react";
import { localesProcess } from "./components/utils";
import { ButtonWithIcon } from "./components/button";
import { LinkIcon } from "@heroicons/react/24/outline";
function App() {
Storage.prototype.setObj = function (key, obj) {
@ -82,9 +84,16 @@ function App() {
<Route
path="/about"
element={
<div className="col-span-4 md">
<RenderMarkdown>{locals.about_md}</RenderMarkdown>
</div>
<>
<div className="col-span-4 md">
<RenderMarkdown>{locals.about_md}</RenderMarkdown>
</div>
<ButtonWithIcon
icon={LinkIcon}
text={locals.SourceCode}
href="https://github.com/artegoser/AnoPaper"
/>
</>
}
/>
<Route path="/notes" element={<Notes />} />

View file

@ -44,4 +44,8 @@ function localesProcess(reRender) {
if (reRender) reRenderPage();
}
export { printDate, reRenderPage, localesProcess };
async function getNetLocale(lang, fileName) {
return (await (await fetch(`localisation/${lang}/${fileName}`)).text()) || "";
}
export { printDate, reRenderPage, localesProcess, getNetLocale };

View file

@ -15,8 +15,10 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { getNetLocale } from "../components/utils";
let en = {
about_md: (await (await fetch("localisation/en/about.md")).text()) || "",
about_md: await getNetLocale("en", "about.md"),
Notes: "Notes",
Write: "Write",
Chat: "Chat",
@ -72,6 +74,7 @@ let en = {
NoNotesFound: "No notes found",
LocalNote: "Local",
Menu: "Menu",
SourceCode: "Source code",
};
export default en;

View file

@ -15,8 +15,10 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { getNetLocale } from "../components/utils";
let ru = {
about_md: (await (await fetch("localisation/ru/about.md")).text()) || "",
about_md: await getNetLocale("ru", "about.md"),
Notes: "Заметки",
Write: "Написать",
Chat: "Чат",
@ -74,6 +76,7 @@ let ru = {
LocalNote: "Локальная",
PublishNote: "Публичная",
Menu: "Меню",
SourceCode: "Исходный код",
};
export default ru;