Commit Graph

190 Commits

Author SHA1 Message Date
Abdullah Atta
07fb572a67 core: fix html export empty p tag regex 2023-07-26 12:08:51 +05:00
Muhammad Ali
75e62a3fac core: pre-render math & code blocks before HTML export 2023-07-25 08:09:27 +05:00
Abdullah Atta
111c7ef954 core: fix Cannot read properties of undefined (reading 'length') error 2023-07-05 22:19:43 +05:00
Abdullah Atta
f733e6e95b core: convert object-id to es2015 class 2023-06-20 17:48:48 +05:00
ammarahm-ed
09cd19d3b7 core: fix incorrect snooze time format 2023-06-16 10:23:46 +05:00
Abdullah Atta
5041e47902 core: fix require is not defined 2023-06-12 13:02:56 +05:00
Abdullah Atta
5374f2b56c web: migrate to vitejs from webpack (#2715) 2023-06-12 11:49:37 +05:00
Abdullah Atta
163dfac5d7 core: add tests for title formatting 2023-06-08 11:57:21 +05:00
Abdullah Atta
742dc56f3c core: add support for $timestamp$ in title 2023-06-08 11:56:59 +05:00
Abdullah Atta
e75c62e6e1 core: use 2 digits for 12 hour time format 2023-06-05 15:29:10 +05:00
Abdullah Atta
c36f532bbb web: use date & time formats from settings 2023-06-05 15:29:10 +05:00
ammarahm-ed
c85242a610 core: format time correctly 2023-06-05 15:29:10 +05:00
ammarahm-ed
58f7a206d9 mobile: add settings 2023-06-05 15:29:10 +05:00
ammarahm-ed
68f10ce308 core: add isAudio function 2023-05-23 12:52:50 +05:00
Abdullah Atta
8a475f654f web: improve attachments manager ui/ux 2023-05-23 12:52:50 +05:00
Abdulrehman-Jafer
b18cf277f6 core: fix code block overflow in PDF export (#2245)
Signed-off-by: Abdulrehman-Jafer <abdulrehmanjaferwork01233@gmail.com>
2023-04-04 16:19:02 +05:00
Abdulrehman-Jafer
cb1d32d177 core: fix txt, pdf & html export line spacing (#2215)
Signed-off-by: Abdulrehman-Jafer <abdulrehmanjaferwork01233@gmail.com>
Co-authored-by: Abdulrehman-Jafer <abdulrehmanjaferwork01233@gmail.com>
Co-authored-by: Abdullah Atta <thecodrr@protonmail.com>
2023-03-30 17:09:00 +05:00
Abdullah Atta
d9a77ff658 core: migrate filename.ts to javascript 2023-03-21 09:59:45 +05:00
ammarahm-ed
1fdede5518 core: add getFileNameWithExtension utility 2023-03-21 09:59:45 +05:00
Abdullah Atta
e53cc648f0 core: do not unsub all once events on publish
this was a stupid bug where publishing any type of event would
unsubscribe all events that had once set to true.
2023-02-28 12:11:13 +05:00
Abdullah Atta
9116a24392 global: update license year to 2023 2023-01-16 13:48:28 +05:00
Ammar Ahmed
05cd7e5002 core: add proper styling to pdf & html exports (#1579)
* mobile: fix exported pdf styling

* core: move html template styles to core

* core: inline prism-dracula styles

Signed-off-by: Abdullah Atta <abdullahatta@streetwriters.co>
Co-authored-by: Abdullah Atta <abdullahatta@streetwriters.co>
2023-01-06 17:58:33 +05:00
ammarahm-ed
b77254a045 mobile: configurable snooze time 2023-01-05 22:01:01 +05:00
Abdullah Atta
631142f852 core: group reminders by active/inactive 2023-01-05 22:01:01 +05:00
Ammar Ahmed
5445ee0335 core: handle crash when sorting if item doesn't have a title (#1447) 2022-12-05 10:54:55 +05:00
Abdullah Atta
222fc00bd7 core: update export templates 2022-11-23 16:22:04 +05:00
Abdullah Atta
5e6caa7273 core: use upstream htmlparser2 instead of in-house
This is mostly because I am not 100% certain about how stable our own
optimized version is. While it does perform a lot better, there is
significant risk that things might break in production. To avoid
that, I am replacing it with the upstream version which is much more
heavily tested.
2022-11-23 14:58:34 +05:00
Abdullah Atta
b1f5ffc2ec core: add dateModified comparator 2022-11-23 12:33:35 +05:00
Muhammad Ali
82b584b3d1 core: include tags in exported note (#1345)
Co-authored-by: Abdullah Atta <abdullahatta@streetwriters.co>
2022-11-23 09:19:07 +05:00
Muhammad Ali
a70961b662 core: respect numbers when sorting items (#1337)
Signed-off-by: Muhammad Ali <alihamuh@gmail.com>
2022-11-17 19:38:05 +05:00
Abdullah Atta
8f5ebe315e core: use client given compression module 2022-11-11 17:01:01 +05:00
Abdullah Atta
205373dca3 core: use htmlparser2 for html rewriting
This replaces DOMParser with htmlparser2 which is much, much faster.
How much faster? 80%. This new implementation can parse at 50mb/s
which is insane! The old one could only do 5-10mb/s

We still haven't gotten rid of the DOMParser though since HTML-to-MD
conversion still needs it. This will be done soon though by using `dr-sax`.

This uses a custom implementation of htmlparser2 instead of the default
one which is 50% faster.
2022-11-10 15:16:13 +05:00
Abdullah Atta
e1fc116994 core: improve content conflict detection using proper HTML diffing (#1183)
Since HTML is a tree-like language it is futile to compare it character
for character. `html1 === html2` is almost always false. This commit
introduces a simple diffing algorithm that only checks the text inside
the html + a few other attributes to decide whether the 2 HTMLs are
actually different or not. This is obviously not foolproof and it will
ignore everything aesthetic (b, em, strong tags etc.). This is actually
desireable because in our case only the text difference should
warrant a conflict. Everything else can easily be brought back.
Similarly, this also ignores whitespace differences surrouding the
tags.

All in all it'll provide a more reliable alternative to MD5 hashing the
2 HTMLs.
2022-10-13 19:22:32 +05:00
Abdullah Atta
d81f5dba65 refactor: migrate to theme-ui from rebass 2022-08-31 07:26:27 +05:00
Abdullah Atta
c317774c8a docs: add license header 2022-08-30 16:17:04 +05:00
thecodrr
87b778db94 test: improve overall test coverage 2022-08-15 10:57:25 +05:00
thecodrr
16f2e651b4 fix: returned items are empty when groupby is se to none 2022-07-20 17:45:52 +05:00
thecodrr
ceea6e1668 fix: include conflicted & pinned groups when groupBy == none 2022-07-19 11:22:03 +05:00
thecodrr
530a1cc625 feat: add log messages all over the place 2022-07-19 11:16:46 +05:00
thecodrr
0a05ec3cbd fix: use DOMParser from globalThis 2022-07-15 09:42:30 +05:00
thecodrr
d7d21bc54b fix: handle "failed to fetch" errors better 2022-07-08 12:07:26 +05:00
thecodrr
383bdb1c8f fix: input.includes is not a function 2022-07-07 18:39:57 +05:00
Ammar Ahmed
6d4b9ca379 use localCompare for sorting 2022-06-17 16:52:00 +05:00
thecodrr
751305e04c perf: optimize grouping/sorting & id creation 2022-06-16 16:01:08 +05:00
thecodrr
e072d74483 fix: use linkedom/worker 2022-06-08 10:56:53 +05:00
thecodrr
ad10b6c98d feat: use linkedom 2022-04-19 00:28:42 +05:00
thecodrr
c9c57d87ab feat: migrate to happy-dom from node-html-parser 2022-04-19 00:04:57 +05:00
thecodrr
332e08c372 fix: clone array before adding header 2022-04-15 22:32:16 +05:00
thecodrr
7b57b0b916 fix: parse & throw json errors from signalr errors 2022-04-13 16:46:19 +05:00
thecodrr
1703420ca9 feat: allow grouping by none 2022-03-31 14:32:24 +05:00