Compare commits

...

712 Commits

Author SHA1 Message Date
Iván Eixarch 732fc73fe6 Commit con #3 2023-06-05 18:29:26 +02:00
Mike Cao 586529a5ca
Merge pull request #2009 from franciscao633/master
Github Issues Organizational Templates
2023-04-28 12:49:29 -07:00
Francis Cao 22e2f79bff re order required fields 2023-04-28 11:35:01 -07:00
Francis Cao 6f4cc9e84c typo correction 2023-04-28 11:34:03 -07:00
Francis Cao e77e030f2c update bug report 2023-04-28 11:31:54 -07:00
Francis Cao a43bbc51f6 update feature name 2023-04-28 11:24:31 -07:00
Francis Cao bf26874965 clean up templates 2023-04-28 11:18:53 -07:00
Francis Cao 6cdf9a68d1 fix config and clean up feature request 2023-04-28 11:06:25 -07:00
Francis Cao 402acf563e fix bug report template 2023-04-28 11:01:40 -07:00
Francis Cao 2d6077fe16 clean-up template 2023-04-28 10:59:35 -07:00
Francis Cao c9ec055996 introduce templates 2023-04-28 10:04:23 -07:00
Francis Cao 3f0815855c issues template 2023-04-28 09:52:42 -07:00
Mike Cao 46615fe7eb
Merge pull request #1994 from umami-software/dev
v2.2.0
2023-04-25 21:49:42 -07:00
Mike Cao 9345c9ac9e Apply CSS to flag icons. 2023-04-25 21:18:03 -07:00
Mike Cao 938047ce45 Revert tracker logic. Bump search depth. 2023-04-25 21:03:26 -07:00
Mike Cao 34757e7b2a Bump version v2.2.0. 2023-04-25 20:52:05 -07:00
Mike Cao 01fe8b44a3 Updated packages. 2023-04-25 20:34:56 -07:00
Mike Cao ae85bf696b Allow tracker to traverse all levels to find anchor. 2023-04-25 19:12:17 -07:00
Mike Cao f450fc35fb Fixed city showing undefined. 2023-04-25 16:56:31 -07:00
Mike Cao 4c544361fd Fixed vercel again. 2023-04-25 16:51:42 -07:00
Mike Cao 4ea3eec98c Fixed vercel region issues. 2023-04-25 16:29:47 -07:00
Mike Cao 5864aee043 Fixed vercel issues. 2023-04-25 15:58:52 -07:00
Mike Cao c49e2c6974 Fixed Vercel geolocation. 2023-04-25 14:52:29 -07:00
Mike Cao 02f031bde1 Separate CLOUD_MODE and DISABLE_LOGIN. 2023-04-25 14:48:50 -07:00
Mike Cao 3f1ed750f0 Added error boundary. Fixed #1976. 2023-04-25 14:41:54 -07:00
Mike Cao d73def80c7 Update message bundles. 2023-04-25 12:46:19 -07:00
Mike Cao 4b72918a91 Merge branch 'dev' of https://github.com/umami-software/umami into dev 2023-04-25 12:45:12 -07:00
Mike Cao 44a1c7fa10
Merge pull request #1963 from RikoDEV/patch-1
i18n: update pl-PL translations
2023-04-25 12:44:51 -07:00
Mike Cao c47d246a79
Merge pull request #1974 from atmonshi/update-lang-ar
update AR phrases
2023-04-25 12:44:01 -07:00
Mike Cao 89d37e0045
Merge pull request #1975 from atmonshi/refresh-after-delete-user
small improve to Users List
2023-04-25 12:43:30 -07:00
Mike Cao 4045cfd039
Merge pull request #1980 from juangacovas/patch-3
Update es-MX.json
2023-04-25 12:42:25 -07:00
Mike Cao c3beb10e3b
Merge pull request #1992 from Truimo/dev
fix for #1940: check if there is no parent element
2023-04-25 12:36:26 -07:00
Mike Cao b6f3f57455 Added fallback in case country code not found. 2023-04-25 12:35:09 -07:00
Truimo 4876684461 fix: added check if there is no parent element 2023-04-26 00:10:33 +08:00
Mike Cao 9e11866ddd Remove password from logging. 2023-04-24 22:00:40 -07:00
Mike Cao 1e9a4ad08f Added login debugging. 2023-04-24 21:35:09 -07:00
Mike Cao 92ab391ef8 Use Vercel headers for location. 2023-04-24 19:29:31 -07:00
Mike Cao c23373d164 Check page title exists first. 2023-04-24 18:07:27 -07:00
Juanga Covas 1b8c2c4dde
Update es-MX.json
Update missing translations
2023-04-24 21:27:53 +02:00
Mike Cao 26a9cb67d8 Merge remote-tracking branch 'origin/dev' 2023-04-23 19:55:35 -07:00
Mike Cao 4a51a5db3f Added country flags. 2023-04-23 19:52:44 -07:00
Ash Monsh 8bc0fb92ba Update UsersList.js
show toast after creating user and refresh the list after delete
2023-04-23 05:43:09 +03:00
Ash Monsh ff9a6335d1 update AR phrases 2023-04-23 05:39:35 +03:00
Mike Cao c5bffb97cc Improved error handling for useSession middleware. 2023-04-22 14:17:57 -07:00
RikoDEV 2e3d2924e7
Update pl-PL.json 2023-04-22 10:10:50 +02:00
Mike Cao 8666965930 Updated lang files. 2023-04-22 00:55:55 -07:00
Mike Cao 5027d9d945 Merge branch 'dev' 2023-04-21 22:05:38 -07:00
Mike Cao 6cb2429ee1 Bump version v2.1.1. 2023-04-21 22:05:06 -07:00
Mike Cao ef59e93adc Merge branch 'dev' 2023-04-21 21:29:17 -07:00
Mike Cao 47f63d80c4 Fix tracker. 2023-04-21 21:28:02 -07:00
Mike Cao 36b767af75
Merge pull request #1955 from umami-software/dev
v2.1.0
2023-04-21 18:20:48 -07:00
Mike Cao 00d0421623 Make title optional. 2023-04-21 17:59:03 -07:00
Mike Cao 987e3aabbd Fix tracking code form. 2023-04-21 17:21:44 -07:00
Mike Cao a2bce7ae2c Revert next for vercel build. 2023-04-21 17:01:31 -07:00
Mike Cao 6469dd296d Revert tsconfig.json. 2023-04-21 16:06:49 -07:00
Mike Cao 71fcad26a5 Updated .track method functionality. 2023-04-21 15:55:52 -07:00
Mike Cao 80438bf84c Merge branch 'dev' of https://github.com/umami-software/umami into dev 2023-04-21 15:16:39 -07:00
Mike Cao eaaf3a0a5c Merge branch 'master' into dev 2023-04-21 15:16:26 -07:00
Mike Cao a7e6c32460 Updated page titles. 2023-04-21 15:14:30 -07:00
Mike Cao 39f630400f Merge branch 'dev' of https://github.com/umami-software/umami into dev 2023-04-21 15:02:25 -07:00
Mike Cao 3ba75a6737
Merge pull request #1944 from atmonshi/page-titles
add page titles
2023-04-21 15:02:18 -07:00
Mike Cao 71628bec90
Merge pull request #1945 from yumusb/patch-1
Fix "x-umami-cache: undefined"
2023-04-21 14:59:39 -07:00
Mike Cao 6f80908160 Updated message bundles. 2023-04-21 14:58:37 -07:00
Mike Cao 21c4ec068d
Merge pull request #1948 from Maxime-J/dev
restore login localization
2023-04-21 14:57:16 -07:00
Mike Cao 115a2560a7
Merge branch 'dev' into dev 2023-04-21 14:57:04 -07:00
Mike Cao f246183094
Merge pull request #1951 from ym-project/master
update ru-RU locale
2023-04-21 14:55:20 -07:00
Mike Cao edce62eede
Merge pull request #1953 from winterrific/master
Update lang de-DE
2023-04-21 14:54:43 -07:00
Mike Cao 223f0051ed Only display first tracker script name. 2023-04-21 14:45:06 -07:00
Mike Cao 6c09dd1e23 Merge remote-tracking branch 'origin/dev' into dev 2023-04-21 14:39:15 -07:00
Mike Cao 5b4bd67455 Updated packages. 2023-04-21 14:39:06 -07:00
Mike Cao e6c5a9b17d Added country to regions display. 2023-04-21 14:35:00 -07:00
Mike Cao 69b9458975 Removed rollup for components. 2023-04-21 13:16:54 -07:00
Ruben 65c07f5034 Update lang de-DE 2023-04-21 22:10:14 +02:00
Mike Cao b9a0f0442e Updated next to 13.3.0. 2023-04-21 12:52:09 -07:00
Mike Cao a0894866b9 POC for exporting components. 2023-04-21 12:43:37 -07:00
ym-project 39cafafd76
fix `label.data` translation 2023-04-21 19:32:04 +03:00
ym-project 31df0f7f07
update ru-RU locale 2023-04-21 19:27:09 +03:00
Mike Cao 8bddc666b4 Refactored exports. 2023-04-21 08:00:42 -07:00
Maxime-J b2d8423dcb restore login localization 2023-04-21 13:14:14 +00:00
榆木 5d8fb2f791
Update index.js
Do not send the x-umami-cache request header when the cache is not defined (the first request sent to the umami server when the visitor opens the page)
2023-04-21 12:04:30 +08:00
Ash Monsh 3039ad9315 add page titles 2023-04-21 05:58:16 +03:00
Mike Cao 1baf4d5571 Code style fix. 2023-04-20 15:19:09 -07:00
Francis Cao 322990b03b userstable css fix for edit button 2023-04-20 12:10:33 -07:00
Francis Cao 7aac95a410 Merge branch 'dev' of https://github.com/umami-software/umami into dev 2023-04-20 12:07:10 -07:00
Francis Cao cce966c48c Fix realtime countries / visitors 2023-04-20 12:07:04 -07:00
Mike Cao 5bfbc71e7f Merge branch 'dev' of https://github.com/umami-software/umami into dev 2023-04-20 11:53:45 -07:00
Mike Cao 1d639c77a2
Merge pull request #1931 from atmonshi/more-rtl-ui
rotate arrows in rtl
2023-04-20 11:53:28 -07:00
php coder 80aad4ef55
Update WebsiteMenuView.js 2023-04-20 21:49:42 +03:00
Mike Cao c4d3d6fb09 Updated language bundle. 2023-04-20 11:36:30 -07:00
Mike Cao 288f77d6ff
Merge pull request #1940 from MexHigh/master
Adjusted tracking script to find parent a-tag for click tracking
2023-04-20 11:34:18 -07:00
Mike Cao 4bd8b44420
Merge pull request #1942 from atmonshi/rtl-css
fix some css for RTL
2023-04-20 11:25:59 -07:00
Mike Cao 5f30cbd789
Merge pull request #1938 from MBRjun/dev
Bug Fix & Translation Updates
2023-04-20 11:24:59 -07:00
Ash Monsh 5cd4e9fd8d fix some css for RTL 2023-04-20 21:08:56 +03:00
Francis Cao fa3659fcf6 fix user password edit and fix prisma schema for updated_at columns 2023-04-20 10:46:58 -07:00
Leon Schmidt a84d2181e7
Adjusted tracking script to find parent a-tag for click tracking 2023-04-20 17:14:41 +02:00
MBRjun 981abd5966
fix: get tracking code correctly 2023-04-20 22:41:25 +08:00
MBRjun 136f962218
i18n: update zh-CN translations 2023-04-20 21:29:58 +08:00
Ash Monsh aba523cbee rotate arrows in rtl 2023-04-20 12:41:06 +03:00
Mike Cao d2c9c45461 Allow slashes in tracker names. 2023-04-20 01:52:49 -07:00
Mike Cao dbc19e4ffd Allow multiple tracker names. 2023-04-20 01:12:43 -07:00
Mike Cao f0d13efc7a Fix typo. 2023-04-19 22:11:00 -07:00
Mike Cao 03ba225587 More resetDate conversion. 2023-04-19 21:16:56 -07:00
Mike Cao e63591e35d resetDate should be a Date object. 2023-04-19 21:08:52 -07:00
Mike Cao 98028f1756 Add version info. 2023-04-19 19:33:24 -07:00
Mike Cao 3b6c6846b1 Fixed lang references. 2023-04-19 18:42:29 -07:00
Mike Cao ae49317c93 Merge remote-tracking branch 'origin/dev' into dev 2023-04-19 18:38:46 -07:00
Mike Cao e33a8e054b Updated how datasets are loaded, preventing chart redraw. 2023-04-19 18:38:08 -07:00
Mike Cao 1cfebc8c78
Merge pull request #1896 from lozanoSergio/develop
fix typo prisma mysql schema
2023-04-19 17:09:31 -07:00
Mike Cao 06d19e8594
Merge branch 'dev' into develop 2023-04-19 17:09:21 -07:00
Mike Cao eb7a83b404
Merge pull request #1879 from kaisteinke/master
Add missing locales
2023-04-19 17:07:03 -07:00
Mike Cao afde1377dc
Merge branch 'dev' into master 2023-04-19 17:06:46 -07:00
Mike Cao b1856c7eb3 Merge branch 'dev' of https://github.com/umami-software/umami into dev 2023-04-19 17:03:11 -07:00
Mike Cao f2c0b4253a
Merge pull request #1917 from atmonshi/ui-rtl
UI rtl
2023-04-19 17:02:25 -07:00
php coder 1520f21b82
Merge branch 'umami-software:master' into ui-rtl 2023-04-20 03:01:20 +03:00
Mike Cao 1d9cb0d7c7 Fix message. 2023-04-19 16:42:42 -07:00
Mike Cao dbafc98142 Update checkout action. 2023-04-19 16:20:45 -07:00
Mike Cao b39ef68372 Update language bundle. 2023-04-19 13:18:47 -07:00
Mike Cao b95208afcd
Merge pull request #1921 from MBRjun/dev
i18n: update zh-CN translations
2023-04-19 13:15:44 -07:00
Mike Cao 374555aff3 Updated prisma to 4.13.0. 2023-04-19 12:51:42 -07:00
MBRjun af14ccb60e
i18n: update zh-CN translations 2023-04-20 03:03:33 +08:00
Mike Cao 8bd289ad01 Fixed realtime metrics display. Closes #1899. 2023-04-19 11:46:41 -07:00
Mike Cao 9c2242012e Merge remote-tracking branch 'origin/dev' into dev 2023-04-19 11:41:40 -07:00
Mike Cao cc20f898b1 Localize x axis labels. Closes #1913 2023-04-19 11:41:31 -07:00
Francis Cao 2cd1f5541b add event type to getWebsiteStats 2023-04-19 09:13:16 -07:00
Mike Cao 083a9ffc2c Merge remote-tracking branch 'origin/dev' into dev 2023-04-19 08:49:47 -07:00
Mike Cao ac8d8bbd1e Added middleware for docker. 2023-04-19 08:49:16 -07:00
Ash Monsh ab48a0882a rotate the arrow icon for rtl language
rotate the arrow icon for rtl language
2023-04-19 07:31:25 +03:00
Ash Monsh aca612c833 Update ProfileButton.js
set alignment base on the page dir for User profile menu
2023-04-19 07:30:43 +03:00
Ash Monsh a52bfaa629 Update LanguageButton.js
set alignment base on the page dir for Language menu
2023-04-19 07:30:09 +03:00
Francis Cao 0889542f3b fix minimum password length message 2023-04-18 16:00:33 -07:00
Francis Cao 16ece9ad64 Merge branch 'dev' of https://github.com/umami-software/umami into dev 2023-04-18 12:45:08 -07:00
Francis Cao e8ca23c390 update mysql min versino to 5.7 2023-04-18 11:27:55 -07:00
Mike Cao 3eabe9b958 Merge branch 'dev' 2023-04-18 10:56:05 -07:00
Mike Cao 78030eb4a0 Merge branch 'dev' of https://github.com/umami-software/umami into dev 2023-04-18 10:55:55 -07:00
Mike Cao db31810e68 Updated messages. 2023-04-18 10:04:49 -07:00
Mike Cao 81bc5d730e
Merge pull request #1897 from atmonshi/update-lang
update missing translation for arabic lang
2023-04-18 09:53:26 -07:00
Mike Cao 64d2cf3805
Merge pull request #1904 from screendriver/noindex
Prevent indexing content by search engines
2023-04-18 09:51:46 -07:00
Mike Cao 3d64985f1a
Merge pull request #1910 from jonaskuske/patch-1
fix: use new script name in update-tracker.js
2023-04-18 09:51:15 -07:00
Mike Cao 03f7f910f2
Merge pull request #1911 from Maxime-J/localization
ensure some translations
2023-04-18 09:50:37 -07:00
Mike Cao ab0066517d
Merge pull request #1912 from Maxime-J/fr
update fr-FR
2023-04-18 09:49:28 -07:00
Francis Cao 939f4752bb Fix mysql prisma schema teamuser 2023-04-18 09:43:58 -07:00
Mike Cao 56ad1c1602
Merge pull request #1908 from dngferreira/master
fix version sql on check_db.js
2023-04-18 09:37:29 -07:00
Maxime-J c548ac9ca3 update fr-FR 2023-04-18 14:51:04 +00:00
Maxime-J b3c1eb1437 ensure some translations 2023-04-18 14:35:45 +00:00
Jonas e19d612db2
fix: use new script name in update-tracker.js 2023-04-18 16:29:30 +02:00
Duarte Ferreira 94df42a306 fix version sql on check_db.js 2023-04-18 15:17:34 +01:00
Christian Rackerseder 904f9408d8
Prevent indexing content by search engines 2023-04-18 14:05:43 +02:00
Ash Monsh 10a4921942 update missing translation for arabic lang 2023-04-18 10:27:17 +03:00
Sergio a7daae2d20 fix typo prisma mysql schema 2023-04-18 09:07:59 +02:00
Mike Cao bac8edd113 Merge branch 'dev' of https://github.com/umami-software/umami into dev 2023-04-17 11:13:08 -07:00
Mike Cao dfae0c150d Merge branch 'dev'
# Conflicts:
#	components/common/Calendar.js
#	components/common/EventDataButton.js
#	components/forms/EventDataForm.js
#	components/layout/Header.js
#	db/mysql/migrations/02_add_event_data/migration.sql
#	lang/be-BY.json
#	lang/de-CH.json
#	lang/es-MX.json
#	lang/fa-IR.json
#	lang/km-KH.json
#	lang/lt-LT.json
#	lang/th-TH.json
#	lib/auth.js
#	lib/detect.ts
#	lib/lang.js
#	lib/middleware.js
#	lib/prisma.js
#	package.json
#	pages/_app.js
#	pages/api/accounts/[id]/password.js
#	pages/api/collect.js
#	pages/api/realtime/init.js
#	pages/api/websites/[id]/index.js
#	pages/api/websites/[id]/reset.ts
#	pages/api/websites/index.js
#	public/intl/messages/fa-IR.json
#	public/intl/messages/lt-LT.json
#	public/intl/messages/pt-BR.json
#	public/intl/messages/th-TH.json
#	queries/analytics/event/getEventData.js
#	queries/analytics/event/getEventMetrics.js
#	queries/analytics/pageview/getPageviewMetrics.js
#	queries/analytics/pageview/getPageviewParams.js
#	queries/analytics/pageview/getPageviewStats.js
#	queries/analytics/session/getSessionMetrics.js
#	queries/analytics/stats/getActiveVisitors.js
#	queries/analytics/stats/getWebsiteStats.js
#	sql/schema.mysql.sql
#	styles/index.css
#	yarn.lock
2023-04-17 11:08:17 -07:00
Mike Cao 0e4c071b16 Bump version v2.0.0. 2023-04-17 10:36:24 -07:00
Mike Cao d406564af3 Manually merge PR #1879. 2023-04-17 10:31:50 -07:00
Mike Cao 60984e031c Merge remote-tracking branch 'origin/dev' into dev 2023-04-17 10:26:37 -07:00
Mike Cao d2edb0d0d7 Manually merge PR #1799. 2023-04-17 10:26:08 -07:00
Mike Cao 2bd970ba2b
Merge pull request #1883 from screendriver/noindex
Prevent indexing content by search engines
2023-04-17 10:23:08 -07:00
Mike Cao 23b98314d6
Merge pull request #1831 from vidschofelix/master
Upgrade Postgres to 15
2023-04-17 10:10:27 -07:00
Francis Cao 01559c4c63 update docker-compose to 15-alpine 2023-04-17 10:10:05 -07:00
Francis Cao 43499eb4fd fix region / city filters 2023-04-17 00:10:51 -07:00
Francis Cao 672608b2f5 re-add pgcrypto extension 2023-04-16 21:13:51 -07:00
Francis Cao b1074c893a 01_init schema changes 2023-04-16 21:07:36 -07:00
Mike Cao 561770a469 Add selected state. 2023-04-16 20:46:38 -07:00
Mike Cao 7e79711900 Merge remote-tracking branch 'origin/dev' into dev 2023-04-16 16:35:28 -07:00
Mike Cao 061d8cd174 Fixed incorrect messages. 2023-04-16 16:34:49 -07:00
Francis Cao b7d64a91bd fix check-db workflow 2023-04-14 10:24:48 -07:00
Mike Cao 54b018f7ba Merge branch 'dev' of https://github.com/umami-software/umami into dev 2023-04-13 23:37:50 -07:00
Mike Cao 43a4357729 Updated subdivision save. 2023-04-13 23:32:28 -07:00
Mike Cao fa52e6c83f Merge remote-tracking branch 'origin/dev' into dev 2023-04-13 23:06:04 -07:00
Mike Cao b183fc1600 Fixed map issue. 2023-04-13 23:05:54 -07:00
Francis Cao 06649c2e31 at null check for subdivision save 2023-04-13 22:59:04 -07:00
Brian Cao 7e096336ce Merge remote-tracking branch 'origin/dev' into dev 2023-04-13 22:52:44 -07:00
Brian Cao 3461342601 Clean up api. 2023-04-13 22:52:41 -07:00
Mike Cao 2890cb4419 Merge remote-tracking branch 'origin/dev' into dev 2023-04-13 22:44:49 -07:00
Mike Cao 35fbb7321e Added districts for Bangladesh. 2023-04-13 22:44:43 -07:00
Francis Cao 42df7695e8 Merge branch 'dev' of https://github.com/umami-software/umami into dev 2023-04-13 22:40:54 -07:00
Francis Cao 9dd9ab1325 concatenate subdivision saves 2023-04-13 22:40:48 -07:00
Mike Cao e286994397 Merge branch 'dev' of https://github.com/umami-software/umami into dev
# Conflicts:
#	public/iso-3166-2.json
2023-04-13 22:30:22 -07:00
Mike Cao f2edd0d604 Added regions and cities support. 2023-04-13 22:28:29 -07:00
Francis Cao 44e37ece2d add PH to iso-3166-2 json 2023-04-13 22:17:36 -07:00
Mike Cao ad3ee5e953 Added entries for PH. 2023-04-13 22:13:30 -07:00
Brian Cao 0335fd3529 Remove webisite.teamId related code. Clean up queries. 2023-04-13 20:57:22 -07:00
Brian Cao 081a126c01 Merge remote-tracking branch 'origin/dev' into dev 2023-04-13 20:33:24 -07:00
Brian Cao baa6d8486b Remove unused code. 2023-04-13 20:33:21 -07:00
Francis Cao aa418e0bed add delete user label for modal 2023-04-13 17:20:42 -07:00
Francis Cao 887b3abb29 Fix deleteWebsite message 2023-04-13 17:10:04 -07:00
Francis Cao cc9b1d21cb fix delete team confirmation message 2023-04-13 16:14:05 -07:00
Brian Cao ef324fdf73 Fix update user. 2023-04-13 12:08:53 -07:00
Christian Rackerseder ab44150532
Prevent indexing content by search engines 2023-04-13 08:44:34 +02:00
Francis Cao 5fc96cf5e1 fix logout error 2023-04-12 22:53:38 -07:00
Mike Cao 5997efc276 Merge branch 'dev' of https://github.com/umami-software/umami into dev 2023-04-12 20:03:16 -07:00
Mike Cao a30147547b Fix dropdown css. 2023-04-12 17:47:11 -07:00
Mike Cao 4e36149e32 Merge remote-tracking branch 'origin/dev' into dev 2023-04-12 17:43:18 -07:00
Mike Cao b32ced5501 Responsive fixes for settings pages. 2023-04-12 17:43:08 -07:00
Mike Cao 4a1c6f40a6 Fix config. 2023-04-12 13:41:00 -07:00
Mike Cao e2fcd40c2b Added SettingsTable. 2023-04-12 13:40:19 -07:00
Kai Steinke 0926a4c310
feat: add missing locales and sort alphabetically 2023-04-11 10:53:43 +02:00
Francis Cao 21e48c194e fix system user insert mysql 2023-04-10 09:56:25 -07:00
Francis Cao f5f6dc052e fix column name date bug 2023-04-10 09:44:25 -07:00
Mike Cao da79e4c19e Merge branch 'dev' of https://github.com/umami-software/umami into dev 2023-04-10 07:29:15 -07:00
Mike Cao f84e41e198 Merge branch 'dev' of https://github.com/umami-software/umami into dev
# Conflicts:
#	components/messages.js
2023-04-10 07:25:27 -07:00
Mike Cao 94ed67e339 Responsive updates. 2023-04-09 20:22:28 -07:00
Brian Cao 3e1c1a85e4 update label. 2023-04-09 17:42:34 -07:00
Brian Cao 339085a946 Add 'admin' label 2023-04-09 16:17:30 -07:00
Brian Cao f7119d494b Fix translation. 2023-04-09 16:06:59 -07:00
Brian Cao 9eff565e7a Fix teamWebsite / teamUser. 2023-04-09 16:04:28 -07:00
Mike Cao 53b23420a4 Fixed country names lookup. 2023-04-08 16:31:21 -07:00
Mike Cao 07c92ff9b5 Compiled language bundles. 2023-04-08 15:56:13 -07:00
Mike Cao 0dc6529cf1 Added new languages to lib/lang. 2023-04-08 15:51:49 -07:00
Mike Cao 7b97cb3348 Merged messages. 2023-04-08 14:07:36 -07:00
Mike Cao 2798de0c4c Added de-CH file. 2023-04-08 14:06:43 -07:00
Mike Cao b2bebaea3e Added km-KH, updated be-BY. 2023-04-08 13:58:58 -07:00
Mike Cao e850fbd0bd Merge changes from master. 2023-04-08 13:55:52 -07:00
Mike Cao 2dbc6ce381 Updated languages. 2023-04-08 13:49:58 -07:00
Mike Cao 2656de6682 Updated language bundles with new keys. 2023-04-08 13:14:22 -07:00
Mike Cao 63e535eea4
Merge pull request #1870 from kaisteinke/master
Add Swiss German language locale (de-CH)
2023-04-08 02:30:30 -07:00
Mike Cao 45d3fa4016 Merge branch 'dev' of https://github.com/umami-software/umami into dev 2023-04-08 01:36:21 -07:00
Brian Cao f45995e8b5 Merge remote-tracking branch 'origin/dev' into dev 2023-04-07 22:45:49 -07:00
Brian Cao 7b07de7a98 Api work for remove user. 2023-04-07 22:45:46 -07:00
Mike Cao f0cddc2743 Fixed messages. 2023-04-07 22:03:52 -07:00
Mike Cao ee8d1ee9e3
Merge pull request #1785 from enricopaulini/master
Label Incrementions and pt-BR update
2023-04-07 21:46:57 -07:00
Francis Cao 6ee846d102
Merge pull request #1875 from umami-software/dev
add referrer_domain to getEvent
2023-04-07 14:40:16 -07:00
Francis Cao 7a1ac22dde add referrer_domain to getEvent 2023-04-07 14:37:22 -07:00
Francis Cao 0f6cfca522
Merge pull request #1874 from umami-software/dev
fix urlPath clickhouse
2023-04-07 14:27:04 -07:00
Francis Cao 24ac7d6be0 fix urlPath clickhouse 2023-04-07 14:23:38 -07:00
Mike Cao a33706585b Merge branch 'dev' into analytics 2023-04-07 11:49:31 -07:00
Mike Cao 6424100223 Fixed typo in query. 2023-04-07 11:48:43 -07:00
Brian Cao f4f657b666 Merge remote-tracking branch 'origin/dev' into dev 2023-04-07 11:40:30 -07:00
Brian Cao 6b0d6c0d1c Delete event_data on website reset/delete. 2023-04-07 11:40:28 -07:00
Mike Cao 459fbc03ce Merge branch 'dev' into analytics 2023-04-07 11:39:52 -07:00
Francis Cao f38f0c6420
Merge pull request #1873 from umami-software/bug/um-250-fix-realtime-data
fix some components in realtime data
2023-04-07 10:56:42 -07:00
Francis Cao db845d6c04 remove urlpath conditional 2023-04-07 10:28:54 -07:00
Mike Cao b1fbb20967 Merge branch 'dev' into analytics 2023-04-06 20:41:24 -07:00
Mike Cao 594660f298 Reverted SSO process. 2023-04-06 20:35:55 -07:00
Mike Cao 25d4a9cec0 Added ProfileButton to cloud mode. 2023-04-06 20:34:02 -07:00
Francis Cao 05ece6a4d0 fix some components in realtime data 2023-04-06 18:31:16 -07:00
Kai Steinke 767b25a9af
Update lang/de-CH.json
Co-authored-by: Philipp <49908921+pwuersch@users.noreply.github.com>
2023-04-06 23:40:40 +02:00
Kai Steinke 5325996a56
Update lang/de-CH.json
fix: delete warning message correct grammar

