Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.4.x #496

Merged
merged 605 commits into from
Aug 28, 2023
Merged

1.4.x #496

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
605 commits
Select commit Hold shift + click to select a range
12abde7
Update src/lib/stores/marketplace.ts
ArmanNik Aug 16, 2023
385ea3f
Fix a bunch of title case text
Aug 16, 2023
43a18f3
Merge branch '1.4.x' into fix-sentence-case
Aug 17, 2023
3ffdd56
fix: template variables
ArmanNik Aug 17, 2023
e3daa4e
Merge pull request #506 from appwrite/fix-QA-1.4
ArmanNik Aug 17, 2023
e3a9521
Merge branch '1.4.x' of github.com:appwrite/console into feat-g4
ArmanNik Aug 17, 2023
194ec67
fix: add debounce to search
TorstenDittmann Aug 17, 2023
300fc15
Merge branch 'feat-g4' of github.com:appwrite/console into feat-g4
TorstenDittmann Aug 17, 2023
d37fb2d
fix queries
TGlide Aug 17, 2023
8d9e54f
toggleable debug overlay
TGlide Aug 17, 2023
668034e
remove search commands in favor of searchers
TGlide Aug 17, 2023
79774d7
remove search commands in favor of searchers
TGlide Aug 17, 2023
aca2620
remove comments
TGlide Aug 17, 2023
3d9fe28
fix: new pink design
TorstenDittmann Aug 17, 2023
67ea17b
fix: template wizard
ArmanNik Aug 17, 2023
3e592c3
fix: remove unnecessary services
TorstenDittmann Aug 17, 2023
0b9a339
Merge branch 'feat-g4' of github.com:appwrite/console into feat-g4
TorstenDittmann Aug 17, 2023
17eba99
fix: functions header nav order
TorstenDittmann Aug 17, 2023
a0f9b3f
fix: preload dependencies
TorstenDittmann Aug 17, 2023
190395e
command center design review
TGlide Aug 17, 2023
cdb86da
add tooltip to header
TGlide Aug 17, 2023
d814703
reorder commands
TGlide Aug 17, 2023
7bb0ae4
fix ai panel input
TGlide Aug 17, 2023
2a0f8f5
more commands
TGlide Aug 17, 2023
42f6eed
hide firebase oauth
TGlide Aug 17, 2023
7ea9b2f
fix: QA
ArmanNik Aug 17, 2023
7dd4ca4
fix: copy
ArmanNik Aug 17, 2023
acdaa9e
fix: show alert only on self hosted
ArmanNik Aug 17, 2023
451e591
fix: cellLink & trim comp, domains
ArmanNik Aug 17, 2023
423df5e
More Fixes
PineappleIOnic Aug 17, 2023
c8432eb
Merge pull request #507 from appwrite/1.4.x-migration-fixes-bradley
TGlide Aug 18, 2023
dabbebf
fix: git template creation
ArmanNik Aug 18, 2023
b9c6880
Merge branch '1.4.x' of github.com:appwrite/console into feat-g4
ArmanNik Aug 18, 2023
7b467e0
fix: git template creation
ArmanNik Aug 18, 2023
047ff87
Merge branch '1.4.x' into design-reviews-1.4
TGlide Aug 18, 2023
67883b3
fix missing project sdk
TGlide Aug 18, 2023
5ef22c8
fix icon
TGlide Aug 18, 2023
320605c
add feedback fn
TGlide Aug 18, 2023
3ad0830
fix: template design
TorstenDittmann Aug 18, 2023
ec5ad21
migration design changes
TGlide Aug 18, 2023
b64f199
Merge branch 'feat-g4' of github.com:appwrite/console into feat-g4
ArmanNik Aug 18, 2023
6f1847d
fix: link in cover
ArmanNik Aug 18, 2023
aa822fb
improve command selection
TGlide Aug 18, 2023
1fb8b58
fix code padding
TGlide Aug 18, 2023
2b58934
loading dots animation
TGlide Aug 18, 2023
5bdc88f
add border to avatars
TGlide Aug 18, 2023
1598022
migrations loaders
TGlide Aug 18, 2023
7069fb2
fix wizard title
TGlide Aug 18, 2023
d97c489
radio button spacing
TGlide Aug 18, 2023
84ccd9e
fix padding
TGlide Aug 18, 2023
f784c05
fix: try catch functions
ArmanNik Aug 18, 2023
1bd1dc3
fix: breadcrumb
ArmanNik Aug 18, 2023
798a8b3
fix: tooltip show on click
ArmanNik Aug 18, 2023
cf14f9d
fix: deployments and executions
ArmanNik Aug 18, 2023
99c7233
fix: executions, form items, form items part
ArmanNik Aug 18, 2023
0c621b9
fix: design review
ArmanNik Aug 18, 2023
1879399
feat: add path to executions
ArmanNik Aug 18, 2023
3e58253
fix: logs
ArmanNik Aug 18, 2023
1a3523e
fix: domains
ArmanNik Aug 18, 2023
ea0d661
fix: small fixes to settings
ArmanNik Aug 18, 2023
f0f0b05
Crop status-building.gif
vermakhushboo Aug 19, 2023
be08aab
Wizard steps simplification experiment
Aug 20, 2023
b365776
Update SDK
Meldiron Aug 20, 2023
4b2ec1f
fix: deploment design
ArmanNik Aug 20, 2023
e82ec33
fix: deployment form design
ArmanNik Aug 20, 2023
f31aa71
fix: missing column
ArmanNik Aug 20, 2023
495a9c2
fix: missing column
ArmanNik Aug 20, 2023
2b88bf5
fix: remove https
ArmanNik Aug 20, 2023
72f65ec
fix: logs replace alerts with cards, parameters
ArmanNik Aug 20, 2023
d77d8d2
fix: replace tables with table scroll
ArmanNik Aug 20, 2023
5724d4f
feat: add execute now button
ArmanNik Aug 20, 2023
f3ebccf
fix: settings page
ArmanNik Aug 20, 2023
1a65262
fix: domains
ArmanNik Aug 20, 2023
5421d44
refactor: box into boxAvatar, create box
ArmanNik Aug 20, 2023
2aeff71
feat: box component
ArmanNik Aug 20, 2023
da84e3b
refactor: remove inline colors
ArmanNik Aug 20, 2023
a730931
fix: trims in domain and git
ArmanNik Aug 20, 2023
ae2838f
feat: new create git design
ArmanNik Aug 20, 2023
d4a153e
chore: add tracking and notification for domain verification
ArmanNik Aug 20, 2023
7c11f1e
fix: label card, reposity behavious, git deployment design
ArmanNik Aug 21, 2023
6a29340
fix: empty state for variables
ArmanNik Aug 21, 2023
f968ecb
fix: instructions
ArmanNik Aug 21, 2023
7a83c83
fix: instructions
ArmanNik Aug 21, 2023
e7387ad
fix: appwrite variable
ArmanNik Aug 21, 2023
a4b4299
fix: variables empty state
ArmanNik Aug 21, 2023
d88bdcc
fix: logs messages
ArmanNik Aug 21, 2023
15b2d5a
fix: cover, refactor avatar group, replace box class with component
ArmanNik Aug 21, 2023
a2bf574
fix: domain tagles
ArmanNik Aug 21, 2023
1cf8e95
roll back to old usage charts
shimonewman Aug 21, 2023
9211cad
fix: retry box
ArmanNik Aug 21, 2023
d899623
logs MVP
TGlide Aug 21, 2023
ebcf8ee
better errors
TGlide Aug 21, 2023
fdd4b5f
fix tags
TGlide Aug 21, 2023
1517544
more design changes
TGlide Aug 21, 2023
2e30330
fix file upload
TGlide Aug 21, 2023
cf13a8c
Merge pull request #511 from appwrite/fix-file-upload
TGlide Aug 21, 2023
5a30062
Merge branch '1.4.x' of github.com:appwrite/console into feat-g4
ArmanNik Aug 21, 2023
441fcce
details tabs
TGlide Aug 21, 2023
0894db7
Fixed type error
vermakhushboo Aug 21, 2023
3877a75
Return undefined if providerSilentMode is empty
vermakhushboo Aug 21, 2023
e1e4c92
hide AI command when needed
TGlide Aug 21, 2023
8d404ed
Merge branch 'feat-g4' of github.com:appwrite/console into feat-g4
ArmanNik Aug 21, 2023
dad2ee1
Add links to docs
Aug 21, 2023
ddab26a
fix: some refactor, reload repo on disconnect
ArmanNik Aug 21, 2023
aea6e50
fix: modal error
ArmanNik Aug 21, 2023
44e74a3
Merge branch 'feat-g4' of github.com:appwrite/console into copy-wizar…
ArmanNik Aug 21, 2023
684d857
Merge pull request #509 from appwrite/copy-wizards
ArmanNik Aug 21, 2023
9ba663e
chore: add missing link
ArmanNik Aug 21, 2023
d555195
Merge branch 'feat-g4' of github.com:appwrite/console into fix-senten…
ArmanNik Aug 21, 2023
58fd31f
Merge pull request #500 from appwrite/fix-sentence-case
ArmanNik Aug 21, 2023
8cea7d9
Merge branch '1.4.x' of github.com:appwrite/console into fix-user-lab…
ArmanNik Aug 21, 2023
edabdfd
Merge pull request #503 from appwrite/fix-user-labels-design-corrections
ArmanNik Aug 21, 2023
178852c
Merge branch '1.4.x' of github.com:appwrite/console into feat-g4
ArmanNik Aug 21, 2023
46d525a
fix: reintroduce deepClone
ArmanNik Aug 21, 2023
e23424e
Update vcs assets as per color scheme
vermakhushboo Aug 21, 2023
95ba5a0
Fix more headings for sentence case
Aug 21, 2023
18c7388
Add new GIFs for VCS & linter
Meldiron Aug 22, 2023
4440e6b
fix: tipying,exhisting repository
ArmanNik Aug 22, 2023
0e85b45
Rename VCS images
Meldiron Aug 22, 2023
78c89b6
Merge branch 'feat-g4' of https://github.com/appwrite/console into fe…
Meldiron Aug 22, 2023
cf7fa5c
fix: types
ArmanNik Aug 22, 2023
b150252
Updated VCS assests
vermakhushboo Aug 22, 2023
41fb41d
chore: bump version
ArmanNik Aug 22, 2023
b5a00bb
fix: function wizards headings
TorstenDittmann Aug 22, 2023
ee76ee7
Merge branch 'feat-g4' of https://github.com/appwrite/appwrite-consol…
TorstenDittmann Aug 22, 2023
ed47d73
fix: spacing, bump version
ArmanNik Aug 22, 2023
58b5707
review changes
TGlide Aug 22, 2023
b44f12e
fix some check issues
TGlide Aug 22, 2023
56d71f4
Merge pull request #514 from appwrite/fix-QA-smtp-templates
ArmanNik Aug 22, 2023
bd296d1
Merge branch '1.4.x' of github.com:appwrite/console into feat-g4
ArmanNik Aug 22, 2023
d33719f
fix: hide pagination for repositories
TorstenDittmann Aug 22, 2023
106fe82
fix: functions template empty states
TorstenDittmann Aug 22, 2023
3fa9456
Merge branch 'feat-g4' of https://github.com/appwrite/appwrite-consol…
TorstenDittmann Aug 22, 2023
b557987
fix: tooltip button stop submitting
ArmanNik Aug 22, 2023
6261f6b
fix: templates grid row height
TorstenDittmann Aug 22, 2023
6c449d4
Merge branch 'feat-g4' of https://github.com/appwrite/appwrite-consol…
TorstenDittmann Aug 22, 2023
4ec8f02
Merge pull request #465 from appwrite/feat-g4
ArmanNik Aug 22, 2023
3b483d1
extract helpers
TGlide Aug 22, 2023
9865be0
feat: add missing certificate generation retry
ArmanNik Aug 22, 2023
2f59c4f
status icons
TGlide Aug 22, 2023
188e5f7
globalize commands
TGlide Aug 22, 2023
552470c
improve kbd nav command center
TGlide Aug 22, 2023
2fefb6b
Merge branch 1.4.x into design-reviews-1.4
TGlide Aug 22, 2023
f46cf9f
small fix
TGlide Aug 22, 2023
4e15c39
Merge pull request #508 from appwrite/design-reviews-1.4
ArmanNik Aug 22, 2023
85addd1
Merge branch '1.4.x' into refactor/modal-header
TGlide Aug 22, 2023
8bd8e58
adjust new modals
TGlide Aug 22, 2023
cf5078a
fix: missing modals
ArmanNik Aug 22, 2023
24ac5e1
Merge pull request #498 from appwrite/refactor/modal-header
ArmanNik Aug 22, 2023
76e3341
chore: remove unused import
ArmanNik Aug 22, 2023
f976fcb
fix: check errors, login page alignment
ArmanNik Aug 22, 2023
09b09dd
chore: remove breaking class
ArmanNik Aug 22, 2023
eeeef53
Merge branch '1.4.x' of github.com:appwrite/console into usage-rollback
ArmanNik Aug 22, 2023
250eba1
chore: comment out broken touch area
ArmanNik Aug 22, 2023
a3a8a6c
fix: files
ArmanNik Aug 22, 2023
709009d
Merge pull request #512 from appwrite/usage-rollback
ArmanNik Aug 22, 2023
5668309
fix touch area
TGlide Aug 22, 2023
f48a681
Merge branch '1.4.x' of https://github.com/appwrite/console into 1.4.x
TGlide Aug 22, 2023
2b88360
fix: tests
ArmanNik Aug 22, 2023
2965a7d
fix: manual deployment function fix
ArmanNik Aug 22, 2023
c1ad8ef
fix: input choice tooltip
ArmanNik Aug 22, 2023
1b2a293
fix command center getting cut off
TGlide Aug 23, 2023
ac1594c
fix: inputchoice empty div
ArmanNik Aug 23, 2023
0e9acc2
fix: table width
ArmanNik Aug 23, 2023
068a16f
fix: variable notification message
ArmanNik Aug 23, 2023
3d77213
fix: spacing
ArmanNik Aug 23, 2023
f153072
fix: tab title
ArmanNik Aug 23, 2023
6f4fccb
fix: reset instalation on function wizard exit to avoid bug
ArmanNik Aug 23, 2023
60c3e4b
Upgrade SDK
Meldiron Aug 23, 2023
6980873
Fix bugs after upgrading sdk
Meldiron Aug 23, 2023
0c955be
fix: remove github on selfhosted
ArmanNik Aug 23, 2023
8a0436b
Merge branch '1.4.x' of github.com:appwrite/console into 1.4.x
ArmanNik Aug 23, 2023
25b7744
fix: deployment title, hide gh button on signup in self hosted
ArmanNik Aug 23, 2023
f4bf3c5
fix: update css, spacing in deployment
ArmanNik Aug 23, 2023
dc4f6eb
fix: appwritekey error when required
ArmanNik Aug 23, 2023
c158b32
chore: comment out sms editing
ArmanNik Aug 23, 2023
81f69a7
fix: rename output to logs
ArmanNik Aug 23, 2023
5bedc03
refactor: disable variable editor if there is no change
ArmanNik Aug 23, 2023
39a3047
fix: rawVariableedito error handling
ArmanNik Aug 23, 2023
8ced2e8
- Safari
elad2412 Aug 23, 2023
11b8504
fix: function template design
TorstenDittmann Aug 24, 2023
9303df0
Merge branch '1.4.x' of https://github.com/appwrite/appwrite-console-…
TorstenDittmann Aug 24, 2023
0f81ae1
fix: logs spacing
ArmanNik Aug 24, 2023
1fd860f
Merge branch '1.4.x' of github.com:appwrite/console into 1.4.x
ArmanNik Aug 24, 2023
315c2a6
fix: deployment total
ArmanNik Aug 24, 2023
b755ce7
improve filtering ux
TGlide Aug 24, 2023
40d1df4
improve filtering ux
TGlide Aug 24, 2023
fae7827
fix empty search card
TGlide Aug 24, 2023
8363ba8
fix: repositoy private by default
ArmanNik Aug 24, 2023
6f2e03c
fix: lint error
TorstenDittmann Aug 24, 2023
8e87077
Merge branch '1.4.x' of https://github.com/appwrite/appwrite-console-…
TorstenDittmann Aug 24, 2023
5732f5b
improve default attribute ux
TGlide Aug 24, 2023
4fbb47e
fix: rename smtp buttons
ArmanNik Aug 24, 2023
0866339
persistent saved default in create attribute screens
TGlide Aug 24, 2023
18c14e9
copy
TGlide Aug 24, 2023
7e316ca
change command groups
TGlide Aug 24, 2023
e7f3195
fix: deployment and execution logs layout
ArmanNik Aug 24, 2023
e7e2fa4
fix: empty search avoid images overflowing
ArmanNik Aug 24, 2023
5ee19c2
Fix final bits of empty links
Aug 24, 2023
df7a062
Update src/routes/console/project-[project]/functions/function-[funct…
Aug 24, 2023
0daa789
Update src/routes/console/project-[project]/functions/function-[funct…
Aug 24, 2023
b3af497
Update src/routes/console/project-[project]/functions/function-[funct…
Aug 24, 2023
b4b1c07
Add more links, remove TODO tags
Aug 24, 2023
7ed2372
Merge branch 'fix-function-doc-link' of https://github.com/appwrite/c…
Aug 24, 2023
f390e0c
Merge pull request #517 from appwrite/fix-function-doc-link
ArmanNik Aug 25, 2023
da7e926
fix: grid create actions for database
TorstenDittmann Aug 25, 2023
e9eea2c
refactor: templates locale; chore: bump css, format
ArmanNik Aug 25, 2023
82f42a1
fix: active deployment
ArmanNik Aug 25, 2023
aaad021
chore: remove unused import
ArmanNik Aug 25, 2023
29ca1cf
refactor: box component
ArmanNik Aug 25, 2023
6c1fd41
fix focus & overflow
TGlide Aug 25, 2023
2d37527
chore: bump css
ArmanNik Aug 25, 2023
8bb1294
fix checkbox spacing
TGlide Aug 25, 2023
fbd0ed2
Fix failing feedback
Meldiron Aug 25, 2023
9a1e9a8
Merge branch 1.4.x into fixes-1.4-round-2
TGlide Aug 28, 2023
20b5466
Merge pull request #516 from appwrite/fixes-1.4-round-2
TGlide Aug 28, 2023
efe3c67
fix: deployment overflow, retry copy, format code
ArmanNik Aug 28, 2023
6423ba3
Merge branch '1.4.x' into fix-sentence-case
TorstenDittmann Aug 28, 2023
b569fce
Merge pull request #513 from appwrite/fix-sentence-case
TorstenDittmann Aug 28, 2023
5b4ab00
fix: deployment and executions tag new color scheme
ArmanNik Aug 28, 2023
729ed59
Merge branch '1.4.x' of https://github.com/appwrite/appwrite-console-…
TorstenDittmann Aug 28, 2023
6e03fd2
fix: functions loading
TorstenDittmann Aug 28, 2023
e2b589d
fix: multiple things
TorstenDittmann Aug 28, 2023
e9b113b
feat: update smtp settings and templates to new SDK
ArmanNik Aug 28, 2023
8fb1efb
fix: paddings
TorstenDittmann Aug 28, 2023
25ce7a4
Merge branch '1.4.x' of https://github.com/appwrite/appwrite-console-…
TorstenDittmann Aug 28, 2023
6d625b6
fix: marketplace order
TorstenDittmann Aug 28, 2023
ebe6aa0
fix: enum icon
TorstenDittmann Aug 28, 2023
77c879d
feat: add alert for selhosted git, small alert refactor
ArmanNik Aug 28, 2023
4d24095
improve ai scrolling
TGlide Aug 28, 2023
e430c24
fix: smtp arguments
ArmanNik Aug 28, 2023
d17bb86
ai disclaimer
TGlide Aug 28, 2023
9c4dc37
improve code spacing
TGlide Aug 28, 2023
b61be68
ai-errors
TGlide Aug 28, 2023
7e31c3e
fix: sent undefined arguments instead of empty string
ArmanNik Aug 28, 2023
ee40afb
fix: remove duplicate code
ArmanNik Aug 28, 2023
d26ac1d
re-add search panel
TGlide Aug 28, 2023
1fb732f
adjust commands
TGlide Aug 28, 2023
732443b
fix: variables link in functions
TorstenDittmann Aug 28, 2023
63f9e77
fix: templates empty strings
ArmanNik Aug 28, 2023
a76c253
Merge branch '1.4.x' of https://github.com/appwrite/appwrite-console-…
TorstenDittmann Aug 28, 2023
d456f9f
feat: add missing alerts
ArmanNik Aug 28, 2023
b891a1e
style changes
TGlide Aug 28, 2023
26d4057
fix: check if vcs enabled in settings
ArmanNik Aug 28, 2023
34aa86c
fix: consolevariabels check
ArmanNik Aug 28, 2023
13ec2b6
Merge pull request #518 from appwrite/1.4-adjustments
TorstenDittmann Aug 28, 2023
1874c23
feat: missing alerts
ArmanNik Aug 28, 2023
bbb19b6
chore: add missing todo tag
ArmanNik Aug 28, 2023
e7258e1
fix: function execution logs light mode
TorstenDittmann Aug 28, 2023
1da1041
chore: fix diagnostics
TorstenDittmann Aug 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,8 @@ module.exports = {
browser: true,
es2017: true,
node: true
},
globals: {
globalThis: false // false means it is not writeable
}
};
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ node_modules
node_modules/
dist/
.vercel

*.swp
10,021 changes: 8,249 additions & 1,772 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,21 @@
},
"dependencies": {
"@analytics/google-analytics": "^1.0.5",
"@appwrite.io/pink": "^0.0.6-rc.14",
"@appwrite.io/console": "0.2.0",
"@analytics/google-tag-manager": "^0.5.3",
"@appwrite.io/console": "npm:matej-appwrite-console@7.1.130",
"@appwrite.io/pink": "0.1.0-next.8",
"@appwrite.io/pink-icons": "^0.1.0-next.8",
"@popperjs/core": "^2.11.6",
"@sentry/svelte": "^7.44.2",
"@sentry/tracing": "^7.44.2",
"ai": "^2.1.15",
"analytics": "^0.8.1",
"dayjs": "^1.11.9",
"deep-equal": "^2.2.2",
"dotenv": "^16.0.3",
"echarts": "^5.4.1",
"logrocket": "^3.0.1",
"nanoid": "^4.0.2",
"pretty-bytes": "^6.1.0",
"prismjs": "^1.29.0",
"svelte-confetti": "^1.2.2",
Expand All @@ -44,6 +49,7 @@
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/svelte": "^3.2.2",
"@testing-library/user-event": "^14.4.3",
"@types/deep-equal": "^1.0.1",
"@types/prismjs": "^1.26.0",
"@typescript-eslint/eslint-plugin": "^5.56.0",
"@typescript-eslint/parser": "^5.56.0",
Expand Down
2 changes: 1 addition & 1 deletion src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

%sveltekit.head%
</head>
<body>
<body data-sveltekit-preload-data="hover">
<div id="svelte">%sveltekit.body%</div>
</body>
</html>
23 changes: 22 additions & 1 deletion src/lib/actions/analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ export enum Submit {
ProjectUpdateName = 'submit_project_update_name',
ProjectUpdateTeam = 'submit_project_update_team',
ProjectService = 'submit_project_service',
ProjectUpdateSMTP = 'submit_project_update_smtp',
MemberCreate = 'submit_member_create',
MemberDelete = 'submit_member_delete',
MembershipUpdateStatus = 'submit_membership_update_status',
Expand All @@ -153,6 +154,7 @@ export enum Submit {
AuthStatusUpdate = 'submit_auth_status_update',
AuthPasswordHistoryUpdate = 'submit_auth_password_history_limit_update',
AuthPasswordDictionaryUpdate = 'submit_auth_password_dictionary_update',
AuthPersonalDataCheckUpdate = 'submit_auth_personal_data_check_update',
SessionsLengthUpdate = 'submit_sessions_length_update',
SessionsLimitUpdate = 'submit_sessions_limit_update',
SessionDelete = 'submit_session_delete',
Expand Down Expand Up @@ -181,15 +183,21 @@ export enum Submit {
FunctionUpdateName = 'submit_function_update_name',
FunctionUpdatePermissions = 'submit_function_update_permissions',
FunctionUpdateSchedule = 'submit_function_update_schedule',
FunctionUpdateConfiguration = 'submit_function_update_configuration',
FunctionUpdateLogging = 'submit_function_update_logging',
FunctionUpdateTimeout = 'submit_function_update_timeout',
FunctionUpdateEvents = 'submit_function_update_events',
FunctionConnectRepo = 'submit_function_disconnect_repo',
FunctionDisconnectRepo = 'submit_function_disconnect_repo',
FunctionRedeploy = 'submit_function_redeploy',
DeploymentCreate = 'submit_deployment_create',
DeploymentDelete = 'submit_deployment_delete',
DeploymentUpdate = 'submit_deployment_update',
ExecutionCreate = 'submit_execution_create',
VariableCreate = 'submit_variable_create',
VariableDelete = 'submit_variable_delete',
VariableUpdate = 'submit_variable_update',
VariableEditor = 'submit_variable_editor',
KeyCreate = 'submit_key_create',
KeyDelete = 'submit_key_delete',
KeyUpdateName = 'submit_key_update_name',
Expand Down Expand Up @@ -220,5 +228,18 @@ export enum Submit {
BucketUpdateExtensions = 'submit_bucket_update_extensions',
FileCreate = 'submit_file_create',
FileDelete = 'submit_file_delete',
FileUpdatePermissions = 'submit_file_update_permissions'
FileUpdatePermissions = 'submit_file_update_permissions',
InstallationCreate = 'submit_installation_create',
InstallationDelete = 'submit_installation_delete',
EmailChangeLocale = 'submit_email_change_locale',
EmailResetTemplate = 'submit_email_reset_template',
EmailUpdateInviteTemplate = 'submit_email_update_invite_template',
EmailUpdateMagicUrlTemplate = 'submit_email_update_magic_url_template',
EmailUpdateRecoveryTemplate = 'submit_email_update_recovery_template',
EmailUpdateVerificationTemplate = 'submit_email_update_verification_template',
SmsChangeLocale = 'submit_sms_change_locale',
SmsResetTemplate = 'submit_sms_reset_template',
SmsUpdateInviteTemplate = 'submit_sms_update_invite_template',
SmsUpdateLoginTemplate = 'submit_sms_update_login_template',
SmsUpdateVerificationTemplate = 'submit_sms_update_verification_template'
}
20 changes: 20 additions & 0 deletions src/lib/actions/multi-actions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import type { Action } from 'svelte/action';

export type MultiActionArray = Array<(node: HTMLElement) => ReturnType<Action>>;

export function multiAction(node: HTMLElement, arr: MultiActionArray) {
const destroyFns = arr.map((fn) => {
const actionReturn = fn(node);

return actionReturn
? actionReturn.destroy
: () => {
/* noop */
};
});
return {
destroy() {
destroyFns.forEach((fn) => fn());
}
};
}
42 changes: 42 additions & 0 deletions src/lib/actions/portal.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import { tick } from 'svelte';
import type { Action } from 'svelte/action';

export type PortalConfig = string | HTMLElement | undefined;

export const portal: Action<HTMLElement, PortalConfig> = (el, target = 'body') => {
let targetEl;

async function update(newTarget: PortalConfig) {
target = newTarget;
if (typeof target === 'string') {
targetEl = document.querySelector(target);
if (targetEl === null) {
await tick();
targetEl = document.querySelector(target);
}
if (targetEl === null) {
throw new Error(`No element found matching css selector: "${target}"`);
}
} else if (target instanceof HTMLElement) {
targetEl = target;
} else {
throw new TypeError(
`Unknown portal target type: ${
target === null ? 'null' : typeof target
}. Allowed types: string (CSS selector) or HTMLElement.`
);
}
targetEl.appendChild(el);
el.hidden = false;
}

function destroy() {
el.remove();
}

update(target);
return {
update,
destroy
};
};
158 changes: 158 additions & 0 deletions src/lib/commandCenter/commandCenter.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
<script lang="ts" context="module">
type Context = Readable<{
isInitialPanel: boolean;
open: boolean;
}>;
type ReadableValue<T> = T extends Readable<infer U> ? U : never;

const contextKey = 'command-center';
export const getCommandCenterCtx = () => getContext<Context>(contextKey);
const setCommandCenterCtx = (value: ReadableValue<Context>) => {
const store = writable(value);
setContext(contextKey, store);
return store;
};

export const toggleCommandCenter = () => {
if (get(subPanels).length > 0) {
clearSubPanels();
} else {
addSubPanel(RootPanel);
}
};
</script>

<script lang="ts">
import { dev } from '$app/environment';
import { portal } from '$lib/actions/portal';
import { last } from '$lib/helpers/array';
import { debounce } from '$lib/helpers/debounce';
import { getContext, setContext } from 'svelte';
import { get, writable, type Readable } from 'svelte/store';
import { fade } from 'svelte/transition';
import { commandCenterKeyDownHandler, disableCommands, registerCommands } from './commands';
import { RootPanel } from './panels';
import { addSubPanel, clearSubPanels, subPanels } from './subPanels';
import { addNotification } from '$lib/stores/notifications';

let debugOverlayEnabled = false;

$: $registerCommands([
{
callback: toggleCommandCenter,
keys: ['k'],
ctrl: true,
forceEnable: true
},
{
label: 'Toggle debug overlay',
callback: () => {
debugOverlayEnabled = !debugOverlayEnabled;
addNotification({
title: 'Debug overlay',
message: debugOverlayEnabled ? 'Enabled' : 'Disabled',
type: 'info'
});
},
keys: ['d', 'o'],
group: 'misc',
disabled: !dev
}
]);

$: openSubPanel = last($subPanels) ?? null;
$: $disableCommands(!!openSubPanel);

$: if (openSubPanel) {
document.documentElement.classList.add('u-overflow-hidden');
} else {
document.documentElement.classList.remove('u-overflow-hidden');
}

let dialog: HTMLDivElement;

function handleBlur(event: MouseEvent) {
if (event.target === dialog) {
clearSubPanels();
}
}

const ctx = setCommandCenterCtx({
isInitialPanel: true,
open: false
});

$: if (!openSubPanel) {
$ctx.isInitialPanel = true;
}
$: $subPanels.length > 1 && ($ctx.isInitialPanel = false);

$: $ctx.open = !!openSubPanel;

let keys: string[] = [];

const resetKeys = debounce(() => {
keys = [];
}, 1000);

function isInputEvent(event: KeyboardEvent) {
return ['INPUT', 'TEXTAREA', 'SELECT'].includes((event.target as HTMLElement).tagName);
}

const handleKeydown = (e) => {
if (!$subPanels.length) {
if (isInputEvent(e)) return;
keys = [...keys, e.key].slice(-10);
resetKeys();
}
$commandCenterKeyDownHandler(e);
};
</script>

<svelte:window on:mousedown={handleBlur} on:keydown={handleKeydown} />

{#if openSubPanel}
<div class="dialog" bind:this={dialog} transition:fade={{ duration: 100 }}>
<svelte:component this={openSubPanel.component} />
</div>
{/if}

{#if dev && debugOverlayEnabled}
<div class="debug-keys" use:portal>
{#each keys as key, i (i)}
<kbd class="kbd" transition:fade|local={{ duration: 150 }}>
{key.length === 1 ? key.toUpperCase() : key}
</kbd>
{/each}
</div>
{/if}

<style lang="scss">
.dialog {
padding: 0.5rem;
position: fixed;
inset: 0;

background-color: hsl(var(--color-neutral-500) / 0.5);
z-index: 9999;
}

.debug-keys {
position: fixed;
bottom: 10%;
left: 50%;
transform: translateX(-50%);
padding: 0.5rem;
z-index: 9999;

display: flex;
gap: 1rem;

font-size: 2rem;

.kbd {
padding-inline: 0.5rem;
padding-block: 1.5rem;
}
}
</style>
Loading