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

Feat: Functions G4 #465

Merged
merged 228 commits into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
228 commits
Select commit Hold shift + click to select a range
49e9c82
Update dependencies
Meldiron May 31, 2023
2866a84
New iteration of env variables
Meldiron Jun 2, 2023
da58902
Add git installation in project settings
Meldiron Jun 5, 2023
9f78abf
Add logging toggle settings
Meldiron Jun 6, 2023
b8e229d
feat: start work on function configuration, small refactors and fixes
ArmanNik Jun 6, 2023
64eb85e
feat: function setting git repo (WIP)
ArmanNik Jun 7, 2023
a1501b4
feat: function setting configuration (style missing)
ArmanNik Jun 8, 2023
b37ee64
feat: git configuration
ArmanNik Jun 12, 2023
4129413
Improve function settings git
Meldiron Jun 18, 2023
fffdd22
Upgrade SDK
Meldiron Jun 21, 2023
a4d7770
Add external contributor auth page
Meldiron Jun 28, 2023
08060d1
Fix create deployment modal with SDK upgrade
Meldiron Jul 3, 2023
4f74f80
fix: organize overview
TorstenDittmann Jul 12, 2023
856431b
fix: leftovers from project overview
TorstenDittmann Jul 12, 2023
62ba5f2
fix: new domains
TorstenDittmann Jul 12, 2023
a2b9c63
fix: leftovers
TorstenDittmann Jul 12, 2023
6a60f03
fix: retrying
TorstenDittmann Jul 12, 2023
2aa2ac2
fix: retry
TorstenDittmann Jul 13, 2023
6cf439a
fix: remove console.log
TorstenDittmann Jul 13, 2023
bfde571
fix: retry
TorstenDittmann Jul 13, 2023
929bc16
fix some more
TorstenDittmann Jul 16, 2023
45c825a
chore: upgrade packages
TorstenDittmann Jul 16, 2023
0d7c377
feat: add git install
TorstenDittmann Jul 17, 2023
c0d7d67
fix: push stuff
TorstenDittmann Jul 17, 2023
468959c
fix: row clickable
ArmanNik Jul 17, 2023
275c99d
fix: create deployment
TorstenDittmann Jul 17, 2023
e92e6ec
feat: logs
ArmanNik Jul 17, 2023
83e6bca
feat: logs tabs now working
ArmanNik Jul 17, 2023
376f938
fix: comment out stuff
ArmanNik Jul 17, 2023
c8223b9
fix: tabs now work
ArmanNik Jul 17, 2023
03bfc4f
fix typos
TorstenDittmann Jul 19, 2023
9e818cb
WIP: Fixed installation flow error
vermakhushboo Jul 20, 2023
d358c7d
Apply commands params changes
Meldiron Jul 21, 2023
2227d1b
fix: build
TorstenDittmann Jul 21, 2023
2e17e0a
fix linter
TorstenDittmann Jul 21, 2023
65bd244
Merge branch 'feat-g4' of github.com:appwrite/console into feat-g4
TorstenDittmann Jul 21, 2023
1dec4d2
fix: push some changes
TorstenDittmann Jul 26, 2023
0384830
push some more stuff
TorstenDittmann Jul 26, 2023
dff906f
fix: deployments
TorstenDittmann Jul 26, 2023
1baa6c9
feat: initial tempaltes
TorstenDittmann Jul 26, 2023
9adb94c
Addapt to appwrite API changes
Meldiron Jul 30, 2023
1d75b39
Fix bugs after QA
Meldiron Jul 30, 2023
9256f22
Fix after changes to endpoints
Meldiron Jul 31, 2023
67ccbdc
Updated repositories to providerRepositories
vermakhushboo Aug 1, 2023
5304af1
Update icons, add Azure placeholder, WIP templates&starter
Meldiron Aug 4, 2023
cd583f4
Finish template wizard
Meldiron Aug 4, 2023
6e4bd59
Upgrade to new logs structure
Meldiron Aug 5, 2023
7ef7cd3
Add services toggle, fix branches dropdowns
Meldiron Aug 5, 2023
54c42e0
Support new redirect params
Meldiron Aug 5, 2023
7d62f90
Fix VCS endpoint
Meldiron Aug 6, 2023
ebe4fb0
QA fixes with 1.4.x
Meldiron Aug 6, 2023
f7a30b1
Fix code QL errors
Meldiron Aug 6, 2023
7ceed95
QA changes
Meldiron Aug 7, 2023
c51d994
More QA changes in G4
Meldiron Aug 8, 2023
168e808
Add undefined checks for VCS attributes
vermakhushboo Aug 9, 2023
7fa2fe1
Add VCS static files
Meldiron Aug 9, 2023
2d93a38
Rename vcs files
Meldiron Aug 9, 2023
f356104
Improve copy
Meldiron Aug 9, 2023
c813a1b
fix typo
Meldiron Aug 9, 2023
60e1f34
feat: deployments
ArmanNik Aug 9, 2023
6dd8807
Merge branch 'feat-g4' of github.com:appwrite/console into feat-g4
ArmanNik Aug 9, 2023
97a978f
feat: style impovements
ArmanNik Aug 9, 2023
c7a4c2e
Fix domains
Meldiron Aug 9, 2023
ee3fc64
fix: changes
ArmanNik Aug 9, 2023
0c5f2c5
Finish deployments detials
Meldiron Aug 9, 2023
adb3821
Fix bug
Meldiron Aug 9, 2023
5f89e92
Merge branch 'main' into feat-g4
Meldiron Aug 9, 2023
4bdde47
Fix after merge
Meldiron Aug 9, 2023
aa01e7d
Fix from npm run check, after merge
Meldiron Aug 9, 2023
7df35d4
Merge remote-tracking branch 'origin/1.4.x' into feat-g4
Meldiron Aug 9, 2023
6245549
Upgrade sdk
Meldiron Aug 9, 2023
3e7ca0e
Fix error
Meldiron Aug 9, 2023
3ef78b4
Sync with 1.4.x
Meldiron Aug 9, 2023
0c0500e
Upgrade sdks
Meldiron Aug 9, 2023
aa5abe0
Fix bug
Meldiron Aug 9, 2023
55ac069
Fix double button
Meldiron Aug 10, 2023
f9b931b
Add OAuth Reports
PineappleIOnic Aug 10, 2023
5e58cd5
Merge branch 'command-center-and-migrations' of https://github.com/ap…
PineappleIOnic Aug 10, 2023
b159a4a
Fix firebase 404 errors
Meldiron Aug 10, 2023
1edbeee
fix: remove additional settings
ArmanNik Aug 10, 2023
af60226
fix: icons and avatars in update installation
ArmanNik Aug 10, 2023
1fdb208
fix: loading condition error
ArmanNik Aug 10, 2023
475e36f
fix: error messages
ArmanNik Aug 10, 2023
0b4aa78
Update src/routes/console/project-[project]/settings/migrations/(impo…
PineappleIOnic Aug 10, 2023
f1002c8
fix: installation copy
ArmanNik Aug 10, 2023
782c778
Merge pull request #499 from appwrite/command-center-and-migrations
christyjacob4 Aug 10, 2023
f8932a4
feat: update installation design
ArmanNik Aug 10, 2023
33c357c
feat: design fixes
ArmanNik Aug 10, 2023
f2ba163
Merge branch 'feat-g4' of github.com:appwrite/console into feat-g4
ArmanNik Aug 10, 2023
cebd5db
fix: update variables modal
ArmanNik Aug 10, 2023
fe73fe0
fix: merge conflict
ArmanNik Aug 10, 2023
80907ef
fix: remove inline alert not exhisting
ArmanNik Aug 10, 2023
b12cfeb
fix: deployment from Steven
ArmanNik Aug 10, 2023
5ee646a
fix: marketteplace type
ArmanNik Aug 10, 2023
a1278a3
feat: improve create function store
ArmanNik Aug 10, 2023
8b140df
fix: small fixes from steven
ArmanNik Aug 10, 2023
722ba0c
fix: links
ArmanNik Aug 10, 2023
e02e7a9
fix: move statements
ArmanNik Aug 10, 2023
b2d720a
fix: event
ArmanNik Aug 10, 2023
9f11cc2
fix: added invalidation back
ArmanNik Aug 10, 2023
fc975a4
Change everything to sentence case
Aug 10, 2023
b951497
fix: create deployment dropdown
ArmanNik Aug 10, 2023
ca24aac
Wrong logs table & AI endpoint
Meldiron Aug 11, 2023
29590d6
Fix AI endpoint
Meldiron Aug 11, 2023
7bcac64
Add proper headers to AI API
Meldiron Aug 11, 2023
ce6a8ae
fix: steven qa
ArmanNik Aug 11, 2023
70d2c64
Address QA reviews
Meldiron Aug 11, 2023
7249b90
fix: more steven qa
ArmanNik Aug 11, 2023
6d8c9ff
Merge branch 'feat-g4' of github.com:appwrite/console into feat-g4
ArmanNik Aug 11, 2023
a1ec99e
Improve function settings page load speed
Meldiron Aug 11, 2023
6358194
fix: add .env extentions to input files
ArmanNik Aug 11, 2023
221a4cb
Merge branch '1.4.x' of github.com:appwrite/console into feat-g4
ArmanNik Aug 11, 2023
a690648
feat: add appwrite svg
ArmanNik Aug 11, 2023
befe5c6
fix: icon
ArmanNik Aug 11, 2023
63dc89b
fix: design review fixes
ArmanNik Aug 15, 2023
c4331ea
feat: new design wizard
ArmanNik Aug 15, 2023
1452fa1
Merge branch 'feat-g4' of github.com:appwrite/console into feat-g4
TorstenDittmann Aug 16, 2023
c090d16
push: remaining function templates
TorstenDittmann Aug 16, 2023
5aa56f7
fix: center title and icons
TorstenDittmann Aug 16, 2023
cb4e542
fix: code review
ArmanNik Aug 16, 2023
316b61f
Merge branch 'feat-g4' of github.com:appwrite/console into feat-g4
ArmanNik Aug 16, 2023
f5c8ad7
fix: code review
ArmanNik Aug 16, 2023
f38d5fa
Update src/lib/stores/marketplace.ts
ArmanNik Aug 16, 2023
b39cb43
Update src/lib/stores/marketplace.ts
ArmanNik Aug 16, 2023
e6c1b46
Update src/lib/stores/marketplace.ts
ArmanNik Aug 16, 2023
fa1d130
Update src/lib/stores/marketplace.ts
ArmanNik Aug 16, 2023
f242f71
Update src/lib/stores/marketplace.ts
ArmanNik Aug 16, 2023
ec09566
Update src/lib/stores/marketplace.ts
ArmanNik Aug 16, 2023
15b228a
Update src/lib/stores/marketplace.ts
ArmanNik Aug 16, 2023
8b356b8
Update src/lib/stores/marketplace.ts
ArmanNik Aug 16, 2023
a8a7e2b
Update src/lib/stores/marketplace.ts
ArmanNik Aug 16, 2023
102aedc
fix: copy
ArmanNik Aug 16, 2023
972b45e
fix: copy
ArmanNik Aug 16, 2023
e6f7cd6
Update src/lib/stores/marketplace.ts
ArmanNik Aug 16, 2023
ceeafa8
Update src/lib/stores/marketplace.ts
ArmanNik Aug 16, 2023
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
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
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
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
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
3ad0830
fix: template design
TorstenDittmann 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
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
9211cad
fix: retry box
ArmanNik Aug 21, 2023
5a30062
Merge branch '1.4.x' of github.com:appwrite/console into feat-g4
ArmanNik Aug 21, 2023
0894db7
Fixed type error
vermakhushboo Aug 21, 2023
3877a75
Return undefined if providerSilentMode is empty
vermakhushboo 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
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
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
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
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
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,098 changes: 1,368 additions & 730 deletions package-lock.json

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@
},
"dependencies": {
"@analytics/google-analytics": "^1.0.5",
"@appwrite.io/console": "npm:christy-console@^0.4.0",
"@appwrite.io/pink": "0.1.0-next.3",
"@appwrite.io/pink-icons": "^0.1.0-next.3",
"@analytics/google-tag-manager": "^0.5.3",
"@appwrite.io/console": "npm:matej-appwrite-console@7.1.126",
"@appwrite.io/pink": "0.1.0-next.4",
"@appwrite.io/pink-icons": "^0.1.0-next.4",
"@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",
"dotenv": "^16.0.3",
"echarts": "^5.4.1",
"logrocket": "^3.0.1",
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>
8 changes: 8 additions & 0 deletions src/lib/actions/analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,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 @@ -223,6 +229,8 @@ export enum Submit {
FileCreate = 'submit_file_create',
FileDelete = 'submit_file_delete',
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',
Expand Down
7 changes: 6 additions & 1 deletion src/lib/commandCenter/panels/ai.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@
import CoolerAppwrite from '$lib/images/appwrite-cooler.svg';
import { VARS } from '$lib/system';

const endpoint = VARS.APPWRITE_ENDPOINT ?? `${globalThis?.location?.origin}/v1`;

const { input, handleSubmit, completion, isLoading, complete } = useCompletion({
api: VARS.ASSISTANT_ENDPOINT
api: endpoint + '/console/assistant',
headers: {
'content-type': 'application/json'
}
});

const examples = [
Expand Down
4 changes: 2 additions & 2 deletions src/lib/commandCenter/searchers/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { get } from 'svelte/store';
import type { Searcher } from '../commands';
import type { Models } from '@appwrite.io/console';
import { page } from '$app/stores';
import { showCreateDeployment } from '$routes/console/project-[project]/functions/function-[function]/+page.svelte';
import { showCreateDeployment } from '$routes/console/project-[project]/functions/function-[function]/store';

const getFunctionCommand = (fn: Models.Function, projectId: string) => {
return {
Expand Down Expand Up @@ -37,7 +37,7 @@ export const functionsSearcher = (async (query: string) => {
if (!$page.url.pathname.endsWith(func.$id)) {
await goto(`/console/project-${projectId}/functions/function-${func.$id}`);
}
showCreateDeployment();
showCreateDeployment.set(true);
},
group: 'functions',
icon: 'plus'
Expand Down
1 change: 0 additions & 1 deletion src/lib/components/alert.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

export let dismissible = false;
export let type: 'info' | 'success' | 'warning' | 'error' = 'info';
export let standalone = false;
export let buttons: Buttons[] = [];
export let isAction = false;
export let isStandalone = false;
Expand Down
22 changes: 20 additions & 2 deletions src/lib/components/avatarGroup.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,39 @@
import AvatarInitials from './avatarInitials.svelte';

export let avatars: string[] = [];
export let icons: string[] = [];
ArmanNik marked this conversation as resolved.
Show resolved Hide resolved
export let total = avatars.length;
export let size = 40;
export let avatarSize: keyof typeof Sizes = 'medium';
export let bordered = false;

enum Sizes {
xsmall = 'is-size-x-small',
small = 'is-size-small',
medium = '',
large = 'is-size-large',
xlarge = 'is-size-x-large'
}
</script>

<ul class="avatars-group">
<ul class="avatars-group" class:is-with-border={bordered}>
{#each avatars as name, index}
{#if index < 2}
<li class="avatars-group-item">
<AvatarInitials {size} {name} />
</li>
{/if}
{/each}

{#each icons as icon}
<li class="avatars-group-item">
<span class="avatar {Sizes[avatarSize]}"><span class={`icon-${icon}`} /></span>
</li>
{/each}

{#if total > 2}
<li class="avatars-group-item">
<div class="avatar">+{total - 2}</div>
<div class="avatar {Sizes[avatarSize]}">+{total - 2}</div>
</li>
{/if}
</ul>
27 changes: 19 additions & 8 deletions src/lib/components/box.svelte
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
<div class="box">
<div class="u-flex u-gap-16">
<slot name="image" />
<div class="u-cross-child-center u-line-height-1-5">
<slot name="title" />
<slot />
</div>
</div>
<script lang="ts">
export let radius: keyof typeof radiuses = 'small';
export let padding = 24;
let classes = '';
export { classes as class };

enum radiuses {
xsmall = '--border-radius-extra-large',
small = '--border-radius-small',
medium = '--border-radius-medium',
large = '--border-radius-large'
}
</script>

<div
class="box {classes}"
style:--box-border-radius={`var(${radiuses[radius]})`}
style:--box-padding={`${padding / 16}rem`}>
<slot />
</div>
9 changes: 9 additions & 0 deletions src/lib/components/boxAvatar.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<div class="box">
<div class="u-flex u-gap-16">
<slot name="image" />
<div class="u-cross-child-center u-line-height-1-5">
<slot name="title" />
<slot />
</div>
</div>
</div>
4 changes: 3 additions & 1 deletion src/lib/components/collapsibleItem.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
<slot name="beforetitle" />
<div>
<span class="text"><slot name="title" /></span>
<span class="collapsible-button-optional"><slot name="subtitle" /></span>
{#if $$slots.subtitle}
<span class="collapsible-button-optional"><slot name="subtitle" /></span>
{/if}
</div>
<div class="icon">
<span class="icon-cheveron-down" aria-hidden="true" />
Expand Down
3 changes: 2 additions & 1 deletion src/lib/components/customId.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
export let name: string;
export let id: string;
export let autofocus = true;
export let fullWidth = false;

$: if (!show) {
id = null;
Expand All @@ -21,7 +22,7 @@
}
</script>

<InnerModal bind:show>
<InnerModal bind:show {fullWidth}>
<svelte:fragment slot="title">{name} ID</svelte:fragment>
<svelte:fragment slot="subtitle">
Enter a custom {name} ID. Leave blank for a randomly generated one.
Expand Down
8 changes: 7 additions & 1 deletion src/lib/components/dropListLink.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@
export let href: string;
export let icon: string = null;
export let disabled = false;
export let external = false;
</script>

<li class="drop-list-item" on:click on:keyup={clickOnEnter}>
<a {href} class="drop-button" class:is-disabled={disabled}>
<a
{href}
class="drop-button"
class:is-disabled={disabled}
target={external ? '_blank' : ''}
rel={external ? 'noopener noreferrer' : ''}>
<span class="text"><slot /></span>
{#if icon}
<span class={`icon-${icon}`} aria-hidden="true" />
Expand Down
11 changes: 7 additions & 4 deletions src/lib/components/emptySearch.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import Dark from '$lib/images/search-dark.svg';
import PaginationInline from './paginationInline.svelte';

export let hidePagination = false;
export let hidePages = false;
</script>

Expand All @@ -18,7 +19,9 @@
</div>
</article>

<div class="u-flex u-margin-block-start-32 u-main-space-between">
<p class="text">Total results: 0</p>
<PaginationInline limit={1} offset={0} sum={0} {hidePages} />
</div>
{#if !hidePagination}
<div class="u-flex u-margin-block-start-32 u-main-space-between">
<p class="text">Total results: 0</p>
<PaginationInline limit={1} offset={0} sum={0} {hidePages} />
</div>
{/if}
2 changes: 1 addition & 1 deletion src/lib/components/eventModal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
</script>

<Modal bind:show onSubmit={create} size="big">
<svelte:fragment slot="header">Create Event</svelte:fragment>
<svelte:fragment slot="header">Create event</svelte:fragment>
<slot />
<div>
<p class="u-text">Choose a service</p>
Expand Down
3 changes: 3 additions & 0 deletions src/lib/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export { default as AvatarInitials } from './avatarInitials.svelte';
export { default as AvatarGroup } from './avatarGroup.svelte';
export { default as Alert } from './alert.svelte';
export { default as Box } from './box.svelte';
export { default as BoxAvatar } from './boxAvatar.svelte';
export { default as Search } from './search.svelte';
export { default as SearchQuery } from './searchQuery.svelte';
export { default as GridItem1 } from './gridItem1.svelte';
Expand All @@ -52,6 +53,8 @@ export { default as PaginationWithLimit } from './paginationWithLimit.svelte';
export { default as ClickableList } from './clickableList.svelte';
export { default as ClickableListItem } from './clickableListItem.svelte';
export { default as Id } from './id.svelte';
export { default as NumericList } from './numericList.svelte';
export { default as NumericListItem } from './numericListItem.svelte';
export { default as EyebrowHeading } from './eyebrowHeading.svelte';
export { default as SvgIcon } from './svgIcon.svelte';
export { default as MigrationBox } from './migrationBox.svelte';
Expand Down
3 changes: 2 additions & 1 deletion src/lib/components/innerModal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@

export let show = false;
export let closable = true;
export let fullWidth = false;
</script>

{#if show}
<FormItem>
<section class="modal is-inner-modal">
<section class="modal is-inner-modal" class:u-width-full-line={fullWidth}>
<div class="modal-form">
<header class="modal-header">
<div class="u-flex u-main-space-between u-cross-center u-gap-16">
Expand Down
12 changes: 8 additions & 4 deletions src/lib/components/labelCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,14 @@
bind:group
on:click />
<div class="u-flex u-flex-vertical u-gap-4">
<h4 class="body-text-2 u-bold"><slot name="title" /></h4>
<p class="u-color-text-gray u-small">
<slot />
</p>
{#if $$slots.title}
<h4 class="body-text-2 u-bold"><slot name="title" /></h4>
{/if}
{#if $$slots.default}
<p class="u-color-text-gray u-small">
<slot />
</p>
{/if}
</div>
{#if icon}
<span class={`icon-${icon} u-margin-inline-start-auto`} aria-hidden="true" />
Expand Down
3 changes: 3 additions & 0 deletions src/lib/components/numericList.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<ol class="numeric-list">
<slot />
</ol>
7 changes: 7 additions & 0 deletions src/lib/components/numericListItem.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<script lang="ts">
export let fullWidth = false;
</script>

<li class="numeric-list-item">
<div class="u-margin-block-start-8" class:u-width-full-line={fullWidth}><slot /></div>
</li>
13 changes: 3 additions & 10 deletions src/lib/components/permissions/permissions.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
TableRow
} from '$lib/elements/table';
import { symmetricDifference } from '$lib/helpers/array';
import { onDestroy, onMount } from 'svelte';
import { writable, type Unsubscriber } from 'svelte/store';
import { onMount } from 'svelte';
import { writable } from 'svelte/store';
import Actions from './actions.svelte';
import Row from './row.svelte';
import Table from '$lib/elements/table/table.svelte';
Expand All @@ -32,26 +32,19 @@
let showTeam = false;
let showCustom = false;
let showDropdown = false;
let unsubscribe: Unsubscriber;

const groups = writable<Map<string, Permission>>(new Map());

onMount(() => {
permissions.forEach(fromPermissionString);
unsubscribe = groups.subscribe(() => {
return groups.subscribe(() => {
ArmanNik marked this conversation as resolved.
Show resolved Hide resolved
const current = exportRoles();
if (symmetricDifference(current, permissions).length) {
permissions = current;
}
});
});

onDestroy(() => {
if (unsubscribe) {
unsubscribe();
}
});

function create(event: CustomEvent<string[]>) {
for (const role of event.detail) {
addRole(role);
Expand Down
Loading