From 5c8dd1262488fa0e6d108cbd29e508b48d81ee7f Mon Sep 17 00:00:00 2001 From: r57zone Date: Sun, 29 Nov 2020 10:37:30 +0400 Subject: [PATCH] Improvements: New architecture, new API, new features and fixes --- API.md | 32 +- README.RU.md | 10 +- README.md | 10 +- Source/Android/config.xml | 14 +- Source/Android/images/close.png | Bin 0 -> 288 bytes Source/Android/images/flashlight.png | Bin 0 -> 252 bytes Source/Android/images/qr.png | Bin 0 -> 283 bytes Source/Android/images/share.png | Bin 0 -> 239 bytes Source/Android/index.html | 475 ++++++++++++++---- Source/Windows/Unit1.pas | 268 +++++++--- Source/Windows/Unit2.dfm | 104 +++- Source/Windows/Unit2.pas | 120 ++++- Source/Windows/style/main.html | 2 +- .../icons/{Icon-114.png => icon-114.png} | Bin .../icons/{Icon-120.png => icon-120.png} | Bin .../icons/{Icon-144.png => icon-144.png} | Bin .../icons/{Icon-152.png => icon-152.png} | Bin .../icons/{Icon-180.png => icon-180.png} | Bin .../webapp/icons/{Icon-57.png => icon-57.png} | Bin .../webapp/icons/{Icon-60.png => icon-60.png} | Bin .../webapp/icons/{Icon-72.png => icon-72.png} | Bin .../webapp/icons/{Icon-76.png => icon-76.png} | Bin Source/Windows/webapp/main.html | 458 +++++++++++++---- 23 files changed, 1205 insertions(+), 288 deletions(-) create mode 100644 Source/Android/images/close.png create mode 100644 Source/Android/images/flashlight.png create mode 100644 Source/Android/images/qr.png create mode 100644 Source/Android/images/share.png rename Source/Windows/webapp/icons/{Icon-114.png => icon-114.png} (100%) rename Source/Windows/webapp/icons/{Icon-120.png => icon-120.png} (100%) rename Source/Windows/webapp/icons/{Icon-144.png => icon-144.png} (100%) rename Source/Windows/webapp/icons/{Icon-152.png => icon-152.png} (100%) rename Source/Windows/webapp/icons/{Icon-180.png => icon-180.png} (100%) rename Source/Windows/webapp/icons/{Icon-57.png => icon-57.png} (100%) rename Source/Windows/webapp/icons/{Icon-60.png => icon-60.png} (100%) rename Source/Windows/webapp/icons/{Icon-72.png => icon-72.png} (100%) rename Source/Windows/webapp/icons/{Icon-76.png => icon-76.png} (100%) diff --git a/API.md b/API.md index 6cf07ad..865fb2d 100644 --- a/API.md +++ b/API.md @@ -1,24 +1,28 @@ ## Easy Notes API ### In English -The data is sent in XML markup. The text of the note is converted into a sequence of characters - "x" + character number. For example, the word "Hello" is converted to "x72x101x108x108x111". +The Windows app is a notes server. The data is sent in XML markup. The text of the note is converted into a sequence of characters - "x" + character number. For example, the word "Hello" is converted to "x72x101x108x108x111". -| Request | Request type | Description | Example | +| Request | Request type | Description | Value / Status | | ------------- | ------------- | ------------- | ------------- | -| `IP:PORT/api/getnotes` | GET | Getting a list with identifiers (Unix timestamp) and note times (Unix timestamp with UTC offset). | <notes>
<note id="1553287432" datetime="1553301832"></note>
<note id="1553287428" datetime="1553301828"></note>
</notes> | -| `IP:PORT/api/getfullnotes` | GET | Get a list with ids, notes and note times. | <notes>
<note id="1553285632" datetime="1553300032">x72x101x108x108x111</note>
<note id="1553248570" datetime="1553262970">x72x101x108x108x111</note>
</notes> | -| `IP:PORT/api/getnote=ID` | GET | Getting a note by id. | <notes>
<note id="1553285632" datetime="1553300032">x72x101x108x108x111</note>
</notes> | -| `IP:PORT/api/syncnotes` | POST | Sending created and modified notes by the client. | <actions>
<insert id="1553285632" datetime="1553300032">x72x101x108x108x111</insert>
<update id="1553248570" datetime="1553262970">x72x101x108x108x111</update>
<delete id="1553248570"></delete>
</actions> | +| `IP:PORT/api/connecttest` | GET | Getting the server availability status. | "ok" | +| `IP:PORT/api/auth?id=DEVICE` | GET | Request to add to the list of authorized devices. | "auth:ok" or "auth:denied" | +| `IP:PORT/api/notes?id=DEVICE` | GET | Getting a list with identifiers (Unix timestamp), notes and note times (Unix timestamp with UTC offset). | <notes>
<note id="1553285632" datetime="1553300032">x72x101x108x108x111</note>
<note id="1553248570" datetime="1553262970">x72x101x108x108x111</note>
</notes> | +| `IP:PORT/api/actions?id=DEVICE` | GET | Receiving new changes from the server. | <actions>
<insert id="1553285632" datetime="1553300032">x72x101x108x108x111</insert>
<update id="1553248570" datetime="1553262970">x72x101x108x108x111</update>
<delete id="1553248570"></delete>
</actions> | +| `IP:PORT/api/received?id=DEVICE` | GET | Confirmation of receiving new changes from the server. | "ok" or "auth:denied" | +| `IP:PORT/api/syncnotes?id=DEVICE` | POST | Sending new changes from the client. | <actions>
<insert id="1553285632" datetime="1553300032">x72x101x108x108x111</insert>
<update id="1553248570" datetime="1553262970">x72x101x108x108x111</update>
<delete id="1553248570"></delete>
</actions> | -IP is the address running the application for Windows. The default port is 735. +`IP` is the address running the application for Windows. The default port is 735. `DEVICE` is the name of the device, for example `Android_g9N1z5S2` or `iOS_rM5s3Gz7`. ### На русском -Данные пересылаются в XML разметке. Текст заметки конвертируется в последовательность символов - "x" + номер символа. Например, слово "Привет" конвертируется в "x1055x1088x1080x1074x1077x1090". +Приложение для Windows является сервером заметок. Данные пересылаются в XML разметке. Текст заметки конвертируется в последовательность символов - "x" + номер символа. Например, слово "Привет" конвертируется в "x1055x1088x1080x1074x1077x1090". -| Запрос | Тип запроса | Описание | Пример | +| Запрос | Тип запроса | Описание | Значение / Статус | | ------------- | ------------- | ------------- | ------------- | -| `IP:PORT/api/getnotes` | GET | Получение списка с идентификаторами (Unix timestamp) и времен заметки (Unix timestamp с UTC смещением). | <notes>
<note id="1553287432" datetime="1553301832"></note>
<note id="1553287428" datetime="1553301828"></note>
</notes> | -| `IP:PORT/api/getfullnotes` | GET | Получение списка с идентификаторами, заметками и времен заметок. | <notes>
<note id="1553285632" datetime="1553300032">x72x101x108x108x111</note>
<note id="1553248570" datetime="1553262970">x72x101x108x108x111</note>
</notes> | -| `IP:PORT/api/getnote=ID` | GET | Получение содержимого заметки по идентификатору. | <notes>
<note id="1553285632" datetime="1553300032">x72x101x108x108x111</note>
</notes> | -| `IP:PORT/api/syncnotes` | POST | Отправка созданных и измененных клиентом заметок. | <actions>
<insert id="1553285632" datetime="1553300032">x72x101x108x108x111</insert>
<update id="1553248570" datetime="1553262970">x72x101x108x108x111</update>
<delete id="1553248570"></delete>
</actions> | +| `IP:PORT/api/connecttest` | GET | Получение статуса доступности сервера. | "ok" | +| `IP:PORT/api/auth?id=DEVICE` | GET | Запрос на добавление в список авторизованных устройств. | "auth:ok" или "auth:denied" | +| `IP:PORT/api/notes?id=DEVICE` | GET | Получение списка с идентификаторами (Unix timestamp), заметками и временем заметок (Unix timestamp с UTC смещением). | <notes>
<note id="1553285632" datetime="1553300032">x72x101x108x108x111</note>
<note id="1553248570" datetime="1553262970">x72x101x108x108x111</note>
</notes> | +| `IP:PORT/api/actions?id=DEVICE` | GET | Получение новых изменений от сервера. | <actions>
<insert id="1553285632" datetime="1553300032">x72x101x108x108x111</insert>
<update id="1553248570" datetime="1553262970">x72x101x108x108x111</update>
<delete id="1553248570"></delete>
</actions> | +| `IP:PORT/api/received?id=DEVICE` | GET | Подтверждение получения новых изменений от сервера. | "ok" или "auth:denied" | +| `IP:PORT/api/syncnotes?id=DEVICE` | POST | Отправка новых изменений от клиента. | <actions>
<insert id="1553285632" datetime="1553300032">x72x101x108x108x111</insert>
<update id="1553248570" datetime="1553262970">x72x101x108x108x111</update>
<delete id="1553248570"></delete>
</actions> | -IP это адрес, с запущенным приложением для Windows. Порт по умолчанию 735. \ No newline at end of file +`IP` это адрес, с запущенным приложением для Windows. Порт по умолчанию 735. `DEVICE` это название устройства, например, `Android_g9N1z5S2` или `iOS_rM5s3Gz7`. \ No newline at end of file diff --git a/README.RU.md b/README.RU.md index 9f9fdca..0cacbbf 100644 --- a/README.RU.md +++ b/README.RU.md @@ -1,6 +1,8 @@ [![EN](https://user-images.githubusercontent.com/9499881/33184537-7be87e86-d096-11e7-89bb-f3286f752bc6.png)](https://github.com/r57zone/EasyNotes/) [![RU](https://user-images.githubusercontent.com/9499881/27683795-5b0fbac6-5cd8-11e7-929c-057833e01fb1.png)](https://github.com/r57zone/EasyNotes/blob/master/README.RU.md) # EasyNotes +![](https://user-images.githubusercontent.com/9499881/100446367-1cd14000-30c8-11eb-8e82-335f134a8c95.png) + Приложения заметок для Windows, iOS и Android, с синхронизацией. Сервером выступает приложение для Windows, поэтому для синхронизации необходимо запускать его. Посмотреть API можно [здесь](https://github.com/r57zone/EasyNotes/blob/master/API.md). ## Особенности @@ -11,6 +13,10 @@ Также присутствует полная поддержка планшетов. + + +В Android версии присутствует QR сканер кодов. + ## Настройка ### Синхронизация мобильных приложений 1. Зарезервируйте постоянный IP адрес компьютеру, с Windows приложением. Это делается в настройках Wi-Fi роутера, в разделе "DHCP". @@ -26,7 +32,7 @@ Для обновления нужно синхронизироваться, далее зайти в настройки "Safari" и удалить историю и данные, после чего можно заново добавлять приложение. ### Android -Установите "EasyNotes.apk" и введите зарезервированный постоянный IP вашего компьютера. +Установите "EasyNotes.apk" и введите зарезервированный постоянный IP вашего компьютера. Если ваш маршрутизатор присваивает следующие IP адреса: `192.168.0.0/15`, `192.168.0.100/115`, `192.168.1.0/15`, `192.168.1.100/115`, `192.168.2.0/15`, `192.168.3.0/15`, то можно просто включить автопоиск IP адреса и приложение само найдет ваш компьютер. ## Скриншоты ### Windows @@ -45,7 +51,7 @@ [![](https://user-images.githubusercontent.com/9499881/93085759-1b869e80-f6a7-11ea-9868-07929effdac8.png)](https://user-images.githubusercontent.com/9499881/93085569-cea2c800-f6a6-11ea-96f9-2425c14b7aa7.png) ## Загрузка ->Версии для iOS 6+, Android 5+ и Windows 7, 8.1, 10 (с установленным Internet Explorer 11). +>Версии для iOS 9+, Android 5+ и Windows 7, 8.1, 10 (с установленным Internet Explorer 11). **[Загрузить](https://github.com/r57zone/EasyNotes/releases)** ## Обратная связь diff --git a/README.md b/README.md index b57e5a3..43bcdbd 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ [![EN](https://user-images.githubusercontent.com/9499881/33184537-7be87e86-d096-11e7-89bb-f3286f752bc6.png)](https://github.com/r57zone/EasyNotes/) [![RU](https://user-images.githubusercontent.com/9499881/27683795-5b0fbac6-5cd8-11e7-929c-057833e01fb1.png)](https://github.com/r57zone/EasyNotes/blob/master/README.RU.md) # EasyNotes +![](https://user-images.githubusercontent.com/9499881/100446367-1cd14000-30c8-11eb-8e82-335f134a8c95.png) + Apps notes for Windows, iOS and Android, with sync. The server is a Windows application so you need to run it for sync. View API can be [here](https://github.com/r57zone/EasyNotes/blob/master/API.md). ## Features @@ -11,6 +13,10 @@ Apps have a dark theme and automatic switching to it in the dark time. Full tablet support is also present. + + +The Android version has a QR code scanner. + ## Setup ### Sync of the mobile apps 1. Reserve a permanent IP address for a computer with a Windows application. This is done in the settings of the Wi-Fi router in the "DHCP" section. @@ -26,7 +32,7 @@ Next, go to Safari on your mobile device and enter there "http://IP:735/webapp", To update, you need to synchronize, then go to the "Safari" settings and delete history and data, after which you can add the application again. ### Android -Install "EasyNotes.apk" and enter the reserved permanent IP of your computer. +Install "EasyNotes.apk" and enter the reserved permanent IP of your computer. If your router assigns the following IP addresses: `192.168.0.0/15`, `192.168.0.100/115`, `192.168.1.0/15`, `192.168.1.100/115`, `192.168.2.0/15`, `192.168.3.0/15`, then you can just enable auto-search for IP addresses and the app will find your computer itself. ## Screenshots ### Windows @@ -45,7 +51,7 @@ Install "EasyNotes.apk" and enter the reserved permanent IP of your computer. [![](https://user-images.githubusercontent.com/9499881/93085078-14ab5c00-f6a6-11ea-9657-239175a85f24.png)](https://user-images.githubusercontent.com/9499881/93084998-f7768d80-f6a5-11ea-8ed3-b75c1404bc77.png) ## Download ->Versions for iOS 6+, Android 5+ and Windows 7, 8.1, 10 (with Internet Explorer 11 installed). +>Versions for iOS 9+, Android 5+ and Windows 7, 8.1, 10 (with Internet Explorer 11 installed). **[Download](https://github.com/r57zone/EasyNotes/releases)** ## Feedback diff --git a/Source/Android/config.xml b/Source/Android/config.xml index 87f217e..54bc999 100644 --- a/Source/Android/config.xml +++ b/Source/Android/config.xml @@ -2,8 +2,8 @@ + versionCode = "15" + version = "1.0.0" > EasyNotes @@ -12,14 +12,14 @@ r57zone - - - + + - - + + + \ No newline at end of file diff --git a/Source/Android/images/close.png b/Source/Android/images/close.png new file mode 100644 index 0000000000000000000000000000000000000000..bf6c7cbeb301b8fd264275eee0e148ea41c6368d GIT binary patch literal 288 zcmeAS@N?(olHy`uVBq!ia0vp^x**KK1|+Sd9?b$$oCO|{#X$M%Ak65bF}ngNsF3Ut z0Mx-#Zw4F!1u?w%yIj?(@t( zExmZ{#B|r|stW}_h;Y;yA78$>+V?q^zwm)~A51vkaD~_TBJ5Z%s19`E|NqPk$G8+j UueT@v19BNWUHx3vIVCg!05LCRy8r+H literal 0 HcmV?d00001 diff --git a/Source/Android/images/flashlight.png b/Source/Android/images/flashlight.png new file mode 100644 index 0000000000000000000000000000000000000000..2a4dc19a3ab5d7225c1461bcd646046ac4b6c4de GIT binary patch literal 252 zcmeAS@N?(olHy`uVBq!ia0vp^x**KK1|+Sd9?b$$oCO|{#S9F5he4R}c>anMprAss zN02WALzOB6LqjtI!_WUf`XvKHsR0ASs|29d84L{K`IF+0x&hTTdAc};RNQ)V!;!1O zfQQ9Fxo*M#`jq(r`f(yt76oeft!p&WvDE3kcFW|}nad5#ykKCfQ+2Xp$+cT|cX??( zw0Y;3UnQxTt}e^}{oLa3F6%D!UnXBXuk~;DsTaYrQeg1w ha3muG!~g%x48DBaU#+emnF@3bgQu&X%Q~loCIBN^RjdF2 literal 0 HcmV?d00001 diff --git a/Source/Android/images/qr.png b/Source/Android/images/qr.png new file mode 100644 index 0000000000000000000000000000000000000000..ccc4a36e8db95c341f7233e4f6650ceb385b47ab GIT binary patch literal 283 zcmeAS@N?(olHy`uVBq!ia0vp^x**KK1|+Sd9?b$$oCO|{#S9F5he4R}c>anMprAss zN02WALzOB6LqjtI!_WUf`XvKHsR0ASs|29d84L{K`IF+0x&hTL^mK6yskrs#`a!-1 z1&)Tq`~RN_U%u;jsb#@8`3Uywznns3l#KR?F`HyuSm4;q#=Fb7>YQd&%Kqw}zB5u8 z=iS%5{N|$h%Vc-z3)ALX!P51-YyUR1Z91iq6uV@R?Myvq`@4d-QmS;h&qq`)d;e;u zZk0K+?&-s?ly9X~ZTEMV^;+59ogP@!^M7CBqWRBu9nF=2S|lqj4s_lB|I7?N>&v*- Ty~#`hav3~b{an^LB{Ts5#4KqS literal 0 HcmV?d00001 diff --git a/Source/Android/images/share.png b/Source/Android/images/share.png new file mode 100644 index 0000000000000000000000000000000000000000..0cdcd2b9be095af2ae1e883d59f27f13720471bf GIT binary patch literal 239 zcmeAS@N?(olHy`uVBq!ia0vp^x**KK1|+Sd9?b$$oCO|{#S9F5he4R}c>anMprAss zN02WALzOB6LqjtI!_WUf`XvKHsR0ASs|29d84L{K`IF+0x&hUedb&7BQ+vFN$;#Plf${2kxAa2W zphbfI&I|K>r%P6qJ`4WRS(}lO@#4@6^L9QHlP}K>eo?X8b^!vW7BMm~{Qu9)Fn4EF V!q - - - - - - - - - - - + + + + + + + + + + +