Co-authored-by: Philipp <49908921+pwuersch@users.noreply.github.com>
2023-04-06 23:36:21 +02:00
Kai Steinke e71200a53f
feat: add ch-DE locale 2023-04-06 23:14:13 +02:00
Mike Cao f56374b259 Migrate changes from cloud. 2023-04-05 09:55:21 -07:00
Mike Cao 0217f19d99 Merge branch 'dev' into analytics 2023-04-04 23:41:58 -07:00
Mike Cao 6dd90ce9ca Refactored SSO process. 2023-04-04 23:29:54 -07:00
Mike Cao dea4b4766c Merge branch 'dev' into analytics 2023-04-04 00:36:11 -07:00
Mike Cao 2631f00598 Merge remote-tracking branch 'origin/dev' into dev 2023-04-04 00:34:15 -07:00
Mike Cao 84894a5b80 Updated tracker to handle links. 2023-04-04 00:34:07 -07:00
Mike Cao d851a9e88b Fixed test console error. 2023-04-04 00:27:25 -07:00
Brian Cao c0e79f5e9d Merge branch 'dev' into analytics 2023-04-04 00:24:10 -07:00
Brian Cao dee58f8a55 Fix date function. 2023-04-04 00:24:03 -07:00
Brian Cao 4c92da6fc6 Merge branch 'dev' into analytics 2023-04-03 23:22:25 -07:00
Brian Cao 76296bc2ee Fix realtime. 2023-04-03 23:22:20 -07:00
Brian Cao 329df22a5d Fix realtime. 2023-04-03 23:21:29 -07:00
Mike Cao b4f6dfedda Merge branch 'dev' into analytics 2023-04-03 20:32:12 -07:00
Mike Cao c30aa4c0b6 Merge remote-tracking branch 'origin/dev' into dev 2023-04-03 20:22:53 -07:00
Mike Cao 8276a769e6 Remove www from domain. 2023-04-03 20:22:23 -07:00
Mike Cao 005b14b629
Merge pull request #1864 from umami-software/dev
Dev into analytics
2023-04-03 19:40:20 -07:00
Francis Cao 58197116dd remove getPath from initial referrer 2023-04-03 19:34:41 -07:00
Brian Cao 93707606df Fix chart re-render. 2023-04-03 17:26:37 -07:00
Brian Cao d47724858a Fix team message. 2023-04-03 14:35:31 -07:00
Mike Cao 5103da331a Remove visible check. 2023-04-03 03:12:12 -07:00
Mike Cao 31f28125dc Revert font. 2023-04-02 23:12:43 -07:00
Mike Cao ae772f048c Fix referrer lookup. 2023-04-02 22:41:24 -07:00
Mike Cao ba71f5cafc Fix location lookup. 2023-04-02 22:36:52 -07:00
Mike Cao 7464bd2521 Fixed types. 2023-04-02 17:28:25 -07:00
Mike Cao 9001361e4c Fix session lookup. 2023-04-02 17:23:12 -07:00
Mike Cao bbdb672063 Removed middleware. 2023-04-02 16:51:00 -07:00
Mike Cao b77657faa6 Updated error message. 2023-04-02 16:33:44 -07:00
Mike Cao 4e9d661d82 Merge remote-tracking branch 'origin/dev' into dev 2023-04-02 14:23:30 -07:00
Mike Cao 8b966a04b0 Fixed password update. 2023-04-02 14:23:21 -07:00
Brian Cao 6805a8978a Move loading button logic out. 2023-04-02 12:24:50 -07:00
Mike Cao 2713e3316a Fixed font. 2023-04-02 10:00:28 -07:00
Mike Cao 8da72a693d Fix filter clear all button. 2023-04-01 21:06:11 -07:00
Mike Cao 2411aeae8d Updated scrollbar styles. 2023-04-01 20:40:01 -07:00
Mike Cao 8397102bac Switch to next/font. 2023-04-01 20:03:38 -07:00
Mike Cao 728e4cff5b Updated queries to use cache. 2023-04-01 17:38:35 -07:00
Mike Cao 74192cd695 Refactored filter logic. 2023-04-01 15:44:30 -07:00
Mike Cao 2b395f252d
Merge pull request #1851 from seanghay/master
Add Khmer language of Cambodia (km-KH)
2023-03-31 22:20:02 -07:00
Mike Cao 479dc06d36
Merge pull request #1832 from BE-CH/master
ARM Docker support
2023-03-31 22:17:00 -07:00
Mike Cao e31ee89fee
Merge pull request #1854 from BennyDeeDev/patch-1
README: docker compose detach as default
2023-03-31 22:14:37 -07:00
Mike Cao 57c3d03cc8 Removed Tag component. 2023-03-31 22:01:36 -07:00
Mike Cao 17601c4dea Style scrollbars. 2023-03-31 21:31:58 -07:00
Mike Cao 14802afe8b Fixed pages table loading. Fixed z-indexes. 2023-03-31 20:03:28 -07:00
Brian Cao 91100393eb Merge remote-tracking branch 'origin/dev' into dev 2023-03-31 14:53:50 -07:00
Brian Cao d2687b6580 Fix metrics. 2023-03-31 14:53:48 -07:00
Mike Cao e2b95f2235 Merge remote-tracking branch 'origin/dev' into dev 2023-03-31 05:56:01 -07:00
Mike Cao 9dd35b3766 Fixed metrics display. 2023-03-31 05:55:28 -07:00
Francis Cao b7c3b58072 fix to page title collect 2023-03-30 23:13:03 -07:00
Benjamin Derksen ead831bb3c
detach as default 2023-03-30 20:34:11 +02:00
Brian Cao 2172dddd1c Convert send to TS. 2023-03-30 11:18:57 -07:00
Brian Cao e4c801e823 Merge remote-tracking branch 'origin/dev' into dev 2023-03-30 10:46:01 -07:00
Brian Cao c175120aa2 Add page title to test console. 2023-03-30 10:45:58 -07:00
Mike Cao 64b040c865 Fixed query parameter filter. 2023-03-30 09:44:04 -07:00
Mike Cao 358519dddd Removed filters from pages. 2023-03-29 23:29:37 -07:00
Mike Cao a026fc97fc Prevent blank urls. 2023-03-29 23:14:09 -07:00
Mike Cao 14a8ae2b81 Merge remote-tracking branch 'origin/dev' into dev 2023-03-29 23:08:38 -07:00
Mike Cao d471d05217 Added config to open websites in new tab. 2023-03-29 23:08:26 -07:00
Brian Cao 055e7f04fc Merge remote-tracking branch 'origin/dev' into dev 2023-03-29 20:54:58 -07:00
Brian Cao 44e6bff6b1 Remove sensitive user information. 2023-03-29 20:54:54 -07:00
Francis Cao 964ef1c92e
Merge pull request #1853 from umami-software/feat/um-219-squash-postgres-init-migration
Feat/um 219 squash postgres init migration
2023-03-29 16:36:34 -07:00
Brian Cao 6d5aeb3bd1 Fix joining team dupe. Add loading to team member remove. Fix messages. 2023-03-29 16:02:14 -07:00
Francis Cao 96d25721da add pgcrypto back 2023-03-29 14:22:14 -07:00
Francis Cao f984d80c42 squash 01_init postgresql 2023-03-29 11:38:08 -07:00
Francis Cao a22d50a597
Merge pull request #1852 from umami-software/feat/um-218-update-ch-website-event
update CH event to website_event
2023-03-29 11:26:51 -07:00
Francis Cao 3b7000a436 fix active bug 2023-03-29 11:16:02 -07:00
Francis Cao 95ed8a09aa update CH event to website_event 2023-03-29 11:06:12 -07:00
Seanghay Yath 9e865ecdf3
feat: add km-KH locale 2023-03-29 11:43:19 +07:00
Mike Cao 05933ff1d2 Use new geo folder. 2023-03-28 19:24:36 -07:00
Mike Cao 23d02e5aac Try reverting to country database. 2023-03-28 19:10:11 -07:00
Francis Cao 33bf2ccb5e add referrer to saveEvent 2023-03-28 16:34:14 -07:00
Mike Cao f3e146d0fb Added vercel.json. 2023-03-28 16:02:36 -07:00
Francis Cao f2d86f9307
Merge pull request #1848 from umami-software/feat/um-209-implement-reset-date
Feat/um 209 implement reset date
2023-03-27 16:27:07 -07:00
Francis Cao 4d6abc4529 remove unused ref columns 2023-03-27 15:54:37 -07:00
Francis Cao 17c8cc07e4 we Merge branch 'dev' into feat/um-209-implement-reset-date 2023-03-27 15:51:54 -07:00
Francis Cao 077fad20ea update skip_broken_messages 2023-03-27 12:44:59 -07:00
Francis Cao c38da5bfd7 readd system user insert for mysql 2023-03-27 12:15:22 -07:00
Francis Cao fbe35f4c97 fixed relational query to get reset_at 2023-03-27 12:11:06 -07:00
Francis Cao cb79d806e8 update postgres / mysql migrations 2023-03-27 11:36:21 -07:00
Francis Cao 14e4a090bb update schema and queries to implement reset_at 2023-03-27 11:25:16 -07:00
Mike Cao cdacb640c6 Updated tracker and collect. 2023-03-26 04:15:08 -07:00
Mike Cao 43ef6884df Updated layout for settings pages. 2023-03-24 10:55:20 -07:00
Mike Cao 9260e5bc33 Updated settings. 2023-03-23 16:33:10 -07:00
Brian Cao be2fc0de8d Fix ch schema. 2023-03-23 14:17:32 -07:00
Brian Cao 9979672de5
Feat/um 202 event data new (#1841)
* Add event_data base.

* Add url_path.

* Add eventData back.

* Finish event_data relational.

* resolve comments.
2023-03-23 14:01:15 -07:00
Mike Cao c2789d70bc Added SideNav component. 2023-03-23 11:46:49 -07:00
Mike Cao 1666e5e3af
Merge pull request #1840 from umami-software/feat/um-207-add-event-data-relational-db
Feat/um 207 add event data relational db
2023-03-22 23:49:16 -07:00
Francis Cao 87545a5648 add system user insert back for MySQL 2023-03-22 23:07:01 -07:00
Francis Cao ea39f5b431 add new event data schema 2023-03-22 23:02:37 -07:00
Mike Cao 9ddb8b5d25 Use useMessages hook everywhere. 2023-03-22 14:05:55 -07:00
Mike Cao f3e1f18e1b Updated sticky header logic. 2023-03-22 01:53:34 -07:00
Mike Cao 8532c673fe Merge remote-tracking branch 'origin/dev' into dev 2023-03-21 21:28:52 -07:00
Mike Cao fc2a8f3d9f Updated navigation. 2023-03-21 21:28:36 -07:00
Francis Cao a8cd0932d8 fixed send message for new url/referrer columns 2023-03-21 11:30:11 -07:00
Mike Cao 611169c65f Fix referrers table. 2023-03-20 13:39:40 -07:00
Mike Cao 7b0b97afb9
Merge pull request #1838 from umami-software/bug/um-200-fix-referrer-filters
Split url / referrer columns in db schema
2023-03-20 13:22:58 -07:00
Francis Cao ffb2771819 Merge branch 'dev' of https://github.com/umami-software/umami into bug/um-200-fix-referrer-filters 2023-03-20 11:27:00 -07:00
Francis Cao b0c5899569 update prisma / ch filters logic 2023-03-20 11:26:45 -07:00
Mike Cao 0b20885772 Merge remote-tracking branch 'origin/dev' into dev 2023-03-16 15:56:32 -07:00
Mike Cao c62e2e9cc7 Update tooltip date formats. 2023-03-16 15:56:05 -07:00
Francis Cao 434ef3eb9e Merge branch 'dev' of https://github.com/umami-software/umami into bug/um-200-fix-referrer-filters 2023-03-16 10:52:36 -07:00
Francis Cao 9c8cb8247e update gitignore to new script name 2023-03-16 10:36:30 -07:00
Mike Cao afec08b355 Fixed grid lines on bar chart. 2023-03-16 02:05:56 -07:00
Francis Cao 790e71cc14 Merge branch 'dev' of https://github.com/umami-software/umami into bug/um-200-fix-referrer-filters 2023-03-15 16:40:13 -07:00
Francis Cao f569f6ac91 fix null ip lookup error 2023-03-15 16:39:55 -07:00
Mike Cao 54051d7204 Updated tracker script name and endpoint. 2023-03-15 16:27:05 -07:00
Francis Cao 275e7d3df6 update send 2023-03-15 16:06:51 -07:00
Mike Cao be8eb61f7f Fixed issue with responsive charts. 2023-03-14 23:29:53 -07:00
Mike Cao c1d3e9ec67 Upgraded Chart.js to v4. Updated charts. 2023-03-14 22:37:50 -07:00
Francis Cao 7596f42545 update pageview, event save 2023-03-14 18:59:19 -07:00
Francis Cao cfa36d1802 clean-up migrations 2023-03-14 17:43:36 -07:00
Francis Cao 9321401297 schema changes to CH, Postgres, MySQL 2023-03-14 17:27:17 -07:00
Mike Cao 3823705fc6 Added HoverTooltip component. Removed react-tooltip. 2023-03-14 11:35:24 -07:00
BE-CH 3a18e79d45 Updated lockfile to support ^ 2023-03-12 23:37:54 +01:00
BE-CH 403144eb30 Added ^ to Prisma version package.json 2023-03-12 23:36:16 +01:00
BE-CH 61732f391e Updated Prisma version to support ARM64 2023-03-12 23:32:44 +01:00
BE-CH 0ec20d42cf Removed platform issues 2023-03-12 21:03:14 +01:00
BE-CH e31f882333 Prisma requires linux/amd64.... 2023-03-12 20:45:46 +01:00
BE-CH c07a561eda Made the builder run as amd64 to avoid prisma arm problems 2023-03-12 19:53:49 +01:00
BE-CH 7df58a921f Added network timeout for yarn 2023-03-12 18:35:36 +01:00
BE-CH 4362be44e0 updated manual cd action 2023-03-12 18:08:13 +01:00
BE-CH 91bcbec2af + v6 and arm platform 2023-03-12 18:06:06 +01:00
Mike Cao 9a3e8921a7 Merge branch 'dev' of https://github.com/umami-software/umami into dev 2023-03-10 18:45:51 -08:00
Mike Cao 6ba00152c2 Updated filter tags. 2023-03-10 17:49:19 -08:00
Felix 2470fb4c7c
Upgrade Postgres to 15 2023-03-10 22:52:54 +01:00
Brian Cao 72af76a417 Merge remote-tracking branch 'origin/dev' into dev 2023-03-09 23:21:23 -08:00
Brian Cao 701bde53b7 Hook up teamMemberDelete and teamDelete. 2023-03-09 23:21:19 -08:00
Mike Cao fd83b63a30 Updated metrics logic. 2023-03-09 20:42:55 -08:00
Mike Cao 7a3443cd06
Merge pull request #1775 from EffakT/country_fallback
Adding registered_country fallback to getCountry
2023-03-09 15:55:38 -08:00
Mike Cao 23ea2e9e93
Merge pull request #1784 from juangacovas/patch-1
Update es-MX.json
2023-03-09 15:53:31 -08:00
Mike Cao c3426a67ee Add messages for devices. 2023-03-09 15:18:54 -08:00
Mike Cao e2c801439d
Merge pull request #1774 from ppnplus/patch-1
Update th-TH.json
2023-03-09 15:17:21 -08:00
Mike Cao 49402924aa
Merge pull request #1792 from d19dotca/patch-1
Stylized macOS + sorted Desktop & Mobile OS names
2023-03-09 15:16:05 -08:00
Mike Cao 0d6da743b9 Updated react-basics. 2023-03-09 14:34:22 -08:00
Brian Cao 8a9532f213
Feat/um 197 hook up teams (#1825)
* Link up teams UI.

* Fix auth order.

* PR touchups.
2023-03-09 12:42:12 -08:00
Mike Cao f908476e71 Fixed link issue. 2023-03-09 10:39:59 -08:00
Mike Cao 0607e9f442 Upgraded next to 13. Fixed date filter for websites. 2023-03-08 20:23:32 -08:00
Mike Cao 9b90036401 Upgrade prisma. 2023-03-08 17:21:53 -08:00
Mike Cao 178d780ab7 Updated minor packages. 2023-03-08 17:16:13 -08:00
Mike Cao cb55cec342 Fixed rewrite config. 2023-03-08 16:48:44 -08:00
Mike Cao fcf51d9727 Merge remote-tracking branch 'origin/dev' into dev 2023-03-08 16:38:12 -08:00
Mike Cao 696d9c978c Updated date range handling. Fixed share page. 2023-03-08 16:37:43 -08:00
Francis Cao bb2cd93ad4 undo 01_init change 2023-03-06 11:25:05 -08:00
Brian Cao 7b9abd72f8 Limit metrics. 2023-03-05 13:30:21 -08:00
Mike Cao 3fc5f5151b Touch up footer. 2023-03-03 21:26:39 -08:00
Brian Cao 05f01cd09e Merge remote-tracking branch 'origin/dev' into dev 2023-03-03 13:15:19 -08:00
Brian Cao b41a2a4e56 Rename migration. 2023-03-03 13:15:12 -08:00
Mike Cao 19662abcd8
Merge pull request #1808 from umami-software/bug/um-191-fix-redis-auth-misc-bug
Bug/um 191 fix redis auth misc bug
2023-03-03 13:15:10 -08:00
Mike Cao ab8296235f Updated next-basics. 2023-03-03 12:42:28 -08:00
Mike Cao 0119f7bcde Merge remote-tracking branch 'origin/dev' into dev 2023-03-03 12:39:16 -08:00
Mike Cao fd1006a299 Updated react-basics. 2023-03-03 12:39:10 -08:00
Mike Cao bb99b3eba5 Fixed sticky header scrolling. Updated settings button. 2023-03-03 12:37:26 -08:00
Francis Cao 448d2b2241 fix redis auth issue 2023-03-03 12:30:12 -08:00
Francis Cao 3325df0d84 Merge branch 'dev' of https://github.com/umami-software/umami into bug/um-191-fix-redis-auth-misc-bug 2023-03-03 10:38:34 -08:00
Francis Cao 65691f5912 fix referrer domain on tracker load 2023-03-03 10:38:14 -08:00
Brian Cao 8684781624 Clean up teams on user delete. 2023-03-02 22:48:30 -08:00
Francis Cao c9cacbb0e2 add types back to event / pageview. fix non-redis auth 2023-03-02 12:56:38 -08:00
Mike Cao 5262d19c8b Fix update notice. 2023-03-01 23:59:01 -08:00
Brian Cao 82f0bc3d2b
remove event_data. (#1804) 2023-03-01 16:42:47 -08:00
Mike Cao 94165ca5ad
Merge pull request #1803 from umami-software/feat/um-171-cloud-mode-env-variable
Cities, Subdivisions, Page Title
2023-03-01 16:14:29 -08:00
Francis Cao e5645cfb00 revert tsconfig 2023-03-01 12:19:41 -08:00
Francis Cao ad28d69d27 update ts config to ignore js files 2023-03-01 12:09:37 -08:00
Francis Cao 37e98c9751 remove lint rule 2023-03-01 11:57:13 -08:00
Francis Cao a777b2916f Merge branch 'dev' of https://github.com/umami-software/umami into feat/um-171-cloud-mode-env-variable 2023-03-01 11:40:34 -08:00
Francis Cao 93650a2f66 add pagetitle to queries 2023-03-01 10:53:57 -08:00
Mike Cao 4cb5a14de9 Merge branch 'dev' of https://github.com/umami-software/umami into dev 2023-02-28 20:04:17 -08:00
Mike Cao 3ac560dc0f Added checks for CLOUD_MODE. 2023-02-28 20:04:07 -08:00
Francis Cao 6c302a7325 collect pagetitle, update subdivision2 data type 2023-02-28 17:40:18 -08:00
Brian Cao 84430e38eb
Check deletedAt. (#1796) 2023-02-27 16:01:34 -08:00
Mike Cao 5657a64c77 Pass domain to realtime components. 2023-02-24 02:41:02 -08:00
Mike Cao 25f44b84df
Merge pull request #1789 from umami-software/dependabot/npm_and_yarn/undici-5.19.1
Bump undici from 5.16.0 to 5.19.1
2023-02-24 02:30:16 -08:00
Mike Cao b853255c23
Merge pull request #1793 from slawiko/add-be-by-locale
Add be-BY locale (belarusian language)
2023-02-24 02:29:51 -08:00
Mike Cao 7d3334ccce Fixed realtime logs. 2023-02-22 20:59:59 -08:00
slawiko 02272d3909 Adds locale mapping 2023-02-22 12:25:13 +01:00
slawiko 982d47c7e9 Adds translations for be-BY locale 2023-02-22 12:23:21 +01:00
Dustin Dauncey b8f72660d9
Stylized macOS + sorted Desktop & Mobile OS names
Since iOS was stylized, I thought it was consistent if we also stylized macOS (it's not Mac OS anymore, it's (macOS)[https://en.wikipedia.org/wiki/MacOS]). 

Also took a quick moment to sort the values for Desktop and Mobile OS names in order to more easily locate at a glance the item being looked for.
2023-02-20 21:21:05 -08:00
Francis Cao 55a586fe27 add subdivision1/2, cities to query logic 2023-02-20 09:04:20 -08:00
Mike Cao 8ecc6400ef Fixed visitor calculation. 2023-02-17 22:17:29 -08:00
Mike Cao 802c262cd9 Fixed realtime chart display. 2023-02-17 21:42:42 -08:00
Francis Cao 6bacfa5892 add city, subdivision1, subdivison2 2023-02-16 18:55:51 -08:00
dependabot[bot] 7e091c5d40
Bump undici from 5.16.0 to 5.19.1
Bumps [undici](https://github.com/nodejs/undici) from 5.16.0 to 5.19.1.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v5.16.0...v5.19.1)

---
updated-dependencies:
- dependency-name: undici
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-16 23:27:31 +00:00
Francis Cao 074fa2c5fc add subdivision2 to schema 2023-02-16 09:52:07 -08:00
Francis Cao b6cc6cb655 update CH, postgres, MySQL schemas 2023-02-15 09:40:49 -08:00
Mike Cao 93b77672f3 More updates to realtime. 2023-02-15 02:27:18 -08:00
Mike Cao 28921a7cd5 Updates to realtime. Fixed refresh button. 2023-02-14 17:23:20 -08:00
Francis Cao 4351ef37f8 update to GeoLite2-City 2023-02-14 12:06:41 -08:00
Francis Cao eea01b21cf Merge branch 'dev' of https://github.com/umami-software/umami into feat/um-171-cloud-mode-env-variable 2023-02-14 10:59:36 -08:00
Enrico Paulini 90db2239a2
Remove formatted message from placeholder 2023-02-12 22:58:59 -03:00
Enrico Paulini 1b44c5f826
Label Incrementions and pt-BR update 2023-02-12 20:40:03 -03:00
Mike Cao 638a674e99 Fixed filter tags. Added clear all option. 2023-02-11 22:10:14 -08:00
Juanga Covas 2c36eaad5c
Update es-MX.json
Translated some new strings from English to Spanish and assorted fixes
2023-02-11 17:51:21 +01:00
Mike Cao 4a689bf294 Added website menu view. Fixed pages filter. 2023-02-10 23:21:50 -08:00
Mike Cao d4437427c4 Removed prop-types. 2023-02-10 03:37:06 -08:00
Mike Cao c815e7cd51 More refactoring and clean-up. 2023-02-10 03:26:57 -08:00
Francis Cao 9f8ea060b6 implement cloud mode logic 2023-02-09 10:13:50 -08:00
Mike Cao f062cdbed2 Updated sticky header logic. 2023-02-09 08:22:36 -08:00
Mike Cao 45c13da262 More deletes. Fixed sticky header. 2023-02-08 23:14:11 -08:00
Mike Cao 87bbaa7f1d Fixed tooltips. 2023-02-07 22:17:55 -08:00
Mike Cao a7cad0190c Merge branch 'dev' of https://github.com/umami-software/umami into dev 2023-02-07 16:29:38 -08:00
Mike Cao ad5e34a894 Fixed lint issues. 2023-02-07 16:29:25 -08:00
Mike Cao 94726239aa Added /me/websites. 2023-02-07 16:28:55 -08:00
Mike Cao 423f26c7fb Fix lint issues. 2023-02-07 16:26:58 -08:00
Mike Cao 54d5af5cbb Progress check-in. 2023-02-04 08:59:52 -08:00
Mike Cao 30274a07fd
Merge pull request #1773 from umami-software/feat/um-121-v2-migration-script
Update MySQL db prisma files to 2.0
2023-02-03 12:40:34 -08:00
effakt 6b3eb7617d Adding registered_country fallback to getCountry 2023-02-04 08:46:32 +13:00
ppnplus e2e6c2cb8d
Update th-TH.json
1. Removed trailing full stops, as we don't use full stops in our language.
2. Changed the string for "Pages" from "หน้าเพจ" to "หน้า". The current string "หน้าเพจ" has two words with the same, overlapping meaning. "หน้า" is a proper translation for the word "page", while "เพจ" is a transliteration from the English pronunciation "page" which is more commonly used to refer to Facebook Pages in our language.
2023-02-03 12:13:59 +07:00
Mike Cao 0ce2d1fbfc Team delete functionality. 2023-02-02 11:59:38 -08:00
Francis Cao 6457ddfec1 update 01_init to latest 2023-02-02 10:18:06 -08:00
Francis Cao 9078444ca5 update mysql to latest schema 2023-02-02 10:12:25 -08:00
Francis Cao 0b16d06d8c move migrate-db to own repo 2023-02-02 10:04:21 -08:00
Francis Cao d6e17fe982 Merge branch 'dev' of https://github.com/umami-software/umami into feat/um-121-v2-migration-script 2023-02-02 10:00:53 -08:00
Mike Cao 835289a1f8 Fixed team websites query. 2023-02-02 03:30:09 -08:00
Mike Cao 22aeaf7166 Added owner column to teams table. 2023-02-02 02:54:43 -08:00
Mike Cao e5b57f63cd Merge branch 'dev' of https://github.com/umami-software/umami into dev 2023-02-01 18:40:04 -08:00
Mike Cao 656df4f846 Update teams features. 2023-02-01 18:39:54 -08:00
Mike Cao 9e4a5159ba
Merge pull request #1772 from umami-software/feat/um-169-team-website-db-update
add schema changes for TeamWebsite, update deleted logic for team tables
2023-02-01 18:38:16 -08:00
Francis Cao 5fd946cfde add schema changes for TeamWebsite, update deleted logic for team tables 2023-02-01 17:08:16 -08:00
Mike Cao 89f2fd601e Fix user logic. 2023-01-30 23:03:08 -08:00
Mike Cao 689bb94898
Merge pull request #1770 from umami-software/bug/planetscale-create-db
update schema.mysql.sql for planetscale install
2023-01-30 22:49:44 -08:00
Francis Cao 318dd7de74 update mysql from planetscale install 2023-01-30 22:07:30 -08:00
Mike Cao 02a1438cfe More refactoring. 2023-01-30 21:44:07 -08:00
Mike Cao 5f15ad0807 More refactoring, cleaned up icons, nav buttons, add messages. 2023-01-27 21:53:13 -08:00
Mike Cao cc2be9f47a
Merge pull request #1765 from umami-software/app
v1.40.0
2023-01-25 19:55:08 -08:00
Mike Cao b3c41786ba Bump version v1.40.0. 2023-01-25 19:47:03 -08:00
Mike Cao 219641a633 Updated language files. 2023-01-25 13:57:49 -08:00
Mike Cao 765833b357 Merge branch 'app' of https://github.com/umami-software/umami into app 2023-01-25 13:15:02 -08:00
Mike Cao 54eb8a19d4
Merge pull request #1760 from mbos2/croatian-translation-fix
Croatian translations update
2023-01-25 13:14:53 -08:00
Mike Cao a430eae12b Merged #1752. 2023-01-25 08:47:13 -08:00
Mike Cao 3acff56a59 Upgrade Prisma to 4.9.0. 2023-01-25 08:46:56 -08:00
Mike Cao 4b1013c8c6
Merge pull request #1752 from sdvcrx/add-cors-cache
Add maxAge config to cache CORS preflight request
2023-01-25 08:44:49 -08:00
Mike Cao 58a380d6e7
Merge pull request #1761 from umami-software/bug/um-165-rename-index-fix
add current database filter  when querying index
2023-01-25 08:37:06 -08:00
Mike Cao 7725b5c129 Refactored intl messages. 2023-01-25 07:42:46 -08:00
Francis Cao 51e79be23d add current databasefilter when querying index 2023-01-24 10:35:36 -08:00
Mike Cao fbccf4d3af Merge remote-tracking branch 'origin/dev' into dev 2023-01-23 15:32:47 -08:00
Mike Cao cdd54df8f6 Refactored user components. 2023-01-23 15:32:35 -08:00
Francis Cao 11ffd1cf4c
Merge pull request #1755 from umami-software/feat/um-143-check-db-v2
update check-db, add pgcrypto extension if not exists on init migration
2023-01-23 10:11:45 -08:00
Francis Cao 5bd8608918 fix checkDatabaseVersion message typo 2023-01-23 10:06:52 -08:00
Matej Bošnjak 1b6653c35c croatian translations fix 2023-01-23 18:54:35 +01:00
Mike Cao 91af593ff5 Updated settings components. 2023-01-20 17:12:53 -08:00
Francis Cao 7c0db0633f update check-db, add pgcrypto extension if not exists on init migration 2023-01-20 14:21:11 -08:00
Brian Cao 451fbc84a4 Even out calendar. 2023-01-20 12:45:45 -08:00
Brian Cao d9ba4097ee Fix calendar. 2023-01-20 12:33:21 -08:00
Brian Cao 5c683f9103
Fix share url update. (#1754) 2023-01-19 11:15:33 -08:00
sdvcrx 86aaa5519e
Add maxAge config to cache CORS preflight request 2023-01-19 18:06:18 +08:00
Brian Cao cd400bcef2 Fix regex. 2023-01-18 16:36:28 -08:00
Brian Cao 922c3acab3
Fix share URL permissions. (#1745)
* Fix share URL permissions.

* Add sql param logic.

* Add permissions to edit website.

* Update permissions.

* Move parameters to param injection.

* Sanitize eventdata.

* Remove caret.

* Fix avg.
2023-01-18 15:09:49 -08:00
Mike Cao 1d9c3133f0 Refactored layout. Added NavBar component. 2023-01-18 15:05:39 -08:00
Mike Cao 558ce268a0
Merge pull request #1742 from SamAsEnd/master
Created a file for am-ET language
2023-01-17 12:49:56 -08:00
Francis Cao 529b7a35c3 add pgcrypto to postgres via extension preview 2023-01-17 10:36:16 -08:00
Francis Cao 1bb33f7aff clean-up migrate data param 2023-01-16 12:14:50 -08:00
Francis Cao aba5b9362e refactor migrate-db 2023-01-16 11:59:55 -08:00
Samson Endale 5c134f3a2e Created a file for am-ET language 2023-01-14 12:56:06 +03:00
Mike Cao 05c7196bc6
Merge pull request #1734 from kiprasmel/lt-lang-upd-1
update lt-LT lang + create README how to update translations
2023-01-13 17:38:12 -08:00
Mike Cao 1758ae782d
Merge pull request #1736 from umami-software/dependabot/npm_and_yarn/json5-1.0.2
Bump json5 from 1.0.1 to 1.0.2
2023-01-13 17:36:56 -08:00
Mike Cao 92398c04f7
Merge pull request #1738 from lnxd/th-language-update
Updates to th-TH translation
2023-01-13 17:36:14 -08:00
Mike Cao 48286ec1ce
Merge pull request #1737 from stoXmod/add-sinhala-language
Added sinhala language
2023-01-13 16:56:58 -08:00
Francis Cao 65fe29c385 add mysql migration_v2 file, refactor migrate-db 2023-01-13 11:54:22 -08:00
Brian Cao fad38dc180 Merge remote-tracking branch 'origin/dev' into dev 2023-01-12 00:02:17 -08:00
Brian Cao 1eb9e10d94 Re-write CH queries to use query params. 2023-01-12 00:02:12 -08:00
lnxd fabe90d99d
Translated label.search 2023-01-12 18:31:01 +11:00
lnxd 2492b0b9ad
Translated label.yesterday 2023-01-12 18:25:15 +11:00
lnxd 17d37fb15b
Translated label.add-column
Using สร้างคอลัมน์ as it appears in Google Sheets for a button with the same function
2023-01-12 18:22:43 +11:00
lnxd 38ebf49827
Translated label.add-filter
Added "สร้างตัวกรอง" as this is the translation they use for the same button in gmail.
2023-01-12 18:15:54 +11:00
lnxd 434b86cf19
Translated metrics.query-parameters
The technical term "Query" doesn't seem to exist in Thai, and Thai developers refer to this feature as a "URL Parameter".

I was unsure between "พารามิเตอร์ URL" and "มาตรวัด URL", but I'm going with "พารามิเตอร์ URL" as it exists in documentation by Meta/Facebook.
2023-01-12 18:00:27 +11:00
lnxd 4419a25f97
Translated message.edit-dashboard 2023-01-12 17:43:02 +11:00
lnxd c9c384871f
Corrected spelling to more standard version
Changed รีเซต to รีเซ็ต (more standardised spelling)
2023-01-12 16:34:14 +11:00
lnxd 613bf86014
Corrected word choice
Changed from "ต้องการ" sounding more like "wanted" to "จำเป็น" meaning "necessary"
2023-01-12 16:29:20 +11:00
Francis Cao 96de650a67 add logic for database type 2023-01-11 16:19:20 -08:00
Mike Cao 53ec66e820 Merge remote-tracking branch 'origin/dev' into dev
# Conflicts:
#	components/pages/login/LoginForm.js
2023-01-11 14:48:17 -08:00
Mike Cao 4f15c4f146 Updated login and layout pages. 2023-01-11 14:47:38 -08:00
Brian Cao b4bd988e4e WebsiteId query param. Fix Prisma filters. 2023-01-11 11:01:44 -08:00
Brian Cao f654e6728c Fix links. 2023-01-11 10:49:04 -08:00
Mike Cao 9d967fb0fe Updated settings components and date filter. 2023-01-11 08:33:43 -08:00
Mike Cao 4b5b4db108 Updated settings components and date filter. 2023-01-10 17:18:59 -08:00
Francis Cao ac2b79c5cf move migrateData into its own function 2023-01-10 16:03:44 -08:00
Francis Cao b05b18e736 update checkV1Tables check 2023-01-10 15:01:41 -08:00
Francis Cao 9cc0588175 fix transaction bug 2023-01-10 09:54:16 -08:00
Mike Cao 70ef857dc7 Fix links. 2023-01-10 00:13:32 -08:00
Mike Cao 7450b76e6d Refactored settings components. 2023-01-09 23:59:26 -08:00
stoXmod d199065d3a Improve sinhala font and added to language select menu 2023-01-10 12:38:57 +05:30
Francis Cao 0cb33a9c73 add check migration, use prisma transaction 2023-01-09 13:14:30 -08:00
stoXmod c40c2e15c3 Added sinhala language 2023-01-09 18:13:50 +05:30
dependabot[bot] 4c79c7054e
Bump json5 from 1.0.1 to 1.0.2
Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-08 08:42:34 +00:00
Mike Cao d827b79c72 Updated forms usage. 2023-01-05 22:56:36 -08:00
Brian Cao fcb1767eb1
Feat/um 145 re add events (#1733)
* Re-add events. Fix event_type queries.

* Re-add eventData

* revert CSS.
2023-01-05 19:39:29 -08:00
Kipras Melnikovas d7920543c3 update lt-LT lang
Signed-off-by: Kipras Melnikovas <kipras@kipras.org>
2023-01-06 05:10:37 +02:00
Kipras Melnikovas ecc4e0b889 create README for lang/ - how to update translations
Signed-off-by: Kipras Melnikovas <kipras@kipras.org>
2023-01-06 05:10:37 +02:00
Francis Cao 19166e580e add mysql schema file 2023-01-05 14:40:34 -08:00
Francis Cao f10694d07e create new mysql schema file 2023-01-05 11:13:49 -08:00
Mike Cao 796c65fa29 Updated login check method. 2023-01-04 21:20:24 -08:00
Francis Cao 5f159ed5ce add final success prompt 2023-01-04 11:15:19 -08:00
Francis Cao b845ae547d fix v1 replace bug 2023-01-04 11:03:28 -08:00
Francis Cao 1cd195d895 add delete v1 table prompt 2023-01-04 10:07:58 -08:00
Francis Cao 3cf0617366 add warning message during data transfer 2023-01-04 00:26:31 -08:00
Francis Cao c24f8cb985 add data migration script 2023-01-03 13:16:29 -08:00
Francis Cao 0a731e3408 run rawsql for 01_init 2023-01-03 12:50:08 -08:00
Mike Cao 170b30b391 CSS fix. 2023-01-03 12:31:55 -08:00
Francis Cao 2a5927e345 update migrations 2023-01-03 09:32:32 -08:00
Francis Cao 8f686db116 fix rename to v1_ 2023-01-02 16:58:52 -08:00
Francis Cao 82e6728e1e fix index drop 2023-01-02 16:53:20 -08:00
Francis Cao 660c810ec1 add prisma table PK 2023-01-02 16:47:48 -08:00
Francis Cao b46a0c179f add migration node script 2023-01-02 16:34:58 -08:00
Mike Cao f3879c92e1 Merge branch 'dev' of https://github.com/umami-software/umami into dev
# Conflicts:
#	lib/middleware.ts
#	pages/api/users/[id]/index.ts
#	pages/api/users/index.ts
#	pages/api/websites/[id]/active.ts
#	pages/api/websites/[id]/eventdata.ts
#	pages/api/websites/[id]/events.ts
#	pages/api/websites/[id]/index.ts
#	pages/api/websites/[id]/metrics.ts
#	pages/api/websites/[id]/pageviews.ts
#	pages/api/websites/[id]/reset.ts
#	pages/api/websites/[id]/stats.ts
#	yarn.lock
2022-12-31 13:54:44 -08:00
Francis Cao f42cab8d83
Merge pull request #1719 from umami-software/feat/um-138-remove-prisma-foreign-key
Feat/um 138 remove prisma foreign key
2022-12-29 15:12:34 -08:00
Brian Cao eb2f07c105 Event Data maximum size. 2022-12-29 14:51:51 -08:00
Mike Cao db6a6d6055 Merge branch 'dev' of https://github.com/umami-software/umami into dev
# Conflicts:
#	components/forms/UserPasswordForm.js
#	components/pages/Dashboard.js
2022-12-28 15:49:28 -08:00
Mike Cao c56f02c475 Refactored fetching to use react-query. 2022-12-28 15:43:22 -08:00
Brian Cao b243f0a319 Fix Icon. 2022-12-28 12:56:22 -08:00
Brian Cao 74d2cd8d03
Feat/um 140 password modal (#1718)
* Change password to modal.

* Close on save.
2022-12-28 12:37:09 -08:00
Mike Cao 7bbed0e12b Changed HASH_SALT to APP_SECRET. 2022-12-27 21:38:23 -08:00
Mike Cao cad0b73e42 Refactored useApi usage. 2022-12-27 20:20:44 -08:00
Francis Cao 1472e205a3 Merge branch 'dev' of https://github.com/umami-software/umami into feat/um-138-remove-prisma-foreign-key 2022-12-27 16:52:04 -08:00
Francis Cao 8ee7172ea0 drop foreign keys, add missing indexes 2022-12-27 16:26:25 -08:00
Brian Cao 561cde6e7e
Add admin check. (#1716)
* Add admin check.

* Fix teamId check.
2022-12-27 15:18:58 -08:00
Mike Cao c90bd941b5 Merge remote-tracking branch 'origin/dev' into dev 2022-12-27 00:00:42 -08:00
Mike Cao aef7326f4c Added access_code column to teams. 2022-12-27 00:00:31 -08:00
Brian Cao ef9d915592 Fix event var names. 2022-12-26 23:21:54 -08:00
Mike Cao dff105c747 Updated prisma and redis clients. 2022-12-26 21:51:16 -08:00
Mike Cao c05d116875 Merge remote-tracking branch 'origin/dev' into dev
# Conflicts:
#	yarn.lock
2022-12-26 20:51:08 -08:00
Mike Cao ad15466028 Updated packages. 2022-12-26 20:50:55 -08:00
Mike Cao 677566b5f3
Merge pull request #1714 from umami-software/feat/um-136-camel-case
Remove snake_case.
2022-12-26 20:49:38 -08:00
Brian Cao a91386434d Remove snake_case. 2022-12-26 17:36:48 -08:00
Brian Cao e1f99a7d01
Rewrite admin. (#1713)
* Rewrite admin.

* Clean up password forms.

* Fix naming issues.

* CSS Naming.
2022-12-26 16:57:59 -08:00
mike f4db04c3c6 Update to react-basics v0.40. 2022-12-20 23:01:47 -08:00
mike 1d36a8a46b Update to react-basics v0.39. 2022-12-20 16:38:00 -08:00
Mike Cao 1fcaa1c9fc Updated log messages. 2022-12-14 23:13:57 -08:00
Mike Cao 4c202741c2 Fixed share page. 2022-12-13 11:27:55 -08:00
Mike Cao cb4c8accea Fixed admin checks. 2022-12-13 08:41:13 -08:00
Mike Cao da49543b91 Merge branch 'dev' into analytics 2022-12-12 20:51:12 -08:00
Mike Cao 4cc22fcc95 Fix event data check. 2022-12-12 20:46:43 -08:00
Brian Cao 8732d056dd
Dev (#1702)
* Initial Typescript models.

* Re-add realtime data

* get distinct sessions for session metrics

* Add queries for new schema.

* Fix Typo.

* Add some api/team endpoints.

* Fix destructure error.

* Fix getWebsites call.

* Ignore typescript build errors.

* Fix enum issue.

* add clickhouse route to deleteWebsite

* Fix Website auth.

* Updated lint-staged config.

* Add permission checks.

* Add user role api.

* Fix error when updating website.

* Fix isAdmin check.  Fix Schema.

* Initial conversion to react-basics.

* Remove user/team transfer from website update.

* delete website in relational query

* Fix login secure token creation.

* Add event type to event.

* Allow user to be added to team with role.

* Updated login form.

* Add Role to TeamUser.

* Add database migration.

* Refactored permissions check. Updated redis lib.

* Feat/um 114 roles and permissions (#1683)

* Auth checkpoint.

* Merge branch 'dev' into feat/um-114-roles-and-permissions

* Add 02 migration.

* Added lib/types.

* Updated schema.

* Updated roles and permissions logic.

* Implement react-basics styles. Fix queries.

* Update website details layout.

* Add 01 migration.

* Fix admin create.

* Update react-basics.

Co-authored-by: Francis Cao <franciscao@gmail.com>
Co-authored-by: Mike Cao <mike@mikecao.com>
Co-authored-by: Mike Cao <moocao@gmail.com>
2022-12-12 19:45:38 -08:00
Brian Cao e4fe22233c Update react-basics. 2022-12-12 16:46:46 -08:00
Brian Cao 4501951336 Fix admin create. 2022-12-12 12:31:56 -08:00
Brian Cao 8097428a4b Add 01 migration. 2022-12-12 12:04:31 -08:00
Mike Cao e8e90a5451 Update website details layout. 2022-12-10 14:26:52 -08:00
Mike Cao 0a6ecfe3d2 Implement react-basics styles. Fix queries. 2022-12-08 23:43:43 -08:00
Mike Cao b57ecf33e6 Updated roles and permissions logic. 2022-12-06 18:36:41 -08:00
Mike Cao 4eb3140e43 Updated schema. 2022-12-05 13:03:02 -08:00
Mike Cao 849c0f9bc8 Merge remote-tracking branch 'origin/dev' into dev 2022-12-02 14:15:45 -08:00
Mike Cao 4781a0cc8c Added lib/types. 2022-12-02 14:15:24 -08:00
Brian Cao b40630f9d4 Merge remote-tracking branch 'origin/dev' into dev 2022-12-01 22:06:39 -08:00
Brian Cao 4ef48a8f4b Add 02 migration. 2022-12-01 22:06:36 -08:00
Brian Cao 06bebadbb9
Feat/um 114 roles and permissions (#1683)
* Auth checkpoint.

* Merge branch 'dev' into feat/um-114-roles-and-permissions
2022-12-01 20:53:37 -08:00
Mike Cao a4e80ca3e5 Refactored permissions check. Updated redis lib. 2022-12-01 10:58:50 -08:00
Brian Cao 1a7369e1f6 Merge branch 'feat/um-114-roles-and-permissions' into dev 2022-11-30 09:35:23 -08:00
Brian Cao 77b739870e Add database migration. 2022-11-29 21:56:43 -08:00
Brian Cao 0a9089a463 Merge remote-tracking branch 'origin/dev' into dev 2022-11-28 13:08:49 -08:00
Brian Cao d5437c895e Add Role to TeamUser. 2022-11-28 13:08:48 -08:00
Mike Cao fe01574b16 Updated login form. 2022-11-28 11:14:24 -08:00
Brian Cao 502facd426 Allow user to be added to team with role. 2022-11-22 22:17:49 -08:00
Brian Cao d85b2be5f8 Add event type to event. 2022-11-22 15:06:52 -08:00
Brian Cao c90194dad4 Merge remote-tracking branch 'origin/dev' into dev 2022-11-21 23:23:20 -08:00
Brian Cao 9172098fa7 Fix login secure token creation. 2022-11-21 23:23:16 -08:00
Francis Cao 9e6dae2e55 Merge branch 'dev' of https://github.com/umami-software/umami into dev 2022-11-21 22:51:28 -08:00
Francis Cao 5da7a208a8 delete website in relational query 2022-11-21 22:51:23 -08:00
Mike Cao f98a97ef83 Merge branch 'dev' of https://github.com/umami-software/umami into dev 2022-11-21 22:33:13 -08:00
Brian Cao 3efd2a5b10 Remove user/team transfer from website update. 2022-11-21 22:32:59 -08:00
Mike Cao 2259ee8d76 Initial conversion to react-basics. 2022-11-21 22:32:55 -08:00
Brian Cao d60ad1c782 Fix isAdmin check. Fix Schema. 2022-11-21 16:44:42 -08:00
Brian Cao 371425ab60 Fix error when updating website. 2022-11-21 11:39:59 -08:00
Mike Cao c0a18e13fa Merge branch 'dev' of https://github.com/umami-software/umami into dev 2022-11-21 10:08:14 -08:00
Brian Cao 82d1f1ba2c Merge branch 'feat/um-23-new-schema' into dev 2022-11-20 22:24:51 -08:00
Brian Cao 6719f5b37c Merge branch 'dev' into feat/um-23-new-schema 2022-11-20 22:24:48 -08:00
Brian Cao 8fc6e99aa8 Add user role api. 2022-11-20 22:24:31 -08:00
Mike Cao 1e5174c211 Merge branch 'dev' of https://github.com/umami-software/umami into dev 2022-11-20 21:09:40 -08:00
Mike Cao 8bc3b288db
Merge pull request #1668 from umami-software/feat/um-23-new-schema
Feat/um 23 new schema
2022-11-20 21:09:32 -08:00
Mike Cao df50d9cefc Merge branch 'dev' of https://github.com/umami-software/umami into dev 2022-11-20 21:04:53 -08:00
Brian Cao 78225691df Add permission checks. 2022-11-20 00:48:13 -08:00
Mike Cao 817880b511 Updated lint-staged config. 2022-11-19 18:28:46 -08:00
Brian Cao 51e2331315 Merge branch 'dev' into feat/um-23-new-schema 2022-11-18 18:50:19 -08:00
Brian Cao 2e01226b46 Merge branch 'feat/um-23-new-schema' into dev 2022-11-18 18:50:11 -08:00
Brian Cao e28ee6597a Fix Website auth. 2022-11-18 18:49:58 -08:00
Francis Cao 3eb1d783de Merge branch 'dev' of https://github.com/umami-software/umami into dev 2022-11-18 12:08:23 -08:00
Francis Cao eaa208652d add clickhouse route to deleteWebsite 2022-11-18 12:08:13 -08:00
Brian Cao 1af93a17a3 Merge branch 'dev' into feat/um-23-new-schema 2022-11-18 11:22:22 -08:00
Brian Cao 90fbe9abee Merge branch 'feat/um-23-new-schema' into dev 2022-11-18 11:22:10 -08:00
Brian Cao ce02958bc2 Fix enum issue. 2022-11-18 11:22:03 -08:00
Brian Cao ac5ec730d2 Merge branch 'dev' into feat/um-23-new-schema 2022-11-18 10:34:17 -08:00
Mike Cao 21072c712c Ignore typescript build errors. 2022-11-18 10:00:12 -08:00
Mike Cao 2b10802e07 Fix getWebsites call. 2022-11-18 09:47:06 -08:00
Mike Cao 4fd12c6c93
Merge pull request #1664 from umami-software/feat/um-23-new-schema
Feat/um 23 new schema
2022-11-18 03:22:59 -08:00
Mike Cao 4bc3d46efb Merge branch 'dev' into feat/um-23-new-schema 2022-11-18 03:21:55 -08:00
Mike Cao 803ce54fef Merge remote-tracking branch 'origin/dev' into dev 2022-11-18 03:21:13 -08:00
Mike Cao bba8876522 Fix destructure error. 2022-11-18 03:20:45 -08:00
Brian Cao 25279271ce Add some api/team endpoints. 2022-11-18 00:27:42 -08:00
Brian Cao f5eb974d8d Fix Typo. 2022-11-17 22:46:05 -08:00
Brian Cao 5aa8187e42 Add queries for new schema. 2022-11-17 22:27:33 -08:00
Francis Cao e3142e93f0 get distinct sessions for session metrics 2022-11-17 18:09:03 -08:00
Brian Cao b0c7980a20 Merge branch 'dev' into feat/um-23-new-schema 2022-11-16 18:34:03 -08:00
Mike Cao 94848cc41b Merge branch 'dev' into analytics 2022-11-16 11:59:31 -08:00
Mike Cao 592c3fa6e6 Merge remote-tracking branch 'origin/dev' into dev 2022-11-16 11:45:04 -08:00
Mike Cao 8722b794d9 Fixed share token check. 2022-11-16 11:44:36 -08:00
Francis Cao 106dd25594 clickhosue: validate string being sent into event_data 2022-11-16 11:42:02 -08:00
Brian Cao f3726e5abf Re-add realtime data 2022-11-16 10:32:02 -08:00
Brian Cao 0aaba8cbd1 Initial Typescript models. 2022-11-15 13:21:14 -08:00
Brian Cao 04e9f06e93 Merge branch 'dev' into feat/um-23-new-schema 2022-11-15 13:20:47 -08:00
Mike Cao f0a072ca9b
Merge pull request #1653 from umami-software/dev
merge dev to analytics
2022-11-15 11:52:14 -08:00
Mike Cao 9ee6fb994c
Merge pull request #1650 from umami-software/app
v1.39.5
2022-11-13 17:56:07 -08:00
Mike Cao 545f1f901d Bump version 1.39.5. 2022-11-13 17:43:19 -08:00
Mike Cao 6145b31ce5 Make bot check return 200. Closes #1555 2022-11-12 21:11:07 -08:00
Mike Cao 2555ee09d1 Added Croatian language. 2022-11-12 21:03:47 -08:00
Mike Cao 091716e037 Updated middleware check. 2022-11-12 11:33:14 -08:00
Mike Cao e9b1869eb8 Merge remote-tracking branch 'origin/dev' into dev 2022-11-11 09:44:08 -08:00
Mike Cao 1c64800157 Updated token payload. 2022-11-11 09:42:54 -08:00
Brian Cao 7271951871 Merge branch 'dev' into analytics 2022-11-10 12:27:36 -08:00
Brian Cao 563589393a Update schema table names. 2022-11-10 11:58:43 -08:00
Brian Cao 73a57cd2cf fix casing 2022-11-10 11:08:40 -08:00
Mike Cao c443d83654
Merge pull request #1637 from ariaieboy/fa-update
Update fa-IR.json
2022-11-10 04:49:32 -08:00
Mike Cao 7b0b44b18d
Merge pull request #1640 from Maxime-J/fr-fr-date-format
custom fr-FR date format
2022-11-10 04:48:58 -08:00
Mike Cao d1bc42f1b5
Merge pull request #1647 from ShizuMilof/patch-1
Create hr-HR.json
2022-11-10 04:48:13 -08:00
Mike Cao cd9036adaf Merge remote-tracking branch 'origin/dev' into dev 2022-11-10 04:47:24 -08:00
Mike Cao c3a4d6c725 Added settings button. 2022-11-10 04:47:02 -08:00
Brian Cao 30743feb0e Add Reset / Delete functionality. 2022-11-09 22:46:50 -08:00
Mike Cao 4f098a34c1 Hide user button for cloud. 2022-11-09 22:12:40 -08:00
Brian Cao 6ee27a7e53 Fix typo on getMetrics. 2022-11-09 16:10:20 -08:00
Brian Cao 7bf12cc552 Assign user to userStore 2022-11-09 13:54:09 -08:00
Brian Cao 84375a582e Fix isAdmin check. 2022-11-09 12:03:24 -08:00
Brian Cao df84a16b95 Add external uuid to user create. 2022-11-09 10:59:03 -08:00
Mike Cao d2100c33b7 Update auth logic. 2022-11-09 10:16:50 -08:00
Mike Cao 76cad96a24 Updated auth to check for uuid. 2022-11-09 10:15:21 -08:00
Mike Cao 8a74138e17 Fixed website create. 2022-11-09 07:40:17 -08:00
Mike Cao 3b705e6cb4 Fetch user inside useAuth. 2022-11-09 06:40:36 -08:00
ShizuMilof 6a2ea9f7cc
Create hr-HR.json 2022-11-09 09:42:02 +01:00
Mike Cao 1bce4f2174 Merge remote-tracking branch 'origin/dev' into dev 2022-11-08 22:59:01 -08:00
Mike Cao 67732b9b5a Refactor authentication and token handling. 2022-11-08 22:58:52 -08:00
Brian Cao 9067d51172 Merge remote-tracking branch 'origin/dev' into dev 2022-11-08 17:47:23 -08:00
Brian Cao 4fbcf68b22 fix save event/pageview for CH 2022-11-08 17:47:19 -08:00
Mike Cao 1a8c7c42f4 Updated Clickhouse session logic. 2022-11-08 17:11:08 -08:00
Brian Cao e9c8d16d5b pass in correct arguments to save pageview/event 2022-11-08 16:45:23 -08:00
Brian Cao c2df477374 skip session check if using clickhouse 2022-11-08 15:50:34 -08:00
Brian Cao 224e9b3718 fix session get 2022-11-08 15:42:46 -08:00
Brian Cao 648a5341e5 fix useAuth 2022-11-08 12:51:04 -08:00
Mike Cao 208fcb8418 Added redis check to verify. 2022-11-08 12:28:45 -08:00
Brian Cao 13fd3ccd16
api and lib fixes (#1643) 2022-11-08 11:55:02 -08:00
Mike Cao 168283bf11 Merge remote-tracking branch 'origin/dev' into dev 2022-11-07 22:35:59 -08:00
Mike Cao f118bc95c1 Refactored redis usage. Added lib/cache. 2022-11-07 22:35:51 -08:00
Francis Cao 6a0d5ee1e6 add rev_id to CH schema 2022-11-07 18:03:27 -08:00
Mike Cao 3485b6268b Added rev_id column. Updated redis calls. 2022-11-07 16:22:49 -08:00
Maxime-J 268c036632 custom fr-FR date format 2022-11-07 18:38:43 +00:00
Mike Cao a9112f39ec Updated schema. 2022-11-04 16:15:26 -07:00
Mike Cao 6b13d3eaa3 Added eslint declarations. 2022-11-03 21:33:37 -07:00
AriaieBOY e241008cd5
Update fa-IR.json 2022-11-03 21:18:23 +03:30
Mike Cao 990d76ff45
Update docker server url. 2022-11-03 08:52:47 -07:00
Mike Cao 1075325ec5 Update website fetch and update. 2022-11-02 15:45:47 -07:00
Mike Cao 05245ca316 Use shallow routing for website details. 2022-11-02 08:57:52 -07:00
Mike Cao cb3895e565
Merge pull request #1628 from umami-software/feat/um-23-v2-schema-init
Feat/um 23 v2 schema init
2022-11-01 10:41:16 -07:00
Brian Cao 075d77abac change const 2022-11-01 09:56:43 -07:00
Mike Cao 0d897e957a
Merge pull request #1629 from umami-software/app
v1.39.4
2022-11-01 08:12:09 -07:00
Brian Cao 689b732829 Merge branch 'dev' into feat/um-23-v2-schema-init 2022-10-31 23:48:12 -07:00
Brian Cao 17041efaae use uuid 2022-10-31 23:42:37 -07:00
Mike Cao d5fd333633 Bump version v2.0.0-beta.1. 2022-10-31 20:33:06 -07:00
Mike Cao 486ac3fad1 Merge branch 'app' into dev 2022-10-31 20:31:54 -07:00
Mike Cao dbe6884016 Bump version v1.39.4. Updated packages, languages. 2022-10-31 20:30:02 -07:00
Mike Cao 5d73a9c4b4 Merge remote-tracking branch 'origin/app' into dev 2022-10-31 20:21:19 -07:00
Mike Cao 1c69577683
Merge pull request #1627 from umami-software/bug/um-92-delete-account
fix account delete bug
2022-10-31 20:05:28 -07:00
Brian Cao 3a617b7bfa fix account delete bug 2022-10-31 18:50:05 -07:00
Mike Cao c58e037a7e Updated useConfig. Added SSO page. 2022-10-31 11:02:37 -07:00
Mike Cao e558192790
Merge pull request #1617 from umami-software/bug/um-90-owner-not-updating
change owner by id
2022-10-31 10:46:22 -07:00
Brian Cao 572df48667 assign backup 2022-10-31 10:38:37 -07:00
Mike Cao be677cf962
Merge pull request #1611 from RikoDEV/patch-1
Update pl-PL.json
2022-10-30 10:18:57 -07:00
Mike Cao a632ef39b3
Merge pull request #1613 from enricopaulini/master
Update pt-BR
2022-10-30 10:18:28 -07:00
Brian Cao d32d5e75e9 change owner by id 2022-10-29 15:50:29 -07:00
Mike Cao f10c8ba9e2 Merge branch 'app' into dev 2022-10-28 20:49:55 -07:00
Mike Cao 246e4e5f4f Fix disable checks. 2022-10-28 10:34:50 -07:00
Mike Cao 98835bbc78 Define uiDisabled at build time. 2022-10-27 17:02:54 -07:00
Mike Cao fc9584eb44 Refactor env check. 2022-10-27 16:42:57 -07:00
enricopaulini 5d07681ab9 Update pt-BR
Update the messages/pt-BR.json file
2022-10-27 20:18:16 -03:00
Mike Cao ba63991a92
Merge pull request #1612 from umami-software/feat/um-76-turn-off-ui
Feat/um 76 turn off UI
2022-10-27 16:00:18 -07:00
Brian Cao 08ec801fdc remove GSS from 404 2022-10-27 14:48:21 -07:00
Brian Cao 99c975c329 add DISABLE_UI, DISABLE_ADMIN 2022-10-27 12:14:34 -07:00
RikoDEV bea9870200
Update pl-PL.json 2022-10-27 19:01:36 +02:00
Brian Cao 736f06442c Merge branch 'dev' into feat/um-76-turn-off-ui 2022-10-26 22:39:39 -07:00
Mike Cao 168a55b73a
Merge pull request #1594 from aidanm1999/feature/2022-10/netlify-nextjs-runtime
Adding the Next.js runtime to Netlify
2022-10-26 15:11:43 -07:00
Mike Cao 72b4cbf406
Merge branch 'dev' into feature/2022-10/netlify-nextjs-runtime 2022-10-25 22:53:10 -07:00
Brian Cao 1d808f1b1f Merge branch 'dev' into feat/um-76-turn-off-ui 2022-10-25 16:24:47 -07:00
Aidan Marshall 574dbff07e Adds @netlify/plugin-nextjs package & fixed dashboard link id 2022-10-25 15:01:49 +01:00
872 changed files with 51655 additions and 31842 deletions

View File

@ -4,3 +4,4 @@ Dockerfile
.gitignore
.DS_Store
node_modules
.idea

View File

@ -4,12 +4,7 @@
"es2020": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:prettier/recommended",
"plugin:import/recommended",
"next"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
@ -17,6 +12,15 @@
"ecmaVersion": 11,
"sourceType": "module"
},
"extends": [
"eslint:recommended",
"plugin:prettier/recommended",
"plugin:import/recommended",
"plugin:@typescript-eslint/recommended",
"next"
],
"plugins": ["@typescript-eslint", "prettier"],
"settings": {
"import/resolver": {
"alias": {
@ -32,7 +36,7 @@
["store", "./store"],
["styles", "./styles"]
],
"extensions": [".ts", ".js", ".jsx", ".json"]
"extensions": [".ts", ".tsx", ".js", ".jsx", ".json"]
}
}
},
@ -42,7 +46,11 @@
"react/react-in-jsx-scope": "off",
"react/prop-types": "off",
"import/no-anonymous-default-export": "off",
"@next/next/no-img-element": "off"
"import/no-named-as-default": "off",
"@next/next/no-img-element": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-var-requires": "off"
},
"globals": {
"React": "writable"

32
.github/ISSUE_TEMPLATE/1.bug_report.yml vendored Normal file
View File

@ -0,0 +1,32 @@
name: "🐛 Bug Report"
description: Create a bug report for Umami.
body:
- type: textarea
attributes:
label: Describe the Bug
description: A clear and concise description of what the bug is.
validations:
required: true
- type: dropdown
attributes:
label: Database
description: What database are you using?
options:
- PostgreSQL
- MySQL
- Umami Cloud
validations:
required: true
- type: textarea
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell
- type: input
attributes:
label: Which browser are you using? (if relevant)
description: 'For example: Chrome, Edge, Firefox, etc'
- type: input
attributes:
label: How are you deploying your application? (if relevant)
description: 'For example: Vercel, Railway, Docker, etc'

View File

@ -0,0 +1,10 @@
name: "✨ Feature Request"
description: Create a feature or enhancement request for Umami.
labels: ['enhancement']
body:
- type: textarea
attributes:
label: Describe the feature or enhancement
description: A clear and concise description of what the feature or enhancement is.
validations:
required: true

6
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1,6 @@
blank_issues_enabled: false
contact_links:
- name: "🤔 Ask a question"
url: https://github.com/umami-software/umami/discussions
about: Ask questions and discuss with other community members.

View File

@ -18,14 +18,16 @@ jobs:
db-type: [postgresql, mysql]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: mr-smithers-excellent/docker-build-push@v5
- uses: mr-smithers-excellent/docker-build-push@v6
name: Build & push Docker image for ${{ matrix.db-type }}
with:
image: umami
tags: ${{ matrix.db-type }}-${{ inputs.version }}, ${{ matrix.db-type }}-latest
buildArgs: DATABASE_TYPE=${{ matrix.db-type }}
registry: ghcr.io
multiPlatform: true
platform: linux/amd64,linux/arm64
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

View File

@ -3,7 +3,6 @@ name: Create docker images
on: [create]
jobs:
build:
name: Build, push, and deploy
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
@ -14,17 +13,19 @@ jobs:
db-type: [postgresql, mysql]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- uses: mr-smithers-excellent/docker-build-push@v5
- uses: mr-smithers-excellent/docker-build-push@v6
name: Build & push Docker image for ${{ matrix.db-type }}
with:
image: umami
tags: ${{ matrix.db-type }}-${{ env.RELEASE_VERSION }}, ${{ matrix.db-type }}-latest
buildArgs: DATABASE_TYPE=${{ matrix.db-type }}
registry: ghcr.io
multiPlatform: true
platform: linux/amd64,linux/arm64
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

11
.gitignore vendored
View File

@ -1,8 +1,8 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
node_modules
.pnp
.pnp.js
# testing
@ -15,15 +15,16 @@
# production
/build
/public/umami.js
/public/geo
/public/script.js
/geo
/dist
# misc
.DS_Store
.idea
*.iml
*.log
/.vscode/
.vscode
# debug
npm-debug.log*

View File

@ -1 +1 @@
/public/
/public/script.js

View File

@ -1,15 +1,18 @@
# Install dependencies only when needed
FROM node:16-alpine AS deps
FROM node:18-alpine AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY package.json yarn.lock ./
# Add yarn timeout to handle slow CPU when Github Actions
RUN yarn config set network-timeout 300000
RUN yarn install --frozen-lockfile
# Rebuild the source code only when needed
FROM node:16-alpine AS builder
FROM node:18-alpine AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY docker/middleware.js .
COPY . .
ARG DATABASE_TYPE
@ -23,7 +26,7 @@ ENV NEXT_TELEMETRY_DISABLED 1
RUN yarn build-docker
# Production image, copy all the files and run next
FROM node:16-alpine AS runner
FROM node:18-alpine AS runner
WORKDIR /app
ENV NODE_ENV production

View File

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2020 Mike Cao <mike@mikecao.com>
Copyright (c) 2022 Umami Software, Inc. <hello@umami.is>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,6 +1,6 @@
# umami
Umami is a simple, fast, privacy-focused alternative to Google Analytics.
Umami MAMI is a simple, fast, privacy-focused alternative to Google Analytics.
## Getting started
@ -36,6 +36,7 @@ DATABASE_URL=connection-url
```
The connection url is in the following format:
```
postgresql://username:mypassword@localhost:5432/mydb
@ -48,7 +49,7 @@ mysql://username:mypassword@localhost:3306/mydb
yarn build
```
The build step will also create tables in your database if you ae installing for the first time. It will also create a login account with username **admin** and password **umami**.
The build step will also create tables in your database if you ae installing for the first time. It will also create a login user with username **admin** and password **umami**.
### Start the application
@ -65,17 +66,19 @@ or change the [port](https://nextjs.org/docs/api-reference/cli#production) to se
To build the umami container and start up a Postgres database, run:
```bash
docker compose up
docker compose up -d
```
Alternatively, to pull just the Umami Docker image with PostgreSQL support:
```bash
docker pull docker.umami.is/umami-software/umami:postgresql-latest
docker pull docker.umami.dev/umami-software/umami:postgresql-latest
```
Or with MySQL support:
```bash
docker pull docker.umami.is/umami-software/umami:mysql-latest
docker pull docker.umami.dev/umami-software/umami:mysql-latest
```
## Getting updates

View File

@ -6,7 +6,7 @@
"repository": "https://github.com/umami-software/umami",
"addons": ["heroku-postgresql"],
"env": {
"HASH_SALT": {
"APP_SECRET": {
"description": "Used to generate unique values for your installation",
"required": true,
"generator": "secret"

1
assets/add-user.svg Normal file
View File

@ -0,0 +1 @@
<svg id="Layer_2" height="512" viewBox="0 0 30 30" width="512" xmlns="http://www.w3.org/2000/svg" data-name="Layer 2"><g fill="rgb(0,0,0)"><path d="m15 14a5.5 5.5 0 1 1 5.5-5.5 5.51 5.51 0 0 1 -5.5 5.5zm0-9a3.5 3.5 0 1 0 3.5 3.5 3.5 3.5 0 0 0 -3.5-3.5z"/><path d="m7.5 24.5a1 1 0 0 1 -1-1 8.5 8.5 0 0 1 13.6-6.8 1 1 0 1 1 -1.2 1.6 6.44 6.44 0 0 0 -3.9-1.3 6.51 6.51 0 0 0 -6.5 6.5 1 1 0 0 1 -1 1z"/><path d="m23 27a1 1 0 0 1 -1-1v-6a1 1 0 0 1 2 0v6a1 1 0 0 1 -1 1z"/><path d="m26 24h-6a1 1 0 0 1 0-2h6a1 1 0 0 1 0 2z"/></g></svg>

After

Width:  |  Height:  |  Size: 529 B

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M216.464 36.465l-7.071 7.07c-4.686 4.686-4.686 12.284 0 16.971L387.887 239H12c-6.627 0-12 5.373-12 12v10c0 6.627 5.373 12 12 12h375.887L209.393 451.494c-4.686 4.686-4.686 12.284 0 16.971l7.071 7.07c4.686 4.686 12.284 4.686 16.97 0l211.051-211.05c4.686-4.686 4.686-12.284 0-16.971L233.434 36.465c-4.686-4.687-12.284-4.687-16.97 0z"/></svg>

Before

Width:  |  Height:  |  Size: 409 B

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Pro 6.0.0-alpha2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M392 320C378.75 320 368 330.75 368 344V456C368 460.406 364.406 464 360 464H56C51.594 464 48 460.406 48 456V152C48 147.594 51.594 144 56 144H168C181.25 144 192 133.25 192 120S181.25 96 168 96H56C25.125 96 0 121.125 0 152V456C0 486.875 25.125 512 56 512H360C390.875 512 416 486.875 416 456V344C416 330.75 405.25 320 392 320ZM488 0H320C306.75 0 296 10.75 296 24S306.75 48 320 48H430.062L183.031 295.031C173.656 304.406 173.656 319.594 183.031 328.969C187.719 333.656 193.844 336 200 336S212.281 333.656 216.969 328.969L464 81.938V192C464 205.25 474.75 216 488 216S512 205.25 512 192V24C512 10.75 501.25 0 488 0Z"/></svg>

Before

Width:  |  Height:  |  Size: 831 B

View File

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Pro 6.0.0-alpha2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M424 392H24C10.8 392 0 402.8 0 416V416C0 429.2 10.8 440 24 440H424C437.2 440 448 429.2 448 416V416C448 402.8 437.2 392 424 392ZM424 72H24C10.8 72 0 82.8 0 96V96C0 109.2 10.8 120 24 120H424C437.2 120 448 109.2 448 96V96C448 82.8 437.2 72 424 72ZM424 232H24C10.8 232 0 242.8 0 256V256C0 269.2 10.8 280 24 280H424C437.2 280 448 269.2 448 256V256C448 242.8 437.2 232 424 232Z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M424 392H24c-13.2 0-24 10.8-24 24s10.8 24 24 24h400c13.2 0 24-10.8 24-24s-10.8-24-24-24Zm0-320H24C10.8 72 0 82.8 0 96s10.8 24 24 24h400c13.2 0 24-10.8 24-24s-10.8-24-24-24Zm0 160H24c-13.2 0-24 10.8-24 24s10.8 24 24 24h400c13.2 0 24-10.8 24-24s-10.8-24-24-24Z"/></svg>

Before

Width:  |  Height:  |  Size: 594 B

After

Width:  |  Height:  |  Size: 338 B

View File

Before

Width:  |  Height:  |  Size: 1002 B

After

Width:  |  Height:  |  Size: 1002 B

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Pro 5.15.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z"/></svg>

Before

Width:  |  Height:  |  Size: 885 B

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M435.848 83.466L172.804 346.51l-96.652-96.652c-4.686-4.686-12.284-4.686-16.971 0l-28.284 28.284c-4.686 4.686-4.686 12.284 0 16.971l133.421 133.421c4.686 4.686 12.284 4.686 16.971 0l299.813-299.813c4.686-4.686 4.686-12.284 0-16.971l-28.284-28.284c-4.686-4.686-12.284-4.686-16.97 0z"/></svg>

Before

Width:  |  Height:  |  Size: 360 B

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M441.9 167.3l-19.8-19.8c-4.7-4.7-12.3-4.7-17 0L224 328.2 42.9 147.5c-4.7-4.7-12.3-4.7-17 0L6.1 167.3c-4.7 4.7-4.7 12.3 0 17l209.4 209.4c4.7 4.7 12.3 4.7 17 0l209.4-209.4c4.7-4.7 4.7-12.3 0-17z"/></svg>

Before

Width:  |  Height:  |  Size: 272 B

1
assets/clock.svg Normal file
View File

@ -0,0 +1 @@
<svg height="512" viewBox="0 0 24 24" width="512" xmlns="http://www.w3.org/2000/svg"><g clip-rule="evenodd"><path d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16zM2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12z"/><path d="M11.168 11.445a1 1 0 0 1 1.387-.277l3 2a1 1 0 0 1-1.11 1.664l-3-2a1 1 0 0 1-.277-1.387z"/><path d="M12 6a1 1 0 0 1 1 1v5a1 1 0 1 1-2 0V7a1 1 0 0 1 1-1z"/></g></svg>

After

Width:  |  Height:  |  Size: 400 B

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M234.8 511.7L196 500.4c-4.2-1.2-6.7-5.7-5.5-9.9L331.3 5.8c1.2-4.2 5.7-6.7 9.9-5.5L380 11.6c4.2 1.2 6.7 5.7 5.5 9.9L244.7 506.2c-1.2 4.3-5.6 6.7-9.9 5.5zm-83.2-121.1l27.2-29c3.1-3.3 2.8-8.5-.5-11.5L72.2 256l106.1-94.1c3.4-3 3.6-8.2.5-11.5l-27.2-29c-3-3.2-8.1-3.4-11.3-.4L2.5 250.2c-3.4 3.2-3.4 8.5 0 11.7L140.3 391c3.2 3 8.2 2.8 11.3-.4zm284.1.4l137.7-129.1c3.4-3.2 3.4-8.5 0-11.7L435.7 121c-3.2-3-8.3-2.9-11.3.4l-27.2 29c-3.1 3.3-2.8 8.5.5 11.5L503.8 256l-106.1 94.1c-3.4 3-3.6 8.2-.5 11.5l27.2 29c3.1 3.2 8.1 3.4 11.3.4z"/></svg>

Before

Width:  |  Height:  |  Size: 601 B

1
assets/dashboard.svg Normal file
View File

@ -0,0 +1 @@
<svg height="512pt" viewBox="0 0 512 512" width="512pt" xmlns="http://www.w3.org/2000/svg"><path d="M197.332 170.668h-160C16.746 170.668 0 153.922 0 133.332v-96C0 16.746 16.746 0 37.332 0h160c20.59 0 37.336 16.746 37.336 37.332v96c0 20.59-16.746 37.336-37.336 37.336zM37.332 32A5.336 5.336 0 0 0 32 37.332v96a5.337 5.337 0 0 0 5.332 5.336h160a5.338 5.338 0 0 0 5.336-5.336v-96A5.337 5.337 0 0 0 197.332 32zM197.332 512h-160C16.746 512 0 495.254 0 474.668v-224c0-20.59 16.746-37.336 37.332-37.336h160c20.59 0 37.336 16.746 37.336 37.336v224c0 20.586-16.746 37.332-37.336 37.332zm-160-266.668A5.337 5.337 0 0 0 32 250.668v224A5.336 5.336 0 0 0 37.332 480h160a5.337 5.337 0 0 0 5.336-5.332v-224a5.338 5.338 0 0 0-5.336-5.336zM474.668 512h-160c-20.59 0-37.336-16.746-37.336-37.332v-96c0-20.59 16.746-37.336 37.336-37.336h160c20.586 0 37.332 16.746 37.332 37.336v96C512 495.254 495.254 512 474.668 512zm-160-138.668a5.338 5.338 0 0 0-5.336 5.336v96a5.337 5.337 0 0 0 5.336 5.332h160a5.336 5.336 0 0 0 5.332-5.332v-96a5.337 5.337 0 0 0-5.332-5.336zM474.668 298.668h-160c-20.59 0-37.336-16.746-37.336-37.336v-224C277.332 16.746 294.078 0 314.668 0h160C495.254 0 512 16.746 512 37.332v224c0 20.59-16.746 37.336-37.332 37.336zM314.668 32a5.337 5.337 0 0 0-5.336 5.332v224a5.338 5.338 0 0 0 5.336 5.336h160a5.337 5.337 0 0 0 5.332-5.336v-224A5.336 5.336 0 0 0 474.668 32zm0 0"/></svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M304 256c0 26.5-21.5 48-48 48s-48-21.5-48-48 21.5-48 48-48 48 21.5 48 48zm120-48c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48zm-336 0c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z"/></svg>

Before

Width:  |  Height:  |  Size: 297 B

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M270.2 160h35.5c3.4 0 6.1 2.8 6 6.2l-7.5 196c-.1 3.2-2.8 5.8-6 5.8h-20.5c-3.2 0-5.9-2.5-6-5.8l-7.5-196c-.1-3.4 2.6-6.2 6-6.2zM288 388c-15.5 0-28 12.5-28 28s12.5 28 28 28 28-12.5 28-28-12.5-28-28-28zm281.5 52L329.6 24c-18.4-32-64.7-32-83.2 0L6.5 440c-18.4 31.9 4.6 72 41.6 72H528c36.8 0 60-40 41.5-72zM528 480H48c-12.3 0-20-13.3-13.9-24l240-416c6.1-10.6 21.6-10.7 27.7 0l240 416c6.2 10.6-1.5 24-13.8 24z"/></svg>

Before

Width:  |  Height:  |  Size: 482 B

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M497.6,0,334.4.17A14.4,14.4,0,0,0,320,14.57V47.88a14.4,14.4,0,0,0,14.69,14.4l73.63-2.72,2.06,2.06L131.52,340.49a12,12,0,0,0,0,17l23,23a12,12,0,0,0,17,0L450.38,101.62l2.06,2.06-2.72,73.63A14.4,14.4,0,0,0,464.12,192h33.31a14.4,14.4,0,0,0,14.4-14.4L512,14.4A14.4,14.4,0,0,0,497.6,0ZM432,288H416a16,16,0,0,0-16,16V458a6,6,0,0,1-6,6H54a6,6,0,0,1-6-6V118a6,6,0,0,1,6-6H208a16,16,0,0,0,16-16V80a16,16,0,0,0-16-16H48A48,48,0,0,0,0,112V464a48,48,0,0,0,48,48H400a48,48,0,0,0,48-48V304A16,16,0,0,0,432,288Z"/></svg>

Before

Width:  |  Height:  |  Size: 575 B

View File

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Pro 6.0.0-alpha2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M504.265 315.978C504.265 307.326 499.658 299.134 491.906 294.586L458.998 275.615C459.643 269.099 459.966 262.549 459.966 256S459.643 242.901 458.998 236.385L491.906 217.414C499.658 212.866 504.265 204.674 504.265 196.022C504.265 174.755 454.947 67.846 419.746 67.846C415.502 67.846 411.236 68.939 407.379 71.203L374.599 90.172C363.888 82.43 352.533 75.848 340.531 70.428V32.488C340.531 21.262 333.047 11.453 322.205 8.613C300.654 2.871 278.425 0 256.181 0C233.935 0 211.675 2.871 190.06 8.613C179.218 11.453 171.734 21.262 171.734 32.488V70.428C159.732 75.848 148.377 82.43 137.666 90.172L104.886 71.203C101.031 68.939 96.763 67.846 92.519 67.846C92.517 67.846 92.514 67.846 92.512 67.846C60.048 67.846 8 169.591 8 196.022C8 204.674 12.607 212.866 20.359 217.414L53.267 236.385C52.622 242.901 52.299 249.451 52.299 256S52.622 269.099 53.267 275.615L20.359 294.586C12.607 299.134 8 307.326 8 315.978C8 337.245 57.318 444.154 92.519 444.154C96.763 444.154 101.029 443.061 104.886 440.797L137.666 421.828C148.377 429.57 159.732 436.152 171.734 441.572V479.512C171.734 490.738 179.218 500.547 190.06 503.387C211.611 509.129 233.84 512 256.084 512C278.33 512 300.59 509.129 322.205 503.387C333.047 500.547 340.531 490.738 340.531 479.512V441.572C352.533 436.152 363.888 429.57 374.599 421.828L407.379 440.797C411.234 443.061 415.502 444.154 419.746 444.154C452.209 444.154 504.265 342.423 504.265 315.978ZM415.361 389.959C391.561 376.186 404.101 383.444 371.705 364.695C329.649 395.09 339.375 389.426 292.531 410.582V460.82C279.236 463.161 266.948 464 256.093 464C240.669 464 228.14 462.306 219.734 460.824V410.582C172.779 389.376 182.552 395.044 140.56 364.695C108.748 383.105 117.896 377.811 96.924 389.949C81.181 371.256 68.849 349.895 60.517 326.84C81.643 314.663 72.361 320.014 104.088 301.723C101.549 276.083 100.277 266.079 100.277 256.04C100.277 246.018 101.545 235.96 104.088 210.277C72.198 191.892 81.571 197.295 60.504 185.152C68.818 162.109 81.187 140.686 96.904 122.041C120.704 135.814 108.164 128.556 140.56 147.305C182.616 116.91 172.89 122.574 219.734 101.418V51.18C233.029 48.839 245.318 48 256.172 48C271.597 48 284.126 49.694 292.531 51.176V101.418C339.486 122.624 329.713 116.956 371.705 147.305C405.655 127.657 394.228 134.27 415.343 122.051C431.084 140.744 443.416 162.105 451.748 185.16C430.622 197.337 439.904 191.986 408.177 210.277C410.716 235.917 411.988 245.921 411.988 255.96C411.988 265.982 410.72 276.04 408.177 301.723C440.067 320.108 430.694 314.705 451.761 326.848C443.447 349.891 431.078 371.314 415.361 389.959ZM256.133 160C203.258 160 160.133 203.125 160.133 256S203.258 352 256.133 352S352.133 308.875 352.133 256S309.008 160 256.133 160ZM256.133 304C229.666 304 208.133 282.467 208.133 256S229.666 208 256.133 208S304.133 229.533 304.133 256S282.599 304 256.133 304Z "></path></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M504.265 315.978c0-8.652-4.607-16.844-12.359-21.392l-32.908-18.971a199.182 199.182 0 0 0 0-39.23l32.908-18.971c7.752-4.548 12.359-12.74 12.359-21.392 0-21.267-49.318-128.176-84.519-128.176-4.244 0-8.51 1.093-12.367 3.357l-32.78 18.969a195.058 195.058 0 0 0-34.068-19.744v-37.94c0-11.226-7.484-21.035-18.326-23.875C300.654 2.871 278.425 0 256.181 0a257.698 257.698 0 0 0-66.121 8.613c-10.842 2.84-18.326 12.649-18.326 23.875v37.94a195.058 195.058 0 0 0-34.068 19.744l-32.78-18.969a24.36 24.36 0 0 0-12.367-3.357h-.007C60.048 67.846 8 169.591 8 196.022c0 8.652 4.607 16.844 12.359 21.392l32.908 18.971a199.182 199.182 0 0 0 0 39.23l-32.908 18.971C12.607 299.134 8 307.326 8 315.978c0 21.267 49.318 128.176 84.519 128.176 4.244 0 8.51-1.093 12.367-3.357l32.78-18.969a195.058 195.058 0 0 0 34.068 19.744v37.94c0 11.226 7.484 21.035 18.326 23.875 21.551 5.742 43.78 8.613 66.024 8.613 22.246 0 44.506-2.871 66.121-8.613 10.842-2.84 18.326-12.649 18.326-23.875v-37.94a195.058 195.058 0 0 0 34.068-19.744l32.78 18.969a24.36 24.36 0 0 0 12.367 3.357c32.463 0 84.519-101.731 84.519-128.176Zm-88.904 73.981c-23.8-13.773-11.26-6.515-43.656-25.264-42.056 30.395-32.33 24.731-79.174 45.887v50.238a210.138 210.138 0 0 1-36.438 3.18 208.924 208.924 0 0 1-36.359-3.176v-50.242c-46.955-21.206-37.182-15.538-79.174-45.887l-43.636 25.254a207.379 207.379 0 0 1-36.407-63.109c21.126-12.177 11.844-6.826 43.571-25.117-2.539-25.64-3.811-35.644-3.811-45.683 0-10.022 1.268-20.08 3.811-45.763-31.89-18.385-22.517-12.982-43.584-25.125a207.107 207.107 0 0 1 36.4-63.111c23.8 13.773 11.26 6.515 43.656 25.264 42.056-30.395 32.33-24.731 79.174-45.887V51.18A210.146 210.146 0 0 1 256.172 48c15.425 0 27.954 1.694 36.359 3.176v50.242c46.955 21.206 37.182 15.538 79.174 45.887l43.638-25.254a207.414 207.414 0 0 1 36.405 63.109c-21.126 12.177-11.844 6.826-43.571 25.117 2.539 25.64 3.811 35.644 3.811 45.683 0 10.022-1.268 20.08-3.811 45.763 31.89 18.385 22.517 12.982 43.584 25.125a207.107 207.107 0 0 1-36.4 63.111ZM256.133 160c-52.875 0-96 43.125-96 96s43.125 96 96 96 96-43.125 96-96-43.125-96-96-96Zm0 144c-26.467 0-48-21.533-48-48s21.533-48 48-48 48 21.533 48 48-21.534 48-48 48Z"/></svg>

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M48 368a48 48 0 1 0 48 48 48 48 0 0 0-48-48zm0-160a48 48 0 1 0 48 48 48 48 0 0 0-48-48zm0-160a48 48 0 1 0 48 48 48 48 0 0 0-48-48zm448 24H176a16 16 0 0 0-16 16v16a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V88a16 16 0 0 0-16-16zm0 160H176a16 16 0 0 0-16 16v16a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-16a16 16 0 0 0-16-16zm0 160H176a16 16 0 0 0-16 16v16a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-16a16 16 0 0 0-16-16z"/></svg>

Before

Width:  |  Height:  |  Size: 492 B

1
assets/lock.svg Normal file
View File

@ -0,0 +1 @@
<svg height="512" viewBox="0 0 24 24" width="512" xmlns="http://www.w3.org/2000/svg"><path d="M18.75 9H18V6c0-3.309-2.691-6-6-6S6 2.691 6 6v3h-.75A2.253 2.253 0 0 0 3 11.25v10.5C3 22.991 4.01 24 5.25 24h13.5c1.24 0 2.25-1.009 2.25-2.25v-10.5C21 10.009 19.99 9 18.75 9zM8 6c0-2.206 1.794-4 4-4s4 1.794 4 4v3H8zm5 10.722V19a1 1 0 1 1-2 0v-2.278c-.595-.347-1-.985-1-1.722 0-1.103.897-2 2-2s2 .897 2 2c0 .737-.405 1.375-1 1.722z"/></svg>

After

Width:  |  Height:  |  Size: 433 B

View File

@ -1,2 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 428 389.11" width="20" height="20">
<circle cx="214.15" cy="181" r="171" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="20"/><path d="M413,134.11H15.29a15,15,0,0,0-15,15v15.3C.12,168,0,171.52,0,175.11c0,118.19,95.81,214,214,214,116.4,0,211.1-92.94,213.93-208.67,0-.44.07-.88.07-1.33v-30A15,15,0,0,0,413,134.11Z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 428 389.11" width="20" height="20"><circle cx="214.15" cy="181" r="171" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="20"/><path d="M413 134.11H15.29a15 15 0 0 0-15 15v15.3C.12 168 0 171.52 0 175.11c0 118.19 95.81 214 214 214 116.4 0 211.1-92.94 213.93-208.67 0-.44.07-.88.07-1.33v-30a15 15 0 0 0-15-15Z"/></svg>

Before

Width:  |  Height:  |  Size: 401 B

After

Width:  |  Height:  |  Size: 390 B

View File

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1399.98 1400"><path d="M562.44,837.55C335.89,611,288.08,273.54,418.71,0A734.31,734.31,0,0,0,215.54,143.73c-287.39,287.39-287.39,753.33,0,1040.72s753.33,287.4,1040.74,0A733.8,733.8,0,0,0,1400,981.29C1126.45,1111.92,789,1064.09,562.44,837.55Z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1399.98 1400"><path d="M562.44 837.55C335.89 611 288.08 273.54 418.71 0a734.31 734.31 0 0 0-203.17 143.73c-287.39 287.39-287.39 753.33 0 1040.72s753.33 287.4 1040.74 0A733.8 733.8 0 0 0 1400 981.29c-273.55 130.63-611 82.8-837.56-143.74Z"/></svg>

Before

Width:  |  Height:  |  Size: 302 B

After

Width:  |  Height:  |  Size: 298 B

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M493.26 56.26l-37.51-37.51C443.25 6.25 426.87 0 410.49 0s-32.76 6.25-45.25 18.74l-74.49 74.49L256 127.98 12.85 371.12.15 485.34C-1.45 499.72 9.88 512 23.95 512c.89 0 1.79-.05 2.69-.15l114.14-12.61L384.02 256l34.74-34.74 74.49-74.49c25-25 25-65.52.01-90.51zM118.75 453.39l-67.58 7.46 7.53-67.69 231.24-231.24 31.02-31.02 60.14 60.14-31.02 31.02-231.33 231.33zm340.56-340.57l-44.28 44.28-60.13-60.14 44.28-44.28c4.08-4.08 8.84-4.69 11.31-4.69s7.24.61 11.31 4.69l37.51 37.51c6.24 6.25 6.24 16.4 0 22.63z"/></svg>

Before

Width:  |  Height:  |  Size: 580 B

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path d="M368 224H224V80c0-8.84-7.16-16-16-16h-32c-8.84 0-16 7.16-16 16v144H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h144v144c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16V288h144c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16z"/></svg>

Before

Width:  |  Height:  |  Size: 303 B

1
assets/profile.svg Normal file
View File

@ -0,0 +1 @@
<svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="M437.02 74.98C388.668 26.63 324.379 0 256 0S123.332 26.629 74.98 74.98C26.63 123.332 0 187.621 0 256s26.629 132.668 74.98 181.02C123.332 485.37 187.621 512 256 512s132.668-26.629 181.02-74.98C485.37 388.668 512 324.379 512 256s-26.629-132.668-74.98-181.02zM111.105 429.297c8.454-72.735 70.989-128.89 144.895-128.89 38.96 0 75.598 15.179 103.156 42.734 23.281 23.285 37.965 53.687 41.742 86.152C361.641 462.172 311.094 482 256 482s-105.637-19.824-144.895-52.703zM256 269.507c-42.871 0-77.754-34.882-77.754-77.753C178.246 148.879 213.13 114 256 114s77.754 34.879 77.754 77.754c0 42.871-34.883 77.754-77.754 77.754zm170.719 134.427a175.9 175.9 0 0 0-46.352-82.004c-18.437-18.438-40.25-32.27-64.039-40.938 28.598-19.394 47.426-52.16 47.426-89.238C363.754 132.34 315.414 84 256 84s-107.754 48.34-107.754 107.754c0 37.098 18.844 69.875 47.465 89.266-21.887 7.976-42.14 20.308-59.566 36.542-25.235 23.5-42.758 53.465-50.883 86.348C50.852 364.242 30 312.512 30 256 30 131.383 131.383 30 256 30s226 101.383 226 226c0 56.523-20.86 108.266-55.281 147.934zm0 0"/></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1400 1400"><path d="M367.43,422.13a54.44,54.44,0,0,1-38.66-16L205,282.35A54.69,54.69,0,0,1,282.37,205L406.11,328.79a54.68,54.68,0,0,1-38.68,93.34Z"/><path d="M1156.3,1211a54.51,54.51,0,0,1-38.67-16L993.89,1071.21a54.68,54.68,0,1,1,77.34-77.33L1195,1117.65A54.7,54.7,0,0,1,1156.3,1211Z"/><path d="M243.7,1211A54.7,54.7,0,0,1,205,1117.65L328.74,993.89a54.69,54.69,0,0,1,77.36,77.32L282.37,1195A54.51,54.51,0,0,1,243.7,1211Z"/><path d="M1032.57,422.13a54.68,54.68,0,0,1-38.68-93.34L1117.61,205A54.69,54.69,0,0,1,1195,282.35L1071.23,406.11A54.44,54.44,0,0,1,1032.57,422.13Z"/><path d="M229.69,754.69h-175a54.69,54.69,0,0,1,0-109.38h175a54.69,54.69,0,0,1,0,109.38Z"/><path d="M1345.31,754.69h-175a54.69,54.69,0,0,1,0-109.38h175a54.69,54.69,0,0,1,0,109.38Z"/><path d="M700,1400a54.68,54.68,0,0,1-54.69-54.69v-175a54.69,54.69,0,0,1,109.38,0v175A54.68,54.68,0,0,1,700,1400Z"/><path d="M700,284.38a54.7,54.7,0,0,1-54.69-54.69v-175a54.69,54.69,0,0,1,109.38,0v175A54.7,54.7,0,0,1,700,284.38Z"/><circle cx="700" cy="700" r="306.25"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1400 1400"><path d="M367.43 422.13a54.44 54.44 0 0 1-38.66-16L205 282.35A54.69 54.69 0 0 1 282.37 205l123.74 123.79a54.68 54.68 0 0 1-38.68 93.34ZM1156.3 1211a54.51 54.51 0 0 1-38.67-16l-123.74-123.79a54.68 54.68 0 1 1 77.34-77.33L1195 1117.65a54.7 54.7 0 0 1-38.7 93.35Zm-912.6 0a54.7 54.7 0 0 1-38.7-93.35l123.74-123.76a54.69 54.69 0 0 1 77.36 77.32L282.37 1195a54.51 54.51 0 0 1-38.67 16Zm788.87-788.87a54.68 54.68 0 0 1-38.68-93.34L1117.61 205a54.69 54.69 0 0 1 77.39 77.35l-123.77 123.76a54.44 54.44 0 0 1-38.66 16.02ZM229.69 754.69h-175a54.69 54.69 0 0 1 0-109.38h175a54.69 54.69 0 0 1 0 109.38Zm1115.62 0h-175a54.69 54.69 0 0 1 0-109.38h175a54.69 54.69 0 0 1 0 109.38ZM700 1400a54.68 54.68 0 0 1-54.69-54.69v-175a54.69 54.69 0 0 1 109.38 0v175A54.68 54.68 0 0 1 700 1400Zm0-1115.62a54.7 54.7 0 0 1-54.69-54.69v-175a54.69 54.69 0 0 1 109.38 0v175A54.7 54.7 0 0 1 700 284.38Z"/><circle cx="700" cy="700" r="306.25"/></svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 980 B

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path d="M207.6 256l107.72-107.72c6.23-6.23 6.23-16.34 0-22.58l-25.03-25.03c-6.23-6.23-16.34-6.23-22.58 0L160 208.4 52.28 100.68c-6.23-6.23-16.34-6.23-22.58 0L4.68 125.7c-6.23 6.23-6.23 16.34 0 22.58L112.4 256 4.68 363.72c-6.23 6.23-6.23 16.34 0 22.58l25.03 25.03c6.23 6.23 16.34 6.23 22.58 0L160 303.6l107.72 107.72c6.23 6.23 16.34 6.23 22.58 0l25.03-25.03c6.23-6.23 6.23-16.34 0-22.58L207.6 256z"/></svg>

Before

Width:  |  Height:  |  Size: 468 B

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M432 80h-82.4l-34-56.7A48 48 0 0 0 274.4 0H173.6a48 48 0 0 0-41.2 23.3L98.4 80H16A16 16 0 0 0 0 96v16a16 16 0 0 0 16 16h16l21.2 339a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128h16a16 16 0 0 0 16-16V96a16 16 0 0 0-16-16zM173.6 48h100.8l19.2 32H154.4zm173.3 416H101.11l-21-336h287.8z"/></svg>

Before

Width:  |  Height:  |  Size: 370 B

View File

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1652 1652"><title>Asset 1</title><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path d="M1587.07,504.47A828.56,828.56,0,1,0,1652,826,823.13,823.13,0,0,0,1587.07,504.47ZM826,1577a747.29,747.29,0,0,1-464.48-161.26,39.94,39.94,0,0,0,2.8-11.35,458.82,458.82,0,0,1,34.29-135.74,464.15,464.15,0,0,1,854.78,0,458.82,458.82,0,0,1,34.29,135.74,39.94,39.94,0,0,0,2.8,11.35A747.29,747.29,0,0,1,826,1577ZM719.81,866.57A274,274,0,1,1,826,888,272.1,272.1,0,0,1,719.81,866.57Zm641.28,485.87c-36.11-201.1-182.78-363.82-374.86-423,114.28-58.37,192.53-177.22,192.53-314.35,0-194.83-157.94-352.76-352.76-352.76S473.24,420.29,473.24,615.12c0,137.13,78.25,256,192.53,314.35-192.08,59.15-338.75,221.87-374.86,423C157.46,1216.81,75,1030.86,75,826,75,411.9,411.9,75,826,75s751,336.9,751,751C1577,1030.86,1494.54,1216.81,1361.09,1352.44Z"/></g></g></svg>
<svg height="512pt" viewBox="-56 0 512 512" width="512pt" xmlns="http://www.w3.org/2000/svg"><path d="M267 236.375c36.254-22.582 60.434-62.797 60.434-108.563C327.434 57.337 270.098 0 199.62 0 129.145 0 71.81 57.336 71.81 127.813c0 45.765 24.18 85.976 60.43 108.558C55.222 264.071 0 337.84 0 424.273v72.243C0 505.066 6.934 512 15.484 512H383.75c8.55 0 15.48-6.934 15.48-15.484v-72.243c0-86.43-55.218-160.195-132.23-187.898zm101.266 244.656H30.969v-56.758c0-92.992 75.652-168.644 168.648-168.644 92.992 0 168.649 75.652 168.649 168.644zm-71.801-353.219c0 53.403-43.442 96.848-96.844 96.848s-96.844-43.445-96.844-96.847c0-53.399 43.442-96.844 96.844-96.844s96.844 43.445 96.844 96.844zm0 0"/></svg>

Before

Width:  |  Height:  |  Size: 910 B

After

Width:  |  Height:  |  Size: 695 B

1
assets/users.svg Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 477.869 477.869" style="enable-background:new 0 0 477.869 477.869" xml:space="preserve"><path d="M387.415 233.496c48.976-44.029 52.987-119.424 8.958-168.4C355.991 20.177 288.4 12.546 239.02 47.332c-53.83-37.99-128.264-25.149-166.254 28.68-34.859 49.393-27.259 117.054 17.689 157.483C34.606 262.935-.251 320.976.002 384.108v51.2c0 9.426 7.641 17.067 17.067 17.067h443.733c9.426 0 17.067-7.641 17.067-17.067v-51.2c.252-63.132-34.605-121.173-90.454-150.612zM307.201 59.842c47.062-.052 85.256 38.057 85.309 85.119.037 33.564-19.631 64.023-50.237 77.799-1.314.597-2.628 1.143-3.959 1.707a83.66 83.66 0 0 1-12.988 4.045c-.853.188-1.707.29-2.577.461a85.366 85.366 0 0 1-15.019 1.519c-2.27 0-4.557-.171-6.827-.375-.853 0-1.707 0-2.56-.171a86.219 86.219 0 0 1-27.904-8.226c-.324-.154-.7-.137-1.024-.273-1.707-.819-3.413-1.536-4.932-2.458.137-.171.222-.358.358-.529a119.721 119.721 0 0 0 18.278-33.297l.529-1.434a120.381 120.381 0 0 0 4.523-17.562c.154-.87.273-1.707.41-2.645.987-6.067 1.506-12.2 1.553-18.347a120.041 120.041 0 0 0-1.553-18.313c-.137-.887-.256-1.707-.41-2.645a120.414 120.414 0 0 0-4.523-17.562l-.529-1.434a119.747 119.747 0 0 0-18.278-33.297c-.137-.171-.222-.358-.358-.529a84.787 84.787 0 0 1 42.718-11.553zM85.335 145.176c-.121-47.006 37.886-85.21 84.892-85.331a85.112 85.112 0 0 1 59.134 23.686c.99.956 1.963 1.911 2.918 2.901a87.748 87.748 0 0 1 8.09 9.813c.751 1.058 1.434 2.185 2.133 3.277a83.951 83.951 0 0 1 6.263 11.52c.427.973.751 1.963 1.126 2.935a83.422 83.422 0 0 1 4.233 13.653c.12.512.154 1.024.256 1.553a80.338 80.338 0 0 1 0 32.119c-.102.529-.137 1.041-.256 1.553a83.228 83.228 0 0 1-4.233 13.653c-.375.973-.7 1.963-1.126 2.935a84.251 84.251 0 0 1-6.263 11.503c-.7 1.092-1.382 2.219-2.133 3.277a87.549 87.549 0 0 1-8.09 9.813c-.956.99-1.929 1.946-2.918 2.901a85.187 85.187 0 0 1-23.569 15.906 49.35 49.35 0 0 1-4.198 1.707 85.839 85.839 0 0 1-12.663 3.925c-1.075.239-2.185.375-3.277.563a84.67 84.67 0 0 1-14.046 1.417h-1.877a84.563 84.563 0 0 1-14.046-1.417c-1.092-.188-2.202-.324-3.277-.563a85.802 85.802 0 0 1-12.663-3.925c-1.417-.563-2.816-1.143-4.198-1.707-30.534-13.786-50.173-44.166-50.212-77.667zm221.866 273.066H34.135v-34.133c-.25-57.833 36.188-109.468 90.76-128.614a119.092 119.092 0 0 0 91.546 0 137.138 137.138 0 0 1 16.623 7.356c3.55 1.826 6.827 3.908 10.24 6.007 2.219 1.382 4.471 2.731 6.605 4.25 3.294 2.338 6.4 4.881 9.455 7.492 1.963 1.707 3.908 3.413 5.751 5.12 2.816 2.662 5.461 5.478 8.004 8.363a134.465 134.465 0 0 1 5.291 6.383 132.594 132.594 0 0 1 6.349 8.823c1.707 2.56 3.226 5.222 4.727 7.885 1.707 2.935 3.277 5.871 4.71 8.926 1.434 3.055 2.697 6.4 3.925 9.66 1.075 2.833 2.219 5.649 3.106 8.533 1.195 3.959 2.031 8.055 2.867 12.151.512 2.423 1.178 4.796 1.553 7.253a141.153 141.153 0 0 1 1.553 20.412v34.133zm136.534 0h-102.4v-34.133c0-5.342-.307-10.633-.785-15.872-.137-1.536-.375-3.055-.546-4.591-.461-3.772-.99-7.509-1.707-11.213a246.936 246.936 0 0 0-.973-4.762c-.819-3.8-1.769-7.566-2.85-11.298-.358-1.229-.683-2.475-1.058-3.686a169.105 169.105 0 0 0-20.565-43.127l-.666-.973a168.958 168.958 0 0 0-9.404-12.646l-.119-.154a154.895 154.895 0 0 0-11.008-12.237h.7a120.8 120.8 0 0 0 14.524 1.024h.939c4.496-.039 8.985-.33 13.449-.87 1.399-.171 2.782-.427 4.181-.649a117.43 117.43 0 0 0 10.752-2.167c1.007-.256 2.031-.495 3.055-.785a116.211 116.211 0 0 0 13.653-4.642c54.612 19.127 91.083 70.785 90.829 128.649v34.132z"/></svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

1
assets/website.svg Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 511.999 511.999" style="enable-background:new 0 0 511.999 511.999" xml:space="preserve"><path d="M437.019 74.981C388.667 26.628 324.38 0 256 0 187.62 0 123.332 26.628 74.981 74.98 26.628 123.332 0 187.62 0 256s26.628 132.667 74.981 181.019c48.351 48.352 112.639 74.98 181.019 74.98 68.381 0 132.667-26.628 181.02-74.981C485.371 388.667 512 324.379 512 255.999s-26.629-132.667-74.981-181.018zM96.216 96.216c22.511-22.511 48.938-39.681 77.742-50.888-7.672 9.578-14.851 20.587-21.43 32.969-7.641 14.38-14.234 30.173-19.725 47.042-19.022-3.157-36.647-7.039-52.393-11.595a230.423 230.423 0 0 1 15.806-17.528zm-33.987 43.369c18.417 5.897 39.479 10.87 62.461 14.809-6.4 27.166-10.167 56.399-11.066 86.591H30.536c2.36-36.233 13.242-70.813 31.693-101.4zm-1.635 230.053c-17.455-29.899-27.769-63.481-30.059-98.623h83.146c.982 29.329 4.674 57.731 10.858 84.186-23.454 3.802-45.045 8.649-63.945 14.437zm35.622 46.146a229.917 229.917 0 0 1-17.831-20.055c16.323-4.526 34.571-8.359 54.214-11.433 5.53 17.103 12.194 33.105 19.928 47.662 7.17 13.493 15.053 25.349 23.51 35.505-29.61-11.183-56.769-28.629-79.821-51.679zm144.768 62.331c-22.808-6.389-44.384-27.217-61.936-60.249-6.139-11.552-11.531-24.155-16.15-37.587 24.73-2.722 51.045-4.331 78.086-4.709v102.545zm0-132.578c-29.988.409-59.217 2.292-86.59 5.507-6.038-24.961-9.671-51.978-10.668-80.028h97.259v74.521zm0-104.553h-97.315c.911-28.834 4.602-56.605 10.828-82.201 27.198 3.4 56.366 5.468 86.487 6.06v76.141zm0-106.176c-27.146-.547-53.403-2.317-77.958-5.205 4.591-13.292 9.941-25.768 16.022-37.215 17.551-33.032 39.128-53.86 61.936-60.249v102.669zm209.733 6.372c17.874 30.193 28.427 64.199 30.749 99.804h-83.088c-.889-29.844-4.584-58.749-10.85-85.647 23.133-3.736 44.456-8.489 63.189-14.157zm-34.934-44.964a230.122 230.122 0 0 1 16.914 18.91c-16.073 4.389-33.972 8.114-53.204 11.112-5.548-17.208-12.243-33.305-20.02-47.941-6.579-12.382-13.758-23.391-21.43-32.969 28.802 11.207 55.23 28.377 77.74 50.888zm-144.767 174.8h97.259c-1.004 28.268-4.686 55.49-10.81 80.612-27.194-3.381-56.349-5.43-86.449-6.006v-74.606zm0-30.032v-76.041c30.005-.394 59.257-2.261 86.656-5.464 6.125 25.403 9.756 52.932 10.659 81.505h-97.315zm-.002-208.845h.001c22.808 6.389 44.384 27.217 61.936 60.249 6.178 11.627 11.601 24.318 16.24 37.848-24.763 2.712-51.108 4.309-78.177 4.674V32.139zm.002 445.976V375.657c27.12.532 53.357 2.286 77.903 5.156-4.579 13.232-9.911 25.654-15.967 37.053-17.552 33.032-39.128 53.86-61.936 60.249zm144.767-62.331c-23.051 23.051-50.21 40.496-79.821 51.678 8.457-10.156 16.34-22.011 23.51-35.504 7.62-14.341 14.198-30.088 19.68-46.906 19.465 3.213 37.473 7.186 53.515 11.859a230.268 230.268 0 0 1-16.884 18.873zm34.823-44.775c-18.635-5.991-40-11.032-63.326-15.01 6.296-26.68 10.048-55.36 11.041-84.983h83.146c-2.328 35.678-12.918 69.753-30.861 99.993z"/></svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!-- Font Awesome Pro 6.0.0-alpha2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M312.973 375.032C322.342 384.401 322.342 399.604 312.973 408.973S288.401 418.342 279.032 408.973L160 289.941L40.968 408.973C31.599 418.342 16.396 418.342 7.027 408.973S-2.342 384.401 7.027 375.032L126.059 256L7.027 136.968C-2.342 127.599 -2.342 112.396 7.027 103.027S31.599 93.658 40.968 103.027L160 222.059L279.032 103.027C288.401 93.658 303.604 93.658 312.973 103.027S322.342 127.599 312.973 136.968L193.941 256L312.973 375.032Z"/></svg>

Before

Width:  |  Height:  |  Size: 653 B

View File

@ -1,63 +0,0 @@
import React from 'react';
import PropTypes from 'prop-types';
import ReactTooltip from 'react-tooltip';
import classNames from 'classnames';
import Icon from './Icon';
import styles from './Button.module.css';
function Button({
type = 'button',
icon,
size,
variant,
children,
className,
tooltip,
tooltipId,
disabled,
iconRight,
onClick = () => {},
...props
}) {
return (
<button
data-tip={tooltip}
data-effect="solid"
data-for={tooltipId}
data-offset={JSON.stringify({ left: 10 })}
type={type}
className={classNames(styles.button, className, {
[styles.large]: size === 'large',
[styles.small]: size === 'small',
[styles.xsmall]: size === 'xsmall',
[styles.action]: variant === 'action',
[styles.danger]: variant === 'danger',
[styles.light]: variant === 'light',
[styles.iconRight]: iconRight,
})}
disabled={disabled}
onClick={!disabled ? onClick : null}
{...props}
>
{icon && <Icon className={styles.icon} icon={icon} size={size} />}
{children && <div className={styles.label}>{children}</div>}
{tooltip && <ReactTooltip id={tooltipId}>{tooltip}</ReactTooltip>}
</button>
);
}
Button.propTypes = {
type: PropTypes.oneOf(['button', 'submit', 'reset']),
icon: PropTypes.node,
size: PropTypes.oneOf(['xlarge', 'large', 'medium', 'small', 'xsmall']),
variant: PropTypes.oneOf(['action', 'danger', 'light']),
children: PropTypes.node,
className: PropTypes.string,
tooltip: PropTypes.node,
tooltipId: PropTypes.string,
disabled: PropTypes.bool,
iconRight: PropTypes.bool,
onClick: PropTypes.func,
};
export default Button;

View File

@ -1,102 +0,0 @@
.button {
display: flex;
justify-content: center;
align-items: center;
font-size: var(--font-size-normal);
color: var(--gray900);
background: var(--gray100);
padding: 8px 16px;
border-radius: 4px;
border: 0;
outline: none;
cursor: pointer;
position: relative;
}
.button:hover {
background: var(--gray200);
}
.button:active {
color: var(--gray900);
}
.label {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
max-width: 300px;
}
.large {
font-size: var(--font-size-large);
}
.small {
font-size: var(--font-size-small);
}
.xsmall {
font-size: var(--font-size-xsmall);
}
.action,
.action:active {
color: var(--gray50);
background: var(--gray900);
}
.action:hover {
background: var(--gray800);
}
.danger,
.danger:active {
color: var(--gray50);
background: var(--red500);
}
.danger:hover {
background: var(--red400);
}
.light,
.light:active {
color: var(--gray900);
background: transparent;
}
.light:hover {
background: inherit;
}
.button .icon + * {
margin-left: 10px;
}
.button.iconRight .icon {
order: 1;
margin-left: 10px;
}
.button.iconRight .icon + * {
margin: 0;
}
.button:disabled {
cursor: default;
color: var(--gray500);
background: var(--gray75);
}
.button:disabled:active {
color: var(--gray500);
}
.button:disabled:hover {
background: var(--gray75);
}
.button.light:disabled {
background: var(--gray50);
}

View File

@ -1,42 +0,0 @@
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import Button from './Button';
import styles from './ButtonGroup.module.css';
function ButtonGroup({ items = [], selectedItem, className, size, icon, onClick = () => {} }) {
return (
<div className={classNames(styles.group, className)}>
{items.map(item => {
const { label, value } = item;
return (
<Button
key={value}
className={classNames(styles.button, { [styles.selected]: selectedItem === value })}
size={size}
icon={icon}
onClick={() => onClick(value)}
>
{label}
</Button>
);
})}
</div>
);
}
ButtonGroup.propTypes = {
items: PropTypes.arrayOf(
PropTypes.shape({
label: PropTypes.node,
value: PropTypes.any.isRequired,
}),
),
selectedItem: PropTypes.any,
className: PropTypes.string,
size: PropTypes.oneOf(['xlarge', 'large', 'medium', 'small', 'xsmall']),
icon: PropTypes.node,
onClick: PropTypes.func,
};
export default ButtonGroup;

View File

@ -1,31 +0,0 @@
.group {
display: inline-flex;
border-radius: 4px;
overflow: hidden;
border: 1px solid var(--gray500);
}
.group .button {
border-radius: 0;
color: var(--gray800);
background: var(--gray50);
border-left: 1px solid var(--gray500);
padding: 4px 8px;
}
.group .button:first-child {
border: 0;
}
.group .button:hover {
background: var(--gray100);
}
.group .button + .button {
margin: 0;
}
.group .button.selected {
color: var(--gray900);
font-weight: 600;
}

View File

@ -1,273 +0,0 @@
import React, { useState } from 'react';
import classNames from 'classnames';
import {
startOfWeek,
startOfMonth,
startOfYear,
endOfMonth,
addDays,
subDays,
addYears,
subYears,
addMonths,
setMonth,
setYear,
isSameDay,
isBefore,
isAfter,
} from 'date-fns';
import Button from './Button';
import useLocale from 'hooks/useLocale';
import { dateFormat } from 'lib/date';
import { chunk } from 'lib/array';
import { getDateLocale } from 'lib/lang';
import Chevron from 'assets/chevron-down.svg';
import Cross from 'assets/times.svg';
import styles from './Calendar.module.css';
import Icon from './Icon';
export default function Calendar({ date, minDate, maxDate, onChange }) {
const { locale } = useLocale();
const [selectMonth, setSelectMonth] = useState(false);
const [selectYear, setSelectYear] = useState(false);
const month = dateFormat(date, 'MMMM', locale);
const year = date.getFullYear();
function toggleMonthSelect() {
setSelectYear(false);
setSelectMonth(state => !state);
}
function toggleYearSelect() {
setSelectMonth(false);
setSelectYear(state => !state);
}
function handleChange(value) {
setSelectMonth(false);
setSelectYear(false);
if (value) {
onChange(value);
}
}
return (
<div className={styles.calendar}>
<div className={styles.header}>
<div>{date.getDate()}</div>
<div
className={classNames(styles.selector, { [styles.open]: selectMonth })}
onClick={toggleMonthSelect}
>
{month}
<Icon className={styles.icon} icon={selectMonth ? <Cross /> : <Chevron />} size="small" />
</div>
<div
className={classNames(styles.selector, { [styles.open]: selectYear })}
onClick={toggleYearSelect}
>
{year}
<Icon className={styles.icon} icon={selectYear ? <Cross /> : <Chevron />} size="small" />
</div>
</div>
<div className={styles.body}>
{!selectMonth && !selectYear && (
<DaySelector
date={date}
minDate={minDate}
maxDate={maxDate}
locale={locale}
onSelect={handleChange}
/>
)}
{selectMonth && (
<MonthSelector
date={date}
minDate={minDate}
maxDate={maxDate}
locale={locale}
onSelect={handleChange}
onClose={toggleMonthSelect}
/>
)}
{selectYear && (
<YearSelector
date={date}
minDate={minDate}
maxDate={maxDate}
onSelect={handleChange}
onClose={toggleYearSelect}
/>
)}
</div>
</div>
);
}
const DaySelector = ({ date, minDate, maxDate, locale, onSelect }) => {
const dateLocale = getDateLocale(locale);
const weekStartsOn = dateLocale?.options?.weekStartsOn || 0;
const startWeek = startOfWeek(date, {
locale: dateLocale,
weekStartsOn,
});
const startMonth = startOfMonth(date);
const startDay = subDays(startMonth, startMonth.getDay() - weekStartsOn);
const month = date.getMonth();
const year = date.getFullYear();
const daysOfWeek = [];
for (let i = 0; i < 7; i++) {
daysOfWeek.push(addDays(startWeek, i));
}
const days = [];
for (let i = 0; i < 35; i++) {
days.push(addDays(startDay, i));
}
return (
<table>
<thead>
<tr>
{daysOfWeek.map((day, i) => (
<th key={i} className={locale}>
{dateFormat(day, 'EEE', locale)}
</th>
))}
</tr>
</thead>
<tbody>
{chunk(days, 7).map((week, i) => (
<tr key={i}>
{week.map((day, j) => {
const disabled = isBefore(day, minDate) || isAfter(day, maxDate);
return (
<td
key={j}
className={classNames({
[styles.selected]: isSameDay(date, day),
[styles.faded]: day.getMonth() !== month || day.getFullYear() !== year,
[styles.disabled]: disabled,
})}
onClick={!disabled ? () => onSelect(day) : null}
>
{day.getDate()}
</td>
);
})}
</tr>
))}
</tbody>
</table>
);
};
const MonthSelector = ({ date, minDate, maxDate, locale, onSelect }) => {
const start = startOfYear(date);
const months = [];
for (let i = 0; i < 12; i++) {
months.push(addMonths(start, i));
}
function handleSelect(value) {
onSelect(setMonth(date, value));
}
return (
<table>
<tbody>
{chunk(months, 3).map((row, i) => (
<tr key={i}>
{row.map((month, j) => {
const disabled =
isBefore(endOfMonth(month), minDate) || isAfter(startOfMonth(month), maxDate);
return (
<td
key={j}
className={classNames(locale, {
[styles.selected]: month.getMonth() === date.getMonth(),
[styles.disabled]: disabled,
})}
onClick={!disabled ? () => handleSelect(month.getMonth()) : null}
>
{dateFormat(month, 'MMMM', locale)}
</td>
);
})}
</tr>
))}
</tbody>
</table>
);
};
const YearSelector = ({ date, minDate, maxDate, onSelect }) => {
const [currentDate, setCurrentDate] = useState(date);
const year = date.getFullYear();
const currentYear = currentDate.getFullYear();
const minYear = minDate.getFullYear();
const maxYear = maxDate.getFullYear();
const years = [];
for (let i = 0; i < 15; i++) {
years.push(currentYear - 7 + i);
}
function handleSelect(value) {
onSelect(setYear(date, value));
}
function handlePrevClick() {
setCurrentDate(state => subYears(state, 15));
}
function handleNextClick() {
setCurrentDate(state => addYears(state, 15));
}
return (
<div className={styles.pager}>
<div className={styles.left}>
<Button
icon={<Chevron />}
size="small"
onClick={handlePrevClick}
disabled={years[0] <= minYear}
variant="light"
/>
</div>
<div className={styles.middle}>
<table>
<tbody>
{chunk(years, 5).map((row, i) => (
<tr key={i}>
{row.map((n, j) => (
<td
key={j}
className={classNames({
[styles.selected]: n === year,
[styles.disabled]: n < minYear || n > maxYear,
})}
onClick={() => (n < minYear || n > maxYear ? null : handleSelect(n))}
>
{n}
</td>
))}
</tr>
))}
</tbody>
</table>
</div>
<div className={styles.right}>
<Button
icon={<Chevron />}
size="small"
onClick={handleNextClick}
disabled={years[years.length - 1] > maxYear}
variant="light"
/>
</div>
</div>
);
};

View File

@ -1,111 +0,0 @@
.calendar {
display: flex;
flex-direction: column;
font-size: var(--font-size-small);
flex: 1;
min-height: 306px;
}
.calendar table {
width: 100%;
border-spacing: 5px;
}
.calendar td {
color: var(--gray800);
cursor: pointer;
text-align: center;
vertical-align: center;
height: 40px;
width: 40px;
border-radius: 5px;
border: 1px solid transparent;
}
.calendar td:hover {
border: 1px solid var(--gray300);
background: var(--gray75);
}
.calendar td.faded {
color: var(--gray500);
}
.calendar td.selected {
font-weight: 600;
border: 1px solid var(--gray600);
}
.calendar td.selected:hover {
background: transparent;
}
.calendar td.disabled {
color: var(--gray400);
background: var(--gray75);
}
.calendar td.disabled:hover {
cursor: default;
background: var(--gray75);
border-color: transparent;
}
.calendar td.faded.disabled {
background: var(--gray100);
}
.header {
display: flex;
justify-content: space-evenly;
align-items: center;
font-weight: 700;
line-height: 40px;
font-size: var(--font-size-normal);
}
.body {
display: flex;
}
.selector {
cursor: pointer;
}
.pager {
display: flex;
flex: 1;
}
.pager button {
align-self: center;
}
.middle {
flex: 1;
}
.left,
.right {
display: flex;
justify-content: center;
align-items: center;
}
.left svg {
transform: rotate(90deg);
}
.right svg {
transform: rotate(-90deg);
}
.icon {
margin-left: 10px;
}
@media only screen and (max-width: 992px) {
.calendar table {
max-width: calc(100vw - 30px);
}
}

View File

@ -1,39 +0,0 @@
import React, { useRef } from 'react';
import PropTypes from 'prop-types';
import Icon from 'components/common/Icon';
import Check from 'assets/check.svg';
import styles from './Checkbox.module.css';
function Checkbox({ name, value, label, onChange }) {
const ref = useRef();
const onClick = () => ref.current.click();
return (
<div className={styles.container}>
<div className={styles.checkbox} onClick={onClick}>
{value && <Icon icon={<Check />} size="small" />}
</div>
<label className={styles.label} htmlFor={name} onClick={onClick}>
{label}
</label>
<input
ref={ref}
className={styles.input}
type="checkbox"
name={name}
defaultChecked={value}
onChange={onChange}
/>
</div>
);
}
Checkbox.propTypes = {
name: PropTypes.string,
value: PropTypes.any,
label: PropTypes.node,
onChange: PropTypes.func,
};
export default Checkbox;

View File

@ -1,30 +0,0 @@
.container {
display: flex;
align-items: center;
position: relative;
overflow: hidden;
}
.checkbox {
display: flex;
justify-content: center;
align-items: center;
width: 20px;
height: 20px;
border: 1px solid var(--gray500);
border-radius: 4px;
}
.label {
margin-left: 10px;
user-select: none; /* disable text selection when clicking to toggle the checkbox */
}
.input {
position: absolute;
visibility: hidden;
height: 0;
width: 0;
bottom: 100%;
right: 100%;
}

View File

@ -1,37 +0,0 @@
import React, { useState } from 'react';
import PropTypes from 'prop-types';
import Button from './Button';
import { FormattedMessage } from 'react-intl';
const defaultText = (
<FormattedMessage id="label.copy-to-clipboard" defaultMessage="Copy to clipboard" />
);
function CopyButton({ element, ...props }) {
const [text, setText] = useState(defaultText);
function handleClick() {
if (element?.current) {
element.current.select();
document.execCommand('copy');
setText(<FormattedMessage id="message.copied" defaultMessage="Copied!" />);
window.getSelection().removeAllRanges();
}
}
return (
<Button {...props} onClick={handleClick}>
{text}
</Button>
);
}
CopyButton.propTypes = {
element: PropTypes.shape({
current: PropTypes.shape({
select: PropTypes.func.isRequired,
}),
}),
};
export default CopyButton;

View File

@ -1,138 +0,0 @@
import React, { useState } from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import { endOfYear, isSameDay } from 'date-fns';
import Modal from './Modal';
import DropDown from './DropDown';
import DatePickerForm from 'components/forms/DatePickerForm';
import useLocale from 'hooks/useLocale';
import { dateFormat } from 'lib/date';
import Calendar from 'assets/calendar-alt.svg';
import Icon from './Icon';
export const filterOptions = [
{ label: <FormattedMessage id="label.today" defaultMessage="Today" />, value: '1day' },
{
label: (
<FormattedMessage id="label.last-hours" defaultMessage="Last {x} hours" values={{ x: 24 }} />
),
value: '24hour',
},
{
label: <FormattedMessage id="label.yesterday" defaultMessage="Yesterday" />,
value: '-1day',
},
{
label: <FormattedMessage id="label.this-week" defaultMessage="This week" />,
value: '1week',
divider: true,
},
{
label: (
<FormattedMessage id="label.last-days" defaultMessage="Last {x} days" values={{ x: 7 }} />
),
value: '7day',
},
{
label: <FormattedMessage id="label.this-month" defaultMessage="This month" />,
value: '1month',
divider: true,
},
{
label: (
<FormattedMessage id="label.last-days" defaultMessage="Last {x} days" values={{ x: 30 }} />
),
value: '30day',
},
{
label: (
<FormattedMessage id="label.last-days" defaultMessage="Last {x} days" values={{ x: 90 }} />
),
value: '90day',
},
{ label: <FormattedMessage id="label.this-year" defaultMessage="This year" />, value: '1year' },
{
label: <FormattedMessage id="label.all-time" defaultMessage="All time" />,
value: 'all',
divider: true,
},
{
label: <FormattedMessage id="label.custom-range" defaultMessage="Custom range" />,
value: 'custom',
divider: true,
},
];
function DateFilter({ value, startDate, endDate, onChange, className, options }) {
const [showPicker, setShowPicker] = useState(false);
const displayValue =
value === 'custom' ? (
<CustomRange startDate={startDate} endDate={endDate} onClick={() => handleChange('custom')} />
) : (
value
);
async function handleChange(value) {
if (value === 'custom') {
setShowPicker(true);
return;
}
onChange(value);
}
function handlePickerChange(value) {
setShowPicker(false);
onChange(value);
}
return (
<>
<DropDown
className={className}
value={displayValue}
options={options || filterOptions}
onChange={handleChange}
/>
{showPicker && (
<Modal>
<DatePickerForm
startDate={startDate}
endDate={endDate}
minDate={new Date(2000, 0, 1)}
maxDate={endOfYear(new Date())}
onChange={handlePickerChange}
onClose={() => setShowPicker(false)}
/>
</Modal>
)}
</>
);
}
const CustomRange = ({ startDate, endDate, onClick }) => {
const { locale } = useLocale();
function handleClick(e) {
e.stopPropagation();
onClick();
}
return (
<>
<Icon icon={<Calendar />} className="mr-2" onClick={handleClick} />
{dateFormat(startDate, 'd LLL y', locale)}
{!isSameDay(startDate, endDate) && `${dateFormat(endDate, 'd LLL y', locale)}`}
</>
);
};
DateFilter.propTypes = {
value: PropTypes.string,
startDate: PropTypes.instanceOf(Date),
endDate: PropTypes.instanceOf(Date),
onChange: PropTypes.func,
className: PropTypes.string,
};
export default DateFilter;

View File

@ -1,26 +0,0 @@
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import styles from './Dot.module.css';
function Dot({ color, size, className }) {
return (
<div className={styles.wrapper}>
<div
style={{ background: color }}
className={classNames(styles.dot, className, {
[styles.small]: size === 'small',
[styles.large]: size === 'large',
})}
/>
</div>
);
}
Dot.propTypes = {
color: PropTypes.string,
size: PropTypes.oneOf(['small', 'large']),
className: PropTypes.string,
};
export default Dot;

View File

@ -1,22 +0,0 @@
.wrapper {
background: var(--gray50);
margin-right: 10px;
border-radius: 100%;
}
.dot {
background: var(--green400);
width: 10px;
height: 10px;
border-radius: 100%;
}
.dot.small {
width: 8px;
height: 8px;
}
.dot.large {
width: 16px;
height: 16px;
}

View File

@ -1,64 +0,0 @@
import React, { useState, useRef } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import Menu from './Menu';
import useDocumentClick from 'hooks/useDocumentClick';
import Chevron from 'assets/chevron-down.svg';
import styles from './Dropdown.module.css';
import Icon from './Icon';
function DropDown({ value, className, menuClassName, options = [], onChange = () => {} }) {
const [showMenu, setShowMenu] = useState(false);
const ref = useRef();
const selectedOption = options.find(e => e.value === value);
function handleShowMenu() {
setShowMenu(state => !state);
}
function handleSelect(selected, e) {
e.stopPropagation();
setShowMenu(false);
onChange(selected);
}
useDocumentClick(e => {
if (!ref.current?.contains(e.target)) {
setShowMenu(false);
}
});
return (
<div ref={ref} className={classNames(styles.dropdown, className)} onClick={handleShowMenu}>
<div className={styles.value}>
<div className={styles.text}>{options.find(e => e.value === value)?.label || value}</div>
<Icon icon={<Chevron />} className={styles.icon} size="small" />
</div>
{showMenu && (
<Menu
className={menuClassName}
options={options}
selectedOption={selectedOption}
onSelect={handleSelect}
float="bottom"
/>
)}
</div>
);
}
DropDown.propTypes = {
value: PropTypes.any,
className: PropTypes.string,
menuClassName: PropTypes.string,
options: PropTypes.arrayOf(
PropTypes.shape({
value: PropTypes.any.isRequired,
label: PropTypes.node,
}),
),
onChange: PropTypes.func,
};
export default DropDown;

View File

@ -1,28 +0,0 @@
.dropdown {
position: relative;
display: flex;
justify-content: space-between;
align-items: center;
border: 1px solid var(--gray500);
border-radius: 4px;
cursor: pointer;
}
.value {
flex: 1;
display: flex;
justify-content: space-between;
font-size: var(--font-size-small);
flex-wrap: nowrap;
white-space: nowrap;
padding: 4px 16px;
min-width: 160px;
}
.text {
flex: 1;
}
.icon {
padding-left: 20px;
}

View File

@ -1,22 +1,16 @@
import React from 'react';
import PropTypes from 'prop-types';
import Icon from 'components/common/Icon';
import { Icon, Text, Flexbox } from 'react-basics';
import Logo from 'assets/logo.svg';
import styles from './EmptyPlaceholder.module.css';
function EmptyPlaceholder({ msg, children }) {
export function EmptyPlaceholder({ message, children }) {
return (
<div className={styles.placeholder}>
<Icon className={styles.icon} icon={<Logo />} size="xlarge" />
<h2 className={styles.msg}>{msg}</h2>
{children}
</div>
<Flexbox direction="column" alignItems="center" justifyContent="center" gap={60} height={600}>
<Icon size="xl">
<Logo />
</Icon>
<Text size="lg">{message}</Text>
<div>{children}</div>
</Flexbox>
);
}
EmptyPlaceholder.propTypes = {
msg: PropTypes.node,
children: PropTypes.node,
};
export default EmptyPlaceholder;

View File

@ -1,15 +0,0 @@
.placeholder {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
min-height: 600px;
}
.icon {
margin-bottom: 30px;
}
.msg {
margin-bottom: 15px;
}

View File

@ -0,0 +1,33 @@
/* eslint-disable no-console */
import { ErrorBoundary as Boundary } from 'react-error-boundary';
import { Button } from 'react-basics';
import useMessages from 'hooks/useMessages';
import styles from './ErrorBoundry.module.css';
const logError = (error, info) => {
console.error(error, info.componentStack);
};
export function ErrorBoundary({ children }) {
const { formatMessage, messages } = useMessages();
const fallbackRender = ({ error, resetErrorBoundary }) => {
console.log({ error });
return (
<div className={styles.error} role="alert">
<h1>{formatMessage(messages.error)}</h1>
<h3>{error.message}</h3>
<pre>{error.stack}</pre>
<Button onClick={resetErrorBoundary}>OK</Button>
</div>
);
};
return (
<Boundary fallbackRender={fallbackRender} onError={logError}>
{children}
</Boundary>
);
}
export default ErrorBoundary;

View File

@ -0,0 +1,19 @@
.error {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
z-index: var(--z-index-overlay);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 600px;
gap: 20px;
}
.error button {
align-self: center;
}

View File

@ -1,14 +1,18 @@
import React from 'react';
import { FormattedMessage } from 'react-intl';
import Icon from './Icon';
import Exclamation from 'assets/exclamation-triangle.svg';
import { Icon, Icons, Text } from 'react-basics';
import styles from './ErrorMessage.module.css';
import useMessages from 'hooks/useMessages';
export function ErrorMessage() {
const { formatMessage, messages } = useMessages();
export default function ErrorMessage() {
return (
<div className={styles.error}>
<Icon icon={<Exclamation />} className={styles.icon} size="large" />
<FormattedMessage id="message.failure" defaultMessage="Something went wrong." />
<Icon className={styles.icon} size="large">
<Icons.Alert />
</Icon>
<Text>{formatMessage(messages.error)}</Text>
</div>
);
}
export default ErrorMessage;

View File

@ -5,9 +5,9 @@
transform: translate(-50%, -50%);
margin: auto;
display: flex;
z-index: 1;
background-color: var(--gray50);
background-color: var(--base50);
padding: 10px;
z-index: 1;
}
.icon {

View File

@ -1,48 +0,0 @@
import List from 'assets/list-ul.svg';
import Modal from 'components/common/Modal';
import PropTypes from 'prop-types';
import { useState } from 'react';
import { FormattedMessage } from 'react-intl';
import Button from './Button';
import EventDataForm from 'components/forms/EventDataForm';
import styles from './EventDataButton.module.css';
function EventDataButton({ websiteId }) {
const [showEventData, setShowEventData] = useState(false);
function handleClick() {
if (!showEventData) {
setShowEventData(true);
}
}
function handleClose() {
setShowEventData(false);
}
return (
<>
<Button
icon={<List />}
tooltip={<FormattedMessage id="label.event-data" defaultMessage="Event" />}
tooltipId="button-event"
size="small"
onClick={handleClick}
className={styles.button}
>
Event Data
</Button>
{showEventData && (
<Modal title={<FormattedMessage id="label.event-data" defaultMessage="Query Event Data" />}>
<EventDataForm websiteId={websiteId} onClose={handleClose} />
</Modal>
)}
</>
);
}
EventDataButton.propTypes = {
websiteId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
};
export default EventDataButton;

View File

@ -1,3 +0,0 @@
.button {
width: fit-content;
}

View File

@ -1,5 +1,3 @@
import React from 'react';
import PropTypes from 'prop-types';
import styles from './Favicon.module.css';
function getHostName(url) {
@ -7,7 +5,7 @@ function getHostName(url) {
return match && match.length > 1 ? match[1] : null;
}
function Favicon({ domain, ...props }) {
export function Favicon({ domain, ...props }) {
const hostName = domain ? getHostName(domain) : null;
return hostName ? (
@ -21,8 +19,4 @@ function Favicon({ domain, ...props }) {
) : null;
}
Favicon.propTypes = {
domain: PropTypes.string,
};
export default Favicon;

View File

@ -1,3 +1,3 @@
.favicon {
margin-right: 8px;
margin-inline-end: 8px;
}

View File

@ -1,25 +1,13 @@
import React from 'react';
import PropTypes from 'prop-types';
import ButtonLayout from 'components/layout/ButtonLayout';
import ButtonGroup from './ButtonGroup';
import { ButtonGroup, Button, Flexbox } from 'react-basics';
function FilterButtons({ buttons, selected, onClick }) {
export function FilterButtons({ items, selectedKey, onSelect }) {
return (
<ButtonLayout>
<ButtonGroup size="xsmall" items={buttons} selectedItem={selected} onClick={onClick} />
</ButtonLayout>
<Flexbox justifyContent="center">
<ButtonGroup items={items} selectedKey={selectedKey} onSelect={onSelect}>
{({ key, label }) => <Button key={key}>{label}</Button>}
</ButtonGroup>
</Flexbox>
);
}
FilterButtons.propTypes = {
buttons: PropTypes.arrayOf(
PropTypes.shape({
label: PropTypes.node,
value: PropTypes.any.isRequired,
}),
),
selected: PropTypes.any,
onClick: PropTypes.func,
};
export default FilterButtons;

View File

@ -1,34 +1,40 @@
import React from 'react';
import { Icon, Icons } from 'react-basics';
import classNames from 'classnames';
import Link from 'next/link';
import { safeDecodeURI } from 'next-basics';
import usePageQuery from 'hooks/usePageQuery';
import External from 'assets/arrow-up-right-from-square.svg';
import Icon from './Icon';
import useMessages from 'hooks/useMessages';
import styles from './FilterLink.module.css';
export default function FilterLink({ id, value, label, externalUrl }) {
const { resolve, query } = usePageQuery();
export function FilterLink({ id, value, label, externalUrl, children, className }) {
const { formatMessage, labels } = useMessages();
const { resolveUrl, query } = usePageQuery();
const active = query[id] !== undefined;
const selected = query[id] === value;
return (
<div className={styles.row}>
<Link href={resolve({ [id]: value })} replace>
<a
className={classNames(styles.label, {
[styles.inactive]: active && !selected,
[styles.active]: active && selected,
})}
>
<div
className={classNames(styles.row, className, {
[styles.inactive]: active && !selected,
[styles.active]: active && selected,
})}
>
{children}
{!value && `(${label || formatMessage(labels.unknown)})`}
{value && (
<Link href={resolveUrl({ [id]: value })} className={styles.label} replace>
{safeDecodeURI(label || value)}
</a>
</Link>
</Link>
)}
{externalUrl && (
<a className={styles.link} href={externalUrl} target="_blank" rel="noreferrer noopener">
<Icon icon={<External />} className={styles.icon} />
<Icon className={styles.icon}>
<Icons.External />
</Icon>
</a>
)}
</div>
);
}
export default FilterLink;

View File

@ -1,20 +1,25 @@
.row {
display: flex;
align-items: center;
gap: 10px;
}
.row .inactive {
color: var(--gray500);
.row.inactive {
color: var(--base500);
}
.row .active {
color: var(--gray900);
.row.inactive img {
opacity: 0.35;
}
.row.active {
color: var(--base900);
font-weight: 600;
}
.row .link {
display: none;
margin-left: 20px;
margin-inline-start: 20px;
}
.row .label {

View File

@ -1,44 +1,61 @@
import Button from 'components/common/Button';
import XMark from 'assets/xmark.svg';
import Bars from 'assets/bars.svg';
import { Button, Icon } from 'react-basics';
import { useState } from 'react';
import styles from './HamburgerButton.module.css';
import MobileMenu from './MobileMenu';
import { FormattedMessage } from 'react-intl';
import Icons from 'components/icons';
import useMessages from 'hooks/useMessages';
import useConfig from 'hooks/useConfig';
const menuItems = [
{
label: <FormattedMessage id="label.dashboard" defaultMessage="Dashboard" />,
value: '/dashboard',
},
{ label: <FormattedMessage id="label.realtime" defaultMessage="Realtime" />, value: '/realtime' },
{ label: <FormattedMessage id="label.settings" defaultMessage="Settings" />, value: '/settings' },
{
label: <FormattedMessage id="label.profile" defaultMessage="Profile" />,
value: '/settings/profile',
},
{ label: <FormattedMessage id="label.logout" defaultMessage="Logout" />, value: '/logout' },
];
export default function HamburgerButton() {
export function HamburgerButton() {
const { formatMessage, labels } = useMessages();
const [active, setActive] = useState(false);
const { cloudMode } = useConfig();
function handleClick() {
setActive(state => !state);
}
const menuItems = [
{
label: formatMessage(labels.dashboard),
url: '/dashboard',
},
{ label: formatMessage(labels.realtime), url: '/realtime' },
!cloudMode && {
label: formatMessage(labels.settings),
url: '/settings',
children: [
{
label: formatMessage(labels.websites),
url: '/settings/websites',
},
{
label: formatMessage(labels.teams),
url: '/settings/teams',
},
{
label: formatMessage(labels.users),
url: '/settings/users',
},
{
label: formatMessage(labels.profile),
url: '/settings/profile',
},
],
},
cloudMode && {
label: formatMessage(labels.profile),
url: '/settings/profile',
},
!cloudMode && { label: formatMessage(labels.logout), url: '/logout' },
].filter(n => n);
function handleClose() {
setActive(false);
}
const handleClick = () => setActive(state => !state);
const handleClose = () => setActive(false);
return (
<>
<Button
className={styles.button}
icon={active ? <XMark /> : <Bars />}
onClick={handleClick}
/>
<Button variant="quiet" onClick={handleClick}>
<Icon>{active ? <Icons.Close /> : <Icons.Menu />}</Icon>
</Button>
{active && <MobileMenu items={menuItems} onClose={handleClose} />}
</>
);
}
export default HamburgerButton;

View File

@ -0,0 +1,27 @@
import { useEffect, useState } from 'react';
import { Tooltip } from 'react-basics';
import styles from './HoverTooltip.module.css';
export function HoverTooltip({ tooltip }) {
const [position, setPosition] = useState({ x: -1000, y: -1000 });
useEffect(() => {
const handler = e => {
setPosition({ x: e.clientX, y: e.clientY });
};
document.addEventListener('mousemove', handler);
return () => {
document.removeEventListener('mousemove', handler);
};
}, []);
return (
<div className={styles.tooltip} style={{ left: position.x, top: position.y }}>
<Tooltip position="top" action="none" label={tooltip} />
</div>
);
}
export default HoverTooltip;

View File

@ -3,9 +3,9 @@
}
.tooltip {
color: var(--msgColor);
position: fixed;
pointer-events: none;
z-index: 1;
z-index: var(--z-index-popup);
}
.content {
@ -17,7 +17,7 @@
}
.title {
font-size: var(--font-size-xsmall);
font-size: var(--font-size-xs);
font-weight: 600;
}
@ -25,7 +25,7 @@
display: flex;
justify-content: center;
align-items: center;
font-size: var(--font-size-small);
font-size: var(--font-size-sm);
font-weight: 600;
}
@ -34,7 +34,7 @@
overflow: hidden;
border-radius: 100%;
margin-right: 8px;
background: var(--gray50);
background: var(--base50);
}
.color {

View File

@ -1,29 +0,0 @@
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import styles from './Icon.module.css';
function Icon({ icon, className, size = 'medium', ...props }) {
return (
<div
className={classNames(styles.icon, className, {
[styles.xlarge]: size === 'xlarge',
[styles.large]: size === 'large',
[styles.medium]: size === 'medium',
[styles.small]: size === 'small',
[styles.xsmall]: size === 'xsmall',
})}
{...props}
>
{icon}
</div>
);
}
Icon.propTypes = {
className: PropTypes.string,
icon: PropTypes.node.isRequired,
size: PropTypes.oneOf(['xlarge', 'large', 'medium', 'small', 'xsmall']),
};
export default Icon;

View File

@ -1,35 +0,0 @@
.icon {
display: inline-flex;
justify-content: center;
align-items: center;
vertical-align: middle;
}
.icon svg {
fill: currentColor;
}
.xlarge > svg {
width: 48px;
height: 48px;
}
.large > svg {
width: 24px;
height: 24px;
}
.medium > svg {
width: 16px;
height: 16px;
}
.small > svg {
width: 12px;
height: 12px;
}
.xsmall > svg {
width: 10px;
height: 10px;
}

View File

@ -1,35 +0,0 @@
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import NextLink from 'next/link';
import Icon from './Icon';
import styles from './Link.module.css';
function Link({ className, icon, children, size, iconRight, onClick, ...props }) {
return (
<NextLink {...props}>
<a
className={classNames(styles.link, className, {
[styles.large]: size === 'large',
[styles.small]: size === 'small',
[styles.xsmall]: size === 'xsmall',
[styles.iconRight]: iconRight,
})}
onClick={onClick}
>
{icon && <Icon className={styles.icon} icon={icon} size={size} />}
{children}
</a>
</NextLink>
);
}
Link.propTypes = {
className: PropTypes.string,
icon: PropTypes.node,
children: PropTypes.node,
size: PropTypes.oneOf(['large', 'small', 'xsmall']),
iconRight: PropTypes.bool,
};
export default Link;

View File

@ -1,42 +0,0 @@
a.link,
a.link:active,
a.link:visited {
position: relative;
color: var(--gray900);
text-decoration: none;
display: inline-flex;
align-items: center;
}
a.link span {
border-bottom: 2px solid transparent;
}
a.link:hover span {
border-bottom: 2px solid var(--primary400);
}
a.link.large {
font-size: var(--font-size-large);
}
a.link.small {
font-size: var(--font-size-small);
}
a.link.xsmall {
font-size: var(--font-size-xsmall);
}
a.link .icon + * {
margin-left: 10px;
}
a.link.iconRight .icon {
order: 1;
margin-left: 10px;
}
a.link.iconRight .icon + * {
margin: 0;
}

View File

@ -1,21 +0,0 @@
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import styles from './Loading.module.css';
function Loading({ className, overlay = false }) {
return (
<div className={classNames(styles.loading, { [styles.overlay]: overlay }, className)}>
<div />
<div />
<div />
</div>
);
}
Loading.propTypes = {
className: PropTypes.string,
overlay: PropTypes.bool,
};
export default Loading;

View File

@ -1,55 +0,0 @@
@keyframes blink {
0% {
opacity: 0.2;
}
20% {
opacity: 1;
}
100% {
opacity: 0.2;
}
}
.loading {
display: flex;
justify-content: center;
align-items: center;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
margin: 0;
}
.loading.overlay {
height: 100%;
width: 100%;
z-index: 10;
background: var(--gray400);
opacity: 0.4;
}
.loading div {
width: 10px;
height: 10px;
border-radius: 100%;
background: var(--gray400);
animation: blink 1.4s infinite;
animation-fill-mode: both;
}
.loading.overlay div {
background: var(--gray900);
}
.loading div + div {
margin-left: 10px;
}
.loading div:nth-child(2) {
animation-delay: 0.2s;
}
.loading div:nth-child(3) {
animation-delay: 0.4s;
}

View File

@ -1,70 +0,0 @@
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import styles from './Menu.module.css';
function Menu({
options = [],
selectedOption,
className,
float,
align = 'left',
optionClassName,
selectedClassName,
onSelect = () => {},
}) {
return (
<div
className={classNames(styles.menu, className, {
[styles.float]: float,
[styles.top]: float === 'top',
[styles.bottom]: float === 'bottom',
[styles.left]: align === 'left',
[styles.right]: align === 'right',
})}
>
{options
.filter(({ hidden }) => !hidden)
.map(option => {
const { label, value, className: customClassName, render, divider } = option;
return render ? (
render(option)
) : (
<div
key={value}
className={classNames(styles.option, optionClassName, customClassName, {
[selectedClassName]: selectedOption === option,
[styles.selected]: selectedOption === option,
[styles.divider]: divider,
})}
onClick={e => onSelect(value, e)}
>
{label}
</div>
);
})}
</div>
);
}
Menu.propTypes = {
options: PropTypes.arrayOf(
PropTypes.shape({
label: PropTypes.node,
value: PropTypes.any,
className: PropTypes.string,
render: PropTypes.func,
divider: PropTypes.bool,
}),
),
selectedOption: PropTypes.any,
className: PropTypes.string,
float: PropTypes.oneOf(['top', 'bottom']),
align: PropTypes.oneOf(['left', 'right']),
optionClassName: PropTypes.string,
selectedClassName: PropTypes.string,
onSelect: PropTypes.func,
};
export default Menu;

View File

@ -1,51 +0,0 @@
.menu {
background: var(--gray50);
border: 1px solid var(--gray500);
border-radius: 4px;
overflow: hidden;
z-index: 100;
}
.option {
font-size: var(--font-size-small);
font-weight: normal;
background: var(--gray50);
padding: 4px 16px;
cursor: pointer;
white-space: nowrap;
}
.option:hover {
background: var(--gray100);
}
.float {
position: absolute;
min-width: 100px;
}
.top {
bottom: 100%;
margin-bottom: 5px;
}
.bottom {
top: 100%;
margin-top: 5px;
}
.left {
left: 0;
}
.right {
right: 0;
}
.divider {
border-top: 1px solid var(--gray300);
}
.selected {
font-weight: 600;
}

View File

@ -1,87 +0,0 @@
import React, { useState, useRef } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import Menu from 'components/common/Menu';
import Button from 'components/common/Button';
import useDocumentClick from 'hooks/useDocumentClick';
import styles from './MenuButton.module.css';
function MenuButton({
icon,
value,
options,
buttonClassName,
buttonVariant,
menuClassName,
menuPosition = 'bottom',
menuAlign = 'right',
onSelect,
renderValue,
hideLabel,
}) {
const [showMenu, setShowMenu] = useState(false);
const ref = useRef();
const selectedOption = options.find(e => e.value === value);
function handleSelect(value) {
onSelect(value);
setShowMenu(false);
}
function toggleMenu() {
setShowMenu(state => !state);
}
useDocumentClick(e => {
if (!ref.current?.contains(e.target)) {
setShowMenu(false);
}
});
return (
<div className={styles.container} ref={ref}>
<Button
icon={icon}
className={classNames(styles.button, buttonClassName, { [styles.open]: showMenu })}
onClick={toggleMenu}
variant={buttonVariant}
>
{!hideLabel && (
<div className={styles.text}>{renderValue ? renderValue(selectedOption) : value}</div>
)}
</Button>
{showMenu && (
<Menu
className={menuClassName}
options={options}
selectedOption={selectedOption}
onSelect={handleSelect}
float={menuPosition}
align={menuAlign}
/>
)}
</div>
);
}
MenuButton.propTypes = {
icon: PropTypes.node,
value: PropTypes.any,
options: PropTypes.arrayOf(
PropTypes.shape({
label: PropTypes.node,
value: PropTypes.any,
className: PropTypes.string,
render: PropTypes.func,
divider: PropTypes.bool,
}),
),
buttonClassName: PropTypes.string,
menuClassName: PropTypes.string,
menuPosition: PropTypes.oneOf(['top', 'bottom']),
menuAlign: PropTypes.oneOf(['left', 'right']),
onSelect: PropTypes.func,
renderValue: PropTypes.func,
};
export default MenuButton;

View File

@ -1,20 +0,0 @@
.container {
display: flex;
position: relative;
cursor: pointer;
}
.button {
border: 1px solid transparent;
border-radius: 4px;
}
.text {
font-size: var(--font-size-small);
}
.open,
.open:hover {
background: var(--gray50);
border: 1px solid var(--gray500);
}

View File

@ -1,22 +1,38 @@
import classNames from 'classnames';
import Link from './Link';
import Button from './Button';
import XMark from 'assets/xmark.svg';
import { useRouter } from 'next/router';
import Link from 'next/link';
import styles from './MobileMenu.module.css';
export default function MobileMenu({ items = [], onClose }) {
export function MobileMenu({ items = [], onClose }) {
const { pathname } = useRouter();
const Items = ({ items, className }) => (
<div className={classNames(styles.items, className)}>
{items.map(({ label, url, children }) => {
const selected = pathname.startsWith(url);
return (
<>
<Link
key={url}
href={url}
className={classNames(styles.item, { [styles.selected]: selected })}
onClick={onClose}
>
{label}
</Link>
{children && <Items items={children} className={styles.submenu} />}
</>
);
})}
</div>
);
return (
<div className={classNames(styles.menu, 'container')}>
<div className={styles.header}>
<Button icon={<XMark />} onClick={onClose} />
</div>
<div className={styles.items}>
{items.map(({ label, value }) => (
<Link key={value} href={value} className={styles.item} onClick={onClose}>
{label}
</Link>
))}
</div>
<div className={classNames(styles.menu)}>
<Items items={items} />
</div>
);
}
export default MobileMenu;

View File

@ -1,41 +1,39 @@
.menu {
position: fixed;
top: 0;
top: 60px;
left: 0;
right: 0;
bottom: 0;
margin: auto;
z-index: 100;
display: flex;
flex-direction: column;
background-color: var(--gray50);
background-color: var(--base50);
z-index: var(--z-index-popup);
overflow: auto;
}
.items {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.item {
font-size: var(--font-size-large);
font-size: var(--font-size-lg);
font-weight: 700;
line-height: 80px;
padding: 0 40px;
}
.item + .item {
margin-top: 20px;
a.item {
color: var(--base600);
}
.item:last-child {
margin-top: 60px;
a.item.selected,
.submenu a.item.selected {
color: var(--base900);
}
.header {
display: flex;
justify-content: flex-end;
align-items: center;
height: 100px;
padding: 0 30px;
.submenu a.item {
color: var(--base600);
margin-left: 40px;
}

View File

@ -1,26 +0,0 @@
import React from 'react';
import PropTypes from 'prop-types';
import ReactDOM from 'react-dom';
import { useSpring, animated } from 'react-spring';
import styles from './Modal.module.css';
function Modal({ title, children }) {
const props = useSpring({ opacity: 1, from: { opacity: 0 } });
return ReactDOM.createPortal(
<animated.div className={styles.modal} style={props}>
<div className={styles.content}>
{title && <div className={styles.header}>{title}</div>}
<div className={styles.body}>{children}</div>
</div>
</animated.div>,
document.getElementById('__modals'),
);
}
Modal.propTypes = {
title: PropTypes.node,
children: PropTypes.node,
};
export default Modal;

View File

@ -1,46 +0,0 @@
.modal {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
z-index: 2;
}
.modal:before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
background: #000;
opacity: 0.5;
}
.content {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: var(--gray50);
min-width: 400px;
min-height: 100px;
max-width: 100vw;
z-index: 1;
border: 1px solid var(--gray300);
padding: 30px;
border-radius: 4px;
}
.header {
font-weight: 600;
margin-bottom: 20px;
}
.body {
display: flex;
flex-direction: column;
}

View File

@ -1,47 +0,0 @@
import React from 'react';
import PropTypes from 'prop-types';
import { useRouter } from 'next/router';
import classNames from 'classnames';
import styles from './NavMenu.module.css';
function NavMenu({ options = [], className, onSelect = () => {} }) {
const router = useRouter();
return (
<div className={classNames(styles.menu, className)}>
{options
.filter(({ hidden }) => !hidden)
.map(option => {
const { label, value, className: customClassName, render } = option;
return render ? (
render(option)
) : (
<div
key={value}
className={classNames(styles.option, customClassName, {
[styles.selected]: router.asPath === value,
})}
onClick={e => onSelect(value, e)}
>
{label}
</div>
);
})}
</div>
);
}
NavMenu.propTypes = {
options: PropTypes.arrayOf(
PropTypes.shape({
label: PropTypes.node,
value: PropTypes.any,
className: PropTypes.string,
render: PropTypes.func,
}),
),
className: PropTypes.string,
onSelect: PropTypes.func,
};
export default NavMenu;

View File

@ -1,22 +0,0 @@
.menu {
color: var(--gray800);
border: 1px solid var(--gray500);
border-radius: 4px;
overflow: hidden;
z-index: 2;
}
.option {
padding: 8px 16px;
cursor: pointer;
border-radius: 4px;
}
.option:hover {
background: var(--gray75);
}
.selected {
color: var(--gray900);
font-weight: 600;
}

View File

@ -1,19 +1,15 @@
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { FormattedMessage } from 'react-intl';
import styles from './NoData.module.css';
import useMessages from 'hooks/useMessages';
export function NoData({ className }) {
const { formatMessage, messages } = useMessages();
function NoData({ className }) {
return (
<div className={classNames(styles.container, className)}>
<FormattedMessage id="message.no-data-available" defaultMessage="No data available." />
{formatMessage(messages.noDataAvailable)}
</div>
);
}
NoData.propTypes = {
className: PropTypes.string,
};
export default NoData;

View File

@ -1,6 +1,6 @@
.container {
color: var(--gray500);
font-size: var(--font-size-normal);
color: var(--base500);
font-size: var(--font-size-md);
position: relative;
display: flex;
align-items: center;

View File

@ -1,66 +0,0 @@
import PropTypes from 'prop-types';
import React, { useCallback, useEffect, useRef, useState } from 'react';
import ReactTooltip from 'react-tooltip';
import styles from './OverflowText.module.css';
const OverflowText = ({ children, tooltipId }) => {
const measureEl = useRef();
const [isOverflown, setIsOverflown] = useState(false);
const measure = useCallback(
el => {
if (!el) return;
setIsOverflown(el.scrollWidth > el.clientWidth);
},
[setIsOverflown],
);
// Do one measure on mount
useEffect(() => {
measure(measureEl.current);
}, [measure]);
// Set up resize listener for subsequent measures
useEffect(() => {
if (!measureEl.current) return;
// Destructure ref in case it changes out from under us
const el = measureEl.current;
if ('ResizeObserver' in global) {
// Ideally, we have access to ResizeObservers
const observer = new ResizeObserver(() => {
measure(el);
});
observer.observe(el);
return () => observer.unobserve(el);
} else {
// Otherwise, fall back to measuring on window resizes
const handler = () => measure(el);
window.addEventListener('resize', handler, { passive: true });
return () => window.removeEventListener('resize', handler, { passive: true });
}
});
return (
<span
ref={measureEl}
data-tip={children.toString()}
data-effect="solid"
data-for={tooltipId}
className={styles.root}
>
{children}
{isOverflown && <ReactTooltip id={tooltipId}>{children}</ReactTooltip>}
</span>
);
};
OverflowText.propTypes = {
children: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
tooltipId: PropTypes.string.isRequired,
};
export default OverflowText;

View File

@ -1,6 +0,0 @@
.root {
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

View File

@ -1,47 +0,0 @@
import React, { useState, useEffect, useCallback } from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import useStore from 'store/queries';
import { setDateRange } from 'store/websites';
import Button from './Button';
import Refresh from 'assets/redo.svg';
import Dots from 'assets/ellipsis-h.svg';
import useDateRange from 'hooks/useDateRange';
function RefreshButton({ websiteId }) {
const [dateRange] = useDateRange(websiteId);
const [loading, setLoading] = useState(false);
const selector = useCallback(state => state[`/websites/${websiteId}/stats`], [websiteId]);
const completed = useStore(selector);
function handleClick() {
if (!loading && dateRange) {
setLoading(true);
if (/^[\d]+/.test(dateRange.value)) {
setDateRange(websiteId, dateRange.value);
} else {
setDateRange(websiteId, dateRange);
}
}
}
useEffect(() => {
setLoading(false);
}, [completed]);
return (
<Button
icon={loading ? <Dots /> : <Refresh />}
tooltip={<FormattedMessage id="label.refresh" defaultMessage="Refresh" />}
tooltipId="button-refresh"
size="small"
onClick={handleClick}
/>
);
}
RefreshButton.propTypes = {
websiteId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
};
export default RefreshButton;

View File

@ -0,0 +1,38 @@
import { Table, TableHeader, TableBody, TableRow, TableCell, TableColumn } from 'react-basics';
import styles from './SettingsTable.module.css';
export function SettingsTable({ columns = [], data = [], children, cellRender }) {
return (
<Table columns={columns} rows={data}>
<TableHeader className={styles.header}>
{(column, index) => {
return (
<TableColumn key={index} className={styles.cell} style={columns[index].style}>
{column.label}
</TableColumn>
);
}}
</TableHeader>
<TableBody className={styles.body}>
{(row, keys, rowIndex) => {
row.action = children(row, keys, rowIndex);
return (
<TableRow key={rowIndex} data={row} keys={keys} className={styles.row}>
{(data, key, colIndex) => {
return (
<TableCell key={colIndex} className={styles.cell} style={columns[colIndex].style}>
<label className={styles.label}>{columns[colIndex].label}</label>
{cellRender ? cellRender(row, data, key, colIndex) : data[key]}
</TableCell>
);
}}
</TableRow>
);
}}
</TableBody>
</Table>
);
}
export default SettingsTable;

View File

@ -0,0 +1,44 @@
.cell {
align-items: center;
}
.row .cell:last-child {
gap: 10px;
justify-content: flex-end;
}
.label {
display: none;
font-weight: 700;
}
@media screen and (max-width: 992px) {
.header .cell {
display: none;
}
.label {
display: block;
min-width: 100px;
}
.row .cell {
padding-left: 0;
flex-basis: 100%;
}
}
@media screen and (max-width: 1200px) {
.row {
flex-wrap: wrap;
}
.header .cell:last-child {
display: none;
}
.row .cell:last-child {
padding-left: 0;
flex-basis: 100%;
}
}

View File

@ -1,90 +0,0 @@
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import NoData from 'components/common/NoData';
import styles from './Table.module.css';
function Table({
columns,
rows,
empty,
className,
bodyClassName,
rowKey,
showHeader = true,
children,
}) {
if (empty && rows.length === 0) {
return empty;
}
return (
<div className={classNames(styles.table, className)}>
{showHeader && (
<div className={classNames(styles.header, 'row')}>
{columns.map(({ key, label, className, style, header }) => (
<div
key={key}
className={classNames(styles.head, className, header?.className)}
style={{ ...style, ...header?.style }}
>
{label}
</div>
))}
</div>
)}
<div className={classNames(styles.body, bodyClassName)}>
{rows.length === 0 && <NoData />}
{!children &&
rows.map((row, index) => {
const id = rowKey ? rowKey(row) : index;
return <TableRow key={id} columns={columns} row={row} />;
})}
{children}
</div>
</div>
);
}
const styledObject = PropTypes.shape({
className: PropTypes.string,
style: PropTypes.object,
});
Table.propTypes = {
columns: PropTypes.arrayOf(
PropTypes.shape({
cell: styledObject,
className: PropTypes.string,
header: styledObject,
key: PropTypes.string,
label: PropTypes.node,
render: PropTypes.func,
style: PropTypes.object,
}),
),
rows: PropTypes.arrayOf(PropTypes.object),
empty: PropTypes.node,
className: PropTypes.string,
bodyClassName: PropTypes.string,
rowKey: PropTypes.func,
showHeader: PropTypes.bool,
children: PropTypes.node,
};
export default Table;
export const TableRow = ({ columns, row }) => (
<div className={classNames(styles.row, 'row')}>
{columns.map(({ key, label, render, className, style, cell }, index) => (
<div
key={`${key}-${index}`}
className={classNames(styles.cell, className, cell?.className)}
style={{ ...style, ...cell?.style }}
>
{label && <label>{label}</label>}
{render ? render(row) : row[key]}
</div>
))}
</div>
);

View File

@ -1,55 +0,0 @@
.table {
display: flex;
flex-direction: column;
}
.table label {
display: none;
font-size: var(--font-size-xsmall);
font-weight: bold;
}
.header {
border-bottom: 1px solid var(--gray300);
}
.head {
font-size: var(--font-size-small);
font-weight: 600;
line-height: 40px;
}
.body {
position: relative;
display: flex;
flex-direction: column;
}
.row {
border-bottom: 1px solid var(--gray300);
padding: 10px 0;
}
.cell {
display: flex;
flex-direction: column;
align-items: flex-start;
}
@media only screen and (max-width: 992px) {
.table label {
display: block;
}
.header {
display: none;
}
.row {
flex-direction: column;
}
.cell {
margin-bottom: 20px;
}
}

View File

@ -1,15 +0,0 @@
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import styles from './Tag.module.css';
function Tag({ className, children }) {
return <span className={classNames(styles.tag, className)}>{children}</span>;
}
Tag.propTypes = {
className: PropTypes.string,
children: PropTypes.node,
};
export default Tag;

View File

@ -1,6 +0,0 @@
.tag {
padding: 2px 4px;
border: 1px solid var(--gray300);
border-radius: 4px;
margin-right: 10px;
}

View File

@ -1,35 +0,0 @@
import React, { useEffect } from 'react';
import PropTypes from 'prop-types';
import ReactDOM from 'react-dom';
import { useSpring, animated } from 'react-spring';
import Icon from 'components/common/Icon';
import Close from 'assets/times.svg';
import styles from './Toast.module.css';
function Toast({ message, timeout = 3000, onClose }) {
const props = useSpring({
opacity: 1,
transform: 'translate3d(0,0px,0)',
from: { opacity: 0, transform: 'translate3d(0,-40px,0)' },
});
useEffect(() => {
setTimeout(onClose, timeout);
}, []);
return ReactDOM.createPortal(
<animated.div className={styles.toast} style={props} onClick={onClose}>
<div className={styles.message}>{message}</div>
<Icon className={styles.close} icon={<Close />} size="small" />
</animated.div>,
document.getElementById('__modals'),
);
}
Toast.propTypes = {
message: PropTypes.node,
timeout: PropTypes.number,
onClose: PropTypes.func,
};
export default Toast;

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