Compare commits

..

No commits in common. "06e8f6ce41e324fc8a485eb18579be1fd55643c6" and "3dfb453924cd54de6711197050b6acd33165ac2d" have entirely different histories.

7 changed files with 11 additions and 39 deletions

View file

@ -23,8 +23,7 @@
- [ ] 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. - [ ] 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 - [ ] Api for upload photos
- [ ] Inserting a photo in a note - [ ] Inserting a photo in a note
- [x] Maintaining statistics on sent notes, the number of notes received, number of deleted notes (#8) - [x] Maintaining statistics on sent notes, the number of notes received, number of deleted notes
- [ ] Encrypting notes in the database
# AnoPaper v1.0.0 # AnoPaper v1.0.0

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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