Compare commits

..

2617 Commits

Author SHA1 Message Date
Andrey Antukh
7e8d8eef5a 🐛 Fix minor issues on event instumentation module 2022-03-14 13:56:32 +01:00
Andrey Antukh
e6d6b60b63 🐛 Properly filter complex data on events payload 2022-03-14 12:39:37 +01:00
Eva
70beb6c60c 🐛 Add ellipsis in long page names 2022-03-14 12:39:27 +01:00
alonso.torres
aa416a782d 🐛 Fix problem with handlers over rules 2022-03-14 10:23:13 +01:00
Andrey Antukh
51dd869874 Merge pull request #1682 from penpot/alotor/hotfixes
Hotfixes
2022-03-11 15:56:45 +01:00
alonso.torres
5347409804 🐛 Fix problem with shift+ctrl+click to select 2022-03-11 15:38:48 +01:00
alonso.torres
aa6f82c31f 🐛 Fix issue with guides over shape handlers 2022-03-11 15:38:48 +01:00
alonso.torres
a0c0ab1871 🐛 Fix problem with handoff css 2022-03-08 11:53:56 +01:00
Andrey Antukh
49649a8814 Merge pull request #1662 from penpot/niwinz-hotfix-event-tracing-improvements
Minor improvements (hotfix)
2022-03-07 15:52:26 +01:00
Andrey Antukh
18a67a80bc 🔥 Remove unused code 2022-03-07 15:50:31 +01:00
Andrey Antukh
867669cc98 Add missing origin meta on left-toolbar events 2022-03-07 15:19:51 +01:00
Andrey Antukh
0158a93391 📎 Fix linter issues on staging branch 2022-03-07 15:10:03 +01:00
Andrey Antukh
fdb6533149 Minor improvement on workspace flags and modal event tracing 2022-03-07 15:10:03 +01:00
Andrey Antukh
6f32d721c2 📎 Minor changes on default values on devenv docker compose 2022-03-07 15:10:03 +01:00
Andrey Antukh
5f49656e30 Add proper event tracing on nudge modal
And ♻️ refactor data event handling, moving
some logic from component to the event.
2022-03-07 15:10:03 +01:00
Andrey Antukh
8114b165d9 📎 Update version.txt file 2022-03-07 13:13:41 +01:00
Andrey Antukh
dd39cb5a1c Merge pull request #1661 from penpot/fix/viewer-performance
🐛 Fix problems with viewer performance
2022-03-07 13:13:11 +01:00
Andrey Antukh
7f8c217e7c Merge remote-tracking branch 'origin/main' into staging 2022-03-07 13:11:38 +01:00
Andrey Antukh
d731a095c6 Merge branch 'main' into staging 2022-03-07 13:08:20 +01:00
alonso.torres
6630899d6e 🐛 Fix problems with viewer performance 2022-03-07 12:40:27 +01:00
Andrey Antukh
0cfd5095a7 🐛 Fix stack trace reporting on loki 2022-03-07 11:31:36 +01:00
Andrey Antukh
4f379821b5 🐛 Fix labels on loki logger 2022-03-07 11:09:06 +01:00
Eva
9eea7dabc2 🐛 Fix length of names in sidebar 2022-03-07 11:07:15 +01:00
Andrey Antukh
d1c834e647 🐛 Fix minor issue on executors monitor 2022-03-01 14:34:13 +01:00
Andrey Antukh
03a082fe40 🐛 Fix metrics on websocket connections 2022-03-01 14:19:26 +01:00
alonso.torres
0534570784 🐛 Fix typo in text palette 2022-03-01 13:00:48 +01:00
Andrey Antukh
f2e389593a 🐛 Fix graphic asset rename 2022-03-01 12:50:10 +01:00
Andrey Antukh
fae79d67e6 Merge branch 'staging' 2022-03-01 11:10:27 +01:00
Andrey Antukh
271f69d59d Merge branch 'release-1.12' into staging 2022-03-01 11:08:21 +01:00
elhombretecla
6563cd9c8b 🎉 Add new release info dialog 2022-03-01 11:07:50 +01:00
Andrey Antukh
e60b8a7aef 🐛 Minor fix on worker executors monitor 2022-02-28 17:21:36 +01:00
alonso.torres
a644599b16 🐛 Fix problem when disabling grid snap 2022-02-28 16:07:43 +01:00
Andrey Antukh
5d2715dd32 Improve monitors monitor 2022-02-28 15:29:30 +01:00
Andrey Antukh
1bad233e2f 📎 Fix linter issues on staging branch 2022-02-28 12:09:59 +01:00
Andrey Antukh
f64b1d3651 🐛 Properly handle invitations on login 2022-02-28 12:08:31 +01:00
Andrey Antukh
eb57c2f980 💄 Cosmetic changes on mutation profile ns 2022-02-28 12:08:05 +01:00
Andrey Antukh
ecd491cd09 🐛 Don't mark as touched temporal file 2022-02-28 12:07:44 +01:00
Andrey Antukh
dead3138b3 Reduce the size of the default thread pool 2022-02-28 12:07:21 +01:00
Andrey Antukh
0416082d4d 🐛 Fix awsns handler, convert it ot async 2022-02-28 12:06:47 +01:00
alonso.torres
05c77d0248 🐛 Fix problem with collapsing pages 2022-02-25 12:53:22 +01:00
Alejandro Alonso
2fc4c30bed 🐛 [Prototype] Prototype mode should not allow edits 2022-02-25 12:41:19 +01:00
Alejandro Alonso
d2590c7651 🐛 [Prototype] Prototype mode should not allow edits 2022-02-25 12:24:09 +01:00
alonso.torres
b4c87ad0b9 🐛 Fix font for guides and rulese 2022-02-24 11:45:56 +01:00
Andrey Antukh
37a35b1827 Minor improvements on telemetry task 2022-02-24 11:02:05 +01:00
Eva
24a0b4445e Open feedback page in a new tab 2022-02-23 12:51:02 +01:00
Andrey Antukh
87c1bc4bdb 🐛 Fix incorrect error id reporting on mattermost webhook 2022-02-23 12:40:28 +01:00
Andrey Antukh
e15f5bb432 🐛 Fix issues with not authenticated requests
Related to concurrency model refactor.
2022-02-23 12:34:08 +01:00
Andrey Antukh
496ba433e9 📎 Fix linter issues 2022-02-23 12:16:51 +01:00
Andrey Antukh
0b0ae756a3 🐛 Minor fix on audit http handler 2022-02-23 11:59:17 +01:00
Andrey Antukh
0ade0405f5 🐛 Fix feedback and audit-log http handlers 2022-02-23 11:49:25 +01:00
Andrey Antukh
aeed535f1b Minor improvement on reference handling on touched-gc task 2022-02-23 09:13:48 +01:00
Andrey Antukh
974084a9ca 🐛 Add missing executor dependency to auth handlers 2022-02-23 09:13:48 +01:00
Alejandro Alonso
88706534c2 🐛 Fixing fil typo 2022-02-23 08:33:03 +01:00
Eva
70def21153 ♻️ Improve file menu usage 2022-02-22 13:36:01 +01:00
Andrés Moya
46bfb2aacd 🐛 Fixed alignment of layers with children 2022-02-22 13:10:59 +01:00
Andrey Antukh
7cf27ac86d ♻️ Refactor general resource and concurrency model on backend 2022-02-22 13:05:41 +01:00
alonso.torres
d24f16563f Use remove to delete guides 2022-02-21 17:30:08 +01:00
Eva Marco
bb68838fa4 Merge pull request #1620 from penpot/fix_double_click
🐛 Fix problem with double click
2022-02-21 17:27:46 +01:00
alonso.torres
aed6a8a5ff 🐛 Fix problem with double click 2022-02-21 16:57:35 +01:00
Andrey Antukh
96facc5100 ♻️ Refactor invitation flow
Enfoces security and make the flow more deterministic.
2022-02-21 11:38:28 +01:00
Andrey Antukh
6486b24c8b ⬆️ Update shadow-cljs version 2022-02-17 11:15:19 +01:00
Pablo Alba
75a8f85ebb Do not show the templates modal on onboarding 2022-02-16 21:34:47 +01:00
Andrés Moya
3d8f757712 🐛 Fixed cannot align objects inside a group but not inside a frame 2022-02-16 17:07:28 +01:00
Alejandro Alonso
4efd8b7d3f 🐛 Select All (CTRL+A) fails 2022-02-16 16:24:00 +01:00
Andrés Moya
5d17933593 🐛 Fix touched component marker appearing when it's not needed 2022-02-16 16:23:31 +01:00
Andrey Antukh
206778021f 📎 Update changes.md file 2022-02-16 14:00:25 +01:00
Andrey Antukh
4a262de550 Merge branch 'niwinz-storage-transactionality-refactor' into staging 2022-02-16 13:58:36 +01:00
Andrey Antukh
350663b7ce 🎉 Add support for alternative S3 compatible services
And also add support for all AWS regions (prevoiosly onlu eu-central-1)
was supported.
2022-02-16 13:58:19 +01:00
Andrey Antukh
f1db0fea03 ♻️ Refactor storage transaction management 2022-02-16 13:58:15 +01:00
Andrey Antukh
256ed7410f Add unique id (uuid) on each log entry 2022-02-16 11:58:43 +01:00
Andrey Antukh
09a4cb30ec 🐛 Fix unresolved symbol error introduced in prev merge 2022-02-16 11:29:30 +01:00
Andrey Antukh
aa3826c389 📎 Sort translations 2022-02-16 11:26:13 +01:00
Andrey Antukh
b91042c1e5 Merge remote-tracking branch 'weblate/develop' into translations 2022-02-16 11:24:56 +01:00
Andrey Antukh
7eed8c5ee5 Merge remote-tracking branch 'origin/main' into develop 2022-02-16 11:23:26 +01:00
Andrey Antukh
3207860374 🐛 Fix compatibility issues of some requires and shadow-cljs 2022-02-15 16:01:46 +01:00
Keunes
b3bb8b6692 📎 Update bug_report.md file
Make clearer what information should be provided when filing a bug report.
2022-02-15 15:54:59 +01:00
Andrey Antukh
5b8b13c94c ⬆️ Update shadow-cljs to 2.17.2 2022-02-15 15:07:29 +01:00
Andrey Antukh
e8426006e3 Update version.txt file 2022-02-15 13:27:08 +01:00
Andrey Antukh
116fafd0e1 📎 Minor log param naming change 2022-02-15 13:25:46 +01:00
Andrey Antukh
e9fe1800e0 Fix minor issues on session expiration handling 2022-02-15 13:25:06 +01:00
Andrey Antukh
82796822d1 🐛 Fix possible race condition on component rename and deletion 2022-02-15 12:26:36 +01:00
Andrey Antukh
ce61b783fb Minor improvements on telemetry task 2022-02-15 12:26:36 +01:00
Andrey Antukh
9b78b2a432 Improve error reporting on background tasks 2022-02-15 12:26:36 +01:00
Andrey Antukh
321b2c7c23 🐛 Fix error handling on s3 delete-in-bulk operation 2022-02-15 12:26:36 +01:00
Andrey Antukh
dee397615c 📎 Update changelog file 2022-02-15 12:26:36 +01:00
Andrey Antukh
ef9339f6f1 🐛 Fix unexpected exception on handling empty state on boolean calc 2022-02-15 12:26:36 +01:00
Alejandro
f7f32408fc Merge pull request #1577 from penpot/fix/radial-gradients
 Changed radial gradients to use objectBoundingBox
2022-02-14 12:26:43 +01:00
Andrey Antukh
d4e6992442 Merge remote-tracking branch 'origin/main' into develop 2022-02-12 17:36:19 +01:00
Andrey Antukh
420ece7005 📎 Increase *print-level* on error reporting. 2022-02-12 17:35:29 +01:00
Andrey Antukh
741d2b3f3c Merge remote-tracking branch 'origin/main' into develop 2022-02-12 17:33:28 +01:00
Andrey Antukh
c8bf319b39 Merge pull request #1567 from penpot/frame-snapshot-api
 Frame snapshot api
2022-02-12 16:09:03 +01:00
Pablo Alba
34df52be5f 🎉 Add frame thumbnail API 2022-02-12 16:08:46 +01:00
Pablo Alba
fc2399a885 Rotation to snap to 15º intervals with shift 2022-02-11 12:42:43 +01:00
alonso.torres
699ec93ca4 Changed radial gradients to use objectBoundingBox 2022-02-11 12:33:13 +01:00
Andrés Moya
10598063d1 🔧 Provisional change menu to staging landing page 2022-02-11 12:32:57 +01:00
Eva Marco
db1e9574cd Merge pull request #1568 from penpot/fix/gradient-problem
🐛 Fix problem with gradient handlers
2022-02-11 11:27:01 +01:00
Andrés Moya
af74a1575b 🐛 Clear authentication cookies when logged out 2022-02-11 10:07:03 +01:00
Eva
03242e1a9c 🐛 Fix ungroup typography when editing 2022-02-10 16:20:13 +01:00
Andrey Antukh
dcbd89ff7c Increase default max connection pool size to 60. 2022-02-10 15:12:35 +01:00
Andrey Antukh
2312561041 Temporaly disable parallel uploading of files on import 2022-02-10 15:12:35 +01:00
Andrey Antukh
b591fbecf0 🎉 Add health check api endpoint 2022-02-10 15:12:35 +01:00
Andrey Antukh
3fbb440436 Handle EOF on websocket write/ping operations 2022-02-10 15:12:35 +01:00
Andrey Antukh
d358185a04 💄 Minor cosmetic change on database logger processor 2022-02-10 15:12:35 +01:00
Andrey Antukh
8babb59f75 Process audit log events only if profile-id is known 2022-02-10 15:12:35 +01:00
Andrey Antukh
3461ec2281 Ignore EOF errors on writting streamed response 2022-02-10 15:12:35 +01:00
Andrey Antukh
3dd94bd362 🐛 Log correct deleted number value on recheck task 2022-02-10 15:12:35 +01:00
Andrey Antukh
827c2140b7 ♻️ Refactor error reporting and logging context formatting
The prev approach uses clojure.pprint without any limit extensivelly
for format error context data and all this is done on the calling
thread. The clojure.pprint seems very inneficient in cpu and memory
usage on pprinting large data structures.

This is improved in the following way:

- All formatting and pretty printing is moved to logging thread,
  reducing unnecesary blocking and load on jetty http threads.
- Replace the clojure.pprint with fipp.edn that looks considerably
  faster than the first one.
- Add some safe limits on pretty printer for strip printing some
  data when the data structure is very large, very deep or both.
2022-02-10 15:12:35 +01:00
Andrés Moya
5a5222a97a 🐛 Fix error getting file library 2022-02-10 13:17:57 +01:00
Andrés Moya
bea3699451 🐛 Fix error instantiating a component 2022-02-10 12:27:44 +01:00
alonso.torres
93174f54a3 Change menu to add show/hide ui 2022-02-10 09:41:50 +01:00
Eva
e1348725c1 🐛 fix error when posting an empty comment 2022-02-10 09:28:05 +01:00
Andrey Antukh
528839cde2 Merge pull request #1569 from penpot/dashboard-user-menu
Dashboard user menu and session cookie
2022-02-09 23:51:14 +01:00
Andrés Moya
c5c331ee30 Refactor user menu in dashboard 2022-02-09 15:52:04 +01:00
Eva Marco
69effa37a3 Merge pull request #1570 from penpot/fix/problem-with-typographies
🐛 Fix problem with typographies in assets
2022-02-09 15:48:34 +01:00
alonso.torres
4c7a781228 🐛 Fix problem with typographies in assets 2022-02-09 15:26:45 +01:00
Andrés Moya
62a67bdb94 🎉 Set a domain cookie to check for logged from landing page 2022-02-09 15:25:40 +01:00
alonso.torres
c5c0b36f28 Improved mouse collision detection for groups and text shapes 2022-02-09 15:17:59 +01:00
Andrés Moya
0d48c758df 📚 Add new contributor change 2022-02-09 15:16:19 +01:00
Andrés Moya
4856413b24 Merge branch 'rhcarvalho-zopflipng' into develop 2022-02-09 15:13:53 +01:00
Rodolfo Carvalho
a1586280a9 Compress PNG images using zopflipng
Add a helper script and compress existing PNG images with zopflipng.

Before
552K    total

After
428K    total

Signed-off-by: Rodolfo Carvalho
2022-02-09 15:11:46 +01:00
Andrés Moya
00950b2c97 📚 Add new contributor change 2022-02-09 15:07:05 +01:00
Andrés Moya
79666bd51a Merge branch 'rhcarvalho-remove-dangling-png' into develop 2022-02-09 14:48:07 +01:00
Rodolfo Carvalho
ca284a86a3 Remove dangling images
Clean up images that are no longer in use.

Removed in 50eb744c3b:
- frontend/resources/images/color-bar-library.png
- frontend/resources/images/color-bar-options.png

Removed in 0de4f9074d:
- frontend/resources/images/color-gamma.png

Removed in 196b4dd89b:
- frontend/resources/images/colorspecrum-400x300.png

Added in 35c172a06b but maybe never used:
- frontend/resources/images/favicon-preview.png

Removed in d93fa72e48:
- frontend/resources/images/pot.png
2022-02-09 13:55:19 +01:00
alonso.torres
ee5b341d0e 🐛 Fix problem with gradient handlers 2022-02-09 13:04:16 +01:00
Alejandro
85cab5031d Merge pull request #1564 from penpot/fix/missing_translation
🐛 Fixed missing translation texts
2022-02-09 11:26:35 +01:00
Eva
2f7029516b 🐛 Fixed missing translation texts 2022-02-09 11:14:24 +01:00
Andrey Antukh
a1da4d4233 ♻️ Refactor common.page.helpers namespace. 2022-02-08 15:30:13 +01:00
Andrey Antukh
24724e3340 📎 Add helpful require on user ns 2022-02-08 15:30:13 +01:00
Eva
048ab9a0fc 🐛 fix missing translace string 2022-02-08 15:17:40 +01:00
Eva
40b005f46e 🐛 fix color palette overflow 2022-02-08 15:11:06 +01:00
Alejandro
ae2a99acb0 Merge pull request #1558 from penpot/fix/problem-svg-import
🐛 Fix problem with svg icons
2022-02-08 12:49:52 +01:00
alonso.torres
a81b6db093 🐛 Fix problem with svg icons 2022-02-08 12:30:52 +01:00
alonso.torres
39b05f5f9f 🐛 Fix problem with selection rect 2022-02-08 12:11:56 +01:00
Andrey Antukh
979f61df99 Merge remote-tracking branch 'origin/main' into develop 2022-02-08 09:12:13 +01:00
Andrey Antukh
e665f4e285 🐛 Log correct deleted number value on recheck task 2022-02-08 00:18:48 +01:00
Andrey Antukh
2c25dfcf1b 📎 Add exec perms to build script 2022-02-07 23:42:26 +01:00
Andrey Antukh
0632028579 📎 Set version to 1.11.1-beta 2022-02-07 23:26:21 +01:00
Andrey Antukh
95b9085258 Merge pull request #1555 from penpot/fix/thumbnails_firefox_problem
🐛 Fix Firefox problem when rendering frames
2022-02-07 18:03:33 +01:00
alonso.torres
cdc91feb28 🐛 Fix Firefox problem when rendering frames 2022-02-07 17:48:51 +01:00
alonso.torres
4caf278da5 🐛 Fix problems with handoff layout 2022-02-07 16:34:31 +01:00
Andrey Antukh
809a3420c1 Merge pull request #1554 from penpot/feat/tablet-improvements
Tablet improvements
2022-02-07 15:42:55 +01:00
alonso.torres
af8e9058a3 Move selection with space 2022-02-07 15:32:27 +01:00
alonso.torres
2b1c8cafe9 Improved color picker 2022-02-07 15:18:30 +01:00
alonso.torres
1abcd5819b Enter in dashboard to open files 2022-02-07 15:18:30 +01:00
alonso.torres
76b34bb600 Workspace interactions improvements 2022-02-07 15:18:30 +01:00
alonso.torres
67c6a042a0 Improved incremental selection 2022-02-07 15:18:30 +01:00
alonso.torres
72c2a213b4 Curve tool improvements 2022-02-07 15:18:30 +01:00
alonso.torres
ec1cc8ec64 Adds new shortcut for zoom in 2022-02-07 15:18:30 +01:00
alonso.torres
fbbb079599 ♻️ Remove rx/first calls and replaced by safer rx/take 1 2022-02-07 15:18:30 +01:00
Eva
b8f2f3e34d Show recent fonts only on text edition area not in typographies 2022-02-07 15:06:05 +01:00
Alejandro
39b29ee3f0 Merge pull request #1552 from penpot/fix/shadow_type_text
🐛 Fix shadow type text in handoff section
2022-02-07 13:15:46 +01:00
Eva
5f6cb1e0d7 🐛 Fix shadow type text in handoff section 2022-02-07 13:04:52 +01:00
Andrey Antukh
46250e6fab ⬆️ Update nodejs version on docker images. 2022-02-07 11:40:53 +01:00
Alejandro Alonso
fc2a26f249 🎉 Add border radius support to image shapes 2022-02-07 11:33:23 +01:00
Andrey Antukh
341caa3489 🎉 Add docker images auxiliar build script. 2022-02-07 11:21:54 +01:00
Eva
38b7474f0b Add a little improvent in recent fonts selector 2022-02-07 09:34:22 +01:00
Andrey Antukh
c91e2d13c0 📎 Add temporal workaround on config.env file 2022-02-06 23:40:04 +01:00
Pablo Alba
7134bbf484 Disallow using same password as user email 2022-02-04 17:41:01 +01:00
Andrey Antukh
6b18b258a4 🐛 Set proper default http server host. 2022-02-04 16:02:51 +01:00
Eva
86e4826e48 Add configurable nudge amount 2022-02-04 15:15:48 +01:00
Andrey Antukh
6461ebe2b8 🔥 Remove unreachable code. 2022-02-04 15:04:47 +01:00
Andrey Antukh
bfb23ad60b ⬆️ Update backend and frontend clojure deps 2022-02-04 15:04:47 +01:00
Andrey Antukh
637d6a0076 ⬆️ Update common module deps 2022-02-04 15:04:47 +01:00
Andrey Antukh
cbb8d13570 ⬆️ Update frontend npm dependencies 2022-02-04 15:04:47 +01:00
Andrey Antukh
2a6ba79e9a Ignore EOF errors on writting streamed response 2022-02-04 15:04:47 +01:00
Andrey Antukh
1e0dacfe9b Add reusable helper for expound pretty printing 2022-02-04 15:04:47 +01:00
Andrey Antukh
b194c0c5d8 Merge pull request #1534 from penpot/feat/toolbars-redesign
Toolbars Redesign
2022-02-04 09:26:22 +01:00
alonso.torres
9789b7081a Post-review changes 2022-02-03 18:27:12 +01:00
alonso.torres
03052ddd28 Fixed hover on sidebar 2022-02-03 18:27:12 +01:00
alonso.torres
779f685f72 Update strings for the new tabs 2022-02-03 18:27:12 +01:00
alonso.torres
1dee767762 Selection area on rules 2022-02-03 18:27:12 +01:00
alonso.torres
5cac5eb26b New text typographies palette 2022-02-03 18:27:12 +01:00
alonso.torres
b26cbeccca Resizable color palette 2022-02-03 18:27:12 +01:00
alonso.torres
8d4612c683 🐛 Fix some problems with scroll into view for layers 2022-02-03 18:27:12 +01:00
alonso.torres
e352c70013 Move layers and assets to tabs 2022-02-03 18:27:12 +01:00
alonso.torres
8c3c9a8ca4 Refactor workspace header 2022-02-03 18:27:12 +01:00
alonso.torres
ada837f7e4 New rules styles, resize pages 2022-02-03 18:27:12 +01:00
alonso.torres
1599b2644a Resizeable panels 2022-02-03 18:27:12 +01:00
Alejandro Alonso
acc3d00fd5 🎉 Add stroke properties to image shape 2022-02-03 17:23:26 +01:00
Alejandro Alonso
0f459ede50 🐛 Fix issue in viewport-scrollbars 2022-02-03 13:24:51 +01:00
Pablo Alba
105cb6fa13 Enhance the behaviour of the artboards list on view mode 2022-02-03 11:52:04 +01:00
Pablo Alba
1797c702a7 Automatically open comments from dashboard notifications 2022-02-03 11:38:30 +01:00
Pablo Alba
5f580f10ca On user settings, hide the theme selector as long as we only have one theme 2022-02-03 11:26:45 +01:00
Andrey Antukh
bd359f42f5 📎 Add package-lock.json to .gitignore file 2022-02-02 19:17:51 +01:00
Andrey Antukh
34bf73210e 🔥 Remove package-lock.json file. 2022-02-02 19:14:12 +01:00
Andrey Antukh
f1db4aae35 Merge branch 'main' into develop 2022-02-02 16:23:11 +01:00
Andrey Antukh
7710ffcbf1 🐛 Fix issue on 400 error handler. 2022-02-02 15:31:54 +01:00
Andrey Antukh
e9f45a0d0a 🐛 Fix release modal. 2022-02-02 15:02:47 +01:00
Andrey Antukh
743c2c3385 Merge branch 'staging' 2022-02-02 14:29:30 +01:00
Andrey Antukh
6f714facf9 🐛 Fix many minor issues on telemetry task 2022-02-01 17:49:18 +01:00
Andrey Antukh
5f81c7bc2d Merge remote-tracking branch 'origin/staging' into develop 2022-02-01 16:14:52 +01:00
Pablo Alba
72b00fa9af On team settings set color of members count to black 2022-02-01 15:35:51 +01:00
Andrés Moya
449756a0e4 🐛 Fix ungroup a component leaves asterisk in layers 2022-02-01 15:32:50 +01:00
Andrey Antukh
75930a0ce9 📚 Minor changes on commit guidelines on CONTRIBUTING.md file 2022-02-01 14:25:50 +01:00
Eva
a2c3b0926b Add recent used fonts in font selection widget 2022-02-01 14:11:54 +01:00
Andrey Antukh
57666e9173 Minor improvements on http reporting on 400 responses 2022-02-01 13:53:10 +01:00
alonso.torres
37f4b83d96 🐛 Fix problem with hover shapes 2022-02-01 13:09:51 +01:00
elhombretecla
5576b7568c 🎉 Add new content for release dialog. 2022-02-01 13:03:02 +01:00
Eva Marco
99e067b863 Merge pull request #1523 from penpot/test-e2e-enter-dashboard
👷 e2e tests for dashboard
2022-02-01 12:47:29 +01:00
Pablo Alba
5103624fe0 👷 e2e tests for dashboard
Including test for signing/singup, projects, files, teams, and misc
2022-02-01 11:50:33 +01:00
Andrey Antukh
26e5d57ced 🐛 Fix incorrect alias on shape-attrs spec on workspace. 2022-01-28 16:19:30 +01:00
Andrey Antukh
b586f2552c Merge branch 'staging' into develop 2022-01-28 13:58:22 +01:00
Andrey Antukh
0fbcec667c 📎 Minor format change on changelog file. 2022-01-28 13:57:11 +01:00
Eva
f40c58c64a 💄 Remove dots at the end of each line in changes file in actual sprint 2022-01-28 11:40:22 +01:00
Eva
d66619fe6d 💄 Remove dots at the end of each line in changes file 2022-01-28 11:36:47 +01:00
Eva
5c1b007c1b Align item to it's parent 2022-01-28 10:54:31 +01:00
Pablo Alba
86c394f4ce Merge pull request #1514 from penpot/enhacement/add-profile-e2e-tests
👷 Add e2e test to profile area
2022-01-28 10:32:49 +01:00
Andrés Moya
90d130a3bc 📚 Remove unneeded section in changelog 2022-01-28 10:21:36 +01:00
Eva
f185836fd4 👷 Add e2e test to profile area 2022-01-28 10:20:48 +01:00
Andrey Antukh
4c851856ff Emit warning when an error is raised on formating body. 2022-01-27 17:40:03 +01:00
Andrey Antukh
bc2a0432b9 Allow connect to read-only databases. 2022-01-27 16:11:32 +01:00
Alejandro Alonso
f72e140327 Graphic tablet use improvements: add scroll bars 2022-01-27 16:02:40 +01:00
Andrey Antukh
a633ed3c9a More tweaks on the error reporter. 2022-01-27 15:17:44 +01:00
Andrey Antukh
a8a6882708 💄 Minor changes on repl script. 2022-01-27 15:00:42 +01:00
Andrés Moya
1b76ed97e1 🐛 Fix rotation when set to 0 again 2022-01-27 14:57:26 +01:00
Andrey Antukh
04f7169aef ♻️ Refactor and modularize all specs. 2022-01-27 13:03:44 +01:00
Andrés Moya
d83b362c9f 🐛 Fix "move to" menu when duplicated team or project names 2022-01-27 11:39:18 +01:00
Andrey Antukh
b1d55348dc Merge remote-tracking branch 'origin/staging' into develop 2022-01-26 18:13:48 +01:00
Andrey Antukh
f8a46c56e9 🎉 Add helper for offline validate files with specs. 2022-01-26 18:12:17 +01:00
Andrey Antukh
420525cdf0 🐛 Make the path command params optional. 2022-01-26 18:11:20 +01:00
Andrey Antukh
686cacd5ae Add truncate function to time ns on backend. 2022-01-26 18:10:47 +01:00
Andrey Antukh
0092806dda Prevent high cpu usage on reporting big errors. 2022-01-26 18:09:59 +01:00
Andrey Antukh
2f8c63505f 💄 Fix linter issues. 2022-01-26 14:45:22 +01:00
Andrey Antukh
d892be4971 💄 Fix linter issues. 2022-01-26 14:44:01 +01:00
Andrey Antukh
59ed833abc Merge remote-tracking branch 'origin/staging' into develop 2022-01-26 14:24:34 +01:00
Andrey Antukh
110fb2e8db Minor improvements on error reporting.
Add missing expound.
2022-01-26 14:18:44 +01:00
Andrey Antukh
9f7a04e330 🐛 Fix unexpected exception on handling export data validation. 2022-01-26 14:08:54 +01:00
Andrey Antukh
ccbc519c04 💄 Minor cosmetic changes on internal spec naming. 2022-01-26 12:59:26 +01:00
Eva
036860b91b 🐛 fix typo in zoom options 2022-01-26 12:59:02 +01:00
Eva
7ac2a55315 🐛 Fix header z-index in viewer mode fullscreen 2022-01-26 12:58:27 +01:00
Andrey Antukh
f6cf8d2b1b 🐛 Relax text shape content spec validation.
Allow to be null in some circumstances.
2022-01-26 12:56:42 +01:00
Andrey Antukh
16788d7ab7 🐛 Make a path command params property nilable on spec. 2022-01-26 12:41:54 +01:00
Andrey Antukh
3142d48f3c 💄 Minor cosmetic change on changelog file. 2022-01-26 12:19:10 +01:00
Andrey Antukh
e1a88ae899 Merge branch 'staging' into develop 2022-01-26 12:16:50 +01:00
Andrey Antukh
a2e80cee47 📚 Update changelog file. 2022-01-26 12:09:27 +01:00
alonso.torres
5f14769abc 🐛 Fix problem with hover-ids 2022-01-26 11:49:01 +01:00
Eva
406c4063de Add select layer to contest menu 2022-01-26 11:49:01 +01:00
Andrey Antukh
b4bc30e56f Improve shape specs and add missing specs for content. 2022-01-26 11:30:50 +01:00
Eva
3482d6c303 Add Update component in bulk option 2022-01-26 10:53:31 +01:00
Andrés Moya
9dfd5c0bcc 🐛 Avoid empty names in projects, files and pages 2022-01-26 09:31:55 +01:00
Eva
b2b3de2782 🐛 fix typo in zoom options 2022-01-26 09:30:10 +01:00
Eva
50c20e2290 🐛 Fix header z-index in viewer mode fullscreen 2022-01-26 09:30:10 +01:00
Andrey Antukh
a10dcbd918 Merge pull request #1508 from penpot/feat/guides
Guides
2022-01-25 14:58:36 +01:00
alonso.torres
6e0433a34b Review changes 2022-01-25 14:54:13 +01:00
alonso.torres
8833e19c7f 🐛 Small fixes for guides 2022-01-25 14:17:13 +01:00
alonso.torres
663358bdae 📚 Update changelog 2022-01-25 14:17:13 +01:00
alonso.torres
d9b1c0e2e6 More tests for snap data 2022-01-25 14:17:13 +01:00
alonso.torres
39334b81ac Guides cursors 2022-01-25 14:17:13 +01:00
alonso.torres
62f7323acf Move frames with guides move the guides 2022-01-25 14:17:13 +01:00
alonso.torres
3f89baa1fe Move guides together with frames 2022-01-25 14:17:13 +01:00
alonso.torres
f0fd1bb40c Add menu option for guides 2022-01-25 14:17:13 +01:00
alonso.torres
f303d7b33e Add support to export/import guides 2022-01-25 14:17:13 +01:00
alonso.torres
d356a3fa56 Spec definition for guides 2022-01-25 14:17:13 +01:00
alonso.torres
64e7cad292 ♻️ Redone the snap calculation and added guides 2022-01-25 14:17:13 +01:00
alonso.torres
0766938f98 Add guides UI 2022-01-25 14:17:13 +01:00
alonso.torres
918829ad0a Improve import with parallel media upload 2022-01-25 11:30:32 +01:00
Pablo Alba
540e1fc492 🐛 Fix missing entry of e2e fixtures on gitignore 2022-01-25 11:11:51 +01:00
alonso.torres
ac30754a96 🐛 Fix problem with import 2022-01-25 10:28:04 +01:00
Andrey Antukh
b470a0ebbf 🐛 Add missing dependency update (lost in some merge). 2022-01-24 22:22:43 +01:00
Andrey Antukh
69daee4137 Merge branch 'staging' into develop 2022-01-24 16:21:01 +01:00
Andrey Antukh
3d6c903273 Improve path rendering performance. 2022-01-24 16:14:28 +01:00
Andrey Antukh
bc04a0b9f0 🐛 Fix incorrect behavior of trim-file-data. 2022-01-24 16:08:52 +01:00
Andrey Antukh
bfef94dbfb Merge branch 'main' into staging. 2022-01-24 16:07:47 +01:00
Andrey Antukh
9e06275945 🐛 Prevent exception on broken path. 2022-01-24 15:41:44 +01:00
Andrey Antukh
6410bcf3c8 Minor change on debug endpoint. 2022-01-24 15:13:02 +01:00
Andrés Moya
20baf02726 🐛 Normalize zoom levels in workspace and viewer 2022-01-24 13:30:11 +01:00
Andrey Antukh
8f6fdf361b Improve path rendering performance. 2022-01-24 13:23:09 +01:00
Andrey Antukh
ffa134f824 🐛 Fix incorrect behavior of trim-file-data. 2022-01-24 13:23:09 +01:00
Andrés Moya
b4bf6b9235 🐛 Fix zoom in/out after fit or fill in viewer 2022-01-24 11:04:01 +01:00
Andrés Moya
c3e37b0e04 🐛 Fix auto hide header in viewer full screen 2022-01-24 11:04:01 +01:00
Andrés Moya
374bba763b 🐛 Fix edit blur attributes for multiselection 2022-01-24 11:04:01 +01:00
Pablo Alba
2d00e68b78 👷 Tests e2e for drawing basic forms 2022-01-24 10:56:56 +01:00
Andrey Antukh
9a965dc693 Merge remote-tracking branch 'origin/staging' into develop 2022-01-21 14:54:32 +01:00
Andrey Antukh
b96ad5b37f 💄 Minor cosmetic change on get-parents fn. 2022-01-21 14:47:13 +01:00
Andrey Antukh
07a0f67b32 💄 Minor cosmetic change on reg-object. 2022-01-21 14:47:13 +01:00
Andrey Antukh
c754a757eb Upgrade rumext and add some examples of syntax sugar. 2022-01-21 14:47:13 +01:00
Andrey Antukh
dcd53183a8 📎 Simplify distribute-objects fn impl. 2022-01-21 14:47:13 +01:00
Andrés Moya
5641132eb9 Reload viewer and reset starting frame from workspace 2022-01-21 14:42:11 +01:00
Andrés Moya
b4c23f3554 🐛 Display animations only for allowed actions 2022-01-21 14:41:21 +01:00
Andrés Moya
7385445aa8 💄 Format translation files and remove unneeded script 2022-01-21 14:40:37 +01:00
Eva
5409f83167 Divide file menu options in semantically groups 2022-01-21 12:36:09 +01:00
Voxybuns
43951aad69 🌐 Add translations for: French.
Currently translated at 79.9% (694 of 868 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/fr/
2022-01-20 21:55:48 +01:00
Rubén
9681d8c805 🌐 Add translations for: Catalan.
Currently translated at 98.8% (858 of 868 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/ca/
2022-01-20 21:55:48 +01:00
Andrey Antukh
ff4d3cfeac 🐛 Fix issue on fressian blob encoding. 2022-01-20 16:57:20 +01:00
Andrey Antukh
8e4338c1c9 🐛 Minor fix on version parsing impl. 2022-01-20 14:47:28 +01:00
Andrey Antukh
c27d709b6b Merge remote-tracking branch 'origin/staging' into develop 2022-01-20 14:30:16 +01:00
Andrey Antukh
8caa289586 Fix version logging on exporter. 2022-01-20 14:27:03 +01:00
Andrey Antukh
f7568f6348 Minor improvements on exporter. 2022-01-20 14:16:58 +01:00
Pablo Alba
6a6f079a84 👷 Create firsts e2e tests 2022-01-20 14:10:48 +01:00
Andrey Antukh
0f04b86316 Improve performance on import .penpot files. 2022-01-20 11:47:17 +01:00
Andrey Antukh
1dae8a0771 📎 Minor improvement on error logging on worker. 2022-01-20 11:47:17 +01:00
Andrey Antukh
9bc816fc1c 🐛 Remove duplicate audit action reporting. 2022-01-20 11:47:17 +01:00
Andrey Antukh
11ea4c7aec 🐛 Fix raw logging on cljs. 2022-01-20 11:47:17 +01:00
Andrey Antukh
0c53aa158b 🐛 Fix profile image generation issue. 2022-01-20 11:47:17 +01:00
Andrey Antukh
072e4a4f98 Revert some memoizes on page/helpers.
And improves base performance of get-children and
remove duplicated code. Also optimize the use
of get-children on react components with corresponding
use-memo hook.
2022-01-20 11:47:17 +01:00
Andrey Antukh
1b3b3b0ee6 Minor naming change on page query parameters. 2022-01-20 11:47:17 +01:00
Andrey Antukh
d1e4f0de3e Improve performance and resolve render issues on exporter. 2022-01-20 11:47:17 +01:00
Andrey Antukh
fd3f304e07 📎 Increase default devenv jvm heapsize. 2022-01-20 11:47:17 +01:00
alonso.torres
9e7551551f 🐛 Fix problem with SVG's import/export 2022-01-19 16:07:44 +01:00
Andrés Moya
36bb5cbe01 🐛 Fix several questions about frame background export 2022-01-19 11:01:23 +01:00
Alejandro Alonso
f754c12e8c Limit pasted object position to container boundaries 2022-01-18 17:07:46 +01:00
Andrey Antukh
6f5916e334 ♻️ Minor reorganization on export & render namespaces. 2022-01-18 16:48:17 +01:00
Andrés Moya
13dd1cb6b6 🐛 Disable embed images in export 2022-01-18 16:48:17 +01:00
Andrey Antukh
eb4e7e0f0c 🐛 Fix dashboard grid thumbnails cache invalidation. 2022-01-18 16:48:17 +01:00
Andrey Antukh
7afb3e2c6d Stream transit encoding to the response output-stream.
Instead of in-memmory encoding. This will prevent many OOM errors.
2022-01-18 16:48:17 +01:00
Andrey Antukh
9cf5258053 Improve logging on worker and import process. 2022-01-18 16:48:17 +01:00
Andrey Antukh
56dfdaecb7 💄 Add cosmetic improvements on project_menu component. 2022-01-18 16:48:17 +01:00
Andrey Antukh
1d174a4379 🐛 Fix unexpected exception on time equiv impl. 2022-01-18 16:48:17 +01:00
Andrés Moya
2aeded1940 🐛 Show view mode buttons correctly centered in viewer 2022-01-18 13:26:09 +01:00
Andrés Moya
c23691284c 🐛 Show correctly group types label in handoff 2022-01-18 13:26:09 +01:00
Andrey Antukh
f7f6515561 ⬆️ Update exporter dependencies. 2022-01-18 11:25:06 +01:00
Andrey Antukh
438c14d29d ⬆️ Update exporter dependencies. 2022-01-18 10:58:45 +01:00
Andrés Moya
87351000ae 🐛 Avoid marking component as touched when moving into a group 2022-01-18 09:39:02 +01:00
Pablo Alba
0895a69bac Add an option to hide artboards names on the viewport 2022-01-18 09:38:03 +01:00
Eva
4285972e41 Add new zoom options in workspace and viewer mode 2022-01-17 17:18:12 +01:00
Pablo Alba
d33542c4dc Allow decimals on stroke width and positions 2022-01-17 15:52:32 +01:00
Andrey Antukh
bda97adf4f Fix minor issues on error reporting. 2022-01-17 13:09:15 +01:00
Andrey Antukh
b6f460940f ⬆️ Update dependencies. 2022-01-17 13:09:15 +01:00
Alejandro Alonso
aa0e8ed8d6 Pressing enter to exit the fields 2022-01-17 10:00:28 +01:00
Yaron Shahrabani
b99fa16b96 🌐 Add translations for: Hebrew.
Currently translated at 100.0% (868 of 868 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/he/
2022-01-15 17:53:28 +01:00
Oğuz Ersen
630d7a3220 🌐 Add translations for: Turkish.
Currently translated at 99.7% (866 of 868 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/tr/
2022-01-15 17:53:27 +01:00
Andrey Antukh
03c91664cb 🐛 Fix session invalidation issue on password change. 2022-01-14 13:44:58 +01:00
Andrey Antukh
13773d829a Merge pull request #1473 from penpot/alotor/bugfixes_fixes
Bugfixes
2022-01-14 13:33:23 +01:00
Alejandro Alonso
d9e6e9b017 Ability to ignore background when exporting an artboard 2022-01-14 13:31:28 +01:00
alonso.torres
5d8982c734 🐛 Fix transform text 2022-01-14 12:10:55 +01:00
alonso.torres
f13c82da2a 🐛 Fix tab to apply changes in inputs 2022-01-14 11:58:56 +01:00
alonso.torres
363b0ba997 🐛 Fix problems with gradient and libraries 2022-01-14 11:57:07 +01:00
Alejandro Alonso
a4c45942c9 Fixing show color hex or name on hover 2022-01-14 11:57:07 +01:00
Andrey Antukh
a86e3a8636 📎 Sort translation files. 2022-01-14 11:32:43 +01:00
Andrey Antukh
db61d579e6 Merge remote-tracking branch 'weblate/develop' into translations 2022-01-14 11:30:25 +01:00
Andrey Antukh
e6e3f2cbd5 Add debugging pages for download/upload file data. 2022-01-14 10:54:57 +01:00
Andrey Antukh
ffdd539233 Minor improvements on error reporting mechanism. 2022-01-14 10:54:57 +01:00
Andrey Antukh
ef17af38a1 🎉 Add jvm-repl script to frontend directory. 2022-01-14 10:54:57 +01:00
Andrey Antukh
6dedfaea2f 📎 Minor changes on :reg-objects impl. 2022-01-14 10:54:57 +01:00
Andrey Antukh
cbb3783d84 📎 Add performance related helpers. 2022-01-14 10:54:57 +01:00
Eva
327c095d79 add V as shortcut to exit path editor 2022-01-13 22:39:05 +01:00
Andrey Antukh
88e222420c Merge pull request #1470 from penpot/alotor/bugfixes
Bugfixes
2022-01-13 18:33:32 +01:00
alonso.torres
045eec072b 🐛 Fix import/export with SVG edge cases 2022-01-13 18:28:47 +01:00
alonso.torres
5f3c381f88 🐛 Fix thumbnail not taking frame blending mode 2022-01-13 15:56:01 +01:00
alonso.torres
6090cf6c68 🐛 Fix problem with imported svgs with filters 2022-01-13 15:15:55 +01:00
alonso.torres
9ac4239c11 🐛 Restored rules color 2022-01-13 10:09:03 +01:00
alonso.torres
da2a3b6883 🐛 Fix handoff text with opacity 2022-01-13 09:56:46 +01:00
alonso.torres
b4accaad07 🐛 Fix scroll jumps in handoff mode 2022-01-13 09:56:46 +01:00
alonso.torres
edaef0096a 🐛 Improved copy for import/export files 2022-01-13 09:56:46 +01:00
alonso.torres
afba5ff083 🐛 Fix issues when updating selrect in paths 2022-01-13 09:56:46 +01:00
alonso.torres
8b8d614150 🐛 Fixed problem with stroke 2022-01-13 09:30:21 +01:00
Alejandro Alonso
090dbfda10 Upload/dismiss all custom fonts at once 2022-01-12 20:00:24 +01:00
Alejandro Alonso
04f5a6a9f9 Show color hex or name on hover 2022-01-12 18:20:31 +01:00
Andrey Antukh
d8311ac3fa Merge pull request #1462 from penpot/adding-prettier-to-ci
 Adding prettier to ci
2022-01-12 14:25:50 +01:00
Andrey Antukh
9c7f4dfd98 Merge pull request #1452 from penpot/bugfixes
Bugfixes
2022-01-12 14:24:24 +01:00
alonso.torres
8da66e1599 🐛 Fix problem when importing a file with grids 2022-01-12 13:47:50 +01:00
alonso.torres
2927b0cfc6 🐛 Fix default page id in workspace 2022-01-12 13:30:52 +01:00
alonso.torres
4663c296cd 🐛 Fix blur input field when click on viewport 2022-01-12 13:30:52 +01:00
alonso.torres
9403f8fd6e 🐛 Fix lossing changes when changing selection and an input was already changed 2022-01-12 13:13:28 +01:00
alonso.torres
badb5c6a9b 🐛 Fix keep name of component equal to the shape name 2022-01-12 13:13:27 +01:00
alonso.torres
e5430259e9 🐛 Changing pages while comments activated will not close the panel 2022-01-12 13:12:54 +01:00
alonso.torres
50fd44d3f2 🐛 Fix division by zero in bool operation 2022-01-12 13:12:16 +01:00
Andrés Moya
a8249b73b6 🐛 Fix nav to comments in a different page 2022-01-12 13:09:11 +01:00
Andrey Antukh
a15f867059 🐛 Fix open in new tab action on dashboard. 2022-01-12 13:00:50 +01:00
Andrey Antukh
4216e2e92b Properly set host on http server. 2022-01-12 12:42:11 +01:00
Alejandro Alonso
8ef20be9bd Adding prettier to ci 2022-01-12 12:32:06 +01:00
Alejandro Alonso
6413c9dddd Apply prettier to resources styles 2022-01-12 11:49:03 +01:00
Andrey Antukh
eb10f075b9 📎 Add some excludes to uber task. 2022-01-12 11:21:25 +01:00
Andrey Antukh
cd55ed7c8d 📎 Minor improvement on css on error report template. 2022-01-12 10:55:47 +01:00
Andrey Antukh
2fb96a1b7d 📎 Add debug to ws messages. 2022-01-12 10:55:47 +01:00
Andrey Antukh
c48da3d316 ♻️ Refactor backend bundle build process.
Now the final artifact is a single, compiled uberjar.
It considerably improves startup speed.
2022-01-12 10:55:47 +01:00
Andrey Antukh
9488a9a1ad Increase default upload size on docker imates. 2022-01-12 10:55:47 +01:00
Andrey Antukh
2feb22d3bd 🐛 Fix unexpected default cookies behavior on redirectiong to penpot.
The SameSite=Strict on chrome behaves differently than in Firefox and
makes the top-level url redirect not sending cookies if the user is
redirected from other page to penpot. The SameSite=Lax fixes the issue.
2022-01-12 10:55:47 +01:00
Andrey Antukh
f74569506e ⬆️ Update devenv dockerfile. 2022-01-12 10:55:47 +01:00
Andrés Moya
6633d0b4fb Right click on frame title to open its menu 2022-01-11 16:02:50 +01:00
Andrey Antukh
6fb35b40d7 Merge pull request #1445 from penpot/add-artboard-selection
 Add artboard selection
2022-01-11 16:02:12 +01:00
Alejandro Alonso
614d699098 Add artboard selection 2022-01-11 14:03:07 +01:00
Andrés Moya
8f4fbff40f 💄 Set consistent Login label 2022-01-10 16:58:15 +01:00
Andrés Moya
aaf8d2a233 🐛 Correct animations overflow 2022-01-10 16:02:36 +01:00
Andrey Antukh
0eb2336bc6 Merge pull request #1449 from penpot/bugfixes
Bugfixes
2022-01-10 15:36:59 +01:00
Andrey Antukh
f9cc9164b3 Merge pull request #1450 from penpot/fix-interactions-header
🐛 Fix viewer header controls when navigating from workspace
2022-01-10 15:31:28 +01:00
Andrés Moya
238ec60f89 🐛 Fix viewer header controls when navigating from workspace 2022-01-10 14:10:29 +01:00
alonso.torres
363a82d068 🐛 Fix decimal numbers in export viewbox 2022-01-10 13:32:29 +01:00
alonso.torres
4360c1fe4b 🐛 Improved behaviour on text options when not text is selected 2022-01-10 13:32:29 +01:00
alonso.torres
1d575ece06 🐛 Allow import to continue from recoverable failures 2022-01-10 13:32:29 +01:00
alonso.torres
d246788a35 🐛 Fix default state in viewer 2022-01-10 13:32:29 +01:00
alonso.torres
e9fa04dd1b 🐛 Fix problem with styles in the viewer 2022-01-10 13:32:29 +01:00
alonso.torres
8e57932966 🐛 Fix problem with multiple exports 2022-01-10 13:32:29 +01:00
alonso.torres
51ea354bcb 🐛 Fix problem when resizing texts inside groups 2022-01-10 13:32:29 +01:00
alonso.torres
6334520c66 🐛 Fix dotted style in strokes 2022-01-10 13:32:29 +01:00
alonso.torres
6354883a6f 🐛 Fix line-height/letter-spacing inputs behaviour 2022-01-10 13:32:29 +01:00
alonso.torres
477f553675 🐛 Fix problem with booleans 2022-01-10 13:32:29 +01:00
Eva
1ded4b2b28 🐛 Remove gradient if any when applyin solid color from library 2022-01-10 12:33:21 +01:00
eva
16c4116c15 🐛 fix enter key as a way to exit path editing mode 2022-01-07 15:51:50 +01:00
eva
f5cfbce1c2 🐛 Fix add fill and stroke color from palette to groups and components 2022-01-07 15:51:50 +01:00
eva
7bbf98dfb1 🐛 Fix default project name in dashboard Move to option 2022-01-07 15:51:50 +01:00
eva
533cac7881 🐛 Fix text inputs to allow negative values 2022-01-07 15:51:50 +01:00
eva
6afc734e91 🐛 Fix typo in handoff tooltip 2022-01-07 15:51:50 +01:00
eva
c4fb826d89 🐛 Fix crash when pressing Shift 1 in an empty file 2022-01-07 15:51:50 +01:00
Alejandro Alonso
1321bdeac5 Add opacity shortcuts 2022-01-07 11:31:21 +01:00
Alejandro Alonso
e0b7001a09 🐛 Fix default color fill for textx 2022-01-05 11:19:25 +01:00
eva
88120b83bd change reference to issue 2022-01-03 17:29:51 +01:00
eva
a952f7369c Add move shortcut 2022-01-03 17:16:03 +01:00
eva
d4fab3b46c Add alt as mod-key to add stroke color to a shape from color in menu library 2022-01-03 16:39:40 +01:00
eva
06b3499e7d Add detach components in bulk option 2022-01-03 13:43:11 +01:00
Eva Marco
fdd66bd513 Merge pull request #1430 from penpot/bugfixes
Bugfixes
2022-01-03 10:46:22 +01:00
alonso.torres
3b5aaf21fa 🐛 Fix problem when resizing texts 2022-01-03 10:00:17 +01:00
eva
59c46833ed Add penpot look and feel to multiuser pointers 2022-01-03 09:35:46 +01:00
alonso.torres
aee35cb456 🐛 Fix lock/hide elements in context menu when multiples shapes selected 2022-01-03 09:14:58 +01:00
alonso.torres
4a55ee2965 🐛 Fix problem exporting shapes from handoff mode 2022-01-03 09:14:58 +01:00
alonso.torres
4b490e3ca4 🐛 After team onboarding importing a file will import into the team drafts 2022-01-03 09:14:58 +01:00
alonso.torres
6727717d1a 🐛 Fix problem with join nodes 2022-01-03 09:14:58 +01:00
alonso.torres
d08891cffa 🐛 Disable running frontend tests in node 2022-01-03 09:10:18 +01:00
Andrey Antukh
799a83ba73 🔥 Remove unused import. 2021-12-31 13:47:49 +01:00
Andrey Antukh
261724e555 📎 Fix common tests. 2021-12-31 13:46:13 +01:00
Andrey Antukh
10e7d660ef Merge branch 'main' into develop 2021-12-31 13:23:42 +01:00
Andrey Antukh
bdfea7cda5 📎 Update version.txt file. 2021-12-31 13:04:15 +01:00
Andrey Antukh
fdb1c5e1f9 📎 Minor changes on error report http handler. 2021-12-31 12:24:46 +01:00
alonso.torres
71734df489 Backport changes from develop. 2021-12-31 12:06:15 +01:00
Andrey Antukh
071b81eadd ⬆️ Update dependencies. 2021-12-31 00:21:38 +01:00
Andrey Antukh
2abe3fde71 Remove unused stacktrace from commit-chages event. 2021-12-31 00:02:19 +01:00
Andrey Antukh
27e64ccaa8 🔥 Remove unused code. 2021-12-30 23:53:33 +01:00
Andrey Antukh
c9185f265c Add error report list template. 2021-12-30 23:51:39 +01:00
Andrey Antukh
79e5716f36 📎 Fix linter issues. 2021-12-30 19:43:05 +01:00
Andrey Antukh
9f0e156916 Improve error reporting. 2021-12-30 19:39:32 +01:00
Andrey Antukh
d24d45f4cb Terminate connection if incoming message cant be parsed. 2021-12-30 16:28:08 +01:00
Andrey Antukh
bf55250ae9 :sparkles Minor changes on websockets error handling. 2021-12-30 16:25:50 +01:00
Andrey Antukh
36016ad9ef Store changes on file_change table as vector. 2021-12-30 16:02:06 +01:00
Andrey Antukh
bf66b81702 Move dbg error http entrypoint handler to debug ns. 2021-12-30 16:01:36 +01:00
Andrey Antukh
758ffbf217 Add authentication to dbg entry points. 2021-12-30 16:00:55 +01:00
Andrey Antukh
f24563503a Parametrice file change snapshoting. 2021-12-30 13:03:49 +01:00
alonso.torres
a2dbc40571 🐛 Fixes problem with mov-objects 2021-12-30 13:03:49 +01:00
Andrey Antukh
a096b0777f 📎 Minor changes on debug ns. 2021-12-30 13:03:28 +01:00
Andrey Antukh
87690a534c 🎉 Add missing files. 2021-12-30 11:45:44 +01:00
Andrey Antukh
a70e416b0b Add more debug handlers. 2021-12-30 11:37:09 +01:00
alonso.torres
cd1170c543 Add a debug option to apply changes 2021-12-30 11:19:46 +01:00
Andrey Antukh
2962dc1faa Merge pull request #1429 from penpot/cache-thumbnails-v2
 Cache thumbnails with browser cache
2021-12-29 13:03:40 +01:00
alonso.torres
535c1fd007 Cache thumbnails with browser cache 2021-12-29 12:59:17 +01:00
Andrey Antukh
2bd94aff0e 🐛 Fix wring metrics usage on websocket module. 2021-12-29 12:55:41 +01:00
Andrey Antukh
9ea90c3400 🐛 Fix unexpected exception on websockets. 2021-12-29 12:16:48 +01:00
alonso.torres
0ac5d85117 🐛 Rollback thumbnail cache 2021-12-29 11:40:37 +01:00
Andrey Antukh
d3a83142ae Merge pull request #1428 from penpot/performance
 Improved thumbnails handling
2021-12-29 11:33:39 +01:00
alonso.torres
d5886123d8 Improved thumbnails handling 2021-12-29 11:21:57 +01:00
Andrey Antukh
dea090e7d3 📚 Update version.txt file. 2021-12-29 11:17:55 +01:00
Andrey Antukh
ba5e345677 Merge branch 'staging' 2021-12-29 11:17:06 +01:00
Andrey Antukh
13ae7b0976 📚 Update changelog. 2021-12-29 11:16:04 +01:00
Andrey Antukh
39c7bfb49f ⬆️ Finally update the prometheus client dependency. 2021-12-29 09:52:32 +01:00
Andrey Antukh
8479a6581d Make matrix use native doubles.
Increases 300x the performance of multiply on the JVM platform.
2021-12-29 09:52:32 +01:00
Andrey Antukh
e5885e83eb Add missing type hints on Matrix multiply function. 2021-12-29 09:52:32 +01:00
Andrey Antukh
914b41fcd4 🐛 Properly handle missing log/error id on database logger. 2021-12-29 09:52:32 +01:00
Andrey Antukh
224aa5b89a 🐛 Properly handle errors on body parsing middleware. 2021-12-29 09:52:32 +01:00
Andrey Antukh
01c89f6554 🐛 Set proper return value on validation error handler. 2021-12-29 09:52:32 +01:00
Andrey Antukh
f0e1bc1d59 🔥 Remove unused code. 2021-12-29 09:52:32 +01:00
Andrey Antukh
7b487e1bc3 📎 Fix unrelated linter issues. 2021-12-29 09:52:32 +01:00
Andrey Antukh
c394495a26 ♻️ Refactor websocket layer.
This commit replaces rj9a with funcool/yetti ring adapter.
Cleans the websocket api and makes it fully asynchronous.
Also a common websocket protocol abstraction that will allow
more easy path for creating new websocket based services.
2021-12-29 09:52:32 +01:00
eva
6dae420254 Add open components, and scroll into view to show main component acction 2021-12-28 16:19:07 +01:00
Andrey Antukh
c69d7f50a3 Merge remote-tracking branch 'origin/staging' into develop 2021-12-28 13:48:16 +01:00
elhombretecla
e9c654f30d Minor enhacements on onboarding modal. 2021-12-28 11:34:21 +01:00
Andrey Antukh
ae9b95f81b Merge pull request #1424 from penpot/performance
Performance improvements
2021-12-28 11:32:55 +01:00
Andrey Antukh
c240b69b5a 📎 Minor changes on error report template. 2021-12-28 11:19:38 +01:00
alonso.torres
493a7680e0 Improve interactions and after-review fixes 2021-12-28 11:12:33 +01:00
alonso.torres
c28a2acfc7 🐛 Fixes tests 2021-12-28 09:18:33 +01:00
alonso.torres
60af960f42 Thumbnail cache on dashboard 2021-12-28 09:18:33 +01:00
alonso.torres
4c86d5cfe3 🐛 Fixes some issues with bool shapes 2021-12-28 09:18:33 +01:00
alonso.torres
99a6142134 Improves boolean performance 2021-12-28 09:18:33 +01:00
alonso.torres
b2211aec59 Change resize to use DOM transformations 2021-12-28 09:18:33 +01:00
alonso.torres
fa09fff2b5 Performance improvements 2021-12-28 09:18:33 +01:00
Andrey Antukh
0204cdab83 🐛 Revert rj9a dep update. 2021-12-28 09:15:31 +01:00
Andrey Antukh
445195e9eb ⬆️ Update dependencies. 2021-12-27 11:55:42 +01:00
Andrey Antukh
7f5b0f359c Merge remote-tracking branch 'origin/staging' into develop 2021-12-27 11:42:44 +01:00
Andrey Antukh
d8f4176487 📎 Minor fixes on versions. 2021-12-27 11:41:13 +01:00
Andrey Antukh
220ab22115 🐛 Fix error reporting hook. 2021-12-27 11:30:22 +01:00
Andrey Antukh
67776c46d6 🐛 Fix NPE on email complains checking. 2021-12-27 11:13:08 +01:00
Andrey Antukh
2d118ecc65 Merge remote-tracking branch 'origin/staging' into develop 2021-12-27 09:50:15 +01:00
Andrey Antukh
4bc2d7444d 📎 Minor changes on dev tools. 2021-12-27 09:32:20 +01:00
Andrey Antukh
5c6d72b353 Improve logging performance and format. 2021-12-24 12:40:44 +01:00
Andrey Antukh
1839397ebc Minor enhacements on log processing. 2021-12-23 18:36:58 +01:00
Andrey Antukh
0ee34637f5 💄 Improve json namespace API (and fix linter). 2021-12-23 00:06:10 +01:00
Andrey Antukh
c6054f7ab2 💄 Improve json namespace API (and fix linter). 2021-12-23 00:04:37 +01:00
Andrey Antukh
9554dfbc5e :lisptick: Cosmetic changes. 2021-12-22 19:04:32 +01:00
Andrey Antukh
98d5789b1b :lisptick: Cosmetic changes. 2021-12-22 19:04:03 +01:00
Andrey Antukh
0cad1a1e7e Merge remote-tracking branch 'origin/staging' into develop 2021-12-22 18:49:46 +01:00
Andrey Antukh
31c07274cd 📎 Increase default session expiration to 15 days. 2021-12-22 18:44:49 +01:00
Andrey Antukh
37a736339e 🔥 Remove ALPHA and BETA batges. 2021-12-22 18:41:06 +01:00
Andrey Antukh
869abcc835 🐛 Fix incorrect grid calculation when size is 1. 2021-12-22 18:38:22 +01:00
Andrey Antukh
a6f05ea8c2 💄 Minor syntax cosmetic changes. 2021-12-22 18:37:29 +01:00
Andrey Antukh
6812099900 Simplify frames selection mechanism. 2021-12-22 18:37:08 +01:00
Andrey Antukh
53e6d7ef2a 🐛 Fix numeric-input component. 2021-12-22 17:06:59 +01:00
Andrey Antukh
c2f604cd01 Properly use take-until on shape movement streams. 2021-12-22 17:06:16 +01:00
Andrey Antukh
888ffa1bcd Merge remote-tracking branch 'origin/staging' into develop 2021-12-22 16:10:24 +01:00
Andrey Antukh
d06cfed50e 🐛 Add missing import. 2021-12-22 15:01:46 +01:00
Andrey Antukh
e06d063946 📎 Remove ALPHA label from feedback button. 2021-12-22 14:59:39 +01:00
Andrey Antukh
634ec1b113 Ensure valid messages on zmq listener. 2021-12-22 14:28:09 +01:00
Andrey Antukh
0bf883d5b2 📎 More updates to logging deps. 2021-12-22 14:09:23 +01:00
Andrey Antukh
c6d0e0124f ⬆️ Update log4j2 dependency to 2.17.0 2021-12-22 11:34:07 +01:00
Andrey Antukh
ce115c53e2 📎 Minor fixes on repl script. 2021-12-22 11:33:53 +01:00
Andrey Antukh
7014bc7a3c 🐛 Fix issue when typography name is empty. 2021-12-22 11:03:11 +01:00
Andrey Antukh
219f9c478d 🎉 Add version 4 of blob encoding.
The version 4 starts using the hight performance fressian
binary encoding with very lightweight compression layer.
2021-12-21 16:19:25 +01:00
Andrey Antukh
a9904c6ada Merge pull request #1386 from penpot/animations
Animations
2021-12-21 15:47:51 +01:00
Andrés Moya
81cbc33dbb 🎉 Add animations to interactions 2021-12-21 15:46:52 +01:00
eva
24062beebe 🐛 fix minor errors 2021-12-20 16:18:33 +01:00
eva
f3548aff8c Add shortcuts to viewer btns 2021-12-20 16:18:33 +01:00
eva
771bb20976 Add shortcuts for dashboard viewer and path 2021-12-20 16:18:33 +01:00
eva
8072caeff1 Add more workspace shortcuts 2021-12-20 16:18:33 +01:00
eva
d5568fcc25 Add alignement shortcuts 2021-12-20 16:18:33 +01:00
Andrey Antukh
eb1bcfba83 🎉 Backport questions form integration.
Among other related that need to be ported.
2021-12-20 16:16:29 +01:00
Andrey Antukh
a2d3616171 📎 Update changelog. 2021-12-20 11:55:32 +01:00
Andrey Antukh
a83e37493a ⬆️ Update log4j2 dependency. 2021-12-20 11:52:32 +01:00
Andrey Antukh
0feccc9d1c ⬆️ Update log4j2 dependency. 2021-12-20 11:49:30 +01:00
Andrey Antukh
e18ecb8c49 ⬆️ Update devenv (deps). 2021-12-20 11:16:26 +01:00
Andrés Moya
f5b87a9865 📚 Add docs contributor 2021-12-19 17:56:37 +01:00
Andy Li
3b93434dd3 🌐 Add translations for: Chinese (Traditional).
Currently translated at 33.5% (283 of 843 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/zh_Hant/
2021-12-18 02:51:35 +01:00
Muhammad Insan Al-Amin
d522096caf 🌐 Add translations for: Indonesian.
Currently translated at 7.3% (62 of 843 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/id/
2021-12-18 02:51:35 +01:00
Andrey Antukh
6c67110dde 🐛 Fix middleware order that prevents multipart requests. 2021-12-10 15:06:42 +01:00
Andrey Antukh
963efc369b Merge branch 'main' into develop 2021-12-10 14:45:02 +01:00
Andrey Antukh
384f0a05c6 🐛 Fix race condition issues on workspace. 2021-12-10 12:32:10 +01:00
Andrey Antukh
a3016b8400 Make the media uploading idempotent. 2021-12-10 12:19:12 +01:00
Andrey Antukh
0df219c3ad 📎 Fix frontend tests. 2021-12-10 12:00:29 +01:00
Andrey Antukh
a0d527f795 📎 Add some minor changes to package.json scripts section. 2021-12-10 12:00:29 +01:00
Andrey Antukh
e44ea47497 🐛 Fix issue when typography name is empty. 2021-12-10 12:00:29 +01:00
Andrey Antukh
9ee5a3159c 💄 Add cosmetic changes on ungroup event. 2021-12-10 12:00:29 +01:00
Andrey Antukh
06d41c552b Simplify debuging information used on commit-changes. 2021-12-10 12:00:29 +01:00
Andrey Antukh
7874971550 🐛 Fix race condition issues on workspace. 2021-12-10 12:00:29 +01:00
Andrey Antukh
9925716134 💄 Add syntax improvements on libraries helpers. 2021-12-10 12:00:29 +01:00
Andrey Antukh
64c456678b Merge pull request #1401 from penpot/fix-destination
🐛 Fix error importing file with null destination in one interaction
2021-12-10 11:21:27 +01:00
Andrés Moya
16ed09a303 🐛 Fix error importing file with null destination in one interaction 2021-12-10 10:50:18 +01:00
Andy Li
1359a1aa7a 🌐 Add translations for: Chinese (Traditional).
Currently translated at 31.4% (265 of 843 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/zh_Hant/
2021-12-10 09:52:18 +01:00
Andy Li
6ae36982b6 🌐 Add translations for: Chinese (Traditional).
Currently translated at 30.6% (258 of 843 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/zh_Hant/
2021-12-09 05:50:27 +01:00
Maemolee
136d269605 🌐 Add translations for: Chinese (Simplified).
Currently translated at 80.6% (680 of 843 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/zh_Hans/
2021-12-09 05:50:27 +01:00
Rubén
932c0ed4ad 🌐 Add translations for: Spanish.
Currently translated at 98.5% (831 of 843 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/es/
2021-12-09 05:50:26 +01:00
Andy Li
371875440f 🌐 Add translations for: Chinese (Traditional).
Currently translated at 25.7% (217 of 843 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/zh_Hant/
2021-12-07 09:12:57 +01:00
Rubén
b01a9f2f95 🌐 Add translations for: Catalan.
Currently translated at 99.6% (840 of 843 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/ca/
2021-12-06 12:26:52 +01:00
李安峻
0d2def102f 🌐 Add translations for: Chinese (Traditional).
Currently translated at 23.4% (198 of 843 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/zh_Hant/
2021-12-04 03:52:36 +01:00
Andrey Antukh
beff3fe843 📎 Fix common tests. 2021-12-03 16:00:56 +01:00
Andrey Antukh
7a97c94f2b Merge branch 'main' into develop 2021-12-03 15:53:20 +01:00
Andrey Antukh
ce81908f02 📎 Minor changes on devenv. 2021-12-03 15:05:36 +01:00
Andrey Antukh
f8cecfd61f 🐛 Fix unexpected behavior of grid options on right sidebar. 2021-12-03 14:52:40 +01:00
Andrey Antukh
8a2a1d6d70 ♻️ Ensure a correct usage of concat/into operations. 2021-12-03 14:52:40 +01:00
Andrey Antukh
76dafea8a6 Add the abilty to enable verbose output using query param (api). 2021-12-03 11:13:08 +01:00
Andrey Antukh
86bbfde19e 📎 More fixes on ci config. 2021-12-03 11:09:01 +01:00
Andrey Antukh
71d6f7b1a2 📎 Fix linter issues. 2021-12-03 09:43:02 +01:00
Andrey Antukh
0c0ab612c0 📎 Minor fixes to previous commits. 2021-12-03 09:36:39 +01:00
Andrey Antukh
73042115e0 🎉 Add benchmark helper function (cljs only). 2021-12-03 09:30:33 +01:00
Andrey Antukh
0f7166d34a 📎 More fixes on CI. 2021-12-02 18:20:45 +01:00
Andrey Antukh
f35f2c95f0 📎 Fix issues with jvm on CI. 2021-12-02 18:15:44 +01:00
Andrey Antukh
4d280bdb6d Merge branch 'test-e2e' into develop 2021-12-01 16:14:46 +01:00
Andrey Antukh
47acab766d ⬆️ Update to OpenJDK17. 2021-12-01 16:13:46 +01:00
Andrés Moya
1cc3819e65 🧪 Add e2e tests with Cypress 2021-12-01 16:13:46 +01:00
Andrey Antukh
16fa6259ea 🚧 Update docker deps and start working on test coverage. 2021-12-01 16:13:46 +01:00
Andrey Antukh
95717c4c32 Merge pull request #1378 from penpot/performance
Performance Improvements
2021-12-01 14:43:43 +01:00
alonso.torres
7564f27f95 Improvements after review 2021-12-01 14:39:20 +01:00
alonso.torres
565046aaa6 Memoize transform-shape 2021-12-01 14:39:20 +01:00
alonso.torres
fb9b023fae Improve selection performance 2021-12-01 14:39:20 +01:00
alonso.torres
b05908a760 Improved performance for options and area selection 2021-12-01 14:39:20 +01:00
alonso.torres
3bbcd235e1 Improved selection rect calculation 2021-12-01 14:39:20 +01:00
alonso.torres
9d66984c62 Improved set-modifiers-recursive and some utils memoization 2021-12-01 14:39:20 +01:00
alonso.torres
9024408ed2 Improved frame defered handling 2021-12-01 14:39:20 +01:00
alonso.torres
2b32e864fd Performance improvements 2021-12-01 14:39:20 +01:00
alonso.torres
626d0cba46 🐛 Add to spec opacity and blend-mode 2021-12-01 14:39:20 +01:00
alonso.torres
2a11e9962d ♻️ Moved debug utils to debug namespace 2021-12-01 14:39:20 +01:00
Andrés Moya
7dffddd437 📖 Add doc contributors to CHANGES.md 2021-12-01 12:48:48 +01:00
Andrey Antukh
6a7600fd52 ♻️ Ensure a correct usage of concat/into operations. 2021-12-01 11:30:48 +01:00
Andrey Antukh
b897f202dd 📎 Minor changes on exporter shadow-cljs config. 2021-11-30 13:11:52 +01:00
Andrey Antukh
eb396f2367 🐛 Properly show message on password recovery request.
Additionally, add the ability to reset form passing `nil`
on `reset!` function of Atom interface.
2021-11-30 09:44:03 +01:00
Andrey Antukh
95bf3e3af4 🐛 Fix issues related to signup questions form. 2021-11-30 09:44:03 +01:00
Andrey Antukh
19944202fb Handle properly the user redirect after login. 2021-11-30 09:44:03 +01:00
Andrey Antukh
2596ad27c3 ♻️ Minor refactor of auth data-flow.
This fixes many issues related to using penpot on-premise
instances on different domain than localhost. This changes
ensures correct data flow of authenticated and not authenticated
sessions.
2021-11-30 09:44:03 +01:00
Andrey Antukh
ece914303a ⬆️ Update exporter dependencies. 2021-11-29 15:53:24 +01:00
eva
7a0c12e073 ♻️ Create a colors file to save constants of color that can no be refactored into sass variables 2021-11-29 11:21:12 +01:00
eva
14b23b491f use those new css variables in our cljs files 2021-11-29 11:21:12 +01:00
eva
039b03249b Create css variables fron our sass varibles to use them in cljs files 2021-11-29 11:21:12 +01:00
Andrés Moya
3919cf4f86 🐛 Fix resize behavior of masked groups 2021-11-25 15:53:09 +01:00
Yaron Shahrabani
319a9fd2de 🌐 Add translations for: Hebrew.
Currently translated at 100.0% (843 of 843 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/he/
2021-11-25 14:50:58 +01:00
Oğuz Ersen
cf1f9f93aa 🌐 Add translations for: Turkish.
Currently translated at 99.7% (841 of 843 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/tr/
2021-11-25 14:50:57 +01:00
Andrey Antukh
0dd805da7f Improve team deletion process. 2021-11-25 14:19:06 +01:00
Andrey Antukh
e7a1833c44 🐛 Add missing "solid" font-weight parsing style.
Related issue: #1338
2021-11-25 14:19:06 +01:00
Andrey Antukh
54f8487b46 Make team leave & reassing as atomic operation. 2021-11-25 14:19:06 +01:00
alonso.torres
b68d721b39 🐛 Fix problem when importing in shared libraries 2021-11-25 13:28:37 +01:00
Andrey Antukh
b9ccb4e52c 🐛 Fix issues on login being logged. 2021-11-25 13:24:40 +01:00
Andrey Antukh
c4a11f73a0 ⬆️ Update deps. 2021-11-25 13:24:40 +01:00
Andrey Antukh
f96d4198c3 📎 Add scripts/repl to common. 2021-11-25 13:24:40 +01:00
Andrey Antukh
fe6a0ec5b8 📎 Fix linter issues. 2021-11-25 13:24:40 +01:00
Andrey Antukh
e7b4010eba 🐛 Fix undo on page relocate/sorting. 2021-11-25 13:24:40 +01:00
elhombretecla
c4947d3737 Add basic css sf structure 2021-11-25 13:24:40 +01:00
Andrey Antukh
8a8d677f85 🎉 Integrate questions form. 2021-11-25 13:24:40 +01:00
eva
baf4393310 🔨 Fix some spanish terms 2021-11-24 16:42:48 +01:00
eva
723916d930 Allow ungroup groups in bulk and unmask mask in group 2021-11-24 16:42:48 +01:00
Andrey Antukh
591d66564d 📎 Set develop branch to version 1.11.0-beta. 2021-11-24 13:23:36 +01:00
Andrey Antukh
79a2d522bf Merge remote-tracking branch 'origin/main' into develop 2021-11-24 13:23:14 +01:00
Andrey Antukh
4ad34ab5c8 📎 Update version number. 2021-11-24 13:06:36 +01:00
Andrey Antukh
33c7847dfc 🐛 Fix team deletion flow on dashboard. 2021-11-24 13:05:54 +01:00
alonso.torres
7a04f15710 🐛 Fix problems with team management. 2021-11-24 13:05:48 +01:00
Andrey Antukh
7e5b10eb3e 🐛 Fix team deletion flow on dashboard. 2021-11-24 12:45:06 +01:00
alonso.torres
896a07fa9a 🐛 Fix problems with team management 2021-11-24 12:27:14 +01:00
Andrey Antukh
07e8bb00fb Improve debug information of oidc provider. 2021-11-23 16:41:31 +01:00
Andrey Antukh
5d2742dd37 📎 Sort translation files. 2021-11-23 14:29:09 +01:00
Andrey Antukh
9ae3f1eb68 Merge remote-tracking branch 'weblate/develop' into translations 2021-11-23 14:27:29 +01:00
Andrey Antukh
8c6e0cf43a Merge branch 'jsoref-spelling' into develop 2021-11-23 14:23:29 +01:00
Andrey Antukh
1e220fd506 📎 Update changes.md file. 2021-11-23 14:22:46 +01:00
Andrey Antukh
4ff7855fd4 📎 Adapt translation files to spelling fixes. 2021-11-23 14:21:05 +01:00
Andrey Antukh
eb57354109 📎 Adapt migrations file. 2021-11-23 14:19:48 +01:00
Andrey Antukh
a82a33cecf Merge branch 'spelling' of https://github.com/jsoref/penpot into jsoref-spelling 2021-11-23 14:02:16 +01:00
Andrés Moya
c90fc2a9bf :white-check-mark: Add tests for interaction model and some fixes 2021-11-23 13:58:43 +01:00
Paul Schulz
c1a40e4aeb Add preset for ReMarkable 2 screen size
Logged in issue: https://tree.taiga.io/project/penpot/issue/2298

This page size (840x1120)(for the ReMarkable2 was tested with an exported PDF
test page, and does not appear to correspond directly to the resolution of the
device.

Signed-off-by: Paul Schulz <paul@mawsonlakes.org>
2021-11-23 13:57:26 +01:00
Andrey Antukh
9999b8bfab 📎 Update email on contributing file. 2021-11-22 15:42:50 +01:00
Andrey Antukh
cf62008acf Merge remote-tracking branch 'origin/main' into develop 2021-11-22 08:59:48 +01:00
Andrey Antukh
1c959a6653 📎 Add commented keycloak docker compose entry. 2021-11-22 08:57:20 +01:00
Andrey Antukh
b8043a2432 📎 Update ci config. 2021-11-18 17:19:55 +01:00
Andrey Antukh
ed5de525aa 📎 Increase default db pool size to 50. 2021-11-18 17:19:55 +01:00
Andrey Antukh
8105d9388b ♻️ Refactor rlimit usage (backend). 2021-11-18 17:19:55 +01:00
Andrey Antukh
8151dcc05f 📎 Improve services defmethod linter hook. 2021-11-18 17:19:55 +01:00
Andrey Antukh
25b1c5fe90 📎 Minor update on feedback module. 2021-11-17 14:46:18 +01:00
Andrés Moya
f566d2a0da 🐛 Remove unneeded style causing visual glitch 2021-11-17 14:06:15 +01:00
Andrey Antukh
ea218839e4 Minor change on error pruning mechanism. 2021-11-17 11:10:28 +01:00
Andrey Antukh
4c18a1881b 📎 Minor change on feedback subject template. 2021-11-17 11:10:04 +01:00
Andrey Antukh
0be2b2791f ♻️ Refactor error handling on exporter browser module. 2021-11-17 10:09:36 +01:00
Andrey Antukh
bf51e3db60 Invalidate all other sessions on password change. 2021-11-17 10:09:36 +01:00
Andrey Antukh
abca69f408 🐛 Fix tab reuse issue (viewer <-> workspace). 2021-11-17 10:09:36 +01:00
Andrey Antukh
6eac9102c9 🐛 Prevent conflict errors just ignoring repeated requests.
On media image uploading.
2021-11-17 10:09:36 +01:00
Andrey Antukh
0a7da1b7f2 🔥 Remove unused var. 2021-11-17 10:09:36 +01:00
Andrey Antukh
b4361cb202 📎 Increase idle-in-transaction default timeout. 2021-11-17 10:09:36 +01:00
Andrey Antukh
d2d4090e27 🐛 Don't raise exception when profile is not found. 2021-11-17 10:09:36 +01:00
Josh Soref
583eb53c9d 🐛 Fix typos 2021-11-15 09:54:36 -05:00
Josh Soref
39246f2beb 🐛 Fix typos in common 2021-11-15 09:53:42 -05:00
Josh Soref
cd2d3d5fa3 🐛 Fix typos in backend 2021-11-15 09:53:10 -05:00
Josh Soref
589e646023 🐛 Fix typos in frontend 2021-11-15 09:51:34 -05:00
Maciek Baron
b7ba3098ae 🐛 Fix typo in workspace.scss
Correct the spelling of 'width' to ensure it is set to '100%' properly and does not default to 'auto'.
2021-11-15 12:50:52 +01:00
Andrés Moya
631c5ecae3 💄 Change word in german for a shorter one 2021-11-15 12:50:07 +01:00
Andrés Moya
4962e45bd9 Change tool for exporting artboards and fix some issues 2021-11-15 11:55:58 +01:00
Andrey Antukh
c57219a356 📎 Allow specify the build optimization leven using env vars. 2021-11-12 13:31:28 +01:00
Andrey Antukh
03e6a187c5 Merge branch 'main' into develop 2021-11-12 13:31:13 +01:00
Andrey Antukh
0bdbbd35e3 📎 Fix linter issues. 2021-11-12 12:37:38 +01:00
Andrey Antukh
401afe7c1a 📎 Change loggling level on oauth ns. 2021-11-12 12:37:34 +01:00
Andrey Antukh
66b0039566 📎 Fix linter issues. 2021-11-12 12:36:32 +01:00
Andrey Antukh
17da51440c 📎 Change loggling level on oauth ns. 2021-11-12 12:34:50 +01:00
Andrés Moya
c5adeecd90 🐛 Fix problems importing files 2021-11-12 12:34:26 +01:00
Andrey Antukh
da6c62414b Merge remote-tracking branch 'origin/beta-release-info' 2021-11-11 13:54:01 +01:00
Andrey Antukh
6650fe863f 📎 Fix linter issues. 2021-11-11 13:28:02 +01:00
Andrey Antukh
76c00c42b5 📎 Update changelog. 2021-11-11 13:25:51 +01:00
Andrey Antukh
f8609419a1 Merge remote-tracking branch 'origin/develop' 2021-11-11 13:23:49 +01:00
Andrey Antukh
250e79eda1 Disable default project loading on demo users. 2021-11-11 13:23:07 +01:00
Andrey Antukh
f7401daeae 📎 Update label on version.txt 2021-11-11 13:22:43 +01:00
Andrey Antukh
7390e372e0 📎 Add missing translations. 2021-11-11 13:22:29 +01:00
Andrey Antukh
239c521ad9 📎 Minor change on gulpfile. 2021-11-11 12:21:21 +01:00
Andrey Antukh
77b4f09cfb 📎 Update onboarding texts. 2021-11-11 12:13:16 +01:00
Andrey Antukh
bb178af278 🐛 Fix import template on recently created team. 2021-11-11 11:49:23 +01:00
Andrey Antukh
3c39661174 📎 Enable _blank target on all markdown links. 2021-11-11 11:31:27 +01:00
Andrés Moya
1fffc1e828 💄 Change placeholder text 2021-11-11 11:09:17 +01:00
Andrey Antukh
ed50cd1fa8 📎 Remove :insecure-register default flag (backend). 2021-11-11 11:00:23 +01:00
Andrey Antukh
ef6a02e8ef ⬆️ Update clk-kondo dependency on devenv. 2021-11-10 23:21:41 +01:00
Andrey Antukh
e7003dde83 Add :insecure-register flag.
This allows on-premise users skip the email validation.
2021-11-10 23:21:41 +01:00
Andrey Antukh
bf2a393fd3 🎉 Add generic retry middleware for rpc methods. 2021-11-10 23:21:41 +01:00
elhombretecla
bb2cfd52f4 Add new wording 2021-11-10 14:52:48 +01:00
Andrés Moya
6a6f88c6ef 📚 Update changelog 2021-11-10 12:17:23 +01:00
elhombretecla
0a2b1a4fbe 🎉 Add new beta onboarding info 2021-11-10 11:53:14 +01:00
Andrey Antukh
5fd48c9e98 📎 Update changelog. 2021-11-10 11:26:28 +01:00
alonso.torres
022d32cd44 🐛 Fix project files count not refreshing correctly after import 2021-11-10 11:08:32 +01:00
alonso.torres
af10cf71db 🐛 Add placeholder to create shareable link 2021-11-10 11:08:32 +01:00
alonso.torres
1bf1de8ce8 🐛 Fix problem in viewer with dropdowns when comments active 2021-11-10 11:08:32 +01:00
alonso.torres
b80ddfa580 🐛 Remove change style on hover for options 2021-11-10 11:08:32 +01:00
alonso.torres
aa276ab308 🐛 Fix viewer comment position when zoom applied 2021-11-10 11:08:32 +01:00
alonso.torres
f50943d470 🐛 Fix max/min values for opacity fields 2021-11-10 11:08:32 +01:00
alonso.torres
959c998664 🐛 Fix a worker error when transforming a rectangle into path 2021-11-10 11:08:32 +01:00
alonso.torres
b6b6b6043c 🐛 Add shortcuts to boolean icons popups 2021-11-10 11:08:32 +01:00
alonso.torres
8e0807d502 🐛 Fix problem when flattening booleans losing styles 2021-11-10 11:08:32 +01:00
alonso.torres
78d027b25e 🐛 Fix problem with text rendering on export 2021-11-10 11:08:32 +01:00
alonso.torres
503f0bee69 🐛 Add ellipsis in long labels for input fields 2021-11-10 11:08:32 +01:00
Andrés Moya
50d756b189 🐛 Disallow to create a redundant component 2021-11-05 16:55:38 +01:00
Andrey Antukh
7c3d71e572 Merge pull request #1320 from penpot/scroll
Preserve Scroll posiition
2021-11-04 15:20:26 +01:00
Andrey Antukh
bf895d26b0 📎 Port from develop fixes to frontend build script. 2021-11-04 11:00:22 +01:00
Andrey Antukh
5530e8581a Merge remote-tracking branch 'origin/main' into develop 2021-11-04 10:48:47 +01:00
Andrés Moya
f913816d87 🎉 Add preserve scroll option 2021-11-04 10:39:16 +01:00
Andrés Moya
3d59d31b0a 🐛 Fix horizontal scrollbar hidden 2021-11-04 10:37:56 +01:00
alonso.torres
9a66f26bd9 🐛 Fix problem with inner stroke 2021-11-04 10:36:51 +01:00
Andrey Antukh
d5b6605ce8 🐛 Fix issue on translation files. 2021-11-04 10:33:05 +01:00
Andrey Antukh
38e5184be4 📎 Minor fix on frontend build script. 2021-11-04 10:17:19 +01:00
Andrey Antukh
369ec9f814 📎 Fix on previous commit. 2021-11-04 09:43:40 +01:00
Andrey Antukh
620b454c49 📎 Minor changes on build script resource management. 2021-11-04 09:43:03 +01:00
Andrey Antukh
2e5040e65d Don't load initial project on profile creation. 2021-11-04 09:23:14 +01:00
Andrey Antukh
71fe7ef125 📎 Add better auditlog event for profile email change event. 2021-11-04 09:23:14 +01:00
Andrey Antukh
e0e8fd7ddc 📎 Increment version number. 2021-11-04 09:23:14 +01:00
Andrey Antukh
01b4b4933e Update devenv nginx config. 2021-11-04 09:23:14 +01:00
Andrey Antukh
fced22bc60 🎉 Add new onboarding flow. 2021-11-04 09:23:14 +01:00
Andrey Antukh
898ae64a57 ⬆️ Update frontend dependencies. 2021-11-04 09:23:14 +01:00
Andrey Antukh
8d50852cbe Minor imrovements on general purpose specs naming. 2021-11-04 09:23:14 +01:00
Andrey Antukh
a11c7b10ac 🔥 Remove deprecated fixtures related code. 2021-11-04 09:23:14 +01:00
Andrey Antukh
fe9033b8be Merge branch 'main' into develop 2021-11-03 16:41:55 +01:00
alonso.torres
e26f9e4a71 🐛 Fix problem with arrow lines 2021-11-03 16:41:03 +01:00
alonso.torres
c477328da4 🐛 Fix problem with view mode comments 2021-11-03 13:45:43 +01:00
alonso.torres
214c64c49e 🐛 Fix problem when exporting texts with gradients or opacity 2021-11-03 10:56:42 +01:00
Andrés Moya
bce0e9194c Merge branch 'main' into develop 2021-11-02 11:09:11 +01:00
曹恩逢
40326177fd 🌐 Add translations for: Chinese (Traditional).
Currently translated at 23.2% (192 of 826 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/zh_Hant/
2021-11-01 04:34:53 +01:00
Yaron Shahrabani
4ab0272fa6 🌐 Add translations for: Hebrew.
Currently translated at 99.8% (825 of 826 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/he/
2021-11-01 04:34:52 +01:00
Marius
fb33366c91 🌐 Add translations for: German.
Currently translated at 99.3% (821 of 826 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/de/
2021-11-01 04:34:51 +01:00
Oğuz Ersen
75352c9afe 🌐 Add translations for: Turkish.
Currently translated at 99.7% (824 of 826 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/tr/
2021-11-01 04:34:50 +01:00
Andrey Antukh
a0f98e3823 Merge pull request #1306 from penpot/hotfix-validate-url
 Auto add http prefix to interaction url
2021-10-29 14:11:38 +02:00
Andrés Moya
bff6768adf 🐛 Fix linter error 2021-10-29 13:38:47 +02:00
Andrés Moya
8ce2eb448c Auto add http prefix to interaction url 2021-10-29 13:38:47 +02:00
alonso.torres
7c5d00f8a4 🐛 Fix problem with export 2021-10-28 17:56:51 +02:00
Andrés Moya
30cd499014 Enhance border radius options form 2021-10-28 17:32:57 +02:00
Andrey Antukh
99d173789e Merge pull request #1304 from penpot/bugfix
Bugfix
2021-10-28 17:31:40 +02:00
alonso.torres
ae72db8129 🐛 Fix pages dropdown in viewer 2021-10-28 17:18:17 +02:00
alonso.torres
9437cc1806 🐛 Fix undo stacking when changing color from color-picker 2021-10-28 17:18:17 +02:00
alonso.torres
0e76aa0265 🐛 Fix problem with exporting before the document is saved 2021-10-28 17:18:17 +02:00
Andrey Antukh
756e654d32 📎 Fix linter issues. 2021-10-27 16:16:44 +02:00
Andrey Antukh
78d1c57b7c Merge branch 'staging' 2021-10-27 12:45:53 +02:00
Andrey Antukh
bb27405e8f 🐛 Fix some issues with Arabic translations. 2021-10-27 12:26:21 +02:00
Andrey Antukh
0cfc46b417 Merge remote-tracking branch 'origin/1.9-release-notes' into staging 2021-10-27 12:00:57 +02:00
Yaron Shahrabani
bfb30fe68d 🌐 Add translations for: Hebrew.
Currently translated at 95.8% (792 of 826 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/he/
2021-10-27 11:49:02 +02:00
Andrey Antukh
63959b4b22 📎 Update gulpfile (related to i18n changes). 2021-10-27 11:22:24 +02:00
Andrey Antukh
66d086892f 📎 Add Arabic lang to i18n module. 2021-10-27 11:18:28 +02:00
Andrey Antukh
b878570b14 📎 Add hebrew lang to i18n module. 2021-10-27 11:14:55 +02:00
Andrey Antukh
b059610d16 📎 Sort all translation strings. 2021-10-27 11:08:30 +02:00
Andrey Antukh
972aa7f4e3 Merge remote-tracking branch 'weblate/develop' into translations 2021-10-27 11:06:45 +02:00
Andrey Antukh
797c1421da 📎 Upadate changelog. 2021-10-27 11:01:05 +02:00
Andrés Moya
e65cbcba65 🌐 Added translation for: Chinese (Traditional). 2021-10-27 10:58:20 +02:00
Andrés Moya
6d96dd3818 🐛 Fix detach stroke color 2021-10-26 14:44:29 +02:00
Andrés Moya
16db31c53c Ignore constraints when flipping 2021-10-26 14:43:55 +02:00
Andrey Antukh
c72138d15a 📎 Update manage.sh to use 'docker compose' command. 2021-10-26 10:58:23 +02:00
Andrés Moya
6d28a9ad58 🐛 Import files with interactions correctly 2021-10-25 17:59:38 +02:00
Andrés Moya
75c8d97a6e 🐛 Fix vertical flip for nested shapes 2021-10-25 17:55:38 +02:00
elhombretecla
c35f53af89 🎉 Add release onboarding texts 2021-10-21 21:54:54 +02:00
Andrey Antukh
55784f64b8 🎉 Add entrypoint for autogenerated api docs. 2021-10-21 11:31:29 +02:00
alonso.torres
a7241d4128 Change cookie config 2021-10-20 17:12:45 +02:00
Andrey Antukh
1573d794b9 Merge pull request #1290 from penpot/devenv-improvements
Dev Environment improvements
2021-10-20 16:03:24 +02:00
alonso.torres
bc725800ed New docker recipes for a backend only environment 2021-10-20 15:44:08 +02:00
alonso.torres
007728819b Allow CORS backend option and fix frontend to allow it 2021-10-20 15:44:08 +02:00
alonso.torres
f32f13069f Improve test workflow 2021-10-20 15:12:25 +02:00
Andrey Antukh
5ec73da17f Merge pull request #1292 from penpot/bugfix
Bug fixing
2021-10-20 15:05:50 +02:00
alonso.torres
5fd3689333 🐛 Fix no color when boolean with an SVG 2021-10-20 14:59:04 +02:00
alonso.torres
cca1431012 🐛 Fix font size input stuck on selection change 2021-10-20 14:59:04 +02:00
alonso.torres
7ba9558a7a 🐛 Fix masks export area 2021-10-20 14:59:04 +02:00
alonso.torres
c65e8b4a5e 🐛 Fix problem with stroke inside/outside 2021-10-20 14:59:04 +02:00
alonso.torres
eed75bcbda 🐛 Fix stroke cut on shapes export 2021-10-20 14:59:04 +02:00
Andrés Moya
1af4325e8f ♻️ Do a small performance refactor 2021-10-20 14:29:26 +02:00
alonso.torres
5e6719e22e 🐛 Fix paste in place in arboards 2021-10-20 14:22:47 +02:00
Andrés Moya
a4bbfe3c79 Consider overlays inside flows 2021-10-20 14:22:39 +02:00
elhombretecla
63f42fc8bb Add new release onboarding info 2021-10-20 13:24:17 +02:00
elhombretecla
5b9bcf8b1d Update CHANGES.md 2021-10-20 07:58:01 +02:00
Andrey Antukh
f02bc82525 Make permissions subsystem more flexible.
And fix some bugs related to permissions.
2021-10-19 11:36:58 +02:00
Andrés Moya
92f89c6cc1 Enhance duplicating prototype connections 2021-10-18 16:01:20 +02:00
alonso.torres
a1908be982 Update gitignore 2021-10-18 09:53:12 +02:00
alonso.torres
f08894629d ♻️ Refactor routes 2021-10-18 09:40:47 +02:00
Yaron Shahrabani
e46f11e6f8 🌐 Add translations for: Hebrew.
Currently translated at 100.0% (767 of 767 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/he/
2021-10-18 09:35:05 +02:00
Yaron Shahrabani
df6234ea28 🌐 Add translations for: Hebrew.
Currently translated at 41.0% (315 of 767 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/he/
2021-10-15 22:36:19 +02:00
Andrey Antukh
21cdf8b0ae 📎 Enable logging on prod builds. 2021-10-15 14:46:16 +02:00
Andrés Moya
192fb07ef1 🐛 Fix broken references on duplicate file 2021-10-14 18:18:48 +02:00
Andrés Moya
226216d111 🌐 Added translation for: Hebrew. 2021-10-14 14:18:36 +02:00
Andrey Antukh
bed2deb683 Merge pull request #1280 from penpot/hotfixes-20211014
Hotfixes 20211014
2021-10-14 13:07:30 +02:00
Andrey Antukh
6e327b69f5 🐛 Fix bugs on audit log module. 2021-10-14 12:57:27 +02:00
Andrey Antukh
1d3c8e867e 🐛 Minor improvements on file-created event (frontend). 2021-10-14 12:20:40 +02:00
Andrey Antukh
d0f761172a Avoid unnecesary error report on audit module. 2021-10-14 12:14:03 +02:00
Andrés Moya
fd6a8aec71 🐛 Fix docker devenv config 2021-10-14 12:07:33 +02:00
alonso.torres
e00e501605 Fix nrepl connection inside docker 2021-10-13 17:42:40 +02:00
Andrés Moya
81a42ef1df 🐛 Fix flow diaplay when index is still not calculated 2021-10-13 17:41:23 +02:00
Andrey Antukh
ee5eb2abc5 Merge pull request #1277 from penpot/auto-flows
🎉 Enable auto-flows
2021-10-13 16:43:00 +02:00
Andrey Antukh
0ed14f0288 📎 Improve db module api. 2021-10-13 15:05:09 +02:00
Andrey Antukh
c55f740978 Update default timeouts on db namespace. 2021-10-13 14:51:38 +02:00
Andrés Moya
38952b6734 🎉 Enable auto-flows 2021-10-13 14:47:42 +02:00
Andrey Antukh
925058467f Merge pull request #1276 from penpot/bugfixes
Bugfixes
2021-10-13 13:40:07 +02:00
Andrey Antukh
e5afeccadf 🐛 Minor improvements on file-created event (frontend). 2021-10-11 13:51:44 +02:00
alonso.torres
ad18604552 🐛 Fix bug in firefox when a text box is inside a mask 2021-10-11 12:41:35 +02:00
alonso.torres
d2d506dbf0 🐛 Fix problem with mix between open/closed and line/curves 2021-10-11 12:41:35 +02:00
alonso.torres
2833d3126f 🐛 Fix bug with transformation operations 2021-10-11 12:41:35 +02:00
alonso.torres
950367b055 🐛 Fix path stroke is not working properly with high thickness 2021-10-11 12:30:57 +02:00
alonso.torres
703859ac75 Change order of the teams menu so it's in the joined time order 2021-10-11 12:30:57 +02:00
alonso.torres
4bf5434e8f 🐛 Fix problem when ctrl+d when moving 2021-10-11 12:30:57 +02:00
alonso.torres
350c44f56f 🐛 Fix problem when calculating group bounds 2021-10-11 12:30:57 +02:00
alonso.torres
679c630a4d 🐛 Fix shift+wheel to horizontal scrolling in MacOS 2021-10-11 12:30:57 +02:00
alonso.torres
dbbb0a4a3d 🐛 Add stroke width in selection calculation 2021-10-11 12:30:57 +02:00
alonso.torres
0ca7d074ac 🐛 Fix problem with lines and inside/outside stroke 2021-10-11 12:30:57 +02:00
alonso.torres
65894bf582 🐛 Fix problem inheriting attributes from SVG root when importing 2021-10-11 12:30:57 +02:00
alonso.torres
8eacf738c2 🐛 Fix problem with page-options spec 2021-10-11 12:30:29 +02:00
Andrey Antukh
1b69eda43e Add some improvements to the auditlog module. 2021-10-11 12:17:51 +02:00
Andrés Moya
09d1c958ce Include advanced interactions and flows in import/export 2021-10-11 12:17:26 +02:00
Marius
589d16bc37 🌐 Add translations for: German.
Currently translated at 98.4% (755 of 767 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/de/
2021-10-08 22:58:54 +02:00
Andrés Moya
a6dfa6bbbd Modify behavior of flows menu in viewer 2021-10-08 09:14:20 +02:00
alonso.torres
b2721305c5 Merge remote-tracking branch 'origin/main' into develop 2021-10-07 17:19:22 +02:00
alonso.torres
24b3404876 🐛 Fix problem importing components 2021-10-07 17:04:55 +02:00
Andrés Moya
92ca1e4873 🐛 Fix permissions in viewer 2021-10-07 15:15:38 +02:00
Andrey Antukh
59d44c41e4 Merge pull request #1263 from penpot/bugfixes
Bugfixes
2021-10-07 13:50:52 +02:00
Andrey Antukh
08a503f160 📎 Rename penpot logo svg file. 2021-10-07 12:04:56 +02:00
alonso.torres
e0e68835ef 🐛 Fix problem duplicating paths 2021-10-07 12:04:37 +02:00
alonso.torres
734287b66d 🐛 Fix stroke caps adjustments in relation with stroke size 2021-10-07 12:04:37 +02:00
alonso.torres
ddc9d30a3e 🐛 Fix zoom context menu in viewer 2021-10-07 12:04:37 +02:00
alonso.torres
890bf9eced 🐛 Fix export group with shadows on children 2021-10-07 12:04:37 +02:00
alonso.torres
b8677b2b9a 🐛 Fix group renaming problem 2021-10-07 12:04:37 +02:00
alonso.torres
1f5e974cfc 🐛 Allow lowercase search for fonts 2021-10-07 12:04:37 +02:00
alonso.torres
54e7e44df1 🐛 Allow three character hex and web colors in color picker hex input 2021-10-07 12:04:37 +02:00
alonso.torres
9736810f87 🐛 Add links for terms of service and privacy policy in register checkbox 2021-10-07 12:04:37 +02:00
alonso.torres
5547383434 🐛 Disable boolean operations when selecting invalid shapes 2021-10-07 12:04:32 +02:00
alonso.torres
85f8e77928 🐛 Fix residual stroke on imported svg 2021-10-07 11:42:53 +02:00
alonso.torres
6918216b86 🐛 Fixed open shapes boolean operations 2021-10-07 11:42:53 +02:00
alonso.torres
efd2ad8f8b 🐛 Fix text editor enter behaviour with centered texts 2021-10-07 11:42:53 +02:00
alonso.torres
5a8ce52105 🐛 Fix problem with booleans empty selrect 2021-10-07 11:42:53 +02:00
alonso.torres
cbee65671c 🐛 Fix problem with masked texts on exporting 2021-10-07 11:42:53 +02:00
alonso.torres
75a7ce24bf 🐛 Fix problem with text margin while rendering 2021-10-07 11:42:53 +02:00
alonso.torres
013f56347d 🐛 Fix undo problem when changing typography/color 2021-10-07 11:42:53 +02:00
alonso.torres
a052bfd2fa 🐛 Fix error screen when operations over comments fail 2021-10-07 11:42:53 +02:00
alonso.torres
4b1fa2589e 🐛 Fix menu context for single element nested in components 2021-10-07 11:42:45 +02:00
alonso.torres
1a61c855ca 🐛 Fix problem with overflow dropdown on stroke-cap 2021-10-07 11:40:31 +02:00
Andrés Moya
0159eea526 🎉 Add interaction flows 2021-10-07 11:40:01 +02:00
Andrey Antukh
f3bb5c55f5 🐛 Show proper 404 when look on not-existing page on viewer. 2021-10-06 15:57:49 +02:00
Andrey Antukh
9ecbddc18c ♻️ Refactor internal handling of profile props. 2021-10-06 15:57:49 +02:00
Andrey Antukh
d36bf188ae 📎 Enable audit-log on devenv. 2021-10-06 15:57:49 +02:00
Andrey Antukh
b8cddbca88 📎 Fix linter issues on frontend. 2021-10-06 15:57:49 +02:00
Andrey Antukh
ee9b7166a6 🔥 Remove deprecated event from routr ns. 2021-10-06 15:57:49 +02:00
Andrey Antukh
9c1c755836 🐛 Fix race-condition on 404 states. 2021-10-06 15:57:49 +02:00
Andrey Antukh
6722ca41bf 🐛 Fix bugs on audit log module. 2021-10-06 15:57:49 +02:00
Andrey Antukh
9586d478ad 📎 Add noindex tags on error report handler. 2021-10-06 15:57:49 +02:00
Andrey Antukh
77cf4a5332 ♻️ Refactor frontend error handling. 2021-10-06 15:57:49 +02:00
elhombretecla
7199ab7cbe 🎉 Font size adjustemts 2021-10-05 13:45:37 +02:00
elhombretecla
5de2ff40d8 🎉 fix size variables 2021-10-05 13:45:37 +02:00
Andrés Moya
790d532cee Hide after-delay trigger in non-frames 2021-10-04 17:14:25 +02:00
alonso.torres
9f03e353c7 Boolean shapes enhancements 2021-10-04 11:07:04 +02:00
alonso.torres
68e3d53cb7 🐛 Fix problem with move+alt 2021-10-04 11:04:51 +02:00
alonso.torres
f9082e18e2 Merge remote-tracking branch 'origin/main' into develop 2021-09-30 11:54:22 +02:00
alonso.torres
02d31a7947 Adds progress report to importing process 2021-09-30 11:48:58 +02:00
Andrey Antukh
3e3faf6576 📎 Fix affected backend tests. 2021-09-30 11:48:14 +02:00
Andrey Antukh
bee1db135f 📎 Fix frontend linter issues. 2021-09-30 11:48:14 +02:00
Andrey Antukh
09d39ca425 🔥 Remove SVG parse rpc query. 2021-09-30 11:48:14 +02:00
Andrey Antukh
d58b6e5117 🔥 Remove deprecated queries. 2021-09-30 11:48:14 +02:00
Andrey Antukh
f0cf3e6411 🔥 Remove deprecated and unused tasks. 2021-09-30 11:48:14 +02:00
Andrey Antukh
b64d5ef357 🎉 Add unified logging api. 2021-09-30 11:48:14 +02:00
Andrey Antukh
2eccf77986 📎 Add data.csv dev dependency to backend. 2021-09-29 14:21:07 +02:00
Andrés Moya
0b8b766b62 Some visual fixes 2021-09-29 12:37:54 +02:00
alonso.torres
8d634a79c8 🐛 Fix problem with content 2021-09-29 12:36:45 +02:00
alonso.torres
4b9e7fdb15 🐛 Fix problem with incorrect content 2021-09-29 12:11:06 +02:00
Andrés Moya
165a84534a 📖 Update changelog 2021-09-29 12:01:00 +02:00
Andrés Moya
fe4cab3a9e Protect external links 2021-09-29 11:54:04 +02:00
Andrey Antukh
9e5166d991 Merge branch 'main' into develop 2021-09-29 11:29:01 +02:00
alonso.torres
48e78125e8 🐛 Fix problems with selection index update 2021-09-29 11:27:37 +02:00
Andrey Antukh
3fb3a92a8f 📎 Minor changes to cron schedule. 2021-09-29 11:06:50 +02:00
Andrey Antukh
8dba55d5cb 📎 Port some auditlog changes from develop. 2021-09-29 10:46:31 +02:00
Andrey Antukh
045a5156d1 📎 Minor changes on internal audit archive task params. 2021-09-29 09:02:02 +02:00
Andrey Antukh
8a162e39d5 Merge pull request #1248 from penpot/fix-interactions
 Change overlay position algorithm and some refactor
2021-09-28 17:28:23 +02:00
Andrés Moya
695788df0e ♻️ Move lens to a more specific site 2021-09-28 17:13:53 +02:00
Andrés Moya
4df96b03eb Change overlay position algorithm and some refactor 2021-09-28 17:09:08 +02:00
alonso.torres
49c2cb985c 🐛 Fix problems with imported svgs 2021-09-28 16:19:36 +02:00
alonso.torres
a189dc8243 🐛 Fixed some problems with booleans and paths 2021-09-28 13:09:19 +02:00
alonso.torres
ff8db0cd77 📚 Updated readme 2021-09-28 12:06:28 +02:00
Andrey Antukh
eff3e4015b 📎 Reduce drastically the auditlog archive task cron schedule. 2021-09-28 12:04:42 +02:00
Andrey Antukh
9ad43e13da Merge pull request #1247 from penpot/feat/bool-shapes
Bool shapes
2021-09-28 11:45:49 +02:00
alonso.torres
1bd3a792da Improved intersection edge cases 2021-09-28 11:30:06 +02:00
alonso.torres
75f8e473a5 Export/Import and edgecases fixing 2021-09-27 21:58:29 +02:00
alonso.torres
8c25ee7796 Fix style for bool shapes 2021-09-27 21:58:29 +02:00
alonso.torres
c3520cf606 Improved intersection calculation 2021-09-27 21:58:29 +02:00
alonso.torres
75d2d97d8e Renderers for booleans 2021-09-27 21:58:29 +02:00
alonso.torres
778a542e1c Removes children when flattening a group or bool shape 2021-09-27 21:58:29 +02:00
alonso.torres
74f3d551f2 Context menu for booleans 2021-09-27 21:58:29 +02:00
alonso.torres
fcc7b6791e Correct selrect calculation 2021-09-27 21:58:29 +02:00
alonso.torres
56e2db22eb Clip boolean selrects 2021-09-27 21:58:29 +02:00
alonso.torres
c56f024a86 Handling groups inside bool shapes 2021-09-27 21:58:29 +02:00
alonso.torres
6fd35ae5d9 Updates selrects, groups to path 2021-09-27 21:58:29 +02:00
alonso.torres
1db2895606 Union,intersection,difference 2021-09-27 21:58:29 +02:00
alonso.torres
df60ee06a1 Add exclusion boolean operation 2021-09-27 21:58:29 +02:00
alonso.torres
0b4b2d3814 Add UI for boolean operations 2021-09-27 21:58:29 +02:00
alonso.torres
9f08153a85 Created bool shapes 2021-09-27 21:58:29 +02:00
alonso.torres
5031700af6 Add utilities to calculate boolean shapes 2021-09-27 21:58:29 +02:00
Andrés Moya
57245dd77e 🎉 Add open url action 2021-09-27 12:37:39 +02:00
Andrés Moya
4697a1904a 🎉 Add previous screen action 2021-09-27 12:37:39 +02:00
Andrés Moya
ed380c86eb 🎉 Add delay interactions trigger 2021-09-27 12:37:39 +02:00
andy
02deecf54b 🌐 Add translations for: Spanish.
Currently translated at 99.6% (764 of 767 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/es/
2021-09-24 15:39:17 +02:00
Andrey Antukh
133c0312be 🐛 Fix unexpected exception on audit log handler. 2021-09-24 13:04:01 +02:00
Andrey Antukh
45e501ce02 🐛 Don't send incorrect flag values on register page. 2021-09-24 13:04:01 +02:00
Andrey Antukh
87dfa8c7fc 📎 Don't redirect user to landing page on clicking on logo. 2021-09-24 13:04:01 +02:00
Andrey Antukh
edefb588b6 Merge branch 'main' into develop 2021-09-23 13:52:08 +02:00
Andrey Antukh
8ce8b85089 📎 Update version.txt file. 2021-09-23 12:00:07 +02:00
Andrey Antukh
54c409a71c Merge pull request #1239 from penpot/fix/mask-viewer-problem
🐛 Fix problem with masking images in viewer
2021-09-23 11:55:33 +02:00
alonso.torres
2f8960d34f 🐛 Fix problem with masking images in viewer 2021-09-23 11:49:18 +02:00
Andrey Antukh
20036bd72b Merge pull request #1237 from penpot/complex-interactions3
Complex interactions3
2021-09-23 08:36:40 +02:00
Andrés Moya
38a84d4598 🎉 Add new triggers for interactions 2021-09-22 15:57:28 +02:00
Andrés Moya
bc1372c2f9 🎉 Add 'toggle overlay' action (and some fixes) 2021-09-22 14:42:48 +02:00
Andrés Moya
c241100886 Hide guide lines when moving overlay marker 2021-09-22 13:38:53 +02:00
Andrés Moya
fea2d91a63 💄 Adjust size of interaction markers 2021-09-22 12:38:58 +02:00
Andrey Antukh
f2c4aa852d Merge pull request #1225 from penpot/complex-interactions2
Complex interactions2
2021-09-22 11:31:46 +02:00
Andrés Moya
f8d09917a5 💄 Make some design adjustments 2021-09-22 10:54:25 +02:00
Andrés Moya
bbdf1152c1 🎉 Add close on click and background overlays 2021-09-22 10:54:25 +02:00
Andrés Moya
f208731746 🎉 Overlay positions buttons 2021-09-22 10:54:25 +02:00
Andrés Moya
0516cfa296 ♻️ Small refactor of basic specs 2021-09-22 10:54:25 +02:00
Andrés Moya
157e8413fb 🎉 Allow to position interaction overlays 2021-09-22 10:54:25 +02:00
Andrey Antukh
4708af3b91 🎉 Add sentry integration (on exporter). 2021-09-22 10:53:53 +02:00
Andrey Antukh
bee47d7fda ♻️ Remove koa dependency from exporter.
Replaced it with a direct usage of node http
server api and some external helpers for body
and cookies parsing.
2021-09-22 10:53:53 +02:00
Andrey Antukh
d246db7be8 📎 Change default params on exporter pool. 2021-09-20 15:21:26 +02:00
Andrey Antukh
02025bc70a 🎉 Add sentry integration (frontend). 2021-09-20 15:21:26 +02:00
Andrey Antukh
4275298f19 Merge branch 'main' into develop 2021-09-20 13:59:40 +02:00
Andrey Antukh
f0a02e4734 📎 Set version to 1.8.1-alpha. 2021-09-20 13:58:49 +02:00
Andrey Antukh
59464469c2 🐛 Fix unexpected exception on audit log persistence function. 2021-09-20 11:26:02 +02:00
Andrey Antukh
4d880a0d77 🐛 Fix unexpected exception related to some potok issues. 2021-09-20 11:22:56 +02:00
Andrey Antukh
26b28e2364 🎉 Add sentry integration (on backend). 2021-09-17 15:26:18 +02:00
Andrey Antukh
835b597af5 ⬆️ Update backend deps. 2021-09-17 14:34:14 +02:00
Andrey Antukh
c44d22ccf5 ⬆️ Update frontend dependencies. 2021-09-17 14:34:14 +02:00
Andrey Antukh
a11cda91de ⬆️ Update devenv system deps. 2021-09-17 14:34:14 +02:00
Andrey Antukh
cfbbb85254 🐛 Properly handle current team id assignation. 2021-09-17 14:34:14 +02:00
Andrey Antukh
8a0bba3c7a ♻️ Unify flags parsing on backend. 2021-09-17 14:34:14 +02:00
Andrey Antukh
da1135c80f Merge branch 'develop' of github.com:penpot/penpot into develop 2021-09-16 15:15:58 +02:00
Andrey Antukh
7fcf481243 Merge branch 'main' into develop 2021-09-16 11:36:15 +02:00
Andrey Antukh
06e54a17c0 📚 Update some comments on docker config.env file. 2021-09-16 11:35:45 +02:00
Andrey Antukh
1fe23ff732 📎 Minor renaming of config variables. 2021-09-16 11:33:40 +02:00
Andrey Antukh
39278b47dd 🐛 Fix typo in prev commit. 2021-09-16 11:31:54 +02:00
Andrey Antukh
bff0030f2b 🐛 Fix frontend docker image entry point. 2021-09-16 11:28:39 +02:00
Andrés Moya
b4b2f91363 🎉 Add interaction overlays 2021-09-16 07:53:54 +02:00
Andrés Moya
c7252a950b 🎉 Allow complex interactions 2021-09-16 07:53:54 +02:00
Andrey Antukh
e48b01fd18 📎 Add default env variable for browser executable path. 2021-09-15 14:28:57 +02:00
Amine Gdoura
ef2337f6d8 🌐 Add translations for: Arabic.
Currently translated at 68.3% (524 of 767 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/ar/
2021-09-14 15:35:48 +02:00
Andrey Antukh
13d83cb0d1 🐛 Fix incorrect handling of metrics on notifications module. 2021-09-14 10:45:06 +02:00
Andrey Antukh
033355395f 🐛 Fix metrics on ws connections. 2021-09-13 15:00:08 +02:00
Andrey Antukh
6c332b949b 📎 Start new development cycle. 2021-09-13 12:55:52 +02:00
Andrey Antukh
0711438433 Merge branch 'main' into develop 2021-09-13 12:55:36 +02:00
Andrey Antukh
ee6350189f Merge remote-tracking branch 'origin/staging' into main 2021-09-13 12:54:44 +02:00
Andrés Moya
46189c0ff1 🐛 Fix wrong timeout in download artboards message 2021-09-13 12:52:14 +02:00
alonso.torres
45d55e87eb 🐛 Fix problem while moving imported SVG's 2021-09-13 11:56:01 +02:00
alonso.torres
8a158146cd 🐛 Fix problem with import broken images 2021-09-13 11:56:01 +02:00
andy
1a859fc639 🌐 Add translations for: Spanish.
Currently translated at 99.6% (764 of 767 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/es/
2021-09-11 11:32:54 +02:00
Rubén
43518c6cfe 🌐 Add translations for: Catalan.
Currently translated at 99.0% (760 of 767 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/ca/
2021-09-11 11:32:53 +02:00
Andrés Moya
7bfb7b6da0 Merge branch 'staging' into develop 2021-09-10 13:24:29 +02:00
Oğuz Ersen
c0474b206e 🌐 Add translations for: Turkish.
Currently translated at 98.5% (756 of 767 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/tr/
2021-09-10 12:57:50 +02:00
Andrés Moya
fe6623b342 🐛 Fix interactions in viewer 2021-09-10 12:55:21 +02:00
Andrey Antukh
de8220245c Merge branch 'release-1.8-onboarding' into staging 2021-09-10 11:50:16 +02:00
elhombretecla
562f0d9872 🎉 Update 1.8 release onboarding info 2021-09-10 11:50:01 +02:00
elhombretecla
ed89f858e1 🎉 add new onboarding images 2021-09-10 11:50:01 +02:00
Andrey Antukh
9527b2c456 Merge branch 'staging' into develop 2021-09-10 10:57:15 +02:00
Andrey Antukh
5da2e5e7b7 🎉 Add Catalan language to the supporter languages list. 2021-09-10 10:56:23 +02:00
alonso.torres
e55e5aa168 Merge branch 'staging' into develop 2021-09-09 15:18:53 +02:00
alonso.torres
22b45266bf 🐛 Fix problem with path not closing on escape 2021-09-09 15:08:47 +02:00
Andrey Antukh
b280b5a517 Merge pull request #1194 from penpot/fix-pdf-pages
Fix pdf pages
2021-09-09 14:27:24 +02:00
Andrés Moya
60cb358cce 🐛 Fix extra blank pages when exporting to PDF 2021-09-09 14:11:50 +02:00
Andrey Antukh
f03a74abc7 🐛 Fix next frame shortcut on viewer. 2021-09-09 12:05:15 +02:00
Andrey Antukh
34885b64bd 🐛 Fix style on viewer header. 2021-09-09 11:41:18 +02:00
elhombretecla
f3bfa4e587 Update CHANGES.md 2021-09-09 11:09:21 +02:00
Andrey Antukh
3136ce7dc2 Add missing frame index on viewer. 2021-09-09 11:07:47 +02:00
elhombretecla
15a050517b Update CHANGES.md 2021-09-09 09:28:38 +02:00
Andrey Antukh
85a1c61880 Improve 404 and add broken link static page on viewer. 2021-09-08 13:52:11 +02:00
Andrey Antukh
15991d0226 Merge pull request #1189 from penpot/sequential-export
 Change frame exports to be sequential
2021-09-08 13:48:12 +02:00
Andrés Moya
413bc41695 Change frame exports to be sequential 2021-09-08 13:11:32 +02:00
Andrey Antukh
36137808f0 📎 Sort translation strings. 2021-09-08 12:59:24 +02:00
Andrey Antukh
12c1852297 Merge remote-tracking branch 'weblate/develop' into translations 2021-09-08 12:54:20 +02:00
Andrey Antukh
95e3c3eafc 📎 Enable by default demo users. 2021-09-08 11:14:19 +02:00
Andrey Antukh
c458fa6441 📎 Update changelog. 2021-09-08 11:14:19 +02:00
Andrey Antukh
66c1e386ce 🐛 Fix style issues on share link dialog. 2021-09-08 11:14:19 +02:00
Andrey Antukh
59e203fd52 🐛 Fix messages z-index issue.
Happens when modals and messages are visible
in the same time.
2021-09-08 11:14:19 +02:00
Andrey Antukh
7e0c097f23 🎉 Add linter for check duplicte potok types. 2021-09-07 11:48:14 +02:00
Andrey Antukh
926fa483b9 Improve event registry. 2021-09-07 11:48:14 +02:00
Rubén
2ebc92a167 🌐 Add translations for: Spanish.
Currently translated at 98.8% (679 of 687 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/es/
2021-09-04 17:33:02 +02:00
Rubén
eb511757db 🌐 Add translations for: Catalan.
Currently translated at 99.7% (685 of 687 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/ca/
2021-09-04 17:33:02 +02:00
alonso.torres
b5b97f7626 🐛 Fix problem with multiple selection conflicting with hover 2021-09-03 15:31:45 +02:00
Andrés Moya
ba0f7416bb Add some user feedback while exporting artboards 2021-09-03 15:13:32 +02:00
Andrey Antukh
f6e18de6af Add more metrics to update-file. 2021-09-03 10:36:34 +02:00
Andrey Antukh
320a4552bc Merge pull request #1172 from penpot/export-artboards
🎉 Export to PDF all artboards of one page
2021-09-02 16:33:47 +02:00
Andrés Moya
203473c965 🎉 Export to PDF all artboards of one page 2021-09-02 15:21:33 +02:00
Andrés Moya
255177d12b 🐛 Fix linter error 2021-09-02 15:21:01 +02:00
Andrey Antukh
290bf00b2d Use compact transit encoding instead of verbose. 2021-09-02 14:29:53 +02:00
Andrey Antukh
8464e6a822 Disable response streaming.
Because it is really slow.
2021-09-02 14:17:12 +02:00
Andrey Antukh
8af46ac7fc Minor improvements on section initialization. 2021-09-02 09:45:43 +02:00
Andrey Antukh
daeaf14032 Merge pull request #1169 from penpot/bugfixing
Bugfixing
2021-08-31 17:09:15 +02:00
alonso.torres
bd52a7c926 🐛 Fix minor visual issue 2021-08-31 16:10:42 +02:00
alonso.torres
c8c43de510 🐛 Fix group renaming problem 2021-08-31 15:52:39 +02:00
alonso.torres
bb49071088 🐛 Fix SVG components preview 2021-08-31 15:22:38 +02:00
alonso.torres
7a523a9d89 🐛 Fix problems with order in groups 2021-08-31 14:52:59 +02:00
alonso.torres
885d7de11b 🐛 Fix rename typography on text options 2021-08-31 14:52:06 +02:00
alonso.torres
f44675a1e4 🐛 Fix repeated fetch on file selection 2021-08-31 14:52:06 +02:00
alonso.torres
ce912c7430 🐛 Fix problems with export components 2021-08-31 14:12:12 +02:00
Andrey Antukh
e9fdd74a99 🐛 Fix unexpected text wrapping on exporting. 2021-08-31 12:17:52 +02:00
Andrés Moya
df8269bc7f 🐛 Fix color of texts in pdf exported files 2021-08-31 12:05:43 +02:00
alonso.torres
23e4fa82c8 Add translations to onboarding 2021-08-31 12:01:05 +02:00
alonso.torres
9bea604a46 🐛 Fix thumbnail cropping issue 2021-08-31 11:46:43 +02:00
alonso.torres
119fbd114d 🐛 Fix typos in mailing list 2021-08-31 11:46:43 +02:00
alonso.torres
1b6e6ec2e4 🐛 Fix problem with borders on shape export 2021-08-31 11:46:43 +02:00
alonso.torres
2dfa4f9ec9 Add export/import to custom caps 2021-08-30 12:56:22 +02:00
alonso.torres
3cd3e89679 🐛 Fix problem with caps in thumbnails 2021-08-30 12:56:22 +02:00
alonso.torres
c3be1c870d 🐛 Fix problem with zoom and selection 2021-08-30 12:54:07 +02:00
Andrey Antukh
6b571fd2bb 🐛 Fix wrong pages filtering on view-only-bundle rpc output. 2021-08-30 12:39:06 +02:00
alonso.torres
92df7abcf0 🐛 Fix lint error 2021-08-30 12:22:53 +02:00
Andrey Antukh
498d1570ce 📎 Fix linter issues. 2021-08-27 13:37:55 +02:00
Andrey Antukh
e587179359 ♻️ Refactor flags handling on frontend. 2021-08-27 13:19:36 +02:00
Andrey Antukh
c9985121c4 📎 Allow overwrite archive task props. 2021-08-27 09:42:58 +02:00
Andrey Antukh
e768600df3 ♻️ Enable receiving frontend audit log on backend. 2021-08-25 14:01:43 +02:00
Andrés Moya
3dffb9c8a0 Enable line caps in component sync and svg upload 2021-08-24 16:27:58 +02:00
Andrés Moya
eb40297a35 🎉 Enhance line caps selectors 2021-08-24 16:27:58 +02:00
elhombretecla
837985ccc5 💄 Fix ui constraints color 2021-08-20 10:48:02 +02:00
Andrés Moya
1def4b0f0c Merge pull request #1151 from penpot/niwinz-exporter-and-docker
Exporter resource management improvements.
2021-08-19 15:10:15 +02:00
Andrey Antukh
4c430cedf5 ♻️ Refactor exporter browser management.
Replace the cluster dependency with generic-pool.
2021-08-19 14:17:51 +02:00
Andrey Antukh
18d9212253 Enable aarch64 build for exporter docker image. 2021-08-19 14:16:53 +02:00
Andrey Antukh
36314691f1 ⬆️ Update devenv dockerfile. 2021-08-19 14:16:34 +02:00
Andrey Antukh
24da25f0f7 📎 Update changelog and increase version (minor). 2021-08-19 11:15:30 +02:00
Andrey Antukh
84ba8e6dde Add better error reporting when ldap is not configured correctly. 2021-08-19 11:04:08 +02:00
Andrey Antukh
c6fe035939 🐛 Fix demo user login issue. 2021-08-19 11:04:08 +02:00
Andrés Moya
be9073f0b7 🎉 Add stroke caps to path ends 2021-08-19 09:13:22 +02:00
Andrey Antukh
ac6c07b771 🐛 Fix demo user login issue. 2021-08-18 16:54:56 +02:00
Andrey Antukh
c8102f4bff 🎉 Share link & pages on viewer. 2021-08-18 16:54:56 +02:00
Andrey Antukh
df1fcd5e22 📎 Update changelog. 2021-08-18 15:08:25 +02:00
Andrey Antukh
de87da9c91 🐛 Fix font uploading issue on windows. 2021-08-18 15:06:19 +02:00
Andrey Antukh
3532263af4 🐛 Fix font uploading issue on windows. 2021-08-18 13:14:02 +02:00
Andrés Moya
a9cf4dad82 🎉 Allow increment font size by 0.1 with alt 2021-08-18 10:56:33 +02:00
Andrés Moya
1de1eb6b9b 🐛 Fix initial shape names 2021-08-13 13:42:33 +02:00
Andrés Moya
f6742d1bbf 📚 Update changes. 2021-08-13 10:05:13 +02:00
Andrés Moya
a377c602cc 🐛 Fix naming of duplicated objects in copy&paste and others 2021-08-13 09:49:42 +02:00
Andrey Antukh
58f0ad999c Merge pull request #1144 from penpot/colorpicker-tooltips
🎉 Add tooltips to color picker tabs
2021-08-12 11:23:34 +02:00
Andrés Moya
f612d35daf ♻️ Remove locale translation 2021-08-12 11:17:31 +02:00
Andrés Moya
7d202cb492 🎉 Add tooltips to color picker tabs 2021-08-12 10:56:08 +02:00
Andrés Moya
39bb7f209d Use penpot metadata only for whole file export 2021-08-11 12:26:50 +02:00
Mahmoud A. Rabo
bbd38a7e47 🌐 Add translations for: Arabic.
Currently translated at 75.8% (521 of 687 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/ar/
2021-08-11 01:33:17 +02:00
Voxybuns
d8b2cc7e1b 🌐 Add translations for: French.
Currently translated at 100.0% (687 of 687 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/fr/
2021-08-11 01:33:15 +02:00
Andrés Moya
09b328167c Truncate 2 decimals in font size 2021-08-10 11:24:54 +02:00
Andrés Moya
4439ef07b6 🎉 Allow orthogonal movement 2021-08-10 11:20:43 +02:00
Andrés Moya
f8491e9631 🎉 Increment font size by 10 with shift+arrows 2021-08-10 08:51:23 +02:00
Andrés Moya
63259b3f92 🎉 Add shortut Ctrl+Shift+K to detach instances 2021-08-09 12:02:20 +02:00
Andrés Moya
10db35eab4 Hide options for drafts project in dashboard 2021-08-09 09:37:48 +02:00
Eranot
0fa79c7a46 🌐 Add translations for: Portuguese (Brazil).
Currently translated at 72.9% (501 of 687 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/pt_BR/
2021-08-08 03:35:05 +02:00
Andrés Moya
e20f557bd6 Enhance resize from center, work when locked proportions 2021-08-06 13:42:50 +02:00
Andrés Moya
25d8d76524 🐛 Fix "Allow resizing from center"
This reverts commit cc0f99333f.
2021-08-06 09:20:32 +02:00
Andrés Moya
cc0f99333f Revert "🎉 Allow resizing from center"
This reverts commit 2a70964dce.
2021-08-05 15:39:09 +02:00
Andrés Moya
982aa874f2 🐛 Disable path conversion for raw-svg, to avoid errors 2021-08-05 14:54:54 +02:00
Andrés Moya
2a70964dce 🎉 Allow resizing from center 2021-08-05 14:54:54 +02:00
Mahmoud A. Rabo
3051a185e5 🌐 Add translations for: Arabic.
Currently translated at 47.5% (327 of 687 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/ar/
2021-08-04 12:32:22 +02:00
Andrés Moya
5e788fff99 Merge remote-tracking branch 'origin/main' into develop 2021-08-04 12:00:13 +02:00
Andrey Antukh
326c52604b 🐛 Don't dissoc :current-team-id on finalizing workspace. 2021-08-04 11:54:54 +02:00
Andrey Antukh
e7d1647769 🐛 Don't allow remove default teams. 2021-08-04 10:54:31 +02:00
Andrey Antukh
1e35116d8f 🐛 Don't allow remove default projects. 2021-08-04 10:50:21 +02:00
Andrey Antukh
35ca3ec895 🐛 Fix loggin issue when user uses the same email as previously deleted profile. 2021-08-04 10:42:22 +02:00
Andrés Moya
3435684c87 Merge branch 'staging' 2021-08-04 09:36:56 +02:00
Andrés Moya
7c30cccc97 📚 Add contribution 2021-08-03 09:50:09 +02:00
Andrés Moya
4194abe4f2 🧹 Remove unneeded function 2021-08-03 09:50:09 +02:00
Eduard Aymerich
0b698576da fix: remove top right button in settings. #1123 2021-08-03 09:50:09 +02:00
Andrés Moya
3fbd73129e Set email fields to email type to help editing 2021-08-03 09:50:09 +02:00
Andrés Moya
bbd6d171be 🎉 Allow to navigate undo history 2021-08-03 09:50:09 +02:00
Andrés Moya
f7929bbf93 📚 Some cleanup in CHANGES.md 2021-08-03 09:50:09 +02:00
Andrés Moya
29cd8530a3 🎉 Remember displacements when duplicating several shapes in a row 2021-08-03 09:50:09 +02:00
Andrés Moya
574387acac Move artboards when duplicating 2021-08-03 09:50:09 +02:00
Andrés Moya
6a1ab4d73c 🎉 Allow to zoom with ctrl + middle button 2021-08-03 09:50:09 +02:00
Andrés Moya
29e0c32679 Start panning with space+click instread of just space 2021-08-03 09:50:09 +02:00
Andrey Antukh
db7fe023c6 📎 Set next version to 1.8.0-alpha. 2021-08-03 09:50:09 +02:00
Andrey Antukh
bed702d8de 🐛 Fix font uploading (related to storage internal changes). 2021-08-03 09:48:37 +02:00
Maemolee
ccf3d7a285 🌐 Add translations for: Chinese (Simplified).
Currently translated at 97.3% (669 of 687 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/zh_Hans/
2021-07-30 18:34:06 +02:00
Andrey Antukh
e4f755416d 🐛 Fix backward compatibility introduced in previous commit.
Related to stroage.
2021-07-29 16:44:25 +02:00
Andrey Antukh
4d5b0731be 📎 Prepare 1.7.2-alpha release. 2021-07-29 14:54:30 +02:00
Andrey Antukh
fde6ea1c83 Merge branch 'main' into staging 2021-07-29 14:44:37 +02:00
Andrey Antukh
7a94a2f087 🐛 Fix default storage config on docker images compose file. 2021-07-29 14:36:03 +02:00
Andrey Antukh
97b8f742dd 🐛 Fix exporter bug on docker images. 2021-07-29 13:05:39 +02:00
Andrey Antukh
06733ea7cd 🐛 Fix exporter bug on docker images. 2021-07-29 12:59:24 +02:00
Andrey Antukh
efa5120fac Fix inconsistencies on storage backend usage. 2021-07-29 12:59:24 +02:00
Andrés Moya
80ab6bbda2 🐛 Fix linter error 2021-07-28 16:23:15 +02:00
Andrés Moya
53620b9f1b 🐛 Fix tooltip errors:move nodes and draw nodes are swapped
From PR https://github.com/penpot/penpot/pull/1100 by @soultipsy
2021-07-28 16:15:56 +02:00
Andrés Moya
259b405526 Detach all assets when unlinking an external lib 2021-07-28 13:48:52 +02:00
Andrés Moya
c6fe19c321 🐛 Protect against broken component refs #1114 2021-07-28 13:48:52 +02:00
alonso.torres
9d545004cb 🐛 Fix problem with pasting text into text editor 2021-07-28 13:48:39 +02:00
Andrés Moya
7fe419ecb0 🐛 Fix error when editing texts 2021-07-27 17:05:44 +02:00
Andrey Antukh
55ddf9cc38 🎉 Add some missing js hints. 2021-07-27 14:10:56 +02:00
Andrey Antukh
38292bcda7 🐛 Properly handle group naming on group creation. 2021-07-27 14:10:56 +02:00
Andrey Antukh
08062e8ce8 📚 Add better docstring to group creation internal function. 2021-07-27 14:10:56 +02:00
Andrey Antukh
bff35de39f 🐛 Don't remove :workspace-layout on finalize-file. 2021-07-27 14:10:56 +02:00
Andrey Antukh
394e6b08ad 🎉 Add many improvements on nil handling and code structure on changes impl. 2021-07-27 14:10:56 +02:00
alonso.torres
d61a86cad1 🐛 Frame moving with title with button different than left 2021-07-26 19:28:06 +02:00
alonso.torres
43198eb263 🐛 Improved object deletion 2021-07-26 19:28:06 +02:00
alonso.torres
8493e51070 🐛 Fix problem with svg's viewbox 2021-07-26 19:28:06 +02:00
Andrey Antukh
07eeb76a5f Stream all transit responses.
Instead of buffering for etag. The etags are temporary disabled.
2021-07-26 13:43:39 +02:00
Andrey Antukh
6ee6a03e4a Revert "Update and rename frontend/src/app/main/ui/workspace/viewport/path_actions.cljs to 前端 /src /app /main /ui /工作区 /视口 /path_actions.cljs"
This reverts commit 9d372301ed.
2021-07-26 12:08:24 +02:00
Andrey Antukh
8e3eb98789 Revert "🔥 Remove file."
This reverts commit c5b23816e9.
2021-07-26 12:08:14 +02:00
Andrey Antukh
c5b23816e9 🔥 Remove file. 2021-07-26 11:33:05 +02:00
Andrey Antukh
0a3cd4f8e4 ⬆️ Update deps. 2021-07-26 11:32:46 +02:00
Andrey Antukh
7882dead81 Merge pull request #1100 from soultipsy/develop
Tooltip errors:move nodes and draw nodes are swapped
2021-07-26 11:03:37 +02:00
Andrey Antukh
44f96dd6a3 Merge pull request #1095 from penpot/text-editor-improvements
Text editor improvements
2021-07-26 11:02:29 +02:00
Andrey Antukh
a442afd8d2 Merge branch 'main' into develop 2021-07-26 09:49:37 +02:00
Andrey Antukh
bdbc57b926 📎 Update changelog and increase version. 2021-07-26 09:47:47 +02:00
Andrey Antukh
9ed53ba064 Merge remote-tracking branch 'origin/main' into develop 2021-07-26 09:42:59 +02:00
soultipsy
9d372301ed Update and rename frontend/src/app/main/ui/workspace/viewport/path_actions.cljs to 前端 /src /app /main /ui /工作区 /视口 /path_actions.cljs
Tooltip errors:move nodes and draw nodes are swapped.
2021-07-20 15:44:51 +08:00
Andrey Antukh
b483513fa8 Merge pull request #1099 from penpot/fix-vertical-resize
🐛 Fix vertical resize when nested shapes
2021-07-20 09:42:44 +02:00
Andrés Moya
578c561473 🐛 Fix linter issues 2021-07-20 09:35:22 +02:00
Andrés Moya
f6134a6bd3 🐛 Fix vertical resize when nested shapes 2021-07-20 09:19:24 +02:00
Wang Jiaxiang
fb59d5d268 🌐 Add translations for: Chinese (Simplified).
Currently translated at 82.9% (570 of 687 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/zh_Hans/
2021-07-16 17:35:11 +02:00
Andrey Antukh
2758b6ffd9 Merge pull request #1096 from penpot/fix-duplicate-names
🐛 Fix repeated names when duplicating object trees.
2021-07-16 16:26:56 +02:00
Andrés Moya
fa99dea8fe 📚 Add some comments about possible code enhancements 2021-07-16 16:21:56 +02:00
Andrés Moya
6ced56301c ♻️ Optimice a bit of performance 2021-07-16 16:21:56 +02:00
Andrés Moya
008134fde8 🐛 Fix repeated names when duplicating object trees. 2021-07-16 16:21:55 +02:00
Andrés Moya
3ed593e4b6 🐛 Fix scroll in teams dropdown at dashboard 2021-07-16 14:35:43 +02:00
alonso.torres
1fc5182979 🐛 Fix text focus issues 2021-07-16 14:14:36 +02:00
alonso.torres
9ebafddac2 Make last font used the default for next text box 2021-07-16 13:13:24 +02:00
alonso.torres
26467187c4 Fix text editor issues 2021-07-16 13:13:24 +02:00
alonso.torres
69e256ab86 Moves cursor to position when clicking in the text box 2021-07-16 13:13:24 +02:00
Andrey Antukh
b4b12e68bf Merge remote-tracking branch 'origin/main' into develop 2021-07-15 18:08:32 +02:00
Andrey Antukh
768216d9bc 🐛 Fix previous migration. 2021-07-15 17:39:56 +02:00
Andrey Antukh
f29d54ad0d 🐛 Add migration for fix unreferenced shapes on frames. 2021-07-15 17:23:51 +02:00
Andrey Antukh
946309a485 📎 Add migration for cleaning unused props on file data. 2021-07-15 16:50:56 +02:00
Andrey Antukh
7c98336148 📎 Improve error reporting. 2021-07-15 16:50:32 +02:00
Andrey Antukh
455b0efa71 🐛 Add migration for fix some inconsistencies on page data. 2021-07-15 16:40:00 +02:00
Guilherme Dimas
05cf14846c 🌐 Add translations for: Portuguese (Brazil).
Currently translated at 64.3% (442 of 687 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/pt_BR/
2021-07-15 16:33:38 +02:00
Andrey Antukh
9ddcb036cf Merge branch 'main' into develop 2021-07-15 15:17:36 +02:00
Andrés Moya
185e06ed79 Merge pull request #1093 from penpot/niwinz-hotfixes
Hotfixes
2021-07-15 14:13:42 +02:00
Andrey Antukh
17ae6bf89d 🐛 Fix problem when page deletion and undo.
Related to duplicated page reference in undo page deletion.
2021-07-15 14:03:11 +02:00
alonso.torres
7efc1a0366 🐛 Fix problem with undo operation and children order 2021-07-15 14:03:11 +02:00
Andrey Antukh
899dc5b680 🐛 Properly dissoc :metadata prop on image->path conversion. 2021-07-15 11:57:45 +02:00
Andrey Antukh
5126c85623 🐛 Properly handle path with fill-image on file media gc task. 2021-07-15 11:57:15 +02:00
Andrés Moya
9ec23ceed6 🐛 Hide popup messages when navigating out 2021-07-14 18:39:33 +02:00
Andrey Antukh
a6d156438f Merge branch 'staging' into main 2021-07-14 11:32:09 +02:00
Andrey Antukh
23e4915d60 ⬆️ Set next version number (1.8.0) 2021-07-14 11:10:03 +02:00
Andrey Antukh
5ecfe05f3b 📎 Update CHANGES.md file. 2021-07-14 11:09:09 +02:00
Andrey Antukh
d35192d50f 📎 Minor cosmetic fixes on relnotes dialog. 2021-07-13 15:31:02 +02:00
Andrey Antukh
e2f9ce0fc5 📎 Minor improvement on relnotes dialog texts. 2021-07-13 14:56:22 +02:00
Andrey Antukh
8f55741c3e 📎 Fix typo on relnotes dialog. 2021-07-13 14:51:56 +02:00
Andrey Antukh
b7dc6d6cce Merge pull request #1083 from penpot/constraints-rotated
🐛 Fix constraints for rotated shapes
2021-07-13 14:15:42 +02:00
Andrey Antukh
8fb8a5d89a 🎉 Add release notes dialog for 1.7. 2021-07-13 14:13:25 +02:00
Andrey Antukh
dc22c2763e ⬆️ Update dependencies. 2021-07-13 14:13:25 +02:00
Andrés Moya
a77863d3c5 🐛 Fix constraints for rotated shapes 2021-07-13 11:26:03 +02:00
alonso.torres
0c8e0ed3dd 🐛 Fix problem with invalid svg value 2021-07-09 14:50:57 +02:00
Andrés Moya
fb7751eaae Apply different resize vectors for h and v constraints 2021-07-09 12:53:47 +02:00
Andrés Moya
56795f8d26 ♻️ Reorder functions, for more clarity, and add some comments 2021-07-09 12:53:47 +02:00
Andrés Moya
741d3050ad ♻️ Small refactor set modifiers 2021-07-09 12:53:47 +02:00
alonso.torres
0ff0fd7ced Merge remote-tracking branch 'origin/main' into develop 2021-07-09 12:42:33 +02:00
alonso.torres
b9b287d3b2 🐛 Fix problem with non existing children 2021-07-09 10:40:39 +02:00
Andrey Antukh
dc089ba84a Merge pull request #1080 from penpot/enhancement/incremental-area-selection
Incremental area selection
2021-07-08 23:08:06 +02:00
alonso.torres
55d2acdf13 Incremental area selection 2021-07-08 22:01:05 +02:00
Andrey Antukh
3a64efd136 Merge pull request #1078 from penpot/enhancement/shape-to-path
Double click won't make a shape a path until you change a node
2021-07-08 16:38:27 +02:00
alonso.torres
4e439792ec Double click won't make a shape a path until you change a node 2021-07-08 16:02:39 +02:00
alonso.torres
895889d27a 🐛 Fix local assert when deleting text 2021-07-08 16:02:21 +02:00
alonso.torres
d2777f5915 🐛 Fix dynamic alignment enabled with hidden objects 2021-07-07 17:16:56 +02:00
alonso.torres
9b878bd1cc 🐛 Fix header partialy visible on fullscreen viewer mode 2021-07-07 17:16:56 +02:00
alonso.torres
73a08fd119 🐛 Fix resize/rotate with mouse buttons different than left 2021-07-07 17:16:56 +02:00
alonso.torres
7b9b3dabbe 🐛 Fix problem when editing color in group 2021-07-07 17:16:56 +02:00
alonso.torres
163215d5c9 🐛 Fix negative values in blur options 2021-07-07 17:16:56 +02:00
Andrés Moya
7cc9fa6d30 🐛 Fix constraints calc when parent has displacement 2021-07-07 13:32:46 +02:00
Andrey Antukh
2d38d7af82 Merge pull request #1075 from penpot/fix/color-picker
Fix issues with color picker
2021-07-07 12:48:11 +02:00
alonso.torres
26e9f652b6 🐛 Fix color picker for texts in root frame 2021-07-07 12:45:33 +02:00
Andrey Antukh
19afc2274a Minor improvement on event syncronization on login after register. 2021-07-07 12:44:25 +02:00
alonso.torres
16fcc60a59 🐛 Fix color picker not working 2021-07-07 12:11:42 +02:00
alonso.torres
1b44fe8fec 🐛 Fixed problem when importing flatten components 2021-07-07 10:56:54 +02:00
Andrey Antukh
028e1d63a3 📎 Add logging to server repl namespace. 2021-07-07 10:31:01 +02:00
Andrey Antukh
e1e825f350 Do not initialize mattermost error reporter if no uri is provided. 2021-07-07 10:26:04 +02:00
Andrés Moya
65a4aff5fc 📚 Add constraints to CHANGES.md 2021-07-07 09:34:18 +02:00
Andrey Antukh
8f95f2ba12 Merge pull request #1074 from penpot/import/drag-drop
Import/drag drop
2021-07-07 09:24:03 +02:00
alonso.torres
991e0d5e5b ♻️ Remove classnames old reference 2021-07-07 09:23:10 +02:00
alonso.torres
84cf63d1ba Changed export modal progress 2021-07-06 18:08:25 +02:00
alonso.torres
60009476d6 Allows drag-drop files into dashboard 2021-07-06 18:08:25 +02:00
Andrés Moya
1894fc7cfa 🐛 Fix linter error 2021-07-06 18:08:08 +02:00
Andrés Moya
c9c24c3464 🐛 Fix linter error 2021-07-06 18:08:08 +02:00
Andrés Moya
cb731176eb 🎉 Change print artboard presets to 96dpi 2021-07-06 18:08:08 +02:00
Andrés Moya
1ee14a76f4 🎉 Export shapes to pdf 2021-07-06 18:08:08 +02:00
Andrey Antukh
e9945235ed Improvements on auth and login. 2021-07-06 16:03:48 +02:00
alonso.torres
60b29a3bf5 🐛 Fix problem with import with default grids 2021-07-06 12:19:11 +02:00
alonso.torres
3eb209b602 🐛 Fix import images 2021-07-06 11:19:38 +02:00
Andrey Antukh
d1cce44616 🎉 Add keys namespace.
A modularized approach for key derivation.
2021-07-06 10:49:27 +02:00
Andrey Antukh
c02638e10e Merge pull request #1072 from penpot/import-export-improvements
Import export improvements
2021-07-06 09:57:25 +02:00
alonso.torres
ddbdc2a27f Import/export folders in library elements 2021-07-06 09:52:49 +02:00
alonso.torres
f312c122ca 🐛 Migration to solve a problem with mime types 2021-07-06 09:52:49 +02:00
Çağlar Yeşilyurt
1d6a421388 🌐 Add translations for: Turkish.
Currently translated at 93.4% (642 of 687 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/tr/
2021-07-05 19:02:21 +02:00
alonso.torres
6e40e4e994 📚 Update changelog 2021-07-05 18:13:45 +02:00
alonso.torres
2149576289 Updated translations 2021-07-05 13:17:10 +02:00
alonso.torres
96891a5e5c Upgraded beicon version 2021-07-05 13:17:10 +02:00
alonso.torres
2771cab71a Export options 2021-07-05 13:17:10 +02:00
alonso.torres
d0ab813520 Import/export UI and final touches 2021-07-05 13:17:10 +02:00
Andrey Antukh
1b1c0ff9e4 🐛 Fix incorrect terms check validation on register page. 2021-07-05 12:19:11 +02:00
Andrey Antukh
083696a899 ⬆️ Update deps on devenv dockerfile. 2021-07-05 12:18:36 +02:00
Andrey Antukh
1376c26def 📎 Minor changes on register page. 2021-07-05 11:46:40 +02:00
Andrés Moya
e13cfad9da 🐛 Include constraints in the list of synced attrs 2021-07-02 09:56:21 +02:00
Andrés Moya
723cb3b546 Detach typographies when deleted in the file library 2021-07-01 17:33:04 +02:00
Andrés Moya
dac7a6497f Detach colors when deleted in the file library 2021-07-01 17:33:04 +02:00
Andrés Moya
ea8bc687c0 Detach instance when syncing if the master component is gone 2021-07-01 17:33:04 +02:00
Andrés Moya
c98958053c 🐛 Fix geometry sync for subcomponents 2021-07-01 17:32:39 +02:00
Andrés Moya
5f1ed511ea ♻️ Refactor to separate constraints to its own module 2021-07-01 17:15:51 +02:00
elhombretecla
61b7c279d6 💄 Change sidebar order 2021-07-01 17:15:51 +02:00
alonso.torres
4c84b18bb6 Add library linking to export/import 2021-06-30 09:09:48 +02:00
alonso.torres
484eb3a7c4 Allow to set up id for media 2021-06-30 09:09:48 +02:00
Eranot
f73880e565 🌐 Add translations for: Portuguese (Brazil).
Currently translated at 61.4% (422 of 687 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/pt_BR/
2021-06-29 13:34:09 +02:00
Andrés Moya
36cca0d871 🐛 Reset constraints when reparenting a shape 2021-06-28 22:46:13 +02:00
Andrés Moya
08d2dbc9bb Preserve components on copy&paste when possible 2021-06-28 22:45:48 +02:00
nautilusx
ce13902680 🌐 Add translations for: German.
Currently translated at 91.8% (631 of 687 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/de/
2021-06-27 10:33:22 +02:00
alonso.torres
e818170eec 🐛 Fix problem when exporting components with images 2021-06-25 11:27:31 +02:00
alonso.torres
91b6a0bf69 🐛 Fix problem with shadow menu 2021-06-25 10:34:51 +02:00
alonso.torres
85a6edb1fd Import components 2021-06-24 16:57:16 +02:00
alonso.torres
7d14122746 Import library media,color,typographies 2021-06-24 16:57:16 +02:00
alonso.torres
aa14d9626f Add library elements to file builder 2021-06-24 16:57:16 +02:00
alonso.torres
98f072619f Allow removing background from frames 2021-06-24 16:57:16 +02:00
Andrés Moya
150427cd39 🐛 Fix contextual menu in dashboard shared libraries section 2021-06-24 15:47:40 +02:00
Andrés Moya
3295685938 Improve algorithm for constraints calculation 2021-06-24 13:30:36 +02:00
elhombretecla
ca4ce569e7 📚 Improve general README file 2021-06-24 09:46:54 +02:00
Andrés Moya
ca9edf2bc9 ♻️ Refactor resize shapes from the sidebar measures form 2021-06-22 15:25:31 +02:00
Andrés Moya
be387ad892 Merge pull request #1053 from penpot/feat/export-import
Feat/export import
2021-06-22 12:02:04 +02:00
alonso.torres
9b9959da9a Export library components 2021-06-22 11:11:49 +02:00
alonso.torres
234a698538 ❇️ Fix linter warnings 2021-06-22 11:11:49 +02:00
alonso.torres
fbf1c10077 Export library data (images, typographies, colors) 2021-06-22 11:11:49 +02:00
alonso.torres
4d0dcc5876 Process interactions on import 2021-06-22 11:11:49 +02:00
Andrés Moya
4e909dc369 Emit numeric input changes only if value actually changed 2021-06-21 15:38:17 +02:00
Andrés Moya
ac1d0a5502 🐛 Fix taking into account attrs filter in update-shapes 2021-06-21 10:31:00 +02:00
Andrés Moya
d89a4a1218 🐛 Fix constraints detection on rotated structures 2021-06-21 10:31:00 +02:00
Andrés Moya
71759386c5 Detect movements inside a component and not override them 2021-06-21 10:31:00 +02:00
Eranot
fdbf94f415 🌐 Add translations for: Portuguese (Brazil).
Currently translated at 54.4% (374 of 687 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/pt_BR/
2021-06-21 05:32:46 +02:00
Andrey Antukh
ad4115acc8 ⬆️ Update shadow-cljs dependency. 2021-06-18 15:06:05 +02:00
Andrey Antukh
432a8f2338 Merge branch 'translations' into develop 2021-06-18 11:26:13 +02:00
Andrés Moya
b994363972 Merge pull request #1048 from penpot/niwinz-bugfixes-20210617
 Fix linter issues on frontend
2021-06-18 11:25:49 +02:00
Andrey Antukh
2a81321ead Merge remote-tracking branch 'weblate/develop' into translations 2021-06-18 11:25:30 +02:00
Andrey Antukh
dd7f5fd228 Revert "📎 Sort & validate translation files."
This reverts commit 09314c8926.
2021-06-18 11:24:54 +02:00
Andrey Antukh
047791413e Fix linter issues on backend. 2021-06-18 11:20:26 +02:00
Andrey Antukh
358fa7b20f 📎 Add specific linter for service defmethod (on backend). 2021-06-18 11:20:26 +02:00
Andrey Antukh
c937ccc92b 📎 Activate frontend and common linter on CI. 2021-06-18 11:20:26 +02:00
Andrey Antukh
e796c3dfba Fix linter issues on frontend (part 6). 2021-06-18 11:20:26 +02:00
Andrey Antukh
0f3e4c289c Fix linter issues on frontend (part 5). 2021-06-18 11:20:26 +02:00
Andrey Antukh
e0846ce00e Fix linter issues on frontend (part 4). 2021-06-18 11:20:25 +02:00
Andrey Antukh
30e77556db Fix linter issues on frontend (part 3). 2021-06-18 11:20:25 +02:00
Andrey Antukh
3e4e54870b Fix linter issues on frontend (part 2). 2021-06-18 11:20:25 +02:00
Andrey Antukh
e90185b553 Fix linter issues on frontend (part 1). 2021-06-18 11:20:25 +02:00
Amine Gdoura
4a82c14808 🌐 Add translations for: Arabic.
Currently translated at 27.3% (181 of 662 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/ar/
2021-06-18 11:19:05 +02:00
andy
80371233c9 🌐 Add translations for: Spanish.
Currently translated at 99.5% (659 of 662 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/es/
2021-06-18 11:19:05 +02:00
Andrey Antukh
09314c8926 📎 Sort & validate translation files. 2021-06-18 11:18:05 +02:00
Andrey Antukh
0e67e0d87e Merge remote-tracking branch 'weblate/develop' into translations 2021-06-18 11:12:48 +02:00
alonso.torres
c21ad48370 🐛 Fix problem with order in color palette 2021-06-18 10:36:04 +02:00
Andrey Antukh
9e3ba85b72 ♻️ Refactor profile registration flow. 2021-06-18 09:42:52 +02:00
alonso.torres
c82d936e96 Improves selrect calculation 2021-06-17 14:45:37 +02:00
alonso.torres
7b4603e33e Change to penpot file format and fixes 2021-06-17 14:45:37 +02:00
Andrés Moya
84a7ab8568 Merge branch 'main' into develop 2021-06-17 14:07:31 +02:00
Andrés Moya
beaea73276 📎 Update version number. 2021-06-17 14:00:24 +02:00
Andrey Antukh
ef1c1d8ced 💄 Fix linter issues on settings/feedback ns. 2021-06-17 11:42:00 +02:00
Andrey Antukh
91425050e4 🐛 Fix incorrect value handling on color-input component.
Related to the bug when the input value of the page color
is not refreshed on page change.
2021-06-17 11:42:00 +02:00
Andrey Antukh
41d05d6de0 🐛 Fix invalid link on workspace header (presence component). 2021-06-17 11:42:00 +02:00
Andrey Antukh
376d0663c2 🐛 Fix navigation on dashboard when file is moved to other team. 2021-06-17 11:42:00 +02:00
Andrey Antukh
231a133f23 🐛 Fix team modal auto focus handling. 2021-06-17 11:42:00 +02:00
Andrey Antukh
eacc945254 🐛 Fix wrong styles on viewer comments header menu & icon.
And additionally fix some linter issues on the affected namespaces.
2021-06-17 11:42:00 +02:00
Andrey Antukh
16b5bb595c 🐛 Fix tooltip positioning. 2021-06-17 11:42:00 +02:00
Andrey Antukh
a1ad6ca289 🐛 Fix tooltip positioning on view application. 2021-06-17 11:42:00 +02:00
Andrey Antukh
a8523f41b3 🐛 Remove unnecesary redirect when user goes from dashboard to workspace.
And then, clicks the browser back button.
2021-06-17 11:42:00 +02:00
Andrey Antukh
1d6905cb25 🔥 Remove obsoleted props on colorpalette component. 2021-06-17 11:42:00 +02:00
Andrey Antukh
a548bd7ffd 💄 Fix linter issues on ui/workspace ns. 2021-06-17 11:42:00 +02:00
Andrey Antukh
46e0151c28 💄 Start use nginx (without cache) to serve frontend dev files.
Usefull for checking production builds and not depend on the shadow-cljs
watch http-dev server running.
2021-06-17 11:42:00 +02:00
Andrey Antukh
23b315c58f 🐛 Fix incorrect lense on dashboard selected files. 2021-06-17 11:42:00 +02:00
Andrey Antukh
ac37f903d4 ⬆️ Update frontend npm deps. 2021-06-17 11:42:00 +02:00
Andrey Antukh
5572c0798f Minor improvement on start-tmux.sh script. 2021-06-17 11:42:00 +02:00
Andrés Moya
cb5e300534 🎉 Add full screen to view menu 2021-06-16 17:37:38 +02:00
Andrés Moya
50e0284084 Merge pull request #1043 from penpot/fix/problem-with-flip-transforms
🐛 Fix problem with paths editing after flip
2021-06-16 17:11:02 +02:00
alonso.torres
e08788190d 🐛 Fix problem with paths editing after flip 2021-06-16 17:05:18 +02:00
Andrey Antukh
44441ae928 💄 Minor lint fix on emails ns. 2021-06-16 16:49:15 +02:00
Andrey Antukh
e42e1e8751 🐛 Properly preserve the font-family name on upload custom font. 2021-06-16 16:32:21 +02:00
Andrey Antukh
ae4b743ea4 🐛 Add missing system deps to the default docker backend image. 2021-06-16 16:14:44 +02:00
alonso.torres
370b6bb2f2 🐛 Fix problem with odd widh/height and antialias icons 2021-06-16 11:09:47 +02:00
Amine Gdoura
796141f2b8 🌐 Add translations for: Arabic.
Currently translated at 23.7% (157 of 662 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/ar/
2021-06-15 20:34:14 +02:00
Eranot
2711181e19 🌐 Add translations for: Portuguese (Brazil).
Currently translated at 46.8% (310 of 662 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/pt_BR/
2021-06-15 20:34:13 +02:00
Andrew Montoya
2cd7f0f74c 💄 Fix add font button wrap 2021-06-15 14:01:13 +02:00
Andrey Antukh
96e7910cf9 Merge pull request #1038 from penpot/view-back-btn
View back btn
2021-06-15 14:00:35 +02:00
Andrey Antukh
4683d959a5 Merge pull request #1037 from penpot/feat/export-import
Import/export more features and toggleable UI
2021-06-15 13:32:08 +02:00
Andrés Moya
9300adf374 🎉 Activate edit file menu in viewer 2021-06-15 13:30:30 +02:00
alonso.torres
5c9ec92cc5 UI debug toggle for export/import 2021-06-15 13:10:08 +02:00
alonso.torres
76e2309778 Improve builder library 2021-06-15 13:07:53 +02:00
alonso.torres
9fc633080a Upload fill-image data 2021-06-15 11:39:35 +02:00
alonso.torres
8952cb4e00 Adds constraints to export/import 2021-06-15 11:39:35 +02:00
alonso.torres
d6e009ce78 Adds flip,proportion and rotation 2021-06-15 11:39:35 +02:00
elhombretecla
a106c728ba 💄 Add new project header 2021-06-15 11:34:39 +02:00
Andrés Moya
5cddc9836f Merge pull request #1031 from penpot/niwinz-file-data-offload
Add mechanism for offload the file data to external storage.
2021-06-15 11:15:50 +02:00
Andrey Antukh
2728fa2b8d Add proper fdata objects deletion. 2021-06-15 09:25:37 +02:00
Andrey Antukh
2293253558 🎉 Add profiler dev dependency. 2021-06-15 08:36:04 +02:00
elhombretecla
ee7248204f 💄 Add new actions icon 2021-06-14 20:00:10 +02:00
Andrey Antukh
0c97a44a2a 🎉 Add file offloading to external storage mechanism. 2021-06-14 15:41:27 +02:00
Andrés Moya
0c49ed1fec Merge pull request #1028 from penpot/feat/export-import
Feature / export import
2021-06-11 15:55:47 +02:00
alonso.torres
dd15bf7328 Adds flip,proportion and rotation 2021-06-11 15:48:23 +02:00
alonso.torres
3aa5fda695 Import pages with imported svgs 2021-06-11 15:48:23 +02:00
alonso.torres
e880d94f51 Add import blend modes 2021-06-11 15:48:23 +02:00
alonso.torres
0647fa832a Read files info from manifest 2021-06-11 15:48:22 +02:00
alonso.torres
4af83eadc4 Import shadows,blur,exports 2021-06-11 15:48:09 +02:00
alonso.torres
cc2c249a07 Import masks 2021-06-11 15:48:09 +02:00
alonso.torres
152bcf451a Import images and upload media 2021-06-11 15:48:09 +02:00
alonso.torres
83879fb931 Support for fill,stroke,gradient,text 2021-06-11 15:48:09 +02:00
Andrey Antukh
8d703a3fb4 Write transit data to response output-stream.
Previously, all responses from GET and POST requests are serialized
to a byte array (using transit) which is returned as response body.

With this commit, the response body of POST requests is written
directly to the response output-stream, reducing the memmory need
to perform that operation.

The responses for GET request still uses the old mechanism because
we need the whole response as byte array for calculate the ETAG and
check it before returning the body.
2021-06-11 12:36:21 +02:00
Andrey Antukh
022d57ef42 Increase a little bit the compression level of blob encoding. 2021-06-11 12:36:21 +02:00
Andrey Antukh
4928f875b3 Strip incoming changes from update-file response.
Until now, `update-file` always returned a ordered set of change-groups
plus the one created by the ongoing request.

A change-group corresponds to a list of changes commited in a single
update-file (file_change table row).

Including the ongoing request change-group on response with increase
load stated causing considerable amount of memmory pressure.

Since this changes are no longer necessary on frontend side, with this
commit we strip the changes list from the ongoing request change-group,
sending back an empty entry with the increased `revn` number.
2021-06-11 12:36:21 +02:00
Andrey Antukh
840430c189 Increment the file-change garbage collection time window.
The previous value was 24 hours because the snapshot stated to consume a
lot of disk space. Since we reduced snapshot generation considerably, we
now can increase the gc time window to 72 hours.
2021-06-11 12:36:21 +02:00
Andrey Antukh
024cc88738 Reduce the file-change snapshot taking ratio.
Until now, a file `data` snapshot was persisted on every file_change
row. That causes a lot of IO load and increase disk usage without
a real benefit.

This commit reduces the snapshot generation; now the snapshot
is persisted every 20 update-file or when a file is not touched
in 3 hours or more.
2021-06-11 12:36:21 +02:00
Amine Gdoura
eee0cf569e 🌐 Add translations for: Arabic.
Currently translated at 16.7% (111 of 662 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/ar/
2021-06-10 17:33:13 +02:00
Andrey Antukh
371c78b1d3 ♻️ Refactor delete-shapes event.
Properly handle parent deletion + performance.
2021-06-10 14:34:19 +02:00
Andrés Moya
6988ae83c9 🐛 Fix mini visual bug 2021-06-10 11:19:25 +02:00
Andrey Antukh
f95705d2d6 Add source ip to the audit-log. 2021-06-10 10:56:39 +02:00
Andrey Antukh
ff3caec36c 🎉 Add decode-inet helper on app.db ns. 2021-06-10 10:56:39 +02:00
Andrey Antukh
4c4dac8e90 Allow check for pgobject type. 2021-06-10 10:56:39 +02:00
Andrey Antukh
beaa62c9a9 Merge pull request #1022 from penpot/advanced-options-ui
Advanced options UI
2021-06-10 10:55:28 +02:00
Andrés Moya
69fe8bc9b5 ♻️ Add some small performance refactors 2021-06-10 10:28:07 +02:00
Andrés Moya
092a973f9a 🎉 Add resize constraints to shapes 2021-06-10 10:28:07 +02:00
Andrey Antukh
55b0f6e950 📎 Minor change on locking order on update-file. 2021-06-09 15:53:38 +02:00
Andrey Antukh
b9df489962 ⬆️ Update clj-kondo and babashka dependencies on devenv dockerfile. 2021-06-09 15:49:45 +02:00
Andrey Antukh
144127224c Reduce contention on file-update using advisory locks and weaker row locking. 2021-06-09 15:49:45 +02:00
Andrey Antukh
2202f90d74 🐛 Fix wrong spec definition on invite email. 2021-06-09 15:27:07 +02:00
Andrey Antukh
860e0227af ♻️ Reimplement GC mechanism for penpot database objects. 2021-06-09 15:27:07 +02:00
alonso.torres
c4b4976be0 Remove advanced options overlay and single option when advanced options displayed 2021-06-09 14:22:05 +02:00
elhombretecla
a2b0305162 Add new text and grid advanced opt css 2021-06-09 14:22:05 +02:00
elhombretecla
6404907699 Add new asset advanced optios css 2021-06-09 14:22:05 +02:00
elhombretecla
d4b02e36a7 💄 Change shadow options css 2021-06-09 14:22:05 +02:00
Andrey Antukh
71c4145ea2 Merge pull request #1017 from penpot/fix/style-block
 Move frame style block to workspace wrapper
2021-06-07 12:12:23 +02:00
alonso.torres
075f0a1bb0 Move frame style block to workspace wrapper 2021-06-07 12:10:41 +02:00
Andrey Antukh
d80bd3661d Merge pull request #1016 from penpot/fix-library-assets
🐛 Fix error when opening assets of external library
2021-06-07 11:25:22 +02:00
Andrés Moya
44f4441372 🐛 Fix error when opening assets of external library 2021-06-07 11:22:09 +02:00
Andrey Antukh
782e060448 📎 Add minior adaptations to main docker files. 2021-06-07 11:03:53 +02:00
Andrey Antukh
8c223b9fb8 Allow future dates on get-by-params method. 2021-06-07 10:56:21 +02:00
Andrey Antukh
1232f93f1a 🐛 Fix shadow-cljs version on common/deps.edn file. 2021-06-07 10:55:50 +02:00
Andrey Antukh
8f3c5b5cea 📎 Add minior adaptations to main docker files. 2021-06-07 09:44:12 +02:00
Andrey Antukh
c4d3023fd3 ⬆️ Upgrade potok.
Includes many performance improvements.
2021-06-07 09:22:26 +02:00
alonso.torres
a97c7cada4 🐛 Fix problem with namespace 2021-06-04 15:52:18 +02:00
alonso.torres
5b0cd974ac Merge remote-tracking branch 'origin/main' into develop 2021-06-04 15:38:17 +02:00
Andrey Antukh
bb5804cde3 📎 Update changelog and increase version. 2021-06-04 14:15:48 +02:00
Andrey Antukh
7819757759 🐛 Fix unexpected exception on searching without term.
When term is empty on frontend, frontend just does not sends it
to backend, leving it as missing field. This commit makes the
seatch-term as optional.
2021-06-04 14:15:48 +02:00
Andrey Antukh
b861e261ed 🐛 Replace frame term usage by artboard on viewer app.
Replace frame with artboard.
2021-06-04 14:15:48 +02:00
Andrey Antukh
17b32d6518 🐛 Don't allow rename drafts project. 2021-06-04 14:15:48 +02:00
Andrey Antukh
d2359046c4 🐛 Fix problem when moving files with drag & drop. 2021-06-04 14:15:48 +02:00
Andrey Antukh
8a700170b0 🐛 Fix font loading on viewer app. 2021-06-04 13:39:01 +02:00
Andrey Antukh
8c68e29bf3 🐛 Fix custom font rendering on exporting shapes. 2021-06-04 13:26:37 +02:00
Andrey Antukh
1a81631886 📎 Decrease default bulk buffers on storage tasks. 2021-06-04 09:41:42 +02:00
Andrey Antukh
634fe2c458 📎 Reduce file_change preserve interval to 24h. 2021-06-04 01:27:21 +02:00
Andrey Antukh
6cc8fca506 Merge remote-tracking branch 'origin/main' into develop 2021-06-03 17:35:37 +02:00
Andrey Antukh
053d46144e 📎 Fix linter issues. 2021-06-03 17:24:19 +02:00
Andrey Antukh
b2e7bb6be1 🐛 Properly handle nil values on update-shapes function. 2021-06-03 17:19:14 +02:00
Andrés Moya
31689cd947 Merge pull request #1006 from penpot/feat/export-import
Import/export (partial)
2021-06-03 13:31:52 +02:00
alonso.torres
d855b930c5 Temporary UI 2021-06-03 13:26:05 +02:00
alonso.torres
61545ea13e Import/export workers 2021-06-03 13:26:05 +02:00
alonso.torres
21aa23e7f5 Parsing and file builder 2021-06-03 13:26:05 +02:00
alonso.torres
f197124ee5 Changes to render to support exporting 2021-06-03 13:26:05 +02:00
alonso.torres
b76fef1e44 Change create file to send data from the frontend 2021-06-03 13:26:05 +02:00
alonso.torres
9f36f4fbe7 Save as dialog option 2021-06-03 13:26:05 +02:00
alonso.torres
a76bf1d0b2 🐛 Fix problem with export assets 2021-06-03 13:26:05 +02:00
alonso.torres
6cbbfa6499 ♻️ Refactor custom stroke 2021-06-03 13:26:05 +02:00
alonso.torres
bf5f845789 Import/Export framework first version 2021-06-03 13:26:05 +02:00
Andrey Antukh
d7eec3b92b Merge remote-tracking branch 'origin/main' into develop 2021-06-03 12:56:37 +02:00
Andrey Antukh
bae709df5b 🐛 Fix custom font deletion task. 2021-06-03 12:55:31 +02:00
Andrey Antukh
ba33de815f Merge remote-tracking branch 'origin/main' into develop 2021-06-03 12:41:06 +02:00
Andrey Antukh
1b495ebad1 Minor improvements on loki reporter. 2021-06-03 12:40:22 +02:00
Andrey Antukh
4e0289b341 Reduce the deletion window of file_changes. 2021-06-03 12:34:11 +02:00
Andrey Antukh
866d95149e Downgrade shadow-cljs version.
Because the new compiler causes some bugs on compiling
internal ES6 modules.
2021-06-03 11:59:20 +02:00
Andrey Antukh
e9bbe9fca0 ⬆️ Update beicon dep. 2021-06-02 15:03:34 +02:00
Andrey Antukh
8da0e9adb2 📎 Adapt exporter and frontend build scripts. 2021-06-02 14:28:59 +02:00
Andrey Antukh
f0e78f693f 🐛 Add missing deps on exporter. 2021-06-02 14:20:21 +02:00
Andrey Antukh
9333ed5be4 Adapt exporter to common changes. 2021-06-02 14:10:25 +02:00
Andrey Antukh
a244fbee4d 📎 Fix linter issue. 2021-06-02 13:20:25 +02:00
Andrey Antukh
9bc2f7dce4 Merge remote-tracking branch 'origin/main' into develop 2021-06-02 13:15:23 +02:00
Andrey Antukh
056fce9187 📎 Minor changes on background tasks cron expr. 2021-06-02 13:13:25 +02:00
Andrey Antukh
9f034c7e7e Disable excesive logging of some modules. 2021-06-02 11:27:22 +02:00
Andrey Antukh
2704258dba Merge pull request #1000 from penpot/view-mode-header
View mode header
2021-06-02 11:12:03 +02:00
elhombretecla
3d5caf18e3 Add new interactions link and translations 2021-06-02 11:10:56 +02:00
elhombretecla
e45f7598db First viewer header changes 2021-06-02 11:10:52 +02:00
Andrey Antukh
09b72588d8 Merge pull request #938 from penpot/assets-enhancements
assets improvements
2021-06-02 11:10:34 +02:00
Andrey Antukh
a0f80e740e Merge pull request #997 from dragetd/patch-1
Fix typos and rephrase some comments
2021-06-02 11:09:29 +02:00
Andrey Antukh
a6de4e3742 📎 Change version.txt file. 2021-06-01 15:19:37 +02:00
Andrey Antukh
2d6a375afc 📎 Update changelog. 2021-06-01 15:18:26 +02:00
Andrey Antukh
585e5d0199 📎 Minor changes on internal audit module buffers. 2021-06-01 15:14:39 +02:00
Andrey Antukh
fcb4cb38a9 Merge remote-tracking branch 'origin/main' into develop 2021-06-01 12:44:04 +02:00
Çağlar Yeşilyurt
de5e8f8e57 🌐 Add translations for: Turkish.
Currently translated at 92.9% (615 of 662 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/tr/
2021-06-01 02:38:55 +02:00
Antonio
11f360bdab 🌐 Add translations for: Catalan.
Currently translated at 30.5% (202 of 662 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/ca/
2021-06-01 02:38:52 +02:00
Andrés Moya
ebc79c278b ♻️ Apply transducer-fu 2021-05-31 13:15:42 +02:00
Andrés Moya
b2fef7b7a8 🎉 Add many functions to assets panel and big refactor 2021-05-31 12:51:49 +02:00
alonso.torres
71524fe649 🐛 Fix problem with empty path editing 2021-05-31 12:50:24 +02:00
alonso.torres
55d2768807 🐛 Fix problem with create component 2021-05-31 12:50:24 +02:00
Andrey Antukh
3c7dda02c6 🚑 Add tempory shadow-cljs npm dependency. 2021-05-31 11:55:13 +02:00
Andrey Antukh
6ed182002b ⬆️ Update lambdaisland/uri dependency. 2021-05-31 11:04:32 +02:00
Andrey Antukh
ee1738c9d4 ♻️ Replace backend transit ns with common transit. 2021-05-31 11:04:32 +02:00
Andrey Antukh
068c94da4e ♻️ Replace frontend transit ns usage with common transit. 2021-05-31 11:04:32 +02:00
Andrey Antukh
2ec769981a Resolve almost all linter issues on common module. 2021-05-31 11:04:32 +02:00
Andrey Antukh
548664f6ce ♻️ Internal directory refactor.
Make common as first-class module.
2021-05-31 11:04:32 +02:00
Michael G
9d54f71dbb 📚 Align comments to 80 characters
I did not find any style recommendation that states an exact line length. Assuming a common value of 80, this leads to less lines being split.
2021-05-30 19:04:18 +02:00
Michael G
d102144746 📖 Fix typos and rephrase some comments
Minor typos and the names of official services corrected in comments.
2021-05-30 19:04:18 +02:00
alonso.torres
3d7a3f27d5 🐛 Fix problem with move-objects 2021-05-28 11:05:18 +02:00
alonso.torres
46448bc5c7 🐛 Fix problem with merge and join nodes 2021-05-28 10:51:36 +02:00
Andrey Antukh
6a2e45988f Merge remote-tracking branch 'origin/main' into develop 2021-05-28 08:52:14 +02:00
Andrey Antukh
2f8f1f0b9a 📎 Update changelog. 2021-05-28 08:49:27 +02:00
Andrey Antukh
d572fdac9b 🐛 Fix unexpected exception on duplicate project.
Related to files created out of order.
2021-05-28 08:39:04 +02:00
Andrey Antukh
ac41ed1af4 Add missing cause prop on error loging. 2021-05-28 08:32:30 +02:00
Andrey Antukh
f47bb6bcd0 Minor fix on previous commit. 2021-05-27 18:12:29 +02:00
Andrey Antukh
a3eb5e2928 🐛 Fix incorrect unicode code points handling on draft-to-penpot conversion. 2021-05-27 17:52:16 +02:00
Andrey Antukh
53cb36dd8a Merge pull request #988 from penpot/alotor/small-improvements
Small improvements
2021-05-27 14:51:28 +02:00
alonso.torres
9cda361523 Removed unnecessary background box 2021-05-27 14:44:37 +02:00
alonso.torres
1a70071405 Adds support to rx streams on workers framework 2021-05-27 14:44:37 +02:00
alonso.torres
b648fb7446 Zip utils 2021-05-27 14:33:04 +02:00
alonso.torres
aaef0777b0 ⬆️ Add jszip dependency 2021-05-27 14:33:04 +02:00
alonso.torres
68d287ed82 ♻️ Refactor trigger download 2021-05-27 14:33:04 +02:00
alonso.torres
641e4080bc Changed transparent for none 2021-05-27 14:33:04 +02:00
Andrey Antukh
a80120278e Merge remote-tracking branch 'origin/main' into develop 2021-05-27 14:13:45 +02:00
Andrey Antukh
d4bf3ef6fd 📎 Remove mattermost mention-all workds from error report. 2021-05-27 13:29:29 +02:00
Andrey Antukh
ca5c374ecd 🐛 Fix empty font-family handling on custom fonts page. 2021-05-27 13:21:37 +02:00
Andrey Antukh
69ea8229ca :spakles: Minor improvements on svg uploading on libraries.
Mainly reject svgs that have doctype declaration for security reasons.
2021-05-27 13:00:13 +02:00
Andrey Antukh
4d19b87fff Improve error report on uploading invalid image to library. 2021-05-27 12:40:38 +02:00
Andrey Antukh
8847047fd1 🐛 Fix unexpected exception when user leaves typography name empty. 2021-05-27 12:21:40 +02:00
Andrey Antukh
6e8a5015c9 Add better auth module logging. 2021-05-27 11:52:01 +02:00
Andrey Antukh
e8919ee340 🐛 Add missing email scope to OIDC backend.
And additionaly emit a warn log message about the error.
2021-05-27 11:52:01 +02:00
alonso.torres
f8f506a8be 🐛 Fix some problems with paths 2021-05-27 11:10:30 +02:00
Andrey Antukh
74756db7e6 Merge remote-tracking branch 'origin/main' into develop 2021-05-26 16:58:15 +02:00
Andrey Antukh
96d9e101cc 📎 Update version.txt file. 2021-05-26 16:57:34 +02:00
Andrey Antukh
7eb3693804 📎 Update changelog. 2021-05-26 16:56:59 +02:00
Andrey Antukh
cad2b831ed Make the navigation async by default.
This leaves some time to eventloop to terminate other
async events before navigate.
2021-05-26 16:38:03 +02:00
Andrey Antukh
b2dc849e52 Improve editor lifecycle management. 2021-05-26 16:38:03 +02:00
alonso.torres
6489ad4114 Merge remote-tracking branch 'origin/main' into develop 2021-05-26 16:26:53 +02:00
alonso.torres
0de8bfeba6 🐛 Fix problem when creating a component with empty data 2021-05-26 16:12:29 +02:00
Andrey Antukh
6710d99878 🐛 Fix dashboard ordering issue. 2021-05-26 15:22:41 +02:00
alonso.torres
7a32d902ec 🐛 Fix problem with moving shapes into frames 2021-05-26 14:33:55 +02:00
alonso.torres
52f699c175 🐛 Fix problems with mov-objects 2021-05-26 13:43:57 +02:00
Andrey Antukh
ba211e3cbd 🐛 Fix wrong type usage on libraries changes. 2021-05-26 13:31:07 +02:00
Andrey Antukh
897f41bc7a Fix custom fonts embbedding issue. 2021-05-26 12:39:41 +02:00
Andrey Antukh
2834850337 📎 Add safety check on reg-objects change impl. 2021-05-26 12:14:02 +02:00
Andrey Antukh
67cd877281 🐛 Fix unexpected excetion related to rounding integers. 2021-05-26 11:54:40 +02:00
Eranot
6e18bc9e04 🌐 Add translations for: Portuguese (Brazil).
Currently translated at 38.0% (252 of 662 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/pt_BR/
2021-05-26 11:23:05 +02:00
alonso.torres
6d0b36e9b9 🐛 Fix problem with new nodes in paths 2021-05-26 10:43:29 +02:00
Andrey Antukh
bd8aa8163d Merge branch 'staging' into main 2021-05-26 10:36:12 +02:00
Andrey Antukh
febaec1b1e Merge remote-tracking branch 'origin/staging' into develop 2021-05-25 23:25:27 +02:00
Andrey Antukh
2ac790693a 🐛 Fix CSRNG usage on webworker context. 2021-05-25 23:24:19 +02:00
Andrey Antukh
08dce3bcdc 🐛 Fix possible bug in domain whitelisting checking. 2021-05-25 21:19:13 +02:00
Andrey Antukh
806dc78d2b Merge remote-tracking branch 'origin/staging' into develop 2021-05-25 18:03:37 +02:00
Andrey Antukh
e5d4755619 📎 Revert some changes related to build resource usage. 2021-05-25 16:45:04 +02:00
Andrey Antukh
c44befb957 📎 Minor cosmetic fixes on onboarding ns. 2021-05-25 16:30:49 +02:00
Andrey Antukh
871e849660 Merge branch 'onboarding-1.6-release' into staging 2021-05-25 16:29:54 +02:00
Andrey Antukh
43b34aa279 🐛 Fix many corner cases on custom font management. 2021-05-25 15:41:52 +02:00
Andrey Antukh
6b1e5b4169 📎 Change default jvm options for backend and frontend repl. 2021-05-25 15:41:52 +02:00
elhombretecla
952bcd853e 🎉 Fix release notes version at profile 2021-05-25 15:35:10 +02:00
elhombretecla
77446a71e2 💄 Changes at onboarding content 2021-05-25 15:35:10 +02:00
elhombretecla
d722f37468 Add new 1.6 onboarding info 2021-05-25 15:35:10 +02:00
elhombretecla
9757836067 🐛 Fix basic onboarding CSS 2021-05-25 15:35:10 +02:00
Yannik Rödel
7d80a5a7f7 🌐 Add translations for: German.
Currently translated at 91.9% (609 of 662 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/de/
2021-05-25 14:31:59 +02:00
alonso.torres
a9e8115088 Merge remote-tracking branch 'origin/staging' into develop 2021-05-25 14:01:42 +02:00
alonso.torres
f92dc6f4b4 🐛 Fix problem with colaborative editing 2021-05-25 13:24:02 +02:00
alonso.torres
e43ab51b7d 🐛 Fix problem with locked shapes when change parents 2021-05-25 12:23:33 +02:00
alonso.torres
6a68e9c118 ♻️ Refactor embed resouces 2021-05-25 10:12:09 +02:00
alonso.torres
95cb6d132b 🐛 Fix problem with :multiple for colors and typographies 2021-05-25 10:11:50 +02:00
alonso.torres
ed95b59003 🐛 Fix issue when group creation leaves an empty group 2021-05-25 10:11:50 +02:00
alonso.torres
5730769a19 🐛 Fix order on color palette 2021-05-24 15:09:34 +02:00
alonso.torres
2a67008531 🐛 Fix problem with color picker positioning 2021-05-24 15:09:34 +02:00
alonso.torres
651230d40f 🐛 Fix problem with Safari and render frames 2021-05-24 15:09:34 +02:00
alonso.torres
28c5fd4583 🐛 Fix problem with imported SVG on editing paths 2021-05-24 15:09:34 +02:00
luthfi azhari
944e7c6e3d 🌐 Add translations for: Indonesian.
Currently translated at 7.2% (48 of 662 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/id/
2021-05-23 23:33:08 +02:00
Amine Gdoura
3094fe2855 🌐 Add translations for: Arabic.
Currently translated at 11.3% (75 of 662 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/ar/
2021-05-23 23:33:07 +02:00
Gizem Akgüney
deb0ee3d29 🌐 Add translations for: Turkish.
Currently translated at 39.5% (262 of 662 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/tr/
2021-05-23 23:33:07 +02:00
Antonio
23076727c7 🌐 Add translations for: Catalan.
Currently translated at 20.9% (139 of 662 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/ca/
2021-05-23 23:33:06 +02:00
Andrés Moya
42072f2584 🐛 Add filter to remove groups without content in all files 2021-05-21 09:51:24 +02:00
Andrey Antukh
b50ffa087d Sort & validate translations files. 2021-05-20 17:03:09 +02:00
Andrey Antukh
03b74b582e 📎 Update changelog file. 2021-05-20 17:01:06 +02:00
Andrey Antukh
4af5341f81 Merge branch 'translations' into develop 2021-05-20 16:56:33 +02:00
Andrey Antukh
77ab0706be 🐛 Fix some issues on recent files loading. 2021-05-20 16:55:57 +02:00
Andrey Antukh
1d6094e893 Update i18n module to provide more langs. 2021-05-20 16:54:42 +02:00
Jan C. Borchardt
af29ca92cc 🌐 Add translations for: English.
Currently translated at 100.0% (661 of 661 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/en/
2021-05-20 16:12:19 +02:00
Amine Gdoura
c83bfe0b16 🌐 Add translations for: Arabic.
Currently translated at 7.4% (49 of 661 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/ar/
2021-05-20 16:12:19 +02:00
George Lemon
891ce8a33d 🌐 Add translations for: Romanian.
Currently translated at 100.0% (661 of 661 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/ro/
2021-05-20 16:12:19 +02:00
Simon Bechmann
c356e64be5 🌐 Add translations for: Danish.
Currently translated at 17.7% (117 of 661 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/da/
2021-05-20 16:12:19 +02:00
Eranot
245f7256e1 🌐 Add translations for: Portuguese (Brazil).
Currently translated at 35.0% (232 of 661 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/pt_BR/
2021-05-20 16:12:19 +02:00
Gizem Akgüney
e0a0b82958 🌐 Add translations for: Turkish.
Currently translated at 34.0% (225 of 661 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/tr/
2021-05-20 16:12:19 +02:00
Andrey Antukh
2b4a78ea28 🌐 Added translation for: Indonesian. 2021-05-20 16:12:19 +02:00
Andrey Antukh
33a1e29a0c 🌐 Added translation for: Arabic. 2021-05-20 16:12:19 +02:00
Andrey Antukh
8a76d8322f 🌐 Added translation for: Romanian. 2021-05-20 16:12:19 +02:00
Andrey Antukh
1ff9b24818 Merge pull request #966 from penpot/remove-back-xml-parse
⬆️ Move svg parsing to the frontend with Tubax
2021-05-20 11:57:59 +02:00
alonso.torres
4613aef1c8 🐛 Fix problem with index updating 2021-05-20 11:50:41 +02:00
alonso.torres
7ff608ff0b ⬆️ Move svg parsing to the frontend with Tubax 2021-05-20 11:49:45 +02:00
Andrey Antukh
87aa4622b4 Don't prefix events on audit archiver. 2021-05-20 11:14:21 +02:00
Andrey Antukh
188126a895 Properly use dumped objects on initial data load process. 2021-05-20 10:52:20 +02:00
Andrey Antukh
f57fb5006d Merge branch 'niwinz-auditlog-fixes' into develop 2021-05-20 10:51:06 +02:00
Andrey Antukh
6c1e13b6e5 Improve profile props handling and audit log integration. 2021-05-20 10:50:53 +02:00
Andrey Antukh
344622b1c1 🐛 Fix many on handle some audit events. 2021-05-20 10:50:53 +02:00
Andrey Antukh
20b8269766 Improve bundle generation scripts. 2021-05-20 10:50:53 +02:00
alonso.torres
810f868b67 🐛 Fix problem with shapes with no transform to path 2021-05-19 16:52:21 +02:00
Andrey Antukh
9c99ec3410 🐛 Fix issues related to font family names with spaces. 2021-05-19 14:23:51 +02:00
Andrey Antukh
2ea200be78 🎉 Add new font selector to workspace. 2021-05-19 14:23:51 +02:00
Andrey Antukh
8831f3241c Merge pull request #957 from penpot/change-resize-key
🎉 Use shift instead of ctrl/cmd to fix aspect ratio
2021-05-19 12:06:26 +02:00
Andrey Antukh
3752322c01 Merge branch 'develop' into change-resize-key 2021-05-19 12:05:56 +02:00
Andrey Antukh
fa87187849 📎 Set correct version on version.txt file. 2021-05-19 12:02:38 +02:00
Andrey Antukh
662f87080c 📎 Minor cosmetic changes. 2021-05-19 11:41:16 +02:00
alonso.torres
6003591ecd Merge remote-tracking branch 'origin/staging' into develop 2021-05-17 17:55:25 +02:00
alonso.torres
c618317a76 Minor improvements 2021-05-17 17:08:24 +02:00
alonso.torres
5d689551e3 🐛 Fix problem with rounding 2021-05-17 16:16:27 +02:00
Andrés Moya
c9e7be28af 🎉 Use shift instead of ctrl/cmd to fix aspect ratio 2021-05-17 14:19:44 +02:00
alonso.torres
346fb8fb11 Transform simple shapes to path on double click 2021-05-17 13:12:20 +02:00
Andrey Antukh
3fdcea78e4 Properly configure page default timeouts (exporter). 2021-05-17 12:02:21 +02:00
Andrey Antukh
fb2d1e7953 🎉 Add proper audit log impl. 2021-05-17 12:02:21 +02:00
Andrey Antukh
ce19bcd364 Minor improvements on batching channel impl. 2021-05-17 12:02:21 +02:00
Andrey Antukh
610afc7702 Fix msbus/redis logged errors on restarting (repl). 2021-05-17 12:02:21 +02:00
Andrey Antukh
6557792a98 Unify all deletion delays on main config. 2021-05-17 12:02:21 +02:00
Andrey Antukh
a3e464aea3 Add better error reporting on config validation. 2021-05-17 12:02:21 +02:00
Andrey Antukh
087f2aee09 ⬆️ Update backend dependencies. 2021-05-17 12:02:21 +02:00
alonso.torres
88d8431985 Merge remote-tracking branch 'origin/staging' into develop 2021-05-17 11:36:28 +02:00
alonso.torres
ea22f3f81c 🐛 Fixes problem on shape creation 2021-05-17 11:34:39 +02:00
alonso.torres
93d8c171be 🐛 Fix problems with snap index regeneration 2021-05-14 18:08:15 +02:00
alonso.torres
b2e01cd52b Performance improvements 2021-05-13 17:06:45 +02:00
Andrey Antukh
9afe499075 Merge remote-tracking branch 'origin/staging' into develop 2021-05-13 14:36:09 +02:00
Andrey Antukh
91fe0b0985 Add more complete font conversion suite. 2021-05-13 14:34:31 +02:00
Andrey Antukh
90aab92a59 Add more helpers to util/dom ns. 2021-05-13 14:34:31 +02:00
Andrey Antukh
d613d00bca Minor improvements on workspace initialization. 2021-05-13 14:34:31 +02:00
Andrey Antukh
c15c277b03 ⬆️ update deps. 2021-05-13 14:34:31 +02:00
Andrey Antukh
a86c4a8309 🎉 Add resize observer as rx stream. 2021-05-13 14:34:31 +02:00
Andrey Antukh
4b7f82a9d9 ♻️ Improves shortcuts lifecycle management. 2021-05-13 14:34:31 +02:00
Andrey Antukh
c33c3fb2fa 📚 Update changelog. 2021-05-13 14:34:31 +02:00
Andrey Antukh
07f3d48a9d 🔧 Allow override oidc scopes.
And relax default scopes to `profile` and `openid`.
2021-05-13 14:34:31 +02:00
Andrey Antukh
f5a6159e1d Merge remote-tracking branch 'origin/staging' into develop 2021-05-13 14:33:18 +02:00
alonso.torres
3656ab977b Improve frame thumbnail rendering 2021-05-13 11:00:28 +02:00
Andrey Antukh
891506ab52 📎 Prepare next development cycle. 2021-05-13 10:55:20 +02:00
Andrey Antukh
37f9a5d9f2 📎 Update changelog file. 2021-05-13 10:54:19 +02:00
Andrey Antukh
958c5ebcc6 Merge branch 'weblate/translations' into develop 2021-05-13 10:52:40 +02:00
Andrey Antukh
b8afdda856 🌐 Add translations for: French.
Currently translated at 82.4% (541 of 656 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/fr/
2021-05-13 10:48:04 +02:00
Andrey Antukh
2c250a2740 🌐 Add translations for: German.
Currently translated at 92.2% (605 of 656 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/de/
2021-05-13 10:48:03 +02:00
Simon Bechmann
512b66cb04 🌐 Add translations for: Danish.
Currently translated at 8.2% (54 of 656 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/da/
2021-05-13 10:48:03 +02:00
Eranot
a11cec9fdc 🌐 Add translations for: Portuguese (Brazil).
Currently translated at 34.6% (227 of 656 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/pt_BR/
2021-05-13 10:48:03 +02:00
Andrey Antukh
81e5a8c925 🌐 Added translation for: Danish. 2021-05-13 10:48:03 +02:00
Allan Nordhøy
a12f369bda 🌐 Add translations for: Norwegian Bokmål.
Currently translated at 26.5% (174 of 656 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/nb_NO/
2021-05-13 10:48:03 +02:00
Eranot
ec2f88ebc0 🌐 Add translations for: Portuguese (Brazil).
Currently translated at 5.7% (38 of 656 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/pt_BR/
2021-05-13 10:48:03 +02:00
Andrey Antukh
c449492a33 🌐 Added translation for: Norwegian Bokmål. 2021-05-13 10:48:03 +02:00
Guilherme Dimas
5614aceaa8 🌐 Add translations for: Portuguese (Brazil).
Currently translated at 3.3% (22 of 656 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/pt_BR/
2021-05-13 10:48:03 +02:00
Eranot
d6e7dfc648 🌐 Add translations for: Portuguese (Brazil).
Currently translated at 3.3% (22 of 656 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/pt_BR/
2021-05-13 10:48:03 +02:00
Jan C. Borchardt
b84222e171 🌐 Add translations for: English.
Currently translated at 100.0% (656 of 656 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/en/
2021-05-13 10:48:03 +02:00
Andrey Antukh
8e785e62e3 Merge branch 'main' into develop 2021-05-12 15:21:07 +02:00
alonso.torres
4977c22b08 🐛 Fix problem with text editing auto-height 2021-05-12 15:18:30 +02:00
elhombretecla
5c0bc1cf84 💄 Add new color assets styles and titles 2021-05-12 13:38:30 +02:00
Andrés Moya
ddbaee228a 🎉 Group typographies 2021-05-12 13:19:36 +02:00
Andrés Moya
c858707c39 🎉 Group color assets 2021-05-12 13:19:36 +02:00
Andrey Antukh
83bca7fb10 Merge branch 'main' into develop 2021-05-12 10:29:21 +02:00
Andrey Antukh
7d19518ba8 📎 Set verstion to 1.5.4-alpha 2021-05-12 10:28:08 +02:00
alonso.torres
9775b79a0b 🐛 Fix problem with memoized group 2021-05-12 10:25:17 +02:00
alonso.torres
e1dfd91e24 Frame thumbnails 2021-05-11 18:18:45 +02:00
Andrey Antukh
b4351208cc Merge remote-tracking branch 'origin/main' into develop 2021-05-11 09:05:03 +02:00
alonso.torres
ae1e9a861b Improve handling of shape transform modifiers 2021-05-11 08:16:42 +02:00
Andrey Antukh
ab799c83ee 📚 Update changelog and set version to 1.5.3-alpha. 2021-05-10 16:57:40 +02:00
alonso.torres
4118e53d7d 🐛 Fix problem with undo 2021-05-10 16:48:26 +02:00
Andrés Moya
384b464f0f Translate automatic names of new files and projects 2021-05-10 15:47:51 +02:00
Andrey Antukh
ecacd47523 ⬆️ Update babashka to 0.4.0 on devenv docker. 2021-05-10 14:53:47 +02:00
Andrey Antukh
334ac26f0d Add improved activity logging. 2021-05-10 14:53:47 +02:00
Andrey Antukh
e94e202cef 🐛 Fix unexpected exception bug on exporter.
Puppetter bug, fixed upgrading it.
2021-05-10 14:53:47 +02:00
Andrey Antukh
7cf120e2e1 Move events batching to a util/async ns. 2021-05-10 14:53:47 +02:00
Andrey Antukh
0f8e2a9b1b 🎉 Add experimental trazability to update-file. 2021-05-10 14:53:47 +02:00
Andrey Antukh
c70bc5baff ♻️ Refactor dashboard state management.
Mainly for performance, also affects backend endpoints.
2021-05-10 14:53:47 +02:00
Andrey Antukh
e7b3f12b71 🔥 Remove duplicated change apply operation. 2021-05-10 14:53:47 +02:00
Andrey Antukh
a03882de76 📎 Minor changes on log4j2-devenv.xml file. 2021-05-10 14:53:47 +02:00
Andrey Antukh
d9a4a8d6de Merge pull request #925 from penpot/resize-text
Resize text
2021-05-10 13:40:08 +02:00
Andrés Moya
4c48f34d61 🎉 Add resize scale for texts 2021-05-10 13:28:15 +02:00
Andrés Moya
ebb6df4696 ♻️ Refactor shortcuts and change image shortcut 2021-05-10 13:28:06 +02:00
alonso.torres
7033ae4f2e 🐛 Fixes problem recreating indices 2021-05-10 10:21:04 +02:00
Andrés Moya
0cc600de6d Preserve layer order when copying shapes to the clipboard 2021-05-09 15:14:17 +02:00
alonso.torres
c1278194ce 🐛 Fix snap index problem 2021-05-09 15:13:04 +02:00
Andrey Antukh
50bdcea81b ⬆️ Upgrade cuerdas version. 2021-05-09 12:28:52 +02:00
Andrey Antukh
c5fa8f560c 📎 Fix linter issues. 2021-05-09 12:28:38 +02:00
alonso.torres
6d5276c0c6 Merge remote-tracking branch 'origin/main' into develop 2021-05-07 13:34:48 +02:00
Andrey Antukh
4405bd95f9 🔥 Remove unused stacktrace. 2021-05-07 13:15:48 +02:00
alonso.torres
3bb3fcfbda 🐛 Fix problems with empty paths and shortcuts 2021-05-07 13:13:58 +02:00
alonso.torres
5e0101e424 🐛 Fixes problem with edition state and paths 2021-05-07 13:13:58 +02:00
Andrey Antukh
2c96ecac87 🐛 Fix wrong query for obtain profile default project-id. 2021-05-07 13:13:58 +02:00
alonso.torres
9fcddc37f6 🐛 Fix problem with command 2021-05-07 13:13:58 +02:00
Andrey Antukh
1fd2b3fff8 Merge remote-tracking branch 'origin/main' into develop 2021-05-06 19:53:21 +02:00
Andrey Antukh
39066bfee3 📚 Update changelog. 2021-05-06 18:46:26 +02:00
Andrey Antukh
2d75efbace 🐛 Add correct error mesage when using an expired token. 2021-05-06 18:46:26 +02:00
Andrey Antukh
8a8403834f 💄 Cosmetic change on onboarding modal. 2021-05-06 18:46:26 +02:00
Andrey Antukh
e98b88f673 Set default role on invitation modal.
Just a quality of life improvement.
2021-05-06 18:46:26 +02:00
Andrey Antukh
d2f8d4a306 Increase default team invitation token expiration. 2021-05-06 18:46:26 +02:00
Andrey Antukh
2138530f3e 🎉 Add profile-id on mattermost error reporter. 2021-05-06 18:46:26 +02:00
Andrey Antukh
94d94684c8 📎 Minor logging change on mattermost ns. 2021-05-06 18:46:26 +02:00
alonso.torres
550164cf5e Merge remote-tracking branch 'origin/main' into develop 2021-05-06 16:34:58 +02:00
alonso.torres
5352918ff8 🐛 Fix problem when deleting all nodes from a path 2021-05-06 15:55:02 +02:00
alonso.torres
57b6807333 🐛 Fix problem when copy image shapes 2021-05-06 15:55:02 +02:00
Andrey Antukh
e3171d9ee5 💄 Cosmetic fixes on events ns. 2021-05-06 14:13:54 +02:00
Andrey Antukh
8ef49d2ec4 Minor improvement on event ordering on signup. 2021-05-06 14:13:54 +02:00
Andrey Antukh
3ce4769e8d Report errors on events. 2021-05-06 14:13:54 +02:00
Andrey Antukh
abb244c940 ♻️ Refactor exporter state initialization. 2021-05-06 14:13:54 +02:00
Andrey Antukh
4825efb582 Add default secret key env on devenv. 2021-05-06 14:13:54 +02:00
Andrey Antukh
2195b8932e 🐛 Fix status code checking on telemetry client task. 2021-05-06 14:13:54 +02:00
Andrey Antukh
81c406bb60 🎉 Add db/inet type factory. 2021-05-06 14:13:54 +02:00
Andrey Antukh
9d28807796 🔥 Remove unused config props. 2021-05-06 14:13:54 +02:00
Andrey Antukh
6dbabf2935 ♻️ Refactor application initialization. 2021-05-06 14:13:54 +02:00
Andrey Antukh
4018e4df79 ♻️ Refactor storage namespace (frontend). 2021-05-06 14:13:54 +02:00
Andrey Antukh
8835216ca9 🎉 Add analytics related event namespace. 2021-05-06 14:13:54 +02:00
Andrey Antukh
04ab99c8ad Minor improvement on try* helper on common/exceptions. 2021-05-06 14:13:54 +02:00
Andrey Antukh
1bc210c9a9 ⬆️ Update frontend dependencies.
And add user agent parsing library dependency.
2021-05-06 14:13:54 +02:00
Andrey Antukh
6250b457ad Allow raw logging messages. 2021-05-06 14:13:54 +02:00
Andrey Antukh
460c824117 📎 Minor changes on migration files.
Making them reusable.
2021-05-06 14:13:54 +02:00
Andrey Antukh
77c2a98304 🎉 Add insert-multi helper on db namespace. 2021-05-06 14:13:54 +02:00
Andrey Antukh
8ad8196d70 Allow overide the secret-key on setup module.
Usefull when using a pre-shared secret key.
2021-05-06 14:13:54 +02:00
Andrey Antukh
fa4410bea3 Merge branch 'staging' into main 2021-05-06 12:55:34 +02:00
Andrés Moya
af23d62568 🐛 Remove interactions when the destination artboard is deleted 2021-05-06 12:52:43 +02:00
alonso.torres
e241273a1e Merge remote-tracking branch 'origin/staging' into develop 2021-05-06 12:08:40 +02:00
alonso.torres
269efc98c3 📚 Updates changes 2021-05-06 11:57:00 +02:00
alonso.torres
2c3a3845ac 🐛 Fix problem with embed fonts 2021-05-06 11:53:39 +02:00
Andrey Antukh
4bf0ae0a9d Deactivate profile-activity middleware. 2021-05-06 10:27:05 +02:00
alonso.torres
a3ead3aa6d 🐛 Fix error on collaboratibe editing 2021-05-05 16:40:40 +02:00
alonso.torres
d965736751 🐛 Fix problems with interactions in view mode 2021-05-05 16:14:57 +02:00
alonso.torres
437a6cf476 🐛 Fix problem with interactions on deleted frames 2021-05-05 14:47:41 +02:00
alonso.torres
a91a57581f 🐛 Fix issues with non updated selected 2021-05-05 14:27:19 +02:00
alonso.torres
be0d1c19fa ♻️ New namespace for state helpers 2021-05-05 14:27:19 +02:00
Andrey Antukh
447e1bf435 Merge remote-tracking branch 'weblate/develop' into translations 2021-05-05 11:36:28 +02:00
andy
6a62f4d3fb 🌐 Add translations for: Spanish.
Currently translated at 96.7% (616 of 637 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/es/
2021-05-05 11:32:04 +02:00
Andrey Antukh
f507722f43 Merge remote-tracking branch 'origin/staging' into develop 2021-05-05 11:31:10 +02:00
Andrey Antukh
0030b9c3ac 🎉 Add accidentally deleted germany translations file. 2021-05-05 11:17:07 +02:00
Andrey Antukh
4db7a6782b 🎉 Add 1.5 relnotes modal. 2021-05-05 10:54:14 +02:00
Andrey Antukh
bb3be3d495 Merge pull request #903 from penpot/visual-fixes-april2 2021-05-05 10:51:31 +02:00
elhombretecla
fe28648a88 💄 Review icons 2021-05-05 10:48:42 +02:00
elhombretecla
2b393355ad 💄 Change messages css 2021-05-05 10:48:42 +02:00
elhombretecla
79f5c6a008 🎉 Quick fixes 2021-05-05 10:48:42 +02:00
elhombretecla
f75ee48795 🎉 Add viewer fixes 2021-05-05 10:47:55 +02:00
elhombretecla
81d9727d03 🎉 Add new svg icons 2021-05-05 10:47:55 +02:00
elhombretecla
4ac3573ab1 🎉 Add new title and th styles 2021-05-05 10:47:33 +02:00
alonso.torres
92b79f1731 🐛 Fix problem with make curve/corner in paths 2021-05-05 09:48:38 +02:00
alonso.torres
32b623e82b Improve performance of z-index update 2021-05-05 09:39:49 +02:00
alonso.torres
285a0d5f47 Changes indices to update only necesary data 2021-05-05 09:39:49 +02:00
Andrey Antukh
308fd8d4b0 Merge branch 'staging' into develop 2021-05-04 14:35:14 +02:00
Andrey Antukh
4000855f45 🚑 Add missing files on exporter subdirectory. 2021-05-04 14:34:27 +02:00
Andrey Antukh
ca777790d4 Merge branch 'staging' into develop 2021-05-04 14:30:08 +02:00
Andrey Antukh
e15a212b14 🎉 Add dashboard custom fonts management. 2021-05-04 14:21:31 +02:00
Andrey Antukh
8c6863e2ad ⬆️ Update exporter dependencies. 2021-05-04 14:15:03 +02:00
Andrey Antukh
5e329e62b3 Revert session cookie name change. 2021-05-04 14:14:31 +02:00
alonso.torres
2582e87ffa Improve path editor 2021-05-04 11:44:23 +02:00
Andrés Moya
1c0822ffb3 Merge pull request #900 from penpot/visual-fixes-april
Visual fixes april
2021-05-04 11:08:33 +02:00
Andrey Antukh
9d0877e985 🌐 Added translation for: Portuguese (Brazil). 2021-05-04 11:03:02 +02:00
elhombretecla
a6fb4a8271 💄 Review icons 2021-05-04 10:31:31 +02:00
elhombretecla
9adf0b3611 💄 Change messages css 2021-05-04 10:31:31 +02:00
elhombretecla
e3896da3c4 🎉 Quick fixes 2021-05-04 10:31:31 +02:00
elhombretecla
f5ad7dc2dc 🎉 Add viewer fixes 2021-05-04 10:31:31 +02:00
elhombretecla
d0af14c40f 🎉 Add new svg icons 2021-05-04 10:31:18 +02:00
elhombretecla
d8fb575d46 🎉 Add new title and th styles 2021-05-04 10:22:23 +02:00
Andrey Antukh
aaf0618d24 Merge remote-tracking branch 'origin/staging' into develop 2021-04-29 20:45:45 +02:00
Andrey Antukh
92d1dcb3d4 Merge pull request #885 from penpot/alotor/improve-snaps
Improve snaps performance
2021-04-29 15:43:50 +02:00
alonso.torres
a9e93a5ace Improve snap responsiveness 2021-04-29 15:08:47 +02:00
Andrey Antukh
e9ae59ad00 Merge remote-tracking branch 'origin/staging' into develop 2021-04-29 14:52:12 +02:00
Andrey Antukh
056b80939e ⬆️ Update beicon library (frontend). 2021-04-29 13:16:37 +02:00
Andrés Moya
3a4f63848d 🐛 Fix active area for interactive shapes in view mode 2021-04-29 11:50:31 +02:00
alonso.torres
907f39c73f 🐛 Fix problem with selection after create paths 2021-04-29 11:43:46 +02:00
alonso.torres
91f60000b3 Memoize shapes 2021-04-29 11:39:20 +02:00
alonso.torres
0b6c2df5b6 Change some verify to asserts 2021-04-29 11:39:20 +02:00
alonso.torres
ac27d35ff5 Improve move shapes performance 2021-04-29 11:39:20 +02:00
Andrés Moya
c62905b9a8 🐛 Fix ordering of copy+pasted shapes after rect select 2021-04-28 16:52:02 +02:00
Andrés Moya
2974fb0f4e 🐛 Fix page always visible when selecting it in sitemap 2021-04-28 16:52:02 +02:00
Andrés Moya
df73df311b 🐛 Fix error entering search in dashboard 2021-04-28 12:43:11 +02:00
Andrés Moya
b0575e969f ♻️ Refactor keyboard events to replace a deprecated parameter 2021-04-28 12:02:24 +02:00
Andrey Antukh
547a472016 Merge pull request #876 from penpot/alotor/improved-changes-performance
Improved changes performance
2021-04-27 18:38:24 +02:00
alonso.torres
d67dd21c56 Improved performance on move and text resize 2021-04-27 18:00:59 +02:00
alonso.torres
59187f9ff4 ♻️ Refactor commit-changes and undo actions 2021-04-27 18:00:59 +02:00
Andrés Moya
da8a32047c ♻️ Rework assets selection to have a single selected set 2021-04-27 15:01:13 +02:00
Andrey Antukh
4c93ef4bb3 Merge pull request #871 from penpot/feat/path-move-nodes-keyboard
Add move path points with keyboard
2021-04-26 20:13:45 +02:00
Andrey Antukh
e9b8295bf1 📎 Update circle ci config file. 2021-04-26 20:08:32 +02:00
alonso.torres
14475fdc67 Add move path points with keyboard 2021-04-26 18:30:56 +02:00
alonso.torres
21cf845c02 🐛 Removed unused import 2021-04-26 15:08:29 +02:00
alonso.torres
2cea7405b5 🐛 Allow use library colors when defining gradients 2021-04-26 15:08:29 +02:00
alonso.torres
dff067c1a7 🐛 Fix issues with promote owner panel 2021-04-26 15:08:29 +02:00
alonso.torres
a507ab0e07 🐛 Fix visual problem with group invite 2021-04-26 15:08:29 +02:00
alonso.torres
1ee1cada9e 🐛 Fixes problems with blending modes 2021-04-26 15:08:29 +02:00
alonso.torres
1584f3771b 🐛 Fix problem when opening the context menu in dashboard at the bottom 2021-04-26 15:08:29 +02:00
alonso.torres
1ec423c11d 🐛 Fix problems with text editor selection 2021-04-26 15:08:29 +02:00
alonso.torres
c3611c3047 🐛 Fix problem displaying team statistics 2021-04-26 15:08:29 +02:00
alonso.torres
41e57bcb6b 🐛 Fix problem with zoom an selection rect 2021-04-26 15:08:29 +02:00
Andrey Antukh
057b0e163c 📎 Minor changes on CI configuration. 2021-04-26 14:15:04 +02:00
Andrey Antukh
3840e4c214 Merge branch 'staging' into develop 2021-04-26 14:06:35 +02:00
Andrey Antukh
715900d0ef 📎 Add tests to shadow-cljs.edn source paths list. 2021-04-26 14:04:25 +02:00
Andrés Moya
e9cbfbe7f8 📚 Update CHANGES.md 2021-04-26 13:33:27 +02:00
elhombretecla
a14d8e2b41 🎉 Add pin fill icon 2021-04-26 13:27:58 +02:00
Andrey Antukh
d57f4cebff 🐛 Fix shadow-cljs.edn file. 2021-04-26 12:59:31 +02:00
Andrey Antukh
cbe54d0bbe 🐛 Remove duplicate prop from shadow-cljs config file. 2021-04-26 12:39:59 +02:00
Andrey Antukh
2034f0a7c2 Merge branch 'staging' into develop 2021-04-26 11:24:33 +02:00
Andrey Antukh
ce5429a531 Merge branch 'main' into staging 2021-04-26 11:23:55 +02:00
Andrey Antukh
df11ef4aca 🔥 Remove unused requires. 2021-04-26 11:23:37 +02:00
Andrey Antukh
8ecc0b3cd9 🐛 Fix email registration whitelist handling. 2021-04-26 11:19:50 +02:00
Andrey Antukh
5d2f4bac76 Replace random session tokens with JWE tokens.
We still maintain the http session state on the database for to prevent
replay attacks to the main application. But internally, on less critical
parts of the infraestructure, it usefull have access to the identified
user without hit the main database for that information.
2021-04-25 20:35:36 +02:00
Andrey Antukh
bb73ddc58f Replace random session tokens with JWE tokens.
We still maintain the http session state on the database for to prevent
replay attacks to the main application. But internally, on less critical
parts of the infraestructure, it usefull have access to the identified
user without hit the main database for that information.
2021-04-25 20:34:32 +02:00
Andrey Antukh
0f91f02508 📎 Prepare next development cycle. 2021-04-24 12:17:39 +02:00
Andrey Antukh
ce072937e4 📎 Update changelog. 2021-04-24 12:17:01 +02:00
Andrey Antukh
3b5b25fc86 🔥 Remove automatic path handling on config.
This makes that when you want to use penpot in a prefix,
you will need explicitly set the prefix on the configuration.
2021-04-24 12:12:13 +02:00
Andrey Antukh
170ab9e93b ⬆️ Update deps and devenv. 2021-04-24 11:49:58 +02:00
Andrés Moya
a67370bb83 ♻️ Optimize some dependencies 2021-04-23 15:26:33 +02:00
Andrés Moya
42cc97f86b ♻️ Validate translations 2021-04-23 15:26:33 +02:00
Andrés Moya
e3440ad773 🐛 Fix some bugs and omissions in assets 2021-04-23 15:26:33 +02:00
Andrés Moya
5e73e68ef7 🐛 Disable autocomplete color names 2021-04-23 15:18:33 +02:00
Andrés Moya
c16434e608 🎉 Autocomplete color fields 2021-04-23 15:18:33 +02:00
Andrés Moya
9e39e53488 Merge pull request #864 from penpot/fix/close-paths
Close paths
2021-04-23 13:30:39 +02:00
alonso.torres
1a7b098282 Improvements to loop removing 2021-04-23 13:29:54 +02:00
alonso.torres
2184286a78 Merge closing subpaths for seamless paths 2021-04-23 13:29:54 +02:00
Andrey Antukh
3583eb6aa9 🐛 Fix encoding issue on reading po files. 2021-04-23 12:57:33 +02:00
Andrey Antukh
adff40a4e7 Merge branch 'translations' into develop 2021-04-23 08:04:52 +02:00
Andrés Moya
f7064c5c0e 🌐 Add translations for: Spanish.
Currently translated at 98.7% (612 of 620 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/es/
2021-04-23 07:59:33 +02:00
Andrey Antukh
208b6515a4 🌐 Add translations for: Spanish.
Currently translated at 98.8% (613 of 620 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/es/
2021-04-23 07:59:33 +02:00
Andrey Antukh
66e54f7bd2 🌐 Add translations for: Spanish.
Currently translated at 98.8% (613 of 620 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/es/
2021-04-23 07:59:33 +02:00
andy
d0baf76599 🌐 Add translations for: Spanish.
Currently translated at 98.8% (613 of 620 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/es/
2021-04-23 07:59:33 +02:00
Andrey Antukh
1757db3051 🌐 Add translations for: Spanish.
Currently translated at 98.8% (613 of 620 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/es/
2021-04-23 07:59:33 +02:00
andy
c7cfca8437 🌐 Add translations for: Spanish.
Currently translated at 98.8% (613 of 620 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/es/
2021-04-23 07:59:33 +02:00
Andrey Antukh
3efb50b103 🌐 Add translations for: Spanish.
Currently translated at 98.7% (612 of 620 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/es/
2021-04-23 07:59:33 +02:00
andy
be5c382ace 🌐 Add translations for: Spanish.
Currently translated at 98.7% (612 of 620 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/es/
2021-04-23 07:59:33 +02:00
Andrey Antukh
d06f08e156 🌐 Add translations for: Spanish.
Currently translated at 98.7% (612 of 620 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/es/
2021-04-23 07:59:33 +02:00
Andrés Moya
43f7750658 Merge pull request #851 from penpot/advanced-path-options
Advanced path options
2021-04-22 16:02:09 +02:00
alonso.torres
65ad46ab38 Shortcuts for paths 2021-04-22 14:08:12 +02:00
Andrey Antukh
432d24dc94 🐛 Fix manage.sh script on docker images. 2021-04-22 07:49:53 +02:00
alonso.torres
6331dff484 Snapping 180 angle with opposites handlers 2021-04-21 17:40:09 +02:00
alonso.torres
961a7a2e03 Additional changes to path editing 2021-04-21 17:40:09 +02:00
alonso.torres
c7683dfd80 Improved make curve options 2021-04-21 17:40:09 +02:00
alonso.torres
de11e85d2b ♻️ Refactor path utils 2021-04-21 17:40:09 +02:00
alonso.torres
0455aaa4cd Undo/redo paths 2021-04-21 17:40:09 +02:00
alonso.torres
e2cf3a5a98 Adds path new-point edition 2021-04-21 17:40:09 +02:00
Andrés Moya
f7712f2b40 Update CHANGES.md 2021-04-21 17:26:56 +02:00
Andrés Moya
41bf436c3a Disallow relative substraction in numeric fields 2021-04-20 17:45:28 +02:00
Andrey Antukh
9aee88f9f1 ⬆️ Update backend dependencies. 2021-04-20 16:42:21 +02:00
Andrey Antukh
94a3c5853b ⬆️ Update frontend dependencies.
And fix breaking changes on logging library.
2021-04-20 16:42:21 +02:00
Andrey Antukh
55ea84a056 Add more adaptations to make app run in a prefixed path. 2021-04-20 16:42:21 +02:00
Andrey Antukh
2828ccda7f Add the ability to check roles to openid integration. 2021-04-20 16:42:21 +02:00
Andrey Antukh
465a25145d Merge pull request #850 from penpot/smart-inputs
Smart inputs
2021-04-20 15:56:37 +02:00
Andrés Moya
d64eaab0b9 💄 Minor aesthetics 2021-04-20 15:14:24 +02:00
Andrés Moya
fad9d2fd3a 🎉 Allow calculations in numeric fields 2021-04-20 13:32:36 +02:00
Andrey Antukh
dd92e5d773 🐛 Fix bug in font embedding. 2021-04-16 12:16:13 +02:00
Andrey Antukh
2b35dce037 🎉 Add cache for font fetching on embedd ns. 2021-04-16 12:16:13 +02:00
Andrey Antukh
a777e8e42a 🐛 Set correct locale code for Greek. 2021-04-16 12:16:13 +02:00
Andrey Antukh
88eb6abdd6 Improve time related functions (frontend). 2021-04-16 12:16:13 +02:00
Andrey Antukh
e4d4245b6c Move data.colors under workspace namespace. 2021-04-16 12:16:13 +02:00
Andrey Antukh
874378869d 🔥 Remove legacy system user and team. 2021-04-16 12:16:13 +02:00
Andrés Moya
dd6bd6bbff 🐛 Fix frontend tests 2021-04-16 11:38:51 +02:00
Andrey Antukh
d946aceacb Merge branch 'main' into develop 2021-04-15 17:34:40 +02:00
Andrey Antukh
e3691cc0e3 🔥 Remove console.log. 2021-04-15 17:10:49 +02:00
Andrey Antukh
db7518025d 🎉 Add html template for feedback email. 2021-04-15 17:10:49 +02:00
Andrey Antukh
ac4bfc9bac 🐛 Fix excesive font fetching on embedding it. 2021-04-15 17:10:49 +02:00
Andrey Antukh
63b95e71a7 🎉 Add generic oauth2/openid-connect authentication subsystem. 2021-04-15 13:24:35 +02:00
Andrey Antukh
9e5923004f Merge branch 'main' into develop 2021-04-15 12:44:58 +02:00
Andrey Antukh
d01eb30ef2 Improve default docker-compose with env file. 2021-04-15 11:54:55 +02:00
Andrés Moya
b585c2ac22 Merge pull request #842 from penpot/advanced-path-options
Advanced path options
2021-04-14 16:58:16 +02:00
alonso.torres
74a09301a7 Shift+select path nodes 2021-04-14 16:57:25 +02:00
alonso.torres
07799d9b01 Path improvements 2021-04-14 16:57:25 +02:00
alonso.torres
48ba80c6e2 📚 Updated changelog 2021-04-14 16:57:25 +02:00
alonso.torres
74f99f0d48 Toggle snap on button 2021-04-14 16:57:25 +02:00
alonso.torres
f396ef4fa0 Snap for moving path nodes and handlers 2021-04-14 16:57:25 +02:00
alonso.torres
de8207c5a6 Snap on paths 2021-04-14 16:57:25 +02:00
alonso.torres
5f114163dc Fixes licenses headers 2021-04-14 16:57:25 +02:00
alonso.torres
5ce2bc862c ♻️ Move streams refactor 2021-04-14 16:57:25 +02:00
alonso.torres
6db144e5ed Path-point calculation 2021-04-14 16:57:25 +02:00
alonso.torres
fc383664c7 Adds join, merge, separate nodes 2021-04-14 16:57:25 +02:00
alonso.torres
bc3640893c Remove nodes 2021-04-14 16:57:25 +02:00
alonso.torres
5361e42976 Path split segments 2021-04-14 16:57:25 +02:00
alonso.torres
e81b1b8115 Adds point to curves tool 2021-04-14 16:57:25 +02:00
alonso.torres
421b30c1d8 Snapping on path elements 2021-04-14 16:57:25 +02:00
alonso.torres
2e6dacf539 ♻️ Refactor path into modules 2021-04-14 16:57:25 +02:00
alonso.torres
c22b4a1de2 Allows multiple selection and move 2021-04-14 16:57:25 +02:00
alonso.torres
a06a8c648e Select path nodes in area 2021-04-14 16:57:25 +02:00
Andrey Antukh
bb719d6211 📎 Minor improvements to translations scripts. 2021-04-14 15:43:17 +02:00
Andrey Antukh
5a49ce2028 Merge pull request #808 from penpot/group-assets
🎉 Group items in assets sidebar
2021-04-14 14:34:31 +02:00
Andrés Moya
e8da04d4ab 🎉 Show assets as a list 2021-04-14 14:17:59 +02:00
Andrés Moya
112e656f40 🎉 Sort assets ascending / descending 2021-04-14 14:17:59 +02:00
Andrés Moya
77a2fd6e36 🎉 Bulk duplicate and delete assets 2021-04-14 14:17:59 +02:00
Andrés Moya
3613e6f3d3 🎉 Group components and graphics in assets sidebar 2021-04-14 14:17:59 +02:00
Andrey Antukh
eff333cbaf Merge branch 'main' into develop 2021-04-14 13:52:09 +02:00
Andrey Antukh
ba0f9360f9 📎 Set version to 1.4.1-alpha. 2021-04-14 13:50:11 +02:00
Andrey Antukh
a8565dc2c2 🐛 Fix typography unlinking. 2021-04-14 08:32:06 +02:00
Andrey Antukh
9f5c19244d 🎉 Add preprocessing to svg parse method. 2021-04-13 17:16:39 +02:00
Andrey Antukh
7cc4873dd4 ♻️ Move svg parsing into query rpc methods. 2021-04-13 17:16:39 +02:00
Andrey Antukh
03a031091f 🎉 Allow copy&paste from inkscape. 2021-04-13 17:16:39 +02:00
Andrés Moya
14359d9acf Merge pull request #836 from penpot/bugfixes
Bugfixes
2021-04-13 15:26:52 +02:00
Andrey Antukh
bfbc715977 Merge remote-tracking branch 'origin/bugfixes' into develop 2021-04-13 14:14:03 +02:00
alonso.torres
6161911ff1 🐛 Fixes measurement on root frame 2021-04-13 14:12:21 +02:00
alonso.torres
162b0cfa6c 🐛 Fixes issue when parsing exponential numbers in paths (backport). 2021-04-13 14:07:06 +02:00
Andrey Antukh
94ccc013d7 🐛 Fix unexpected console errors on removing shape.
Caused because in some instances selected shapes set
will contain an id that is already removed from object.
This is a tipical race condition.
2021-04-13 14:07:06 +02:00
Andrey Antukh
239ec12529 🐛 Fix usability issue on team invitation dialog.
Happens when user select (autocompletion), writes or
pastes an email that starts and/or ends with a trailing
spaces. The new spec allows tailing spaces but conforms
to a valid email address without trailing spaces.
2021-04-13 14:07:06 +02:00
Andrey Antukh
99bcf0484a 🐛 Fix race conditions on profile and teams loading. 2021-04-13 14:07:06 +02:00
Andrey Antukh
6e80a2f9fb 📎 Update changelog. 2021-04-13 13:59:50 +02:00
Andrey Antukh
4cca8f0600 ♻️ Refactor translations subsystem.
Migrate from plain json files to gettext.
2021-04-13 13:59:50 +02:00
alonso.torres
b9ca4e7f9b 🐛 Fixes issue when parsing exponential numbers in paths 2021-04-13 13:40:08 +02:00
Andrey Antukh
464a686c04 🐛 Fix incorrect handling of user lang selection.
That causes double loading of the http resources
in some circumstances.
2021-04-13 12:41:34 +02:00
mathieu.brunot
f0439da293 Frontend can receive hash from CI
Signed-off-by: mathieu.brunot <mathieu.brunot@monogramm.io>
2021-04-13 11:59:52 +02:00
Andrey Antukh
f545e41d10 📎 Fix license header. 2021-04-12 16:49:43 +02:00
Andrey Antukh
7d14aef393 ♻️ Refactor http client.
Start using Fetch API.
2021-04-12 16:49:43 +02:00
Andrey Antukh
9a0f6018a7 Merge branch 'main' into develop 2021-04-09 15:32:20 +02:00
alonso.torres
0a44dbd921 🐛 Fixes problem with pan and space 2021-04-09 15:31:54 +02:00
Andrey Antukh
fa2d0f5ed7 Merge pull request #809 from penpot/improve-trazability
Improve trazability
2021-04-09 15:28:55 +02:00
Andrey Antukh
d889d39151 📎 Fix linter issues. 2021-04-09 15:28:18 +02:00
Andrey Antukh
8daf6e822e 🎉 Add profile activity registry logger. 2021-04-09 15:28:18 +02:00
Andrey Antukh
c40d9d9a7c 🔥 Remove unused code. 2021-04-09 15:28:18 +02:00
Andrey Antukh
e12a6e65a6 ♻️ Refactor logging. 2021-04-09 15:28:18 +02:00
Andrey Antukh
a92820e910 🐛 Fix incorrect handling of font embedding. 2021-04-09 14:30:21 +02:00
alonso.torres
080dd88509 🐛 Fixes problem when exporting svg's 2021-04-09 14:26:52 +02:00
Andrés Moya
44d64e4831 Merge branch 'zzkt-patch-1' into develop 2021-04-09 14:05:13 +02:00
Andrés Moya
6f2306439c 📚 Add contribution to change log 2021-04-09 14:03:56 +02:00
nik gaffney
2c6b896989 Update en.subj
spelling
2021-04-09 12:16:40 +02:00
Andrey Antukh
4e1d85a5f4 🐛 Add missing breaking change notification on changelog. 2021-04-09 09:15:39 +02:00
Andrey Antukh
09aa28a943 🐛 Fix incorrect vertical align handling. 2021-04-09 09:12:14 +02:00
alonso.torres
faff32203c 🐛 Fixes problems with measurment distances 2021-04-08 11:07:49 +02:00
Andrey Antukh
77280961ef Merge branch 'main' into develop 2021-04-07 20:18:45 +02:00
Andrey Antukh
5f7f88d299 🔥 Remove unnecesary metrics observe calls. 2021-04-07 20:18:06 +02:00
Andrey Antukh
50bc1b0347 Merge branch 'main' into develop 2021-04-07 20:16:54 +02:00
Andrey Antukh
166fdbd406 🐛 Fix incorrect handling of websocket metrics. 2021-04-07 19:52:40 +02:00
Andrey Antukh
a6920122e6 Merge branch 'main' into develop 2021-04-07 15:11:17 +02:00
elhombretecla
e677692594 Minor design fixes 2021-04-07 14:29:09 +02:00
alonso.torres
459c9a3bb1 🐛 Adds some guards to viewbox calculation 2021-04-07 14:28:50 +02:00
Andrey Antukh
9544ee2140 🔥 Remove artifacts from changes file. 2021-04-07 14:14:50 +02:00
Andrey Antukh
45cd05184b Merge branch 'main' into develop 2021-04-07 14:14:36 +02:00
Andrey Antukh
e8aa521a1e Merge branch 'staging' into main 2021-04-07 13:19:07 +02:00
Andrey Antukh
c4c0e105cf Merge remote-tracking branch 'origin/staging' into develop 2021-04-07 09:28:02 +02:00
Andrey Antukh
69031bb8e1 🐛 Fix font fetching on embedding it. 2021-04-07 09:24:14 +02:00
elhombretecla
19ced21b20 Minor design fixes 2021-04-07 09:16:41 +02:00
Andrey Antukh
46b55822dc Merge branch 'staging' into develop 2021-04-06 20:09:00 +02:00
Andrey Antukh
4f20d22a4f 🐛 Use safer defaults for xml parser. 2021-04-06 17:08:12 +02:00
Andrey Antukh
8f51450f7e Merge remote-tracking branch 'origin/staging' into develop 2021-04-06 15:07:29 +02:00
alonso.torres
94a294e147 🐛 Fixed problem when drawing paths 2021-04-06 15:01:46 +02:00
Andrey Antukh
4acfc15705 Merge remote-tracking branch 'origin/staging' into develop 2021-04-06 14:44:08 +02:00
Andrey Antukh
73b555eb9b 📎 Minor fix on config defaults. 2021-04-06 12:05:52 +02:00
Andrey Antukh
d93fa72e48 🎉 Add release notes lightbox. 2021-04-06 12:05:39 +02:00
Andrey Antukh
bbb26002e4 🔥 Remove unused code from manage.sh script. 2021-04-06 09:19:27 +02:00
Andrey Antukh
1ab1059b06 ⬆️ Update devenv image and compose file. 2021-04-06 09:17:19 +02:00
Andrey Antukh
7b67e05e50 ⬆️ Update gitpod dockerfile. 2021-04-06 09:15:06 +02:00
Andrey Antukh
c7fcb00b81 ⬆️ Update devenv image and compose file. 2021-04-06 09:01:07 +02:00
alonso.torres
2b66d0ea06 Merge remote-tracking branch 'origin/staging' into develop 2021-04-05 11:39:31 +02:00
alonso.torres
f3b779e50c 🐛 Fixed problem with right-click menu 2021-04-05 11:37:41 +02:00
alonso.torres
9e348ecc99 🐛 Fixed problem when editing paths 2021-04-05 11:23:46 +02:00
alonso.torres
78fe0ab7e3 🐛 Fixes problem with docker-compose environment 2021-04-05 08:39:31 +02:00
Andrey Antukh
fc9f2864d8 Merge pull request #807 from penpot/Monogramm-madmath03/gitpod-setup
Gitpod (by monogramm)
2021-03-31 14:49:24 +02:00
Andrey Antukh
1e642bba8f 📎 Update changelog. 2021-03-31 14:48:28 +02:00
Andrey Antukh
a5994140e2 📎 Fix linter issues. 2021-03-31 14:37:30 +02:00
Andrey Antukh
018b47ab6b ⬆️ Update frontend dependencies (yarn.lock). 2021-03-31 14:37:30 +02:00
Andrey Antukh
f4f51dbf6b Add minor adaptations for gitpod config and docker files. 2021-03-31 14:37:30 +02:00
madmath03
43e75401d7 🎉 Fully automate dev setup with Gitpod.
This commit implements a fully-automated development setup using Gitpod.io, an
online IDE for GitLab, GitHub, and Bitbucket that enables Dev-Environments-As-Code.
This makes it easy for anyone to get a ready-to-code workspace for any branch,
issue or pull request almost instantly with a single click.

🐳 Gitpod docker image with Clojure

Signed-off-by: madmath03 <mb.mathieu.brunot@gmail.com>

🐳 Fix path to GitPod docker image

Signed-off-by: madmath03 <mb.mathieu.brunot@gmail.com>

🐳 Use sudo for setup

Signed-off-by: madmath03 <mb.mathieu.brunot@gmail.com>

🐳 More sudo commands

Signed-off-by: madmath03 <mb.mathieu.brunot@gmail.com>

🐳 Remove penpot user in gitpod

Signed-off-by: madmath03 <mb.mathieu.brunot@gmail.com>

🐳 Brew install redis

Signed-off-by: madmath03 <mb.mathieu.brunot@gmail.com>

🔧 Init DB and penpot user

Signed-off-by: madmath03 <mb.mathieu.brunot@gmail.com>

🐳 Switch user for installs

Signed-off-by: madmath03 <mb.mathieu.brunot@gmail.com>

🔧 Improve startup and DB init

Signed-off-by: madmath03 <mb.mathieu.brunot@gmail.com>

🔧 Configure gitpod tasks

Signed-off-by: madmath03 <mb.mathieu.brunot@gmail.com>

🔧 Configure gitpod ports

Signed-off-by: madmath03 <mb.mathieu.brunot@gmail.com>

🔧 Setup for mailhog

Signed-off-by: madmath03 <mb.mathieu.brunot@gmail.com>

🐛 Use perms to install mailhog

🐛 Install mailhog before workspace creation

Signed-off-by: mathieu.brunot <mathieu.brunot@monogramm.io>

🔧 Manage signed commits

Signed-off-by: madmath03 <mb.mathieu.brunot@gmail.com>

🔧 Configure tasks to wait on ports

🔧 Improve Gitpod config

Signed-off-by: madmath03 <mb.mathieu.brunot@gmail.com>

⬆️ Upgrade deps in gitpod

Signed-off-by: madmath03 <mb.mathieu.brunot@gmail.com>

🎨 Use absolute path for cd

Signed-off-by: madmath03 <mb.mathieu.brunot@gmail.com>

🔧 Add nginx conf

Signed-off-by: madmath03 <mb.mathieu.brunot@gmail.com>

🔧 Fix nginx config for gitpod

Signed-off-by: madmath03 <mb.mathieu.brunot@gmail.com>

🔧 Ensure nginx listens all incoming

🎨 Change layers order

Signed-off-by: madmath03 <mb.mathieu.brunot@gmail.com>

🎨 Change layers order

Signed-off-by: madmath03 <mb.mathieu.brunot@gmail.com>

🔧 Set Nginx logs permissions

Signed-off-by: madmath03 <mb.mathieu.brunot@gmail.com>

🐛 Use sudo to create nginx logs

Signed-off-by: madmath03 <mb.mathieu.brunot@gmail.com>
2021-03-31 14:36:46 +02:00
Andrey Antukh
8b45ed9c0c Merge remote-tracking branch 'origin/staging' into develop 2021-03-31 12:24:10 +02:00
Andrey Antukh
88a3548d7e Use babashka to properly wait exporter compilation. 2021-03-31 12:20:49 +02:00
Andrey Antukh
3ddc95d4b5 🎉 Add nginx config file inside devenv image. 2021-03-31 12:20:49 +02:00
Andrey Antukh
08a682efc2 Change default location of assets on devenv. 2021-03-31 12:20:49 +02:00
Andrey Antukh
32afe57e18 Improve build scripts. 2021-03-31 12:20:49 +02:00
Andrey Antukh
43465f7c4b 🔥 Remove unused prop. 2021-03-31 09:28:15 +02:00
Andrey Antukh
351daacca0 🔧 Change CI configuration. 2021-03-31 09:28:15 +02:00
Andrey Antukh
0926fbcbc6 ♻️ Minor code reorganization.
Improves modularity and reusability and allows usage
of backend code as a library.
2021-03-31 09:28:15 +02:00
Andrey Antukh
59a45530a8 🐳 Add babashka to devenv.
Among other changes.
2021-03-31 09:28:15 +02:00
Andrey Antukh
cf2998eeec 🔥 Remove unused files. 2021-03-31 09:28:15 +02:00
Andrey Antukh
6f1508acc1 ⬆️ Update slf4j dependency. 2021-03-31 09:28:15 +02:00
Andrey Antukh
edb88027a4 📎 Minor fix on readme file. 2021-03-31 09:28:15 +02:00
Andrey Antukh
5111551c89 📎 Update .gitignore file. 2021-03-31 09:28:15 +02:00
alonso.torres
6891826c78 Adds a worker message buffer for selection queries 2021-03-30 14:59:40 +02:00
Andrey Antukh
e68d63ea71 Merge remote-tracking branch 'origin/staging' into develop 2021-03-30 14:49:40 +02:00
alonso.torres
d83d241c39 🐛 Fixed translation string 2021-03-30 10:20:07 +02:00
Andrey Antukh
9950f464ce Merge branch 'staging' into develop 2021-03-30 08:49:32 +02:00
Andrey Antukh
676a2db1f5 🐛 Fix team form autofocus prop. 2021-03-30 08:33:45 +02:00
alonso.torres
62ed2221e9 🐛 Fix when right click on a selected text shows artboard contextual menu 2021-03-30 08:29:05 +02:00
alonso.torres
60f6093357 🐛 Fix titles in viewer thumbnails too long 2021-03-30 08:29:05 +02:00
alonso.torres
ed893b995d 🐛 Fix artboard title wasn't move when resizing 2021-03-30 08:29:05 +02:00
alonso.torres
3ebc94ab8e 🐛 Fix layout problem for editable selects 2021-03-30 08:29:05 +02:00
alonso.torres
cd7ad03cf0 🐛 Fix drag-select when renaming layer text 2021-03-30 08:29:05 +02:00
alonso.torres
0f6ce233bd 🐛 Fix shadows when exporting groups 2021-03-30 08:29:05 +02:00
alonso.torres
a14890f163 🐛 Fix SVG not showing properties at code 2021-03-30 08:29:05 +02:00
alonso.torres
213a8c69fb 🐛 Fix cannot click on blocked elements in viewer 2021-03-30 08:29:05 +02:00
Andrey Antukh
2500486186 🐛 Properly redirect bad-gateway errors on login. 2021-03-29 18:01:40 +02:00
Andrey Antukh
9cd15fd362 📎 Set next version number. 2021-03-29 15:38:56 +02:00
Andrey Antukh
efdfbbaf5e Merge remote-tracking branch 'origin/staging' into develop 2021-03-29 15:38:36 +02:00
Andrey Antukh
87aa3fbfe8 Improve version handling. 2021-03-29 15:38:13 +02:00
alonso.torres
ea3f2fbfce 🐛 Fix issue when promoting to owner 2021-03-29 10:51:07 +02:00
alonso.torres
7d68d79fc3 🐛 Fix issue with recent files not showing 2021-03-29 10:51:07 +02:00
Andrey Antukh
6f6a750373 Merge remote-tracking branch 'origin/staging' into develop 2021-03-29 10:34:03 +02:00
Andrey Antukh
993530dbcb Properly handle 'idle-in-tx' errors. 2021-03-29 10:30:46 +02:00
Andrey Antukh
7b4ca6dcef 📎 Minor fixes on changelog. 2021-03-29 10:30:13 +02:00
Andrey Antukh
ae1d5667cc Merge remote-tracking branch 'origin/bugfixing' into staging 2021-03-29 09:22:06 +02:00
Andrey Antukh
90a51dc44a 🐛 Only allow bitmap images on team and profile photo. 2021-03-29 09:06:42 +02:00
Andrey Antukh
caf1ef653f 🐛 Fix wrong spec usage. 2021-03-29 09:06:24 +02:00
Andrey Antukh
8cba56b2d5 Merge branch 'mbrksntrk-patch-1' into staging 2021-03-29 09:03:20 +02:00
Andrey Antukh
2fed88e840 📎 Reorganize locales.json file. 2021-03-29 09:02:57 +02:00
Andrey Antukh
1df407ca96 📎 Update changelog. 2021-03-29 09:01:24 +02:00
M Burak Şentürk
f4c3aa8b89 Add 98 new Turkish translation strings. 2021-03-29 08:56:48 +02:00
Andrey Antukh
cc92e4be75 🐛 Fix unexpected internal error on press enter. 2021-03-26 23:38:47 +01:00
Andrey Antukh
aa866bbe13 🐛 Fix wrong spec usage. 2021-03-26 23:38:28 +01:00
Andrey Antukh
18ec8009a1 🐛 Only allow bitmap images on team and profile photo. 2021-03-26 23:38:03 +01:00
Andrés Moya
c6d7f0e352 🐛 Fix calculate size of some animated gifs 2021-03-26 17:15:42 +01:00
Andrey Antukh
038e820815 🐛 Fix object exportation. 2021-03-26 17:15:07 +01:00
Andrey Antukh
605143ef7e Minor improvements on version decoding ns. 2021-03-26 16:37:21 +01:00
alonso.torres
3cb9470db2 🐛 Fix problem with enter to edit paths 2021-03-26 15:57:05 +01:00
Andrés Moya
7c21624e09 🐛 Fix glitch when dragging a file thumbnail in the dashboard 2021-03-26 15:30:59 +01:00
Andrés Moya
47c58df2a4 🐛 Fix errors duplicating objects with deleted relations 2021-03-26 12:51:48 +01:00
alonso.torres
e6a2cc16a4 🐛 Fix problem with blocked shapes 2021-03-26 12:09:56 +01:00
alonso.torres
66f9e98499 ♻️ Moved outlines to viewport namespace 2021-03-26 12:09:56 +01:00
alonso.torres
4f8d82dae7 🐛 Fixed some issues when shift-selecting on sidebars 2021-03-26 12:09:56 +01:00
alonso.torres
66f88576e1 🐛 Fix text selection in comments 2021-03-26 12:09:56 +01:00
alonso.torres
3c2ae03cea 🐛 Fix problem with blocked shapes 2021-03-26 10:53:29 +01:00
alonso.torres
a2d8518724 ♻️ Moved outlines to viewport namespace 2021-03-26 10:53:29 +01:00
alonso.torres
20e4562c09 🐛 Fixed some issues when shift-selecting on sidebars 2021-03-26 10:42:34 +01:00
alonso.torres
68eadcb24f 🐛 Fix text selection in comments 2021-03-26 10:37:19 +01:00
alonso.torres
0a3b244f44 🐛 Fix problem with blending modes in masks 2021-03-26 09:57:59 +01:00
alonso.torres
19ea7e8b2f 🐛 Fix problem with team management in dashboard 2021-03-26 09:19:37 +01:00
Andrey Antukh
c447279c75 Improve text shape tracing process on exporter.
Fixes many bugs related to the svgo removal and remove
unneded neesting of groups.
2021-03-26 08:10:04 +01:00
Andrey Antukh
b1477d8087 🐛 Fix text rendering performance problem. 2021-03-26 08:10:04 +01:00
alonso.torres
7f7c803d9e ⬆️ Updated worksans font 2021-03-25 15:35:35 +01:00
Andrey Antukh
41b5374027 🐛 Fix build commands on devenv. 2021-03-25 09:05:32 +01:00
Andrey Antukh
27d28f7baf Merge pull request #783 from penpot/release-enhancements
Release enhancements
2021-03-25 08:24:31 +01:00
Andrey Antukh
50aef6ab65 🔥 Remove graaljs and commons-pool. 2021-03-25 08:23:41 +01:00
alonso.torres
ecff4c5dce Removed svgcleaner 2021-03-25 08:19:35 +01:00
alonso.torres
c380400578 SVG import enhancements 2021-03-25 08:19:35 +01:00
alonso.torres
92e07c3b54 🐛 Fix problem when upload image after zoom 2021-03-25 08:19:35 +01:00
alonso.torres
0756de25f8 Paths improvements 2021-03-25 08:19:35 +01:00
Andrés Moya
1773de88f5 🐛 Fix closing of thumbnails panel in view mode 2021-03-25 08:17:58 +01:00
alonso.torres
b534f5b736 🐛 Fixed problem with enter key shortcut 2021-03-25 08:17:45 +01:00
Andrey Antukh
727d6b78ce 🐛 Fix ldap connection handling. 2021-03-24 11:43:19 +01:00
Andrés Moya
2dbcb4c2a2 🎉 Rename frame with double click on the title 2021-03-24 11:42:40 +01:00
alonso.torres
a399363b08 🐛 Fixes problem with snaps 2021-03-24 11:37:01 +01:00
alonso.torres
7ac78cb103 Adds layers options to texts 2021-03-24 11:34:54 +01:00
Andrés Moya
ec217d8201 🎉 Remember last team visited 2021-03-23 13:37:21 +01:00
Andrey Antukh
013fc2fc9c 📎 Update changelog. 2021-03-23 11:56:24 +01:00
alonso.torres
8cf2d4f3a4 🐛 Fixes some problems with shapes selection 2021-03-23 11:55:22 +01:00
Andrey Antukh
ebcb820335 🔥 Remove forced container names from devenv compose file. 2021-03-23 11:18:00 +01:00
Andrey Antukh
43963fa09b Merge branch 'gizembln-patch-1' into develop 2021-03-23 11:13:48 +01:00
Andrey Antukh
b17067b8da Add Turkish to locale labels. 2021-03-23 11:13:21 +01:00
Gizem Belen Akgüney
66f92405e2 🎉 Add some Turkish translation strings. 2021-03-23 11:11:10 +01:00
elhombretecla
288c5c7fc4 🎉 Add new login image. 2021-03-23 11:09:40 +01:00
Andrés Moya
6383dc0952 Show current page in browser title 2021-03-23 11:08:06 +01:00
Andrey Antukh
0008a2aa48 Merge pull request #766 from penpot/refactor/viewport
♻️ Viewport refactor and improvements
2021-03-23 11:06:14 +01:00
Andrey Antukh
d7d56db1af 🐛 Fix focus on text editor. 2021-03-23 10:57:30 +01:00
Andrey Antukh
60f9b47115 🐛 Fix default font loading. 2021-03-23 10:57:30 +01:00
Andrey Antukh
4729801fca 🔥 Remove unused fonts. 2021-03-23 10:57:30 +01:00
alonso.torres
136a48a18f ♻️ Viewport refactor and improvements 2021-03-22 22:09:57 +01:00
Andrey Antukh
5c31830edb 📎 Update changelog. 2021-03-22 16:37:19 +01:00
Andrey Antukh
17ab753c2b Sort icons. 2021-03-22 16:35:22 +01:00
Andrey Antukh
422f4ee6c2 🎉 Add text-direction option on for text shape. 2021-03-22 16:35:22 +01:00
Andrés Moya
a988292253 🎉 Multi select file menu 2021-03-22 13:42:43 +01:00
Andrés Moya
dcb913d9fa Hide navbar in fullscreen view mode 2021-03-22 13:41:51 +01:00
Andrey Antukh
d2d1eed68a 🔥 Remove unused variable on manage.sh script. 2021-03-22 13:38:44 +01:00
Andrey Antukh
e7085571bf 🎉 Add :memory backend to the msgbus module. 2021-03-22 13:38:44 +01:00
Andrey Antukh
28691e2bf2 📎 Update changelog. 2021-03-22 13:38:44 +01:00
Andrey Antukh
e15d93e8a4 ♻️ Reimplement workspace presence state.
Remove the use of the database for presence state.
2021-03-22 13:38:44 +01:00
Andrey Antukh
a16f4393b9 🔥 Remove legacy code from manage.sh. 2021-03-22 13:38:44 +01:00
Andrey Antukh
3681c17f4b Minor improvements on exporter dockerfile. 2021-03-22 13:38:44 +01:00
Andrey Antukh
abcd92a6b1 ⬆️ Update backend dockerfile.
Make it more multiplatform and start using openjdk16.
2021-03-22 13:38:44 +01:00
Andrey Antukh
dd4930e055 🐳 Minor improvements on devenv docker image. 2021-03-22 13:38:44 +01:00
Andrey Antukh
4a58a429d4 Minor improvement on devenv logging config. 2021-03-22 13:38:44 +01:00
Andrey Antukh
142086b2c3 ⬇️ Downgrade prometheus client to 0.9.0.
Because it introduces some breaking changes.
2021-03-22 13:38:44 +01:00
Andrés Moya
1e25e543b3 💄 Rename "master" to "main" in components 2021-03-22 13:20:30 +01:00
Andrey Antukh
a1e75c6e03 🐛 Fix typo on i18n locale labels. 2021-03-17 07:56:27 +01:00
Andrey Antukh
ca2612937e ⬆️ Update backend deps and devenv. 2021-03-16 22:02:44 +01:00
Andrey Antukh
1e6673f6b6 Add deutsche lang to the supported languages. 2021-03-16 18:02:52 +01:00
Stas Haas
6d821660c9 🎉 Add German translations.
Signed-off-by: Stas Haas <stas@girafic.de>
2021-03-16 18:00:28 +01:00
Andrey Antukh
67138ac629 🐛 Properly handle nil values on style conversion. 2021-03-16 16:37:59 +01:00
Andrey Antukh
b816e0ed32 🐛 Fix possible issue with advanced compilation. 2021-03-16 15:47:50 +01:00
Andrés Moya
d9aa94025a ♻️ Refactor field name 2021-03-16 15:33:03 +01:00
Andrés Moya
b464181213 🐛 Navigate when moving file to a different team 2021-03-16 15:19:54 +01:00
Andrés Moya
ef901dbd5e 🐛 Create default projects for teams in devenv fixtures 2021-03-16 15:19:54 +01:00
Andrés Moya
0cb816c16d 🐛 Translate default team name in file menu 2021-03-16 15:19:54 +01:00
Andrés Moya
4d3142e826 🐛 Fix some visual issues in dashboard 2021-03-16 15:19:54 +01:00
Andrey Antukh
fc29e8fb6b 🐛 Fix minor issue on text_editor_impl.js file.
That causes the production build fail.
2021-03-16 15:13:32 +01:00
Andrey Antukh
fb36ab0e41 Merge branch 'niwinz/draftjs' into develop 2021-03-16 14:43:44 +01:00
Andrey Antukh
aa83f1bbd3 🐛 Fix undo with text shapes. 2021-03-16 14:42:35 +01:00
Andrey Antukh
7bc91e7224 Allow to unselect the text alignment.
Defaulting to 'start' (rtl friendly).
2021-03-16 14:42:35 +01:00
Andrey Antukh
ca52f4f8ea Improve use-previous hook. 2021-03-16 14:42:35 +01:00
Andrey Antukh
ede42e42b1 🐛 Don't emit update-shape when no page-id. 2021-03-16 14:42:35 +01:00
Andrey Antukh
f0087e11b0 🐛 Proper handle visual selection on blured editor. 2021-03-16 14:42:35 +01:00
Andrey Antukh
5519cdfd7c 🐛 Remove some drop-propagation that causes strange behavior. 2021-03-16 14:42:35 +01:00
Andrey Antukh
68e3566b8b 🐛 Properly handle empty blocks on draft-js format conversion. 2021-03-16 14:42:35 +01:00
Andrey Antukh
13131a0226 📎 Update changelog. 2021-03-16 14:42:35 +01:00
Andrey Antukh
92254a175e 🐛 Handle properly pointer capture on text edition shape. 2021-03-16 14:42:35 +01:00
Andrey Antukh
48747d9553 🐛 Handle properly the mouse capture. 2021-03-16 14:42:35 +01:00
Andrey Antukh
fde6126ac6 🐛 Remove pasted styles on the editor. 2021-03-16 14:42:35 +01:00
Andrey Antukh
7db82a6af1 🐛 Add missing text cursor on the editor. 2021-03-16 14:42:35 +01:00
Andrey Antukh
7709d219a9 🐛 Fix minor issue with text directionality. 2021-03-16 14:42:35 +01:00
Andrey Antukh
3bef80932d ♻️ Replace slate editor with draft-js. 2021-03-16 14:42:35 +01:00
Andrey Antukh
439e5ee6a1 🎉 Add array util ns (frontend only). 2021-03-16 14:42:35 +01:00
Andrey Antukh
2de1c92ee8 🎉 Add transducer version of mapm data helper. 2021-03-16 14:42:35 +01:00
Andrey Antukh
f7d0383919 Improve performance of enumerate data helper. 2021-03-16 14:42:35 +01:00
Andrés Moya
84b7a2de0b Disable drag enter/leave animation in webkit browsers 2021-03-15 14:58:37 +01:00
Andrés Moya
797ba3ef9b ♻️ Rename custom data types in drag&drop 2021-03-15 14:37:40 +01:00
Andrey Antukh
374653d9f6 ⬆️ Update devenv docker image. 2021-03-15 12:48:10 +01:00
Andrey Antukh
22c8a2b538 Merge pull request #747 from penpot/dashboard/select-and-drag-files
🎉 Drag and drop files in the dashboard
2021-03-15 12:05:30 +01:00
Andrés Moya
47320330ad Activate SCSS library to manipulate colors 2021-03-15 11:23:12 +01:00
Andrés Moya
4b2a4c8fa3 💄 Refactor clear selected files 2021-03-12 12:40:41 +01:00
Andrés Moya
c2332331ce 🎉 Drag and drop files in the dashboard 2021-03-12 12:40:41 +01:00
elhombretecla
81a604dca2 Add some enhancements to context menus 2021-03-12 11:40:27 +01:00
Andrey Antukh
b547f1cd7e Merge branch 'main' into develop 2021-03-12 08:39:41 +01:00
Andrey Antukh
931deec6bd 🐛 Add missing dependency on exporter dockerfile. 2021-03-11 22:01:12 +01:00
Andrey Antukh
aed94c8e91 Merge pull request #742 from penpot/bugfixes
Bugfixes
2021-03-10 12:47:02 +01:00
alonso.torres
277ff12822 🐛 Fixes problem with empty prototype navigation 2021-03-10 12:01:13 +01:00
alonso.torres
3329216e3c 🐛 Fixes problem with default square grid 2021-03-10 11:57:48 +01:00
alonso.torres
c12cbbca2e 🐛 Fixes problems with comments section 2021-03-10 11:48:09 +01:00
alonso.torres
172372d4c0 🐛 Fix problem with rotation degree input 2021-03-10 10:35:02 +01:00
alonso.torres
6d427cdc9c 🐛 Fix issues with Alt key in distance measurement 2021-03-10 10:35:02 +01:00
alonso.torres
e1df3efd6e 🐛 Fix problem with masks interactions outside bounds 2021-03-10 10:35:02 +01:00
alonso.torres
2a4849cf8f 🐛 Fix problem with middle mouse button press moving the canvas when not moving mouse 2021-03-10 10:35:02 +01:00
alonso.torres
33a2f8d788 🐛 Fix issue with typographies panel cannot be collapsed 2021-03-10 10:35:02 +01:00
alonso.torres
fee99a081b 🐛 Fix problem with system shortcuts and application 2021-03-10 10:35:02 +01:00
alonso.torres
d263dd52e9 🐛 Fix issue when undo after changing the artboard of a shape 2021-03-10 10:35:02 +01:00
alonso.torres
47e0c2c75b 🐛 Disables buttons in view mode for users without permissions 2021-03-10 10:35:02 +01:00
alonso.torres
5b25a42f32 🐛 Fix problem with rotated blurs 2021-03-10 10:35:02 +01:00
Andrey Antukh
d64dd29ca9 📎 Minor update on logging config (devenv). 2021-03-10 10:23:01 +01:00
Andrey Antukh
6e1e3772b9 Merge remote-tracking branch 'origin/main' into develop 2021-03-10 10:21:39 +01:00
Andrey Antukh
b0336e1f7b 🐛 Fix broken styles on team invitation modal.
https://tree.taiga.io/project/penpot/issue/1404
2021-03-10 09:18:32 +01:00
Andrey Antukh
ed3d571793 🎉 Backport to main the blob encoding v3.
Safer approach (uses json instead of custom binary format) than v2.
2021-03-10 09:18:32 +01:00
Andrey Antukh
3d043adb03 🐛 Fix wrong handling of deleted users on password recovery. 2021-03-10 09:18:32 +01:00
Andrey Antukh
7f624b5c61 Minor improvements on logging subsystem. 2021-03-10 09:18:32 +01:00
Andrey Antukh
d70910fc0d Merge pull request #740 from penpot/fix/mask-rotation-issue
🐛 Fixes problems with flip and masks
2021-03-08 22:48:20 +01:00
Andrey Antukh
69ac552881 Merge pull request #728 from penpot/presets-dropdow-fix
 Presets dropdow fix
2021-03-08 22:48:02 +01:00
Andrey Antukh
275438673d 📎 Update changelog. 2021-03-08 22:47:41 +01:00
elhombretecla
404e2bf0b3 🐛 Fix css custom presets dropdown 2021-03-08 22:47:41 +01:00
Andrey Antukh
708ba3d7ac 🐛 Fix initial data loading issues. 2021-03-08 22:35:11 +01:00
alonso.torres
9e47318e09 🐛 Fixes problems with flip and masks 2021-03-08 18:14:05 +01:00
Andrey Antukh
f0eaf9aa20 Merge pull request #739 from penpot/feat/blending-modes
Opacity and blending modes
2021-03-08 17:57:16 +01:00
alonso.torres
cf78861396 Improvements after review 2021-03-08 17:37:37 +01:00
alonso.torres
517751c116 📚 Updated changelog 2021-03-08 16:33:02 +01:00
alonso.torres
2fd6344c44 Support for opacity/blend-mode in svgs 2021-03-08 16:31:43 +01:00
alonso.torres
1be993f8b1 🐛 Fixes problem with default fill colors 2021-03-08 16:22:09 +01:00
alonso.torres
942c62bf1d Translations for new strings 2021-03-08 16:21:54 +01:00
alonso.torres
31fa4a8c8b Adds blending mode and opacities to shapes 2021-03-08 15:40:45 +01:00
alonso.torres
d39694af59 ♻️ Refactor modules of options 2021-03-08 15:39:49 +01:00
Andrey Antukh
68d8a49466 🎉 Add blob encoding v3.
Safer approach (uses json instead of custom binary format) than v2.
2021-03-08 13:30:04 +01:00
Andrey Antukh
99d9d77c63 Merge pull request #733 from penpot/feat/svg-native
Advanced SVG Import
2021-03-08 13:26:50 +01:00
alonso.torres
4da3270d34 Handoff for imported SVGS 2021-03-08 13:26:18 +01:00
alonso.torres
6f07b4ea80 Improved svg options handling 2021-03-08 13:26:18 +01:00
alonso.torres
29f421d867 Import fixes 2021-03-08 13:26:18 +01:00
alonso.torres
40ddcb89fc 📚 Updates changelog 2021-03-08 13:26:18 +01:00
alonso.torres
e75284ce97 Support for upload embedded images 2021-03-08 13:25:55 +01:00
alonso.torres
7482122964 Adjustments to svgclean 2021-03-08 13:25:55 +01:00
alonso.torres
d3345c0fa6 Clip-paths, polylines, polygons and fixes 2021-03-08 13:25:55 +01:00
alonso.torres
237ef2a205 Adds rects, ellipses and uses to svg elements 2021-03-08 13:25:55 +01:00
alonso.torres
0f7596bacf Changes to svgclean 2021-03-08 13:25:55 +01:00
alonso.torres
6e88d3a04c Adds imported rectangles SVGs 2021-03-08 13:25:55 +01:00
alonso.torres
59022904fb Handling group inheritance 2021-03-08 13:25:55 +01:00
alonso.torres
94c5004c33 Improved geometry for rects 2021-03-08 13:25:55 +01:00
alonso.torres
23d531a664 Changed config for svgclean 2021-03-08 13:25:55 +01:00
alonso.torres
19febde547 Import paths as native shapes 2021-03-08 13:25:55 +01:00
alonso.torres
741d67c30b Makes import SVG groups 2021-03-08 13:25:55 +01:00
Andrés Moya
507f3c06e7 Merge pull request #735 from penpot/niwinz/deps-update
Update deps & minor enhacements
2021-03-08 12:50:49 +01:00
Andrey Antukh
c16a24a59a Allow pluggable backends on msgbus module.
Prepare it to use different backends than redis.
2021-03-08 12:20:04 +01:00
Andrey Antukh
e446f47e2c Reorganize util.time ns (on backend). 2021-03-08 12:20:04 +01:00
Andrey Antukh
146394f3ca 🎉 Add thumbnail caching.
Avoid unnecesary rendering unchanged pages.
2021-03-08 12:20:04 +01:00
Andrey Antukh
9d7214702f 🎉 Add general purpose etag for query rpc requests. 2021-03-08 12:20:04 +01:00
Andrey Antukh
861d5f0064 Fix incompatibilities with dateFns dependency. 2021-03-08 12:20:04 +01:00
Andrey Antukh
34c4f23e49 Minor reorganization of transit handlers (backend). 2021-03-08 12:20:04 +01:00
Andrey Antukh
48a094d22d ⬆️ Update dependencies. 2021-03-08 12:20:04 +01:00
Andrey Antukh
f143197f1f 📎 Update changelog. 2021-03-08 11:59:12 +01:00
Andrey Antukh
fdeaac7f65 Merge branch 'main' into develop 2021-03-08 11:58:48 +01:00
Andrey Antukh
cbb68acd75 🐛 Fix incorrect default value handling on select form input. 2021-03-08 11:40:29 +01:00
Andrey Antukh
31165c4ce6 🐛 Fix broken profile and profile options forms. 2021-03-08 11:27:42 +01:00
Andrés Moya
77ed530de7 📚 Update changelog 2021-03-08 11:17:11 +01:00
Andrey Antukh
f509d9acd0 Fix linter issues. 2021-03-08 10:29:36 +01:00
elhombretecla
6c47df20af 🎉 Add terms check to register 2021-03-08 10:10:53 +01:00
Andrey Antukh
dca402eb18 📚 Update README.md file. 2021-03-05 09:14:37 +01:00
Andrey Antukh
fbfe792a93 📎 Fix linter issues. 2021-03-05 09:13:11 +01:00
Andrey Antukh
868f18fd21 Point documentation to the help center. 2021-03-05 09:10:57 +01:00
Andrey Antukh
5ae823b25c 🐛 Don't cache ldap connection. 2021-03-05 08:58:57 +01:00
Andrey Antukh
2de16985d3 🚑 Fix syntax error. 2021-03-04 17:20:38 +01:00
Andrey Antukh
2ca8ff4db1 Merge pull request #694 from penpot/dashboard-files
Dashboard files
2021-03-04 17:11:41 +01:00
Andrés Moya
ee6717ef69 Translate name of default projects 2021-03-04 17:01:56 +01:00
Andrey Antukh
7c2f0ed7b9 📚 Update changelog. 2021-03-04 16:57:13 +01:00
Andrés Moya
161b8cdabb Hide move options when no targets 2021-03-04 16:52:53 +01:00
mathieu.brunot
1f7ddc081a 🌐 Improve FR translation and add i18n
Signed-off-by: mathieu.brunot <mathieu.brunot@monogramm.io>
2021-03-04 16:52:45 +01:00
Maemolee
df0dcc587f 🎉 Add more chinesse translations.
Complete Chinese Translation
2021-03-04 16:48:10 +01:00
mathieu.brunot
e1ae80583f 💥 Change escape character for LDAP
Signed-off-by: mathieu.brunot <mathieu.brunot@monogramm.io>
2021-03-04 16:43:39 +01:00
Andrés Moya
2adc45fc19 Show notifications on operations success 2021-03-03 16:28:48 +01:00
Andrés Moya
2e92757df6 🎉 Move projects to other teams 2021-03-03 16:04:51 +01:00
Andrés Moya
c6765a48c5 🎉 Move files to other projects and teams 2021-03-03 13:23:06 +01:00
Andrey Antukh
6a345c4b8a Complete backend behavior when duplicate and move 2021-03-03 12:38:34 +01:00
Andrés Moya
044f1f63c0 🎉 Duplicate projects and files 2021-03-03 12:29:52 +01:00
Andrey Antukh
9945243a23 🎉 Add backend management module with duplicate file and duplicate project 2021-03-03 12:20:10 +01:00
Andrés Moya
d1261fc841 🎉 Open file in a new tab 2021-03-03 12:14:32 +01:00
Andrés Moya
e87dc6d34c Add context menu with right click in dashboard 2021-03-03 12:14:32 +01:00
Andrés Moya
70cba4bbdf Allow pin/unpin from project header 2021-03-03 12:14:32 +01:00
Andrey Antukh
93311b8b98 🐛 Don't wait for foreignObjects. 2021-03-03 10:42:32 +01:00
Andrey Antukh
3b9201ed0e 🔥 Remove unused code. 2021-03-02 21:15:27 +01:00
Andrey Antukh
044aef8414 Add some waits on export-svg (exporter). 2021-03-02 13:04:43 +01:00
Andrey Antukh
3234b19790 🐛 Update puppeter and try fix exporting bug. 2021-03-02 10:51:06 +01:00
Andrey Antukh
f14325d12b 🎉 Add server repl helper for duplicate file. 2021-03-02 10:49:50 +01:00
Andrey Antukh
db49c54681 Merge branch 'staging' into main 2021-03-01 17:18:38 +01:00
Andrey Antukh
c54d9b777d 🐛 Minor memory leak fix on workspace initialization. 2021-03-01 16:39:13 +01:00
Andrey Antukh
52a3cd6ae4 🐛 Don't show update library message on onboarding files. 2021-03-01 16:38:28 +01:00
Andrey Antukh
9b8d73ef86 🐛 Fix topic encoding on msg publication. 2021-03-01 16:37:58 +01:00
Andrey Antukh
f12f46981b 🐛 Add mising remap-id on onboarding files setup. 2021-03-01 15:41:39 +01:00
Andrey Antukh
9fb8ba2ff1 🎉 Add better reply-to handling on feedback module. 2021-03-01 13:16:06 +01:00
Andrey Antukh
fe114d2e66 Add missing file. 2021-03-01 12:48:03 +01:00
Andrey Antukh
56ed474d8c Minor improvements on http ns. 2021-03-01 12:34:54 +01:00
Maemolee
a595effbe9 🎉 Update locales.json with more chinese translations.
Add more Chinese translations
2021-03-01 12:21:40 +01:00
Andrey Antukh
ee8c430d85 Merge pull request #720 from penpot/onboarding-files-fixes
Onboarding files fixes
2021-03-01 12:18:29 +01:00
Andrey Antukh
0683c4a963 🎉 Add better feedback backend. 2021-03-01 12:14:30 +01:00
Andrey Antukh
833944bebb 🐛 Fix CI buid. 2021-02-28 20:04:07 +01:00
Andrey Antukh
2a8a0afd09 🐛 Fix many bugs on onboarding file loading process. 2021-02-28 19:58:15 +01:00
Andrey Antukh
61ad112451 Minor improvement on retrieve profile by email fn. 2021-02-28 19:57:19 +01:00
Andrey Antukh
129cc86e3b Minor improvements on getting profile additional data. 2021-02-28 19:51:12 +01:00
Andrey Antukh
645954bc7c 🐛 Fix issues on files and project rpc methods. 2021-02-25 17:45:39 +01:00
alonso.torres
ecd020eec2 🐛 Disables filters in masking elements 2021-02-25 17:17:19 +01:00
Andrey Antukh
8fb5dbb980 🐛 Fix fullname handling on manage cli command. 2021-02-24 18:03:34 +01:00
Andrey Antukh
cef0353642 🐛 Fix wrong permission check on removing member of team. 2021-02-24 17:30:06 +01:00
Andrey Antukh
e3727aaefe 🎉 Add onboarding data to the database. 2021-02-24 16:31:56 +01:00
Andrés Moya
85781c5b7f 🐛 Remove unused local fonts 2021-02-24 15:23:58 +01:00
Andrey Antukh
62784d0708 🐛 Fix syntax error on locales.json. 2021-02-24 14:54:18 +01:00
Maemolee
48a62ddd2b 🎉 Add more chinese transtions.
Updated more Chinese translations.
2021-02-24 14:37:55 +01:00
Andrey Antukh
04af15cba5 🐛 Add prefix on topics (msgbus module). 2021-02-24 14:12:25 +01:00
Andrey Antukh
65a3126f15 🎉 Add manage cli helper. 2021-02-24 14:12:25 +01:00
Andrey Antukh
82d7a0163d Rename sprops to setup module. 2021-02-24 14:12:25 +01:00
Andrés Moya
5b200fd6a2 Merge pull request #698 from penpot/fix/drawing-tool-priority
Drawing tool will have priority over resize/rotate handlers
2021-02-24 13:58:42 +01:00
alonso.torres
b79c986fc9 🐛 Drawing tool will have priority over resize/rotate handlers 2021-02-24 13:38:27 +01:00
alonso.torres
8f4e13072c 🐛 Fixes issues with frame selection 2021-02-24 13:25:47 +01:00
alonso.torres
d517daa045 🐛 Fixes problems with line paths 2021-02-24 12:34:20 +01:00
Andrey Antukh
3171d9d64d 📎 Add missing entries on changelog. 2021-02-24 10:48:19 +01:00
Andrey Antukh
0ea2951515 :paperclip update changelog. 2021-02-24 10:36:25 +01:00
Andrey Antukh
0612e71166 Merge remote-tracking branch 'origin/main' into staging 2021-02-24 10:32:27 +01:00
Andrey Antukh
f9b24bd01c More improvements to logging config. 2021-02-23 15:13:54 +01:00
Andrey Antukh
65eb8e7c43 Minor changes on logging config files. 2021-02-23 15:10:23 +01:00
Andrey Antukh
c7795640e1 📎 Minor log level change on session updater task. 2021-02-23 14:56:24 +01:00
Andrey Antukh
2eea63dd1a Change validation order on password recovery request mutation. 2021-02-23 14:34:12 +01:00
Andrey Antukh
7e1ee087d3 Improve msgbus subscription handling. 2021-02-23 13:17:40 +01:00
alonso.torres
8fd37dbad5 🐛 Fixes shortcut typo 2021-02-23 10:12:36 +01:00
Andrey Antukh
2e68d41dcc 📚 Minor update on issue template. 2021-02-22 23:55:06 +01:00
Andrey Antukh
1eddc9de33 Add more logging to msgbus module. 2021-02-22 23:40:42 +01:00
Andrey Antukh
ca1a97a52e Improve backpressure handling on websocket connection. 2021-02-22 23:14:53 +01:00
Andrey Antukh
b14c98b76e ⬇️ Downgrade redis client version. 2021-02-22 22:11:24 +01:00
Andrey Antukh
d89bf772a6 Add debug messages on notifications module. 2021-02-22 19:10:32 +01:00
Andrés Moya
688d649c4a 🐛 Hide registration screen when registration is disabled 2021-02-22 17:44:25 +01:00
Andrey Antukh
002a6f1e52 📎 Fix missing log entries formating. 2021-02-22 16:05:43 +01:00
Andrés Moya
4a61eba3b9 Merge pull request #683 from penpot/niwinz/session-updater
Enhacements
2021-02-22 14:53:10 +01:00
Andrey Antukh
e1161037a5 📎 Update changelog. 2021-02-22 14:50:01 +01:00
Andrey Antukh
6e840a439e 🐛 Fix unexpected recursion error on logout. 2021-02-22 14:50:01 +01:00
Andrey Antukh
29addbe987 Change the metric type of rpc methods from summary to histogram. 2021-02-22 14:50:01 +01:00
Andrey Antukh
19f098359b 🎉 Add specific profile registration and activation metrics. 2021-02-22 14:50:01 +01:00
Andrey Antukh
5ce450f578 Increase default database statement timeout. 2021-02-22 14:50:01 +01:00
Andrey Antukh
fb51580740 🎉 Add proper lifecycle handling for http sessions. 2021-02-22 14:50:01 +01:00
Andrey Antukh
995017df5a 🎉 Add the ability to execute code on the end of http request.
Mainly for register metrics once the main transaction is commited.
2021-02-22 14:50:01 +01:00
Andrey Antukh
c79036aa65 Improve metrics on websocket notification module.
Add session timing.
2021-02-22 14:50:01 +01:00
Andrey Antukh
fbe2e2a285 Improve tasks metrics. 2021-02-22 14:50:01 +01:00
Andrey Antukh
a63f28a2e5 Normalize logging messages on backend. 2021-02-22 14:50:01 +01:00
Andrey Antukh
5e2bb3f546 Fix ordering on locales.json file. 2021-02-22 14:47:23 +01:00
Natacha
60232baffb Add catalan translation (partial)
Signed-off-by: Natacha <natachamenjibar@gmail.com>
2021-02-22 14:46:21 +01:00
Andrés Moya
c38117d116 🎉 Allow a different radius for each rect corner 2021-02-22 14:14:14 +01:00
Andrey Antukh
d56b758490 🐛 Fix possible bug with share-link formating. 2021-02-22 14:08:25 +01:00
Andrey Antukh
de394a7d4e ♻️ Refactor LDAP auth backend.
And reorganize oauth backend namespaces.
2021-02-19 13:09:18 +01:00
alonso.torres
55b1417df8 🐛 Fixes problems with new paths 2021-02-19 11:34:00 +01:00
Andrey Antukh
471cad3ae9 🐛 Disable placeholders on text editor.
Causes crash on use IME.
2021-02-19 10:53:41 +01:00
Andrey Antukh
299b29b66f 🎉 Add browser language detection. 2021-02-19 09:46:11 +01:00
Maemolee
344a7dfbaa Update locales.json file.
Add some Simplified Chinese translations.
2021-02-19 09:46:11 +01:00
Andrey Antukh
56c204509a Merge branch 'girafic-develop' into develop 2021-02-18 14:38:43 +01:00
Andrey Antukh
f7ecd4880f 📎 Update changelog. 2021-02-18 14:37:54 +01:00
Stas Haas
b2f8a843b5 Add more artboard presets.
Signed-off-by: Stas Haas <stas@girafic.de>
2021-02-18 14:37:03 +01:00
elhombretecla
1d01ac72ba 🎉 Reduce tools space between 2021-02-18 11:45:51 +01:00
Andrey Antukh
1ad1f3eb33 Add missing default config for zmq listener. 2021-02-18 09:35:37 +01:00
Andrey Antukh
e3bad997fd Port fixes from google oauth handlers to github and gitlab. 2021-02-18 09:35:37 +01:00
Andrey Antukh
800f97c5a1 🔥 Remove unused sql code. 2021-02-18 09:35:37 +01:00
Andrey Antukh
abb8d8502b Remove line numbers from locales.json
This will help to avoid unnecesary conflicts.
2021-02-18 09:35:37 +01:00
Fabien Basmaison
dc69d0c7f4 Improve French translation strings.
See https://unicode-table.com/en/202F/ for the character to add before `!`, `?`, `;`, `:` and `»`, and after `«`.

fix: Typography

Replace `...` with `…` for all languages.

In French:

- Replace `'` (quote) with `’` (apostrophe).
- Replace `“` and ” with `«` and `»`.
- Replace `-` (hyphens) with `‑` (non‑breaking hyphens).
- Fix a few grammar issues.
- Replace `Editer` with `Modifier`.
- Replace `Espacement des lettres` with `Crénage`; shorter term for “kerning”.
- Add accents on uppercase letters.

Fix a string in French.

Missed two replacements in French.

Add missing changes:

- French typographic quotes.
- Crénage

Addresses https://github.com/penpot/penpot/pull/591#pullrequestreview-585038080

Update locales:

- Fix some typos in English (dowload, reasign).

- Fix some grammar.
- _Accord de proximité_ on one occasion. (masculine + feminine + adjective = feminine adjective).
- “Soulignage” and “Barré” (I looked at LibreOffice to see how they were doing it).
- Consistent use of “Êtes‑vous sûr de vouloir ”.
- bibliothèque partagée: Bibliothèque Partagée.
- « Mise à jour » to use a noun that is not gender ambiguous.
- “Disposition” changed to “Mise en page” (could be “Composition”, although more ambiguous with other terms).
- Hauteur de ligne: Interlignage.
- Crénage: [Interlettrage](https://fr.wikipedia.org/wiki/Interlettre) which is more what a typographer would do based on the existing kerning of the font.
- Première lettre en majuscule: Premières Lettres en [Capitales](https://fr.wikipedia.org/wiki/Capitale_et_majuscule) (to illustrate the result).
- Quitter: Se déconnecter (clearer about the outcome of the action).
- Use of “a” for the title and “the” for the confirmation.
- Couche: Calque.

Update a missed string for consistency.

[L10N] Update some French terms.
2021-02-18 09:35:37 +01:00
Mathieu Brunot
56b10d669a 🐳 SMTP and LDAP test containers 2021-02-18 09:35:37 +01:00
Andrey Antukh
4991cae5ad 🐛 Fix corner cases on invitation/signup flows. 2021-02-18 09:35:37 +01:00
Andrey Antukh
784a4f8ecd Add some type hints and remove legacy code. 2021-02-18 09:35:37 +01:00
Andrey Antukh
2e084cc2a6 🐛 Add more generic error handing to svgparse. 2021-02-18 09:35:37 +01:00
Andrés Moya
0f35906930 Add internal links for long error reports 2021-02-17 22:34:09 +01:00
elhombretecla
e96d2336cf Add links to web and terms 2021-02-17 22:33:55 +01:00
alonso.torres
803caf6531 🐛 Fixes problem with chinese inputs 2021-02-17 13:43:13 +01:00
Andrés Moya
cfa47cc7b9 🐛 Fix small typo 2021-02-17 12:13:58 +01:00
alonso.torres
043c038dae 🐛 Fix radial gradients 2021-02-17 10:38:16 +01:00
Andrés Moya
41aede2b50 🐛 Have language change notification written in the new language 2021-02-16 16:09:33 +01:00
alonso.torres
0014bb3d24 🐛 Fix problem with indices refreshing on page changes 2021-02-16 15:48:48 +01:00
alonso.torres
94405ab72d 🐛 Fixed problem with transform matrices 2021-02-16 11:55:44 +01:00
Andrey Antukh
0f9b2923c2 🎉 Add msgbus abstraction.
As a replacement for the current pubsub approach.

It now uses a single connection for multiple
subscriptions (instead of conn per subscription);
has asynchronous publish and uses more efficient
blob encoding for message encoding (the same used
as page storage).
2021-02-16 11:49:47 +01:00
Andrey Antukh
60f4f863df Add missing indexes and improve others. 2021-02-16 11:49:47 +01:00
Andrey Antukh
c1476d0397 🎉 Add optional loki integration.
And refactor internal error reporting.
2021-02-16 11:31:48 +01:00
Andrey Antukh
90d7efe3a9 Merge branch 'main' into develop 2021-02-15 13:32:24 +01:00
Andrey Antukh
136d00797c Merge branch 'release-1.2.0' into main 2021-02-15 13:29:36 +01:00
Andrey Antukh
101027e6b8 Merge branch 'release-1.2.0' into develop 2021-02-15 13:29:11 +01:00
Andrés Moya
23f95c2b2b Merge pull request #636 from penpot/feature/other-improvements
Deep selection improvements
2021-02-15 12:52:14 +01:00
alonso.torres
baaeb20d6b ♻️ Moved namespace for keyboard utils 2021-02-15 12:49:54 +01:00
alonso.torres
cd313dc2fe Changed keyboard streams 2021-02-15 12:49:54 +01:00
alonso.torres
d86dc608b0 Adds edition shortcut and context menu item 2021-02-15 12:49:54 +01:00
alonso.torres
6c2b5ff0c7 Control key to hide group interactions 2021-02-15 12:49:54 +01:00
Andrés Moya
fcda3b557e Merge pull request #643 from penpot/fix/problem-handoff-artboard
Fix problem width handoff code generation
2021-02-15 11:38:14 +01:00
alonso.torres
d8104f0d22 🐛 Fix problem width handoff code generation 2021-02-15 11:16:36 +01:00
Andrey Antukh
964dad0d5b Merge pull request #641 from penpot/select-all
🐛 Fix behavior of select all command when there are objects outsi…
2021-02-15 10:57:39 +01:00
Andrés Moya
30819a08f4 🐛 Fix behavior of select all command when there are objects outside frames 2021-02-15 10:51:45 +01:00
Andrey Antukh
22b8eb856e Merge pull request #639 from penpot/fix/bugfixing
Bugfixing
2021-02-15 10:51:41 +01:00
Andrey Antukh
f8ccd0b120 📎 Add bigger window for quantiles on metrics. 2021-02-14 18:01:04 +01:00
Andrés Moya
0c0f26bb18 🐛 Fix two small typos 2021-02-12 16:57:18 +01:00
Andrés Moya
9c0dc54cfe Merge pull request #635 from penpot/niwinz/bounce-handling
Bounce & Complaint handling (on AWS only)
2021-02-12 16:38:24 +01:00
Andrey Antukh
fb0c1f548b 📎 Update changelog. 2021-02-12 16:26:28 +01:00
Andrey Antukh
7708752ad9 🎉 Add automatic complaint and bouncing handling. 2021-02-12 16:26:28 +01:00
alonso.torres
9d49d781cc 🐛 Fixes problem with text immediately after creation 2021-02-12 15:42:24 +01:00
alonso.torres
a81d20a2d1 🐛 Fixes console error for kebab-case properties 2021-02-12 12:14:31 +01:00
Andrey Antukh
17229228a3 Add initialization logging to connection pool. 2021-02-12 09:44:08 +01:00
Andrey Antukh
fc619f975c Add helper for more testable access to config. 2021-02-12 09:44:08 +01:00
Andrey Antukh
5858f3f180 Improve auth module. 2021-02-12 09:44:08 +01:00
Andrey Antukh
d5ff5ea91e 📎 Update changelog. 2021-02-12 09:43:10 +01:00
alonso.torres
cf465d93f9 🐛 Fixes problem when shrinking text 2021-02-11 17:26:02 +01:00
Andrés Moya
521ccc25cf Merge pull request #633 from penpot/bugfixing
Bugfixing
2021-02-11 16:21:22 +01:00
alonso.torres
dc0765f6b0 Improved calculations for auto-resize 2021-02-11 16:01:21 +01:00
alonso.torres
8cfc2ec21a 🐛 Fixes problem with red handler indicator on resize 2021-02-11 15:49:18 +01:00
alonso.torres
10cad69fac 🐛 Fixes problem with multiple selection and groups 2021-02-11 14:43:59 +01:00
alonso.torres
b7d3158514 📚 Updates changelog with Taiga references 2021-02-11 13:45:30 +01:00
Andrés Moya
4b8334fe1c 🐛 Fix ordering when restoring deleted shapes in sync 2021-02-11 13:30:56 +01:00
Andrey Antukh
608b5cc9f9 Merge pull request #631 from penpot/bugfixing
Bugfixing
2021-02-11 13:21:25 +01:00
alonso.torres
42a55015fa 🐛 Fixes problem when pasting URL's from the browser address bar 2021-02-11 13:03:41 +01:00
alonso.torres
0a6e0d0f2c 🐛 Fixes dashboard preview text alignment 2021-02-11 11:58:45 +01:00
alonso.torres
7846682223 🐛 Fixes logo icon navigation in viewer 2021-02-11 11:34:24 +01:00
alonso.torres
5336bbbe65 🐛 Fixes problem change color to texts from the palette 2021-02-11 11:23:48 +01:00
Andrey Antukh
8e5fd5892e Merge pull request #624 from penpot/feature/flip
Adds flip vertical/horizontal commands
2021-02-11 10:52:24 +01:00
alonso.torres
eaff888486 Translations for flip commands 2021-02-11 10:47:43 +01:00
alonso.torres
f1383f4dca Updates changelog 2021-02-11 10:46:13 +01:00
alonso.torres
d9c10cea5d Flip horizontal/vertical operations 2021-02-11 10:46:13 +01:00
alonso.torres
d48a1ca0b0 Relative gradient rendering 2021-02-11 10:46:13 +01:00
alonso.torres
bfcfe2fd31 🐛 Fixes problems with path transforms 2021-02-11 10:46:13 +01:00
alonso.torres
648c088d02 🐛 Fixes problem with remote changes 2021-02-11 09:36:55 +01:00
alonso.torres
70258e0eee 🐛 Fixes problem with locking proportions in paths 2021-02-11 09:35:56 +01:00
alonso.torres
5b1e9ec7da 📚 Updates changelog 2021-02-10 17:32:23 +01:00
Andrey Antukh
7a250a170e 📎 Update changelog. 2021-02-10 17:06:09 +01:00
Andrey Antukh
2e438385f3 Increase default deletion delay. 2021-02-10 17:06:09 +01:00
Andrés Moya
d6f3efb358 🎉 Add more tests for components 2021-02-10 14:46:10 +01:00
Andrés Moya
884410c0d8 🎉 Add more tests for components 2021-02-10 14:46:10 +01:00
Andrés Moya
cdab9ff69c 🎉 Add more tests of components 2021-02-10 14:46:10 +01:00
Andrey Antukh
1da43bb5b5 Merge branch 'hotfixes' into main 2021-02-10 12:30:04 +01:00
Andrey Antukh
6f3a08be0c 🐛 Remove file lock contention on media upload. 2021-02-10 12:25:32 +01:00
Andrey Antukh
e5cb6ebec7 More improvements on background task scheduling. 2021-02-10 12:25:22 +01:00
Andrey Antukh
f60ad9e559 🐛 Fix unexpected 404 error on access shared link. 2021-02-10 12:24:58 +01:00
Andrey Antukh
69b23e4000 Change background tasks schedule. 2021-02-10 12:24:06 +01:00
Andrey Antukh
bedfb9a1ee Increment default statement timeout. 2021-02-10 12:23:51 +01:00
Andrey Antukh
e4fb802d7a Minor improvement on telemetry server error reporting. 2021-02-10 12:23:29 +01:00
Andrés Moya
068a099f37 Merge pull request #616 from penpot/niwinz/bugfixes-1
Bugfixes
2021-02-10 12:13:47 +01:00
Andrey Antukh
fa573f8a24 🐛 Remove file lock contention on media upload. 2021-02-10 12:07:35 +01:00
Andrey Antukh
ebb745cc11 More improvements on background task scheduling. 2021-02-10 12:07:35 +01:00
Andrey Antukh
2b33300d79 🐛 Fix unexpected exception on uploading invalid svg file. 2021-02-10 12:07:35 +01:00
Andrey Antukh
946d40e6cd Improve error handling on google auth. 2021-02-10 12:07:35 +01:00
Andrey Antukh
36285a65d2 🐛 Show correct error when google auth is disabled on backend. 2021-02-10 12:07:35 +01:00
Andrey Antukh
fc49674997 🐛 Add better error handling on upload image by url. 2021-02-10 12:07:35 +01:00
Andrey Antukh
d0a8647186 🐛 Fix unexpected 404 error on access shared link. 2021-02-10 12:07:35 +01:00
Andrey Antukh
9b875aba21 🐛 Fix unexpected exception on upload invalid image. 2021-02-10 12:07:35 +01:00
Andrey Antukh
76e43f339a 🎉 Add missing index to file_change table. 2021-02-10 12:07:35 +01:00
Andrey Antukh
32e832eb39 🎉 Add srepl helper for migrate page storage to new blob format. 2021-02-10 12:07:35 +01:00
Andrey Antukh
60704bca17 Change background tasks schedule. 2021-02-10 12:07:35 +01:00
Andrey Antukh
43e4712b86 📚 Fix CLA mention on CONTRIBUTING.md file.
Closing #590
2021-02-10 12:07:35 +01:00
Andrey Antukh
5359c3a7ed Increment default statement timeout. 2021-02-10 12:07:35 +01:00
Andrey Antukh
81bf68c67c Minor improvement on telemetry server error reporting. 2021-02-10 12:07:35 +01:00
alonso.torres
4d5231598f 🐛 Fixes issues with moving shapes outside groups 2021-02-09 15:42:16 +01:00
Andrey Antukh
c1a139fc51 🎉 Add user feedback module. 2021-02-09 14:12:31 +01:00
Andrey Antukh
1cb18ad7cb Merge branch 'main' into develop 2021-02-09 12:53:52 +01:00
Andrey Antukh
6f0258c8d4 Improve build scripts. 2021-02-09 12:53:09 +01:00
Andrey Antukh
124efc0d88 Improve build scripts. 2021-02-09 12:18:14 +01:00
mathieu.brunot
924ecd998f 🐛 Fix ldap function called on login click
Signed-off-by: mathieu.brunot <mathieu.brunot@monogramm.io>
2021-02-09 09:40:12 +01:00
Andrés Moya
07a94de607 Merge branch 'main' into develop 2021-02-08 16:49:15 +01:00
Andrés Moya
7bd05d63ac 🐛 Fix error 500 when requesting a password reset 2021-02-08 16:30:35 +01:00
mathieu.brunot
bb15924c95 🐳 Frontend configuration on env var
Signed-off-by: mathieu.brunot <mathieu.brunot@monogramm.io>
2021-02-08 14:26:23 +01:00
Nishant Srivastava
1ebce37e17 Update getting started guide 2021-02-08 14:15:45 +01:00
Danny Lin
b93dc752fe 💄 Update UXBOX name in emails
When registering for a new account, I noticed that the HTML emails had
the new Penpot name but the plain-text versions were still using the old
UXBOX name. This commit fixes the discrepancy.

Signed-off-by: Danny Lin <danny@kdrag0n.dev>
2021-02-08 13:59:26 +01:00
Andrey Antukh
dbbe1f7df2 📎 Minor improvement on main ns on srepl module. 2021-02-08 13:52:51 +01:00
Andrey Antukh
a709c47f6f 🎉 Add zstd+nippy based blob storage format. 2021-02-08 13:52:51 +01:00
Andrey Antukh
68ed30ff35 📚 Update CONTRIBUTING.md file. 2021-02-05 15:01:50 +01:00
Andrés Moya
a65a31810c Merge branch 'patch-1' of https://github.com/tomer/penpot into tomer-patch-1 2021-02-05 14:46:18 +01:00
Tomer Cohen
8c50dc0c72 Fix broken link to Taiga.io in README.md
Signed-off-by: Tomer Cohen <tomer@users.noreply.github.com>
2021-02-05 13:47:15 +02:00
alonso.torres
a8a036206b Pixel grid 2021-02-05 12:19:05 +01:00
Andrés Moya
8313f1d96e Merge branch 'Monogramm-i18n/fr' into develop 2021-02-05 11:48:37 +01:00
Andrés Moya
1898ed215e Merge branch 'i18n/fr' of https://github.com/Monogramm/penpot into Monogramm-i18n/fr 2021-02-05 11:44:13 +01:00
alonso.torres
83aceba913 Makes images proportion lock by default 2021-02-05 11:29:39 +01:00
mathieu.brunot
c56fb0ea47 🌐 Update French locale
Signed-off-by: mathieu.brunot <mathieu.brunot@monogramm.io>
2021-02-04 20:10:46 +01:00
Andrey Antukh
83a2df3ef3 🎉 Add changelog. 2021-02-04 16:27:54 +01:00
alonso.torres
4703f6d5c7 🐛 Fixes problem with multiple selection 2021-02-04 15:29:19 +01:00
alonso.torres
8d2797f8a1 🐛 Fixes problem with multiple selection 2021-02-04 15:08:47 +01:00
alonso.torres
6cdde84445 🐛 Color palette text-wrap and showing when open color palette 2021-02-04 14:54:40 +01:00
Andrey Antukh
afa35379b2 🐛 Fix onboarding after logging with token. 2021-02-04 14:47:14 +01:00
alonso.torres
1099e08b7d 🐛 Fixed small visual problem for images in handoff 2021-02-04 14:31:49 +01:00
alonso.torres
89cb20ada7 🐛 Fixes Ctrl+a for viewer 2021-02-04 14:31:49 +01:00
alonso.torres
32b0fd7b36 🐛 Fixes issue with multiple selection and shadows 2021-02-04 14:31:49 +01:00
Andrey Antukh
04670bb5f2 Reset some message timeout defaults. 2021-02-04 14:29:39 +01:00
Andrey Antukh
8566fe4ac1 Show close icon on messages by default. 2021-02-04 14:29:39 +01:00
Andrey Antukh
e607e8315c Auto login after email verify. 2021-02-04 14:29:39 +01:00
Andrés Moya
a9b7cf61a5 🐛 Fix display of custom shape strokes 2021-02-04 14:22:39 +01:00
elhombretecla
7c7bda669c Add better layout for register success page. 2021-02-04 13:36:47 +01:00
Andrey Antukh
0c82c6f2f5 🐛 Fix recursion error on not-found. 2021-02-04 13:34:38 +01:00
alonso.torres
b7cbe49cb2 🐛 Fixes image upload position when uploading from left sidebar 2021-02-04 12:43:50 +01:00
alonso.torres
7378089f4a 🐛 Fixes problems with multiple values in fill and stroke 2021-02-04 12:39:41 +01:00
Andrey Antukh
62b6b12066 Merge branch 'violoncelloCH-fix/js-var-prefix' into develop 2021-02-04 12:16:24 +01:00
Jonas Sulzer
39fdff9052 🐛 Fix js variable prefix app->penpot on config doc.
Signed-off-by: Jonas Sulzer <jonas@violoncello.ch>
2021-02-04 12:15:40 +01:00
alonso.torres
32c0913f00 🐛 Fixes problem with pixel-level movement 2021-02-04 11:54:45 +01:00
Andrey Antukh
7eb90d62b0 🐛 Fix typos on translation strings. 2021-02-04 11:48:47 +01:00
Andrey Antukh
ec2683417f 🐛 Fix image upload internal error. 2021-02-04 11:48:47 +01:00
Andrey Antukh
cb23c8b093 Increase default flash message timeout. 2021-02-04 11:48:47 +01:00
Andrey Antukh
687f7ddf64 Don't send emails on recovery password on not verified profile.
And show proper message to the user saying that the profile
need to be verfied before proceed.
2021-02-04 11:48:47 +01:00
Andrey Antukh
992a8e9aef Improve posible race condition handling on user registration. 2021-02-04 11:48:47 +01:00
Andrey Antukh
6e08c6bc35 📎 Fix linter issues. 2021-02-04 11:48:47 +01:00
Andrey Antukh
b71d05935a Expose user-agent and frontend-version on error report. 2021-02-04 11:48:47 +01:00
Andrey Antukh
c14dbc19f8 🎉 Add register confirmation page. 2021-02-04 11:48:47 +01:00
Andrey Antukh
1eff1c94c4 🔥 Remove goodbye page (useless). 2021-02-04 11:48:47 +01:00
Andrey Antukh
53be7feee1 🎉 Add 3rd party auth buttons to register page. 2021-02-04 11:48:47 +01:00
Andrey Antukh
e182cc4028 Add default headers to frontend http client. 2021-02-04 11:48:47 +01:00
Andrey Antukh
80309cbff3 Improve error reporting of tasks. 2021-02-04 11:48:47 +01:00
alonso.torres
816db29f9c Refactor of shortcuts and adaptations for macosx 2021-02-04 11:34:00 +01:00
Andrés Moya
526e0afc70 💄 Fix args and docstrings 2021-02-04 11:24:19 +01:00
Andrés Moya
77973af49f Remember assets libraries open in local session 2021-02-04 11:24:19 +01:00
Andrés Moya
dc5cff645a Remember color picker library in local session 2021-02-04 11:24:19 +01:00
alonso.torres
0ea8e9e750 🐛 Fixes issue with lock proportions 2021-02-04 11:18:59 +01:00
alonso.torres
69b4968578 Change to add when selected shape 2021-02-04 11:17:40 +01:00
Andrey Antukh
b7e266e350 Revert "🐛 Fixes problems with multiple values in fill and stroke"
This reverts commit 8fd8bc4537.
2021-02-03 17:27:08 +01:00
alonso.torres
b056cc35e4 🐛 Fixes problem when moving parent to children group 2021-02-03 15:36:28 +01:00
alonso.torres
d66452423f 🐛 Fixes recursion problems when creating component 2021-02-03 15:36:28 +01:00
Andrey Antukh
d85537fa7b Merge branch 'main' into develop 2021-02-03 15:18:35 +01:00
Andrey Antukh
fc11fb6e3d Reduce system resources for frontend build. 2021-02-03 15:18:16 +01:00
alonso.torres
cbdfb4349b 🐛 Fixed problem when editing paths 2021-02-03 13:30:59 +01:00
Abtin
19ed0b70c2 Update 00-Getting-Started.md
fix link to configuration guide
2021-02-03 13:29:55 +01:00
Andrey Antukh
3092747b5f Merge branch 'main' into develop 2021-02-03 13:27:03 +01:00
Andrey Antukh
0adfc2ddab Update manage.sh
Make the bundle use LZ4 compression by default.
2021-02-03 13:25:58 +01:00
alonso.torres
8fd8bc4537 🐛 Fixes problems with multiple values in fill and stroke 2021-02-03 12:30:58 +01:00
Andrey Antukh
e7d6a54907 🐛 Fix static file handling on docker images. 2021-02-03 11:30:10 +01:00
Hirunatan
e3c273c84b Merge pull request #532 from penpot/hotfix/texts
🐛 Fixes problems with paste empty text
2021-02-02 15:43:19 +01:00
alonso.torres
8aedbd1418 🐛 Fixes problems with paste empty text 2021-02-02 15:36:49 +01:00
Andrés Moya
e713c30785 🐛 Prevent browser dragging of images in some cases 2021-02-02 15:01:36 +01:00
Andrey Antukh
74a168d87e 🐛 Use proper config value. 2021-02-02 14:39:44 +01:00
Andrey Antukh
ca63ff621a 🐛 Fix email from handling. 2021-02-02 14:39:44 +01:00
Andrés Moya
d120af2c81 🐛 Fix workspace breadcrumb 2021-02-02 13:03:36 +01:00
alonso.torres
95ab5b57b7 🐛 Removes problems with texts 2021-02-02 13:03:21 +01:00
alonso.torres
2e7f90f3cc Adds commands to load data into user 2021-02-02 13:03:21 +01:00
Andrés Moya
8403352af8 🐛 Fix error in fixtures loading 2021-02-02 10:40:13 +01:00
Andrey Antukh
526b6e1f03 🐛 Unexpected exception on handling of invitation user registration. 2021-02-02 09:30:43 +01:00
Andrey Antukh
f2fd976934 📎 Replace develop with latest in default compose file. 2021-02-01 22:37:28 +01:00
Andrey Antukh
8b9371d7e1 🎉 Add the ability to disable mattermost webhook on runtime. 2021-02-01 22:37:28 +01:00
Andrés Moya
948a4038c6 Update social cards meta tags 2021-02-01 18:19:07 +01:00
alonso.torres
57c366ec9a 🐛 Fixes embedded images for external programs 2021-02-01 17:51:14 +01:00
Andrey Antukh
3c65f9fe91 📎 Minor changes on manage.sh 2021-02-01 17:40:09 +01:00
Hirunatan
4f92e68172 Merge pull request #510 from penpot/niwinz/circleci-frontend-tests
🎉 Add frontend tests to circleci.
2021-02-01 17:37:52 +01:00
Andrey Antukh
4e9d599e64 🎉 Add frontend tests to circleci. 2021-02-01 17:27:40 +01:00
Hirunatan
650c8bfc9e Merge pull request #508 from penpot/circleci-project-setup
🎉 Add circle CI (for backend).
2021-02-01 16:30:46 +01:00
Andrey Antukh
b3f9c3d27e 🎉 Add circle CI (for backend). 2021-02-01 14:06:06 +01:00
Mathieu Brunot
240de28567 📚 Improve frontend configuration docs 2021-02-01 13:03:13 +01:00
Andrey Antukh
5ff11fdd0a Merge pull request #507 from penpot/fixes/bugfixing
Bugfixing
2021-02-01 12:38:48 +01:00
alonso.torres
2de758a167 🐛 Fixed problem with context menu offscreen 2021-02-01 12:32:19 +01:00
alonso.torres
4ee6c278d9 Deferred components rendering 2021-02-01 12:30:07 +01:00
Andrey Antukh
9771db7133 🐛 Enable initial data for users registred from 3rd party auth. 2021-02-01 12:07:32 +01:00
alonso.torres
464c19bf39 🐛 Improved layout of share link button 2021-02-01 11:41:00 +01:00
Andrey Antukh
1d349ec62b 🐛 Minor fix on manage.sh script. 2021-02-01 11:33:03 +01:00
alonso.torres
334830b826 🐛 Fixes problem when creating mask 2021-02-01 11:27:57 +01:00
Andrés Moya
ccf1031fad 🐛 Disable team viewer role temporarily 2021-02-01 11:22:15 +01:00
Andrés Moya
5041020596 🐛 Fix psql script 2021-02-01 11:00:48 +01:00
Andrey Antukh
e2d842ec1a 🐛 Fix taiga badge. 2021-02-01 11:00:30 +01:00
alonso.torres
5a053d89b7 🐛 Fixed layout for shared libs 2021-02-01 10:59:36 +01:00
Andrey Antukh
7b82d91a7c 🎉 Add gitter badge. 2021-02-01 10:58:19 +01:00
Andrey Antukh
822bd91323 🐛 Fix team role change permissions handling. 2021-02-01 10:53:42 +01:00
Andrey Antukh
a397ab63f7 🐛 Fix permission handling on team mutations. 2021-02-01 09:48:28 +01:00
Andrey Antukh
4afd9e75da 🔥 Remove commented code. 2021-02-01 09:48:28 +01:00
Andrey Antukh
d1f7bc6198 🐛 Fix share-link incorrect error handling. 2021-02-01 09:48:28 +01:00
Andrey Antukh
3dd22fd298 🎉 Add tests for file-media-gc task. 2021-02-01 09:48:28 +01:00
Andrey Antukh
5ee6897ce6 🎉 Add tests for svgc. 2021-02-01 09:48:28 +01:00
Andrey Antukh
b252b55c85 🎉 Add metrics for svgc function. 2021-02-01 09:48:28 +01:00
Andrey Antukh
b80295a21c Fix all linter issues on backend code. 2021-02-01 09:48:28 +01:00
Andrey Antukh
6dafc087e9 Remove unused code from profile inital-data module. 2021-02-01 09:48:28 +01:00
Andrey Antukh
a599835e1f 🎉 Add tests for storage module. 2021-02-01 09:48:28 +01:00
Andrey Antukh
fac0354b2d 🚑 Fix broken tests. 2021-02-01 09:48:28 +01:00
Andrey Antukh
26948fb68b Make storage tasks more testable and traceable. 2021-02-01 09:48:28 +01:00
Andrey Antukh
586d95fb55 📎 Change logging level on rpc registry. 2021-02-01 09:48:28 +01:00
Andrey Antukh
2456b82e65 🎉 Add helpers for create datetimes in the past. 2021-02-01 09:48:28 +01:00
Andrey Antukh
2145130d21 Minor changes on delete profile tasks.
For testing purposes mainly.
2021-02-01 09:48:28 +01:00
Andrey Antukh
233cd8c3d6 Add expiration checking on storage functions. 2021-02-01 09:48:28 +01:00
Andrey Antukh
5751ac6b4e Minor adaptations for tests of profile creation function. 2021-02-01 09:48:28 +01:00
Andrey Antukh
2c05a82204 📎 Minor changes on default logging config (devenv). 2021-02-01 09:48:28 +01:00
Andrey Antukh
43b8743569 🔥 Remove unused code. 2021-02-01 09:48:28 +01:00
Andrey Antukh
c62bc408dc ⬆️ Minor deps update. 2021-02-01 09:48:28 +01:00
Andrey Antukh
8253ef90d0 Improve handling of temporal files.
Store temporal files outside of main fs backend.
2021-02-01 09:48:28 +01:00
Andrey Antukh
e54b443247 🎉 Add refcount-like functionality to storages.
This allows reuse of storage objects among different files.
2021-02-01 09:48:28 +01:00
Andrey Antukh
b57e63d7d6 Merge pull request #501 from penpot/more-tests
🎉 Add frontend tests for creating and renaming components
2021-01-29 22:53:20 +01:00
Andrey Antukh
60ba3eaf03 Merge pull request #502 from penpot/fixes/bugfixing
Bugfixing
2021-01-29 22:52:51 +01:00
alonso.torres
04246936d2 🐛 Fixed console error with NaN stroke 2021-01-29 21:46:03 +01:00
alonso.torres
5b7ffac74e 🐛 Fixes problem with cursor 2021-01-29 21:45:52 +01:00
alonso.torres
f4bbcdb382 🐛 Fixed problem with borders in images 2021-01-29 21:45:13 +01:00
Andrés Moya
c127978dd2 🎉 Add frontend tests for creating and renaming components 2021-01-29 18:04:49 +01:00
Andrey Antukh
e3891df243 Minor improvements on profile initial data. 2021-01-29 18:04:33 +01:00
alonso.torres
510d3cfa33 Allows initial data to be extracted/loaded to file 2021-01-29 18:04:33 +01:00
Hirunatan
676ce9b68d Merge pull request #500 from penpot/niwinz/enhacements-5
Niwinz/enhacements 5
2021-01-29 18:03:50 +01:00
Andrey Antukh
0d17d34983 Show default lang transation if no translation found. 2021-01-29 18:02:50 +01:00
Andrey Antukh
cd8a304690 ⬆️ Update beicon. 2021-01-29 18:02:50 +01:00
Andrey Antukh
1dcd7dc806 Improve implementation of rpc handler for profile deletion. 2021-01-29 18:02:50 +01:00
alonso.torres
b2bde8d97e Improvements over svg export 2021-01-29 15:51:03 +01:00
Andrey Antukh
afedd397a7 🐛 Simplify the impl of profile deletion. 2021-01-29 15:48:49 +01:00
Andrey Antukh
1210924562 🐛 Hide demo user link on login and register when is disabled. 2021-01-29 13:10:35 +01:00
Andrey Antukh
341bb8495a Improve globals handling on fronted application. 2021-01-29 13:10:35 +01:00
Andrey Antukh
b0749b5595 Add option for disable demo users. 2021-01-29 13:10:35 +01:00
Andrey Antukh
393c9cd13c 🔥 Remove unused config variables. 2021-01-29 12:58:57 +01:00
Andrey Antukh
b44dfc2d9d Simplify internal props handling and telemetry. 2021-01-29 12:58:57 +01:00
Andrey Antukh
fa852a1ab8 Merge pull request #496 from penpot/fixes/bugfixing
Bugfixing
2021-01-29 12:26:48 +01:00
alonso.torres
e38d78a7b4 🐛 Fixes problem in handoff 2021-01-29 12:24:04 +01:00
alonso.torres
bc3275e624 🐛 Fixed issues when changing pages quickly while resizing texts 2021-01-29 11:51:28 +01:00
alonso.torres
bb04181abf 🐛 Fixed problem with old svgs 2021-01-29 11:51:28 +01:00
Andrey Antukh
17d28ed9bc Merge pull request #494 from penpot/fixes/bugfixing
Bugfixing
2021-01-29 09:56:08 +01:00
alonso.torres
2374cf41f8 🐛 Fixed problem with timers 2021-01-29 09:53:55 +01:00
alonso.torres
3faa5b4a11 🐛 Fixes issues with export 2021-01-29 09:53:55 +01:00
alonso.torres
41ec622e26 🐛 Adds shortcut in tooltip for paths 2021-01-29 09:53:55 +01:00
alonso.torres
c84faeaa72 🐛 Fixes change language 2021-01-29 09:53:52 +01:00
alonso.torres
81480f203d 🐛 Show lens icon in search dashboard 2021-01-28 18:06:49 +01:00
alonso.torres
fd620a858c 🐛 Fixed measurements showing with itself 2021-01-28 18:06:49 +01:00
Andrey Antukh
8f1b373c3d 📚 Update documentation. 2021-01-28 16:27:18 +01:00
Andrey Antukh
f72a09b698 Merge pull request #491 from penpot/fix/cursor-responsiveness
Cursor responsiveness
2021-01-28 14:05:33 +01:00
Andrey Antukh
11ff1994f3 📚 Update documentation. 2021-01-28 14:02:22 +01:00
alonso.torres
0a6db0ff9b Changes mouse behaviour 2021-01-28 13:33:53 +01:00
alonso.torres
c4e47a8169 Improved workspace refs 2021-01-28 13:08:56 +01:00
Andrey Antukh
fe67bf8fdb 🔥 Remove unused extension. 2021-01-28 12:30:55 +01:00
Andrés Moya
8d9d711ad8 Synchronize shape flags into components 2021-01-28 12:00:59 +01:00
Andrey Antukh
1a4f3f0e18 Merge pull request #490 from penpot/fixes/more-performance-fixes
Performance fixes
2021-01-28 11:56:50 +01:00
Andrey Antukh
ccafd3a293 minor changes on manage.sh 2021-01-28 11:56:05 +01:00
Andrey Antukh
2359abf8a5 📎 Minor docstring change. 2021-01-28 11:31:48 +01:00
Andrey Antukh
2c89b611b5 🐛 Make the library persistence as separated operation. 2021-01-28 11:31:48 +01:00
Andrey Antukh
b6f359bcb8 🐛 Force persistence on go to dashboard. 2021-01-28 11:31:48 +01:00
alonso.torres
b966722899 Improved translate-to-frame performance 2021-01-27 21:52:55 +01:00
alonso.torres
4c5ef5ac8c Improved rules performance. Cleanup unused methods 2021-01-27 21:52:55 +01:00
alonso.torres
1273336622 Snaps depending on zoom level 2021-01-27 21:52:55 +01:00
alonso.torres
44eb961c27 Improved performance in workers 2021-01-27 21:52:55 +01:00
alonso.torres
385c7274a3 Improvements over cursor rendering 2021-01-27 21:52:55 +01:00
alonso.torres
00ca9755be Adds a debug FPS widget 2021-01-27 21:52:55 +01:00
Andrés Moya
3348370138 🌐 Add missing spanish translations 2021-01-27 17:13:39 +01:00
Andrés Moya
4b9ac6f1e5 🐛 Fix when trying to relocate a shape and their children 2021-01-27 16:49:09 +01:00
Andrey Antukh
1c098d9b04 Parse bigints as integers. 2021-01-27 15:21:44 +01:00
Andrey Antukh
af478c83cd 🐛 Ensure float on rect-center operation. 2021-01-27 15:21:44 +01:00
Andrés Moya
bd3921b91b Hide update library update notification on WS exit 2021-01-27 15:04:39 +01:00
alonso.torres
849eb7714c 🐛 Fixes problems with group options 2021-01-27 15:02:02 +01:00
Andrés Moya
4da1b46b05 🐛 Fix mini bug 2021-01-27 11:39:51 +01:00
alonso.torres
ba12a2bc6d 🐛 Fixes problem with svg root fill color 2021-01-27 10:59:35 +01:00
Andrey Antukh
fac6dd81b9 Minor chantes on async tasks scheduling. 2021-01-27 10:55:26 +01:00
Andrey Antukh
03d8bcaea2 Update docker-compose file. 2021-01-27 10:54:37 +01:00
Andrés Moya
686814f537 🎉 Add frontend tests for files and events that manage shapes 2021-01-27 10:27:08 +01:00
Andrés Moya
0cfb66ae16 🐛 Preserve added or removed shapes on a component normal update 2021-01-27 10:25:26 +01:00
Andrey Antukh
1ce68cb1cf Merge pull request #483 from penpot/fixes/performance-improvements
Performance improvements
2021-01-26 22:56:55 +01:00
Andrey Antukh
36eb48c649 📚 Update documentation. 2021-01-26 22:14:27 +01:00
alonso.torres
897b3d3f39 ♻️ Removed unused code. Fixed problem with alt key 2021-01-26 21:27:24 +01:00
Andrey Antukh
b1b1f1f579 🐛 Minor fix on manage.sh. 2021-01-26 18:55:53 +01:00
Andrey Antukh
b9fe8e4b33 🔥 Remove unused config. 2021-01-26 18:45:19 +01:00
Andrey Antukh
f7a4f9906c Fix middleware order. 2021-01-26 18:13:28 +01:00
alonso.torres
fb05999e9e Changes memoization policies 2021-01-26 17:35:49 +01:00
alonso.torres
60eae40006 ♻️ Refactor SVG raw shape 2021-01-26 17:35:49 +01:00
alonso.torres
815d1a906f Improved process-changes performance 2021-01-26 17:35:47 +01:00
alonso.torres
cf77ebde6a More performance improvements 2021-01-26 17:33:02 +01:00
alonso.torres
07d552c86b Improved text handling 2021-01-26 17:33:02 +01:00
alonso.torres
4513033634 Changed grid render for performance 2021-01-26 17:33:02 +01:00
alonso.torres
6a077c967a Performance improvements 2021-01-26 17:33:02 +01:00
Andrey Antukh
ea03477e8e Replace Error with Throwable (revert prev commit).
This reverts commit d218d70b8d.
2021-01-26 17:15:06 +01:00
Andrey Antukh
d218d70b8d Replace Throwable with Error. 2021-01-26 16:57:57 +01:00
Andrey Antukh
bc655ed9ef 🐛 Prevent to group with circular deps. 2021-01-26 16:57:57 +01:00
Andrey Antukh
1c42ace096 🐛 Properly capture stack overflow errors. 2021-01-26 16:57:57 +01:00
elhombretecla
7ec28c9481 add new mail date 2021-01-26 14:06:30 +01:00
elhombretecla
09c63c636f add ui fixes 2021-01-26 14:06:30 +01:00
Andrés Moya
a42d87742f 💄 Cosmetic changes 2021-01-26 13:27:35 +01:00
Andrés Moya
870eff5826 🎉 Update component in a shared library 2021-01-26 13:27:35 +01:00
Andrey Antukh
7f3ef7bb82 Minor improvements on docker images. 2021-01-26 12:57:21 +01:00
Andrey Antukh
c0fb108e06 Minor improvements on error reporting. 2021-01-26 12:56:57 +01:00
Andrey Antukh
7759418f5d 🎉 Start using ubuntu 20.04 LTS as a base distro for devenv. 2021-01-26 11:34:36 +01:00
Andrey Antukh
884bf57193 📎 Comment some debug log entries on notifications module. 2021-01-26 11:13:21 +01:00
Andrey Antukh
8236d84dfa Improve websocket notifications metrics. 2021-01-26 11:13:21 +01:00
Andrey Antukh
f8b349814c ♻️ Add labels support to metrics module.
And improve the rpc metrics using labels.
2021-01-26 11:13:21 +01:00
Andrey Antukh
9f581ed10b 🐛 Remove not necessary state cleaning. 2021-01-26 11:13:21 +01:00
Andrey Antukh
a3ffbeccd0 Add server timing. 2021-01-26 11:13:21 +01:00
Andrey Antukh
404fae9c7c Improve loading state on dashboard. 2021-01-26 11:13:21 +01:00
Andrey Antukh
b2bd4bd694 🐛 Properly handle temporal files on user uploads. 2021-01-26 11:13:21 +01:00
Andrey Antukh
a69a35a0b6 Improve storage recheck task and add more specs. 2021-01-26 11:13:21 +01:00
Andrey Antukh
340d1d43be Improve url resolution on assets handlers. 2021-01-26 11:13:21 +01:00
Andrey Antukh
d68286821b Add the notion of temporal files on the storage. 2021-01-26 11:13:21 +01:00
Andrey Antukh
5d0ad1ada2 🐛 Include error-report.tmpl in the backend bundle. 2021-01-26 11:13:21 +01:00
Andrey Antukh
9d7a814180 🎉 Add proper pprint for matrix and point types. 2021-01-26 11:13:21 +01:00
Andrey Antukh
33c25bfe6d 🐛 Add missing statements on migrations. 2021-01-25 11:51:15 +01:00
Andrey Antukh
c42949b61e ⬆️ Update frontend npm dependencies. 2021-01-25 11:51:15 +01:00
Andrey Antukh
3e84c9b70f 📎 Minor cosmetic changes. 2021-01-25 11:51:15 +01:00
Andrey Antukh
592153f968 🎉 Add resource usage limits. 2021-01-25 11:51:15 +01:00
Andrey Antukh
3c7fbb8fd6 🔥 Remove unused operation on coords component. 2021-01-25 11:51:15 +01:00
Andrey Antukh
0bbc006b98 Minor improvements on error reporter. 2021-01-25 11:51:15 +01:00
Andrey Antukh
5518f561f0 Make postgresql TOAST storage more friendly to ZFS. 2021-01-25 11:51:15 +01:00
Andrey Antukh
7cfe768dbd Add helper for access file data on server repl. 2021-01-25 11:51:15 +01:00
Andrey Antukh
04b0cf6330 🎉 Add better error reporting. 2021-01-25 11:51:15 +01:00
Andrey Antukh
1b70283c3a 🐛 Fix file-xlog-gc task.
And decrease the execution interval of the task to every 2 hours.
2021-01-25 11:51:15 +01:00
Andrey Antukh
5c1290d5b3 🐛 Properly deselect all shapes on posible error on saving. 2021-01-25 11:51:15 +01:00
Andrey Antukh
4ee1f9cf2c Minor improvements on error handling on frontend. 2021-01-25 11:51:15 +01:00
Andrey Antukh
594bceff77 📎 Minor change on error reporter. 2021-01-25 11:51:15 +01:00
Andrey Antukh
4e271603c2 🎉 Add helper to devenv for properly reset passwords. 2021-01-25 11:51:15 +01:00
Andrey Antukh
47a77ae1e2 🎉 Add helper script to run collect on messages from npm. 2021-01-25 11:51:15 +01:00
Andrey Antukh
bea093e8da ♻️ Refactor error handling. 2021-01-25 11:51:15 +01:00
Andrey Antukh
b4ba9d4375 Normalize permission checks. 2021-01-25 11:51:15 +01:00
alonso.torres
66fe0048a5 Adds system to load initial project data 2021-01-25 11:27:29 +01:00
alonso.torres
dfc6ebfeb0 Snap distances performance improvements 2021-01-22 15:35:59 +01:00
Andrés Moya
b0ea9d3096 🐛 Protect against syncing with a not existing component 2021-01-22 14:36:22 +01:00
Andrey Antukh
e4eaa74b51 🐛 Fix incorrect use of log/errorf. 2021-01-22 11:36:17 +01:00
Andrey Antukh
716490be26 🎉 Add global exception handler. 2021-01-22 11:19:59 +01:00
alonso.torres
86936a66e0 🐛 Fixed issues with text selection and edition 2021-01-21 17:03:23 +01:00
Andrey Antukh
40e54dbbd4 🐛 Fix file renaming on dashboard. 2021-01-20 22:50:18 +01:00
Andrey Antukh
f0b9837407 🐛 Fix profile images on workspace. 2021-01-20 22:14:56 +01:00
Andrés Moya
11418501a4 🐛 Manage correctly when components are dragged and dropped 2021-01-20 18:03:38 +01:00
Andrey Antukh
e240525a35 🐛 Avoid exception on insert duplicates on user invitations. 2021-01-20 17:33:54 +01:00
Andrey Antukh
1467fd5dbf 🎉 Add sql helpers wrappers with proper defaults. 2021-01-20 17:33:54 +01:00
Andrey Antukh
5d67a6f427 🐛 Hide invitation modal on success. 2021-01-20 17:33:54 +01:00
Andrey Antukh
d7a5cddcb3 Merge pull request #471 from penpot/fixes/performance
Performance improvements
2021-01-20 11:20:23 +01:00
alonso.torres
83f84e5b6a 🐛 Fixes transient implementation 2021-01-20 11:19:29 +01:00
alonso.torres
d19dc1cf56 Improved snap performance 2021-01-19 23:02:51 +01:00
alonso.torres
27e83342f9 Improvements to performance 2021-01-19 18:44:32 +01:00
Andrey Antukh
9cfefbdb86 Make metrics optional on http server. 2021-01-19 16:48:30 +01:00
Andrey Antukh
412a3c923b 🐛 Fix unexpected exception on pprint error. 2021-01-19 16:33:32 +01:00
Andrey Antukh
4e43bf5f78 Improve version parsing. 2021-01-19 16:28:53 +01:00
Andrey Antukh
ef25f8a721 Avoid reflection on s3 storage backend. 2021-01-19 15:37:26 +01:00
Andrey Antukh
34e5e5c513 🎉 Add jetty metrics. 2021-01-19 15:37:26 +01:00
Andrey Antukh
d8ee07d1e4 🎉 Add metrics to notification service. 2021-01-19 15:01:33 +01:00
Andrey Antukh
d494e44df3 🎉 Add builtin copy fast path operation for storage. 2021-01-19 15:01:33 +01:00
Andrey Antukh
15edabc977 🐛 Set proper permission check on retrieving team users. 2021-01-19 15:01:33 +01:00
Andrey Antukh
4fbd2e6caa 🐛 Fix unexpected unauthorized exception on read team members. 2021-01-19 15:01:33 +01:00
Andrey Antukh
b7a90eb4e4 Minor changes on email sending internals. 2021-01-19 15:01:33 +01:00
Andrey Antukh
af310854fc 🐛 Set proper exception type on notauthorized requests. 2021-01-19 15:01:33 +01:00
Andrés Moya
9805f8b9f2 🎉 Rename shapes inside components 2021-01-19 11:23:06 +01:00
alonso.torres
dd283381a1 Duplicate pages 2021-01-19 11:22:41 +01:00
Andrey Antukh
c775f5aba0 Minor change on shadow-cljs config. 2021-01-19 09:47:19 +01:00
Andrey Antukh
6df976d1f3 🐛 Fix advanced compilation of util.globals ns. 2021-01-18 23:53:24 +01:00
Andrey Antukh
43d32af540 Minor fix on telemetry http handler. 2021-01-18 23:27:30 +01:00
Andrey Antukh
43ac9a9a22 Remove unused param on backend build script. 2021-01-18 23:18:39 +01:00
alonso.torres
91db8a9247 🐛 Fixed problem in handoff with images 2021-01-18 21:36:17 +01:00
Andrés Moya
e69d402b4f Change behavior of select-all command 2021-01-18 18:13:06 +01:00
Andrés Moya
f3d5515795 🐛 Detach a shape when moving it out of a component 2021-01-18 17:06:32 +01:00
Andrés Moya
bde62473a4 ✔️ Allow for tests of data module at frontend 2021-01-18 17:05:31 +01:00
Andrey Antukh
87cf91a044 🐛 Increase idle_in_transaction timeout to 120s. 2021-01-18 15:29:07 +01:00
Andrey Antukh
0f7372bfb4 🐛 Fix NPE on notifications module (on abrupt disconnect). 2021-01-18 15:28:46 +01:00
alonso.torres
76b7272a72 🐛 Fixed paste components from other files 2021-01-18 12:30:09 +01:00
alonso.torres
b3abc9fd6a 🐛 Fixes download image in handoff 2021-01-18 10:19:41 +01:00
alonso.torres
20731be1a4 Adding shapes over the selected shapes 2021-01-18 10:19:41 +01:00
Andrey Antukh
8f57ab343c Add jvm metrics. 2021-01-16 00:31:38 +01:00
Andrey Antukh
83f43af36e 🐛 Proper prefix rpc metrics. 2021-01-15 15:39:27 +01:00
Andrey Antukh
32de3d9f1d Minor changes on default config. 2021-01-15 14:29:56 +01:00
Andrés Moya
c04af27bf3 💄 Enhance traces of changes 2021-01-15 11:01:27 +01:00
Andrés Moya
091ea785e5 ♻️ Simplify add container id to changes 2021-01-15 11:01:27 +01:00
Andrés Moya
fe7faf0d0d Rework changes detection 2021-01-15 11:01:27 +01:00
Andrés Moya
43b1d3ca43 🐛 Regenerate components after resize in sync 2021-01-15 11:01:27 +01:00
Andrés Moya
6453cb9d11 :bug Fix calculate position of subcomponents on sync 2021-01-15 11:01:27 +01:00
Andrés Moya
bb5d0b63ef Enable touched detection in width and height changes 2021-01-15 11:01:27 +01:00
alonso.torres
999e2f6633 🐛 Fixes problems with svg imports 2021-01-15 09:22:32 +01:00
Andrey Antukh
fd4c61ece7 Merge pull request #456 from penpot/bugfixing
Bugfixing
2021-01-14 14:45:54 +01:00
alonso.torres
767f1c7b3d Center content on load 2021-01-14 14:14:55 +01:00
alonso.torres
a3d8af9a96 🐛 Fixes measurements with with scroll 2021-01-14 12:47:09 +01:00
alonso.torres
9ee54d6267 🐛 Fixes issue with showing interactions on click 2021-01-14 12:33:43 +01:00
alonso.torres
cf4a4b2b25 🐛 Fixed search that displays deprecated materials 2021-01-14 12:16:30 +01:00
alonso.torres
3b6c9f9511 🐛 Fixes issues with horizontal scroll with trackpad 2021-01-14 11:48:32 +01:00
alonso.torres
356572c21b 🐛 Copy for delete page dialog 2021-01-14 11:48:06 +01:00
alonso.torres
cb7499c10a 🐛 Fixes path/curve position for frame 2021-01-14 11:19:59 +01:00
alonso.torres
28658cae73 🐛 Fixed remove fill to transparent color 2021-01-14 08:21:33 +01:00
alonso.torres
ba7b2fd270 🐛 Fixed problems with lines selrect 2021-01-14 08:21:33 +01:00
alonso.torres
a14686c9f3 🐛 Hides grid when moving a frame 2021-01-14 08:21:33 +01:00
alonso.torres
a450dee7cf 🐛 New paths over shapes 2021-01-14 08:21:33 +01:00
alonso.torres
55a7a34a1d 🐛 Scroll in pages list when more than 4 elements 2021-01-14 08:21:33 +01:00
alonso.torres
4e7a3c09a6 🐛 Fixed problem with filters clipping 2021-01-14 08:21:33 +01:00
alonso.torres
292faec46f 🐛 Fixes paste in workspace inputs 2021-01-14 08:21:33 +01:00
alonso.torres
b616efd75c 🐛 Fixes comments styles 2021-01-14 08:21:33 +01:00
Andrey Antukh
ee147612a3 Minor change on manage.sh. 2021-01-13 17:25:41 +01:00
Andrey Antukh
69ead3348f 🐛 Fix backend dist build script.
Add svgclean.js to the dist.
2021-01-13 15:15:35 +01:00
Andrey Antukh
f66ddcaa2d 🎉 Integrate exporter with svgclean. 2021-01-13 15:15:35 +01:00
alonso.torres
70d464189f 🐛 Fixes scroll speed on firefox 2021-01-13 13:08:55 +01:00
alonso.torres
60e2abde1b 🐛 Fixes masks in Firefox 2021-01-13 13:08:55 +01:00
alonso.torres
79fc3cbf12 🐛 Fixed paste with middle button in firefox 2021-01-13 13:08:55 +01:00
Andrey Antukh
ad2d8c8ee0 More improvements on media uploading. 2021-01-13 11:52:39 +01:00
Andrey Antukh
6a32428ca1 Update svgclean bundle. 2021-01-13 11:52:39 +01:00
Andrey Antukh
f8f90f308e Increase default docker compose version to 3.5. 2021-01-13 11:52:39 +01:00
Andrey Antukh
678fe3d63e 🐛 Fix svg assets uploading. 2021-01-13 11:52:39 +01:00
Andrey Antukh
f06264ea0a 🐛 fix fime-media-gc task. 2021-01-13 11:52:39 +01:00
alonso.torres
25824629f2 ♻️ Refactor svg uploads 2021-01-13 11:52:39 +01:00
alonso.torres
b999c05d1e Allows change colors from root 2021-01-13 11:52:39 +01:00
alonso.torres
5f0020a95c Changes to the selection in workspace and layers 2021-01-12 12:10:32 +01:00
alonso.torres
bb07c4b3b7 🐛 Fixes problems with raw-svg 2021-01-11 16:03:34 +01:00
Andrey Antukh
9043d2574b Minor improvements on docker images and compose file. 2021-01-11 14:29:38 +01:00
Andrey Antukh
031123b2ca Make svgclean behave exactly as svgo. 2021-01-11 11:08:40 +01:00
Andrey Antukh
3135de3eb3 Adjust default svgclean bundle config. 2021-01-11 09:21:09 +01:00
Andrey Antukh
64828c918d 🔥 Remove commented code. 2021-01-11 08:06:02 +01:00
Andrey Antukh
7aa7257d29 Integrate svgclean and graal-js to svgparse service. 2021-01-11 08:06:02 +01:00
Andrey Antukh
c648add963 🎉 Add svgclean (svgo graalvm/browser ready fork). 2021-01-11 08:06:02 +01:00
Andrey Antukh
16469daff3 Many improvements to the database layer.
- Proper handling of referenced tables deletion.
- Proper handling of storage referenced tables deletion.
- Remove of obsolete tables and triggers.
2021-01-11 08:06:02 +01:00
Andrey Antukh
d32cacf1da Minor improvements on storage http handlers. 2021-01-11 08:06:02 +01:00
Andrey Antukh
77c1163591 Merge pull request #447 from penpot/improve-component-sync
 Improve some cases of nested components sync
2021-01-08 15:35:23 +01:00
Andrés Moya
261cb249d2 Improve some cases of nested components sync 2021-01-08 15:17:43 +01:00
Andrey Antukh
0c3184ed83 🐛 Add missing spec. 2021-01-08 14:41:14 +01:00
Andrey Antukh
f909b316c7 🐛 Fix syntax error introduced in previous commit. 2021-01-08 14:31:24 +01:00
andrés gonzález
4768b023a4 🎉 Add missing spanish translations. 2021-01-08 14:21:15 +01:00
Andrey Antukh
d188ac2df4 Merge pull request #446 from penpot/fix/problems_with_text
:Fixes problems with texts options
2021-01-08 14:17:01 +01:00
Andrey Antukh
fdd36d48bc 🐛 Disable authentication for :login-or-register. 2021-01-08 14:12:56 +01:00
Andrey Antukh
6f5b18de3a 🐛 More fixes on github and google provider. 2021-01-08 13:39:36 +01:00
Andrey Antukh
df4adfe717 🐛 Fix inconsistent naming on rpc call on github and google auth provider. 2021-01-08 13:30:52 +01:00
Andrey Antukh
ff7330048b 🐛 Fix wrong params on google auth functions. 2021-01-08 13:22:00 +01:00
Andrey Antukh
afabd179fb 🐛 Use proper spec for profile photo upload. 2021-01-08 12:46:26 +01:00
Andrey Antukh
0c30d53d95 🐛 Fix wrong conn handling on some function on storage. 2021-01-08 12:37:32 +01:00
Andrey Antukh
151e36df0e 🐛 Fix wrong import on error reporter. 2021-01-08 12:37:00 +01:00
alonso.torres
2ece527f9b 🐛 Fixes problems with texts options 2021-01-08 11:49:36 +01:00
Andrey Antukh
d12b78985e Merge pull request #445 from penpot/issue/848/detach-colors
Issue/848/detach colors
2021-01-08 11:30:19 +01:00
Andrey Antukh
2d07df2541 Merge pull request #443 from penpot/feature/paste-svg
Upload SVG as shapes
2021-01-08 11:27:51 +01:00
alonso.torres
27a85ce0da ♻️ Refactor files upload effects 2021-01-08 11:25:38 +01:00
Andrés Moya
f75ec43b71 ♻️ Refactor frame grid options 2021-01-08 11:25:02 +01:00
Andrés Moya
b9e4861f16 🐛 Allow to detach color styles 2021-01-08 11:25:02 +01:00
alonso.torres
802f19453d Upload SVG as shapes 2021-01-07 19:07:52 +01:00
Andrey Antukh
5b79928590 Change default migration module name. 2021-01-07 17:07:36 +01:00
Andrey Antukh
860a97a769 🐛 Add missing files. 2021-01-07 12:04:12 +01:00
Andrey Antukh
25177898e1 🐛 Fix prefix bug on s3 storage backend. 2021-01-07 11:29:57 +01:00
Andrey Antukh
195fb3b29d 📎 Add exception hint on db not found exception. 2021-01-07 11:29:57 +01:00
Andrey Antukh
234b2c9427 🐛 Fix licence headers. 2021-01-07 11:29:57 +01:00
Vitaly Kornilov
f3b5b07796 🎉 Add github auth provider. 2021-01-07 11:29:57 +01:00
Andrey Antukh
63cc6aecaf 🐛 Add missing ref-deps on fixtures cli. 2021-01-07 11:29:57 +01:00
Andrey Antukh
8aedb0b881 🔥 Remove unused and commented code. 2021-01-07 11:29:57 +01:00
Andrey Antukh
8487859fc2 🐛 Remove obsolete spec-attr on user spec. 2021-01-07 11:29:57 +01:00
Andrey Antukh
20ecc79cd1 🐛 Fix label visualization on team leave modal. 2021-01-07 11:29:57 +01:00
Andrey Antukh
f83c8d4523 ♻️ Add missing svgparse http handler. 2021-01-07 11:29:57 +01:00
Andrey Antukh
33c8743215 🐛 Fix non-repl app start. 2021-01-07 11:29:57 +01:00
Andrey Antukh
ab944fb9ae ♻️ Integrate new storage subsystem. 2021-01-07 11:29:57 +01:00
Andrey Antukh
3d88749976 📎 Update .gitignore file. 2021-01-07 11:29:57 +01:00
Andrey Antukh
7d0cf6e8cc 🔥 Remove static directory. 2021-01-07 11:29:57 +01:00
Andrey Antukh
6fd7feffee Increase default max database poolsize to 20. 2021-01-07 11:29:57 +01:00
Andrey Antukh
760eb926bf 🎉 Add plugable storages abstraction layer (with support for fs, s3 and db). 2021-01-07 11:29:57 +01:00
Andrey Antukh
9146642947 🔥 Remove the mount dependency. 2021-01-07 11:29:57 +01:00
Andrey Antukh
6c1e2b8eab 🐛 Fix inconsistencies on error reporter module. 2021-01-07 11:29:57 +01:00
Andrey Antukh
ff6482fa29 🎉 Add telemetry client. 2021-01-07 11:29:57 +01:00
Andrey Antukh
c99f571296 Add more parameters to the http server module. 2021-01-07 11:29:57 +01:00
Andrey Antukh
9688bd8408 Minor changes on deps.edn file. 2021-01-07 11:29:57 +01:00
Andrey Antukh
707fa160e8 🎉 Add simple telemetry server module. 2021-01-07 11:29:57 +01:00
Andrey Antukh
4d9418e620 ⬆️ Update backend dependencies. 2021-01-07 11:29:57 +01:00
Andrey Antukh
9f12456456 ♻️ Replace mount with integrant. 2021-01-07 11:29:57 +01:00
Andrey Antukh
31d7aacec1 Merge pull request #442 from penpot/enhancement/open-container-on-drop
 Open container on layers sidebar on drop inside
2021-01-07 09:34:12 +01:00
Andrés Moya
c4720edda7 Open container on layers sidebar on drop inside 2021-01-07 09:31:30 +01:00
alonso.torres
2f0fcaf5d3 🐛 Fixes problems with top-level shape selection 2021-01-05 15:19:00 +01:00
Andrey Antukh
66606b7309 Merge pull request #440 from penpot/fix/numeric-inputs
Bug fixes and improvements
2021-01-04 09:16:53 +01:00
alonso.torres
6d328e852d 🐛 Selection tool not selected when editing shapes 2020-12-23 12:33:20 +01:00
alonso.torres
3f887f20e9 🐛 When creating a frame moves the top-level shapes inside 2020-12-23 12:29:36 +01:00
alonso.torres
9ae9da8256 🐛 Fixes problems with handoff and text shapes 2020-12-23 10:44:04 +01:00
alonso.torres
33b6df01ba 🐛 Fixes when blocking an object deselects it 2020-12-23 10:22:52 +01:00
alonso.torres
6af3824293 🐛 Fixed avatar on sessions in workspace 2020-12-23 10:16:46 +01:00
alonso.torres
507550edad 🐛 Fixes problem with image in profile 2020-12-23 10:11:31 +01:00
alonso.torres
b53fceefb9 🐛 Fixed problem with opacity in stroke 2020-12-23 10:04:33 +01:00
alonso.torres
c1c01aab02 🐛 Fixes problems with gradients when rotation 2020-12-23 09:58:43 +01:00
alonso.torres
e1923468a4 🐛 Fixes issues with empty input in options 2020-12-22 18:05:37 +01:00
alonso.torres
84007e6ad1 Allows rotation for shapes 2020-12-22 17:44:51 +01:00
Andrey Antukh
5636881463 🐛 Fix all the time redirect to login. 2020-12-22 16:23:23 +01:00
Andrey Antukh
7f8f8ecd62 Fix incompatibilities. 2020-12-22 15:33:15 +01:00
Andrey Antukh
88c0beddc6 🐛 Fix unexpected behavior of potok with native atom and symbols. 2020-12-22 15:21:34 +01:00
Andrey Antukh
37bd43a19f ⬆️ Update exporter dependencies. 2020-12-22 08:06:33 +01:00
Andrey Antukh
9b02889ea5 📎 Minor adaptations on manage.sh. 2020-12-22 08:00:44 +01:00
Andrey Antukh
f4cb7d1862 🐛 Fix login with google. 2020-12-21 17:45:30 +01:00
Andrey Antukh
4dd9767590 ⬆️ Update dependencies. 2020-12-21 16:55:54 +01:00
Andrey Antukh
dea5cf4b5d 🐛 Fix exception on copy action from context menu. 2020-12-21 16:55:54 +01:00
Andrey Antukh
b4b88bde0b 🐛 Prevent memory leak warning on deffered component. 2020-12-21 16:55:54 +01:00
Andrey Antukh
9c73444102 🐛 Minor fix on error reporting. 2020-12-21 16:55:54 +01:00
Andrey Antukh
c5f4ae2242 Mainly cosmetic and performance improvements on shape render. 2020-12-21 16:55:54 +01:00
Andrey Antukh
a3c583af1d 🐛 Don't allow bitints on ::safe-number spec. 2020-12-21 16:55:54 +01:00
Andrey Antukh
84e95ab4c2 Minor changes on http middleware. 2020-12-21 16:55:54 +01:00
Andrey Antukh
f12ade3b67 ♻️ Move the ghost rendering to separate component. 2020-12-21 16:55:54 +01:00
Andrey Antukh
dbb1e6a890 Revisit render flow of toplevel workspace components. 2020-12-21 16:55:54 +01:00
Andrey Antukh
38a645ad49 🔥 Remove unused code. 2020-12-21 16:55:54 +01:00
Andrey Antukh
4a5e27e641 ⬆️ Update potok to 3.0.0. 2020-12-21 12:15:53 +01:00
Andrey Antukh
b7353db14e Many improvements on error reporting. 2020-12-21 12:15:53 +01:00
Andrey Antukh
0f37c8ecbd 📎 Minor changes on manage.sh script. 2020-12-21 12:15:53 +01:00
Andrey Antukh
2c0a2ce750 🔥 Remove commented code. 2020-12-21 12:15:53 +01:00
Andrey Antukh
c0bc7553a9 ⬆️ Update devenv. 2020-12-21 12:15:53 +01:00
Andrey Antukh
067aece437 🎉 Add first helpers for manipulate the file data from server repl. 2020-12-21 12:15:53 +01:00
Andrey Antukh
a14a71c222 🔥 Remove unused code. 2020-12-21 12:15:53 +01:00
Andrey Antukh
4f6f4eea4c 🎉 Add basic code for svg parsing to clj data structure.
Usage example:

curl -X POST http://localhost:6060/api/svg -H "content-type: image/svg+xml" -d "@example2.svg" |jq
2020-12-21 12:15:53 +01:00
Andrey Antukh
f84d0f34e6 ♻️ Minor task naming and directory structure refactor. 2020-12-21 12:15:53 +01:00
Andrey Antukh
4849904b0b ♻️ Refactor file-media-gc task (mainly add more traces). 2020-12-21 12:15:53 +01:00
Andrey Antukh
9ed01cc0df Don't duplicate images when copy and paste in the same file. 2020-12-21 12:15:53 +01:00
Andrey Antukh
ea2079f36f Only print version on browser execution context. 2020-12-21 12:15:53 +01:00
Andrey Antukh
6fc90e20e9 🐛 Refactor copy/paste for proper handle image shape copying. 2020-12-21 12:15:53 +01:00
Andrey Antukh
01edf49de0 🐛 Fix incorrect erorr reporting. 2020-12-21 12:15:53 +01:00
Andrey Antukh
8f37f74d29 🐛 Avoid unexpected error when a cookie is expired. 2020-12-21 12:15:53 +01:00
Andrey Antukh
7e020f967b Increase heap memory on devenv repl script. 2020-12-21 12:15:53 +01:00
Andrey Antukh
99d3b80033 🐛 Show onboarding just after logging. 2020-12-21 12:15:53 +01:00
alonso.torres
b80332b9b3 🐛 Fixed problem with import SVG image size 2020-12-21 12:15:53 +01:00
Andrey Antukh
4ef471919c 🐛 Remove duplicated translation string. 2020-12-21 12:15:53 +01:00
elhombretecla
3c336cd8f6 Fix sidebar css 2020-12-21 12:15:53 +01:00
elhombretecla
4a2db204f1 🎉 Add feedback link to workspace 2020-12-21 12:15:53 +01:00
elhombretecla
7b458daa98 Add link to feedback dashboard 2020-12-21 12:15:53 +01:00
elhombretecla
dbf67dc47b 🎉 Add search section title 2020-12-21 12:15:53 +01:00
Andrey Antukh
686e9b64ef 🎉 Add navigation to feature slides on the onboarding modal. 2020-12-21 12:15:53 +01:00
alonso.torres
c674a300c6 🐛 Fixed problem with typographies and groups 2020-12-21 11:41:32 +01:00
alonso.torres
09bce9c285 🐛 Fixes problems with multiple selection and groups 2020-12-21 11:12:58 +01:00
alonso.torres
e26ece57d1 🐛 Fixed several issues with groups and multiple selection 2020-12-21 11:12:58 +01:00
Andrés Moya
9822c52573 Allow select multiple frames and extend selrect with shift 2020-12-21 10:24:55 +01:00
Andrés Moya
6ed470ed5f 🐛 Clear touched flags when detaching a component 2020-12-21 10:24:55 +01:00
Andrés Moya
4e48b78e03 🐛 Show correctly context menu when the shape was not selected 2020-12-21 10:24:55 +01:00
Andrés Moya
baec7838b4 ♻️ Always set component-file-id, even in local file 2020-12-21 10:23:19 +01:00
alonso.torres
53b5d78cdc 🐛 Fixes infinite loop when nil entry in objects 2020-12-15 20:13:12 +01:00
Andrey Antukh
f4157ba0e5 Improvements on image building. 2020-12-12 13:49:39 +01:00
1191 changed files with 130479 additions and 53740 deletions

110
.circleci/config.yml Normal file
View File

@@ -0,0 +1,110 @@
version: 2
jobs:
build:
docker:
# specify the version you desire here
- image: penpotapp/devenv:latest
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/postgres:9.4
- image: circleci/postgres:13.3-ram
environment:
POSTGRES_USER: penpot_test
POSTGRES_PASSWORD: penpot_test
POSTGRES_DB: penpot_test
- image: circleci/redis:6.0.8
working_directory: ~/repo
environment:
# Customize the JVM maximum heap limit
JVM_OPTS: -Xmx1g
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "backend/deps.edn" }}-{{ checksum "frontend/deps.edn"}}-{{ checksum "common/deps.edn"}}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run:
name: common lint
working_directory: "./common"
command: |
clj-kondo --version
clj-kondo --parallel --lint src/
- run:
name: frontend lint
working_directory: "./frontend"
command: |
clj-kondo --version
clj-kondo --parallel --lint src/
- run:
name: frontend styles prettier
working_directory: "./frontend"
command: |
yarn install
yarn run lint-scss
- run:
name: backend lint
working_directory: "./backend"
command: |
clj-kondo --version
clj-kondo --parallel --lint src/
# run backend test
- run:
name: backend test
working_directory: "./backend"
command: "clojure -X:dev:test"
environment:
PENPOT_TEST_DATABASE_URI: "postgresql://localhost/penpot_test"
PENPOT_TEST_DATABASE_USERNAME: penpot_test
PENPOT_TEST_DATABASE_PASSWORD: penpot_test
PENPOT_TEST_REDIS_URI: "redis://localhost/1"
- run:
name: frontend tests
working_directory: "./frontend"
command: |
yarn install
clojure -M:dev:shadow-cljs compile test
node target/tests.js
environment:
PATH: /usr/local/nodejs/bin/:/usr/local/bin:/bin:/usr/bin
# - run:
# working_directory: "./common"
# name: common tests (cljs)
# command: |
# yarn install
# yarn run compile-test
# node target/test.js
#
# environment:
# PATH: /usr/local/nodejs/bin/:/usr/local/bin:/bin:/usr/bin
- run:
working_directory: "./common"
name: common tests (clj)
command: |
clojure -X:dev:test
environment:
PATH: /usr/local/nodejs/bin/:/usr/local/bin:/bin:/usr/bin
- save_cache:
paths:
- ~/.m2
key: v1-dependencies-{{ checksum "backend/deps.edn" }}-{{ checksum "frontend/deps.edn"}}-{{ checksum "common/deps.edn"}}

View File

@@ -1,13 +1,32 @@
{:lint-as {potok.core/reify clojure.core/reify
promesa.core/let clojure.core/let
app.db/with-atomic clojure.core/with-open}
{:lint-as
{promesa.core/let clojure.core/let
rumext.alpha/defc clojure.core/defn
rumext.alpha/fnc clojure.core/fn
app.common.data/export clojure.core/def
app.db/with-atomic clojure.core/with-open
app.common.logging/with-context clojure.core/do}
:hooks
{:analyze-call
{app.common.data/export hooks.export/export
potok.core/reify hooks.export/potok-reify
app.util.services/defmethod hooks.export/service-defmethod
}}
:output
{:exclude-files ["data_readers.clj"]}
{:exclude-files
["data_readers.clj"
"app/util/perf.cljs"
"app/common/logging.cljc"
"app/common/exceptions.cljc"]}
:linters
{:unsorted-required-namespaces
{:level :warning}
:potok/reify-type
{:level :error}
:unresolved-namespace
{:level :warning
:exclude [data_readers]}
@@ -15,15 +34,12 @@
:single-key-in
{:level :warning}
:redundant-do
{:level :off}
:unused-binding
{:exclude-destructured-as true
:exclude-destructured-keys-in-fn-args false
}
:unresolved-symbol
{:exclude ['(app.services.mutations/defmutation)
'(app.services.queries/defquery)
'(app.util.dispatcher/defservice)
'(mount.core/defstate)
]}}}
}}

View File

@@ -0,0 +1,76 @@
(ns hooks.export
(:require [clj-kondo.hooks-api :as api]))
(defn export
[{:keys [:node]}]
(let [[_ sname] (:children node)
result (api/list-node
[(api/token-node (symbol "def"))
(api/token-node (symbol (name (:value sname))))
sname])]
{:node result}))
(def registry (atom {}))
(defn potok-reify
[{:keys [:node :filename] :as params}]
(let [[rnode rtype & other] (:children node)
rsym (symbol (str "event-type-" (name (:k rtype))))
reg (get @registry filename #{})]
(when-not (:namespaced? rtype)
(let [{:keys [:row :col]} (meta rtype)]
(api/reg-finding! {:message "ptk/reify type should be namespaced"
:type :potok/reify-type
:row row
:col col})))
(if (contains? reg rsym)
(let [{:keys [:row :col]} (meta rtype)]
(api/reg-finding! {:message (str "duplicate type: " (name (:k rtype)))
:type :potok/reify-type
:row row
:col col}))
(swap! registry update filename (fnil conj #{}) rsym))
(let [result (api/list-node
(into [(api/token-node (symbol "deftype"))
(api/token-node rsym)
(api/vector-node [])]
other))]
{:node result})))
(defn clojure-specify
[{:keys [:node]}]
(let [[rnode rtype & other] (:children node)
result (api/list-node
(into [(api/token-node (symbol "extend-type"))
(api/token-node (gensym (:string-value rtype)))]
other))]
{:node result}))
(defn service-defmethod
[{:keys [:node]}]
(let [[rnode rtype ?meta & other] (:children node)
rsym (gensym (name (:k rtype)))
result (api/list-node
[(api/token-node (symbol "do"))
(api/list-node
[(api/token-node (symbol "declare"))
(api/token-node rsym)])
(if (= :map (:tag ?meta))
(api/list-node
[(api/token-node (symbol "reset-meta!"))
(api/token-node rsym)
?meta])
(api/list-node
[(api/token-node (symbol "comment"))
(api/token-node rsym)]))
(api/list-node
(into [(api/token-node (symbol "defmethod"))
(api/token-node rsym)
rtype]
(cons ?meta other)))])]
;; (prn "==============" rtype (into {} ?meta))
;; (prn (api/sexpr result))
{:node result}))

View File

@@ -8,49 +8,48 @@ assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Actual behavior**
A clear and concise description of what happens instead; what the bug is.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: (e.g. iOS)
- Browser (e.g. chrome, safari)
- Version (e.g. 22)
- OS (e.g. iOS):
- Browser & version (e.g. Chrome 89.0):
**Smartphone (please complete the following information):**
- Device: (e.g. iPhone6)
- OS: (e.g. iOS8.1)
- Browser (e.g. stock browser, safari)
- Version (e.g. 22)
- Device & model (e.g. iPhone 6):
- OS & version (e.g. iOS 8.1):
- Browser & version (e.g. stock browser 22):
**Environment (please complete the following information):**
Specify if using demo instance or self-hosted instance.
- Host (e.g. https://design.penpot.app, local instance):
If self-hosted instance, add OS and runtime information to help explain your problem.
*If self-hosted:*
- OS Version (e.g. Ubuntu 16.04):
- Docker / Docker-compose version (e.g. Docker version 18.03.0-ce, build 0520e24):
- Image version (e.g. Alpine):
- OS Version: (e.g. Ubuntu 16.04)
Docker commands or docker-compose file (if possible and if proceed.x):
```
Also provide Docker commands or docker-compose file if possible.
- Docker / Docker-compose Version: (e.g. Docker version 18.03.0-ce, build 0520e24)
- Image (e.g. alpine)
**Frontend Stack Trace (if self-hosted)**
```
Frontend Stack Trace:
<details>
```
@@ -59,8 +58,7 @@ Also provide Docker commands or docker-compose file if possible.
</details>
**Backend Stack Trace (if self-hosted)**
Backend Stack Trace:
<details>
```
@@ -69,5 +67,6 @@ Also provide Docker commands or docker-compose file if possible.
</details>
**Additional context**
Add any other context about the problem here.
**Additional context:**
Any other context about the problem.

66
.gitignore vendored
View File

@@ -1,34 +1,54 @@
figwheel_server.log
*jar
*-init.clj
*.jar
*.penpot
*.orig
.calva
.clj-kondo
.cpcache
.lein-deps-sum
.lein-failures
.lein-repl-history
.lein-plugins/
.repl
.lein-repl-history
.lsp
.nrepl-port
.cpcache
.nyc_output
.rebel_readline_history
/vendor/**/target
/cd.md
node_modules
/backend/target/
/backend/resources/public/media
.repl
/.clj-kondo/.cache
/_dump
/backend/-
/backend/assets/
/backend/dist/
/backend/logs/
/backend/-
/frontend/npm-debug.log
/frontend/target/
/frontend/dist/
/frontend/out/
/frontend/.shadow-cljs
/frontend/resources/public/*
/exporter/target
/exporter/.shadow-cljs
/docker/images/bundle
/.clj-kondo/.cache
/backend/resources/public/assets
/backend/resources/public/media
/backend/target/
/bundle*
/media
/cd.md
/clj-profiler/
/common/.shadow-cljs
/common/coverage
/common/target
/deploy
/docker/images/bundle*
/exporter/.shadow-cljs
/exporter/target
/frontend/.shadow-cljs
/frontend/package-lock.json
/frontend/cypress/videos/*/
/frontend/cypress/fixtures/validuser.json
/frontend/dist/
/frontend/npm-debug.log
/frontend/out/
/frontend/resources/fonts/experiments
/frontend/resources/public/*
/frontend/target/
/frontend/cypress/videos/*/
/media
/telemetry/
/vendor/**/target
/vendor/svgclean/bundle*.js
/web
/_dump
clj-profiler/
figwheel_server.log
node_modules

105
.gitpod.yml Normal file
View File

@@ -0,0 +1,105 @@
image:
file: docker/gitpod/Dockerfile
ports:
# nginx
- port: 3449
onOpen: open-preview
# frontend nREPL
- port: 3447
onOpen: ignore
visibility: private
# frontend shadow server
- port: 3448
onOpen: ignore
visibility: private
# backend
- port: 6060
onOpen: ignore
# exporter shadow server
- port: 9630
onOpen: ignore
visibility: private
# exporter http server
- port: 6061
onOpen: ignore
# mailhog web interface
- port: 8025
onOpen: ignore
# mailhog postfix
- port: 1025
onOpen: ignore
# postgres
- port: 5432
onOpen: ignore
# redis
- port: 6379
onOpen: ignore
# openldap
- port: 389
onOpen: ignore
tasks:
# https://github.com/gitpod-io/gitpod/issues/666#issuecomment-534347856
- name: gulp
command: >
cd $GITPOD_REPO_ROOT/frontend/;
yarn && gp sync-done 'frontend-yarn';
npx gulp --theme=${PENPOT_THEME} watch
- name: frontend shadow watch
command: >
cd $GITPOD_REPO_ROOT/frontend/;
gp sync-await 'frontend-yarn';
npx shadow-cljs watch main
- init: gp await-port 5432 && psql -f $GITPOD_REPO_ROOT/docker/gitpod/files/postgresql_init.sql
name: backend
command: >
cd $GITPOD_REPO_ROOT/backend/;
./scripts/start-dev
- name: exporter shadow watch
command:
cd $GITPOD_REPO_ROOT/exporter/;
gp sync-await 'frontend-yarn';
yarn && npx shadow-cljs watch main
- name: exporter web server
command: >
cd $GITPOD_REPO_ROOT/exporter/;
./scripts/wait-and-start.sh
- name: signed terminal
before: >
[[ ! -z ${GNUGPG} ]] &&
cd ~ &&
rm -rf .gnupg &&
echo ${GNUGPG} | base64 -d | tar --no-same-owner -xzvf -
init: >
[[ ! -z ${GNUGPG_KEY} ]] &&
git config --global commit.gpgsign true &&
git config --global user.signingkey ${GNUGPG_KEY}
command: cd $GITPOD_REPO_ROOT
- name: redis
command: redis-server
- before: go get github.com/mailhog/MailHog
name: mailhog
command: MailHog
- name: Nginx
command: >
nginx &&
multitail /var/log/nginx/access.log -I /var/log/nginx/error.log

851
CHANGES.md Normal file
View File

@@ -0,0 +1,851 @@
# CHANGELOG
## 1.12.2-beta
### :bug: Bugs fixed
- Fix issue with guides over shape handlers [Taiga #3032](https://tree.taiga.io/project/penpot/issue/3032)
- Fix problem with shift+ctrl+click to select [#1671](https://github.com/penpot/penpot/issues/1671)
- Fix ellipsis in long page names [Taiga #2962](https://tree.taiga.io/project/penpot/issue/2962)
## 1.12.1-beta
### :bug: Bugs fixed
- Fix length of names in sidebar [Taiga #2962](https://tree.taiga.io/project/penpot/issue/2962)
- Fix issues on loki integration
## 1.12.0-beta
### :boom: Breaking changes
### :sparkles: New features
- Open feedback in a new window [Taiga #2901](https://tree.taiga.io/project/penpot/us/2901)
- Improve usage of file menu [Taiga #2853](https://tree.taiga.io/project/penpot/us/2853)
- Rotation to snap to 15º intervals with shift [Taiga #2437](https://tree.taiga.io/project/penpot/issue/2437)
- Support border radius and stroke properties for images [Taiga #497](https://tree.taiga.io/project/penpot/us/497)
- Disallow using same password as user email [Taiga #2454](https://tree.taiga.io/project/penpot/us/2454)
- Add configurable nudge amount [Taiga #910](https://tree.taiga.io/project/penpot/us/910)
- Add stroke properties for image shapes [Taiga #497](https://tree.taiga.io/project/penpot/us/497)
- On user settings, hide the theme selector as long as we only have one theme [Taiga #2610](https://tree.taiga.io/project/penpot/us/2610)
- Automatically open comments from dashboard notifications [Taiga #2605](https://tree.taiga.io/project/penpot/us/2605)
- Enhance the behaviour of the artboards list on view mode [Taiga #2634](https://tree.taiga.io/project/penpot/us/2634)
- Add recent used fonts in font selection widget [Taiga #1381](https://tree.taiga.io/project/penpot/us/1381)
- Allow to align items relative to groups [Taiga #2533](https://tree.taiga.io/project/penpot/us/2533)
- Scroll bars [Taiga #2550](https://tree.taiga.io/project/penpot/task/2550)
- Add select layer option to context menu [Taiga #2474](https://tree.taiga.io/project/penpot/us/2474)
- Guides [Taiga #290](https://tree.taiga.io/project/penpot/us/290)
- Improve file menu by adding semantically groups [Github #1203](https://github.com/penpot/penpot/issues/1203)
- Add update components in bulk option in context menu [Taiga #1975](https://tree.taiga.io/project/penpot/us/1975)
- Create first E2E tests [Taiga #2608](https://tree.taiga.io/project/penpot/task/2608), [Taiga #2608](https://tree.taiga.io/project/penpot/task/2608)
- Redesign of workspace toolbars [Taiga #2319](https://tree.taiga.io/project/penpot/us/2319)
- Graphic Tablet usability improvements [Taiga #1913](https://tree.taiga.io/project/penpot/us/1913)
- Improved mouse collision detection for groups and text shapes [Taiga #2452](https://tree.taiga.io/project/penpot/us/2452), [Taiga #2453](https://tree.taiga.io/project/penpot/us/2453)
- Add support for alternative S3 storage providers and all aws regions [#1267](https://github.com/penpot/penpot/issues/1267)
### :bug: Bugs fixed
- Fixed ungroup typography when editing it [Taiga #2391](https://tree.taiga.io/project/penpot/issue/2391)
- Fixed error when trying to post an empty comment [Taiga #2603](https://tree.taiga.io/project/penpot/issue/2603)
- Fixed missing translation strings [Taiga #2786](https://tree.taiga.io/project/penpot/issue/2786)
- Fixed color palette outside viewport [Taiga #2715](https://tree.taiga.io/project/penpot/issue/2715)
- Fixed missing translate string [Taiga #2780](https://tree.taiga.io/project/penpot/issue/2780)
- Fixed handoff shadow type text [Taiga #2717](https://tree.taiga.io/project/penpot/issue/2717)
- Fixed components get "dirty" marker when moved [Taiga #2764](https://tree.taiga.io/project/penpot/issue/2764)
- Fixed cannot align objects in a group that is not part of a frame [Taiga #2762](https://tree.taiga.io/project/penpot/issue/2762)
- Fix problem with double click on exit path editing [Taiga #2906](https://tree.taiga.io/project/penpot/issue/2906)
- Fixed alignment of layers with children [Taiga #2862](https://tree.taiga.io/project/penpot/issue/2862)
### :heart: Community contributions by (Thank you!)
- Cleanup unused static images (by @rhcarvalho) [#1561](https://github.com/penpot/penpot/pull/1561)
- Compress static images to save space (by @rhcarvalho) [#1562](https://github.com/penpot/penpot/pull/1562)
## 1.11.2-beta
### :bug: Bugs fixed
- Fix issue on handling empty content on boolean shapes
- Fix race condition issue on component renaming
- Handle EOF errors on writting streamed response
- Handle EOF errors on websocket send/ping methods
- Disable parallel upload of file media on import (causes too much
contention on the rlimit subsistem that does not works as expected
on high load).
### :sparkles: New features
- Add health check endpoint on API
- Increase default max connection pool size to 60
- Reduce resource usage of the error reporter.
## 1.11.1-beta
### :bug: Bugs fixed
- Fix issue related to default http host config value.
- Fix issue on rendering frames on firefox.
### :arrow_up: Deps updates
- Update nodejs version to 16.13.1 on docker images.
## 1.11.0-beta
### :sparkles: New features
- Add an option to hide artboards names on the viewport [Taiga #2034](https://tree.taiga.io/project/penpot/issue/2034)
- Limit pasted object position to container boundaries [Taiga #2449](https://tree.taiga.io/project/penpot/us/2449)
- Add new options for zoom widget in workspace and viewer mode [Taiga #896](https://tree.taiga.io/project/penpot/us/896)
- Allow decimals on stroke width and positions [Taiga #2035](https://tree.taiga.io/project/penpot/issue/2035)
- Ability to ignore background when exporting an artboard [Taiga #1395](https://tree.taiga.io/project/penpot/us/1395)
- Show color hex or name on hover [Taiga #2413](https://tree.taiga.io/project/penpot/us/2413)
- Add shortcut to create artboard from selected objects [Taiga #2412](https://tree.taiga.io/project/penpot/us/2412)
- Add shortcut for opacity [Taiga #2442](https://tree.taiga.io/project/penpot/us/2442)
- Setting fill automatically for new texts [Taiga #2441](https://tree.taiga.io/project/penpot/us/2441)
- Add shortcut to move action [Github #1213](https://github.com/penpot/penpot/issues/1213)
- Add alt as mod key to add stroke color from library menu [Taiga #2207](https://tree.taiga.io/project/penpot/us/2207)
- Add detach in bulk option to context menu [Taiga #2210](https://tree.taiga.io/project/penpot/us/2210)
- Add penpot look and feel to multiuser cursors [Taiga #1387](https://tree.taiga.io/project/penpot/us/1387)
- Add actions to go to main component context menu option [Taiga #2053](https://tree.taiga.io/project/penpot/us/2053)
- Add contrast between component select color and shape select color [Taiga #2121](https://tree.taiga.io/project/penpot/issue/2121)
- Add animations in interactions [Taiga #2244](https://tree.taiga.io/project/penpot/us/2244)
- Add performance improvements on .penpot file import process [Taiga #2497](https://tree.taiga.io/project/penpot/us/2497)
- On team settings set color of members count to black [Taiga #2607](https://tree.taiga.io/project/penpot/us/2607)
### :bug: Bugs fixed
- Fix remove gradient if any when applying color from library [Taiga #2299](https://tree.taiga.io/project/penpot/issue/2299)
- Fix Enter as key action to exit edit path [Taiga #2444](https://tree.taiga.io/project/penpot/issue/2444)
- Fix add fill color from palette to groups and components [Taiga #2313](https://tree.taiga.io/project/penpot/issue/2313)
- Fix default project name in all languages [Taiga #2280](https://tree.taiga.io/project/penpot/issue/2280)
- Fix line-height and letter-spacing inputs to allow negative values [Taiga #2381](https://tree.taiga.io/project/penpot/issue/2381)
- Fix typo in Handoff tooltip [Taiga #2428](https://tree.taiga.io/project/penpot/issue/2428)
- Fix crash when pressing Shift+1 on empty file [#1435](https://github.com/penpot/penpot/issues/1435)
- Fix masked group resize strange behavior [Taiga #2317](https://tree.taiga.io/project/penpot/issue/2317)
- Fix problems when exporting all artboards [Taiga #2234](https://tree.taiga.io/project/penpot/issue/2234)
- Fix problems with team management [#1353](https://github.com/penpot/penpot/issues/1353)
- Fix problem when importing in shared libraries [#1362](https://github.com/penpot/penpot/issues/1362)
- Fix problem with join nodes [#1422](https://github.com/penpot/penpot/issues/1422)
- After team onboarding importing a file will import into the team drafts [Taiga #2408](https://tree.taiga.io/project/penpot/issue/2408)
- Fix problem exporting shapes from handoff mode [Taiga #2386](https://tree.taiga.io/project/penpot/issue/2386)
- Fix lock/hide elements in context menu when multiples shapes selected [Taiga #2340](https://tree.taiga.io/project/penpot/issue/2340)
- Fix problem with booleans [Taiga #2356](https://tree.taiga.io/project/penpot/issue/2356)
- Fix line-height/letter-spacing inputs behaviour [Taiga #2331](https://tree.taiga.io/project/penpot/issue/2331)
- Fix dotted style in strokes [Taiga #2312](https://tree.taiga.io/project/penpot/issue/2312)
- Fix problem when resizing texts inside groups [Taiga #2310](https://tree.taiga.io/project/penpot/issue/2310)
- Fix problem with multiple exports [Taiga #2468](https://tree.taiga.io/project/penpot/issue/2468)
- Allow import to continue from recoverable failures [#1412](https://github.com/penpot/penpot/issues/1412)
- Improved behaviour on text options when not text is selected [Taiga #2390](https://tree.taiga.io/project/penpot/issue/2390)
- Fix decimal numbers in export viewbox [Taiga #2290](https://tree.taiga.io/project/penpot/issue/2290)
- Right click over artboard name to open its menu [Taiga #1679](https://tree.taiga.io/project/penpot/issue/1679)
- Make the default session cookue use SameSite=Lax instead of Strict (causes some issues in latest versions of Chrome)
- Fix "open in new tab" on dashboard [Taiga #2235](https://tree.taiga.io/project/penpot/issue/2355)
- Changing pages while comments activated will not close the panel [#1350](https://github.com/penpot/penpot/issues/1350)
- Fix navigate comments in right sidebar [Taiga #2163](https://tree.taiga.io/project/penpot/issue/2163)
- Fix keep name of component equal to the shape name [Taiga #2341](https://tree.taiga.io/project/penpot/issue/2341)
- Fix lossing changes when changing selection and an input was already changed [Taiga #2329](https://tree.taiga.io/project/penpot/issue/2329), [Taiga #2330](https://tree.taiga.io/project/penpot/issue/2330)
- Fix blur input field when click on viewport [Taiga #2164](https://tree.taiga.io/project/penpot/issue/2164)
- Fix default page id in workspace [Taiga #2205](https://tree.taiga.io/project/penpot/issue/2205)
- Fix problem when importing a file with grids [Taiga #2314](https://tree.taiga.io/project/penpot/issue/2314)
- Fix problem with imported svgs with filters [Taiga #2478](https://tree.taiga.io/project/penpot/issue/2478)
- Fix issues when updating selrect in paths [Taiga #2366](https://tree.taiga.io/project/penpot/issue/2366)
- Fix scroll jumps in handoff mode [Taiga #2383](https://tree.taiga.io/project/penpot/issue/2383)
- Fix handoff text with opacity [Taiga #2384](https://tree.taiga.io/project/penpot/issue/2384)
- Restored rules color [Taiga #2460](https://tree.taiga.io/project/penpot/issue/2460)
- Fix thumbnail not taking frame blending mode [Taiga #2301](https://tree.taiga.io/project/penpot/issue/2301)
- Fix import/export with SVG edge cases [Taiga #2389](https://tree.taiga.io/project/penpot/issue/2389)
- Avoid modifying component when moving into a group [Taiga #2534](https://tree.taiga.io/project/penpot/issue/2534)
- Show correctly group types label in handoff [Taiga #2482](https://tree.taiga.io/project/penpot/issue/2482)
- Display view mode buttons always centered in viewer [#Taiga 2466](https://tree.taiga.io/project/penpot/issue/2466)
- Fix default profile image generation issue [Taiga #2601](https://tree.taiga.io/project/penpot/issue/2601)
- Fix edit blur attributes for multiselection [Taiga #2625](https://tree.taiga.io/project/penpot/issue/2625)
- Fix auto hide header in viewer full screen [Taiga #2632](https://tree.taiga.io/project/penpot/issue/2632)
- Fix zoom in/out after fit or fill [Taiga #2630](https://tree.taiga.io/project/penpot/issue/2630)
- Normalize zoom levels in workspace and viewer [Taiga #2631](https://tree.taiga.io/project/penpot/issue/2631)
- Avoid empty names in projects, files and pages [Taiga #2594](https://tree.taiga.io/project/penpot/issue/2594)
- Fix "move to" menu when duplicated team or project names [Taiga #2655](https://tree.taiga.io/project/penpot/issue/2655)
- Fix ungroup a component leaves an asterisk in layers [Taiga #2694](https://tree.taiga.io/project/penpot/issue/2694)
### :arrow_up: Deps updates
- Update devenv docker image dependencies
### :heart: Community contributions by (Thank you!)
- Spelling fixes (by @jsoref) [#1340](https://github.com/penpot/penpot/pull/1340)
- Explain folders in components (by @candideu) [Penpot-docs #42](https://github.com/penpot/penpot-docs/pull/42)
- Readability improvements of user guide (by @PaulSchulz) [Penpot-docs #50](https://github.com/penpot/penpot-docs/pull/50)
## 1.10.4-beta
### :sparkles: Enhacements
- Allow parametrice file snapshoting interval
### :bug: Bugs fixed
- Fix issue on :mov-object change impl
- Minor fix on how file changes log is persisted
- Fix many issues on error reporting
## 1.10.3-beta
### :sparkles: Enhacements
- Make all logging asynchronous, this avoid some overhead on jetty threads at cost of logging latency.
- Increase default session time to 15 days.
### :bug: Bugs fixed
- Fix unexpected exception on saving pages with default grids [#2409](https://tree.taiga.io/project/penpot/issue/2409)
- Fix react warnings on setting size 1 on row and column grids.
- Fix minor issues on ZMQ logging listener (used in error reporting service)
- Remove "ALPHA" from the code.
- Fix value and nil handling on numeric-input component. This fixes many issues related to typography, components, etc. renaming.
- Fix NPE on email complains processing.
- Fix white page after leaving a team.
- Fix missing leave team button outside members page.
### :arrow_up: Deps updates
- Update log4j2 dependency.
## 1.10.2-beta
### :bug: Bugs fixed
- Fix corner case issues with media file uploads.
- Fix issue with default page grids validation.
- Fix issue related to some raceconditions on workspace navigation events.
### :arrow_up: Deps updates
- Update log4j2 dependency.
## 1.10.1-beta
### :bug: Bugs fixed
- Fix problems with team management [#1353](https://github.com/penpot/penpot/issues/1353)
## 1.10.0-beta
### :boom: Breaking changes
- The initial project / data mechanism (not documented) has been
disabled. Is the mechanism used for creating initial project on user
signup. With the new onboarding approach, this subsystem is no
longer needed and is disabled.
### :sparkles: New features
- Allow ungroup groups in bulk [Taiga #2211](https://tree.taiga.io/project/penpot/us/2211)
- Enhance corner radius behavior [Taiga #2190](https://tree.taiga.io/project/penpot/issue/2190)
- Allow preserve scroll position in interactions [Taiga #2250](https://tree.taiga.io/project/penpot/us/2250)
- Add new onboarding modals.
### :bug: Bugs fixed
- Fix problem with exporting before the document is saved [Taiga #2189](https://tree.taiga.io/project/penpot/issue/2189)
- Fix undo stacking when changing color from color-picker [Taiga #2191](https://tree.taiga.io/project/penpot/issue/2191)
- Fix pages dropdown in viewer [Taiga #2087](https://tree.taiga.io/project/penpot/issue/2087)
- Fix problem when exporting texts with gradients or opacity [Taiga #2200](https://tree.taiga.io/project/penpot/issue/2200)
- Fix problem with view mode comments [Taiga #2226](https://tree.taiga.io/project/penpot/issue/2226)
- Disallow to create a component when already has one [Taiga #2237](https://tree.taiga.io/project/penpot/issue/2237)
- Add ellipsis in long labels for input fields [Taiga #2224](https://tree.taiga.io/project/penpot/issue/2224)
- Fix problem with text rendering on export [Taiga #2223](https://tree.taiga.io/project/penpot/issue/2223)
- Fix problem when flattening booleans losing styles [Taiga #2217](https://tree.taiga.io/project/penpot/issue/2217)
- Add shortcuts to boolean icons popups [Taiga #2220](https://tree.taiga.io/project/penpot/issue/2220)
- Fix a worker error when transforming a rectangle into path
- Fix max/min values for opacity fields [Taiga #2183](https://tree.taiga.io/project/penpot/issue/2183)
- Fix viewer comment position when zoom applied [Taiga #2240](https://tree.taiga.io/project/penpot/issue/2240)
- Remove change style on hover for options [Taiga #2172](https://tree.taiga.io/project/penpot/issue/2172)
- Fix problem in viewer with dropdowns when comments active [#1303](https://github.com/penpot/penpot/issues/1303)
- Add placeholder to create shareable link
- Fix project files count not refreshing correctly after import [Taiga #2216](https://tree.taiga.io/project/penpot/issue/2216)
- Remove button after import process finish [Taiga #2215](https://tree.taiga.io/project/penpot/issue/2215)
- Fix problem with styles in the viewer [Taiga #2467](https://tree.taiga.io/project/penpot/issue/2467)
- Fix default state in viewer [Taiga #2465](https://tree.taiga.io/project/penpot/issue/2465)
- Fix division by zero in bool operation [Taiga #2349](https://tree.taiga.io/project/penpot/issue/2349)
### :heart: Community contributions by (Thank you!)
- To the translation community for the hard work on making penpot
available on so many languages.
- Guide to integrate with Azure Directory (by @skrzyneckik) [Penpot-docs #33](https://github.com/penpot/penpot-docs/pull/33)
- Improve libraries section readability (by @PaulSchulz) [Penpot-docs #39](https://github.com/penpot/penpot-docs/pull/39)
## 1.9.0-alpha
### :boom: Breaking changes
- Some stroke-caps can change behaviour.
- Text display bug fix could potentially make some texts jump a line.
### :sparkles: New features
- Add boolean shapes: intersections, unions, difference and exclusions[Taiga #748](https://tree.taiga.io/project/penpot/us/748)
- Add advanced prototyping [Taiga #244](https://tree.taiga.io/project/penpot/us/244)
- Add multiple flows [Taiga #2091](https://tree.taiga.io/project/penpot/us/2091)
- Change order of the teams menu so it's in the joined time order.
### :bug: Bugs fixed
- Enhance duplicating prototype connections behaviour [Taiga #2093](https://tree.taiga.io/project/penpot/us/2093)
- Ignore constraints in horizontal or vertical flip [Taiga #2038](https://tree.taiga.io/project/penpot/issue/2038)
- Fix color and typographies refs lost when duplicated file [Taiga #2165](https://tree.taiga.io/project/penpot/issue/2165)
- Fix problem with overflow dropdown on stroke-cap [#1216](https://github.com/penpot/penpot/issues/1216)
- Fix menu context for single element nested in components [#1186](https://github.com/penpot/penpot/issues/1186)
- Fix error screen when operations over comments fail [#1219](https://github.com/penpot/penpot/issues/1219)
- Fix undo problem when changing typography/color from library [#1230](https://github.com/penpot/penpot/issues/1230)
- Fix problem with text margin while rendering [#1231](https://github.com/penpot/penpot/issues/1231)
- Fix problem with masked texts on exporting [Taiga #2116](https://tree.taiga.io/project/penpot/issue/2116)
- Fix text editor enter behaviour with centered texts [Taiga #2126](https://tree.taiga.io/project/penpot/issue/2126)
- Fix residual stroke on imported svg [Taiga #2125](https://tree.taiga.io/project/penpot/issue/2125)
- Add links for terms of service and privacy policy in register checkbox [Taiga #2020](https://tree.taiga.io/project/penpot/issue/2020)
- Allow three character hex and web colors in color picker hex input [#1184](https://github.com/penpot/penpot/issues/1184)
- Allow lowercase search for fonts [#1180](https://github.com/penpot/penpot/issues/1180)
- Fix group renaming problem [Taiga #1969](https://tree.taiga.io/project/penpot/issue/1969)
- Fix export group with shadows on children [Taiga #2036](https://tree.taiga.io/project/penpot/issue/2036)
- Fix zoom context menu in viewer [Taiga #2041](https://tree.taiga.io/project/penpot/issue/2041)
- Fix stroke caps adjustments in relation with stroke size [Taiga #2123](https://tree.taiga.io/project/penpot/issue/2123)
- Fix problem duplicating paths [Taiga #2147](https://tree.taiga.io/project/penpot/issue/2147)
- Fix problem inheriting attributes from SVG root when importing [Taiga #2124](https://tree.taiga.io/project/penpot/issue/2124)
- Fix problem with lines and inside/outside stroke [Taiga #2146](https://tree.taiga.io/project/penpot/issue/2146)
- Add stroke width in selection calculation [Taiga #2146](https://tree.taiga.io/project/penpot/issue/2146)
- Fix shift+wheel to horizontal scrolling in MacOS [#1217](https://github.com/penpot/penpot/issues/1217)
- Fix path stroke is not working properly with high thickness [Taiga #2154](https://tree.taiga.io/project/penpot/issue/2154)
- Fix bug with transformation operations [Taiga #2155](https://tree.taiga.io/project/penpot/issue/2155)
- Fix bug in firefox when a text box is inside a mask [Taiga #2152](https://tree.taiga.io/project/penpot/issue/2152)
- Fix problem with stroke inside/outside [Taiga #2186](https://tree.taiga.io/project/penpot/issue/2186)
- Fix masks export area [Taiga #2189](https://tree.taiga.io/project/penpot/issue/2189)
- Fix paste in place in artboards [Taiga #2188](https://tree.taiga.io/project/penpot/issue/2188)
- Fix font size input stuck on selection change [Taiga #2184](https://tree.taiga.io/project/penpot/issue/2184)
- Fix stroke cut on shapes export [Taiga #2171](https://tree.taiga.io/project/penpot/issue/2171)
- Fix no color when boolean with an SVG [Taiga #2193](https://tree.taiga.io/project/penpot/issue/2193)
- Fix unlink color styles at strokes [Taiga #2206](https://tree.taiga.io/project/penpot/issue/2206)
### :arrow_up: Deps updates
### :heart: Community contributions by (Thank you!)
- To the translation community for the hard work on making penpot
available on so many languages.
## 1.8.4-alpha
### :bug: Bugs fixed
- Fix problem importing components [Taiga #2151](https://tree.taiga.io/project/penpot/issue/2151)
## 1.8.3-alpha
### :sparkles: New features
- Adds progress report to importing process.
## 1.8.2-alpha
### :bug: Bugs fixed
- Fix problem with masking images in viewer [#1238](https://github.com/penpot/penpot/issues/1238)
## 1.8.1-alpha
### :bug: Bugs fixed
- Fix project renaming issue (and some other related to the same underlying bug)
- Fix internal exception on audit log persistence layer.
- Set proper environment variable on docker images for chrome executable.
- Fix internal metrics on websocket connections.
## 1.8.0-alpha
### :boom: Breaking changes
- This release includes a new approach for handling share links, and
this feature is incompatible with the previous one. This means that
all the public share links generated previously will stop working.
### :sparkles: New features
- Add tooltips to color picker tabs [Taiga #1814](https://tree.taiga.io/project/penpot/us/1814)
- Add styling to the end point of any open paths [Taiga #1107](https://tree.taiga.io/project/penpot/us/1107)
- Allow to zoom with ctrl + middle button [Taiga #1428](https://tree.taiga.io/project/penpot/us/1428)
- Auto placement of duplicated objects [Taiga #1386](https://tree.taiga.io/project/penpot/us/1386)
- Enable penpot SVG metadata only when exporting complete files [Taiga #1914](https://tree.taiga.io/project/penpot/us/1914?milestone=295883)
- Export to PDF all artboards of one page [Taiga #1895](https://tree.taiga.io/project/penpot/us/1895)
- Go to a undo step clicking on a history element of the list [Taiga #1374](https://tree.taiga.io/project/penpot/us/1374)
- Increment font size by 10 with shift+arrows [1047](https://github.com/penpot/penpot/issues/1047)
- New shortcut to detach components Ctrl+Shift+K [Taiga #1799](https://tree.taiga.io/project/penpot/us/1799)
- Set email inputs to type "email", to aid keyboard entry [Taiga #1921](https://tree.taiga.io/project/penpot/issue/1921)
- Use shift+move to move element orthogonally [#823](https://github.com/penpot/penpot/issues/823)
- Use space + mouse drag to pan, instead of only space [Taiga #1800](https://tree.taiga.io/project/penpot/us/1800)
- Allow navigate through pages on the viewer [Taiga #1550](https://tree.taiga.io/project/penpot/us/1550)
- Allow create share links with specific pages [Taiga #1844](https://tree.taiga.io/project/penpot/us/1844)
### :bug: Bugs fixed
- Prevent adding numeric suffix to layer names when not needed [Taiga #1929](https://tree.taiga.io/project/penpot/us/1929)
- Prevent deleting or moving the drafts project [Taiga #1935](https://tree.taiga.io/project/penpot/issue/1935)
- Fix problem with zoom and selection [Taiga #1919](https://tree.taiga.io/project/penpot/issue/1919)
- Fix problem with borders on shape export [#1092](https://github.com/penpot/penpot/issues/1092)
- Fix thumbnail cropping issue [Taiga #1964](https://tree.taiga.io/project/penpot/issue/1964)
- Fix repeated fetch on file selection [Taiga #1933](https://tree.taiga.io/project/penpot/issue/1933)
- Fix rename typography on text options [Taiga #1963](https://tree.taiga.io/project/penpot/issue/1963)
- Fix problems with order in groups [Taiga #1960](https://tree.taiga.io/project/penpot/issue/1960)
- Fix SVG components preview [#1134](https://github.com/penpot/penpot/issues/1134)
- Fix group renaming problem [Taiga #1969](https://tree.taiga.io/project/penpot/issue/1969)
- Fix problem with import broken images links [#1197](https://github.com/penpot/penpot/issues/1197)
- Fix problem while moving imported SVG's [#1199](https://github.com/penpot/penpot/issues/1199)
### :arrow_up: Deps updates
### :boom: Breaking changes
### :heart: Community contributions by (Thank you!)
- eduayme [#1129](https://github.com/penpot/penpot/pull/1129)
## 1.7.4-alpha
### :bug: Bugs fixed
- Fix demo user creation (self-hosted only)
- Add better ldap response validation and reporting (self-hosted only)
## 1.7.3-alpha
### :bug: Bugs fixed
- Fix font uploading issue on Windows.
## 1.7.2-alpha
### :sparkles: New features
- Add many improvements to text tool.
### :bug: Bugs fixed
- Add scroll bar to Teams menu [Taiga #1894](https://tree.taiga.io/project/penpot/issue/1894)
- Fix repeated names when duplicating artboards or groups [Taiga #1892](https://tree.taiga.io/project/penpot/issue/1892)
- Fix properly messages lifecycle on navigate.
- Fix handling repeated names on duplicate object trees.
- Fix group naming on group creation.
- Fix some issues in svg transformation.
### :arrow_up: Deps updates
- Update frontend build tooling.
### :heart: Community contributions by (Thank you!)
- soultipsy [#1100](https://github.com/penpot/penpot/pull/1100)
## 1.7.1-alpha
### :bug: Bugs fixed
- Fix issue related to the GC and images in path shapes.
- Fix issue on the shape order on some undo operations.
- Fix issue on undo page deletion.
- Fix some issues related to constraints.
## 1.7.0-alpha
### :sparkles: New features
- Allow nested asset groups [Taiga #1716](https://tree.taiga.io/project/penpot/us/1716)
- Allow to ungroup assets [Taiga #1719](https://tree.taiga.io/project/penpot/us/1719)
- Allow to rename assets groups [Taiga #1721](https://tree.taiga.io/project/penpot/us/1721)
- Component constraints (left, right, left and right, center, scale...) [Taiga #1125](https://tree.taiga.io/project/penpot/us/1125)
- Export elements to PDF [Taiga #519](https://tree.taiga.io/project/penpot/us/519)
- Memorize collapse state of assets in panel [Taiga #1718](https://tree.taiga.io/project/penpot/us/1718)
- Headers button sets and menus review [Taiga #1663](https://tree.taiga.io/project/penpot/us/1663)
- Preserve components if possible, when pasted into a different file [Taiga #1063](https://tree.taiga.io/project/penpot/issue/1063)
- Add the ability to offload file data to a cheaper storage when file becomes inactive.
- Import/Export Penpot files from dashboard.
- Double click won't make a shape a path until you change a node [Taiga #1796](https://tree.taiga.io/project/penpot/us/1796)
- Incremental area selection [#779](https://github.com/penpot/penpot/discussions/779)
### :bug: Bugs fixed
- Process numeric input changes only if the value actually changed.
- Remove unnecessary redirect from history when user goes to workspace from dashboard [Taiga #1820](https://tree.taiga.io/project/penpot/issue/1820)
- Detach shapes from deleted assets [Taiga #1850](https://tree.taiga.io/project/penpot/issue/1850)
- Fix tooltip position on view application [Taiga #1819](https://tree.taiga.io/project/penpot/issue/1819)
- Fix dashboard navigation on moving file to other team [Taiga #1817](https://tree.taiga.io/project/penpot/issue/1817)
- Fix workspace header presence styles and invalid link [Taiga #1813](https://tree.taiga.io/project/penpot/issue/1813)
- Fix color-input wrong behavior (on workspace page color) [Taiga #1795](https://tree.taiga.io/project/penpot/issue/1795)
- Fix file contextual menu in shared libraries at dashboard [Taiga #1865](https://tree.taiga.io/project/penpot/issue/1865)
- Fix problem with color picker and fonts [#1049](https://github.com/penpot/penpot/issues/1049)
- Fix negative values in blur [Taiga #1815](https://tree.taiga.io/project/penpot/issue/1815)
- Fix problem when editing color in group [Taiga #1816](https://tree.taiga.io/project/penpot/issue/1816)
- Fix resize/rotate with mouse buttons different than left [#1060](https://github.com/penpot/penpot/issues/1060)
- Fix header partially visible on fullscreen viewer mode [Taiga #1875](https://tree.taiga.io/project/penpot/issue/1875)
- Fix dynamic alignment enabled with hidden objects [#1063](https://github.com/penpot/penpot/issues/1063)
## 1.6.5-alpha
### :bug: Bugs fixed
- Fix problem with paths editing after flip [#1040](https://github.com/penpot/penpot/issues/1040)
## 1.6.4-alpha
### :sparkles: Minor improvements
- Decrease default bulk buffers on storage tasks.
- Reduce file_change preserve interval to 24h.
### :bug: Bugs fixed
- Don't allow rename drafts project.
- Fix custom font deletion task.
- Fix custom font rendering on exporting shapes.
- Fix font loading on viewer app.
- Fix problem when moving files with drag & drop.
- Fix unexpected exception on searching without term.
- Properly handle nil values on `update-shapes` function.
- Replace frame term usage by artboard on viewer app.
## 1.6.3-alpha
### :bug: Bugs fixed
- Fix problem with merge and join nodes [#990](https://github.com/penpot/penpot/issues/990)
- Fix problem with empty path editing.
- Fix problem with create component.
- Fix problem with move-objects.
- Fix problem with merge and join nodes.
## 1.6.2-alpha
### :bug: Bugs fixed
- Add better auth module logging.
- Add missing `email` scope to OIDC backend.
- Add missing cause prop on error loging.
- Fix empty font-family handling on custom fonts page.
- Fix incorrect unicode code points handling on draft-to-penpot conversion.
- Fix some problems with paths.
- Fix unexpected exception on duplicate project.
- Fix unexpected exception when user leaves typography name empty.
- Improve error report on uploading invalid image to library.
- Minor fix on previous commit.
- Minor improvements on svg uploading on libraries.
## 1.6.1-alpha
### :bug: Bugs fixed
- Add safety check on reg-objects change impl.
- Fix custom fonts embedding issue.
- Fix dashboard ordering issue.
- Fix problem when creating a component with empty data.
- Fix problem with moving shapes into frames.
- Fix problems with mov-objects.
- Fix unexpected exception related to rounding integers.
- Fix wrong type usage on libraries changes.
- Improve editor lifecycle management.
- Make the navigation async by default.
## 1.6.0-alpha
### :sparkles: New features
- Add improved workspace font selector [Taiga US #292](https://tree.taiga.io/project/penpot/us/292)
- Add option to interactively scale text [Taiga #1527](https://tree.taiga.io/project/penpot/us/1527)
- Add performance improvements on dashboard data loading.
- Add performance improvements to indexes handling on workspace.
- Add the ability to upload/use custom fonts (and automatically generate all needed webfonts) [Taiga US #292](https://tree.taiga.io/project/penpot/us/292)
- Transform shapes to path on double click
- Translate automatic names of new files and projects.
- Use shift instead of ctrl/cmd to keep aspect ratio [Taiga 1697](https://tree.taiga.io/project/penpot/issue/1697)
- New translations: Portuguese (Brazil) and Romanias.
### :bug: Bugs fixed
- Remove interactions when the destination artboard is deleted [Taiga #1656](https://tree.taiga.io/project/penpot/issue/1656)
- Fix problem with fonts that ends with numbers [#940](https://github.com/penpot/penpot/issues/940)
- Fix problem with imported SVG on editing paths [#971](https://github.com/penpot/penpot/issues/971)
- Fix problem with color picker positioning
- Fix order on color palette [#961](https://github.com/penpot/penpot/issues/961)
- Fix issue when group creation leaves an empty group [#1724](https://tree.taiga.io/project/penpot/issue/1724)
- Fix problem with :multiple for colors and typographies [#1668](https://tree.taiga.io/project/penpot/issue/1668)
- Fix problem with locked shapes when change parents [#974](https://github.com/penpot/penpot/issues/974)
- Fix problem with new nodes in paths [#978](https://github.com/penpot/penpot/issues/978)
### :arrow_up: Deps updates
- Update exporter dependencies (puppeteer), that fixes some unexpected exceptions.
- Update string manipulation library.
### :boom: Breaking changes
- The OIDC setting `PENPOT_OIDC_SCOPES` has changed the default semantics. Before this
configuration added scopes to the default set. Now it replaces it, so use with care, because
penpot requires at least `name` and `email` props found on the user info object.
### :heart: Community contributions by (Thank you!)
- Translations: Portuguese (Brazil) and Romanias.
## 1.5.4-alpha
### :bug: Bugs fixed
- Fix issues on group rendering.
- Fix problem with text editing auto-height [Taiga #1683](https://tree.taiga.io/project/penpot/issue/1683)
## 1.5.3-alpha
### :bug: Bugs fixed
- Fix problem undo/redo.
## 1.5.2-alpha
### :bug: Bugs fixed
- Fix problem with `close-path` command [#917](https://github.com/penpot/penpot/issues/917)
- Fix wrong query for obtain the profile default project-id
- Fix problems with empty paths and shortcuts [#923](https://github.com/penpot/penpot/issues/923)
## 1.5.1-alpha
### :bug: Bugs fixed
- Fix issue with bitmap image clipboard.
- Fix issue when removing all path points.
- Increase default team invitation token expiration to 48h.
- Fix wrong error message when an expired token is used.
## 1.5.0-alpha
### :sparkles: New features
- Add integration with gitpod.io (an online IDE) [#807](https://github.com/penpot/penpot/pull/807)
- Allow basic math operations in inputs [Taiga 1383](https://tree.taiga.io/project/penpot/us/1383)
- Autocomplete color names in hex inputs [Taiga 1596](https://tree.taiga.io/project/penpot/us/1596)
- Allow to group assets (components and graphics) [Taiga #1289](https://tree.taiga.io/project/penpot/us/1289)
- Change icon of pinned projects [Taiga 1298](https://tree.taiga.io/project/penpot/us/1298)
- Internal: refactor of http client, replace internal xhr usage with more modern Fetch API.
- New features for paths: snap points on edition, add/remove nodes, merge/join/split nodes. [Taiga #907](https://tree.taiga.io/project/penpot/us/907)
- Add OpenID-Connect support.
- Reimplement social auth providers on top of the generic openid impl.
### :bug: Bugs fixed
- Fix problem with pan and space [#811](https://github.com/penpot/penpot/issues/811)
- Fix issue when parsing exponential numbers in paths
- Remove legacy system user and team [#843](https://github.com/penpot/penpot/issues/843)
- Fix ordering of copy pasted objects [Taiga #1618](https://tree.taiga.io/project/penpot/issue/1617)
- Fix problems with blending modes [#837](https://github.com/penpot/penpot/issues/837)
- Fix problem with zoom an selection rect [#845](https://github.com/penpot/penpot/issues/845)
- Fix problem displaying team statistics [#859](https://github.com/penpot/penpot/issues/859)
- Fix problems with text editor selection [Taiga #1546](https://tree.taiga.io/project/penpot/issue/1546)
- Fix problem when opening the context menu in dashboard at the bottom [#856](https://github.com/penpot/penpot/issues/856)
- Fix problem when clicking an interactive group in view mode [#863](https://github.com/penpot/penpot/issues/863)
- Fix visibility of pages in sitemap when changing page [Taiga #1618](https://tree.taiga.io/project/penpot/issue/1618)
- Fix visual problem with group invite [Taiga #1290](https://tree.taiga.io/project/penpot/issue/1290)
- Fix issues with promote owner panel [Taiga #763](https://tree.taiga.io/project/penpot/issue/763)
- Allow use library colors when defining gradients [Taiga #1614](https://tree.taiga.io/project/penpot/issue/1614)
- Fix group selrect not updating after alignment [#895](https://github.com/penpot/penpot/issues/895)
### :arrow_up: Deps updates
### :boom: Breaking changes
- Translations refactor: now penpot uses gettext instead of a custom
JSON, and each locale has its own separated file. All translations
should be contributed via the weblate.org service.
### :heart: Community contributions by (Thank you!)
- madmath03 (by [Monogramm](https://github.com/Monogramm)) [#807](https://github.com/penpot/penpot/pull/807)
- zzkt [#814](https://github.com/penpot/penpot/pull/814)
## 1.4.1-alpha
### :bug: Bugs fixed
- Fix typography unlinking.
- Fix incorrect measures on shapes outside artboard.
- Fix issues on svg parsing related to numbers with exponents.
- Fix some race conditions on removing shape from workspace.
- Fix incorrect state management of user lang selection.
- Fix email validation usability issue on team invitation lightbox.
## 1.4.0-alpha
### :sparkles: New features
- Add blob-encoding v3 (uses ZSTD+transit) [#738](https://github.com/penpot/penpot/pull/738)
- Add http caching layer on top of Query RPC.
- Add layer opacity and blend mode to shapes [Taiga #937](https://tree.taiga.io/project/penpot/us/937)
- Add more chinese translations [#726](https://github.com/penpot/penpot/pull/726)
- Add native support for text-direction (RTL, LTR & auto)
- Add several enhancements in shape selection [Taiga #1195](https://tree.taiga.io/project/penpot/us/1195)
- Add thumbnail in memory caching mechanism.
- Add turkish translation strings [#759](https://github.com/penpot/penpot/pull/759), [#794](https://github.com/penpot/penpot/pull/794)
- Duplicate and move files and projects [Taiga #267](https://tree.taiga.io/project/penpot/us/267)
- Hide viewer navbar on fullscreen [Taiga 1375](https://tree.taiga.io/project/penpot/us/1375)
- Import SVG will create Penpot's shapes [Taiga #1006](https://tree.taiga.io/project/penpot/us/1066)
- Improve french translations [#731](https://github.com/penpot/penpot/pull/731)
- Reimplement workspace presence (remove database state)
- Remember last visited team when you re-enter the application [Taiga #1376](https://tree.taiga.io/project/penpot/us/1376)
- Rename artboard with double click on the title [Taiga #1392](https://tree.taiga.io/project/penpot/us/1392)
- Replace Slate-Editor with DraftJS [Taiga #1346](https://tree.taiga.io/project/penpot/us/1346)
- Set proper page title [Taiga #1377](https://tree.taiga.io/project/penpot/us/1377)
### :bug: Bugs fixed
- Disable buttons in view mode for users without permissions [Taiga #1328](https://tree.taiga.io/project/penpot/issue/1328)
- Fix broken profile and profile options form.
- Fix calculate size of some animated gifs [Taiga #1487](https://tree.taiga.io/project/penpot/issue/1487)
- Fix error with the "Navigate to" button on prototypes [Taiga #1268](https://tree.taiga.io/project/penpot/issue/1268)
- Fix issue when undo after changing the artboard of a shape [Taiga #1304](https://tree.taiga.io/project/penpot/issue/1304)
- Fix issue with Alt key in distance measurement [#672](https://github.com/penpot/penpot/issues/672)
- Fix issue with blending modes in masks [Taiga #1476](https://tree.taiga.io/project/penpot/issue/1476)
- Fix issue with blocked shapes [Taiga #1480](https://tree.taiga.io/project/penpot/issue/1480)
- Fix issue with comments styles on dashboard [Taiga #1405](https://tree.taiga.io/project/penpot/issue/1405)
- Fix issue with default square grid [Taiga #1344](https://tree.taiga.io/project/penpot/issue/1344)
- Fix issue with enter key shortcut [#775](https://github.com/penpot/penpot/issues/775)
- Fix issue with enter to edit paths [Taiga #1481](https://tree.taiga.io/project/penpot/issue/1481)
- Fix issue with mask and flip [#715](https://github.com/penpot/penpot/issues/715)
- Fix issue with masks interactions outside bounds [#718](https://github.com/penpot/penpot/issues/718)
- Fix issue with middle mouse button press moving the canvas when not moving mouse [#717](https://github.com/penpot/penpot/issues/717)
- Fix issue with resolved comments [Taiga #1406](https://tree.taiga.io/project/penpot/issue/1406)
- Fix issue with rotated blur [Taiga #1370](https://tree.taiga.io/project/penpot/issue/1370)
- Fix issue with rotation degree input [#741](https://github.com/penpot/penpot/issues/741)
- Fix issue with system shortcuts and application [#737](https://github.com/penpot/penpot/issues/737)
- Fix issue with team management in dashboard [Taiga #1475](https://tree.taiga.io/project/penpot/issue/1475)
- Fix issue with typographies panel cannot be collapsed [#707](https://github.com/penpot/penpot/issues/707)
- Fix text selection in comments [#745](https://github.com/penpot/penpot/issues/745)
- Update Work-Sans font [#744](https://github.com/penpot/penpot/issues/744)
- Fix issue with recent files not showing [Taiga #1493](https://tree.taiga.io/project/penpot/issue/1493)
- Fix issue when promoting to owner [Taiga #1494](https://tree.taiga.io/project/penpot/issue/1494)
- Fix cannot click on blocked elements in viewer [Taiga #1430](https://tree.taiga.io/project/penpot/issue/1430)
- Fix SVG not showing properties at code [Taiga #1437](https://tree.taiga.io/project/penpot/issue/1437)
- Fix shadows when exporting groups [Taiga #1495](https://tree.taiga.io/project/penpot/issue/1495)
- Fix drag-select when renaming layer text [Taiga #1307](https://tree.taiga.io/project/penpot/issue/1307)
- Fix layout problem for editable selects [Taiga #1488](https://tree.taiga.io/project/penpot/issue/1488)
- Fix artboard title wasn't move when resizing [Taiga #1479](https://tree.taiga.io/project/penpot/issue/1479)
- Fix titles in viewer thumbnails too long [Taiga #1474](https://tree.taiga.io/project/penpot/issue/1474)
- Fix when right click on a selected text shows artboard contextual menu [Taiga #1226](https://tree.taiga.io/project/penpot/issue/1226)
### :boom: Breaking changes
- The LDAP configuration variables interpolation starts using `:`
(example `:username`) instead of `$`. The main reason is avoid
unnecessary conflict with bash interpolation.
### :arrow_up: Deps updates
- Update backend to JDK16.
- Update exporter nodejs to v14.16.0
### :heart: Community contributions by (Thank you!)
- iblueer [#726](https://github.com/penpot/penpot/pull/726)
- gizembln [#759](https://github.com/penpot/penpot/pull/759)
- girafic [#748](https://github.com/penpot/penpot/pull/748)
- mbrksntrk [#794](https://github.com/penpot/penpot/pull/794)
## 1.3.0-alpha
### :sparkles: New features
- Add emailcatcher and ldap test containers to devenv. [#506](https://github.com/penpot/penpot/pull/506)
- Add major refactor of internal pubsub/redis code; improves scalability and performance [#640](https://github.com/penpot/penpot/pull/640)
- Add more chinese translations [#687](https://github.com/penpot/penpot/pull/687)
- Add more presets for artboard [#654](https://github.com/penpot/penpot/pull/654)
- Add optional loki integration [#645](https://github.com/penpot/penpot/pull/645)
- Add proper http session lifecycle handling.
- Allow to set border radius of each rect corner individually
- Bounce & Complaint handling [#635](https://github.com/penpot/penpot/pull/635)
- Disable groups interactions when holding "Ctrl" key (deep selection)
- New action in context menu to "edit" some shapes (bound to key "Enter")
### :bug: Bugs fixed
- Add more improvements to french translation strings [#591](https://github.com/penpot/penpot/pull/591)
- Add some missing database indexes (mainly improves performance on large databases on file-update rpc method, and some background tasks)
- Disables filters in masking elements (issue with Firefox rendering)
- Drawing tool will have priority over resize/rotate handlers [Taiga #1225](https://tree.taiga.io/project/penpot/issue/1225)
- Fix broken bounding box on editing paths [Taiga #1254](https://tree.taiga.io/project/penpot/issue/1254)
- Fix corner cases on invitation/signup flows.
- Fix errors on onboarding file [Taiga #1287](https://tree.taiga.io/project/penpot/issue/1287)
- Fix infinite recursion on logout.
- Fix issues with frame selection [Taiga #1300](https://tree.taiga.io/project/penpot/issue/1300), [Taiga #1255](https://tree.taiga.io/project/penpot/issue/1255)
- Fix local fonts error [#691](https://github.com/penpot/penpot/issues/691)
- Fix issue width handoff code generation [Taiga #1204](https://tree.taiga.io/project/penpot/issue/1204)
- Fix issue with indices refreshing on page changes [#646](https://github.com/penpot/penpot/issues/646)
- Have language change notification written in the new language [Taiga #1205](https://tree.taiga.io/project/penpot/issue/1205)
- Hide register screen when registration is disabled [#598](https://github.com/penpot/penpot/issues/598)
- Properly handle errors on github, gitlab and ldap auth backends.
- Properly mark profile auth backend (on first register/ auth with 3rd party auth provider)
- Refactor LDAP auth backend.
### :heart: Community contributions by (Thank you!)
- girafic [#538](https://github.com/penpot/penpot/pull/654)
- arkhi [#591](https://github.com/penpot/penpot/pull/591)
## 1.2.0-alpha
### :sparkles: New features
- Add horizontal/vertical flip
- Add images lock proportions by default [#541](https://github.com/penpot/penpot/discussions/541), [#609](https://github.com/penpot/penpot/issues/609)
- Add new blob storage format (Zstd+nippy)
- Add user feedback form
- Improve French translations
- Improve component testing
- Increase default deletion delay to 7 days
- Show a pixel grid when zoom greater than 800% [#519](https://github.com/penpot/penpot/discussions/519)
- Fix behavior of select all command when there are objects outside frames [Taiga #1209](https://tree.taiga.io/project/penpot/issue/1209)
### :bug: Bugs fixed
- Fix 404 when access shared link [#615](https://github.com/penpot/penpot/issues/615)
- Fix 500 when requestion password reset
- Fix issue when transforming path shapes [Taiga #1170](https://tree.taiga.io/project/penpot/issue/1170)
- Fix apply a color to a text selection from color palette was not working [Taiga #1189](https://tree.taiga.io/project/penpot/issue/1189)
- Fix issues when moving shapes outside groups [Taiga #1138](https://tree.taiga.io/project/penpot/issue/1138)
- Fix ldap function called on login click
- Fix logo icon in viewer should go to dashboard [Taiga #1149](https://tree.taiga.io/project/penpot/issue/1149)
- Fix ordering when restoring deleted shapes in sync [Taiga #1163](https://tree.taiga.io/project/penpot/issue/1163)
- Fix issue when editing text immediately after creating [Taiga #1207](https://tree.taiga.io/project/penpot/issue/1207)
- Fix issue when pasting URL's copied from the browser url bar [Taiga #1187](https://tree.taiga.io/project/penpot/issue/1187)
- Fix issue with multiple selection and groups [Taiga #1128](https://tree.taiga.io/project/penpot/issue/1128)
- Fix issue with red handler indicator on resize [Taiga #1188](https://tree.taiga.io/project/penpot/issue/1188)
- Fix show correct error when google auth is disabled [Taiga #1119](https://tree.taiga.io/project/penpot/issue/1119)
- Fix text alignment in preview [#594](https://github.com/penpot/penpot/issues/594)
- Fix unexpected exception when uploading image [Taiga #1120](https://tree.taiga.io/project/penpot/issue/1120)
- Fix updates on collaborative editing not updating selection rectangles [Taiga #1127](https://tree.taiga.io/project/penpot/issue/1127)
- Make the team deletion deferred (in the same way other objects)
### :heart: Community contributions by (Thank you!)
- abtinmo [#538](https://github.com/penpot/penpot/pull/538)
- kdrag0n [#585](https://github.com/penpot/penpot/pull/585)
- nisrulz [#586](https://github.com/penpot/penpot/pull/586)
- tomer [#575](https://github.com/penpot/penpot/pull/575)
- violoncelloCH [#554](https://github.com/penpot/penpot/pull/554)
## 1.1.0-alpha
- Bugfixing and stabilization post-launch
- Some changes to the register flow
- Improved MacOS shortcuts and helpers
- Small changes to shape creation
## 1.0.0-alpha
Initial release

View File

@@ -1,8 +1,8 @@
# Contributing Guide #
Thank you for your interest in contributing to Penpot. This is a
generic guide that details how to contribute to Penpot in a way that is
efficient for everyone. If you want a specific documentation for
generic guide that details how to contribute to Penpot in a way that
is efficient for everyone. If you want a specific documentation for
different parts of the platform, please refer to `docs/` directory.
@@ -19,12 +19,20 @@ If you found a bug, please report it, as far as possible with:
- a browser and the browser version used
- a dev tools console exception stack trace (if it is available)
If you found a bug that you consider better discuss in private (for
example: security bugs), consider first send an email to
`support@penpot.app`.
**We don't have formal bug bounty program for security reports; this
is an open source application and your contribution will be recognized
in the changelog.**
## Pull requests ##
If you want propose a change or bug fix with the Pull-Request system
firstly you should carefully read the **Contributor License Aggreement**
section and format your commits accordingly.
firstly you should carefully read the **DCO** section and format your
commits accordingly.
If you intend to fix a bug it's fine to submit a pull request right
away but we still recommend to file an issue detailing what you're
@@ -46,7 +54,7 @@ We will use the `easy fix` mark for tag for indicate issues that are
easy for beginners.
## Commit Message Guidelines ##
## Commit Guidelines ##
We have very precise rules over how our git commit messages can be formatted.
@@ -70,7 +78,6 @@ Where type is:
- :ambulance: `:ambulance:` a commit that fixes critical bug
- :books: `:books:` a commit that improves or adds documentation
- :construction: `:construction:`: a wip commit
- :construction_worker: `:construction_worker:` a commit with CI related stuff
- :boom: `:boom:` a commit with breaking changes
- :wrench: `:wrench:` a commit for config updates
- :zap: `:zap:` a commit with performance improvements
@@ -83,13 +90,14 @@ More info:
- https://gist.github.com/parmentf/035de27d6ed1dce0b36a
- https://gist.github.com/rxaviers/7360908
The subject should be:
- Use the imperative mood.
- Capitalize the first letter.
- Don't put a period at the end of the subject line.
- Put a blank line between the subject line and the body.
Each commit should have:
- A concise subject using imperative mood.
- The subject should have capitalized the first letter and without
period at the end.
- A blank line between the subject line and the body.
- An entry on the CHANGES.md file if applicable, referencing the
github or taiga issue/user-story using the these same rules.
## Code of conduct ##
@@ -127,7 +135,7 @@ This Code of Conduct is adapted from the Contributor Covenant, version
1.1.0, available from http://contributor-covenant.org/version/1/1/0/
## Contributor License Agreement ##
## Developer's Certificate of Origin (DCO) ##
By submitting code you are agree and can certify the below:
@@ -157,9 +165,9 @@ By submitting code you are agree and can certify the below:
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
Then, all your patches should contain a sign-off at the end of the
patch/commit description body. It can be automatically added on adding
`-s` parameter to `git commit`.
Then, all your code patches (**documentation are excluded**) should
contain a sign-off at the end of the patch/commit description body. It
can be automatically added on adding `-s` parameter to `git commit`.
This is an example of the aspect of the line:

View File

@@ -2,35 +2,60 @@
[uri_license]: https://www.mozilla.org/en-US/MPL/2.0
[uri_license_image]: https://img.shields.io/badge/MPL-2.0-blue.svg
[![License: MPL-2.0][uri_license_image]][uri_license]
[![Managed with Taiga.io](https://img.shields.io/badge/managed%20with-TAIGA.io-709f14.svg)](https://tree.taiga.io/project/uxbox/ "Managed with Taiga.io")
<h1 align="center">
<br>
<img src="https://penpot.app/images/readme/readme-logo.jpg" alt="PENPOT">
</h1>
<p align="center"><a href="https://www.mozilla.org/en-US/MPL/2.0" rel="nofollow"><img src="https://camo.githubusercontent.com/3fcf3d6b678ea15fde3cf7d6af0e242160366282d62a7c182d83a50bfee3f45e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d504c2d322e302d626c75652e737667" alt="License: MPL-2.0" data-canonical-src="https://img.shields.io/badge/MPL-2.0-blue.svg" style="max-width:100%;"></a>
<a href="https://gitter.im/penpot/community" rel="nofollow"><img src="https://camo.githubusercontent.com/5b0aecb33434f82a7b158eab7247544235ada0cf7eeb9ce8e52562dd67f614b7/68747470733a2f2f6261646765732e6769747465722e696d2f736572656e6f2d78797a2f636f6d6d756e6974792e737667" alt="Gitter" data-canonical-src="https://badges.gitter.im/sereno-xyz/community.svg" style="max-width:100%;"></a>
<a href="https://tree.taiga.io/project/penpot/" title="Managed with Taiga.io" rel="nofollow"><img src="https://camo.githubusercontent.com/4a1d1112f0272e3393b1e8da312ff4435418e9e2eb4c0964881e3680f90a653c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d616e61676564253230776974682d54414947412e696f2d3730396631342e737667" alt="Managed with Taiga.io" data-canonical-src="https://img.shields.io/badge/managed%20with-TAIGA.io-709f14.svg" style="max-width:100%;"></a>
<a href="https://gitpod.io/#https://github.com/penpot/penpot" rel="nofollow"><img src="https://camo.githubusercontent.com/daadb4894128d1e19b72d80236f5959f1f2b47f9fe081373f3246131f0189f6c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f476974706f642d72656164792d2d746f2d2d636f64652d626c75653f6c6f676f3d676974706f64" alt="Gitpod ready-to-code" data-canonical-src="https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod" style="max-width:100%;"></a></p>
![PENPOT](https://penpot.app/images/readme/home-ui.jpg)
# PENPOT #
## What is Penpot? ##
Were excited to share that Uxbox is now Penpot! Were changing the name, but keeping the same project essence. Stay in the loop for more news coming early 2021. Alpha release is close!
Penpot is the first **Open Source design** and prototyping platform meant for cross-domain teams. Non dependent on operating systems, Penpot is web based and works with open web standards (SVG). For all and empowered by the community.
![PENPOT](https://raw.githubusercontent.com/penpot/penpot/develop/docs/screenshot.png)
- [How to use](#how-to-use)
- [Help center](#help-center)
- [Contributing](#contributing)
- [Give feedback](#give-feedback)
- [Tutorials](#tutorials)
- [License](#license)
## How to use ##
## Introduction ##
Login or Register on our Penpot cloud app. Create a team to work together on projects and share design assets or jump right away into Penpot and **start designing** by your own.
The open-source solution for design and prototyping. PENPOT is
currently at an early development stage but we are working hard to
bring you the beta version as soon as possible. Follow the project
progress in Twitter or Github and stay tuned!
✏️ [Start using Penpot](https://design.penpot.app)
You can also install Penpot in a local environment. This section details everything you need to know to get Penpot up and running in production environments. Although it can be installed in many ways, the recommended approach is using **docker** and **docker-compose**.
## SVG based ##
🐳 [Install docker](https://help.penpot.app/technical-guide/getting-started/)
Penpot works with SVG, a standard format, for all your designs and
prototypes . This means that all your stuff in Penpot is portable and
editable in many other vector tools and easy to use on the web.
## Help center ##
[See SVG specification](https://www.w3.org/Graphics/SVG/)
In this documentation you will find (almost) everything you need to know about how to work with Penpot. From the interface basics to advanced functionality.
📖 [User guide](https://help.penpot.app/user-guide/)
❓ [FAQs](https://help.penpot.app/faqs/)
🖥️ [Technical guide](https://help.penpot.app/technical-guide/)
❤️ [Contributing guide](https://help.penpot.app/contributing-guide/)
![User guide](https://penpot.app/images/readme/help-center.jpg)
## Contributing ##
<p align="center">
<img src="https://penpot.app/images/open-source.png" alt="Open Source">
</p>
**Open to you!**
We love the open source software community. Contributing is our
@@ -39,6 +64,24 @@ and improve Penpot. All your awesome ideas and code are welcome!
Please refer to the [Contributing Guide](./CONTRIBUTING.md)
## Give feedback ##
You can ask and answer questions, have open-ended conversations, and follow along on decisions affecting the project.
✉️ [Mail us](mailto:info@penpot.app)
💬 [GitHub discussions](https://github.com/penpot/penpot/discussions)
🐞 [GitHub issues](https://github.com/penpot/penpot/issues)
✍️️ [Gitter](https://gitter.im/penpot/community)
## Tutorials ##
You can ask and answer questions, have open-ended conversations, and follow along on decisions affecting the project.
Would you like to know more about Penpot? We recommend you to visit our youtube channel and learn more about the functionalities and possibilities of Penpot with our video tutorials.
🎞️ [YouTube channel](https://www.youtube.com/channel/UCAqS8G72uv9P5HG1IfgnQ9g)
## License ##
@@ -46,4 +89,6 @@ Please refer to the [Contributing Guide](./CONTRIBUTING.md)
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
Copyright (c) UXBOX Labs SL
```

36
backend/build.clj Normal file
View File

@@ -0,0 +1,36 @@
(ns build
(:refer-clojure :exclude [compile])
(:require
[clojure.tools.build.api :as b]
[clojure.java.io]))
(def class-dir "target/classes")
(def basis (b/create-basis {:project "deps.edn"}))
(def jar-file "target/penpot.jar")
(defn clean [_]
(b/delete {:path "target"}))
(defn jar [_]
(b/copy-dir
{:src-dirs ["src" "resources"]
:target-dir class-dir})
(b/compile-clj
{:basis basis
:src-dirs ["src"]
:class-dir class-dir})
(b/uber
{:class-dir class-dir
:uber-file jar-file
:main 'clojure.main
:exclude [#"goog.*" #"^javasist.*"]
:basis basis}))
(defn compile [_]
(b/javac
{:src-dirs ["dev/java"]
:class-dir class-dir
:basis basis
:javac-opts ["-source" "11" "-target" "11"]}))

View File

@@ -1,104 +1,78 @@
{:mvn/repos
{"central" {:url "https://repo1.maven.org/maven2/"}
"clojars" {:url "https://clojars.org/repo"}
"jcenter" {:url "https://jcenter.bintray.com/"}}
:deps
{org.clojure/clojure {:mvn/version "1.10.1"}
org.clojure/clojurescript {:mvn/version "1.10.773"}
org.clojure/data.json {:mvn/version "1.0.0"}
org.clojure/core.async {:mvn/version "1.3.610"}
{:deps
{penpot/common {:local/root "../common"}
org.clojure/core.async {:mvn/version "1.5.648"}
;; Logging
org.clojure/tools.logging {:mvn/version "1.1.0"}
org.apache.logging.log4j/log4j-api {:mvn/version "2.13.3"}
org.apache.logging.log4j/log4j-core {:mvn/version "2.13.3"}
org.apache.logging.log4j/log4j-web {:mvn/version "2.13.3"}
org.apache.logging.log4j/log4j-jul {:mvn/version "2.13.3"}
org.apache.logging.log4j/log4j-slf4j-impl {:mvn/version "2.13.3"}
org.slf4j/slf4j-api {:mvn/version "1.7.30"}
org.zeromq/jeromq {:mvn/version "0.5.2"}
io.prometheus/simpleclient {:mvn/version "0.9.0"}
io.prometheus/simpleclient_hotspot {:mvn/version "0.9.0"}
io.prometheus/simpleclient_httpserver {:mvn/version "0.9.0"}
com.taoensso/nippy {:mvn/version "3.1.1"}
com.github.luben/zstd-jni {:mvn/version "1.5.2-1"}
org.clojure/data.fressian {:mvn/version "1.0.0"}
selmer/selmer {:mvn/version "1.12.28"}
expound/expound {:mvn/version "0.8.5"}
com.cognitect/transit-clj {:mvn/version "1.0.324"}
io.prometheus/simpleclient {:mvn/version "0.14.1"}
io.prometheus/simpleclient_hotspot {:mvn/version "0.14.1"}
io.prometheus/simpleclient_jetty {:mvn/version "0.14.1"
:exclusions [org.eclipse.jetty/jetty-server
org.eclipse.jetty/jetty-servlet]}
io.prometheus/simpleclient_httpserver {:mvn/version "0.14.1"}
io.lettuce/lettuce-core {:mvn/version "5.2.2.RELEASE"}
java-http-clj/java-http-clj {:mvn/version "0.4.1"}
io.lettuce/lettuce-core {:mvn/version "6.1.6.RELEASE"}
java-http-clj/java-http-clj {:mvn/version "0.4.3"}
info.sunng/ring-jetty9-adapter {:mvn/version "0.14.0"}
seancorfield/next.jdbc {:mvn/version "1.1.588"}
metosin/reitit-ring {:mvn/version "0.5.5"}
org.postgresql/postgresql {:mvn/version "42.2.16"}
com.zaxxer/HikariCP {:mvn/version "3.4.5"}
funcool/yetti {:git/tag "v4.0" :git/sha "59ed2a7"
:git/url "https://github.com/funcool/yetti.git"
:exclusions [org.slf4j/slf4j-api]}
funcool/log4j2-clojure {:mvn/version "2020.11.23-1"}
funcool/datoteka {:mvn/version "1.2.0"}
funcool/promesa {:mvn/version "5.1.0"}
funcool/cuerdas {:mvn/version "2020.03.26-3"}
com.github.seancorfield/next.jdbc {:mvn/version "1.2.761"}
metosin/reitit-ring {:mvn/version "0.5.15"}
org.postgresql/postgresql {:mvn/version "42.3.2"}
com.zaxxer/HikariCP {:mvn/version "5.0.1"}
funcool/datoteka {:mvn/version "2.0.0"}
buddy/buddy-core {:mvn/version "1.9.0"}
buddy/buddy-hashers {:mvn/version "1.7.0"}
buddy/buddy-sign {:mvn/version "3.3.0"}
buddy/buddy-hashers {:mvn/version "1.8.158"}
buddy/buddy-sign {:mvn/version "3.4.333"}
lambdaisland/uri {:mvn/version "1.4.54"
:exclusions [org.clojure/data.json]}
frankiesardo/linked {:mvn/version "1.3.0"}
danlentz/clj-uuid {:mvn/version "0.1.9"}
org.jsoup/jsoup {:mvn/version "1.13.1"}
org.jsoup/jsoup {:mvn/version "1.14.3"}
org.im4java/im4java {:mvn/version "1.4.0"}
org.lz4/lz4-java {:mvn/version "1.7.1"}
com.github.spullara.mustache.java/compiler {:mvn/version "0.9.6"}
commons-io/commons-io {:mvn/version "2.8.0"}
com.draines/postal {:mvn/version "2.0.3"
:exclusions [commons-codec/commons-codec]}
org.lz4/lz4-java {:mvn/version "1.8.0"}
puppetlabs/clj-ldap {:mvn/version"0.3.0"}
org.clojars.pntblnk/clj-ldap {:mvn/version "0.0.17"}
integrant/integrant {:mvn/version "0.8.0"}
;; exception printing
io.aviso/pretty {:mvn/version "0.1.37"}
io.sentry/sentry {:mvn/version "5.6.1"}
mount/mount {:mvn/version "0.1.16"}
environ/environ {:mvn/version "1.2.0"}}
:paths ["src" "resources" "../common" "common"]
;; Pretty Print specs
pretty-spec/pretty-spec {:mvn/version "0.1.4"}
software.amazon.awssdk/s3 {:mvn/version "2.17.122"}}
:paths ["src" "resources" "target/classes"]
:aliases
{:dev
{:extra-deps
{com.bhauman/rebel-readline {:mvn/version "0.1.4"}
org.clojure/tools.namespace {:mvn/version "1.0.0"}
org.clojure/test.check {:mvn/version "1.0.0"}
clj-kondo/clj-kondo {:mvn/version "RELEASE"}
{com.bhauman/rebel-readline {:mvn/version "RELEASE"}
org.clojure/tools.namespace {:mvn/version "RELEASE"}
org.clojure/test.check {:mvn/version "RELEASE"}
clojure-humanize/clojure-humanize {:mvn/version "0.2.2"}
org.clojure/data.csv {:mvn/version "RELEASE"}
com.clojure-goes-fast/clj-async-profiler {:mvn/version "RELEASE"}
mockery/mockery {:mvn/version "RELEASE"}}
:extra-paths ["test" "dev"]}
fipp/fipp {:mvn/version "0.6.21"}
criterium/criterium {:mvn/version "0.4.5"}
mockery/mockery {:mvn/version "0.1.4"}}
:extra-paths ["tests"]}
:build
{:extra-deps
{io.github.clojure/tools.build {:git/tag "v0.7.5" :git/sha "34727f7"}}
:ns-default build}
;; :fn-media-loader
;; {:exec-fn app.cli.media-loader/run
;; :args {}}
:fn-fixtures
{:exec-fn app.cli.fixtures/run
:args {}}
:lint
{:main-opts ["-m" "clj-kondo.main"]}
:tests
{:extra-deps {lambdaisland/kaocha {:mvn/version "0.0-581"}}
:main-opts ["-m" "kaocha.runner"]}
:test
{:extra-paths ["test"]
:extra-deps
{io.github.cognitect-labs/test-runner
{:git/tag "v0.5.0" :git/sha "b3fd0d2"}}
:exec-fn cognitect.test-runner.api/test}
:outdated
{:extra-deps {olical/depot {:mvn/version "1.8.4"}}
:main-opts ["-m" "depot.outdated.main"]}
:jar
{:extra-deps {seancorfield/depstar {:mvn/version "RELEASE"}}
:main-opts ["-m" "hf.depstar.jar" "-S" "target/app.jar"]}
{:extra-deps {com.github.liquidz/antq {:mvn/version "RELEASE"}}
:main-opts ["-m" "antq.core"]}
:jmx-remote
{:jvm-opts ["-Dcom.sun.management.jmxremote"

95
backend/dev/user.clj Normal file
View File

@@ -0,0 +1,95 @@
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) UXBOX Labs SL
(ns user
(:require
[app.common.data :as d]
[app.common.exceptions :as ex]
[app.common.geom.matrix :as gmt]
[app.common.perf :as perf]
[app.common.transit :as t]
[app.config :as cfg]
[app.main :as main]
[app.util.blob :as blob]
[app.util.fressian :as fres]
[app.util.json :as json]
[app.util.time :as dt]
[clj-async-profiler.core :as prof]
[clojure.contrib.humanize :as hum]
[clojure.java.io :as io]
[clojure.pprint :refer [pprint print-table]]
[clojure.repl :refer :all]
[clojure.spec.alpha :as s]
[clojure.spec.gen.alpha :as sgen]
[clojure.test :as test]
[clojure.test :as test]
[clojure.tools.namespace.repl :as repl]
[clojure.walk :refer [macroexpand-all]]
[datoteka.core]
[integrant.core :as ig]))
(repl/disable-reload! (find-ns 'integrant.core))
(set! *warn-on-reflection* true)
(defonce system nil)
;; --- Development Stuff
(defn- run-tests
([] (run-tests #"^app.*-test$"))
([o]
(repl/refresh)
(cond
(instance? java.util.regex.Pattern o)
(test/run-all-tests o)
(symbol? o)
(if-let [sns (namespace o)]
(do (require (symbol sns))
(test/test-vars [(resolve o)]))
(test/test-ns o)))))
(defn- start
[]
(alter-var-root #'system (fn [sys]
(when sys (ig/halt! sys))
(-> main/system-config
(ig/prep)
(ig/init))))
:started)
(defn- stop
[]
(alter-var-root #'system (fn [sys]
(when sys (ig/halt! sys))
nil))
:stoped)
(defn restart
[]
(stop)
(repl/refresh :after 'user/start))
(defn restart-all
[]
(stop)
(repl/refresh-all :after 'user/start))
(defn compression-bench
[data]
(let [humanize (fn [v] (hum/filesize v :binary true :format " %.4f "))]
(print-table
[{:v1 (humanize (alength (blob/encode data {:version 1})))
:v2 (humanize (alength (blob/encode data {:version 2})))
:v3 (humanize (alength (blob/encode data {:version 3})))
:v4 (humanize (alength (blob/encode data {:version 4})))
}])))
(defonce debug-tap
(do
(add-tap #(locking debug-tap
(prn "tap debug:" %)))
1))

View File

@@ -0,0 +1,101 @@
* {
font-family: "JetBrains Mono", monospace;
font-size: 12px;
}
pre {
margin: 0px;
}
body {
margin: 0px;
padding: 0px;
padding-top: 20px;
padding-bottom: 20px;
display: flex;
justify-content: center;
}
main {
display: flex;
flex-direction: column;
align-items: center;
min-width: 900px;
width: 900px;
}
header {
border-bottom: 1px solid #c0c0c0;
display: flex;
justify-content: center;
width: 100%;
}
.rpc-doc-content {
margin-top: 20px;
width: 100%;
display: flex;
flex-direction: column;
/* border: 1px solid red; */
padding: 5px;
}
.rpc-doc-content > h2:not(:first-child) {
margin-top: 30px;
}
.rpc-items {
list-style: none;
padding: 0px;
margin: 0px;
}
.rpc-item {
/* border: 1px solid red; */
cursor: pointer;
display: flex;
flex-direction: column;
}
.rpc-item:not(:last-child) {
margin-bottom: 3px;
}
.rpc-row-info {
cursor: pointer;
display: flex;
background-color: #eeeeee;
padding: 5px 10px;
}
.rpc-row-info > *:not(:last-child) {
margin-right: 10px;
}
.rpc-row-info > * {
/* border: 1px solid green; */
}
.rpc-row-info > .type {
font-weight: bold;
width: 70px;
}
.rpc-row-info > .name {
width: 280px;
/* font-weight: bold; */
}
.rpc-row-info > .tags > .tag > span:first-child {
font-weight: bold;
}
.hidden {
display: none;
}
.rpc-row-detail {
padding: 5px 10px;
padding-bottom: 20px;
}

View File

@@ -0,0 +1,27 @@
(function() {
document.addEventListener("DOMContentLoaded", function(event) {
const rows = document.querySelectorAll(".rpc-row-info");
const onRowClick = (event) => {
const target = event.currentTarget;
for (let node of rows) {
if (node !== target) {
node.nextElementSibling.classList.add("hidden");
} else {
const sibling = target.nextElementSibling;
if (sibling.classList.contains("hidden")) {
sibling.classList.remove("hidden");
} else {
sibling.classList.add("hidden");
}
}
}
};
for (let node of rows) {
node.addEventListener("click", onRowClick);
}
});
})();

View File

@@ -0,0 +1,80 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="robots" content="noindex,nofollow">
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<title>Builtin API Documentation - Penpot</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=JetBrains+Mono">
<style>
{% include "api-doc.css" %}
</style>
<script>
{% include "api-doc.js" %}
</script>
</head>
<body>
<main>
<header>
<h1>Penpot API Documentation</h1>
</header>
<section class="rpc-doc-content">
<h2>RPC QUERY METHODS:</h2>
<ul class="rpc-items">
{% for item in query-methods %}
<li class="rpc-item">
<div class="rpc-row-info">
{# <div class="type">{{item.type}}</div> #}
<div class="name">{{item.name}}</div>
<div class="tags">
<span class="tag">
<span>Auth:</span>
<span>{% if item.auth %}YES{% else %}NO{% endif %}</span>
</span>
</div>
</div>
<div class="rpc-row-detail hidden">
{% if item.docs %}
<h3>DOCSTRING:</h3>
<p>{{item.docs}}</p>
{% endif %}
<h3>SPEC EXPLAIN:</h3>
<pre>{{item.spec}}</pre>
</div>
</li>
{% endfor %}
</ul>
<h2>RPC MUTATION METHODS:</h2>
<ul class="rpc-items">
{% for item in mutation-methods %}
<li class="rpc-item">
<div class="rpc-row-info">
{# <div class="type">{{item.type}}</div> #}
<div class="name">{{item.name}}</div>
<div class="tags">
<span class="tag">
<span>Auth:</span>
<span>{% if item.auth %}YES{% else %}NO{% endif %}</span>
</span>
</div>
</div>
<div class="rpc-row-detail hidden">
{% if item.docs %}
<h3>DOCSTRING:</h3>
<p>{{item.docs}}</p>
{% endif %}
<h3>SPEC EXPLAIN:</h3>
<pre>{{item.spec}}</pre>
</div>
</li>
{% endfor %}
</ul>
</section>
</main>
</body>
</html>

View File

@@ -1,11 +0,0 @@
{:icons
[{:name "Material Design (Action)"
:path "./material/action/svg/production"
:regex #"^.*_48px\.svg$"}]
:images
[{:name "Generic Collection 1"
:path "./my-images/collection1/"
:regex #"^.*\.(png|jpg|webp)$"}]}

View File

@@ -1,44 +0,0 @@
{;; A secret key used for create tokens
;; WARNING: this is a default secret key and
;; it should be overwritten in production env.
:secret "5qjiAn-QUpawUNqGP10UZKklSqbLKcdGY3sJpq0UUACpVXGg2HOFJCBejDWVHskhRyp7iHb4rjOLXX2ZjF-5cw"
:registration
{
:enabled true}
:smtp
{:host "localhost" ;; Hostname of the desired SMTP server.
:port 25 ;; Port of SMTP server.
:user nil ;; Username to authenticate with (if authenticating).
:pass nil ;; Password to authenticate with (if authenticating).
:ssl false ;; Enables SSL encryption if value is truthy.
:tls false ;; Enables TLS encryption if value is truthy.
:enabled false ;; Enables SMTP if value is truthy.
:noop true}
:auth-options {:alg :a256kw :enc :a128cbc-hs256}
:email {:reply-to "no-reply@uxbox.io"
:from "no-reply@uxbox.io"
:support "support@uxbox.io"}
:http {:port 6060
:max-body-size 52428800
:debug true}
:media
{:directory "resources/public/media"
:uri "http://localhost:6060/media/"}
:static
{:directory "resources/public/static"
:uri "http://localhost:6060/static/"}
:database
{:adapter "postgresql"
:username nil
:password nil
:database-name "uxbox"
:server-name "localhost"
:port-number 5432}}

View File

@@ -1,18 +0,0 @@
{:migrations
{:verbose false}
:media
{:directory "/tmp/uxbox/media"
:uri "http://localhost:6060/media/"}
:static
{:directory "/tmp/uxbox/static"
:uri "http://localhost:6060/static/"}
:database
{:adapter "postgresql"
:username nil
:password nil
:database-name "test"
:server-name "localhost"
:port-number 5432}}

View File

@@ -30,14 +30,14 @@
for security reasons.
</mj-text>
<mj-text>Enjoy!</mj-text>
<mj-text>The UXBOX team.</mj-text>
<mj-text>The Penpot team.</mj-text>
</mj-column>
</mj-section>
<mj-section padding="24px 0 0 0">
<mj-column width="425px">
<mj-text align="center" font-size="14px" color="#64666A">
UXBOX is the first Open Source prototyping platform that will be embraced by multidisciplinary teams.
Penpot is the first Open Source prototyping platform that will be embraced by multidisciplinary teams.
</mj-text>
</mj-column>
</mj-section>
@@ -57,7 +57,7 @@
<mj-section padding="0 0 24px 0">
<mj-column>
<mj-text align="center" font-size="14px" color="#64666A" line-height="150%">
UXBOX © 2020 | Made with &lt;3 and Open Source
Penpot © 2020 | Made with &lt;3 and Open Source
</mj-text>
</mj-column>
</mj-section>

View File

@@ -23,14 +23,14 @@
Accept invite
</mj-button>
<mj-text>Enjoy!</mj-text>
<mj-text>The UXBOX team.</mj-text>
<mj-text>The Penpot team.</mj-text>
</mj-column>
</mj-section>
<mj-section padding="24px 0 0 0">
<mj-column width="425px">
<mj-text align="center" font-size="14px" color="#64666A">
UXBOX is the first Open Source prototyping platform that will be embraced by multidisciplinary teams.
Penpot is the first Open Source prototyping platform that will be embraced by multidisciplinary teams.
</mj-text>
</mj-column>
</mj-section>
@@ -50,7 +50,7 @@
<mj-section padding="0 0 24px 0">
<mj-column>
<mj-text align="center" font-size="14px" color="#64666A" line-height="150%">
UXBOX © 2020 | Made with &lt;3 and Open Source
Penpot © 2020 | Made with &lt;3 and Open Source
</mj-text>
</mj-column>
</mj-section>

View File

@@ -32,14 +32,14 @@
it. Your password won't be changed.
</mj-text>
<mj-text>Enjoy!</mj-text>
<mj-text>The UXBOX team.</mj-text>
<mj-text>The Penpot team.</mj-text>
</mj-column>
</mj-section>
<mj-section padding="24px 0 0 0">
<mj-column width="425px">
<mj-text align="center" font-size="14px" color="#64666A">
UXBOX is the first Open Source prototyping platform that will be embraced by multidisciplinary teams.
Penpot is the first Open Source prototyping platform that will be embraced by multidisciplinary teams.
</mj-text>
</mj-column>
</mj-section>
@@ -59,7 +59,7 @@
<mj-section padding="0 0 24px 0">
<mj-column>
<mj-text align="center" font-size="14px" color="#64666A" line-height="150%">
UXBOX © 2020 | Made with &lt;3 and Open Source
Penpot © 2020 | Made with &lt;3 and Open Source
</mj-text>
</mj-column>
</mj-section>

View File

@@ -21,22 +21,22 @@
<mj-column>
<mj-text font-size="24px" font-weight="600">Hello {{name}}!</mj-text>
<mj-text>
Thanks for signing up for your UXBOX account! Please verify your
email using the link below adn get started building mockups and
Thanks for signing up for your Penpot account! Please verify your
email using the link below and get started building mockups and
prototypes today!
</mj-text>
<mj-button href="{{ public-uri }}/#/auth/verify-token?token={{token}}">
Verify email
</mj-button>
<mj-text>Enjoy!</mj-text>
<mj-text>The UXBOX team.</mj-text>
<mj-text>The Penpot team.</mj-text>
</mj-column>
</mj-section>
<mj-section padding="24px 0 0 0">
<mj-column width="425px">
<mj-text align="center" font-size="14px" color="#64666A">
UXBOX is the first Open Source prototyping platform that will be embraced by multidisciplinary teams.
Penpot is the first Open Source prototyping platform that will be embraced by multidisciplinary teams.
</mj-text>
</mj-column>
</mj-section>
@@ -56,7 +56,7 @@
<mj-section padding="0 0 24px 0">
<mj-column>
<mj-text align="center" font-size="14px" color="#64666A" line-height="150%">
UXBOX © 2020 | Made with &lt;3 and Open Source
Penpot © 2020 | Made with &lt;3 and Open Source
</mj-text>
</mj-column>
</mj-section>

View File

@@ -450,7 +450,7 @@
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
<tr>
<td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;">
<div style="font-family:Source Sans Pro, sans-serif;font-size:14px;line-height:150%;text-align:center;color:#64666A;">Penpot © 2020 | Made with &lt;3 and Open Source</div>
<div style="font-family:Source Sans Pro, sans-serif;font-size:14px;line-height:150%;text-align:center;color:#64666A;">Penpot @ 2021 | Made with &lt;3 and Open Source</div>
</td>
</tr>
</table>

View File

@@ -10,4 +10,4 @@ If you received this email by mistake, please consider changing your password
for security reasons.
Enjoy!
The UXBOX team.
The Penpot team.

View File

@@ -0,0 +1,45 @@
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>
<strong>Feedback from:</strong><br />
{% if profile %}
<span>
<span>Name: </span>
<span><code>{{profile.fullname}}</code></span>
</span>
<br />
<span>
<span>Email: </span>
<span>{{profile.email}}</span>
</span>
<br />
<span>
<span>ID: </span>
<span><code>{{profile.id}}</code></span>
</span>
{% else %}
<span>
<span>Email: </span>
<span>{{profile.email}}</span>
</span>
{% endif %}
</p>
<p>
<strong>Subject:</strong><br />
<span>{{subject}}</span>
</p>
<p>
<strong>Message:</strong><br />
{{content|linebreaks-br|safe}}
</p>
</body>
</html>

View File

@@ -0,0 +1 @@
[PENPOT FEEDBACK]: {{subject}}

View File

@@ -0,0 +1,9 @@
{% if profile %}
Feedback profile: {{profile.fullname}} <{{profile.email}}> / {{profile.id}}
{% else %}
Feedback from: {{email}}
{% endif %}
Subject: {{subject}}
{{content}}

View File

@@ -440,7 +440,7 @@
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
<tr>
<td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;">
<div style="font-family:Source Sans Pro, sans-serif;font-size:14px;line-height:150%;text-align:center;color:#64666A;">Penpot © 2020 | Made with &lt;3 and Open Source</div>
<div style="font-family:Source Sans Pro, sans-serif;font-size:14px;line-height:150%;text-align:center;color:#64666A;">Penpot @ 2021 | Made with &lt;3 and Open Source</div>
</td>
</tr>
</table>

View File

@@ -1 +1 @@
Inviation to join {{team}}
Invitation to join {{team}}

View File

@@ -7,4 +7,4 @@ Accept invitation using this link:
{{ public-uri }}/#/auth/verify-token?token={{token}}
Enjoy!
The UXBOX team.
The Penpot team.

View File

@@ -445,7 +445,7 @@
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
<tr>
<td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;">
<div style="font-family:Source Sans Pro, sans-serif;font-size:14px;line-height:150%;text-align:center;color:#64666A;">Penpot © 2020 | Made with &lt;3 and Open Source</div>
<div style="font-family:Source Sans Pro, sans-serif;font-size:14px;line-height:150%;text-align:center;color:#64666A;">Penpot @ 2021 | Made with &lt;3 and Open Source</div>
</td>
</tr>
</table>

View File

@@ -9,4 +9,4 @@ If you received this email by mistake, you can safely ignore it. Your password
won't be changed.
Enjoy!
The UXBOX team.
The Penpot team.

View File

@@ -173,7 +173,7 @@
</tr>
<tr>
<td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;">
<div style="font-family:Source Sans Pro, sans-serif;font-size:16px;line-height:150%;text-align:left;color:#000000;">Thanks for signing up for your Penpot account! Please verify your email using the link below adn get started building mockups and prototypes today!</div>
<div style="font-family:Source Sans Pro, sans-serif;font-size:16px;line-height:150%;text-align:left;color:#000000;">Thanks for signing up for your Penpot account! Please verify your email using the link below and get started building mockups and prototypes today!</div>
</td>
</tr>
<tr>
@@ -440,7 +440,7 @@
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
<tr>
<td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;">
<div style="font-family:Source Sans Pro, sans-serif;font-size:14px;line-height:150%;text-align:center;color:#64666A;">Penpot © 2020 | Made with &lt;3 and Open Source</div>
<div style="font-family:Source Sans Pro, sans-serif;font-size:14px;line-height:150%;text-align:center;color:#64666A;">Penpot @ 2021 | Made with &lt;3 and Open Source</div>
</td>
</tr>
</table>
@@ -465,4 +465,4 @@
</div>
</body>
</html>
</html>

View File

@@ -1,9 +1,9 @@
Hello {{name}}!
Thanks for signing up for your UXBOX account! Please verify your email using the
link below adn get started building mockups and prototypes today!
Thanks for signing up for your Penpot account! Please verify your email using the
link below and get started building mockups and prototypes today!
{{ public-uri }}/#/auth/verify-token?token={{token}}
Enjoy!
The UXBOX team.
The Penpot team.

View File

@@ -1,26 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="info" monitorInterval="60">
<Appenders>
<Console name="console" target="SYSTEM_OUT">
<PatternLayout pattern="[%t] %level{length=1} %logger{36} - %msg%n"/>
</Console>
</Appenders>
<Loggers>
<Logger name="com.zaxxer.hikari" level="error" additivity="false">
<AppenderRef ref="console"/>
</Logger>
<Logger name="org.eclipse.jetty" level="info" additivity="false">
<AppenderRef ref="console"/>
</Logger>
<Logger name="app" level="debug" additivity="false">
<AppenderRef ref="console"/>
</Logger>
<Root level="info">
<AppenderRef ref="console"/>
</Root>
</Loggers>
</Configuration>

View File

@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="info" monitorInterval="30">
<Appenders>
<Console name="console" target="SYSTEM_OUT">
<PatternLayout pattern="[%d{YYYY-MM-dd HH:mm:ss.SSS}] %level{length=1} %logger{36} - %msg%n"/>
</Console>
<RollingFile name="main" fileName="logs/main.log" filePattern="logs/main-%i.log">
<PatternLayout pattern="[%d{YYYY-MM-dd HH:mm:ss.SSS}] %level{length=1} %logger{36} - %msg%n"/>
<Policies>
<SizeBasedTriggeringPolicy size="50M"/>
</Policies>
<DefaultRolloverStrategy max="9"/>
</RollingFile>
<JeroMQ name="zmq">
<Property name="endpoint">tcp://localhost:45556</Property>
<JsonLayout complete="false" compact="true" includeTimeMillis="true" stacktraceAsString="true" properties="true" />
</JeroMQ>
</Appenders>
<Loggers>
<Logger name="com.zaxxer.hikari" level="error"/>
<Logger name="io.lettuce" level="error" />
<Logger name="org.eclipse.jetty" level="error" />
<Logger name="org.postgresql" level="error" />
<Logger name="app.cli" level="debug" additivity="false">
<AppenderRef ref="console"/>
</Logger>
<Logger name="app.loggers" level="debug" additivity="false">
<AppenderRef ref="main" level="debug" />
</Logger>
<Logger name="app" level="all" additivity="false">
<AppenderRef ref="main" level="trace" />
<AppenderRef ref="zmq" level="debug" />
</Logger>
<Logger name="penpot" level="debug" additivity="false">
<AppenderRef ref="main" level="debug" />
<AppenderRef ref="zmq" level="debug" />
</Logger>
<Logger name="user" level="trace" additivity="false">
<AppenderRef ref="main" level="trace" />
</Logger>
<Root level="info">
<AppenderRef ref="main" />
</Root>
</Loggers>
</Configuration>

View File

@@ -1,43 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="info" monitorInterval="30">
<Configuration status="info" monitorInterval="60">
<Appenders>
<Console name="console" target="SYSTEM_OUT">
<PatternLayout pattern="[%d{YYYY-MM-dd HH:mm:ss.SSS}] [%t] %level{length=1} %logger{36} - %msg%n"/>
<PatternLayout pattern="[%d{YYYY-MM-dd HH:mm:ss.SSS}] %level{length=1} %logger{36} - %msg%n"/>
</Console>
<RollingFile name="main" fileName="logs/main.log" filePattern="logs/main-%i.log">
<PatternLayout pattern="[%d{YYYY-MM-dd HH:mm:ss.SSS}] [%t] %level{length=1} %logger{36} - %msg%n"/>
<Policies>
<SizeBasedTriggeringPolicy size="50M"/>
</Policies>
<DefaultRolloverStrategy max="9"/>
</RollingFile>
<CljFn name="error-reporter" ns="app.error-reporter" fn="enqueue">
<PatternLayout pattern="[%d{YYYY-MM-dd HH:mm:ss.SSS}] [%t] %level{length=1} %logger{36} - %msg%n"/>
</CljFn>
</Appenders>
<Loggers>
<Logger name="com.zaxxer.hikari" level="error" additivity="false" />
<Logger name="org.eclipse.jetty" level="error" additivity="false" />
<Logger name="io.lettuce" level="error" additivity="false" />
<Logger name="app.cli" level="debug" additivity="false">
<AppenderRef ref="console"/>
</Logger>
<Logger name="app.error-reporter" level="debug" additivity="false">
<AppenderRef ref="console"/>
</Logger>
<Logger name="com.zaxxer.hikari" level="error" />
<Logger name="org.eclipse.jetty" level="error" />
<Logger name="app" level="debug" additivity="false">
<AppenderRef ref="main" level="debug" />
<AppenderRef ref="error-reporter" level="error" />
<AppenderRef ref="console" />
</Logger>
<Logger name="penpot" level="fatal" additivity="false">
<AppenderRef ref="console" />
</Logger>
<Root level="info">
<AppenderRef ref="main" />
<AppenderRef ref="console" />
</Root>
</Loggers>
</Configuration>

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 789 B

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 901 B

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 604 B

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 668 B

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 746 B

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="robots" content="noindex,nofollow">
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<title>{% block title %}{% endblock %}</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=JetBrains+Mono">
<style>
{% include "templates/styles.css" %}
</style>
</head>
<body>
{% block content %}
{% endblock %}
</body>
</html>

View File

@@ -0,0 +1,32 @@
{% extends "templates/base.tmpl" %}
{% block title %}
Debug Main Page
{% endblock %}
{% block content %}
<nav>
<h1>Debug INDEX:</h1>
<div>[<a href="/dbg/error">ERRORS</a>]</div>
</nav>
<main class="index">
<section>
<h2>Download file data:</h2>
<desc>Given an FILE-ID, downloads the file data as file. The file data is encoded using transit.</desc>
<form method="get" action="/dbg/file/data">
<input type="text" style="width:300px" name="file-id" placeholder="file-id" />
<input type="hidden" name="download" value="1" />
<input type="submit" value="Download" />
</form>
</section>
<section>
<h2>Upload File Data:</h2>
<desc>Create a new file on your draft projects using the file downloaded from the previous section.</desc>
<form method="post" enctype="multipart/form-data" action="/dbg/file/data">
<input type="file" name="file" value="" />
<input type="submit" value="Upload" />
</form>
</section>
</main>
{% endblock %}

View File

@@ -0,0 +1,18 @@
{% extends "templates/base.tmpl" %}
{% block title %}
penpot - error list
{% endblock %}
{% block content %}
<nav>
<h1>Latest error reports:</h1>
</nav>
<main class="horizontal-list">
<ul>
{% for item in items %}
<li><a href="/dbg/error/{{item.id}}">{{item.created-at}}</a></li>
{% endfor %}
</ul>
</main>
{% endblock %}

View File

@@ -0,0 +1,98 @@
{% extends "templates/base.tmpl" %}
{% block title %}
penpot - error report {{id}}
{% endblock %}
{% block content %}
<nav>
<div>[<a href="/dbg/error">⮜</a>]</div>
<div>[<a href="#context">context</a>]</div>
<div>[<a href="#params">request params</a>]</div>
{% if data %}
<div>[<a href="#edata">error data</a>]</div>
{% endif %}
{% if spec-explain %}
<div>[<a href="#spec-explain">spec explain</a>]</div>
{% endif %}
{% if spec-problems %}
<div>[<a href="#spec-problems">spec problems</a>]</div>
{% endif %}
{% if spec-value %}
<div>[<a href="#spec-value">spec value</a>]</div>
{% endif %}
{% if trace %}
<div>[<a href="#trace">error trace</a>]</div>
{% endif %}
</nav>
<main>
<div class="table">
<div class="table-row multiline">
<div id="context" class="table-key">CONTEXT: </div>
<div class="table-val">
<h1>{{hint}}</h1>
</div>
<div class="table-val">
<pre>{{context}}</pre>
</div>
</div>
{% if params %}
<div class="table-row multiline">
<div id="params" class="table-key">REQUEST PARAMS: </div>
<div class="table-val">
<pre>{{params}}</pre>
</div>
</div>
{% endif %}
{% if data %}
<div class="table-row multiline">
<div id="edata" class="table-key">ERROR DATA: </div>
<div class="table-val">
<pre>{{data}}</pre>
</div>
</div>
{% endif %}
{% if spec-explain %}
<div class="table-row multiline">
<div id="spec-explain" class="table-key">SPEC EXPLAIN: </div>
<div class="table-val">
<pre>{{spec-explain}}</pre>
</div>
</div>
{% endif %}
{% if spec-problems %}
<div class="table-row multiline">
<div id="spec-problems" class="table-key">SPEC PROBLEMS: </div>
<div class="table-val">
<pre>{{spec-problems}}</pre>
</div>
</div>
{% endif %}
{% if spec-value %}
<div class="table-row multiline">
<div id="spec-value" class="table-key">SPEC VALUE: </div>
<div class="table-val">
<pre>{{spec-value}}</pre>
</div>
</div>
{% endif %}
{% if trace %}
<div class="table-row multiline">
<div id="trace" class="table-key">TRACE:</div>
<div class="table-val">
<pre>{{trace}}</pre>
</div>
</div>
{% endif %}
</div>
</main>
{% endblock %}

View File

@@ -0,0 +1,150 @@
* {
font-family: "JetBrains Mono", monospace;
font-size: 12px;
}
body {
margin: 0px;
padding: 0px;
}
pre {
margin: 0px;
line-height: 16px;
}
desc {
display: flex;
margin-bottom: 10px;
font-size: 10px;
color: #666;
}
input[type=text], input[type=submit] {
padding: 3px;
}
main {
margin: 20px;
}
nav {
position: fixed;
width: 100vw;
top: 0;
left: 0;
padding: 5px 20px;
display: flex;
background: #e3e3e3;
}
nav > h1 {
padding: 0px;
margin: 0px;
font-size: 11px;
}
nav > div {
text-transform: uppercase;
font-weight: bold;
}
nav > div:not(:last-child) {
margin-right: 10px;
}
.table {
margin-top: 25px;
display: flex;
flex-direction: column;
}
.table-row {
display: flex;
padding-bottom: 15px;
/* width: 100%; */
/* border: 1px solid red; */
}
.table-key {
font-weight: 600;
width: 60px;
padding: 4px;
padding-top: 40px;
margin-top: -40px;
}
.table-val {
font-weight: 200;
color: #333;
padding: 4px;
}
.multiline {
margin-top: 15px;
flex-direction: column;
}
.multiline .table-key {
margin-bottom: 10px;
border-bottom: 1px dashed #dddddd;
/* padding: 4px; */
width: unset;
}
.index {
margin-top: 40px;
}
.index > section {
padding: 10px;
background-color: #e3e3e3;
}
.index > section:not(:last-child) {
margin-bottom: 10px;
}
.index > section > h2 {
margin-top: 0px;
}
.horizontal-list {
margin: 20px;
margin-top: 40px;
}
.horizontal-list ul {
display: flex;
margin: 0px;
padding: 0px;
flex-direction: column;
flex-wrap: wrap;
height: calc(100vh - 75px);
justify-content: flex-start;
}
.horizontal-list li {
list-style: none;
padding: 0px;
margin: 0px;
line-height: 18px;
min-width: 210px;
margin: 0px 20px;
cursor: pointer;
display: flex;
justify-content: center;
border-radius: 3px;
}
.horizontal-list li:hover {
background-color: #e9e9e9;
}
.horizontal-list li > a {
text-decoration: none;
color: inherit;
}

20
backend/scripts/build Executable file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env bash
CURRENT_VERSION=$1;
set -ex
rm -rf target;
mkdir -p target/classes;
mkdir -p target/dist;
echo "$CURRENT_VERSION" > target/classes/version.txt;
clojure -T:build jar;
mv target/penpot.jar target/dist/penpot.jar
cp scripts/run.template.sh target/dist/run.sh;
cp scripts/manage.template.sh target/dist/manage.sh;
chmod +x target/dist/run.sh;
chmod +x target/dist/manage.sh;

View File

@@ -1,53 +0,0 @@
#!/usr/bin/env bash
CLASSPATH=`(clojure -Spath)`
NEWCP="./main:./common"
rm -rf ./target/dist
mkdir -p ./target/dist/deps
for item in $(echo $CLASSPATH | tr ":" "\n"); do
if [ "${item: -4}" == ".jar" ]; then
cp $item ./target/dist/deps/;
BN="$(basename -- $item)"
NEWCP+=":./deps/$BN"
fi
done
cp ./resources/log4j2-bundle.xml ./target/dist/log4j2.xml
cp -r ./src ./target/dist/main
cp -r ./resources/emails ./target/dist/main/
cp -r ../common ./target/dist/common
echo $NEWCP > ./target/dist/classpath;
tee -a ./target/dist/run.sh >> /dev/null <<EOF
#!/usr/bin/env bash
CP="$NEWCP"
# Exports
# Find java executable
set +e
JAVA_CMD=\$(type -p java)
set -e
if [[ ! -n "\$JAVA_CMD" ]]; then
if [[ -n "\$JAVA_HOME" ]] && [[ -x "\$JAVA_HOME/bin/java" ]]; then
JAVA_CMD="\$JAVA_HOME/bin/java"
else
>&2 echo "Couldn't find 'java'. Please set JAVA_HOME."
exit 1
fi
fi
if [ -f ./environ ]; then
source ./environ
fi
set -x
exec \$JAVA_CMD \$JVM_OPTS -Dapp.enable-asserts=false -classpath \$CP -Dlog4j.configurationFile=./log4j2.xml "\$@" clojure.main -m app.main
EOF
chmod +x ./target/dist/run.sh

View File

@@ -1,4 +0,0 @@
#!/usr/bin/env bash
clojure -Adev -m app.cli.collimp $@

View File

@@ -0,0 +1,19 @@
#!/usr/bin/env bash
set +e
JAVA_CMD=$(type -p java)
set -e
if [[ ! -n "$JAVA_CMD" ]]; then
if [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then
JAVA_CMD="$JAVA_HOME/bin/java"
else
>&2 echo "Couldn't find 'java'. Please set JAVA_HOME."
exit 1
fi
fi
if [ -f ./environ ]; then
source ./environ
fi
exec $JAVA_CMD $JVM_OPTS -jar penpot.jar -m app.cli.manage "$@"

View File

@@ -1,16 +0,0 @@
#!/usr/bin/env bash
if [ "$#" -e 0 ]; then
echo "Expecting parameters: 1=path to backend; 2=destination directory"
exit 1
fi
rm -rf $2 || exit 1;
rsync -avr \
--exclude="/test" \
--exclude="/resources/public/media" \
--exclude="/target" \
--exclude="/scripts" \
--exclude="/.*" \
$1 $2;

View File

@@ -1,2 +0,0 @@
#!/usr/bin/env bash
PGPASSWORD=$APP_DATABASE_PASSWORD psql $APP_DATABASE_URI -U $APP_DATABASE_USERNAME

View File

@@ -1,6 +1,40 @@
#!/usr/bin/env bash
set -ex
# clojure -Ojmx-remote -A:dev -e "(set! *warn-on-reflection* true)" -m rebel-readline.main
# clojure -Ojmx-remote -A:dev -J-XX:+UnlockExperimentalVMOptions -J-XX:+UseZGC -J-Xms128m -J-Xmx128m -m rebel-readline.main
clojure -A:jmx-remote:dev -J-Xms128m -J-Xmx128m -M -m rebel-readline.main
# export PENPOT_DATABASE_URI="postgresql://172.17.0.1:5432/penpot"
# export PENPOT_DATABASE_USERNAME="penpot"
# export PENPOT_DATABASE_PASSWORD="penpot"
# export PENPOT_DATABASE_READONLY=true
# export PENPOT_DATABASE_URI="postgresql://172.17.0.1:5432/penpot_pre"
# export PENPOT_DATABASE_USERNAME="penpot_pre"
# export PENPOT_DATABASE_PASSWORD="penpot_pre"
# export PENPOT_FLAGS="enable-asserts enable-audit-log $PENPOT_FLAGS"
# Initialize MINIO config
# mc alias set penpot-s3/ http://minio:9000 minioadmin minioadmin
# mc admin user add penpot-s3 penpot-devenv penpot-devenv
# mc admin policy set penpot-s3 readwrite user=penpot-devenv
# mc mb penpot-s3/penpot -p
# export AWS_ACCESS_KEY_ID=penpot-devenv
# export AWS_SECRET_ACCESS_KEY=penpot-devenv
# export PENPOT_ASSETS_STORAGE_BACKEND=assets-s3
# export PENPOT_STORAGE_ASSETS_S3_ENDPOINT=http://minio:9000
# export PENPOT_STORAGE_ASSETS_S3_REGION=eu-central-1
# export PENPOT_STORAGE_ASSETS_S3_BUCKET=penpot
export OPTIONS="
-A:dev \
-J-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager \
-J-Dlog4j2.configurationFile=log4j2-devenv.xml \
-J-XX:+UseZGC \
-J-XX:-OmitStackTraceInFastThrow \
-J-Xms50m -J-Xmx1024m \
-J-Djdk.attach.allowAttachSelf \
-J-XX:+UnlockDiagnosticVMOptions \
-J-XX:+DebugNonSafepoints";
export OPTIONS_EVAL="nil"
# export OPTIONS_EVAL="(set! *warn-on-reflection* true)"
set -ex
exec clojure $OPTIONS -M -e "$OPTIONS_EVAL" -m rebel-readline.main

View File

@@ -1,4 +0,0 @@
#!/usr/bin/env bash
set -xe
clojure -Adev -m app.tests.main;

View File

@@ -0,0 +1,20 @@
#!/usr/bin/env bash
set +e
JAVA_CMD=$(type -p java)
set -e
if [[ ! -n "$JAVA_CMD" ]]; then
if [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then
JAVA_CMD="$JAVA_HOME/bin/java"
else
>&2 echo "Couldn't find 'java'. Please set JAVA_HOME."
exit 1
fi
fi
if [ -f ./environ ]; then
source ./environ
fi
set -x
exec $JAVA_CMD $JVM_OPTS "$@" -jar penpot.jar -m app.main

View File

@@ -1,2 +0,0 @@
#!/usr/bin/env bash
python -m smtpd -n -c DebuggingServer localhost:25

View File

@@ -1,13 +1,23 @@
#!/bin/sh
#!/usr/bin/env bash
export PENPOT_FLAGS="$PENPOT_FLAGS enable-asserts"
set -ex
if [ ! -e ~/.fixtures-loaded ]; then
echo "Loading fixtures..."
clojure -Adev -X:fn-fixtures
touch ~/.fixtures-loaded
if [ "$1" = "--watch" ]; then
echo "Start Watch..."
clojure -A:dev -M -m app.main &
PID=$!
npx nodemon \
--watch src \
--watch ../common \
--ext "clj" \
--signal SIGKILL \
--exec 'echo "(user/restart)" | nc -N localhost 6062'
kill -9 $PID
else
clojure -A:dev -M -m app.main
fi
clojure -M -m app.main

View File

@@ -1,238 +0,0 @@
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; This Source Code Form is "Incompatible With Secondary Licenses", as
;; defined by the Mozilla Public License, v. 2.0.
;;
;; Copyright (c) 2020 UXBOX Labs SL
(ns app.cli.fixtures
"A initial fixtures."
(:require
[app.common.pages :as cp]
[app.common.uuid :as uuid]
[app.config :as cfg]
[app.db :as db]
[app.migrations]
[app.services.mutations.profile :as profile]
[app.util.blob :as blob]
[buddy.hashers :as hashers]
[clojure.tools.logging :as log]
[mount.core :as mount]))
(defn- mk-uuid
[prefix & args]
(uuid/namespaced uuid/zero (apply str prefix (interpose "-" args))))
;; --- Profiles creation
(def password (hashers/derive "123123"))
(def preset-small
{:num-teams 5
:num-profiles 5
:num-profiles-per-team 5
:num-projects-per-team 5
:num-files-per-project 5
:num-draft-files-per-profile 10})
(defn- rng-ids
[rng n max]
(let [stream (->> (.longs rng 0 max)
(.iterator)
(iterator-seq))]
(reduce (fn [acc item]
(if (= (count acc) n)
(reduced acc)
(conj acc item)))
#{}
stream)))
(defn- rng-vec
[rng vdata n]
(let [ids (rng-ids rng n (count vdata))]
(mapv #(nth vdata %) ids)))
(defn- rng-nth
[rng vdata]
(let [stream (->> (.longs rng 0 (count vdata))
(.iterator)
(iterator-seq))]
(nth vdata (first stream))))
(defn- collect
[f items]
(reduce #(conj %1 (f %2)) [] items))
(defn- register-profile
[conn params]
(->> (#'profile/create-profile conn params)
(#'profile/create-profile-relations conn)))
(defn impl-run
[opts]
(let [rng (java.util.Random. 1)]
(letfn [(create-profile [conn index]
(let [id (mk-uuid "profile" index)
_ (log/info "create profile" id)
prof (register-profile conn
{:id id
:fullname (str "Profile " index)
:password "123123"
:demo? true
:email (str "profile" index ".test@penpot.app")})
team-id (:default-team-id prof)
owner-id id]
(let [project-ids (collect (partial create-project conn team-id owner-id)
(range (:num-projects-per-team opts)))]
(run! (partial create-files conn owner-id) project-ids))
prof))
(create-profiles [conn]
(log/info "create profiles")
(collect (partial create-profile conn)
(range (:num-profiles opts))))
(create-team [conn index]
(let [id (mk-uuid "team" index)
name (str "Team" index)]
(log/info "create team" id)
(db/insert! conn :team {:id id
:name name
:photo ""})
id))
(create-teams [conn]
(log/info "create teams")
(collect (partial create-team conn)
(range (:num-teams opts))))
(create-file [conn owner-id project-id index]
(let [id (mk-uuid "file" project-id index)
name (str "file" index)
data (cp/make-file-data)]
(log/info "create file" id)
(db/insert! conn :file
{:id id
:data (blob/encode data)
:project-id project-id
:name name})
(db/insert! conn :file-profile-rel
{:file-id id
:profile-id owner-id
:is-owner true
:is-admin true
:can-edit true})
id))
(create-files [conn owner-id project-id]
(log/info "create files")
(run! (partial create-file conn owner-id project-id)
(range (:num-files-per-project opts))))
(create-project [conn team-id owner-id index]
(let [id (mk-uuid "project" team-id index)
name (str "project " index)]
(log/info "create project" id)
(db/insert! conn :project
{:id id
:team-id team-id
:name name})
(db/insert! conn :project-profile-rel
{:project-id id
:profile-id owner-id
:is-owner true
:is-admin true
:can-edit true})
id))
(create-projects [conn team-id profile-ids]
(log/info "create projects")
(let [owner-id (rng-nth rng profile-ids)
project-ids (collect (partial create-project conn team-id owner-id)
(range (:num-projects-per-team opts)))]
(run! (partial create-files conn owner-id) project-ids)))
(assign-profile-to-team [conn team-id owner? profile-id]
(db/insert! conn :team-profile-rel
{:team-id team-id
:profile-id profile-id
:is-owner owner?
:is-admin true
:can-edit true}))
(setup-team [conn team-id profile-ids]
(log/info "setup team" team-id profile-ids)
(assign-profile-to-team conn team-id true (first profile-ids))
(run! (partial assign-profile-to-team conn team-id false)
(rest profile-ids))
(create-projects conn team-id profile-ids))
(assign-teams-and-profiles [conn teams profiles]
(log/info "assign teams and profiles")
(loop [team-id (first teams)
teams (rest teams)]
(when-not (nil? team-id)
(let [n-profiles-team (:num-profiles-per-team opts)
selected-profiles (rng-vec rng profiles n-profiles-team)]
(setup-team conn team-id selected-profiles)
(recur (first teams)
(rest teams))))))
(create-draft-file [conn owner index]
(let [owner-id (:id owner)
id (mk-uuid "file" "draft" owner-id index)
name (str "file" index)
project-id (:default-project-id owner)
data (cp/make-file-data)]
(log/info "create draft file" id)
(db/insert! conn :file
{:id id
:data (blob/encode data)
:project-id project-id
:name name})
(db/insert! conn :file-profile-rel
{:file-id id
:profile-id owner-id
:is-owner true
:is-admin true
:can-edit true})
id))
(create-draft-files [conn profile]
(run! (partial create-draft-file conn profile)
(range (:num-draft-files-per-profile opts))))
]
(db/with-atomic [conn db/pool]
(let [profiles (create-profiles conn)
teams (create-teams conn)]
(assign-teams-and-profiles conn teams (map :id profiles))
(run! (partial create-draft-files conn) profiles))))))
(defn run*
[preset]
(let [preset (if (map? preset)
preset
(case preset
(nil "small" :small) preset-small
;; "medium" preset-medium
;; "big" preset-big
preset-small))]
(impl-run preset)))
(defn run
[{:keys [preset]
:or {preset :small}}]
(try
(-> (mount/only #{#'app.config/config
#'app.db/pool
#'app.migrations/migrations})
(mount/start))
(run* preset)
(catch Exception e
(log/errorf e "Unhandled exception."))
(finally
(mount/stop))))

View File

@@ -0,0 +1,168 @@
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) UXBOX Labs SL
(ns app.cli.manage
"A manage cli api."
(:require
[app.common.logging :as l]
[app.db :as db]
[app.main :as main]
[app.rpc.mutations.profile :as profile]
[app.rpc.queries.profile :refer [retrieve-profile-data-by-email]]
[clojure.string :as str]
[clojure.tools.cli :refer [parse-opts]]
[integrant.core :as ig])
(:import
java.io.Console))
;; --- IMPL
(defn init-system
[]
(let [data (-> main/system-config
(select-keys [:app.db/pool :app.metrics/metrics])
(assoc :app.migrations/all {}))]
(-> data ig/prep ig/init)))
(defn- read-from-console
[{:keys [label type] :or {type :text}}]
(let [^Console console (System/console)]
(when-not console
(l/error :hint "no console found, can proceed")
(System/exit 1))
(binding [*out* (.writer console)]
(print label " ")
(.flush *out*))
(case type
:text (.readLine console)
:password (String. (.readPassword console)))))
(defn create-profile
[options]
(let [system (init-system)
email (or (:email options)
(read-from-console {:label "Email:"}))
fullname (or (:fullname options)
(read-from-console {:label "Full Name:"}))
password (or (:password options)
(read-from-console {:label "Password:"
:type :password}))]
(try
(db/with-atomic [conn (:app.db/pool system)]
(->> (profile/create-profile conn
{:fullname fullname
:email email
:password password
:is-active true
:is-demo false})
(profile/create-profile-relations conn)))
(when (pos? (:verbosity options))
(println "User created successfully."))
(System/exit 0)
(catch Exception _e
(when (pos? (:verbosity options))
(println "Unable to create user, already exists."))
(System/exit 1)))))
(defn reset-password
[options]
(let [system (init-system)]
(try
(db/with-atomic [conn (:app.db/pool system)]
(let [email (or (:email options)
(read-from-console {:label "Email:"}))
profile (retrieve-profile-data-by-email conn email)]
(when-not profile
(when (pos? (:verbosity options))
(println "Profile does not exists."))
(System/exit 1))
(let [password (or (:password options)
(read-from-console {:label "Password:"
:type :password}))]
(profile/update-profile-password! conn (assoc profile :password password))
(when (pos? (:verbosity options))
(println "Password changed successfully.")))))
(System/exit 0)
(catch Exception e
(when (pos? (:verbosity options))
(println "Unable to change password."))
(when (= 2 (:verbosity options))
(.printStackTrace e))
(System/exit 1)))))
;; --- CLI PARSE
(def cli-options
;; An option with a required argument
[["-u" "--email EMAIL" "Email Address"]
["-p" "--password PASSWORD" "Password"]
["-n" "--name FULLNAME" "Full Name"
:id :fullname]
["-v" nil "Verbosity level"
:id :verbosity
:default 1
:update-fn inc]
["-q" nil "Dont' print to console"
:id :verbosity
:update-fn (constantly 0)]
["-h" "--help"]])
(defn usage
[options-summary]
(->> ["Penpot CLI management."
""
"Usage: manage [options] action"
""
"Options:"
options-summary
""
"Actions:"
" create-profile Create new profile."
" reset-password Reset profile password."
""]
(str/join \newline)))
(defn error-msg [errors]
(str "The following errors occurred while parsing your command:\n\n"
(str/join \newline errors)))
(defn validate-args
"Validate command line arguments. Either return a map indicating the program
should exit (with a error message, and optional ok status), or a map
indicating the action the program should take and the options provided."
[args]
(let [{:keys [options arguments errors summary] :as opts} (parse-opts args cli-options)]
(cond
(:help options) ; help => exit OK with usage summary
{:exit-message (usage summary) :ok? true}
errors ; errors => exit with description of errors
{:exit-message (error-msg errors)}
;; custom validation on arguments
:else
(let [action (first arguments)]
(if (#{"create-profile" "reset-password"} action)
{:action (first arguments) :options options}
{:exit-message (usage summary)})))))
(defn exit [status msg]
(println msg)
(System/exit status))
(defn -main
[& args]
(let [{:keys [action options exit-message ok?]} (validate-args args)]
(if exit-message
(exit (if ok? 0 1) exit-message)
(case action
"create-profile" (create-profile options)
"reset-password" (reset-password options)))))

View File

@@ -1,232 +0,0 @@
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; This Source Code Form is "Incompatible With Secondary Licenses", as
;; defined by the Mozilla Public License, v. 2.0.
;;
;; Copyright (c) 2020 UXBOX Labs SL
(ns app.cli.media-loader
"Media libraries importer (command line helper)."
#_(:require
[app.common.spec :as us]
[app.common.uuid :as uuid]
[app.config]
[app.db :as db]
[app.media-storage]
[app.media]
[app.migrations]
[app.services.mutations.files :as files]
[app.services.mutations.media :as media]
[app.services.mutations.projects :as projects]
[clojure.java.io :as io]
[clojure.spec.alpha :as s]
[clojure.tools.logging :as log]
[datoteka.core :as fs]
[mount.core :as mount])
#_(:import
java.io.PushbackReader))
;; --- Constants & Helpers
;; (def ^:const +graphics-uuid-ns+ #uuid "3642a582-565f-4070-beba-af797ab27a6a")
;; (def ^:const +colors-uuid-ns+ #uuid "3642a582-565f-4070-beba-af797ab27a6c")
;; (s/def ::id ::us/uuid)
;; (s/def ::name ::us/string)
;; (s/def ::path ::us/string)
;; (s/def ::regex #(instance? java.util.regex.Pattern %))
;; (s/def ::import-graphics
;; (s/keys :req-un [::path ::regex]))
;; (s/def ::import-color
;; (s/* (s/cat :name ::us/string :color ::us/color)))
;; (s/def ::import-colors (s/coll-of ::import-color))
;; (s/def ::import-library
;; (s/keys :req-un [::name]
;; :opt-un [::import-graphics ::import-colors]))
;; (defn exit!
;; ([] (exit! 0))
;; ([code]
;; (System/exit code)))
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;; Graphics Importer
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; (defn- create-media-object
;; [conn file-id media-object-id localpath]
;; (s/assert fs/path? localpath)
;; (s/assert ::us/uuid file-id)
;; (s/assert ::us/uuid media-object-id)
;; (let [filename (fs/name localpath)
;; extension (second (fs/split-ext filename))
;; file (io/as-file localpath)
;; mtype (case extension
;; ".jpg" "image/jpeg"
;; ".png" "image/png"
;; ".webp" "image/webp"
;; ".svg" "image/svg+xml")]
;; (log/info "Creating image" filename media-object-id)
;; (media/create-media-object conn {:content {:tempfile localpath
;; :filename filename
;; :content-type mtype
;; :size (.length file)}
;; :id media-object-id
;; :file-id file-id
;; :name filename
;; :is-local false})))
;; (defn- media-object-exists?
;; [conn id]
;; (s/assert ::us/uuid id)
;; (let [row (db/get-by-id conn :media-object id)]
;; (if row true false)))
;; (defn- import-media-object-if-not-exists
;; [conn file-id fpath]
;; (s/assert ::us/uuid file-id)
;; (s/assert fs/path? fpath)
;; (let [media-object-id (uuid/namespaced +graphics-uuid-ns+ (str file-id (fs/name fpath)))]
;; (when-not (media-object-exists? conn media-object-id)
;; (create-media-object conn file-id media-object-id fpath))
;; media-object-id))
;; (defn- import-graphics
;; [conn file-id {:keys [path regex]}]
;; (run! (fn [fpath]
;; (when (re-matches regex (str fpath))
;; (import-media-object-if-not-exists conn file-id fpath)))
;; (->> (fs/list-dir path)
;; (filter fs/regular-file?))))
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;; Colors Importer
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; (defn- create-color
;; [conn file-id name content]
;; (s/assert ::us/uuid file-id)
;; (s/assert ::us/color content)
;; (let [color-id (uuid/namespaced +colors-uuid-ns+ (str file-id content))]
;; (log/info "Creating color" color-id "-" name content)
;; (colors/create-color conn {:id color-id
;; :file-id file-id
;; :name name
;; :content content})
;; color-id))
;; (defn- import-colors
;; [conn file-id colors]
;; (db/delete! conn :color {:file-id file-id})
;; (run! (fn [[name content]]
;; (create-color conn file-id name content))
;; (partition-all 2 colors)))
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;; Library files Importer
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; (defn- library-file-exists?
;; [conn id]
;; (s/assert ::us/uuid id)
;; (let [row (db/get-by-id conn :file id)]
;; (if row true false)))
;; (defn- create-library-file-if-not-exists
;; [conn project-id {:keys [name]}]
;; (let [id (uuid/namespaced +colors-uuid-ns+ name)]
;; (when-not (library-file-exists? conn id)
;; (log/info "Creating library-file:" name)
;; (files/create-file conn {:id id
;; :profile-id uuid/zero
;; :project-id project-id
;; :name name
;; :is-shared true})
;; (files/create-page conn {:file-id id}))
;; id))
;; (defn- process-library
;; [conn basedir project-id {:keys [graphics colors] :as library}]
;; (us/verify ::import-library library)
;; (let [library-file-id (create-library-file-if-not-exists conn project-id library)]
;; (when graphics
;; (->> (assoc graphics :path (fs/join basedir (:path graphics)))
;; (import-graphics conn library-file-id)))
;; (when colors
;; (import-colors conn library-file-id colors))))
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;; Entry Point
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; (defn- project-exists?
;; [conn id]
;; (s/assert ::us/uuid id)
;; (let [row (db/get-by-id conn :project id)]
;; (if row true false)))
;; (defn- create-project-if-not-exists
;; [conn {:keys [name] :as project}]
;; (let [id (uuid/namespaced +colors-uuid-ns+ name)]
;; (when-not (project-exists? conn id)
;; (log/info "Creating project" name)
;; (projects/create-project conn {:id id
;; :team-id uuid/zero
;; :name name
;; :default? false}))
;; id))
;; (defn- validate-path
;; [path]
;; (let [path (if (symbol? path) (str path) path)]
;; (log/infof "Trying to load config from '%s'." path)
;; (when-not path
;; (log/error "No path is provided")
;; (exit! -1))
;; (when-not (fs/exists? path)
;; (log/error "Path does not exists.")
;; (exit! -1))
;; (when (fs/directory? path)
;; (log/error "The provided path is a directory.")
;; (exit! -1))
;; (fs/path path)))
;; (defn- read-file
;; [path]
;; (let [reader (PushbackReader. (io/reader path))]
;; [(fs/parent path)
;; (read reader)]))
;; (defn run*
;; [path]
;; (let [[basedir libraries] (read-file path)]
;; (db/with-atomic [conn db/pool]
;; (let [project-id (create-project-if-not-exists conn {:name "System libraries"})]
;; (run! #(process-library conn basedir project-id %) libraries)))))
;; (defn run
;; [{:keys [path] :as params}]
;; (log/infof "Starting media loader.")
;; (let [path (validate-path path)]
;; (try
;; (-> (mount/only #{#'app.config/config
;; #'app.db/pool
;; #'app.migrations/migrations
;; #'app.media/semaphore
;; #'app.media-storage/media-storage})
;; (mount/start))
;; (run* path)
;; (catch Exception e
;; (log/errorf e "Unhandled exception."))
;; (finally
;; (mount/stop)))))

View File

@@ -0,0 +1,129 @@
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) UXBOX Labs SL
(ns app.cli.migrate-media
(:require
[app.common.logging :as l]
[app.common.media :as cm]
[app.config :as cf]
[app.db :as db]
[app.main :as main]
[app.storage :as sto]
[cuerdas.core :as str]
[datoteka.core :as fs]
[integrant.core :as ig]))
(declare migrate-profiles)
(declare migrate-teams)
(declare migrate-file-media)
(defn run-in-system
[system]
(db/with-atomic [conn (:app.db/pool system)]
(let [system (assoc system ::conn conn)]
(migrate-profiles system)
(migrate-teams system)
(migrate-file-media system))
system))
(defn run
[]
(let [config (select-keys main/system-config
[:app.db/pool
:app.migrations/migrations
:app.metrics/metrics
:app.storage.s3/backend
:app.storage.db/backend
:app.storage.fs/backend
:app.storage/storage])]
(ig/load-namespaces config)
(try
(-> (ig/prep config)
(ig/init)
(run-in-system)
(ig/halt!))
(catch Exception e
(l/error :hint "unhandled exception" :cause e)))))
;; --- IMPL
(defn migrate-profiles
[{:keys [::conn] :as system}]
(letfn [(retrieve-profiles [conn]
(->> (db/exec! conn ["select * from profile"])
(filter #(not (str/empty? (:photo %))))
(seq)))]
(let [base (fs/path (cf/get :storage-fs-old-directory))
storage (-> (:app.storage/storage system)
(assoc :conn conn))]
(doseq [profile (retrieve-profiles conn)]
(let [path (fs/path (:photo profile))
full (-> (fs/join base path)
(fs/normalize))
ext (fs/ext path)
mtype (cm/format->mtype (keyword ext))
obj (sto/put-object storage {:content (sto/content full)
:content-type mtype})]
(db/update! conn :profile
{:photo-id (:id obj)}
{:id (:id profile)}))))))
(defn migrate-teams
[{:keys [::conn] :as system}]
(letfn [(retrieve-teams [conn]
(->> (db/exec! conn ["select * from team"])
(filter #(not (str/empty? (:photo %))))
(seq)))]
(let [base (fs/path (cf/get :storage-fs-old-directory))
storage (-> (:app.storage/storage system)
(assoc :conn conn))]
(doseq [team (retrieve-teams conn)]
(let [path (fs/path (:photo team))
full (-> (fs/join base path)
(fs/normalize))
ext (fs/ext path)
mtype (cm/format->mtype (keyword ext))
obj (sto/put-object storage {:content (sto/content full)
:content-type mtype})]
(db/update! conn :team
{:photo-id (:id obj)}
{:id (:id team)}))))))
(defn migrate-file-media
[{:keys [::conn] :as system}]
(letfn [(retrieve-media-objects [conn]
(->> (db/exec! conn ["select fmo.id, fmo.path, fth.path as thumbnail_path
from file_media_object as fmo
join file_media_thumbnail as fth on (fth.media_object_id = fmo.id)"])
(seq)))]
(let [base (fs/path (cf/get :storage-fs-old-directory))
storage (-> (:app.storage/storage system)
(assoc :conn conn))]
(doseq [mobj (retrieve-media-objects conn)]
(let [img-path (fs/path (:path mobj))
thm-path (fs/path (:thumbnail-path mobj))
img-path (-> (fs/join base img-path)
(fs/normalize))
thm-path (-> (fs/join base thm-path)
(fs/normalize))
img-ext (fs/ext img-path)
thm-ext (fs/ext thm-path)
img-mtype (cm/format->mtype (keyword img-ext))
thm-mtype (cm/format->mtype (keyword thm-ext))
img-obj (sto/put-object storage {:content (sto/content img-path)
:content-type img-mtype})
thm-obj (sto/put-object storage {:content (sto/content thm-path)
:content-type thm-mtype})]
(db/update! conn :file-media-object
{:media-id (:id img-obj)
:thumbnail-id (:id thm-obj)}
{:id (:id mobj)}))))))

View File

@@ -2,220 +2,365 @@
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; This Source Code Form is "Incompatible With Secondary Licenses", as
;; defined by the Mozilla Public License, v. 2.0.
;;
;; Copyright (c) 2020 UXBOX Labs SL
;; Copyright (c) UXBOX Labs SL
(ns app.config
"A configuration management."
(:refer-clojure :exclude [get])
(:require
[app.common.data :as d]
[app.common.exceptions :as ex]
[app.common.flags :as flags]
[app.common.spec :as us]
[app.common.version :as v]
[app.util.time :as dt]
[clojure.core :as c]
[clojure.java.io :as io]
[clojure.pprint :as pprint]
[clojure.spec.alpha :as s]
[cuerdas.core :as str]
[environ.core :refer [env]]
[mount.core :refer [defstate]]))
[integrant.core :as ig]))
(prefer-method print-method
clojure.lang.IRecord
clojure.lang.IDeref)
(prefer-method pprint/simple-dispatch
clojure.lang.IPersistentMap
clojure.lang.IDeref)
(defmethod ig/init-key :default
[_ data]
(d/without-nils data))
(defmethod ig/prep-key :default
[_ data]
(if (map? data)
(d/without-nils data)
data))
(def defaults
{:http-server-port 6060
:http-server-cors "http://localhost:3449"
:database-uri "postgresql://127.0.0.1/penpot"
{:host "devenv"
:tenant "dev"
:database-uri "postgresql://postgres/penpot"
:database-username "penpot"
:database-password "penpot"
:secret-key "default"
:media-directory "resources/public/media"
:assets-directory "resources/public/static"
:default-blob-version 3
:loggers-zmq-uri "tcp://localhost:45556"
:public-uri "http://localhost:3449/"
:redis-uri "redis://localhost/0"
:media-uri "http://localhost:3449/media/"
:assets-uri "http://localhost:3449/static/"
:file-change-snapshot-every 5
:file-change-snapshot-timeout "3h"
:image-process-max-threads 2
:public-uri "http://localhost:3449"
:redis-uri "redis://redis/0"
:smtp-enabled false
:smtp-default-reply-to "no-reply@example.com"
:smtp-default-from "no-reply@example.com"
:srepl-host "127.0.0.1"
:srepl-port 6062
:host "devenv"
:assets-storage-backend :assets-fs
:storage-assets-fs-directory "assets"
:allow-demo-users true
:registration-enabled true
:registration-domain-whitelist ""
:debug-humanize-transit true
:assets-path "/internal/assets/"
;; This is the time should transcurr after the last page
;; modification in order to make the file ellegible for
;; trimming. The value only supports s(econds) m(inutes) and
;; h(ours) as time unit.
:file-trimming-threshold "72h"
:rlimit-password 10
:rlimit-image 2
:rlimit-font 5
;; LDAP auth disabled by default. Set ldap-auth-host to enable
;:ldap-auth-host "ldap.mysupercompany.com"
;:ldap-auth-port 389
;:ldap-bind-dn "cn=admin,dc=ldap,dc=mysupercompany,dc=com"
;:ldap-bind-password "verysecure"
;:ldap-auth-ssl false
;:ldap-auth-starttls false
;:ldap-auth-base-dn "ou=People,dc=ldap,dc=mysupercompany,dc=com"
:smtp-default-reply-to "Penpot <no-reply@example.com>"
:smtp-default-from "Penpot <no-reply@example.com>"
:ldap-auth-user-query "(|(uid=$username)(mail=$username))"
:ldap-auth-username-attribute "uid"
:ldap-auth-email-attribute "mail"
:ldap-auth-fullname-attribute "displayName"
:ldap-auth-avatar-attribute "jpegPhoto"})
:profile-complaint-max-age (dt/duration {:days 7})
:profile-complaint-threshold 2
(s/def ::http-server-port ::us/integer)
(s/def ::http-server-debug ::us/boolean)
(s/def ::http-server-cors ::us/string)
(s/def ::database-username (s/nilable ::us/string))
:profile-bounce-max-age (dt/duration {:days 7})
:profile-bounce-threshold 10
:telemetry-uri "https://telemetry.penpot.app/"
:ldap-user-query "(|(uid=:username)(mail=:username))"
:ldap-attrs-username "uid"
:ldap-attrs-email "mail"
:ldap-attrs-fullname "cn"
:ldap-attrs-photo "jpegPhoto"
;; a server prop key where initial project is stored.
:initial-project-skey "initial-project"})
(s/def ::flags ::us/set-of-keywords)
;; DEPRECATED PROPERTIES: should be removed in 1.10
(s/def ::registration-enabled ::us/boolean)
(s/def ::smtp-enabled ::us/boolean)
(s/def ::telemetry-enabled ::us/boolean)
(s/def ::asserts-enabled ::us/boolean)
;; END DEPRECATED
(s/def ::audit-log-archive-uri ::us/string)
(s/def ::audit-log-gc-max-age ::dt/duration)
(s/def ::admins ::us/set-of-str)
(s/def ::file-change-snapshot-every ::us/integer)
(s/def ::file-change-snapshot-timeout ::dt/duration)
(s/def ::default-executor-parallelism ::us/integer)
(s/def ::blocking-executor-parallelism ::us/integer)
(s/def ::worker-executor-parallelism ::us/integer)
(s/def ::secret-key ::us/string)
(s/def ::allow-demo-users ::us/boolean)
(s/def ::assets-path ::us/string)
(s/def ::authenticated-cookie-domain ::us/string)
(s/def ::database-password (s/nilable ::us/string))
(s/def ::database-uri ::us/string)
(s/def ::redis-uri ::us/string)
(s/def ::assets-uri ::us/string)
(s/def ::assets-directory ::us/string)
(s/def ::media-uri ::us/string)
(s/def ::media-directory ::us/string)
(s/def ::secret-key ::us/string)
(s/def ::database-username (s/nilable ::us/string))
(s/def ::database-readonly ::us/boolean)
(s/def ::database-min-pool-size ::us/integer)
(s/def ::database-max-pool-size ::us/integer)
(s/def ::host ::us/string)
(s/def ::default-blob-version ::us/integer)
(s/def ::error-report-webhook ::us/string)
(s/def ::smtp-enabled ::us/boolean)
(s/def ::smtp-default-reply-to ::us/email)
(s/def ::smtp-default-from ::us/email)
(s/def ::smtp-host ::us/string)
(s/def ::smtp-port ::us/integer)
(s/def ::smtp-username (s/nilable ::us/string))
(s/def ::smtp-password (s/nilable ::us/string))
(s/def ::smtp-tls ::us/boolean)
(s/def ::smtp-ssl ::us/boolean)
(s/def ::allow-demo-users ::us/boolean)
(s/def ::registration-enabled ::us/boolean)
(s/def ::registration-domain-whitelist ::us/string)
(s/def ::debug-humanize-transit ::us/boolean)
(s/def ::public-uri ::us/string)
(s/def ::backend-uri ::us/string)
(s/def ::image-process-max-threads ::us/integer)
(s/def ::file-trimming-threshold ::dt/duration)
(s/def ::google-client-id ::us/string)
(s/def ::google-client-secret ::us/string)
(s/def ::user-feedback-destination ::us/string)
(s/def ::github-client-id ::us/string)
(s/def ::github-client-secret ::us/string)
(s/def ::gitlab-base-uri ::us/string)
(s/def ::gitlab-client-id ::us/string)
(s/def ::gitlab-client-secret ::us/string)
(s/def ::gitlab-base-uri ::us/string)
(s/def ::ldap-auth-host ::us/string)
(s/def ::ldap-auth-port ::us/integer)
(s/def ::google-client-id ::us/string)
(s/def ::google-client-secret ::us/string)
(s/def ::oidc-client-id ::us/string)
(s/def ::oidc-client-secret ::us/string)
(s/def ::oidc-base-uri ::us/string)
(s/def ::oidc-token-uri ::us/string)
(s/def ::oidc-auth-uri ::us/string)
(s/def ::oidc-user-uri ::us/string)
(s/def ::oidc-scopes ::us/set-of-str)
(s/def ::oidc-roles ::us/set-of-str)
(s/def ::oidc-roles-attr ::us/keyword)
(s/def ::host ::us/string)
(s/def ::http-server-port ::us/integer)
(s/def ::http-server-host ::us/string)
(s/def ::http-server-min-threads ::us/integer)
(s/def ::http-server-max-threads ::us/integer)
(s/def ::http-session-idle-max-age ::dt/duration)
(s/def ::http-session-updater-batch-max-age ::dt/duration)
(s/def ::http-session-updater-batch-max-size ::us/integer)
(s/def ::initial-project-skey ::us/string)
(s/def ::ldap-attrs-email ::us/string)
(s/def ::ldap-attrs-fullname ::us/string)
(s/def ::ldap-attrs-photo ::us/string)
(s/def ::ldap-attrs-username ::us/string)
(s/def ::ldap-base-dn ::us/string)
(s/def ::ldap-bind-dn ::us/string)
(s/def ::ldap-bind-password ::us/string)
(s/def ::ldap-auth-ssl ::us/boolean)
(s/def ::ldap-auth-starttls ::us/boolean)
(s/def ::ldap-auth-base-dn ::us/string)
(s/def ::ldap-auth-user-query ::us/string)
(s/def ::ldap-auth-username-attribute ::us/string)
(s/def ::ldap-auth-email-attribute ::us/string)
(s/def ::ldap-auth-fullname-attribute ::us/string)
(s/def ::ldap-auth-avatar-attribute ::us/string)
(s/def ::ldap-host ::us/string)
(s/def ::ldap-port ::us/integer)
(s/def ::ldap-ssl ::us/boolean)
(s/def ::ldap-starttls ::us/boolean)
(s/def ::ldap-user-query ::us/string)
(s/def ::loggers-loki-uri ::us/string)
(s/def ::loggers-zmq-uri ::us/string)
(s/def ::media-directory ::us/string)
(s/def ::media-uri ::us/string)
(s/def ::profile-bounce-max-age ::dt/duration)
(s/def ::profile-bounce-threshold ::us/integer)
(s/def ::profile-complaint-max-age ::dt/duration)
(s/def ::profile-complaint-threshold ::us/integer)
(s/def ::public-uri ::us/string)
(s/def ::redis-uri ::us/string)
(s/def ::registration-domain-whitelist ::us/set-of-str)
(s/def ::rlimit-font ::us/integer)
(s/def ::rlimit-image ::us/integer)
(s/def ::rlimit-password ::us/integer)
(s/def ::smtp-default-from ::us/string)
(s/def ::smtp-default-reply-to ::us/string)
(s/def ::smtp-host ::us/string)
(s/def ::smtp-password (s/nilable ::us/string))
(s/def ::smtp-port ::us/integer)
(s/def ::smtp-ssl ::us/boolean)
(s/def ::smtp-tls ::us/boolean)
(s/def ::smtp-username (s/nilable ::us/string))
(s/def ::srepl-host ::us/string)
(s/def ::srepl-port ::us/integer)
(s/def ::assets-storage-backend ::us/keyword)
(s/def ::fdata-storage-backend ::us/keyword)
(s/def ::storage-assets-fs-directory ::us/string)
(s/def ::storage-assets-s3-bucket ::us/string)
(s/def ::storage-assets-s3-region ::us/keyword)
(s/def ::storage-assets-s3-endpoint ::us/string)
(s/def ::storage-fdata-s3-bucket ::us/string)
(s/def ::storage-fdata-s3-region ::us/keyword)
(s/def ::storage-fdata-s3-prefix ::us/string)
(s/def ::storage-fdata-s3-endpoint ::us/string)
(s/def ::telemetry-uri ::us/string)
(s/def ::telemetry-with-taiga ::us/boolean)
(s/def ::tenant ::us/string)
(s/def ::sentry-trace-sample-rate ::us/number)
(s/def ::sentry-attach-stack-trace ::us/boolean)
(s/def ::sentry-debug ::us/boolean)
(s/def ::sentry-dsn ::us/string)
(s/def ::config
(s/keys :opt-un [::http-server-cors
::http-server-debug
::http-server-port
::google-client-id
::google-client-secret
::gitlab-client-id
::gitlab-client-secret
::gitlab-base-uri
::redis-uri
::public-uri
::database-username
(s/keys :opt-un [::secret-key
::flags
::admins
::allow-demo-users
::audit-log-archive-uri
::audit-log-gc-max-age
::authenticated-cookie-domain
::database-password
::database-uri
::assets-directory
::assets-uri
::media-directory
::media-uri
::database-username
::database-readonly
::database-min-pool-size
::database-max-pool-size
::default-blob-version
::error-report-webhook
::secret-key
::default-executor-parallelism
::blocking-executor-parallelism
::worker-executor-parallelism
::file-change-snapshot-every
::file-change-snapshot-timeout
::user-feedback-destination
::github-client-id
::github-client-secret
::gitlab-base-uri
::gitlab-client-id
::gitlab-client-secret
::google-client-id
::google-client-secret
::oidc-client-id
::oidc-client-secret
::oidc-base-uri
::oidc-token-uri
::oidc-auth-uri
::oidc-user-uri
::oidc-scopes
::oidc-roles-attr
::oidc-roles
::host
::http-server-host
::http-server-port
::http-server-max-threads
::http-server-min-threads
::http-session-idle-max-age
::http-session-updater-batch-max-age
::http-session-updater-batch-max-size
::initial-project-skey
::ldap-attrs-email
::ldap-attrs-fullname
::ldap-attrs-photo
::ldap-attrs-username
::ldap-base-dn
::ldap-bind-dn
::ldap-bind-password
::ldap-host
::ldap-port
::ldap-ssl
::ldap-starttls
::ldap-user-query
::local-assets-uri
::loggers-loki-uri
::loggers-zmq-uri
::profile-bounce-max-age
::profile-bounce-threshold
::profile-complaint-max-age
::profile-complaint-threshold
::public-uri
::redis-uri
::registration-domain-whitelist
::registration-enabled
::rlimit-font
::rlimit-image
::rlimit-password
::sentry-dsn
::sentry-debug
::sentry-attach-stack-trace
::sentry-trace-sample-rate
::smtp-default-from
::smtp-default-reply-to
::smtp-enabled
::smtp-host
::smtp-port
::smtp-username
::smtp-password
::smtp-tls
::smtp-port
::smtp-ssl
::host
::file-trimming-threshold
::debug-humanize-transit
::allow-demo-users
::registration-enabled
::registration-domain-whitelist
::image-process-max-threads
::ldap-auth-host
::ldap-auth-port
::ldap-bind-dn
::ldap-bind-password
::ldap-auth-ssl
::ldap-auth-starttls
::ldap-auth-base-dn
::ldap-auth-user-query
::ldap-auth-username-attribute
::ldap-auth-email-attribute
::ldap-auth-fullname-attribute
::ldap-auth-avatar-attribute]))
::smtp-tls
::smtp-username
::srepl-host
::srepl-port
::assets-storage-backend
::storage-assets-fs-directory
::storage-assets-s3-bucket
::storage-assets-s3-region
::storage-assets-s3-endpoint
::fdata-storage-backend
::storage-fdata-s3-bucket
::storage-fdata-s3-region
::storage-fdata-s3-prefix
::storage-fdata-s3-endpoint
::telemetry-enabled
::telemetry-uri
::telemetry-referer
::telemetry-with-taiga
::tenant]))
(defn env->config
[env]
(reduce-kv
(fn [acc k v]
(cond-> acc
(str/starts-with? (name k) "penpot-")
(assoc (keyword (subs (name k) 7)) v)
(def default-flags
[:enable-backend-asserts
:enable-backend-api-doc
:enable-secure-session-cookies])
(str/starts-with? (name k) "app-")
(assoc (keyword (subs (name k) 4)) v)))
{}
env))
(defn- parse-flags
[config]
(flags/parse flags/default
default-flags
(:flags config)))
(defn read-config
[env]
(->> (env->config env)
(merge defaults)
(us/conform ::config)))
(defn read-env
[prefix]
(let [prefix (str prefix "-")
len (count prefix)]
(reduce-kv
(fn [acc k v]
(cond-> acc
(str/starts-with? (name k) prefix)
(assoc (keyword (subs (name k) len)) v)))
{}
env)))
(defn read-test-config
[env]
(assoc (read-config env)
:redis-uri "redis://redis/1"
:database-uri "postgresql://postgres/penpot_test"
:media-directory "/tmp/app/media"
:assets-directory "/tmp/app/static"
:migrations-verbose false))
(defstate config
:start (read-config env))
(def default-deletion-delay
(dt/duration {:hours 48}))
(defn- read-config
[]
(try
(->> (read-env "penpot")
(merge defaults)
(us/conform ::config))
(catch Throwable e
(when (ex/ex-info? e)
(println ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;")
(println "Error on validating configuration:")
(println (:explain (ex-data e))
(println ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;")))
(throw e))))
(def version
(delay (v/parse "%version%")))
(v/parse (or (some-> (io/resource "version.txt")
(slurp)
(str/trim))
"%version%")))
(defn smtp
[cfg]
{:host (:smtp-host cfg "localhost")
:port (:smtp-port cfg 25)
:default-reply-to (:smtp-default-reply-to cfg)
:default-from (:smtp-default-from cfg)
:tls (:smtp-tls cfg)
:enabled (:smtp-enabled cfg)
:username (:smtp-username cfg)
:password (:smtp-password cfg)})
(def ^:dynamic config (read-config))
(def ^:dynamic flags (parse-flags config))
(def deletion-delay
(dt/duration {:days 7}))
(defn get
"A configuration getter. Helps code be more testable."
([key]
(c/get config key))
([key default]
(c/get config key default)))
;; Set value for all new threads bindings.
(alter-var-root #'*assert* (constantly (contains? flags :backend-asserts)))

View File

@@ -2,65 +2,149 @@
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; This Source Code Form is "Incompatible With Secondary Licenses", as
;; defined by the Mozilla Public License, v. 2.0.
;;
;; Copyright (c) 2020 UXBOX Labs SL
;; Copyright (c) UXBOX Labs SL
(ns app.db
(:require
[app.common.data :as d]
[app.common.exceptions :as ex]
[app.common.geom.point :as gpt]
[app.config :as cfg]
[app.common.logging :as l]
[app.common.spec :as us]
[app.common.transit :as t]
[app.common.uuid :as uuid]
[app.db.sql :as sql]
[app.metrics :as mtx]
[app.util.json :as json]
[app.util.migrations :as mg]
[app.util.time :as dt]
[app.util.transit :as t]
[clojure.data.json :as json]
[clojure.java.io :as io]
[clojure.spec.alpha :as s]
[clojure.string :as str]
[mount.core :as mount :refer [defstate]]
[integrant.core :as ig]
[next.jdbc :as jdbc]
[next.jdbc.date-time :as jdbc-dt]
[next.jdbc.optional :as jdbc-opt]
[next.jdbc.sql :as jdbc-sql]
[next.jdbc.sql.builder :as jdbc-bld])
[next.jdbc.date-time :as jdbc-dt])
(:import
com.zaxxer.hikari.HikariConfig
com.zaxxer.hikari.HikariDataSource
com.zaxxer.hikari.metrics.prometheus.PrometheusMetricsTrackerFactory
java.io.InputStream
java.io.OutputStream
java.lang.AutoCloseable
java.sql.Connection
java.sql.Savepoint
org.postgresql.PGConnection
org.postgresql.geometric.PGpoint
org.postgresql.jdbc.PgArray
org.postgresql.largeobject.LargeObject
org.postgresql.largeobject.LargeObjectManager
org.postgresql.util.PGInterval
org.postgresql.util.PGobject))
(declare open)
(declare create-pool)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Initialization
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(declare apply-migrations!)
(s/def ::connection-timeout ::us/integer)
(s/def ::max-size ::us/integer)
(s/def ::min-size ::us/integer)
(s/def ::migrations map?)
(s/def ::name keyword?)
(s/def ::password ::us/string)
(s/def ::read-only ::us/boolean)
(s/def ::uri ::us/not-empty-string)
(s/def ::username ::us/string)
(s/def ::validation-timeout ::us/integer)
(defmethod ig/pre-init-spec ::pool [_]
(s/keys :req-un [::uri ::name
::min-size
::max-size
::connection-timeout
::validation-timeout]
:opt-un [::migrations
::username
::password
::mtx/metrics
::read-only]))
(defmethod ig/prep-key ::pool
[_ cfg]
(merge {:name :main
:min-size 0
:max-size 30
:connection-timeout 10000
:validation-timeout 10000
:idle-timeout 120000 ; 2min
:max-lifetime 1800000 ; 30m
:read-only false}
(d/without-nils cfg)))
(defmethod ig/init-key ::pool
[_ {:keys [migrations name read-only] :as cfg}]
(l/info :hint "initialize connection pool"
:name (d/name name)
:uri (:uri cfg)
:read-only read-only
:with-credentials (and (contains? cfg :username)
(contains? cfg :password))
:min-size (:min-size cfg)
:max-size (:max-size cfg))
(let [pool (create-pool cfg)]
(when-not read-only
(some->> (seq migrations) (apply-migrations! pool)))
pool))
(defmethod ig/halt-key! ::pool
[_ pool]
(.close ^HikariDataSource pool))
(defn- apply-migrations!
[pool migrations]
(with-open [conn ^AutoCloseable (open pool)]
(mg/setup! conn)
(doseq [[name steps] migrations]
(mg/migrate! conn {:name (d/name name) :steps steps}))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; API & Impl
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(def initsql
(str "SET statement_timeout = 10000;\n"
"SET idle_in_transaction_session_timeout = 30000;"))
(str "SET statement_timeout = 300000;\n"
"SET idle_in_transaction_session_timeout = 300000;"))
(defn- create-datasource-config
[cfg]
(let [dburi (:database-uri cfg)
username (:database-username cfg)
password (:database-password cfg)
config (HikariConfig.)
mfactory (PrometheusMetricsTrackerFactory. mtx/registry)]
[{:keys [metrics uri] :as cfg}]
(let [config (HikariConfig.)]
(doto config
(.setJdbcUrl (str "jdbc:" dburi))
(.setPoolName "main")
(.setJdbcUrl (str "jdbc:" uri))
(.setPoolName (d/name (:name cfg)))
(.setAutoCommit true)
(.setReadOnly false)
(.setConnectionTimeout 8000) ;; 8seg
(.setValidationTimeout 4000) ;; 4seg
(.setIdleTimeout 300000) ;; 5min
(.setMaxLifetime 900000) ;; 15min
(.setMinimumIdle 0)
(.setMaximumPoolSize 15)
(.setReadOnly (:read-only cfg))
(.setConnectionTimeout (:connection-timeout cfg))
(.setValidationTimeout (:validation-timeout cfg))
(.setIdleTimeout (:idle-timeout cfg))
(.setMaxLifetime (:max-lifetime cfg))
(.setMinimumIdle (:min-size cfg))
(.setMaximumPoolSize (:max-size cfg))
(.setConnectionInitSql initsql)
(.setMetricsTrackerFactory mfactory))
(when username (.setUsername config username))
(when password (.setPassword config password))
(.setInitializationFailTimeout -1))
;; When metrics namespace is provided
(when metrics
(->> (:registry metrics)
(PrometheusMetricsTrackerFactory.)
(.setMetricsTrackerFactory config)))
(some->> ^String (:username cfg) (.setUsername config))
(some->> ^String (:password cfg) (.setPassword config))
config))
(defn pool?
@@ -69,76 +153,124 @@
(s/def ::pool pool?)
(defn pool-closed?
(defn closed?
[pool]
(.isClosed ^com.zaxxer.hikari.HikariDataSource pool))
(.isClosed ^HikariDataSource pool))
(defn- create-pool
(defn read-only?
[pool]
(.isReadOnly ^HikariDataSource pool))
(defn create-pool
[cfg]
(let [dsc (create-datasource-config cfg)]
(jdbc-dt/read-as-instant)
(HikariDataSource. dsc)))
(declare pool)
(defn unwrap
[conn klass]
(.unwrap ^Connection conn klass))
(defstate pool
:start (create-pool cfg/config)
:stop (.close pool))
(defn lobj-manager
[conn]
(let [conn (unwrap conn org.postgresql.PGConnection)]
(.getLargeObjectAPI ^PGConnection conn)))
(defn lobj-create
[manager]
(.createLO ^LargeObjectManager manager LargeObjectManager/READWRITE))
(defn lobj-open
([manager oid]
(lobj-open manager oid {}))
([manager oid {:keys [mode] :or {mode :rw}}]
(let [mode (case mode
(:r :read) LargeObjectManager/READ
(:w :write) LargeObjectManager/WRITE
(:rw :read+write) LargeObjectManager/READWRITE)]
(.open ^LargeObjectManager manager (long oid) mode))))
(defn lobj-unlink
[manager oid]
(.unlink ^LargeObjectManager manager (long oid)))
(extend-type LargeObject
io/IOFactory
(make-reader [lobj opts]
(let [^InputStream is (.getInputStream ^LargeObject lobj)]
(io/make-reader is opts)))
(make-writer [lobj opts]
(let [^OutputStream os (.getOutputStream ^LargeObject lobj)]
(io/make-writer os opts)))
(make-input-stream [lobj opts]
(let [^InputStream is (.getInputStream ^LargeObject lobj)]
(io/make-input-stream is opts)))
(make-output-stream [lobj opts]
(let [^OutputStream os (.getOutputStream ^LargeObject lobj)]
(io/make-output-stream os opts))))
(defmacro with-atomic
[& args]
`(jdbc/with-transaction ~@args))
(defn- kebab-case [s] (str/replace s #"_" "-"))
(defn- snake-case [s] (str/replace s #"-" "_"))
(defn- as-kebab-maps
[rs opts]
(jdbc-opt/as-unqualified-modified-maps rs (assoc opts :label-fn kebab-case)))
(defn open
[]
(defn ^Connection open
[pool]
(jdbc/get-connection pool))
(defn exec!
([ds sv]
(exec! ds sv {}))
([ds sv opts]
(jdbc/execute! ds sv (assoc opts :builder-fn as-kebab-maps))))
(jdbc/execute! ds sv (assoc opts :builder-fn sql/as-kebab-maps))))
(defn exec-one!
([ds sv] (exec-one! ds sv {}))
([ds sv opts]
(jdbc/execute-one! ds sv (assoc opts :builder-fn as-kebab-maps))))
(def ^:private default-options
{:table-fn snake-case
:column-fn snake-case
:builder-fn as-kebab-maps})
(jdbc/execute-one! ds sv (assoc opts :builder-fn sql/as-kebab-maps))))
(defn insert!
[ds table params]
(jdbc-sql/insert! ds table params default-options))
([ds table params] (insert! ds table params nil))
([ds table params opts]
(exec-one! ds
(sql/insert table params opts)
(assoc opts :return-keys true))))
(defn insert-multi!
([ds table cols rows] (insert-multi! ds table cols rows nil))
([ds table cols rows opts]
(exec! ds
(sql/insert-multi table cols rows opts)
(assoc opts :return-keys true))))
(defn update!
[ds table params where]
(let [opts (assoc default-options :return-keys true)]
(jdbc-sql/update! ds table params where opts)))
([ds table params where] (update! ds table params where nil))
([ds table params where opts]
(exec-one! ds
(sql/update table params where opts)
(assoc opts :return-keys true))))
(defn delete!
[ds table params]
(let [opts (assoc default-options :return-keys true)]
(jdbc-sql/delete! ds table params opts)))
([ds table params] (delete! ds table params nil))
([ds table params opts]
(exec-one! ds
(sql/delete table params opts)
(assoc opts :return-keys true))))
(defn- is-deleted?
[{:keys [deleted-at]}]
(and (dt/instant? deleted-at)
(< (inst-ms deleted-at)
(inst-ms (dt/now)))))
(defn get-by-params
([ds table params]
(get-by-params ds table params nil))
([ds table params opts]
(let [opts (cond-> (merge default-options opts)
(:for-update opts)
(assoc :suffix "for update"))
res (exec-one! ds (jdbc-bld/for-query table params opts) opts)]
(when (or (:deleted-at res) (not res))
(ex/raise :type :not-found))
([ds table params {:keys [check-not-found] :or {check-not-found true} :as opts}]
(let [res (exec-one! ds (sql/select table params opts))]
(when (and check-not-found (or (not res) (is-deleted? res)))
(ex/raise :type :not-found
:table table
:hint "database object not found"))
res)))
(defn get-by-id
@@ -151,14 +283,14 @@
([ds table params]
(query ds table params nil))
([ds table params opts]
(let [opts (cond-> (merge default-options opts)
(:for-update opts)
(assoc :suffix "for update"))]
(exec! ds (jdbc-bld/for-query table params opts) opts))))
(exec! ds (sql/select table params opts))))
(defn pgobject?
[v]
(instance? PGobject v))
([v]
(instance? PGobject v))
([v type]
(and (instance? PGobject v)
(= type (.getType ^PGobject v)))))
(defn pginterval?
[v]
@@ -169,17 +301,39 @@
(instance? PGpoint v))
(defn pgarray?
[v]
(instance? PgArray v))
([v] (instance? PgArray v))
([v type]
(and (instance? PgArray v)
(= type (.getBaseTypeName ^PgArray v)))))
(defn pgarray-of-uuid?
[v]
(and (pgarray? v) (= "uuid" (.getBaseTypeName ^PgArray v))))
(defn decode-pgarray
([v] (into [] (.getArray ^PgArray v)))
([v in] (into in (.getArray ^PgArray v)))
([v in xf] (into in xf (.getArray ^PgArray v))))
(defn pgarray->set
[v]
(set (.getArray ^PgArray v)))
(defn pgarray->vector
[v]
(vec (.getArray ^PgArray v)))
(defn pgpoint
[p]
(PGpoint. (:x p) (:y p)))
(defn create-array
[conn type objects]
(let [^PGConnection conn (unwrap conn org.postgresql.PGConnection)]
(if (coll? objects)
(.createArrayOf conn ^String type (into-array Object objects))
(.createArrayOf conn ^String type objects))))
(defn decode-pgpoint
[^PGpoint v]
(gpt/point (.-x v) (.-y v)))
@@ -212,7 +366,7 @@
(pginterval data)
(dt/duration? data)
(->> (/ (.toMillis data) 1000.0)
(->> (/ (.toMillis ^java.time.Duration data) 1000.0)
(format "%s seconds")
(pginterval))
@@ -225,7 +379,7 @@
val (.getValue o)]
(if (or (= typ "json")
(= typ "jsonb"))
(json/read-str val :key-fn keyword)
(json/read val)
val)))
(defn decode-transit-pgobject
@@ -237,12 +391,24 @@
(t/decode-str val)
val)))
(defn inet
[ip-addr]
(doto (org.postgresql.util.PGobject.)
(.setType "inet")
(.setValue (str ip-addr))))
(defn decode-inet
[^PGobject o]
(if (= "inet" (.getType o))
(.getValue o)
nil))
(defn tjson
"Encode as transit json."
[data]
(doto (org.postgresql.util.PGobject.)
(.setType "jsonb")
(.setValue (t/encode-verbose-str data))))
(.setValue (t/encode-str data {:type :json-verbose}))))
(defn json
"Encode as plain json."
@@ -251,18 +417,23 @@
(.setType "jsonb")
(.setValue (json/write-str data))))
(defn pgarray->set
[v]
(set (.getArray ^PgArray v)))
;; --- Locks
(defn pgarray->vector
[v]
(vec (.getArray ^PgArray v)))
(defn- xact-check-param
[n]
(cond
(uuid? n) (uuid/get-word-high n)
(int? n) n
:else (throw (IllegalArgumentException. "uuid or number allowed"))))
;; Instrumentation
(defn xact-lock!
[conn n]
(let [n (xact-check-param n)]
(exec-one! conn ["select pg_advisory_xact_lock(?::bigint) as lock" n])
true))
(mtx/instrument-with-counter!
{:var [#'jdbc/execute-one!
#'jdbc/execute!]
:id "database__query_counter"
:help "An absolute counter of database queries."})
(defn xact-try-lock!
[conn n]
(let [n (xact-check-param n)
row (exec-one! conn ["select pg_try_advisory_xact_lock(?::bigint) as lock" n])]
(:lock row)))

View File

@@ -0,0 +1,62 @@
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) UXBOX Labs SL
(ns app.db.sql
(:refer-clojure :exclude [update])
(:require
[clojure.string :as str]
[next.jdbc.optional :as jdbc-opt]
[next.jdbc.sql.builder :as sql]))
(defn kebab-case [s] (str/replace s #"_" "-"))
(defn snake-case [s] (str/replace s #"-" "_"))
(def default-opts
{:table-fn snake-case
:column-fn snake-case})
(defn as-kebab-maps
[rs opts]
(jdbc-opt/as-unqualified-modified-maps rs (assoc opts :label-fn kebab-case)))
(defn insert
([table key-map]
(insert table key-map nil))
([table key-map opts]
(let [opts (merge default-opts opts)
opts (cond-> opts
(:on-conflict-do-nothing opts)
(assoc :suffix "ON CONFLICT DO NOTHING"))]
(sql/for-insert table key-map opts))))
(defn insert-multi
[table cols rows opts]
(let [opts (merge default-opts opts)]
(sql/for-insert-multi table cols rows opts)))
(defn select
([table where-params]
(select table where-params nil))
([table where-params opts]
(let [opts (merge default-opts opts)
opts (cond-> opts
(:for-update opts) (assoc :suffix "FOR UPDATE")
(:for-key-share opts) (assoc :suffix "FOR KEY SHARE"))]
(sql/for-query table where-params opts))))
(defn update
([table key-map where-params]
(update table key-map where-params nil))
([table key-map where-params opts]
(let [opts (merge default-opts opts)]
(sql/for-update table key-map where-params opts))))
(defn delete
([table where-params]
(delete table where-params nil))
([table where-params opts]
(let [opts (merge default-opts opts)]
(sql/for-delete table where-params opts))))

View File

@@ -2,28 +2,22 @@
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; This Source Code Form is "Incompatible With Secondary Licenses", as
;; defined by the Mozilla Public License, v. 2.0.
;;
;; Copyright (c) 2020 UXBOX Labs SL
;; Copyright (c) UXBOX Labs SL
(ns app.emails
"Main api for send emails."
(:require
[app.common.logging :as l]
[app.common.spec :as us]
[app.config :as cfg]
[app.tasks :as tasks]
[app.config :as cf]
[app.db :as db]
[app.db.sql :as sql]
[app.util.emails :as emails]
[clojure.spec.alpha :as s]))
[app.worker :as wrk]
[clojure.spec.alpha :as s]
[integrant.core :as ig]))
;; --- Defaults
(defn default-context
[]
{:assets-uri (:assets-uri cfg/config)
:public-uri (:public-uri cfg/config)})
;; --- Public API
;; --- PUBLIC API
(defn render
[email-factory context]
@@ -31,17 +25,78 @@
(defn send!
"Schedule the email for sending."
[conn email-factory context]
(us/verify fn? email-factory)
(us/verify map? context)
(let [email (email-factory context)]
(tasks/submit! conn {:name "sendmail"
:delay 0
:max-retries 1
:priority 200
:props email})))
[{:keys [::conn ::factory] :as context}]
(us/verify fn? factory)
(us/verify some? conn)
(let [email (factory context)]
(wrk/submit! (assoc email
::wrk/task :sendmail
::wrk/delay 0
::wrk/max-retries 1
::wrk/priority 200
::wrk/conn conn))))
;; --- Emails
;; --- BOUNCE/COMPLAINS HANDLING
(def sql:profile-complaint-report
"select (select count(*)
from profile_complaint_report
where type = 'complaint'
and profile_id = ?
and created_at > now() - ?::interval) as complaints,
(select count(*)
from profile_complaint_report
where type = 'bounce'
and profile_id = ?
and created_at > now() - ?::interval) as bounces;")
(defn allow-send-emails?
[conn profile]
(when-not (:is-muted profile false)
(let [complaint-threshold (cf/get :profile-complaint-threshold)
complaint-max-age (cf/get :profile-complaint-max-age)
bounce-threshold (cf/get :profile-bounce-threshold)
bounce-max-age (cf/get :profile-bounce-max-age)
{:keys [complaints bounces] :as result}
(db/exec-one! conn [sql:profile-complaint-report
(:id profile)
(db/interval complaint-max-age)
(:id profile)
(db/interval bounce-max-age)])]
(and (< (or complaints 0) complaint-threshold)
(< (or bounces 0) bounce-threshold)))))
(defn has-complaint-reports?
([conn email] (has-complaint-reports? conn email nil))
([conn email {:keys [threshold] :or {threshold 1}}]
(let [reports (db/exec! conn (sql/select :global-complaint-report
{:email email :type "complaint"}
{:limit 10}))]
(>= (count reports) threshold))))
(defn has-bounce-reports?
([conn email] (has-bounce-reports? conn email nil))
([conn email {:keys [threshold] :or {threshold 1}}]
(let [reports (db/exec! conn (sql/select :global-complaint-report
{:email email :type "bounce"}
{:limit 10}))]
(>= (count reports) threshold))))
;; --- EMAIL FACTORIES
(s/def ::subject ::us/string)
(s/def ::content ::us/string)
(s/def ::feedback
(s/keys :req-un [::subject ::content]))
(def feedback
"A profile feedback email."
(emails/template-factory ::feedback))
(s/def ::name ::us/string)
(s/def ::register
@@ -49,7 +104,7 @@
(def register
"A new profile registration welcome email."
(emails/template-factory ::register default-context))
(emails/template-factory ::register))
(s/def ::token ::us/string)
(s/def ::password-recovery
@@ -57,7 +112,7 @@
(def password-recovery
"A password recovery notification email."
(emails/template-factory ::password-recovery default-context))
(emails/template-factory ::password-recovery))
(s/def ::pending-email ::us/email)
(s/def ::change-email
@@ -65,17 +120,64 @@
(def change-email
"Password change confirmation email"
(emails/template-factory ::change-email default-context))
(emails/template-factory ::change-email))
(s/def :internal.emails.invite-to-team/invited-by ::us/string)
(s/def :internal.emails.invite-to-team/team ::us/string)
(s/def :internal.emails.invite-to-team/token ::us/string)
(s/def ::invite-to-team
(s/keys :keys [:internal.emails.invite-to-team/invited-by
:internal.emails.invite-to-team/token
:internal.emails.invite-to-team/team]))
(s/keys :req-un [:internal.emails.invite-to-team/invited-by
:internal.emails.invite-to-team/token
:internal.emails.invite-to-team/team]))
(def invite-to-team
"Teams member invitation email."
(emails/template-factory ::invite-to-team default-context))
(emails/template-factory ::invite-to-team))
;; --- SENDMAIL TASK
(declare send-console!)
(s/def ::username ::cf/smtp-username)
(s/def ::password ::cf/smtp-password)
(s/def ::tls ::cf/smtp-tls)
(s/def ::ssl ::cf/smtp-ssl)
(s/def ::host ::cf/smtp-host)
(s/def ::port ::cf/smtp-port)
(s/def ::default-reply-to ::cf/smtp-default-reply-to)
(s/def ::default-from ::cf/smtp-default-from)
(defmethod ig/pre-init-spec ::sendmail-handler [_]
(s/keys :opt-un [::username
::password
::tls
::ssl
::host
::port
::default-from
::default-reply-to]))
(defmethod ig/init-key ::sendmail-handler
[_ cfg]
(fn [{:keys [props] :as task}]
(let [enabled? (or (contains? cf/flags :smtp)
(cf/get :smtp-enabled)
(:enabled task))]
(if enabled?
(emails/send! cfg props)
(send-console! cfg props)))))
(defn- send-console!
[cfg email]
(let [baos (java.io.ByteArrayOutputStream.)
mesg (emails/smtp-message cfg email)]
(.writeTo mesg baos)
(let [out (with-out-str
(println "email console dump:")
(println "******** start email" (:id email) "**********")
(println (.toString baos))
(println "******** end email "(:id email) "**********"))]
(l/info :email out))))

View File

@@ -1,83 +0,0 @@
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; This Source Code Form is "Incompatible With Secondary Licenses", as
;; defined by the Mozilla Public License, v. 2.0.
;;
;; Copyright (c) 2020 Andrey Antukh <niwi@niwi.nz>
(ns app.error-reporter
"A mattermost integration for error reporting."
(:require
[app.common.exceptions :as ex]
[app.common.spec :as us]
[app.config :as cfg]
[app.db :as db]
[app.tasks :as tasks]
[app.util.async :as aa]
[app.worker :as wrk]
[app.util.http :as http]
[clojure.core.async :as a]
[clojure.data.json :as json]
[clojure.spec.alpha :as s]
[clojure.tools.logging :as log]
[cuerdas.core :as str]
[mount.core :as mount :refer [defstate]]
[promesa.exec :as px]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Public API
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defonce enqueue identity)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Implementation
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defn- send-to-mattermost!
[log-event]
(try
(let [text (str/fmt "Unhandled exception: `host='%s'`, `version=%s`.\n@channel ⇊\n```%s\n```"
(:host cfg/config)
(:full @cfg/version)
(str log-event))
rsp (http/send! {:uri (:error-reporter-webhook cfg/config)
:method :post
:headers {"content-type" "application/json"}
:body (json/write-str {:text text})})]
(when (not= (:status rsp) 200)
(log/warnf "Error reporting webhook replying with unexpected status: %s\n%s"
(:status rsp)
(pr-str rsp))))
(catch Exception e
(log/warnf e "Unexpected exception on error reporter."))))
(defn- send!
[val]
(aa/thread-call wrk/executor (partial send-to-mattermost! val)))
(defn- start
[]
(let [qch (a/chan (a/sliding-buffer 128))]
(log/info "Starting error reporter loop.")
;; Only enable when a valid URL is provided.
(when (:error-reporter-webhook cfg/config)
(alter-var-root #'enqueue (constantly #(a/>!! qch %)))
(a/go-loop []
(let [val (a/<! qch)]
(if (nil? val)
(do
(log/info "Closing error reporting loop.")
(alter-var-root #'enqueue (constantly identity)))
(do
(a/<! (send! val))
(recur))))))
qch))
(defstate reporter
:start (start)
:stop (a/close! reporter))

View File

@@ -2,79 +2,183 @@
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; This Source Code Form is "Incompatible With Secondary Licenses", as
;; defined by the Mozilla Public License, v. 2.0.
;;
;; Copyright (c) 2020 UXBOX Labs SL
;; Copyright (c) UXBOX Labs SL
(ns app.http
(:require
[app.config :as cfg]
[app.http.auth :as auth]
[app.http.auth.gitlab :as gitlab]
[app.http.auth.google :as google]
[app.http.auth.ldap :as ldap]
[app.common.data :as d]
[app.common.exceptions :as ex]
[app.common.logging :as l]
[app.common.spec :as us]
[app.config :as cf]
[app.http.doc :as doc]
[app.http.errors :as errors]
[app.http.handlers :as handlers]
[app.http.middleware :as middleware]
[app.http.session :as session]
[app.http.ws :as ws]
[app.metrics :as mtx]
[clojure.tools.logging :as log]
[mount.core :as mount :refer [defstate]]
[reitit.ring :as rring]
[ring.adapter.jetty9 :as jetty]))
[clojure.spec.alpha :as s]
[integrant.core :as ig]
[reitit.ring :as rr]
[yetti.adapter :as yt])
(:import
org.eclipse.jetty.server.Server
org.eclipse.jetty.server.handler.StatisticsHandler))
(defn- create-router
[]
(rring/router
[["/metrics" {:get mtx/dump}]
["/api" {:middleware [[middleware/format-response-body]
[middleware/parse-request-body]
(declare wrap-router)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; HTTP SERVER
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(s/def ::handler fn?)
(s/def ::router some?)
(s/def ::port ::us/integer)
(s/def ::host ::us/string)
(s/def ::name ::us/string)
(s/def ::max-threads ::cf/http-server-max-threads)
(s/def ::min-threads ::cf/http-server-min-threads)
(defmethod ig/prep-key ::server
[_ cfg]
(merge {:name "http"
:min-threads 4
:max-threads 60
:port 6060
:host "0.0.0.0"}
(d/without-nils cfg)))
(defmethod ig/pre-init-spec ::server [_]
(s/keys :req-un [::port ::host ::name ::min-threads ::max-threads]
:opt-un [::mtx/metrics ::router ::handler]))
(defn- instrument-metrics
[^Server server metrics]
(let [stats (doto (StatisticsHandler.)
(.setHandler (.getHandler server)))]
(.setHandler server stats)
(mtx/instrument-jetty! (:registry metrics) stats)
server))
(defmethod ig/init-key ::server
[_ {:keys [handler router port name metrics host] :as opts}]
(l/info :hint "starting http server"
:port port :host host :name name
:min-threads (:min-threads opts)
:max-threads (:max-threads opts))
(let [options {:http/port port
:http/host host
:thread-pool/max-threads (:max-threads opts)
:thread-pool/min-threads (:min-threads opts)
:ring/async true}
handler (cond
(fn? handler) handler
(some? router) (wrap-router router)
:else (ex/raise :type :internal
:code :invalid-argument
:hint "Missing `handler` or `router` option."))
server (-> (yt/server handler (d/without-nils options))
(cond-> metrics (instrument-metrics metrics)))]
(assoc opts :server (yt/start! server))))
(defmethod ig/halt-key! ::server
[_ {:keys [server name port] :as opts}]
(l/info :msg "stoping http server" :name name :port port)
(yt/stop! server))
(defn- wrap-router
[router]
(let [default (rr/routes
(rr/create-resource-handler {:path "/"})
(rr/create-default-handler))
options {:middleware [middleware/wrap-server-timing]
:inject-match? false
:inject-router? false}
handler (rr/ring-handler router default options)]
(fn [request respond _]
(handler request respond (fn [cause]
(l/error :hint "unexpected error processing request"
::l/context (errors/get-error-context request cause)
:query-string (:query-string request)
:cause cause)
(respond {:status 500 :body "internal server error"}))))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; HTTP ROUTER
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(s/def ::rpc map?)
(s/def ::session map?)
(s/def ::oauth map?)
(s/def ::storage map?)
(s/def ::assets map?)
(s/def ::feedback fn?)
(s/def ::ws fn?)
(s/def ::audit-http-handler fn?)
(s/def ::debug map?)
(defmethod ig/pre-init-spec ::router [_]
(s/keys :req-un [::rpc ::session ::mtx/metrics ::ws
::oauth ::storage ::assets ::feedback
::debug ::audit-http-handler]))
(defmethod ig/init-key ::router
[_ {:keys [ws session rpc oauth metrics assets feedback debug] :as cfg}]
(rr/router
[["/metrics" {:get (:handler metrics)}]
["/assets" {:middleware [[middleware/format-response-body]
[middleware/errors errors/handle]
[middleware/cookies]
(:middleware session)]}
["/by-id/:id" {:get (:objects-handler assets)}]
["/by-file-media-id/:id" {:get (:file-objects-handler assets)}]
["/by-file-media-id/:id/thumbnail" {:get (:file-thumbnails-handler assets)}]]
["/dbg" {:middleware [[middleware/multipart-params]
[middleware/params]
[middleware/keyword-params]
[middleware/format-response-body]
[middleware/errors errors/handle]
[middleware/cookies]
[(:middleware session)]]}
["" {:get (:index debug)}]
["/error-by-id/:id" {:get (:retrieve-error debug)}]
["/error/:id" {:get (:retrieve-error debug)}]
["/error" {:get (:retrieve-error-list debug)}]
["/file/data" {:get (:retrieve-file-data debug)
:post (:upload-file-data debug)}]
["/file/changes" {:get (:retrieve-file-changes debug)}]]
["/webhooks"
["/sns" {:post (:sns-webhook cfg)}]]
["/ws/notifications"
{:middleware [[middleware/params]
[middleware/keyword-params]
[middleware/format-response-body]
[middleware/errors errors/handle]
[middleware/cookies]
[(:middleware session)]]
:get ws}]
["/api" {:middleware [[middleware/cors]
[middleware/params]
[middleware/multipart-params]
[middleware/keyword-params]
[middleware/format-response-body]
[middleware/parse-request-body]
[middleware/errors errors/handle]
[middleware/cookies]]}
["/oauth"
["/google" {:post google/auth}]
["/google/callback" {:get google/callback}]
["/gitlab" {:post gitlab/auth}]
["/gitlab/callback" {:get gitlab/callback}]]
["/health" {:get (:health-check debug)}]
["/_doc" {:get (doc/handler rpc)}]
["/feedback" {:middleware [(:middleware session)]
:post feedback}]
["/auth/oauth/:provider" {:post (:handler oauth)}]
["/auth/oauth/:provider/callback" {:get (:callback-handler oauth)}]
["/echo" {:get handlers/echo-handler
:post handlers/echo-handler}]
["/audit/events" {:middleware [(:middleware session)]
:post (:audit-http-handler cfg)}]
["/login" {:handler auth/login-handler
:method :post}]
["/logout" {:handler auth/logout-handler
:method :post}]
["/login-ldap" {:handler ldap/auth
:method :post}]
["/w" {:middleware [session/middleware]}
["/query/:type" {:get handlers/query-handler}]
["/mutation/:type" {:post handlers/mutation-handler}]]]]))
(defn start-server
[]
(let [wsockets {"/ws/notifications" ws/handler}
options {:port (:http-server-port cfg/config)
:h2c? true
:join? false
:allow-null-path-info true
:websockets wsockets}
handler (rring/ring-handler
(create-router)
(constantly {:status 404, :body ""})
{:middleware [[middleware/development-resources]
[middleware/development-cors]
[middleware/metrics]]})]
(log/infof "Http server listening on http://localhost:%s/"
(:http-server-port cfg/config))
(jetty/run-jetty handler options)))
(defstate server
:start (start-server)
:stop (.stop server))
["/rpc" {:middleware [(:middleware session)]}
["/query/:type" {:get (:query-handler rpc)
:post (:query-handler rpc)}]
["/mutation/:type" {:post (:mutation-handler rpc)}]]]]))

View File

@@ -0,0 +1,128 @@
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) UXBOX Labs SL
(ns app.http.assets
"Assets related handlers."
(:require
[app.common.exceptions :as ex]
[app.common.spec :as us]
[app.common.uri :as u]
[app.db :as db]
[app.metrics :as mtx]
[app.storage :as sto]
[app.util.async :as async]
[app.util.time :as dt]
[app.worker :as wrk]
[clojure.spec.alpha :as s]
[integrant.core :as ig]
[promesa.core :as p]))
(def ^:private cache-max-age
(dt/duration {:hours 24}))
(def ^:private signature-max-age
(dt/duration {:hours 24 :minutes 15}))
(defn coerce-id
[id]
(let [res (us/uuid-conformer id)]
(when-not (uuid? res)
(ex/raise :type :not-found
:hint "object not found"))
res))
(defn- get-file-media-object
[{:keys [pool] :as storage} id]
(let [id (coerce-id id)
mobj (db/exec-one! pool ["select * from file_media_object where id=?" id])]
(when-not mobj
(ex/raise :type :not-found
:hint "object does not found"))
mobj))
(defn- serve-object
[{:keys [storage] :as cfg} obj]
(let [mdata (meta obj)
backend (sto/resolve-backend storage (:backend obj))]
(case (:type backend)
:db
{:status 200
:headers {"content-type" (:content-type mdata)
"cache-control" (str "max-age=" (inst-ms cache-max-age))}
:body (sto/get-object-bytes storage obj)}
:s3
(let [{:keys [host port] :as url} (sto/get-object-url storage obj {:max-age signature-max-age})]
{:status 307
:headers {"location" (str url)
"x-host" (cond-> host port (str ":" port))
"cache-control" (str "max-age=" (inst-ms cache-max-age))}
:body ""})
:fs
(let [purl (u/uri (:assets-path cfg))
purl (u/join purl (sto/object->relative-path obj))]
{:status 204
:headers {"x-accel-redirect" (:path purl)
"content-type" (:content-type mdata)
"cache-control" (str "max-age=" (inst-ms cache-max-age))}
:body ""}))))
(defn- generic-handler
[{:keys [storage executor] :as cfg} request kf]
(async/with-dispatch executor
(let [id (get-in request [:path-params :id])
mobj (get-file-media-object storage id)
obj (sto/get-object storage (kf mobj))]
(if obj
(serve-object cfg obj)
{:status 404 :body ""}))))
(defn objects-handler
[{:keys [storage executor] :as cfg} request respond raise]
(-> (async/with-dispatch executor
(let [id (get-in request [:path-params :id])
id (coerce-id id)
obj (sto/get-object storage id)]
(if obj
(serve-object cfg obj)
{:status 404 :body ""})))
(p/then respond)
(p/catch raise)))
(defn file-objects-handler
[cfg request respond raise]
(-> (generic-handler cfg request :media-id)
(p/then respond)
(p/catch raise)))
(defn file-thumbnails-handler
[cfg request respond raise]
(-> (generic-handler cfg request #(or (:thumbnail-id %) (:media-id %)))
(p/then respond)
(p/catch raise)))
;; --- Initialization
(s/def ::storage some?)
(s/def ::assets-path ::us/string)
(s/def ::cache-max-age ::dt/duration)
(s/def ::signature-max-age ::dt/duration)
(defmethod ig/pre-init-spec ::handlers [_]
(s/keys :req-un [::storage
::wrk/executor
::mtx/metrics
::assets-path
::cache-max-age
::signature-max-age]))
(defmethod ig/init-key ::handlers
[_ cfg]
{:objects-handler (partial objects-handler cfg)
:file-objects-handler (partial file-objects-handler cfg)
:file-thumbnails-handler (partial file-thumbnails-handler cfg)})

View File

@@ -1,31 +0,0 @@
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; This Source Code Form is "Incompatible With Secondary Licenses", as
;; defined by the Mozilla Public License, v. 2.0.
;;
;; Copyright (c) 2020 UXBOX Labs SL
(ns app.http.auth
(:require
[app.http.session :as session]
[app.services.mutations :as sm]))
(defn login-handler
[req]
(let [data (:body-params req)
uagent (get-in req [:headers "user-agent"])
profile (sm/handle (assoc data ::sm/type :login))
id (session/create (:id profile) uagent)]
{:status 200
:cookies (session/cookies id)
:body profile}))
(defn logout-handler
[req]
(some-> (session/extract-auth-token req)
(session/delete))
{:status 200
:cookies (session/cookies "" {:max-age -1})
:body ""})

View File

@@ -1,147 +0,0 @@
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; This Source Code Form is "Incompatible With Secondary Licenses", as
;; defined by the Mozilla Public License, v. 2.0.
;;
;; Copyright (c) 2020 UXBOX Labs SL
(ns app.http.auth.gitlab
(:require
[app.common.exceptions :as ex]
[app.config :as cfg]
[app.http.session :as session]
[app.services.mutations :as sm]
[app.services.tokens :as tokens]
[app.util.http :as http]
[app.util.time :as dt]
[clojure.data.json :as json]
[clojure.tools.logging :as log]
[lambdaisland.uri :as uri]))
(def default-base-gitlab-uri "https://gitlab.com")
(def scope "read_user")
(defn- build-redirect-url
[]
(let [public (uri/uri (:public-uri cfg/config))]
(str (assoc public :path "/api/oauth/gitlab/callback"))))
(defn- build-oauth-uri
[]
(let [base-uri (uri/uri (:gitlab-base-uri cfg/config default-base-gitlab-uri))]
(assoc base-uri :path "/oauth/authorize")))
(defn- build-token-url
[]
(let [base-uri (uri/uri (:gitlab-base-uri cfg/config default-base-gitlab-uri))]
(str (assoc base-uri :path "/oauth/token"))))
(defn- build-user-info-url
[]
(let [base-uri (uri/uri (:gitlab-base-uri cfg/config default-base-gitlab-uri))]
(str (assoc base-uri :path "/api/v4/user"))))
(defn- get-access-token
[code]
(let [params {:client_id (:gitlab-client-id cfg/config)
:client_secret (:gitlab-client-secret cfg/config)
:code code
:grant_type "authorization_code"
:redirect_uri (build-redirect-url)}
req {:method :post
:headers {"content-type" "application/x-www-form-urlencoded"}
:uri (build-token-url)
:body (uri/map->query-string params)}
res (http/send! req)]
(when (not= 200 (:status res))
(ex/raise :type :internal
:code :invalid-response-from-gitlab
:context {:status (:status res)
:body (:body res)}))
(try
(let [data (json/read-str (:body res))]
(get data "access_token"))
(catch Throwable e
(log/error "unexpected error on parsing response body from gitlab access token request" e)
nil))))
(defn- get-user-info
[token]
(let [req {:uri (build-user-info-url)
:headers {"Authorization" (str "Bearer " token)}
:method :get}
res (http/send! req)]
(when (not= 200 (:status res))
(ex/raise :type :internal
:code :invalid-response-from-gitlab
:context {:status (:status res)
:body (:body res)}))
(try
(let [data (json/read-str (:body res))]
;; (clojure.pprint/pprint data)
{:email (get data "email")
:fullname (get data "name")})
(catch Throwable e
(log/error "unexpected error on parsing response body from gitlab access token request" e)
nil))))
(defn auth
[_req]
(let [token (tokens/generate
{:iss :gitlab-oauth
:exp (dt/in-future "15m")})
params {:client_id (:gitlab-client-id cfg/config)
:redirect_uri (build-redirect-url)
:response_type "code"
:state token
:scope scope}
query (uri/map->query-string params)
uri (-> (build-oauth-uri)
(assoc :query query))]
{:status 200
:body {:redirect-uri (str uri)}}))
(defn callback
[req]
(let [token (get-in req [:params :state])
_ (tokens/verify token {:iss :gitlab-oauth})
info (some-> (get-in req [:params :code])
(get-access-token)
(get-user-info))]
(when-not info
(ex/raise :type :authentication
:code :unable-to-authenticate-with-gitlab))
(let [profile (sm/handle {::sm/type :login-or-register
:email (:email info)
:fullname (:fullname info)})
uagent (get-in req [:headers "user-agent"])
token (tokens/generate
{:iss :auth
:exp (dt/in-future "15m")
:profile-id (:id profile)})
uri (-> (uri/uri (:public-uri cfg/config))
(assoc :path "/#/auth/verify-token")
(assoc :query (uri/map->query-string {:token token})))
sid (session/create (:id profile) uagent)]
{:status 302
:headers {"location" (str uri)}
:cookies (session/cookies sid)
:body ""})))

View File

@@ -1,131 +0,0 @@
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; This Source Code Form is "Incompatible With Secondary Licenses", as
;; defined by the Mozilla Public License, v. 2.0.
;;
;; Copyright (c) 2020 UXBOX Labs SL
(ns app.http.auth.google
(:require
[app.common.exceptions :as ex]
[app.config :as cfg]
[app.http.session :as session]
[app.services.mutations :as sm]
[app.services.tokens :as tokens]
[app.util.http :as http]
[app.util.time :as dt]
[clojure.data.json :as json]
[clojure.tools.logging :as log]
[lambdaisland.uri :as uri]))
(def base-goauth-uri "https://accounts.google.com/o/oauth2/v2/auth")
(def scope
(str "email profile "
"https://www.googleapis.com/auth/userinfo.email "
"https://www.googleapis.com/auth/userinfo.profile "
"openid"))
(defn- build-redirect-url
[]
(let [public (uri/uri (:public-uri cfg/config))]
(str (assoc public :path "/api/oauth/google/callback"))))
(defn- get-access-token
[code]
(let [params {:code code
:client_id (:google-client-id cfg/config)
:client_secret (:google-client-secret cfg/config)
:redirect_uri (build-redirect-url)
:grant_type "authorization_code"}
req {:method :post
:headers {"content-type" "application/x-www-form-urlencoded"}
:uri "https://oauth2.googleapis.com/token"
:body (uri/map->query-string params)}
res (http/send! req)]
(when (not= 200 (:status res))
(ex/raise :type :internal
:code :invalid-response-from-google
:context {:status (:status res)
:body (:body res)}))
(try
(let [data (json/read-str (:body res))]
(get data "access_token"))
(catch Throwable e
(log/error "unexpected error on parsing response body from google access token request" e)
nil))))
(defn- get-user-info
[token]
(let [req {:uri "https://openidconnect.googleapis.com/v1/userinfo"
:headers {"Authorization" (str "Bearer " token)}
:method :get}
res (http/send! req)]
(when (not= 200 (:status res))
(ex/raise :type :internal
:code :invalid-response-from-google
:context {:status (:status res)
:body (:body res)}))
(try
(let [data (json/read-str (:body res))]
;; (clojure.pprint/pprint data)
{:email (get data "email")
:fullname (get data "name")})
(catch Throwable e
(log/error "unexpected error on parsing response body from google access token request" e)
nil))))
(defn auth
[_req]
(let [token (tokens/generate {:iss :google-oauth :exp (dt/in-future "15m")})
params {:scope scope
:access_type "offline"
:include_granted_scopes true
:state token
:response_type "code"
:redirect_uri (build-redirect-url)
:client_id (:google-client-id cfg/config)}
query (uri/map->query-string params)
uri (-> (uri/uri base-goauth-uri)
(assoc :query query))]
{:status 200
:body {:redirect-uri (str uri)}}))
(defn callback
[req]
(let [token (get-in req [:params :state])
_ (tokens/verify token {:iss :google-oauth})
info (some-> (get-in req [:params :code])
(get-access-token)
(get-user-info))]
(when-not info
(ex/raise :type :authentication
:code :unable-to-authenticate-with-google))
(let [profile (sm/handle {::sm/type :login-or-register
:email (:email info)
:fullname (:fullname info)})
uagent (get-in req [:headers "user-agent"])
token (tokens/generate
{:iss :auth
:exp (dt/in-future "15m")
:profile-id (:id profile)})
uri (-> (uri/uri (:public-uri cfg/config))
(assoc :path "/#/auth/verify-token")
(assoc :query (uri/map->query-string {:token token})))
sid (session/create (:id profile) uagent)]
{:status 302
:headers {"location" (str uri)}
:cookies (session/cookies sid)
:body ""})))

View File

@@ -1,80 +0,0 @@
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; This Source Code Form is "Incompatible With Secondary Licenses", as
;; defined by the Mozilla Public License, v. 2.0.
;;
;; Copyright (c) 2020 UXBOX Labs SL
(ns app.http.auth.ldap
(:require
[app.common.exceptions :as ex]
[app.config :as cfg]
[app.http.session :as session]
[app.services.mutations :as sm]
[clj-ldap.client :as client]
[clojure.set :as set]
[clojure.string]
[clojure.tools.logging :as log]
[mount.core :refer [defstate]]))
(defn replace-several [s & {:as replacements}]
(reduce-kv clojure.string/replace s replacements))
(declare *ldap-pool)
(defstate *ldap-pool
:start (delay
(try
(client/connect (merge {:host {:address (:ldap-auth-host cfg/config)
:port (:ldap-auth-port cfg/config)}}
(-> cfg/config
(select-keys [:ldap-auth-ssl
:ldap-auth-starttls
:ldap-bind-dn
:ldap-bind-password])
(set/rename-keys {:ldap-auth-ssl :ssl?
:ldap-auth-starttls :startTLS?
:ldap-bind-dn :bind-dn
:ldap-bind-password :password}))))
(catch Exception e
(log/errorf e "Cannot connect to LDAP %s:%s"
(:ldap-auth-host cfg/config) (:ldap-auth-port cfg/config)))))
:stop (when (realized? *ldap-pool)
(some-> *ldap-pool deref (.close))))
(defn- auth-with-ldap [username password]
(when-some [conn (some-> *ldap-pool deref)]
(let [user-search-query (replace-several (:ldap-auth-user-query cfg/config)
"$username" username)
user-attributes (-> cfg/config
(select-keys [:ldap-auth-username-attribute
:ldap-auth-email-attribute
:ldap-auth-fullname-attribute
:ldap-auth-avatar-attribute])
vals)]
(when-some [user-entry (-> conn
(client/search (:ldap-auth-base-dn cfg/config)
{:filter user-search-query
:sizelimit 1
:attributes user-attributes})
(first))]
(when-not (client/bind? conn (:dn user-entry) password)
(ex/raise :type :authentication
:code :wrong-credentials))
(set/rename-keys user-entry {(keyword (:ldap-auth-avatar-attribute cfg/config)) :photo
(keyword (:ldap-auth-fullname-attribute cfg/config)) :fullname
(keyword (:ldap-auth-email-attribute cfg/config)) :email})))))
(defn auth [req]
(let [data (:body-params req)
uagent (get-in req [:headers "user-agent"])]
(when-some [info (auth-with-ldap (:email data) (:password data))]
(let [profile (sm/handle {::sm/type :login-or-register
:email (:email info)
:fullname (:fullname info)})
sid (session/create (:id profile) uagent)]
{:status 200
:cookies (session/cookies sid)
:body profile}))))

View File

@@ -0,0 +1,201 @@
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) UXBOX Labs SL
(ns app.http.awsns
"AWS SNS webhook handler for bounces."
(:require
[app.common.exceptions :as ex]
[app.common.logging :as l]
[app.db :as db]
[app.db.sql :as sql]
[app.util.http :as http]
[clojure.spec.alpha :as s]
[cuerdas.core :as str]
[integrant.core :as ig]
[jsonista.core :as j]))
(declare parse-json)
(declare parse-notification)
(declare process-report)
(defmethod ig/pre-init-spec ::handler [_]
(s/keys :req-un [::db/pool]))
(defmethod ig/init-key ::handler
[_ cfg]
(fn [request respond _]
(try
(let [body (parse-json (slurp (:body request)))
mtype (get body "Type")]
(cond
(= mtype "SubscriptionConfirmation")
(let [surl (get body "SubscribeURL")
stopic (get body "TopicArn")]
(l/info :action "subscription received" :topic stopic :url surl)
(http/send! {:uri surl :method :post :timeout 10000}))
(= mtype "Notification")
(when-let [message (parse-json (get body "Message"))]
(let [notification (parse-notification cfg message)]
(process-report cfg notification)))
:else
(l/warn :hint "unexpected data received"
:report (pr-str body))))
(catch Throwable cause
(l/error :hint "unexpected exception on awsns handler"
:cause cause)))
(respond {:status 200 :body ""})))
(defn- parse-bounce
[data]
{:type "bounce"
:kind (str/lower (get data "bounceType"))
:category (str/lower (get data "bounceSubType"))
:feedback-id (get data "feedbackId")
:timestamp (get data "timestamp")
:recipients (->> (get data "bouncedRecipients")
(mapv (fn [item]
{:email (str/lower (get item "emailAddress"))
:status (get item "status")
:action (get item "action")
:dcode (get item "diagnosticCode")})))})
(defn- parse-complaint
[data]
{:type "complaint"
:user-agent (get data "userAgent")
:kind (get data "complaintFeedbackType")
:category (get data "complaintSubType")
:timestamp (get data "arrivalDate")
:feedback-id (get data "feedbackId")
:recipients (->> (get data "complainedRecipients")
(mapv #(get % "emailAddress"))
(mapv str/lower))})
(defn- extract-headers
[mail]
(reduce (fn [acc item]
(let [key (get item "name")
val (get item "value")]
(assoc acc (str/lower key) val)))
{}
(get mail "headers")))
(defn- extract-identity
[{:keys [tokens] :as cfg} headers]
(let [tdata (get headers "x-penpot-data")]
(when-not (str/empty? tdata)
(let [result (tokens :verify {:token tdata :iss :profile-identity})]
(:profile-id result)))))
(defn- parse-notification
[cfg message]
(let [type (get message "notificationType")
data (case type
"Bounce" (parse-bounce (get message "bounce"))
"Complaint" (parse-complaint (get message "complaint"))
{:type (keyword (str/lower type))
:message message})]
(when data
(let [mail (get message "mail")]
(when-not mail
(ex/raise :type :internal
:code :incomplete-notification
:hint "no email data received, please enable full headers report"))
(let [headers (extract-headers mail)
mail {:destination (get mail "destination")
:source (get mail "source")
:timestamp (get mail "timestamp")
:subject (get-in mail ["commonHeaders" "subject"])
:headers headers}]
(assoc data
:mail mail
:profile-id (extract-identity cfg headers)))))))
(defn- parse-json
[v]
(ex/ignoring
(j/read-value v)))
(defn- register-bounce-for-profile
[{:keys [pool]} {:keys [type kind profile-id] :as report}]
(when (= kind "permanent")
(db/with-atomic [conn pool]
(db/insert! conn :profile-complaint-report
{:profile-id profile-id
:type (name type)
:content (db/tjson report)})
;; TODO: maybe also try to find profiles by mail and if exists
;; register profile reports for them?
(doseq [recipient (:recipients report)]
(db/insert! conn :global-complaint-report
{:email (:email recipient)
:type (name type)
:content (db/tjson report)}))
(let [profile (db/exec-one! conn (sql/select :profile {:id profile-id}))]
(when (some #(= (:email profile) (:email %)) (:recipients report))
;; If the report matches the profile email, this means that
;; the report is for itself, can be caused when a user
;; registers with an invalid email or the user email is
;; permanently rejecting receiving the email. In this case we
;; have no option to mark the user as muted (and in this case
;; the profile will be also inactive.
(db/update! conn :profile
{:is-muted true}
{:id profile-id}))))))
(defn- register-complaint-for-profile
[{:keys [pool]} {:keys [type profile-id] :as report}]
(db/with-atomic [conn pool]
(db/insert! conn :profile-complaint-report
{:profile-id profile-id
:type (name type)
:content (db/tjson report)})
;; TODO: maybe also try to find profiles by email and if exists
;; register profile reports for them?
(doseq [email (:recipients report)]
(db/insert! conn :global-complaint-report
{:email email
:type (name type)
:content (db/tjson report)}))
(let [profile (db/exec-one! conn (sql/select :profile {:id profile-id}))]
(when (some #(= % (:email profile)) (:recipients report))
;; If the report matches the profile email, this means that
;; the report is for itself, rare case but can happen; In this
;; case just mark profile as muted (very rare case).
(db/update! conn :profile
{:is-muted true}
{:id profile-id})))))
(defn- process-report
[cfg {:keys [type profile-id] :as report}]
(l/trace :action "processing report" :report (pr-str report))
(cond
;; In this case we receive a bounce/complaint notification without
;; confirmed identity, we just emit a warning but do nothing about
;; it because this is not a normal case. All notifications should
;; come with profile identity.
(nil? profile-id)
(l/warn :msg "a notification without identity received from AWS"
:report (pr-str report))
(= "bounce" type)
(register-bounce-for-profile cfg report)
(= "complaint" type)
(register-complaint-for-profile cfg report)
:else
(l/warn :msg "unrecognized report received from AWS"
:report (pr-str report))))

View File

@@ -0,0 +1,227 @@
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) UXBOX Labs SL
(ns app.http.debug
(:require
[app.common.data :as d]
[app.common.exceptions :as ex]
[app.common.spec :as us]
[app.common.uuid :as uuid]
[app.config :as cf]
[app.db :as db]
[app.rpc.mutations.files :as m.files]
[app.rpc.queries.profile :as profile]
[app.util.async :as async]
[app.util.blob :as blob]
[app.util.template :as tmpl]
[app.util.time :as dt]
[app.worker :as wrk]
[clojure.java.io :as io]
[clojure.spec.alpha :as s]
[cuerdas.core :as str]
[datoteka.core :as fs]
[fipp.edn :as fpp]
[integrant.core :as ig]
[promesa.core :as p]))
;; (selmer.parser/cache-off!)
(defn authorized?
[pool {:keys [profile-id]}]
(or (= "devenv" (cf/get :host))
(let [profile (ex/ignoring (profile/retrieve-profile-data pool profile-id))
admins (or (cf/get :admins) #{})]
(contains? admins (:email profile)))))
(defn index
[{:keys [pool]} request]
(when-not (authorized? pool request)
(ex/raise :type :authentication
:code :only-admins-allowed))
{:status 200
:headers {"content-type" "text/html"}
:body (-> (io/resource "templates/debug.tmpl")
(tmpl/render {}))})
(def sql:retrieve-range-of-changes
"select revn, changes from file_change where file_id=? and revn >= ? and revn <= ? order by revn")
(def sql:retrieve-single-change
"select revn, changes, data from file_change where file_id=? and revn = ?")
(defn prepare-response
[{:keys [params] :as request} body]
(when-not body
(ex/raise :type :not-found
:code :enpty-data
:hint "empty response"))
(cond-> {:status 200
:headers {"content-type" "application/transit+json"}
:body body}
(contains? params :download)
(update :headers assoc "content-disposition" "attachment")))
(defn retrieve-file-data
[{:keys [pool]} {:keys [params] :as request}]
(when-not (authorized? pool request)
(ex/raise :type :authentication
:code :only-admins-allowed))
(let [file-id (some-> (get-in request [:params :file-id]) uuid/uuid)
revn (some-> (get-in request [:params :revn]) d/parse-integer)]
(when-not file-id
(ex/raise :type :validation
:code :missing-arguments))
(let [data (if (integer? revn)
(some-> (db/exec-one! pool [sql:retrieve-single-change file-id revn]) :data)
(some-> (db/get-by-id pool :file file-id) :data))]
(if (contains? params :download)
(-> (prepare-response request data)
(update :headers assoc "content-type" "application/octet-stream"))
(prepare-response request (some-> data blob/decode))))))
(defn upload-file-data
[{:keys [pool]} {:keys [profile-id params] :as request}]
(let [project-id (some-> (profile/retrieve-additional-data pool profile-id) :default-project-id)
data (some-> params :file :tempfile fs/slurp-bytes blob/decode)]
(if (and data project-id)
(let [fname (str "imported-file-" (dt/now))]
(m.files/create-file pool {:id (uuid/next)
:name fname
:project-id project-id
:profile-id profile-id
:data data})
{:status 200
:body "OK"})
{:status 500
:body "error"})))
(defn retrieve-file-changes
[{:keys [pool]} request]
(when-not (authorized? pool request)
(ex/raise :type :authentication
:code :only-admins-allowed))
(let [file-id (some-> (get-in request [:params :id]) uuid/uuid)
revn (or (get-in request [:params :revn]) "latest")]
(when (or (not file-id) (not revn))
(ex/raise :type :validation
:code :invalid-arguments
:hint "missing arguments"))
(cond
(d/num-string? revn)
(let [item (db/exec-one! pool [sql:retrieve-single-change file-id (d/parse-integer revn)])]
(prepare-response request (some-> item :changes blob/decode vec)))
(str/includes? revn ":")
(let [[start end] (->> (str/split revn #":")
(map str/trim)
(map d/parse-integer))
items (db/exec! pool [sql:retrieve-range-of-changes file-id start end])]
(prepare-response request
(some->> items
(map :changes)
(map blob/decode)
(mapcat identity)
(vec))))
:else
(ex/raise :type :validation :code :invalid-arguments))))
(defn retrieve-error
[{:keys [pool]} request]
(letfn [(parse-id [request]
(let [id (get-in request [:path-params :id])
id (us/uuid-conformer id)]
(when (uuid? id)
id)))
(retrieve-report [id]
(ex/ignoring
(some-> (db/get-by-id pool :server-error-report id) :content db/decode-transit-pgobject)))
(render-template [report]
(let [context (dissoc report
:trace :cause :params :data :spec-problems
:spec-explain :spec-value :error :explain :hint)
params {:context (with-out-str (fpp/pprint context {:width 300}))
:hint (:hint report)
:spec-explain (:spec-explain report)
:spec-problems (:spec-problems report)
:spec-value (:spec-value report)
:data (:data report)
:trace (or (:trace report)
(some-> report :error :trace))
:params (:params report)}]
(-> (io/resource "templates/error-report.tmpl")
(tmpl/render params))))
]
(when-not (authorized? pool request)
(ex/raise :type :authentication
:code :only-admins-allowed))
(let [result (some-> (parse-id request)
(retrieve-report)
(render-template))]
(if result
{:status 200
:headers {"content-type" "text/html; charset=utf-8"
"x-robots-tag" "noindex"}
:body result}
{:status 404
:body "not found"}))))
(def sql:error-reports
"select id, created_at from server_error_report order by created_at desc limit 100")
(defn retrieve-error-list
[{:keys [pool]} request]
(when-not (authorized? pool request)
(ex/raise :type :authentication
:code :only-admins-allowed))
(let [items (db/exec! pool [sql:error-reports])
items (map #(update % :created-at dt/format-instant :rfc1123) items)]
{:status 200
:headers {"content-type" "text/html; charset=utf-8"
"x-robots-tag" "noindex"}
:body (-> (io/resource "templates/error-list.tmpl")
(tmpl/render {:items items}))}))
(defn health-check
"Mainly a task that performs a health check."
[{:keys [pool]} _]
(db/with-atomic [conn pool]
(db/exec-one! conn ["select count(*) as count from server_prop;"])
{:status 200 :body "Ok"}))
(defn- wrap-async
[{:keys [executor] :as cfg} f]
(fn [request respond raise]
(-> (async/with-dispatch executor
(f cfg request))
(p/then respond)
(p/catch raise))))
(defmethod ig/pre-init-spec ::handlers [_]
(s/keys :req-un [::db/pool ::wrk/executor]))
(defmethod ig/init-key ::handlers
[_ cfg]
{:index (wrap-async cfg index)
:health-check (wrap-async cfg health-check)
:retrieve-file-data (wrap-async cfg retrieve-file-data)
:retrieve-file-changes (wrap-async cfg retrieve-file-changes)
:retrieve-error (wrap-async cfg retrieve-error)
:retrieve-error-list (wrap-async cfg retrieve-error-list)
:upload-file-data (wrap-async cfg upload-file-data)})

View File

@@ -0,0 +1,54 @@
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) UXBOX Labs SL
(ns app.http.doc
"API autogenerated documentation."
(:require
[app.common.data :as d]
[app.config :as cf]
[app.util.services :as sv]
[app.util.template :as tmpl]
[clojure.java.io :as io]
[clojure.spec.alpha :as s]
[pretty-spec.core :as ps]))
(defn get-spec-str
[k]
(with-out-str
(ps/pprint (s/form k)
{:ns-aliases {"clojure.spec.alpha" "s"
"clojure.core.specs.alpha" "score"
"clojure.core" nil}})))
(defn prepare-context
[rpc]
(letfn [(gen-doc [type [name f]]
(let [mdata (meta f)]
;; (prn name mdata)
{:type (d/name type)
:name (d/name name)
:auth (:auth mdata true)
:docs (::sv/docs mdata)
:spec (get-spec-str (::sv/spec mdata))}))]
{:query-methods
(into []
(map (partial gen-doc :query))
(->> rpc :methods :query (sort-by first)))
:mutation-methods
(into []
(map (partial gen-doc :mutation))
(->> rpc :methods :mutation (sort-by first)))}))
(defn handler
[rpc]
(let [context (prepare-context rpc)]
(if (contains? cf/flags :backend-api-doc)
(fn [_ respond _]
(respond {:status 200
:body (-> (io/resource "api-doc.tmpl")
(tmpl/render context))}))
(fn [_ respond _]
(respond {:status 404 :body ""})))))

View File

@@ -2,18 +2,44 @@
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; This Source Code Form is "Incompatible With Secondary Licenses", as
;; defined by the Mozilla Public License, v. 2.0.
;;
;; Copyright (c) 2020 UXBOX Labs SL
;; Copyright (c) UXBOX Labs SL
(ns app.http.errors
"A errors handling for the http server."
(:require
[app.common.exceptions :as ex]
[clojure.tools.logging :as log]
[cuerdas.core :as str]
[expound.alpha :as expound]))
[app.common.logging :as l]
[app.common.spec :as us]
[clojure.spec.alpha :as s]
[cuerdas.core :as str]))
(defn- parse-client-ip
[{:keys [headers] :as request}]
(or (some-> (get headers "x-forwarded-for") (str/split ",") first)
(get headers "x-real-ip")
(get request :remote-addr)))
(defn get-error-context
[request error]
(let [data (ex-data error)]
(merge
{:path (:uri request)
:method (:request-method request)
:hint (ex-message error)
:params (:params request)
:spec-problems (some->> data ::s/problems (take 10) seq vec)
:spec-value (some->> data ::s/value)
:data (some-> data (dissoc ::s/problems ::s/value ::s/spec))
:ip-addr (parse-client-ip request)
:profile-id (:profile-id request)}
(let [headers (:headers request)]
{:user-agent (get headers "user-agent")
:frontend-version (get headers "x-frontend-version" "unknown")})
(when (and data (::s/problems data))
{:spec-explain (us/pretty-explain data)}))))
(defmulti handle-exception
(fn [err & _rest]
@@ -21,86 +47,86 @@
(or (:type edata)
(class err)))))
(defmethod handle-exception :authorization
(defmethod handle-exception :authentication
[err _]
{:status 403
:body (ex-data err)})
{:status 401 :body (ex-data err)})
(defmethod handle-exception :restriction
[err _]
{:status 400 :body (ex-data err)})
(defmethod handle-exception :validation
[err req]
(let [header (get-in req [:headers "accept"])
edata (ex-data err)]
(cond
(and (str/starts-with? header "text/html")
(= :spec-validation (:code edata)))
{:status 400
:headers {"content-type" "text/html"}
:body (str "<pre style='font-size:16px'>"
(with-out-str
(:data edata))
"</pre>\n")}
:else
{:status 400
:body edata})))
[err _]
(let [data (ex-data err)
explain (us/pretty-explain data)]
{:status 400
:body (-> data
(dissoc ::s/problems)
(dissoc ::s/value)
(cond-> explain (assoc :explain explain)))}))
(defmethod handle-exception :ratelimit
[_ _]
{:status 429
:headers {"retry-after" 1000}
:body ""})
(defmethod handle-exception :assertion
[error request]
(let [edata (ex-data error)]
(l/error ::l/raw (ex-message error)
::l/context (get-error-context request error)
:cause error)
{:status 500
:body {:type :server-error
:code :assertion
:data (dissoc edata ::s/problems ::s/value ::s/spec)}}))
(defmethod handle-exception :not-found
[err _]
(let [response (ex-data err)]
{:status 404
:body response}))
(defmethod handle-exception :service-error
[err req]
(handle-exception (.getCause ^Throwable err) req))
(defmethod handle-exception :parse
[err _]
{:status 400
:body {:type :parse
:message (ex-message err)}})
(defn get-context-string
[err request]
(str
"=| uri: " (pr-str (:uri request)) "\n"
"=| method: " (pr-str (:request-method request)) "\n"
"=| path-params: " (pr-str (:path-params request)) "\n"
"=| query-params: " (pr-str (:query-params request)) "\n"
(when-let [bparams (:body-params request)]
(str "=| body-params: " (pr-str bparams) "\n"))
(when (ex/ex-info? err)
(str "=| ex-data: " (pr-str (ex-data err)) "\n"))
"\n"))
(defmethod handle-exception :assertion
[err request]
(let [{:keys [data] :as edata} (ex-data err)]
(log/errorf err
(str "Assertion error\n"
(get-context-string err request)
(with-out-str (expound/printer data))))
{:status 500
:body {:type :internal-error
:message "Assertion error"
:data (ex-data err)}}))
{:status 404 :body (ex-data err)})
(defmethod handle-exception :default
[err request]
(log/errorf err (str "Internal Error\n" (get-context-string err request)))
{:status 500
:body {:type :internal-error
:message (ex-message err)
:data (ex-data err)}})
[error request]
(let [edata (ex-data error)]
;; NOTE: this is a special case for the idle-in-transaction error;
;; when it happens, the connection is automatically closed and
;; next-jdbc combines the two errors in a single ex-info. We only
;; need the :handling error, because the :rollback error will be
;; always "connection closed".
(if (and (ex/exception? (:rollback edata))
(ex/exception? (:handling edata)))
(handle-exception (:handling edata) request)
(do
(l/error ::l/raw (ex-message error)
::l/context (get-error-context request error)
:cause error)
{:status 500
:body {:type :server-error
:code :unexpected
:hint (ex-message error)
:data edata}}))))
(defmethod handle-exception org.postgresql.util.PSQLException
[error request]
(let [state (.getSQLState ^java.sql.SQLException error)]
(l/error ::l/raw (ex-message error)
::l/context (get-error-context request error)
:cause error)
(cond
(= state "57014")
{:status 504
:body {:type :server-timeout
:code :statement-timeout
:hint (ex-message error)}}
(= state "25P03")
{:status 504
:body {:type :server-timeout
:code :idle-in-transaction-timeout
:hint (ex-message error)}}
:else
{:status 500
:body {:type :server-error
:code :psql-exception
:hint (ex-message error)
:state state}})))
(defn handle
[error req]

View File

@@ -0,0 +1,78 @@
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) UXBOX Labs SL
(ns app.http.feedback
"A general purpose feedback module."
(:require
[app.common.data :as d]
[app.common.exceptions :as ex]
[app.common.spec :as us]
[app.config :as cf]
[app.db :as db]
[app.emails :as eml]
[app.rpc.queries.profile :as profile]
[app.worker :as wrk]
[clojure.spec.alpha :as s]
[integrant.core :as ig]
[promesa.core :as p]
[promesa.exec :as px]))
(declare ^:private send-feedback)
(declare ^:private handler)
(defmethod ig/pre-init-spec ::handler [_]
(s/keys :req-un [::db/pool ::wrk/executor]))
(defmethod ig/init-key ::handler
[_ {:keys [executor] :as cfg}]
(let [enabled? (contains? cf/flags :user-feedback)]
(if enabled?
(fn [request respond raise]
(-> (px/submit! executor #(handler cfg request))
(p/then' respond)
(p/catch raise)))
(fn [_ _ raise]
(raise (ex/error :type :validation
:code :feedback-disabled
:hint "feedback module is disabled"))))))
(defn- handler
[{:keys [pool] :as cfg} {:keys [profile-id] :as request}]
(let [ftoken (cf/get :feedback-token ::no-token)
token (get-in request [:headers "x-feedback-token"])
params (d/merge (:params request)
(:body-params request))]
(cond
(uuid? profile-id)
(let [profile (profile/retrieve-profile-data pool profile-id)
params (assoc params :from (:email profile))]
(send-feedback pool profile params))
(= token ftoken)
(send-feedback cfg nil params))
{:status 204 :body ""}))
(s/def ::content ::us/string)
(s/def ::from ::us/email)
(s/def ::subject ::us/string)
(s/def ::feedback
(s/keys :req-un [::from ::subject ::content]))
(defn- send-feedback
[pool profile params]
(let [params (us/conform ::feedback params)
destination (cf/get :feedback-destination)]
(eml/send! {::eml/conn pool
::eml/factory eml/feedback
:from destination
:to destination
:profile profile
:reply-to (:from params)
:email (:from params)
:subject (:subject params)
:content (:content params)})
nil))

View File

@@ -1,76 +0,0 @@
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; This Source Code Form is "Incompatible With Secondary Licenses", as
;; defined by the Mozilla Public License, v. 2.0.
;;
;; Copyright (c) 2020 UXBOX Labs SL
(ns app.http.handlers
(:require
[app.common.data :as d]
[app.common.exceptions :as ex]
[app.emails :as emails]
[app.http.session :as session]
[app.services.init]
[app.services.mutations :as sm]
[app.services.queries :as sq]))
(def unauthorized-services
#{:create-demo-profile
:logout
:profile
:verify-token
:recover-profile
:register-profile
:request-profile-recovery
:viewer-bundle
:login})
(defn query-handler
[{:keys [profile-id] :as request}]
(let [type (keyword (get-in request [:path-params :type]))
data (assoc (:params request) ::sq/type type)
data (if profile-id
(assoc data :profile-id profile-id)
(dissoc data :profile-id))]
(if (or (uuid? profile-id)
(contains? unauthorized-services type))
{:status 200
:body (sq/handle (with-meta data {:req request}))}
{:status 403
:body {:type :authentication
:code :unauthorized}})))
(defn mutation-handler
[{:keys [profile-id] :as request}]
(let [type (keyword (get-in request [:path-params :type]))
data (d/merge (:params request)
(:body-params request)
(:uploads request)
{::sm/type type})
data (if profile-id
(assoc data :profile-id profile-id)
(dissoc data :profile-id))]
(if (or (uuid? profile-id)
(contains? unauthorized-services type))
(let [result (sm/handle (with-meta data {:req request}))
mdata (meta result)
resp {:status (if (nil? (seq result)) 204 200)
:body result}]
(cond->> resp
(:transform-response mdata) ((:transform-response mdata) request)))
{:status 403
:body {:type :authentication
:code :unauthorized}})))
(defn echo-handler
[req]
{:status 200
:body {:params (:params req)
:cookies (:cookies req)
:headers (:headers req)}})

View File

@@ -2,93 +2,152 @@
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; This Source Code Form is "Incompatible With Secondary Licenses", as
;; defined by the Mozilla Public License, v. 2.0.
;;
;; Copyright (c) 2020 UXBOX Labs SL
;; Copyright (c) UXBOX Labs SL
(ns app.http.middleware
(:require
[app.common.exceptions :as ex]
[app.config :as cfg]
[app.metrics :as mtx]
[app.util.transit :as t]
[app.common.logging :as l]
[app.common.transit :as t]
[app.config :as cf]
[app.util.json :as json]
[ring.core.protocols :as rp]
[ring.middleware.cookies :refer [wrap-cookies]]
[ring.middleware.keyword-params :refer [wrap-keyword-params]]
[ring.middleware.multipart-params :refer [wrap-multipart-params]]
[ring.middleware.params :refer [wrap-params]]
[ring.middleware.resource :refer [wrap-resource]]))
[yetti.adapter :as yt]))
(defn- wrap-parse-request-body
(defn wrap-server-timing
[handler]
(letfn [(parse-body [body]
(try
(let [reader (t/reader body)]
(t/read! reader))
(catch Exception e
(ex/raise :type :parse
:message "Unable to parse transit from request body."
:cause e))))]
(fn [{:keys [headers body request-method] :as request}]
(handler
(cond-> request
(and (= "application/transit+json" (get headers "content-type"))
(not= request-method :get))
(assoc :body-params (parse-body body)))))))
(letfn [(get-age [start]
(float (/ (- (System/nanoTime) start) 1000000000)))
(update-headers [headers start]
(assoc headers "Server-Timing" (str "total;dur=" (get-age start))))]
(fn [request respond raise]
(let [start (System/nanoTime)]
(handler request #(respond (update % :headers update-headers start)) raise)))))
(defn wrap-parse-request-body
[handler]
(letfn [(parse-transit [body]
(let [reader (t/reader body)]
(t/read! reader)))
(parse-json [body]
(json/read body))
(handle-request [{:keys [headers body] :as request}]
(let [ctype (get headers "content-type")]
(case ctype
"application/transit+json"
(let [params (parse-transit body)]
(-> request
(assoc :body-params params)
(update :params merge params)))
"application/json"
(let [params (parse-json body)]
(-> request
(assoc :body-params params)
(update :params merge params)))
request)))
(handle-exception [cause]
(let [data {:type :validation
:code :unable-to-parse-request-body
:hint "malformed params"}]
(l/error :hint (ex-message cause) :cause cause)
{:status 400
:headers {"content-type" "application/transit+json"}
:body (t/encode-str data {:type :json-verbose})}))]
(fn [request respond raise]
(try
(let [request (handle-request request)]
(handler request respond raise))
(catch Exception cause
(respond (handle-exception cause)))))))
(def parse-request-body
{:name ::parse-request-body
:compile (constantly wrap-parse-request-body)})
(defn- impl-format-response-body
[response]
(let [body (:body response)
type (if (:debug-humanize-transit cfg/config)
:json-verbose
:json)]
(cond
(coll? body)
(-> response
(assoc :body (t/encode body {:type type}))
(update :headers assoc
"content-type"
"application/transit+json"))
(defn buffered-output-stream
"Returns a buffered output stream that ignores flush calls. This is
needed because transit-java calls flush very aggresivelly on each
object write."
[^java.io.OutputStream os ^long chunk-size]
(proxy [java.io.BufferedOutputStream] [os (int chunk-size)]
;; Explicitly do not forward flush
(flush [])
(close []
(proxy-super flush)
(proxy-super close))))
(nil? body)
(assoc response :status 204 :body "")
(def ^:const buffer-size (:http/output-buffer-size yt/base-defaults))
:else
response)))
(defn- wrap-format-response-body
(defn wrap-format-response-body
[handler]
(fn [request]
(let [response (handler request)]
(cond-> response
(map? response) (impl-format-response-body)))))
(letfn [(transit-streamable-body [data opts]
(reify rp/StreamableResponseBody
(write-body-to-stream [_ _ output-stream]
;; Use the same buffer as jetty output buffer size
(try
(with-open [bos (buffered-output-stream output-stream buffer-size)]
(let [tw (t/writer bos opts)]
(t/write! tw data)))
(catch org.eclipse.jetty.io.EofException _cause
;; Do nothing, EOF means client closes connection abruptly
nil)
(catch Throwable cause
(l/warn :hint "unexpected error on encoding response"
:cause cause))))))
(impl-format-response-body [response {:keys [query-params] :as request}]
(let [body (:body response)
opts {:type (if (contains? query-params "transit_verbose") :json-verbose :json)}]
(cond
(:ws response)
response
(coll? body)
(-> response
(update :headers assoc "content-type" "application/transit+json")
(assoc :body (transit-streamable-body body opts)))
(nil? body)
(assoc response :status 204 :body "")
:else
response)))
(handle-response [response request]
(cond-> response
(map? response) (impl-format-response-body request)))]
(fn [request respond raise]
(handler request
(fn [response]
(respond (handle-response response request)))
raise))))
(def format-response-body
{:name ::format-response-body
:compile (constantly wrap-format-response-body)})
(defn- wrap-errors
(defn wrap-errors
[handler on-error]
(fn [request]
(try
(handler request)
(catch Throwable e
(on-error e request)))))
(fn [request respond _]
(handler request respond (fn [cause]
(-> cause (on-error request) respond)))))
(def errors
{:name ::errors
:compile (constantly wrap-errors)})
(def metrics
{:name ::metrics
:wrap (fn [handler]
(mtx/wrap-counter handler {:id "http__requests_counter"
:help "Absolute http requests counter."}))})
(def cookies
{:name ::cookies
:compile (constantly wrap-cookies)})
@@ -105,33 +164,35 @@
{:name ::keyword-params
:compile (constantly wrap-keyword-params)})
(defn- wrap-development-cors
(def server-timing
{:name ::server-timing
:compile (constantly wrap-server-timing)})
(defn wrap-cors
[handler]
(letfn [(add-cors-headers [response]
(update response :headers
(fn [headers]
(-> headers
(assoc "access-control-allow-origin" "http://localhost:3449")
(assoc "access-control-allow-methods" "GET,POST,DELETE,OPTIONS,PUT,HEAD,PATCH")
(assoc "access-control-allow-credentials" "true")
(assoc "access-control-expose-headers" "x-requested-with, content-type, cookie")
(assoc "access-control-allow-headers" "content-type")))))]
(fn [request]
(if (= (:request-method request) :options)
(-> {:status 200 :body ""}
(add-cors-headers))
(let [response (handler request)]
(add-cors-headers response))))))
(def development-cors
{:name ::development-cors
:compile (fn [& _args]
(when *assert*
wrap-development-cors))})
(def development-resources
{:name ::development-resources
:compile (fn [& _args]
(when *assert*
#(wrap-resource % "public")))})
(if-not (contains? cf/flags :cors)
handler
(letfn [(add-cors-headers [response request]
(-> response
(update
:headers
(fn [headers]
(-> headers
(assoc "access-control-allow-origin" (get-in request [:headers "origin"]))
(assoc "access-control-allow-methods" "GET,POST,DELETE,OPTIONS,PUT,HEAD,PATCH")
(assoc "access-control-allow-credentials" "true")
(assoc "access-control-expose-headers" "x-requested-with, content-type, cookie")
(assoc "access-control-allow-headers" "x-frontend-version, content-type, accept, x-requested-width"))))))]
(fn [request respond raise]
(if (= (:request-method request) :options)
(-> {:status 200 :body ""}
(add-cors-headers request)
(respond))
(handler request
(fn [response]
(respond (add-cors-headers response request)))
raise))))))
(def cors
{:name ::cors
:compile (constantly wrap-cors)})

View File

@@ -0,0 +1,411 @@
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) UXBOX Labs SL
(ns app.http.oauth
(:require
[app.common.data :as d]
[app.common.exceptions :as ex]
[app.common.logging :as l]
[app.common.spec :as us]
[app.common.uri :as u]
[app.config :as cf]
[app.db :as db]
[app.loggers.audit :as audit]
[app.rpc.queries.profile :as profile]
[app.util.http :as http]
[app.util.time :as dt]
[clojure.data.json :as json]
[clojure.set :as set]
[clojure.spec.alpha :as s]
[cuerdas.core :as str]
[integrant.core :as ig]
[promesa.exec :as px]))
;; TODO: make it fully async (?)
(defn- build-redirect-uri
[{:keys [provider] :as cfg}]
(let [public (u/uri (:public-uri cfg))]
(str (assoc public :path (str "/api/auth/oauth/" (:name provider) "/callback")))))
(defn- build-auth-uri
[{:keys [provider] :as cfg} state]
(let [params {:client_id (:client-id provider)
:redirect_uri (build-redirect-uri cfg)
:response_type "code"
:state state
:scope (str/join " " (:scopes provider []))}
query (u/map->query-string params)]
(-> (u/uri (:auth-uri provider))
(assoc :query query)
(str))))
(defn retrieve-access-token
[{:keys [provider] :as cfg} code]
(try
(let [params {:client_id (:client-id provider)
:client_secret (:client-secret provider)
:code code
:grant_type "authorization_code"
:redirect_uri (build-redirect-uri cfg)}
req {:method :post
:headers {"content-type" "application/x-www-form-urlencoded"}
:uri (:token-uri provider)
:body (u/map->query-string params)}
res (http/send! req)]
(when (= 200 (:status res))
(let [data (json/read-str (:body res))]
{:token (get data "access_token")
:type (get data "token_type")})))
(catch Exception e
(l/warn :hint "unexpected error on retrieve-access-token" :cause e)
nil)))
(defn- qualify-props
[provider props]
(reduce-kv (fn [result k v]
(assoc result (keyword (:name provider) (name k)) v))
{}
props))
(defn- retrieve-user-info
[{:keys [provider] :as cfg} tdata]
(try
(let [req {:uri (:user-uri provider)
:headers {"Authorization" (str (:type tdata) " " (:token tdata))}
:timeout 6000
:method :get}
res (http/send! req)]
(when (= 200 (:status res))
(let [info (json/read-str (:body res) :key-fn keyword)]
{:backend (:name provider)
:email (:email info)
:fullname (:name info)
:props (->> (dissoc info :name :email)
(qualify-props provider))})))
(catch Exception e
(l/warn :hint "unexpected exception on retrieve-user-info" :cause e)
nil)))
(s/def ::backend ::us/not-empty-string)
(s/def ::email ::us/not-empty-string)
(s/def ::fullname ::us/not-empty-string)
(s/def ::props (s/map-of ::us/keyword any?))
(s/def ::info
(s/keys :req-un [::backend
::email
::fullname
::props]))
(defn retrieve-info
[{:keys [tokens provider] :as cfg} request]
(let [state (get-in request [:params :state])
state (tokens :verify {:token state :iss :oauth})
info (some->> (get-in request [:params :code])
(retrieve-access-token cfg)
(retrieve-user-info cfg))]
(when-not (s/valid? ::info info)
(l/warn :hint "received incomplete profile info object (please set correct scopes)"
:info (pr-str info))
(ex/raise :type :internal
:code :unable-to-auth
:hint "no user info"))
;; If the provider is OIDC, we can proceed to check
;; roles if they are defined.
(when (and (= "oidc" (:name provider))
(seq (:roles provider)))
(let [provider-roles (into #{} (:roles provider))
profile-roles (let [attr (cf/get :oidc-roles-attr :roles)
roles (get info attr)]
(cond
(string? roles) (into #{} (str/words roles))
(vector? roles) (into #{} roles)
:else #{}))]
;; check if profile has a configured set of roles
(when-not (set/subset? provider-roles profile-roles)
(ex/raise :type :internal
:code :unable-to-auth
:hint "not enough permissions"))))
(cond-> info
(some? (:invitation-token state))
(assoc :invitation-token (:invitation-token state))
;; If state token comes with props, merge them. The state token
;; props can contain pm_ and utm_ prefixed query params.
(map? (:props state))
(update :props merge (:props state)))))
;; --- HTTP HANDLERS
(defn extract-utm-props
"Extracts additional data from user params."
[params]
(reduce-kv (fn [params k v]
(let [sk (name k)]
(cond-> params
(str/starts-with? sk "utm_")
(assoc (->> sk str/kebab (keyword "penpot")) v))))
{}
params))
(defn- retrieve-profile
[{:keys [pool] :as cfg} info]
(with-open [conn (db/open pool)]
(some->> (:email info)
(profile/retrieve-profile-data-by-email conn)
(profile/populate-additional-data conn)
(profile/decode-profile-row))))
(defn- redirect-response
[uri]
{:status 302
:headers {"location" (str uri)}
:body ""})
(defn- generate-error-redirect
[cfg error]
(let [uri (-> (u/uri (:public-uri cfg))
(assoc :path "/#/auth/login")
(assoc :query (u/map->query-string {:error "unable-to-auth" :hint (ex-message error)})))]
(redirect-response uri)))
(defn- generate-redirect
[{:keys [tokens session audit] :as cfg} request info profile]
(if profile
(let [sxf ((:create session) (:id profile))
token (or (:invitation-token info)
(tokens :generate {:iss :auth
:exp (dt/in-future "15m")
:profile-id (:id profile)}))
params {:token token}
uri (-> (u/uri (:public-uri cfg))
(assoc :path "/#/auth/verify-token")
(assoc :query (u/map->query-string params)))]
(when (fn? audit)
(audit :cmd :submit
:type "mutation"
:name "login"
:profile-id (:id profile)
:ip-addr (audit/parse-client-ip request)
:props (audit/profile->props profile)))
(->> (redirect-response uri)
(sxf request)))
(let [info (assoc info
:iss :prepared-register
:is-active true
:exp (dt/in-future {:hours 48}))
token (tokens :generate info)
params (d/without-nils
{:token token
:fullname (:fullname info)})
uri (-> (u/uri (:public-uri cfg))
(assoc :path "/#/auth/register/validate")
(assoc :query (u/map->query-string params)))]
(redirect-response uri))))
(defn- auth-handler
[{:keys [tokens executor] :as cfg} {:keys [params] :as request} respond _]
(px/run!
executor
(fn []
(let [invitation (:invitation-token params)
props (extract-utm-props params)
state (tokens :generate
{:iss :oauth
:invitation-token invitation
:props props
:exp (dt/in-future "15m")})
uri (build-auth-uri cfg state)]
(respond
{:status 200
:body {:redirect-uri uri}})))))
(defn- callback-handler
[{:keys [executor] :as cfg} request respond _]
(px/run!
executor
(fn []
(try
(let [info (retrieve-info cfg request)
profile (retrieve-profile cfg info)]
(respond (generate-redirect cfg request info profile)))
(catch Exception cause
(l/warn :hint "error on oauth process" :cause cause)
(respond (generate-error-redirect cfg cause)))))))
;; --- INIT
(declare initialize)
(s/def ::public-uri ::us/not-empty-string)
(s/def ::session map?)
(s/def ::tokens fn?)
(s/def ::rpc map?)
(defmethod ig/pre-init-spec ::handler [_]
(s/keys :req-un [::public-uri ::session ::tokens ::rpc ::db/pool]))
(defn wrap-handler
[cfg handler]
(fn [request respond raise]
(let [provider (get-in request [:path-params :provider])
provider (get-in @cfg [:providers provider])]
(if provider
(handler (assoc @cfg :provider provider)
request
respond
raise)
(raise
(ex/error
:type :not-found
:provider provider
:hint "provider not configured"))))))
(defmethod ig/init-key ::handler
[_ cfg]
(let [cfg (initialize cfg)]
{:handler (wrap-handler cfg auth-handler)
:callback-handler (wrap-handler cfg callback-handler)}))
(defn- discover-oidc-config
[{:keys [base-uri] :as opts}]
(let [discovery-uri (u/join base-uri ".well-known/openid-configuration")
response (ex/try (http/send! {:method :get :uri (str discovery-uri)}))]
(cond
(ex/exception? response)
(do
(l/warn :hint "unable to discover oidc configuration"
:discover-uri (str discovery-uri)
:cause response)
nil)
(= 200 (:status response))
(let [data (json/read-str (:body response))]
{:token-uri (get data "token_endpoint")
:auth-uri (get data "authorization_endpoint")
:user-uri (get data "userinfo_endpoint")})
:else
(do
(l/warn :hint "unable to discover OIDC configuration"
:uri (str discovery-uri)
:response-status-code (:status response))
nil))))
(defn- obfuscate-string
[s]
(if (< (count s) 10)
(apply str (take (count s) (repeat "*")))
(str (subs s 0 5)
(apply str (take (- (count s) 5) (repeat "*"))))))
(defn- initialize-oidc-provider
[cfg]
(let [opts {:base-uri (cf/get :oidc-base-uri)
:client-id (cf/get :oidc-client-id)
:client-secret (cf/get :oidc-client-secret)
:token-uri (cf/get :oidc-token-uri)
:auth-uri (cf/get :oidc-auth-uri)
:user-uri (cf/get :oidc-user-uri)
:scopes (cf/get :oidc-scopes #{"openid" "profile" "email"})
:roles-attr (cf/get :oidc-roles-attr)
:roles (cf/get :oidc-roles)
:name "oidc"}]
(if (and (string? (:base-uri opts))
(string? (:client-id opts))
(string? (:client-secret opts)))
(do
(l/debug :hint "initialize oidc provider" :name "generic-oidc"
:opts (update opts :client-secret obfuscate-string))
(if (and (string? (:token-uri opts))
(string? (:user-uri opts))
(string? (:auth-uri opts)))
(do
(l/debug :hint "initialized with user provided configuration")
(assoc-in cfg [:providers "oidc"] opts))
(do
(l/debug :hint "trying to discover oidc provider configuration using BASE_URI")
(if-let [opts' (discover-oidc-config opts)]
(do
(l/debug :hint "discovered opts" :additional-opts opts')
(assoc-in cfg [:providers "oidc"] (merge opts opts')))
cfg))))
cfg)))
(defn- initialize-google-provider
[cfg]
(let [opts {:client-id (cf/get :google-client-id)
:client-secret (cf/get :google-client-secret)
:scopes #{"openid" "email" "profile"}
:auth-uri "https://accounts.google.com/o/oauth2/v2/auth"
:token-uri "https://oauth2.googleapis.com/token"
:user-uri "https://openidconnect.googleapis.com/v1/userinfo"
:name "google"}]
(if (and (string? (:client-id opts))
(string? (:client-secret opts)))
(do
(l/info :action "initialize" :provider "google"
:opts (pr-str (update opts :client-secret obfuscate-string)))
(assoc-in cfg [:providers "google"] opts))
cfg)))
(defn- initialize-github-provider
[cfg]
(let [opts {:client-id (cf/get :github-client-id)
:client-secret (cf/get :github-client-secret)
:scopes #{"read:user" "user:email"}
:auth-uri "https://github.com/login/oauth/authorize"
:token-uri "https://github.com/login/oauth/access_token"
:user-uri "https://api.github.com/user"
:name "github"}]
(if (and (string? (:client-id opts))
(string? (:client-secret opts)))
(do
(l/info :action "initialize" :provider "github"
:opts (pr-str (update opts :client-secret obfuscate-string)))
(assoc-in cfg [:providers "github"] opts))
cfg)))
(defn- initialize-gitlab-provider
[cfg]
(let [base (cf/get :gitlab-base-uri "https://gitlab.com")
opts {:base-uri base
:client-id (cf/get :gitlab-client-id)
:client-secret (cf/get :gitlab-client-secret)
:scopes #{"read_user"}
:auth-uri (str base "/oauth/authorize")
:token-uri (str base "/oauth/token")
:user-uri (str base "/api/v4/user")
:name "gitlab"}]
(if (and (string? (:client-id opts))
(string? (:client-secret opts)))
(do
(l/info :action "initialize" :provider "gitlab"
:opts (pr-str (update opts :client-secret obfuscate-string)))
(assoc-in cfg [:providers "gitlab"] opts))
cfg)))
(defn- initialize
[cfg]
(let [cfg (agent cfg :error-mode :continue)]
(send-off cfg initialize-google-provider)
(send-off cfg initialize-gitlab-provider)
(send-off cfg initialize-github-provider)
(send-off cfg initialize-oidc-provider)
cfg))

View File

@@ -2,65 +2,269 @@
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; This Source Code Form is "Incompatible With Secondary Licenses", as
;; defined by the Mozilla Public License, v. 2.0.
;;
;; Copyright (c) 2020 UXBOX Labs SL
;; TODO: move to services.
;; Copyright (c) UXBOX Labs SL
(ns app.http.session
(:require
[app.common.data :as d]
[app.common.exceptions :as ex]
[app.common.logging :as l]
[app.config :as cfg]
[app.db :as db]
[buddy.core.codecs :as bc]
[buddy.core.nonce :as bn]))
[app.db.sql :as sql]
[app.metrics :as mtx]
[app.util.async :as aa]
[app.util.time :as dt]
[app.worker :as wrk]
[clojure.core.async :as a]
[clojure.spec.alpha :as s]
[integrant.core :as ig]
[ring.middleware.session.store :as rss]))
(defn next-token
[n]
(-> (bn/random-nonce n)
(bc/bytes->b64u)
(bc/bytes->str)))
;; A default cookie name for storing the session. We don't allow to configure it.
(def token-cookie-name "auth-token")
(defn extract-auth-token
[request]
(get-in request [:cookies "auth-token" :value]))
;; A cookie that we can use to check from other sites of the same domain if a user
;; is registered. Is not intended for on premise installations, although nothing
;; prevents using it if some one wants to.
(def authenticated-cookie-name "authenticated")
(defn retrieve
[conn token]
(deftype DatabaseStore [pool tokens]
rss/SessionStore
(read-session [_ token]
(db/exec-one! pool (sql/select :http-session {:id token})))
(write-session [_ _ data]
(let [profile-id (:profile-id data)
user-agent (:user-agent data)
token (tokens :generate {:iss "authentication"
:iat (dt/now)
:uid profile-id})
now (dt/now)
params {:user-agent user-agent
:profile-id profile-id
:created-at now
:updated-at now
:id token}]
(db/insert! pool :http-session params)
token))
(delete-session [_ token]
(db/delete! pool :http-session {:id token})
nil))
(deftype MemoryStore [cache tokens]
rss/SessionStore
(read-session [_ token]
(get @cache token))
(write-session [_ _ data]
(let [profile-id (:profile-id data)
user-agent (:user-agent data)
token (tokens :generate {:iss "authentication"
:iat (dt/now)
:uid profile-id})
params {:user-agent user-agent
:profile-id profile-id
:id token}]
(swap! cache assoc token params)
token))
(delete-session [_ token]
(swap! cache dissoc token)
nil))
;; --- IMPL
(defn- create-session
[store request profile-id]
(let [params {:user-agent (get-in request [:headers "user-agent"])
:profile-id profile-id}]
(rss/write-session store nil params)))
(defn- delete-session
[store {:keys [cookies] :as request}]
(when-let [token (get-in cookies [token-cookie-name :value])]
(rss/delete-session store token)))
(defn- retrieve-session
[store token]
(when token
(-> (db/exec-one! conn ["select profile_id from http_session where id = ?" token])
(:profile-id))))
(rss/read-session store token)))
(defn retrieve-from-request
[conn request]
(->> (extract-auth-token request)
(retrieve conn)))
(defn- retrieve-from-request
[store {:keys [cookies] :as request}]
(->> (get-in cookies [token-cookie-name :value])
(retrieve-session store)))
(defn create
[profile-id user-agent]
(let [id (next-token 64)]
(db/insert! db/pool :http-session {:id id
:profile-id profile-id
:user-agent user-agent})
id))
(defn- add-cookies
[response token]
(let [cors? (contains? cfg/flags :cors)
secure? (contains? cfg/flags :secure-session-cookies)
authenticated-cookie-domain (cfg/get :authenticated-cookie-domain)]
(update response :cookies
(fn [cookies]
(cond-> cookies
:always
(assoc token-cookie-name {:path "/"
:http-only true
:value token
:same-site (if cors? :none :lax)
:secure secure?})
(defn delete
[token]
(db/delete! db/pool :http-session {:id token})
nil)
(some? authenticated-cookie-domain)
(assoc authenticated-cookie-name {:domain authenticated-cookie-domain
:path "/"
:value true
:same-site :strict
:secure secure?}))))))
(defn cookies
([id] (cookies id {}))
([id opts]
{"auth-token" (merge opts {:value id :path "/" :http-only true})}))
(defn- clear-cookies
[response]
(let [authenticated-cookie-domain (cfg/get :authenticated-cookie-domain)]
(assoc response :cookies {token-cookie-name {:path "/"
:value ""
:max-age -1}
authenticated-cookie-name {:domain authenticated-cookie-domain
:path "/"
:value ""
:max-age -1}})))
(defn wrap-session
[handler]
(fn [request]
(if-let [profile-id (retrieve-from-request db/pool request)]
(handler (assoc request :profile-id profile-id))
(handler request))))
(defn- middleware
[events-ch store handler]
(fn [request respond raise]
(if-let [{:keys [id profile-id] :as session} (retrieve-from-request store request)]
(do
(a/>!! events-ch id)
(l/set-context! {:profile-id profile-id})
(handler (assoc request :profile-id profile-id :session-id id) respond raise))
(handler request respond raise))))
(def middleware
{:nane ::middleware
:compile (constantly wrap-session)})
;; --- STATE INIT: SESSION
(s/def ::tokens fn?)
(defmethod ig/pre-init-spec ::session [_]
(s/keys :req-un [::db/pool ::tokens]))
(defmethod ig/prep-key ::session
[_ cfg]
(d/merge {:buffer-size 128}
(d/without-nils cfg)))
(defmethod ig/init-key ::session
[_ {:keys [pool tokens] :as cfg}]
(let [events-ch (a/chan (a/dropping-buffer (:buffer-size cfg)))
store (if (db/read-only? pool)
(->MemoryStore (atom {}) tokens)
(->DatabaseStore pool tokens))]
(when (db/read-only? pool)
(l/warn :hint "sessions module initialized with in-memory store"))
(-> cfg
(assoc ::events-ch events-ch)
(assoc :middleware (partial middleware events-ch store))
(assoc :create (fn [profile-id]
(fn [request response]
(let [token (create-session store request profile-id)]
(add-cookies response token)))))
(assoc :delete (fn [request response]
(delete-session store request)
(-> response
(assoc :status 204)
(assoc :body "")
(clear-cookies)))))))
(defmethod ig/halt-key! ::session
[_ data]
(a/close! (::events-ch data)))
;; --- STATE INIT: SESSION UPDATER
(declare update-sessions)
(s/def ::session map?)
(s/def ::max-batch-age ::cfg/http-session-updater-batch-max-age)
(s/def ::max-batch-size ::cfg/http-session-updater-batch-max-size)
(defmethod ig/pre-init-spec ::updater [_]
(s/keys :req-un [::db/pool ::wrk/executor ::mtx/metrics ::session]
:opt-un [::max-batch-age
::max-batch-size]))
(defmethod ig/prep-key ::updater
[_ cfg]
(merge {:max-batch-age (dt/duration {:minutes 5})
:max-batch-size 200}
(d/without-nils cfg)))
(defmethod ig/init-key ::updater
[_ {:keys [session metrics] :as cfg}]
(l/info :action "initialize session updater"
:max-batch-age (str (:max-batch-age cfg))
:max-batch-size (str (:max-batch-size cfg)))
(let [input (aa/batch (::events-ch session)
{:max-batch-size (:max-batch-size cfg)
:max-batch-age (inst-ms (:max-batch-age cfg))})]
(a/go-loop []
(when-let [[reason batch] (a/<! input)]
(let [result (a/<! (update-sessions cfg batch))]
(mtx/run! metrics {:id :session-update-total :inc 1})
(cond
(ex/exception? result)
(l/error :task "updater"
:hint "unexpected error on update sessions"
:cause result)
(= :size reason)
(l/debug :task "updater"
:hint "update sessions"
:reason (name reason)
:count result))
(recur))))))
(defn- update-sessions
[{:keys [pool executor]} ids]
(aa/with-thread executor
(db/exec-one! pool ["update http_session set updated_at=now() where id = ANY(?)"
(into-array String ids)])
(count ids)))
;; --- STATE INIT: SESSION GC
(declare sql:delete-expired)
(s/def ::max-age ::dt/duration)
(defmethod ig/pre-init-spec ::gc-task [_]
(s/keys :req-un [::db/pool]
:opt-un [::max-age]))
(defmethod ig/prep-key ::gc-task
[_ cfg]
(merge {:max-age (dt/duration {:days 15})}
(d/without-nils cfg)))
(defmethod ig/init-key ::gc-task
[_ {:keys [pool max-age] :as cfg}]
(l/debug :hint "initializing session gc task" :max-age max-age)
(fn [_]
(db/with-atomic [conn pool]
(let [interval (db/interval max-age)
result (db/exec-one! conn [sql:delete-expired interval interval])
result (:next.jdbc/update-count result)]
(l/debug :task "gc"
:hint "clean http sessions"
:deleted result)
result))))
(def ^:private
sql:delete-expired
"delete from http_session
where updated_at < now() - ?::interval
or (updated_at is null and
created_at < now() - ?::interval)")

View File

@@ -0,0 +1,144 @@
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) UXBOX Labs SL
(ns app.http.websocket
"A penpot notification service for file cooperative edition."
(:require
[app.common.exceptions :as ex]
[app.common.logging :as l]
[app.common.spec :as us]
[app.db :as db]
[app.metrics :as mtx]
[app.util.websocket :as ws]
[clojure.core.async :as a]
[clojure.spec.alpha :as s]
[integrant.core :as ig]
[yetti.websocket :as yws]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; WEBSOCKET HANDLER
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(declare send-presence!)
(defmulti handle-message
(fn [_wsp message] (:type message)))
(defmethod handle-message :connect
[wsp _]
(let [{:keys [msgbus file-id team-id session-id ::ws/output-ch]} @wsp
sub-ch (a/chan (a/dropping-buffer 32))]
(swap! wsp assoc :sub-ch sub-ch)
;; Start a subscription forwarding goroutine
(a/go-loop []
(when-let [val (a/<! sub-ch)]
(when-not (= (:session-id val) session-id)
;; If we receive a connect message of other user, we need
;; to send an update presence to all participants.
(when (= :connect (:type val))
(a/<! (send-presence! @wsp :presence)))
;; Then, just forward the message
(a/>! output-ch val))
(recur)))
(a/go
(a/<! (msgbus :sub {:topics [file-id team-id] :chan sub-ch}))
(a/<! (send-presence! @wsp :connect)))))
(defmethod handle-message :disconnect
[wsp _]
(a/close! (:sub-ch @wsp))
(send-presence! @wsp :disconnect))
(defmethod handle-message :keepalive
[_ _]
(a/go :nothing))
(defmethod handle-message :pointer-update
[wsp message]
(let [{:keys [profile-id file-id session-id msgbus]} @wsp]
(msgbus :pub {:topic file-id
:message (assoc message
:profile-id profile-id
:session-id session-id)})))
(defmethod handle-message :default
[_ message]
(a/go
(l/log :level :warn
:msg "received unexpected message"
:message message)))
;; --- IMPL
(defn- send-presence!
([ws] (send-presence! ws :presence))
([{:keys [msgbus session-id profile-id file-id]} type]
(msgbus :pub {:topic file-id
:message {:type type
:session-id session-id
:profile-id profile-id}})))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; HTTP HANDLER
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(declare retrieve-file)
(s/def ::msgbus fn?)
(s/def ::file-id ::us/uuid)
(s/def ::session-id ::us/uuid)
(s/def ::handler-params
(s/keys :req-un [::file-id ::session-id]))
(defmethod ig/pre-init-spec ::handler [_]
(s/keys :req-un [::msgbus ::db/pool ::mtx/metrics]))
(defmethod ig/init-key ::handler
[_ {:keys [pool] :as cfg}]
(fn [{:keys [profile-id params] :as req} respond raise]
(let [params (us/conform ::handler-params params)
file (retrieve-file pool (:file-id params))
cfg (-> (merge cfg params)
(assoc :profile-id profile-id)
(assoc :team-id (:team-id file)))]
(cond
(not profile-id)
(raise (ex/error :type :authentication
:hint "Authentication required."))
(not file)
(raise (ex/error :type :not-found
:code :object-not-found))
(not (yws/upgrade-request? req))
(raise (ex/error :type :validation
:code :websocket-request-expected
:hint "this endpoint only accepts websocket connections"))
:else
(->> (ws/handler handle-message cfg)
(yws/upgrade req)
(respond))))))
(def ^:private
sql:retrieve-file
"select f.id as id,
p.team_id as team_id
from file as f
join project as p on (p.id = f.project_id)
where f.id = ?")
(defn- retrieve-file
[conn id]
(db/exec-one! conn [sql:retrieve-file id]))

View File

@@ -1,61 +0,0 @@
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; This Source Code Form is "Incompatible With Secondary Licenses", as
;; defined by the Mozilla Public License, v. 2.0.
;;
;; Copyright (c) 2020 UXBOX Labs SL
(ns app.http.ws
"Web Socket handlers"
(:require
[app.common.spec :as us]
[app.db :as db]
[app.http.session :refer [wrap-session]]
[app.services.notifications :as nf]
[clojure.spec.alpha :as s]
[ring.middleware.cookies :refer [wrap-cookies]]
[ring.middleware.keyword-params :refer [wrap-keyword-params]]
[ring.middleware.params :refer [wrap-params]]))
(s/def ::file-id ::us/uuid)
(s/def ::session-id ::us/uuid)
(s/def ::websocket-params
(s/keys :req-un [::file-id ::session-id]))
(def sql:retrieve-file
"select f.id as id,
p.team_id as team_id
from file as f
join project as p on (p.id = f.project_id)
where f.id = ?")
(defn retrieve-file
[conn id]
(db/exec-one! conn [sql:retrieve-file id]))
(defn websocket
[{:keys [profile-id] :as req}]
(let [params (us/conform ::websocket-params (:params req))
file (retrieve-file db/pool (:file-id params))
params (assoc params
:profile-id profile-id
:team-id (:team-id file))]
(cond
(not profile-id)
{:error {:code 403 :message "Authentication required"}}
(not file)
{:error {:code 404 :message "File does not exists"}}
:else
(nf/websocket params))))
(def handler
(-> websocket
(wrap-session)
(wrap-keyword-params)
(wrap-cookies)
(wrap-params)))

View File

@@ -0,0 +1,346 @@
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) UXBOX Labs SL
(ns app.loggers.audit
"Services related to the user activity (audit log)."
(:require
[app.common.data :as d]
[app.common.exceptions :as ex]
[app.common.logging :as l]
[app.common.spec :as us]
[app.common.transit :as t]
[app.common.uuid :as uuid]
[app.config :as cf]
[app.db :as db]
[app.util.async :as aa]
[app.util.http :as http]
[app.util.time :as dt]
[app.worker :as wrk]
[clojure.core.async :as a]
[clojure.spec.alpha :as s]
[cuerdas.core :as str]
[integrant.core :as ig]
[lambdaisland.uri :as u]
[promesa.core :as p]
[promesa.exec :as px]))
(defn parse-client-ip
[{:keys [headers] :as request}]
(or (some-> (get headers "x-forwarded-for") (str/split ",") first)
(get headers "x-real-ip")
(get request :remote-addr)))
(defn profile->props
[profile]
(-> profile
(select-keys [:is-active :is-muted :auth-backend :email :default-team-id :default-project-id :fullname :lang])
(merge (:props profile))
(d/without-nils)))
(defn clean-props
[{:keys [profile-id] :as event}]
(let [invalid-keys #{:session-id
:password
:old-password
:token}
xform (comp
(remove (fn [kv]
(qualified-keyword? (first kv))))
(remove (fn [kv]
(contains? invalid-keys (first kv))))
(remove (fn [[k v]]
(and (= k :profile-id)
(= v profile-id))))
(filter (fn [[_ v]]
(or (string? v)
(keyword? v)
(uuid? v)
(boolean? v)
(number? v)))))]
(update event :props #(into {} xform %))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; HTTP Handler
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(declare persist-http-events)
(s/def ::profile-id ::us/uuid)
(s/def ::name ::us/string)
(s/def ::type ::us/string)
(s/def ::props (s/map-of ::us/keyword any?))
(s/def ::timestamp dt/instant?)
(s/def ::context (s/map-of ::us/keyword any?))
(s/def ::frontend-event
(s/keys :req-un [::type ::name ::props ::timestamp ::profile-id]
:opt-un [::context]))
(s/def ::frontend-events (s/every ::frontend-event))
(defmethod ig/init-key ::http-handler
[_ {:keys [executor pool] :as cfg}]
(if (or (db/read-only? pool) (not (contains? cf/flags :audit-log)))
(do
(l/warn :hint "audit log http handler disabled or db is read-only")
(fn [_ respond _]
(respond {:status 204 :body ""})))
(letfn [(handler [{:keys [params profile-id] :as request}]
(let [events (->> (:events params)
(remove #(not= profile-id (:profile-id %)))
(us/conform ::frontend-events))
ip-addr (parse-client-ip request)
cfg (-> cfg
(assoc :source "frontend")
(assoc :events events)
(assoc :ip-addr ip-addr))]
(persist-http-events cfg)))
(handle-error [cause]
(let [xdata (ex-data cause)]
(if (= :spec-validation (:code xdata))
(l/error ::l/raw (str "spec validation on persist-events:\n" (us/pretty-explain xdata)))
(l/error :hint "error on persist-events" :cause cause))))]
(fn [request respond _]
;; Fire and forget, log error in case of errro
(-> (px/submit! executor #(handler request))
(p/catch handle-error))
(respond {:status 204 :body ""})))))
(defn- persist-http-events
[{:keys [pool events ip-addr source] :as cfg}]
(let [columns [:id :name :source :type :tracked-at :profile-id :ip-addr :props :context]
prepare-xf (map (fn [event]
[(uuid/next)
(:name event)
source
(:type event)
(:timestamp event)
(:profile-id event)
(db/inet ip-addr)
(db/tjson (:props event))
(db/tjson (d/without-nils (:context event)))]))]
(when (seq events)
(->> (into [] prepare-xf events)
(db/insert-multi! pool :audit-log columns)))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Collector
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Defines a service that collects the audit/activity log using
;; internal database. Later this audit log can be transferred to
;; an external storage and data cleared.
(declare persist-events)
(defmethod ig/pre-init-spec ::collector [_]
(s/keys :req-un [::db/pool ::wrk/executor]))
(s/def ::ip-addr string?)
(s/def ::backend-event
(s/keys :req-un [::type ::name ::profile-id]
:opt-un [::ip-addr ::props]))
(def ^:private backend-event-xform
(comp
(filter #(us/valid? ::backend-event %))
(map clean-props)))
(defmethod ig/init-key ::collector
[_ {:keys [pool] :as cfg}]
(cond
(not (contains? cf/flags :audit-log))
(do
(l/info :hint "audit log collection disabled")
(constantly nil))
(db/read-only? pool)
(do
(l/warn :hint "audit log collection disabled, db is read-only")
(constantly nil))
:else
(let [input (a/chan 512 backend-event-xform)
buffer (aa/batch input {:max-batch-size 100
:max-batch-age (* 10 1000) ; 10s
:init []})]
(l/info :hint "audit log collector initialized")
(a/go-loop []
(when-let [[_type events] (a/<! buffer)]
(let [res (a/<! (persist-events cfg events))]
(when (ex/exception? res)
(l/error :hint "error on persisting events" :cause res))
(recur))))
(fn [& {:keys [cmd] :as params}]
(case cmd
:stop
(a/close! input)
:submit
(let [params (-> params
(dissoc :cmd)
(assoc :tracked-at (dt/now)))]
(when-not (a/offer! input params)
(l/warn :hint "activity channel is full"))))))))
(defn- persist-events
[{:keys [pool executor] :as cfg} events]
(letfn [(event->row [event]
[(uuid/next)
(:name event)
(:type event)
(:profile-id event)
(:tracked-at event)
(some-> (:ip-addr event) db/inet)
(db/tjson (:props event))
"backend"])]
(aa/with-thread executor
(when (seq events)
(db/with-atomic [conn pool]
(db/insert-multi! conn :audit-log
[:id :name :type :profile-id :tracked-at :ip-addr :props :source]
(sequence (keep event->row) events)))))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Archive Task
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; This is a task responsible to send the accumulated events to an
;; external service for archival.
(declare archive-events)
(s/def ::uri ::us/string)
(s/def ::tokens fn?)
(defmethod ig/pre-init-spec ::archive-task [_]
(s/keys :req-un [::db/pool ::tokens]
:opt-un [::uri]))
(defmethod ig/init-key ::archive-task
[_ {:keys [uri] :as cfg}]
(fn [props]
;; NOTE: this let allows overwrite default configured values from
;; the repl, when manually invoking the task.
(let [enabled (or (contains? cf/flags :audit-log-archive)
(:enabled props false))
uri (or uri (:uri props))
cfg (assoc cfg :uri uri)]
(when (and enabled (not uri))
(ex/raise :type :internal
:code :task-not-configured
:hint "archive task not configured, missing uri"))
(when enabled
(loop []
(let [res (archive-events cfg)]
(when (= res :continue)
(aa/thread-sleep 200)
(recur))))))))
(def sql:retrieve-batch-of-audit-log
"select * from audit_log
where archived_at is null
order by created_at asc
limit 1000
for update skip locked;")
(defn archive-events
[{:keys [pool uri tokens] :as cfg}]
(letfn [(decode-row [{:keys [props ip-addr context] :as row}]
(cond-> row
(db/pgobject? props)
(assoc :props (db/decode-transit-pgobject props))
(db/pgobject? context)
(assoc :context (db/decode-transit-pgobject context))
(db/pgobject? ip-addr "inet")
(assoc :ip-addr (db/decode-inet ip-addr))))
(row->event [row]
(select-keys row [:type
:name
:source
:created-at
:tracked-at
:profile-id
:ip-addr
:props
:context]))
(send [events]
(let [token (tokens :generate {:iss "authentication"
:iat (dt/now)
:uid uuid/zero})
body (t/encode {:events events})
headers {"content-type" "application/transit+json"
"origin" (cf/get :public-uri)
"cookie" (u/map->query-string {:auth-token token})}
params {:uri uri
:timeout 6000
:method :post
:headers headers
:body body}
resp (http/send! params)]
(if (= (:status resp) 204)
true
(do
(l/warn :hint "unable to archive events"
:resp-status (:status resp))
false))))
(mark-as-archived [conn rows]
(db/exec-one! conn ["update audit_log set archived_at=now() where id = ANY(?)"
(->> (map :id rows)
(into-array java.util.UUID)
(db/create-array conn "uuid"))]))]
(db/with-atomic [conn pool]
(let [rows (db/exec! conn [sql:retrieve-batch-of-audit-log])
xform (comp (map decode-row)
(map row->event))
events (into [] xform rows)]
(when-not (empty? events)
(l/debug :action "archive-events" :uri uri :events (count events))
(when (send events)
(mark-as-archived conn rows)
:continue))))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; GC Task
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(def sql:clean-archived
"delete from audit_log
where archived_at is not null
and archived_at < now() - ?::interval")
(defn- clean-archived
[{:keys [pool max-age]}]
(let [interval (db/interval max-age)
result (db/exec-one! pool [sql:clean-archived interval])
result (:next.jdbc/update-count result)]
(l/debug :action "clean archived audit log" :removed result)
result))
(s/def ::max-age ::cf/audit-log-gc-max-age)
(defmethod ig/pre-init-spec ::gc-task [_]
(s/keys :req-un [::db/pool ::max-age]))
(defmethod ig/init-key ::gc-task
[_ cfg]
(fn [_]
(clean-archived cfg)))

View File

@@ -0,0 +1,92 @@
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) UXBOX Labs SL
(ns app.loggers.database
"A specific logger impl that persists errors on the database."
(:require
[app.common.logging :as l]
[app.common.uuid :as uuid]
[app.config :as cf]
[app.db :as db]
[app.util.async :as aa]
[app.worker :as wrk]
[clojure.core.async :as a]
[clojure.spec.alpha :as s]
[cuerdas.core :as str]
[integrant.core :as ig]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Error Listener
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(declare handle-event)
(defonce enabled (atom true))
(defn- persist-on-database!
[{:keys [pool] :as cfg} {:keys [id] :as event}]
(when-not (db/read-only? pool)
(db/insert! pool :server-error-report {:id id :content (db/tjson event)})))
(defn- parse-event-data
[event]
(reduce-kv
(fn [acc k v]
(cond
(= k :id) (assoc acc k (uuid/uuid v))
(= k :profile-id) (assoc acc k (uuid/uuid v))
(str/blank? v) acc
:else (assoc acc k v)))
{}
event))
(defn parse-event
[event]
(-> (parse-event-data event)
(assoc :tenant (cf/get :tenant))
(assoc :host (cf/get :host))
(assoc :public-uri (cf/get :public-uri))
(assoc :version (:full cf/version))
(update :id #(or % (uuid/next)))))
(defn handle-event
[{:keys [executor] :as cfg} event]
(aa/with-thread executor
(try
(let [event (parse-event event)
uri (cf/get :public-uri)]
(l/debug :hint "registering error on database" :id (:id event)
:uri (str uri "/dbg/error/" (:id event)))
(persist-on-database! cfg event))
(catch Exception cause
(l/warn :hint "unexpected exception on database error logger" :cause cause)))))
(defmethod ig/pre-init-spec ::reporter [_]
(s/keys :req-un [::wrk/executor ::db/pool ::receiver]))
(defn error-event?
[event]
(= "error" (:logger/level event)))
(defmethod ig/init-key ::reporter
[_ {:keys [receiver] :as cfg}]
(l/info :msg "initializing database error persistence")
(let [output (a/chan (a/sliding-buffer 5) (filter error-event?))]
(receiver :sub output)
(a/go-loop []
(let [msg (a/<! output)]
(if (nil? msg)
(l/info :msg "stoping error reporting loop")
(do
(a/<! (handle-event cfg msg))
(recur)))))
output))
(defmethod ig/halt-key! ::reporter
[_ output]
(a/close! output))

View File

@@ -0,0 +1,99 @@
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) UXBOX Labs SL
(ns app.loggers.loki
"A Loki integration."
(:require
[app.common.logging :as l]
[app.common.spec :as us]
[app.config :as cfg]
[app.util.async :as aa]
[app.util.http :as http]
[app.util.json :as json]
[app.worker :as wrk]
[clojure.core.async :as a]
[clojure.spec.alpha :as s]
[integrant.core :as ig]))
(declare handle-event)
(s/def ::uri ::us/string)
(s/def ::receiver fn?)
(defmethod ig/pre-init-spec ::reporter [_]
(s/keys :req-un [::wrk/executor ::receiver]
:opt-un [::uri]))
(defmethod ig/init-key ::reporter
[_ {:keys [receiver uri] :as cfg}]
(when uri
(l/info :msg "initializing loki reporter" :uri uri)
(let [input (a/chan (a/dropping-buffer 512))]
(receiver :sub input)
(a/go-loop []
(let [msg (a/<! input)]
(if (nil? msg)
(l/info :msg "stoping error reporting loop")
(do
(a/<! (handle-event cfg msg))
(recur)))))
input)))
(defmethod ig/halt-key! ::reporter
[_ output]
(when output
(a/close! output)))
(defn- prepare-payload
[event]
(let [labels {:host (cfg/get :host)
:tenant (cfg/get :tenant)
:version (:full cfg/version)
:logger (:logger/name event)
:level (:logger/level event)}]
{:streams
[{:stream labels
:values [[(str (* (inst-ms (:created-at event)) 1000000))
(str (:message event)
(when-let [error (:trace event)]
(str "\n" error)))]]}]}))
(defn- send-log
[uri payload i]
(try
(let [response (http/send! {:uri uri
:timeout 6000
:method :post
:headers {"content-type" "application/json"}
:body (json/write payload)})]
(cond
(= (:status response) 204)
true
(= (:status response) 400)
(do
(l/error :hint "error on sending log to loki (no retry)"
:rsp (pr-str response))
true)
:else
(do
(l/error :hint "error on sending log to loki" :try i
:rsp (pr-str response))
false)))
(catch Exception e
(l/error :hint "error on sending message to loki" :cause e :try i)
false)))
(defn- handle-event
[{:keys [executor uri]} event]
(aa/with-thread executor
(let [payload (prepare-payload event)]
(loop [i 1]
(when (and (not (send-log uri payload i)) (< i 20))
(Thread/sleep (* i 2000))
(recur (inc i)))))))

View File

@@ -0,0 +1,80 @@
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) UXBOX Labs SL
(ns app.loggers.mattermost
"A mattermost integration for error reporting."
(:require
[app.common.logging :as l]
[app.config :as cf]
[app.db :as db]
[app.loggers.database :as ldb]
[app.util.async :as aa]
[app.util.http :as http]
[app.util.json :as json]
[app.worker :as wrk]
[clojure.core.async :as a]
[clojure.spec.alpha :as s]
[integrant.core :as ig]))
(defonce enabled (atom true))
(defn- send-mattermost-notification!
[cfg {:keys [host id public-uri] :as event}]
(try
(let [uri (:uri cfg)
text (str "Exception on (host: " host ", url: " public-uri "/dbg/error/" id ")\n"
(when-let [pid (:profile-id event)]
(str "- profile-id: #uuid-" pid "\n")))
rsp (http/send! {:uri uri
:method :post
:headers {"content-type" "application/json"}
:body (json/write-str {:text text})})]
(when (not= (:status rsp) 200)
(l/error :hint "error on sending data to mattermost"
:response (pr-str rsp))))
(catch Exception e
(l/error :hint "unexpected exception on error reporter"
:cause e))))
(defn handle-event
[{:keys [executor] :as cfg} event]
(aa/with-thread executor
(try
(let [event (ldb/parse-event event)]
(when @enabled
(send-mattermost-notification! cfg event)))
(catch Exception e
(l/warn :hint "unexpected exception on error reporter" :cause e)))))
(s/def ::uri ::cf/error-report-webhook)
(defmethod ig/pre-init-spec ::reporter [_]
(s/keys :req-un [::wrk/executor ::db/pool ::receiver]
:opt-un [::uri]))
(defmethod ig/init-key ::reporter
[_ {:keys [receiver uri] :as cfg}]
(when uri
(l/info :msg "initializing mattermost error reporter" :uri uri)
(let [output (a/chan (a/sliding-buffer 128)
(filter (fn [event]
(= (:logger/level event) "error"))))]
(receiver :sub output)
(a/go-loop []
(let [msg (a/<! output)]
(if (nil? msg)
(l/info :msg "stoping error reporting loop")
(do
(a/<! (handle-event cfg msg))
(recur)))))
output)))
(defmethod ig/halt-key! ::reporter
[_ output]
(when output
(a/close! output)))

View File

@@ -0,0 +1,170 @@
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) UXBOX Labs SL
(ns app.loggers.sentry
"A mattermost integration for error reporting."
(:require
[app.common.logging :as l]
[app.common.uuid :as uuid]
[app.config :as cf]
[app.db :as db]
[app.util.async :as aa]
[app.worker :as wrk]
[clojure.core.async :as a]
[clojure.spec.alpha :as s]
[cuerdas.core :as str]
[integrant.core :as ig])
(:import
io.sentry.Scope
io.sentry.IHub
io.sentry.Hub
io.sentry.NoOpHub
io.sentry.protocol.User
io.sentry.SentryOptions
io.sentry.SentryLevel
io.sentry.ScopeCallback))
(defonce enabled (atom true))
(defn- parse-context
[event]
(reduce-kv
(fn [acc k v]
(cond
(= k :id) (assoc acc k (uuid/uuid v))
(= k :profile-id) (assoc acc k (uuid/uuid v))
(str/blank? v) acc
:else (assoc acc k v)))
{}
(:context event)))
(defn- parse-event
[event]
(assoc event :context (parse-context event)))
(defn- build-sentry-options
[cfg]
(let [version (:base cf/version)]
(doto (SentryOptions.)
(.setDebug (:debug cfg false))
(.setTracesSampleRate (:traces-sample-rate cfg 1.0))
(.setDsn (:dsn cfg))
(.setServerName (cf/get :host))
(.setEnvironment (cf/get :tenant))
(.setAttachServerName true)
(.setAttachStacktrace (:attach-stack-trace cfg false))
(.setRelease (str "backend@" (if (= version "0.0.0") "develop" version))))))
(defn handle-event
[^IHub shub event]
(letfn [(set-user! [^Scope scope {:keys [context] :as event}]
(let [user (User.)]
(.setIpAddress ^User user ^String (:ip-addr context))
(when-let [pid (:profile-id context)]
(.setId ^User user ^String (str pid)))
(.setUser scope ^User user)))
(set-level! [^Scope scope]
(.setLevel scope SentryLevel/ERROR))
(set-context! [^Scope scope {:keys [context] :as event}]
(let [uri (str (cf/get :public-uri) "/dbg/error-by-id/" (:id context))]
(.setContexts scope "detailed_error_uri" ^String uri))
(when-let [vers (:frontend-version event)]
(.setContexts scope "frontend_version" ^String vers))
(when-let [puri (:public-uri event)]
(.setContexts scope "public_uri" ^String (str puri)))
(when-let [uagent (:user-agent context)]
(.setContexts scope "user_agent" ^String uagent))
(when-let [tenant (:tenant event)]
(.setTag scope "tenant" ^String tenant))
(when-let [type (:error-type context)]
(.setTag scope "error_type" ^String (str type)))
(when-let [code (:error-code context)]
(.setTag scope "error_code" ^String (str code)))
)
(capture [^Scope scope {:keys [context error] :as event}]
(let [msg (str (:message error) "\n\n"
"======================================================\n"
"=================== Params ===========================\n"
"======================================================\n"
(:params context) "\n"
(when (:explain context)
(str "======================================================\n"
"=================== Explain ==========================\n"
"======================================================\n"
(:explain context) "\n"))
(when (:data context)
(str "======================================================\n"
"=================== Error Data =======================\n"
"======================================================\n"
(:data context) "\n"))
(str "======================================================\n"
"=================== Stack Trace ======================\n"
"======================================================\n"
(:trace error))
"\n")]
(set-user! scope event)
(set-level! scope)
(set-context! scope event)
(.captureMessage ^IHub shub msg)
))
]
(when @enabled
(.withScope ^IHub shub (reify ScopeCallback
(run [_ scope]
(->> event
(parse-event)
(capture scope))))))
))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Error Listener
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(s/def ::receiver any?)
(s/def ::dsn ::cf/sentry-dsn)
(s/def ::trace-sample-rate ::cf/sentry-trace-sample-rate)
(s/def ::attach-stack-trace ::cf/sentry-attach-stack-trace)
(s/def ::debug ::cf/sentry-debug)
(defmethod ig/pre-init-spec ::reporter [_]
(s/keys :req-un [::wrk/executor ::db/pool ::receiver]
:opt-un [::dsn ::trace-sample-rate ::attach-stack-trace]))
(defmethod ig/init-key ::reporter
[_ {:keys [receiver dsn executor] :as cfg}]
(l/info :msg "initializing sentry reporter" :dsn dsn)
(let [opts (build-sentry-options cfg)
shub (if dsn
(Hub. ^SentryOptions opts)
(NoOpHub/getInstance))
output (a/chan (a/sliding-buffer 128)
(filter #(= (:level %) "error")))]
(receiver :sub output)
(a/go-loop []
(let [event (a/<! output)]
(if (nil? event)
(do
(l/info :msg "stoping error reporting loop")
(.close ^IHub shub))
(do
(a/<! (aa/with-thread executor (handle-event shub event)))
(recur)))))
output))
(defmethod ig/halt-key! ::reporter
[_ output]
(when output
(a/close! output)))

View File

@@ -0,0 +1,106 @@
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) UXBOX Labs SL
(ns app.loggers.zmq
"A generic ZMQ listener."
(:require
[app.common.exceptions :as ex]
[app.common.logging :as l]
[app.common.spec :as us]
[app.util.json :as json]
[app.util.time :as dt]
[clojure.core.async :as a]
[clojure.spec.alpha :as s]
[cuerdas.core :as str]
[integrant.core :as ig])
(:import
org.zeromq.SocketType
org.zeromq.ZMQ$Socket
org.zeromq.ZContext))
(declare prepare)
(declare start-rcv-loop)
(s/def ::endpoint ::us/string)
(defmethod ig/pre-init-spec ::receiver [_]
(s/keys :opt-un [::endpoint]))
(defmethod ig/init-key ::receiver
[_ {:keys [endpoint] :as cfg}]
(l/info :msg "initializing ZMQ receiver" :bind endpoint)
(let [buffer (a/chan 1)
output (a/chan 1 (comp (filter map?)
(keep prepare)))
mult (a/mult output)]
(when endpoint
(a/thread (start-rcv-loop {:out buffer :endpoint endpoint})))
(a/pipe buffer output)
(with-meta
(fn [cmd ch]
(case cmd
:sub (a/tap mult ch)
:unsub (a/untap mult ch))
ch)
{::output output
::buffer buffer
::mult mult})))
(defmethod ig/halt-key! ::receiver
[_ f]
(a/close! (::buffer (meta f))))
(def ^:private json-mapper
(json/mapper
{:encode-key-fn str/camel
:decode-key-fn (comp keyword str/kebab)}))
(defn- start-rcv-loop
([] (start-rcv-loop nil))
([{:keys [out endpoint] :or {endpoint "tcp://localhost:5556"}}]
(let [out (or out (a/chan 1))
zctx (ZContext.)
socket (.. zctx (createSocket SocketType/SUB))]
(.. socket (connect ^String endpoint))
(.. socket (subscribe ""))
(.. socket (setReceiveTimeOut 5000))
(loop []
(let [msg (.recv ^ZMQ$Socket socket)
msg (ex/ignoring (json/read msg json-mapper))
msg (if (nil? msg) :empty msg)]
(if (a/>!! out msg)
(recur)
(do
(.close ^java.lang.AutoCloseable socket)
(.close ^java.lang.AutoCloseable zctx))))))))
(s/def ::logger-name string?)
(s/def ::level string?)
(s/def ::thread string?)
(s/def ::time-millis integer?)
(s/def ::message string?)
(s/def ::context-map map?)
(s/def ::throw map?)
(s/def ::log4j-event
(s/keys :req-un [::logger-name ::level ::thread ::time-millis ::message]
:opt-un [::context-map ::thrown]))
(defn- prepare
[event]
(if (s/valid? ::log4j-event event)
(merge {:message (:message event)
:created-at (dt/instant (:time-millis event))
:logger/name (:logger-name event)
:logger/level (str/lower (:level event))}
(when-let [thrown (:thrown event)]
{:trace (:extended-stack-trace thrown)})
(:context-map event))
(do
(l/warn :hint "invalid event" :event event)
nil)))

View File

@@ -2,41 +2,367 @@
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; This Source Code Form is "Incompatible With Secondary Licenses", as
;; defined by the Mozilla Public License, v. 2.0.
;;
;; Copyright (c) 2020 UXBOX Labs SL
;; Copyright (c) UXBOX Labs SL
(ns app.main
(:require
[app.config :as cfg]
[clojure.tools.logging :as log]
[mount.core :as mount]))
[app.common.logging :as l]
[app.config :as cf]
[app.util.time :as dt]
[integrant.core :as ig])
(:gen-class))
(defn- enable-asserts
[_]
(let [m (System/getProperty "app.enable-asserts")]
(or (nil? m) (= "true" m))))
(def system-config
{:app.db/pool
{:uri (cf/get :database-uri)
:username (cf/get :database-username)
:password (cf/get :database-password)
:read-only (cf/get :database-readonly false)
:metrics (ig/ref :app.metrics/metrics)
:migrations (ig/ref :app.migrations/all)
:name :main
:min-size (cf/get :database-min-pool-size 0)
:max-size (cf/get :database-max-pool-size 30)}
;; Set value for all new threads bindings.
(alter-var-root #'*assert* enable-asserts)
;; Default thread pool for IO operations
[::default :app.worker/executor]
{:parallelism (cf/get :default-executor-parallelism 60)
:prefix :default}
;; Set value for current thread binding.
(set! *assert* (enable-asserts nil))
;; Constrained thread pool. Should only be used from high demand
;; RPC methods.
[::blocking :app.worker/executor]
{:parallelism (cf/get :blocking-executor-parallelism 20)
:prefix :blocking}
;; --- Entry point
;; Dedicated thread pool for backround tasks execution.
[::worker :app.worker/executor]
{:parallelism (cf/get :worker-executor-parallelism 10)
:prefix :worker}
(defn run
[_params]
(require 'app.srepl.server
'app.services
'app.migrations
'app.worker
'app.media
'app.http)
(mount/start)
(log/infof "Welcome to penpot! Version: '%s'." (:full @cfg/version)))
:app.worker/executors
{:default (ig/ref [::default :app.worker/executor])
:worker (ig/ref [::worker :app.worker/executor])
:blocking (ig/ref [::blocking :app.worker/executor])}
:app.worker/executors-monitor
{:metrics (ig/ref :app.metrics/metrics)
:executors (ig/ref :app.worker/executors)}
:app.migrations/migrations
{}
:app.metrics/metrics
{}
:app.migrations/all
{:main (ig/ref :app.migrations/migrations)}
:app.msgbus/msgbus
{:backend (cf/get :msgbus-backend :redis)
:redis-uri (cf/get :redis-uri)}
:app.tokens/tokens
{:keys (ig/ref :app.setup/keys)}
:app.storage/gc-deleted-task
{:pool (ig/ref :app.db/pool)
:storage (ig/ref :app.storage/storage)
:min-age (dt/duration {:hours 2})}
:app.storage/gc-touched-task
{:pool (ig/ref :app.db/pool)}
:app.http.session/session
{:pool (ig/ref :app.db/pool)
:tokens (ig/ref :app.tokens/tokens)}
:app.http.session/gc-task
{:pool (ig/ref :app.db/pool)
:max-age (cf/get :http-session-idle-max-age)}
:app.http.session/updater
{:pool (ig/ref :app.db/pool)
:metrics (ig/ref :app.metrics/metrics)
:executor (ig/ref [::worker :app.worker/executor])
:session (ig/ref :app.http.session/session)
:max-batch-age (cf/get :http-session-updater-batch-max-age)
:max-batch-size (cf/get :http-session-updater-batch-max-size)}
:app.http.awsns/handler
{:tokens (ig/ref :app.tokens/tokens)
:pool (ig/ref :app.db/pool)}
:app.http/server
{:port (cf/get :http-server-port)
:host (cf/get :http-server-host)
:router (ig/ref :app.http/router)
:metrics (ig/ref :app.metrics/metrics)
:max-threads (cf/get :http-server-max-threads)
:min-threads (cf/get :http-server-min-threads)}
:app.http/router
{:assets (ig/ref :app.http.assets/handlers)
:feedback (ig/ref :app.http.feedback/handler)
:session (ig/ref :app.http.session/session)
:sns-webhook (ig/ref :app.http.awsns/handler)
:oauth (ig/ref :app.http.oauth/handler)
:debug (ig/ref :app.http.debug/handlers)
:ws (ig/ref :app.http.websocket/handler)
:metrics (ig/ref :app.metrics/metrics)
:public-uri (cf/get :public-uri)
:storage (ig/ref :app.storage/storage)
:tokens (ig/ref :app.tokens/tokens)
:audit-http-handler (ig/ref :app.loggers.audit/http-handler)
:rpc (ig/ref :app.rpc/rpc)}
:app.http.debug/handlers
{:pool (ig/ref :app.db/pool)
:executor (ig/ref [::default :app.worker/executor])}
:app.http.websocket/handler
{:pool (ig/ref :app.db/pool)
:metrics (ig/ref :app.metrics/metrics)
:msgbus (ig/ref :app.msgbus/msgbus)}
:app.http.assets/handlers
{:metrics (ig/ref :app.metrics/metrics)
:assets-path (cf/get :assets-path)
:storage (ig/ref :app.storage/storage)
:executor (ig/ref [::default :app.worker/executor])
:cache-max-age (dt/duration {:hours 24})
:signature-max-age (dt/duration {:hours 24 :minutes 5})}
:app.http.feedback/handler
{:pool (ig/ref :app.db/pool)
:executor (ig/ref [::default :app.worker/executor])}
:app.http.oauth/handler
{:rpc (ig/ref :app.rpc/rpc)
:session (ig/ref :app.http.session/session)
:pool (ig/ref :app.db/pool)
:tokens (ig/ref :app.tokens/tokens)
:audit (ig/ref :app.loggers.audit/collector)
:executor (ig/ref [::default :app.worker/executor])
:public-uri (cf/get :public-uri)}
:app.rpc/rpc
{:pool (ig/ref :app.db/pool)
:session (ig/ref :app.http.session/session)
:tokens (ig/ref :app.tokens/tokens)
:metrics (ig/ref :app.metrics/metrics)
:storage (ig/ref :app.storage/storage)
:msgbus (ig/ref :app.msgbus/msgbus)
:public-uri (cf/get :public-uri)
:audit (ig/ref :app.loggers.audit/collector)
:executors (ig/ref :app.worker/executors)}
:app.worker/worker
{:executor (ig/ref [::worker :app.worker/executor])
:tasks (ig/ref :app.worker/registry)
:metrics (ig/ref :app.metrics/metrics)
:pool (ig/ref :app.db/pool)}
:app.worker/scheduler
{:executor (ig/ref [::worker :app.worker/executor])
:tasks (ig/ref :app.worker/registry)
:pool (ig/ref :app.db/pool)
:schedule
[{:cron #app/cron "0 0 0 * * ?" ;; daily
:task :file-media-gc}
{:cron #app/cron "0 0 * * * ?" ;; hourly
:task :file-xlog-gc}
{:cron #app/cron "0 0 0 * * ?" ;; daily
:task :storage-deleted-gc}
{:cron #app/cron "0 0 0 * * ?" ;; daily
:task :storage-touched-gc}
{:cron #app/cron "0 0 0 * * ?" ;; daily
:task :session-gc}
{:cron #app/cron "0 0 0 * * ?" ;; daily
:task :objects-gc}
{:cron #app/cron "0 0 0 * * ?" ;; daily
:task :tasks-gc}
(when (cf/get :fdata-storage-backed)
{:cron #app/cron "0 0 * * * ?" ;; hourly
:task :file-offload})
(when (contains? cf/flags :audit-log-archive)
{:cron #app/cron "0 */5 * * * ?" ;; every 5m
:task :audit-log-archive})
(when (contains? cf/flags :audit-log-gc)
{:cron #app/cron "0 0 0 * * ?" ;; daily
:task :audit-log-gc})
(when (or (contains? cf/flags :telemetry)
(cf/get :telemetry-enabled))
{:cron #app/cron "0 30 */3,23 * * ?"
:task :telemetry})]}
:app.worker/registry
{:metrics (ig/ref :app.metrics/metrics)
:tasks
{:sendmail (ig/ref :app.emails/sendmail-handler)
:objects-gc (ig/ref :app.tasks.objects-gc/handler)
:file-media-gc (ig/ref :app.tasks.file-media-gc/handler)
:file-xlog-gc (ig/ref :app.tasks.file-xlog-gc/handler)
:storage-deleted-gc (ig/ref :app.storage/gc-deleted-task)
:storage-touched-gc (ig/ref :app.storage/gc-touched-task)
:tasks-gc (ig/ref :app.tasks.tasks-gc/handler)
:telemetry (ig/ref :app.tasks.telemetry/handler)
:session-gc (ig/ref :app.http.session/gc-task)
:file-offload (ig/ref :app.tasks.file-offload/handler)
:audit-log-archive (ig/ref :app.loggers.audit/archive-task)
:audit-log-gc (ig/ref :app.loggers.audit/gc-task)}}
:app.emails/sendmail-handler
{:host (cf/get :smtp-host)
:port (cf/get :smtp-port)
:ssl (cf/get :smtp-ssl)
:tls (cf/get :smtp-tls)
:username (cf/get :smtp-username)
:password (cf/get :smtp-password)
:metrics (ig/ref :app.metrics/metrics)
:default-reply-to (cf/get :smtp-default-reply-to)
:default-from (cf/get :smtp-default-from)}
:app.tasks.tasks-gc/handler
{:pool (ig/ref :app.db/pool)
:max-age cf/deletion-delay}
:app.tasks.objects-gc/handler
{:pool (ig/ref :app.db/pool)
:storage (ig/ref :app.storage/storage)
:max-age cf/deletion-delay}
:app.tasks.file-media-gc/handler
{:pool (ig/ref :app.db/pool)
:max-age cf/deletion-delay}
:app.tasks.file-xlog-gc/handler
{:pool (ig/ref :app.db/pool)
:max-age (dt/duration {:hours 72})}
:app.tasks.file-offload/handler
{:pool (ig/ref :app.db/pool)
:max-age (dt/duration {:seconds 5})
:storage (ig/ref :app.storage/storage)
:backend (cf/get :fdata-storage-backed :fdata-s3)}
:app.tasks.telemetry/handler
{:pool (ig/ref :app.db/pool)
:version (:full cf/version)
:uri (cf/get :telemetry-uri)
:sprops (ig/ref :app.setup/props)}
:app.srepl/server
{:port (cf/get :srepl-port)
:host (cf/get :srepl-host)}
:app.setup/props
{:pool (ig/ref :app.db/pool)
:key (cf/get :secret-key)}
:app.setup/keys
{:props (ig/ref :app.setup/props)}
:app.loggers.zmq/receiver
{:endpoint (cf/get :loggers-zmq-uri)}
:app.loggers.audit/http-handler
{:pool (ig/ref :app.db/pool)
:executor (ig/ref [::worker :app.worker/executor])}
:app.loggers.audit/collector
{:pool (ig/ref :app.db/pool)
:executor (ig/ref [::worker :app.worker/executor])}
:app.loggers.audit/archive-task
{:uri (cf/get :audit-log-archive-uri)
:tokens (ig/ref :app.tokens/tokens)
:pool (ig/ref :app.db/pool)}
:app.loggers.audit/gc-task
{:max-age (cf/get :audit-log-gc-max-age cf/deletion-delay)
:pool (ig/ref :app.db/pool)}
:app.loggers.loki/reporter
{:uri (cf/get :loggers-loki-uri)
:receiver (ig/ref :app.loggers.zmq/receiver)
:executor (ig/ref [::worker :app.worker/executor])}
:app.loggers.mattermost/reporter
{:uri (cf/get :error-report-webhook)
:receiver (ig/ref :app.loggers.zmq/receiver)
:pool (ig/ref :app.db/pool)
:executor (ig/ref [::worker :app.worker/executor])}
:app.loggers.database/reporter
{:receiver (ig/ref :app.loggers.zmq/receiver)
:pool (ig/ref :app.db/pool)
:executor (ig/ref [::worker :app.worker/executor])}
:app.storage/storage
{:pool (ig/ref :app.db/pool)
:backends
{:assets-s3 (ig/ref [::assets :app.storage.s3/backend])
:assets-db (ig/ref [::assets :app.storage.db/backend])
:assets-fs (ig/ref [::assets :app.storage.fs/backend])
:tmp (ig/ref [::tmp :app.storage.fs/backend])
:fdata-s3 (ig/ref [::fdata :app.storage.s3/backend])
;; keep this for backward compatibility
:s3 (ig/ref [::assets :app.storage.s3/backend])
:fs (ig/ref [::assets :app.storage.fs/backend])}}
[::fdata :app.storage.s3/backend]
{:region (cf/get :storage-fdata-s3-region)
:bucket (cf/get :storage-fdata-s3-bucket)
:endpoint (cf/get :storage-fdata-s3-endpoint)
:prefix (cf/get :storage-fdata-s3-prefix)}
[::assets :app.storage.s3/backend]
{:region (cf/get :storage-assets-s3-region)
:endpoint (cf/get :storage-assets-s3-endpoint)
:bucket (cf/get :storage-assets-s3-bucket)}
[::assets :app.storage.fs/backend]
{:directory (cf/get :storage-assets-fs-directory)}
[::tmp :app.storage.fs/backend]
{:directory "/tmp/penpot"}
[::assets :app.storage.db/backend]
{:pool (ig/ref :app.db/pool)}})
(def system nil)
(defn start
[]
(ig/load-namespaces system-config)
(alter-var-root #'system (fn [sys]
(when sys (ig/halt! sys))
(-> system-config
(ig/prep)
(ig/init))))
(l/info :msg "welcome to penpot"
:version (:full cf/version)))
(defn stop
[]
(alter-var-root #'system (fn [sys]
(when sys (ig/halt! sys))
nil)))
(defn -main
[& _args]
(run {}))
(start))

View File

@@ -2,42 +2,38 @@
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; This Source Code Form is "Incompatible With Secondary Licenses", as
;; defined by the Mozilla Public License, v. 2.0.
;;
;; Copyright (c) 2020 UXBOX Labs SL
;; Copyright (c) UXBOX Labs SL
(ns app.media
"Media postprocessing."
"Media & Font postprocessing."
(:require
[app.common.data :as d]
[app.common.exceptions :as ex]
[app.common.media :as cm]
[app.common.spec :as us]
[app.config :as cfg]
[app.util.http :as http]
[clojure.core.async :as a]
[app.config :as cf]
[app.util.svg :as svg]
[buddy.core.bytes :as bb]
[buddy.core.codecs :as bc]
[clojure.java.io :as io]
[clojure.java.shell :as sh]
[clojure.spec.alpha :as s]
[datoteka.core :as fs]
[mount.core :refer [defstate]])
[cuerdas.core :as str]
[datoteka.core :as fs])
(:import
java.io.ByteArrayInputStream
java.util.concurrent.Semaphore
java.io.OutputStream
org.apache.commons.io.IOUtils
org.im4java.core.ConvertCmd
org.im4java.core.IMOperation
org.im4java.core.Info))
(declare semaphore)
(defstate semaphore
:start (Semaphore. (:image-process-max-threads cfg/config 1)))
;; --- Generic specs
(s/def ::image-content-type cm/valid-image-types)
(s/def ::font-content-type cm/valid-font-types)
(s/def :internal.http.upload/filename ::us/string)
(s/def :internal.http.upload/size ::us/integer)
(s/def :internal.http.upload/content-type cm/valid-media-types)
(s/def :internal.http.upload/content-type ::us/string)
(s/def :internal.http.upload/tempfile any?)
(s/def ::upload
@@ -46,8 +42,37 @@
:internal.http.upload/tempfile
:internal.http.upload/content-type]))
(defn validate-media-type
([mtype] (validate-media-type mtype cm/valid-image-types))
([mtype allowed]
(when-not (contains? allowed mtype)
(ex/raise :type :validation
:code :media-type-not-allowed
:hint "Seems like you are uploading an invalid media object"))))
(defmulti process :cmd)
(defmulti process-error class)
(defmethod process :default
[{:keys [cmd] :as params}]
(ex/raise :type :internal
:code :not-implemented
:hint (str/fmt "No impl found for process cmd: %s" cmd)))
(defmethod process-error :default
[error]
(throw error))
(defn run
[params]
(try
(process params)
(catch Throwable e
(process-error e))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; --- Thumbnails Generation
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(s/def ::cmd keyword?)
@@ -75,7 +100,7 @@
(let [{:keys [path mtype]} input
format (or (cm/mtype->format mtype) format)
ext (cm/format->extension format)
tmp (fs/create-tempfile :suffix ext)]
tmp (fs/create-tempfile :suffix ext)]
(doto (ConvertCmd.)
(.run operation (into-array (map str [path tmp]))))
@@ -85,10 +110,9 @@
(assoc params
:format format
:mtype (cm/format->mtype format)
:size (alength ^bytes thumbnail-data)
:data (ByteArrayInputStream. thumbnail-data)))))
(defmulti process :cmd)
(defmethod process :generic-thumbnail
[{:keys [quality width height] :as params}]
(us/assert ::thumbnail-params params)
@@ -96,7 +120,7 @@
(.addImage)
(.autoOrient)
(.strip)
(.thumbnail (int width) (int height) ">")
(.thumbnail ^Integer (int width) ^Integer (int height) ">")
(.quality (double quality))
(.addImage))]
(generic-process (assoc params :operation op))))
@@ -108,85 +132,204 @@
(.addImage)
(.autoOrient)
(.strip)
(.thumbnail (int width) (int height) "^")
(.thumbnail ^Integer (int width) ^Integer (int height) "^")
(.gravity "center")
(.extent (int width) (int height))
(.quality (double quality))
(.addImage))]
(generic-process (assoc params :operation op))))
(defn get-basic-info-from-svg
[{:keys [tag attrs] :as data}]
(when (not= tag :svg)
(ex/raise :type :validation
:code :unable-to-parse-svg
:hint "uploaded svg has invalid content"))
(reduce (fn [default f]
(if-let [res (f attrs)]
(reduced res)
default))
{:width 100 :height 100}
[(fn parse-width-and-height
[{:keys [width height]}]
(when (and (string? width)
(string? height))
(let [width (d/parse-double width)
height (d/parse-double height)]
(when (and width height)
{:width (int width)
:height (int height)}))))
(fn parse-viewbox
[{:keys [viewBox]}]
(let [[x y width height] (->> (str/split viewBox #"\s+" 4)
(map d/parse-double))]
(when (and x y width height)
{:width (int width)
:height (int height)})))]))
(defmethod process :info
[{:keys [input] :as params}]
(us/assert ::input input)
(let [{:keys [path mtype]} input]
(if (= mtype "image/svg+xml")
{:width 100
:height 100
:mtype mtype}
(let [info (some-> path slurp svg/pre-process svg/parse get-basic-info-from-svg)]
(when-not info
(ex/raise :type :validation
:code :invalid-svg-file
:hint "uploaded svg does not provides dimensions"))
(assoc info :mtype mtype))
(let [instance (Info. (str path))
mtype' (.getProperty instance "Mime type")]
(when (and (string? mtype)
(not= mtype mtype'))
(ex/raise :type :validation
:code :media-type-mismatch
:hint "Seems like you are uploading a file whose content does not match the extension."))
{:width (.getImageWidth instance)
:height (.getImageHeight instance)
:mtype mtype'}))))
:hint (str "Seems like you are uploading a file whose content does not match the extension."
"Expected: " mtype ". Got: " mtype')))
;; For an animated GIF, getImageWidth/Height returns the delta size of one frame (if no frame given
;; it returns size of the last one), whereas getPageWidth/Height always return the full size of
;; any frame.
{:width (.getPageWidth instance)
:height (.getPageHeight instance)
:mtype mtype}))))
(defmethod process :default
[{:keys [cmd] :as params}]
(ex/raise :type :internal
:code :not-implemented
:hint (str "No impl found for process cmd:" cmd)))
(defmethod process-error org.im4java.core.InfoException
[error]
(ex/raise :type :validation
:code :invalid-image
:hint "invalid image"
:cause error))
(defn run
[params]
(try
(.acquire semaphore)
(let [res (a/<!! (a/thread
(try
(process params)
(catch Throwable e
e))))]
(if (instance? Throwable res)
(throw res)
res))
(finally
(.release semaphore))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Fonts Generation
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defmethod process :generate-fonts
[{:keys [input] :as params}]
(letfn [(ttf->otf [data]
(let [input-file (fs/create-tempfile :prefix "penpot")
output-file (fs/path (str input-file ".otf"))
_ (with-open [out (io/output-stream input-file)]
(IOUtils/writeChunked ^bytes data ^OutputStream out)
(.flush ^OutputStream out))
res (sh/sh "fontforge" "-lang=ff" "-c"
(str/fmt "Open('%s'); Generate('%s')"
(str input-file)
(str output-file)))]
(when (zero? (:exit res))
(fs/slurp-bytes output-file))))
;; --- Utility functions
(otf->ttf [data]
(let [input-file (fs/create-tempfile :prefix "penpot")
output-file (fs/path (str input-file ".ttf"))
_ (with-open [out (io/output-stream input-file)]
(IOUtils/writeChunked ^bytes data ^OutputStream out)
(.flush ^OutputStream out))
res (sh/sh "fontforge" "-lang=ff" "-c"
(str/fmt "Open('%s'); Generate('%s')"
(str input-file)
(str output-file)))]
(when (zero? (:exit res))
(fs/slurp-bytes output-file))))
(defn validate-media-type
[media-type]
(when-not (cm/valid-media-types media-type)
(ex/raise :type :validation
:code :media-type-not-allowed
:hint "Seems like you are uploading an invalid media object")))
(ttf-or-otf->woff [data]
(let [input-file (fs/create-tempfile :prefix "penpot" :suffix "")
output-file (fs/path (str input-file ".woff"))
_ (with-open [out (io/output-stream input-file)]
(IOUtils/writeChunked ^bytes data ^OutputStream out)
(.flush ^OutputStream out))
res (sh/sh "sfnt2woff" (str input-file))]
(when (zero? (:exit res))
(fs/slurp-bytes output-file))))
(ttf-or-otf->woff2 [data]
(let [input-file (fs/create-tempfile :prefix "penpot" :suffix "")
output-file (fs/path (str input-file ".woff2"))
_ (with-open [out (io/output-stream input-file)]
(IOUtils/writeChunked ^bytes data ^OutputStream out)
(.flush ^OutputStream out))
res (sh/sh "woff2_compress" (str input-file))]
(when (zero? (:exit res))
(fs/slurp-bytes output-file))))
(woff->sfnt [data]
(let [input-file (fs/create-tempfile :prefix "penpot" :suffix "")
_ (with-open [out (io/output-stream input-file)]
(IOUtils/writeChunked ^bytes data ^OutputStream out)
(.flush ^OutputStream out))
res (sh/sh "woff2sfnt" (str input-file)
:out-enc :bytes)]
(when (zero? (:exit res))
(:out res))))
;; Documented here:
;; https://docs.microsoft.com/en-us/typography/opentype/spec/otff#table-directory
(get-sfnt-type [data]
(let [buff (bb/slice data 0 4)
type (bc/bytes->hex buff)]
(case type
"4f54544f" :otf
"00010000" :ttf
(ex/raise :type :internal
:code :unexpected-data
:hint "unexpected font data"))))
(gen-if-nil [val factory]
(if (nil? val)
(factory)
val))]
(let [current (into #{} (keys input))]
(cond
(contains? current "font/ttf")
(let [data (get input "font/ttf")]
(-> input
(update "font/otf" gen-if-nil #(ttf->otf data))
(update "font/woff" gen-if-nil #(ttf-or-otf->woff data))
(assoc "font/woff2" (ttf-or-otf->woff2 data))))
(contains? current "font/otf")
(let [data (get input "font/otf")]
(-> input
(update "font/woff" gen-if-nil #(ttf-or-otf->woff data))
(assoc "font/ttf" (otf->ttf data))
(assoc "font/woff2" (ttf-or-otf->woff2 data))))
(contains? current "font/woff")
(let [data (get input "font/woff")
sfnt (woff->sfnt data)]
(when-not sfnt
(ex/raise :type :validation
:code :invalid-woff-file
:hint "invalid woff file"))
(let [stype (get-sfnt-type sfnt)]
(cond-> input
true
(-> (assoc "font/woff" data)
(assoc "font/woff2" (ttf-or-otf->woff2 sfnt)))
(= stype :otf)
(-> (assoc "font/otf" sfnt)
(assoc "font/ttf" (otf->ttf sfnt)))
(= stype :ttf)
(-> (assoc "font/otf" (ttf->otf sfnt))
(assoc "font/ttf" sfnt)))))))))
;; TODO: rewrite using jetty http client instead of jvm
;; builtin (because builtin http client uses a lot of memory for the
;; same operation.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Utility functions
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defn download-media-object
[url]
(let [result (http/get! url {:as :byte-array})
data (:body result)
content-type (get (:headers result) "content-type")
format (cm/mtype->format content-type)]
(if (nil? format)
(ex/raise :type :validation
:code :media-type-not-allowed
:hint "Seems like the url points to an invalid media object.")
(let [tempfile (fs/create-tempfile)
base-filename (first (fs/split-ext (fs/name tempfile)))
filename (str base-filename (cm/format->extension format))]
(with-open [ostream (io/output-stream tempfile)]
(.write ostream data))
{:filename filename
:size (count data)
:tempfile tempfile
:content-type content-type}))))
(defn configure-assets-storage
"Given storage map, returns a storage configured with the appropriate
backend for assets."
([storage]
(assoc storage :backend (cf/get :assets-storage-backend :assets-fs)))
([storage conn]
(-> storage
(assoc :conn conn)
(assoc :backend (cf/get :assets-storage-backend :assets-fs)))))

View File

@@ -1,37 +0,0 @@
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; This Source Code Form is "Incompatible With Secondary Licenses", as
;; defined by the Mozilla Public License, v. 2.0.
;;
;; Copyright (c) 2020 UXBOX Labs SL
(ns app.media-storage
"A media storage impl for app."
(:require
[app.config :refer [config]]
[app.util.storage :as ust]
[mount.core :refer [defstate]]))
;; --- State
(declare assets-storage)
(defstate assets-storage
:start (ust/create {:base-path (:assets-directory config)
:base-uri (:assets-uri config)}))
(declare media-storage)
(defstate media-storage
:start (ust/create {:base-path (:media-directory config)
:base-uri (:media-uri config)
:xf (comp ust/random-path
ust/slugify-filename)}))
;; --- Public Api
(defn resolve-asset
[path]
(str (ust/public-uri assets-storage path)))

View File

@@ -2,177 +2,272 @@
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; This Source Code Form is "Incompatible With Secondary Licenses", as
;; defined by the Mozilla Public License, v. 2.0.
;;
;; Copyright (c) 2020 UXBOX Labs SL
;; Copyright (c) UXBOX Labs SL
(ns app.metrics
(:refer-clojure :exclude [run!])
(:require
[app.common.logging :as l]
[clojure.spec.alpha :as s]
[integrant.core :as ig])
(:import
io.prometheus.client.CollectorRegistry
io.prometheus.client.Counter
io.prometheus.client.Counter$Child
io.prometheus.client.Gauge
io.prometheus.client.Gauge$Child
io.prometheus.client.Summary
io.prometheus.client.Summary$Child
io.prometheus.client.Summary$Builder
io.prometheus.client.Histogram
io.prometheus.client.Histogram$Child
io.prometheus.client.exporter.common.TextFormat
io.prometheus.client.hotspot.DefaultExports
io.prometheus.client.jetty.JettyStatisticsCollector
org.eclipse.jetty.server.handler.StatisticsHandler
java.io.StringWriter))
(defn- create-registry
(set! *warn-on-reflection* true)
(declare create-registry)
(declare create)
(declare handler)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; METRICS SERVICE PROVIDER
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(def default-metrics
{:update-file-changes
{:name "rpc_update_file_changes_total"
:help "A total number of changes submitted to update-file."
:type :counter}
:update-file-bytes-processed
{:name "rpc_update_file_bytes_processed_total"
:help "A total number of bytes processed by update-file."
:type :counter}
:rpc-mutation-timing
{:name "rpc_mutation_timing"
:help "RPC mutation method call timming."
:labels ["name"]
:type :histogram}
:rpc-query-timing
{:name "rpc_query_timing"
:help "RPC query method call timing."
:labels ["name"]
:type :histogram}
:websocket-active-connections
{:name "websocket_active_connections"
:help "Active websocket connections gauge"
:type :gauge}
:websocket-messages-total
{:name "websocket_message_total"
:help "Counter of processed messages."
:labels ["op"]
:type :counter}
:websocket-session-timing
{:name "websocket_session_timing"
:help "Websocket session timing (seconds)."
:type :summary}
:session-update-total
{:name "http_session_update_total"
:help "A counter of session update batch events."
:type :counter}
:tasks-timing
{:name "penpot_tasks_timing"
:help "Background tasks timing (milliseconds)."
:labels ["name"]
:type :summary}
:rlimit-queued-submissions
{:name "penpot_rlimit_queued_submissions"
:help "Current number of queued submissions on RLIMIT."
:labels ["name"]
:type :gauge}
:rlimit-used-permits
{:name "penpot_rlimit_used_permits"
:help "Current number of used permits on RLIMIT."
:labels ["name"]
:type :gauge}
:rlimit-acquires-total
{:name "penpot_rlimit_acquires_total"
:help "Total number of acquire operations on RLIMIT."
:labels ["name"]
:type :counter}
:executors-active-threads
{:name "penpot_executors_active_threads"
:help "Current number of threads available in the executor service."
:labels ["name"]
:type :gauge}
:executors-completed-tasks
{:name "penpot_executors_completed_tasks_total"
:help "Aproximate number of completed tasks by the executor."
:labels ["name"]
:type :counter}
:executors-running-threads
{:name "penpot_executors_running_threads"
:help "Current number of threads with state RUNNING."
:labels ["name"]
:type :gauge}
:executors-queued-submissions
{:name "penpot_executors_queued_submissions"
:help "Current number of queued submissions."
:labels ["name"]
:type :gauge}})
(defmethod ig/init-key ::metrics
[_ _]
(l/info :action "initialize metrics")
(let [registry (create-registry)
definitions (reduce-kv (fn [res k v]
(->> (assoc v :registry registry)
(create)
(assoc res k)))
{}
default-metrics)]
{:handler (partial handler registry)
:definitions definitions
:registry registry}))
(s/def ::handler fn?)
(s/def ::registry #(instance? CollectorRegistry %))
(s/def ::metrics
(s/keys :req-un [::registry ::handler]))
(defn- handler
[registry _ respond _]
(let [samples (.metricFamilySamples ^CollectorRegistry registry)
writer (StringWriter.)]
(TextFormat/write004 writer samples)
(respond {:headers {"content-type" TextFormat/CONTENT_TYPE_004}
:body (.toString writer)})))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Implementation
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(def default-empty-labels (into-array String []))
(def default-quantiles
[[0.5 0.01]
[0.90 0.01]
[0.99 0.001]])
(def default-histogram-buckets
[1 5 10 25 50 75 100 250 500 750 1000 2500 5000 7500])
(defn run!
[{:keys [definitions]} {:keys [id] :as params}]
(when-let [mobj (get definitions id)]
((::fn mobj) params)
true))
(defn create-registry
[]
(let [registry (CollectorRegistry.)]
(DefaultExports/register registry)
registry))
(defonce registry (create-registry))
(defonce cache (atom {}))
(defmacro with-measure
[sym expr teardown]
`(let [~sym (System/nanoTime)]
(try
~expr
(finally
(let [~sym (/ (- (System/nanoTime) ~sym) 1000000)]
~teardown)))))
(defn- is-array?
[o]
(let [oc (class o)]
(and (.isArray ^Class oc)
(= (.getComponentType oc) String))))
(defn make-counter
[{:keys [id help] :as props}]
(let [instance (doto (Counter/build)
(.name id)
(.help help))
[{:keys [name help registry reg labels] :as props}]
(let [registry (or registry reg)
instance (.. (Counter/build)
(name name)
(help help))
_ (when (seq labels)
(.labelNames instance (into-array String labels)))
instance (.register instance registry)]
(reify
clojure.lang.IDeref
(deref [_] instance)
clojure.lang.IFn
(invoke [_ cmd]
(.inc ^Counter instance))
(invoke [_ cmd val]
(case cmd
:wrap (fn
([a]
(.inc ^Counter instance)
(val a))
([a b]
(.inc ^Counter instance)
(val a b))
([a b c]
(.inc ^Counter instance)
(val a b c)))
(throw (IllegalArgumentException. "invalid arguments")))))))
(defn counter
[{:keys [id] :as props}]
(or (get @cache id)
(let [v (make-counter props)]
(swap! cache assoc id v)
v)))
{::instance instance
::fn (fn [{:keys [inc labels] :or {inc 1 labels default-empty-labels}}]
(let [instance (.labels instance (if (is-array? labels) labels (into-array String labels)))]
(.inc ^Counter$Child instance (double inc))))}))
(defn make-gauge
[{:keys [id help] :as props}]
(let [instance (doto (Gauge/build)
(.name id)
(.help help))
[{:keys [name help registry reg labels] :as props}]
(let [registry (or registry reg)
instance (.. (Gauge/build)
(name name)
(help help))
_ (when (seq labels)
(.labelNames instance (into-array String labels)))
instance (.register instance registry)]
(reify
clojure.lang.IDeref
(deref [_] instance)
clojure.lang.IFn
(invoke [_ cmd]
(case cmd
:inc (.inc ^Gauge instance)
:dec (.dec ^Gauge instance))))))
(defn gauge
[{:keys [id] :as props}]
(or (get @cache id)
(let [v (make-gauge props)]
(swap! cache assoc id v)
v)))
{::instance instance
::fn (fn [{:keys [inc dec labels val] :or {labels default-empty-labels}}]
(let [instance (.labels ^Gauge instance (if (is-array? labels) labels (into-array String labels)))]
(cond (number? inc) (.inc ^Gauge$Child instance (double inc))
(number? dec) (.dec ^Gauge$Child instance (double dec))
(number? val) (.set ^Gauge$Child instance (double val)))))}))
(defn make-summary
[{:keys [id help] :as props}]
(let [instance (doto (Summary/build)
(.name id)
[{:keys [name help registry reg labels max-age quantiles buckets]
:or {max-age 3600 buckets 12 quantiles default-quantiles} :as props}]
(let [registry (or registry reg)
builder (doto (Summary/build)
(.name name)
(.help help))
_ (when (seq quantiles)
(.maxAgeSeconds ^Summary$Builder builder ^long max-age)
(.ageBuckets ^Summary$Builder builder buckets))
_ (doseq [[q e] quantiles]
(.quantile ^Summary$Builder builder q e))
_ (when (seq labels)
(.labelNames ^Summary$Builder builder (into-array String labels)))
instance (.register ^Summary$Builder builder registry)]
{::instance instance
::fn (fn [{:keys [val labels] :or {labels default-empty-labels}}]
(let [instance (.labels ^Summary instance (if (is-array? labels) labels (into-array String labels)))]
(.observe ^Summary$Child instance val)))}))
(defn make-histogram
[{:keys [name help registry reg labels buckets]
:or {buckets default-histogram-buckets}}]
(let [registry (or registry reg)
instance (doto (Histogram/build)
(.name name)
(.help help)
(.quantile 0.5 0.05)
(.quantile 0.9 0.01)
(.quantile 0.99 0.001))
instance (.register instance registry)]
(reify
clojure.lang.IDeref
(deref [_] instance)
(.buckets (into-array Double/TYPE buckets)))
_ (when (seq labels)
(.labelNames instance (into-array String labels)))
instance (.register instance registry)]
clojure.lang.IFn
(invoke [_ val]
(.observe ^Summary instance val))
{::instance instance
::fn (fn [{:keys [val labels] :or {labels default-empty-labels}}]
(let [instance (.labels ^Histogram instance (if (is-array? labels) labels (into-array String labels)))]
(.observe ^Histogram$Child instance val)))}))
(invoke [_ cmd val]
(case cmd
:wrap (fn
([a]
(with-measure $$
(val a)
(.observe ^Summary instance $$)))
([a b]
(with-measure $$
(val a b)
(.observe ^Summary instance $$)))
([a b c]
(with-measure $$
(val a b c)
(.observe ^Summary instance $$))))
(defn create
[{:keys [type] :as props}]
(case type
:counter (make-counter props)
:gauge (make-gauge props)
:summary (make-summary props)
:histogram (make-histogram props)))
(throw (IllegalArgumentException. "invalid arguments")))))))
(defn summary
[{:keys [id] :as props}]
(or (get @cache id)
(let [v (make-summary props)]
(swap! cache assoc id v)
v)))
(defn wrap-summary
[f props]
(let [sm (summary props)]
(sm :wrap f)))
(defn wrap-counter
[f props]
(let [cnt (counter props)]
(cnt :wrap f)))
(defn instrument-with-counter!
[{:keys [var] :as props}]
(let [cnt (counter props)
vars (if (var? var) [var] var)]
(doseq [var vars]
(alter-var-root var (fn [root]
(let [mdata (meta root)
original (::counter-original mdata root)]
(with-meta
(cnt :wrap original)
(assoc mdata ::counter-original original))))))))
(defn instrument-with-summary!
[{:keys [var] :as props}]
(let [sm (summary props)]
(alter-var-root var (fn [root]
(let [mdata (meta root)
original (::summary-original mdata root)]
(with-meta
(sm :wrap original)
(assoc mdata ::summary-original original)))))))
(defn dump
[& _args]
(let [samples (.metricFamilySamples ^CollectorRegistry registry)
writer (StringWriter.)]
(TextFormat/write004 writer samples)
{:headers {"content-type" TextFormat/CONTENT_TYPE_004}
:body (.toString writer)}))
(defn instrument-jetty!
[^CollectorRegistry registry ^StatisticsHandler handler]
(doto (JettyStatisticsCollector. handler)
(.register registry))
nil)

View File

@@ -2,133 +2,213 @@
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; This Source Code Form is "Incompatible With Secondary Licenses", as
;; defined by the Mozilla Public License, v. 2.0.
;;
;; Copyright (c) 2020 UXBOX Labs SL
;; Copyright (c) UXBOX Labs SL
(ns app.migrations
(:require
[app.db :as db]
[app.migrations.migration-0023 :as mg0023]
[app.util.migrations :as mg]
[mount.core :as mount :refer [defstate]]))
[integrant.core :as ig]))
(def +migrations+
{:name "uxbox-main"
:steps
[{:name "0001-add-extensions"
:fn (mg/resource "app/migrations/sql/0001-add-extensions.sql")}
(def migrations
[{:name "0001-add-extensions"
:fn (mg/resource "app/migrations/sql/0001-add-extensions.sql")}
{:name "0002-add-profile-tables"
:fn (mg/resource "app/migrations/sql/0002-add-profile-tables.sql")}
{:name "0002-add-profile-tables"
:fn (mg/resource "app/migrations/sql/0002-add-profile-tables.sql")}
{:name "0003-add-project-tables"
:fn (mg/resource "app/migrations/sql/0003-add-project-tables.sql")}
{:name "0003-add-project-tables"
:fn (mg/resource "app/migrations/sql/0003-add-project-tables.sql")}
{:name "0004-add-tasks-tables"
:fn (mg/resource "app/migrations/sql/0004-add-tasks-tables.sql")}
{:name "0004-add-tasks-tables"
:fn (mg/resource "app/migrations/sql/0004-add-tasks-tables.sql")}
{:name "0005-add-libraries-tables"
:fn (mg/resource "app/migrations/sql/0005-add-libraries-tables.sql")}
{:name "0005-add-libraries-tables"
:fn (mg/resource "app/migrations/sql/0005-add-libraries-tables.sql")}
{:name "0006-add-presence-tables"
:fn (mg/resource "app/migrations/sql/0006-add-presence-tables.sql")}
{:name "0006-add-presence-tables"
:fn (mg/resource "app/migrations/sql/0006-add-presence-tables.sql")}
{:name "0007-drop-version-field-from-page-table"
:fn (mg/resource "app/migrations/sql/0007-drop-version-field-from-page-table.sql")}
{:name "0007-drop-version-field-from-page-table"
:fn (mg/resource "app/migrations/sql/0007-drop-version-field-from-page-table.sql")}
{:name "0008-add-generic-token-table"
:fn (mg/resource "app/migrations/sql/0008-add-generic-token-table.sql")}
{:name "0008-add-generic-token-table"
:fn (mg/resource "app/migrations/sql/0008-add-generic-token-table.sql")}
{:name "0009-drop-profile-email-table"
:fn (mg/resource "app/migrations/sql/0009-drop-profile-email-table.sql")}
{:name "0009-drop-profile-email-table"
:fn (mg/resource "app/migrations/sql/0009-drop-profile-email-table.sql")}
{:name "0010-add-http-session-table"
:fn (mg/resource "app/migrations/sql/0010-add-http-session-table.sql")}
{:name "0010-add-http-session-table"
:fn (mg/resource "app/migrations/sql/0010-add-http-session-table.sql")}
{:name "0011-add-session-id-field-to-page-change-table"
:fn (mg/resource "app/migrations/sql/0011-add-session-id-field-to-page-change-table.sql")}
{:name "0011-add-session-id-field-to-page-change-table"
:fn (mg/resource "app/migrations/sql/0011-add-session-id-field-to-page-change-table.sql")}
{:name "0012-make-libraries-linked-to-a-file"
:fn (mg/resource "app/migrations/sql/0012-make-libraries-linked-to-a-file.sql")}
{:name "0012-make-libraries-linked-to-a-file"
:fn (mg/resource "app/migrations/sql/0012-make-libraries-linked-to-a-file.sql")}
{:name "0013-mark-files-shareable"
:fn (mg/resource "app/migrations/sql/0013-mark-files-shareable.sql")}
{:name "0013-mark-files-shareable"
:fn (mg/resource "app/migrations/sql/0013-mark-files-shareable.sql")}
{:name "0014-refactor-media-storage.sql"
:fn (mg/resource "app/migrations/sql/0014-refactor-media-storage.sql")}
{:name "0014-refactor-media-storage.sql"
:fn (mg/resource "app/migrations/sql/0014-refactor-media-storage.sql")}
{:name "0015-improve-tasks-tables"
:fn (mg/resource "app/migrations/sql/0015-improve-tasks-tables.sql")}
{:name "0015-improve-tasks-tables"
:fn (mg/resource "app/migrations/sql/0015-improve-tasks-tables.sql")}
{:name "0016-truncate-and-alter-tokens-table"
:fn (mg/resource "app/migrations/sql/0016-truncate-and-alter-tokens-table.sql")}
{:name "0016-truncate-and-alter-tokens-table"
:fn (mg/resource "app/migrations/sql/0016-truncate-and-alter-tokens-table.sql")}
{:name "0017-link-files-to-libraries"
:fn (mg/resource "app/migrations/sql/0017-link-files-to-libraries.sql")}
{:name "0017-link-files-to-libraries"
:fn (mg/resource "app/migrations/sql/0017-link-files-to-libraries.sql")}
{:name "0018-add-file-trimming-triggers"
:fn (mg/resource "app/migrations/sql/0018-add-file-trimming-triggers.sql")}
{:name "0018-add-file-trimming-triggers"
:fn (mg/resource "app/migrations/sql/0018-add-file-trimming-triggers.sql")}
{:name "0019-add-improved-scheduled-tasks"
:fn (mg/resource "app/migrations/sql/0019-add-improved-scheduled-tasks.sql")}
{:name "0019-add-improved-scheduled-tasks"
:fn (mg/resource "app/migrations/sql/0019-add-improved-scheduled-tasks.sql")}
{:name "0020-minor-fixes-to-media-object"
:fn (mg/resource "app/migrations/sql/0020-minor-fixes-to-media-object.sql")}
{:name "0020-minor-fixes-to-media-object"
:fn (mg/resource "app/migrations/sql/0020-minor-fixes-to-media-object.sql")}
{:name "0021-http-session-improvements"
:fn (mg/resource "app/migrations/sql/0021-http-session-improvements.sql")}
{:name "0021-http-session-improvements"
:fn (mg/resource "app/migrations/sql/0021-http-session-improvements.sql")}
{:name "0022-page-file-refactor"
:fn (mg/resource "app/migrations/sql/0022-page-file-refactor.sql")}
{:name "0022-page-file-refactor"
:fn (mg/resource "app/migrations/sql/0022-page-file-refactor.sql")}
{:name "0023-adapt-old-pages-and-files"
:fn mg0023/migrate}
{:name "0023-adapt-old-pages-and-files"
:fn mg0023/migrate}
{:name "0024-mod-profile-table"
:fn (mg/resource "app/migrations/sql/0024-mod-profile-table.sql")}
{:name "0024-mod-profile-table"
:fn (mg/resource "app/migrations/sql/0024-mod-profile-table.sql")}
{:name "0025-del-generic-tokens-table"
:fn (mg/resource "app/migrations/sql/0025-del-generic-tokens-table.sql")}
{:name "0025-del-generic-tokens-table"
:fn (mg/resource "app/migrations/sql/0025-del-generic-tokens-table.sql")}
{:name "0026-mod-file-library-rel-table-synced-date"
:fn (mg/resource "app/migrations/sql/0026-mod-file-library-rel-table-synced-date.sql")}
{:name "0026-mod-file-library-rel-table-synced-date"
:fn (mg/resource "app/migrations/sql/0026-mod-file-library-rel-table-synced-date.sql")}
{:name "0027-mod-file-table-ignore-sync"
:fn (mg/resource "app/migrations/sql/0027-mod-file-table-ignore-sync.sql")}
{:name "0027-mod-file-table-ignore-sync"
:fn (mg/resource "app/migrations/sql/0027-mod-file-table-ignore-sync.sql")}
{:name "0028-add-team-project-profile-rel-table"
:fn (mg/resource "app/migrations/sql/0028-add-team-project-profile-rel-table.sql")}
{:name "0028-add-team-project-profile-rel-table"
:fn (mg/resource "app/migrations/sql/0028-add-team-project-profile-rel-table.sql")}
{:name "0029-del-project-profile-rel-indexes"
:fn (mg/resource "app/migrations/sql/0029-del-project-profile-rel-indexes.sql")}
{:name "0029-del-project-profile-rel-indexes"
:fn (mg/resource "app/migrations/sql/0029-del-project-profile-rel-indexes.sql")}
{:name "0030-mod-file-table-add-missing-index"
:fn (mg/resource "app/migrations/sql/0030-mod-file-table-add-missing-index.sql")}
{:name "0030-mod-file-table-add-missing-index"
:fn (mg/resource "app/migrations/sql/0030-mod-file-table-add-missing-index.sql")}
{:name "0031-add-conversation-related-tables"
:fn (mg/resource "app/migrations/sql/0031-add-conversation-related-tables.sql")}
{:name "0031-add-conversation-related-tables"
:fn (mg/resource "app/migrations/sql/0031-add-conversation-related-tables.sql")}
{:name "0032-del-unused-tables"
:fn (mg/resource "app/migrations/sql/0032-del-unused-tables.sql")}
{:name "0032-del-unused-tables"
:fn (mg/resource "app/migrations/sql/0032-del-unused-tables.sql")}
{:name "0033-mod-comment-thread-table"
:fn (mg/resource "app/migrations/sql/0033-mod-comment-thread-table.sql")}
{:name "0033-mod-comment-thread-table"
:fn (mg/resource "app/migrations/sql/0033-mod-comment-thread-table.sql")}
{:name "0034-mod-profile-table-add-props-field"
:fn (mg/resource "app/migrations/sql/0034-mod-profile-table-add-props-field.sql")}
]})
{:name "0034-mod-profile-table-add-props-field"
:fn (mg/resource "app/migrations/sql/0034-mod-profile-table-add-props-field.sql")}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Entry point
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
{:name "0035-add-storage-tables"
:fn (mg/resource "app/migrations/sql/0035-add-storage-tables.sql")}
(defn migrate
[]
(with-open [conn (db/open)]
(mg/setup! conn)
(mg/migrate! conn +migrations+)))
{:name "0036-mod-storage-referenced-tables"
:fn (mg/resource "app/migrations/sql/0036-mod-storage-referenced-tables.sql")}
(defstate migrations
:start (migrate))
{:name "0037-del-obsolete-triggers"
:fn (mg/resource "app/migrations/sql/0037-del-obsolete-triggers.sql")}
{:name "0038-add-storage-on-delete-triggers"
:fn (mg/resource "app/migrations/sql/0038-add-storage-on-delete-triggers.sql")}
{:name "0039-fix-some-on-delete-triggers"
:fn (mg/resource "app/migrations/sql/0039-fix-some-on-delete-triggers.sql")}
{:name "0040-add-error-report-tables"
:fn (mg/resource "app/migrations/sql/0040-add-error-report-tables.sql")}
{:name "0041-mod-pg-storage-options"
:fn (mg/resource "app/migrations/sql/0041-mod-pg-storage-options.sql")}
{:name "0042-add-server-prop-table"
:fn (mg/resource "app/migrations/sql/0042-add-server-prop-table.sql")}
{:name "0043-drop-old-tables-and-fields"
:fn (mg/resource "app/migrations/sql/0043-drop-old-tables-and-fields.sql")}
{:name "0044-add-storage-refcount"
:fn (mg/resource "app/migrations/sql/0044-add-storage-refcount.sql")}
{:name "0045-add-index-to-file-change-table"
:fn (mg/resource "app/migrations/sql/0045-add-index-to-file-change-table.sql")}
{:name "0046-add-profile-complaint-table"
:fn (mg/resource "app/migrations/sql/0046-add-profile-complaint-table.sql")}
{:name "0047-mod-file-change-table"
:fn (mg/resource "app/migrations/sql/0047-mod-file-change-table.sql")}
{:name "0048-mod-storage-tables"
:fn (mg/resource "app/migrations/sql/0048-mod-storage-tables.sql")}
{:name "0049-mod-http-session-table"
:fn (mg/resource "app/migrations/sql/0049-mod-http-session-table.sql")}
{:name "0050-mod-server-prop-table"
:fn (mg/resource "app/migrations/sql/0050-mod-server-prop-table.sql")}
{:name "0051-mod-file-library-rel-table"
:fn (mg/resource "app/migrations/sql/0051-mod-file-library-rel-table.sql")}
{:name "0052-del-legacy-user-and-team"
:fn (mg/resource "app/migrations/sql/0052-del-legacy-user-and-team.sql")}
{:name "0053-add-team-font-variant-table"
:fn (mg/resource "app/migrations/sql/0053-add-team-font-variant-table.sql")}
{:name "0054-add-audit-log-table"
:fn (mg/resource "app/migrations/sql/0054-add-audit-log-table.sql")}
{:name "0055-mod-file-media-object-table"
:fn (mg/resource "app/migrations/sql/0055-mod-file-media-object-table.sql")}
{:name "0056-add-missing-index-on-deleted-at"
:fn (mg/resource "app/migrations/sql/0056-add-missing-index-on-deleted-at.sql")}
{:name "0057-del-profile-on-delete-trigger"
:fn (mg/resource "app/migrations/sql/0057-del-profile-on-delete-trigger.sql")}
{:name "0058-del-team-on-delete-trigger"
:fn (mg/resource "app/migrations/sql/0058-del-team-on-delete-trigger.sql")}
{:name "0059-mod-audit-log-table"
:fn (mg/resource "app/migrations/sql/0059-mod-audit-log-table.sql")}
{:name "0060-mod-file-change-table"
:fn (mg/resource "app/migrations/sql/0060-mod-file-change-table.sql")}
{:name "0061-mod-file-table"
:fn (mg/resource "app/migrations/sql/0061-mod-file-table.sql")}
{:name "0062-fix-metadata-media"
:fn (mg/resource "app/migrations/sql/0062-fix-metadata-media.sql")}
{:name "0063-add-share-link-table"
:fn (mg/resource "app/migrations/sql/0063-add-share-link-table.sql")}
{:name "0064-mod-audit-log-table"
:fn (mg/resource "app/migrations/sql/0064-mod-audit-log-table.sql")}
{:name "0065-add-trivial-spelling-fixes"
:fn (mg/resource "app/migrations/sql/0065-add-trivial-spelling-fixes.sql")}
{:name "0066-add-frame-thumbnail-table"
:fn (mg/resource "app/migrations/sql/0066-add-frame-thumbnail-table.sql")}
])
(defmethod ig/init-key ::migrations [_ _] migrations)

View File

@@ -2,10 +2,7 @@
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; This Source Code Form is "Incompatible With Secondary Licenses", as
;; defined by the Mozilla Public License, v. 2.0.
;;
;; Copyright (c) 2020 UXBOX Labs SL
;; Copyright (c) UXBOX Labs SL
(ns app.migrations.migration-0023
(:require

View File

@@ -1,5 +1,4 @@
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
CREATE EXTENSION IF NOT EXISTS "pgcrypto";
CREATE FUNCTION update_modified_at()
RETURNS TRIGGER AS $updt$

View File

@@ -106,8 +106,6 @@ CREATE TRIGGER file_image__on_delete__tgr
AFTER DELETE ON file_image
FOR EACH ROW EXECUTE PROCEDURE handle_delete();
CREATE TABLE page (
id uuid PRIMARY KEY DEFAULT uuid_generate_v4(),
file_id uuid NOT NULL REFERENCES file(id) ON DELETE CASCADE,

Some files were not shown because too many files have changed in this diff Show More