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 git integration #454

Closed
wants to merge 422 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
422 commits
Select commit Hold shift + click to select a range
9a1fea7
fix: prevent analytics in preview or dev
TorstenDittmann Feb 9, 2023
793e14e
fix: env tostring
TorstenDittmann Feb 9, 2023
7914ed1
Merge pull request #260 from appwrite/fix-handle-empty-growth-endpoint
TorstenDittmann Feb 9, 2023
9a8e2ef
fix: bug
TorstenDittmann Feb 9, 2023
ba7186c
Merge pull request #270 from appwrite/fix-handle-empty-growth-endpoint
TorstenDittmann Feb 9, 2023
7bb99a9
refactor: change some anys to unknown
TGlide Feb 9, 2023
8e583db
Merge pull request #269 from appwrite/feat-add-size-string-attribute-…
TorstenDittmann Feb 9, 2023
612d731
Merge pull request #216 from appwrite/feat-empty-arrays-ui
TorstenDittmann Feb 9, 2023
e79b68d
feat: add timer to deployments
TGlide Feb 9, 2023
b0a2ec8
feat: remember overview last tab
ArmanNik Feb 9, 2023
438339a
refactor: selected tab is set on pageload
ArmanNik Feb 9, 2023
fdd1242
chore: remove import
ArmanNik Feb 9, 2023
7d534bd
chore: changed console.log into console.debug to make filtering easier
ArmanNik Feb 9, 2023
30b5828
Merge pull request #271 from appwrite/feat-remember-overview-last-tab
TorstenDittmann Feb 9, 2023
dc1cd74
Merge pull request #272 from appwrite/chore-turn-dev-analytics-into-d…
TorstenDittmann Feb 9, 2023
bdb2b7b
refactor: remove timer from executions
TGlide Feb 9, 2023
f0ada28
fix: design review issues
TGlide Feb 9, 2023
d0422fe
fix: organizations arrow alignment
TGlide Feb 9, 2023
ed42f9d
refactor: expirationInput checks if predefined date
TGlide Feb 9, 2023
0b8bea1
fix: initial value changing on expiration input
TGlide Feb 9, 2023
75aac13
feat: expiration date alerts
TGlide Feb 9, 2023
2a87d3f
feat: expiration helper
TGlide Feb 9, 2023
3e06e21
fix: scopes missing singular case
TGlide Feb 9, 2023
88e60f2
fix: date input button
ArmanNik Feb 10, 2023
dcd2324
fix: helper top margin
ArmanNik Feb 10, 2023
da1cfc7
chore: fix wrong capitalization
ArmanNik Feb 10, 2023
3d74719
fix: hide spacing header dropdow no organization
ArmanNik Feb 10, 2023
5ce3f7c
Merge pull request #278 from appwrite/fix-header-dropdown-no-organiza…
TorstenDittmann Feb 10, 2023
28ef393
Merge pull request #277 from appwrite/chore-fix-copy-wrong-capitaliza…
TorstenDittmann Feb 10, 2023
a03187a
Merge pull request #276 from appwrite/fix-helper-margin
TorstenDittmann Feb 10, 2023
c802d81
Merge pull request #275 from appwrite/fix-date-input-button
TorstenDittmann Feb 10, 2023
205959b
fix: input id regex
ArmanNik Feb 10, 2023
b1d3f99
Merge pull request #279 from appwrite/fix-input-id-regex
TorstenDittmann Feb 10, 2023
5b7dd1c
feat: create tests for input ID validation
ArmanNik Feb 10, 2023
737cc5c
Merge pull request #273 from appwrite/fix/team-popover-design-review
TorstenDittmann Feb 10, 2023
43abe03
fix: expiration input showing helper text when value is null
TGlide Feb 10, 2023
7c85da3
refactor: small design changes
TGlide Feb 10, 2023
7db8153
fix: timer not stopping when failed
TGlide Feb 10, 2023
7788371
Merge pull request #280 from appwrite/test-create-for-input-id
TorstenDittmann Feb 10, 2023
259adb4
chore: organize imports
TGlide Feb 10, 2023
5eb6f85
Merge branch main into feat/in-progress-execution-timer
TGlide Feb 10, 2023
279f195
Merge pull request #274 from appwrite/refactor/api-details-page
TorstenDittmann Feb 10, 2023
be9ada0
chore: change npm audit level to low
TGlide Feb 10, 2023
ccf53ea
Merge pull request #246 from appwrite/feat/in-progress-execution-timer
TorstenDittmann Feb 10, 2023
3b559d9
feat: add success alert on feedback
TGlide Feb 10, 2023
aeb4cbd
Merge pull request #281 from appwrite/chore/modify-npm-audit-level
TorstenDittmann Feb 10, 2023
fa5dff3
Merge pull request #282 from appwrite/feat/feedback-alert
TorstenDittmann Feb 10, 2023
156e052
fix: chart resize wizard closed
ArmanNik Feb 10, 2023
3c84356
Merge pull request #283 from appwrite/fix-chart-resize-wizard-closed
TorstenDittmann Feb 10, 2023
3edcfb6
fix: function fist deployment, select validity
ArmanNik Feb 10, 2023
c27139c
fix: remove unused property
ArmanNik Feb 10, 2023
203c8fc
refactor: add logic for initial unit on session length
TGlide Feb 10, 2023
f1f0c59
fix: cron expression regex fix
yatharth1706 Feb 10, 2023
24b8e22
fix: enum attribute editable issue in overview modal
yatharth1706 Feb 12, 2023
5eb0f7b
fix: wizard flutter overflow
ArmanNik Feb 13, 2023
9b82b62
feat: track error events
TorstenDittmann Feb 13, 2023
be1b5c5
fix: typings
TorstenDittmann Feb 13, 2023
5f68b13
Merge pull request #286 from yatharth1706/fix-5021-fix-cron-validatio…
TorstenDittmann Feb 13, 2023
cff5b9b
test: add cron input tests
TorstenDittmann Feb 13, 2023
1796de0
Merge pull request #290 from appwrite/test-cron-input
TorstenDittmann Feb 13, 2023
5198c7b
Merge pull request #285 from appwrite/refactor/default-units
TorstenDittmann Feb 13, 2023
aa272fe
Merge pull request #288 from appwrite/fix-flutter-wizard-overflow
TorstenDittmann Feb 13, 2023
6b94d8e
Merge branch 'main' of https://github.com/appwrite/appwrite-console-p…
TorstenDittmann Feb 13, 2023
ae54e3c
fix: flutter platform persistence
TGlide Feb 7, 2023
2fa4764
fix: done changes suggested by TorstenDittmann
yatharth1706 Feb 13, 2023
b1217a7
fix: add required parameter t and error to input
ArmanNik Feb 13, 2023
b0bb46a
Merge pull request #287 from yatharth1706/fix-5009-fix-bug-of-enum-at…
TorstenDittmann Feb 13, 2023
9b2324d
fix: user popover spacing
TGlide Feb 13, 2023
0ebc3f0
refactor: multiple design review changes
TGlide Feb 13, 2023
460df25
refactor: max file size default unit
TGlide Feb 13, 2023
122446a
refactor: improve logic on input values with different units
TGlide Feb 13, 2023
7772703
test: improve vite config
TorstenDittmann Feb 13, 2023
dbec779
fix: some small bugs
TorstenDittmann Feb 14, 2023
4d4f79f
Merge pull request #289 from appwrite/feat-track-error-events
TorstenDittmann Feb 14, 2023
9d1c801
Merge branch 'main' into fix-function-and-more
TorstenDittmann Feb 14, 2023
dda54b0
Merge pull request #284 from appwrite/fix-function-and-more
TorstenDittmann Feb 14, 2023
c2c752e
Merge pull request #291 from appwrite/fix/user-popover-design-issues
TorstenDittmann Feb 14, 2023
99772f4
Merge pull request #294 from appwrite/test-improve-config
TorstenDittmann Feb 14, 2023
550817b
fix: spacing functions title
ArmanNik Feb 14, 2023
91352f9
feat: track custom id usage
TorstenDittmann Feb 14, 2023
b46a612
feat: new events
TorstenDittmann Feb 14, 2023
33b5f8e
test: skip tracking for tests
TorstenDittmann Feb 14, 2023
a00931d
Merge pull request #296 from appwrite/chore-add-more-events
TorstenDittmann Feb 14, 2023
9f846fc
Merge pull request #295 from appwrite/fix-spacing-functions-title
TorstenDittmann Feb 14, 2023
1454b1f
Merge pull request #262 from appwrite/refactor-activity-page
TorstenDittmann Feb 14, 2023
23434aa
fix: alignment, and file link
ArmanNik Feb 14, 2023
244eea9
fix: copy input alignment
ArmanNik Feb 14, 2023
a0733be
Merge pull request #297 from appwrite/fix-url-and-alignment
TorstenDittmann Feb 14, 2023
c13e0e1
Merge branch 'main' into refactor/database-forms-design-review
TGlide Feb 14, 2023
6b1c63a
fix: flutter only persisting once
TGlide Feb 14, 2023
30a5bab
fix: persistence across flutter and apple platform creation
TGlide Feb 14, 2023
941dbb8
Merge pull request #292 from appwrite/refactor/database-forms-design-…
TorstenDittmann Feb 14, 2023
fcf9ecb
Merge pull request #256 from appwrite/fix/flutter-wizard-step-persist…
TorstenDittmann Feb 14, 2023
a1335df
feat: system service
TorstenDittmann Feb 14, 2023
0950c86
fix: convert nullish to undefined
TorstenDittmann Feb 14, 2023
33cc265
refactor: createValueUnitPair helper
TGlide Feb 14, 2023
5be81fc
Merge pull request #298 from appwrite/feat-environment-service
TorstenDittmann Feb 14, 2023
58ec0f1
fix: createValueUnitPair tests
TGlide Feb 14, 2023
7701b25
refactor: reduce valueUnitPair usage lines
TGlide Feb 14, 2023
34652b4
Merge branch 'main' into refactor/more-default-units
TGlide Feb 14, 2023
a9b55dc
refactor: modularize predefined valueUnitPairs; add minimum value con…
TGlide Feb 14, 2023
5d3198f
refactor: add min to units inputs
TGlide Feb 14, 2023
2456d8f
Merge pull request #293 from appwrite/refactor/more-default-units
TorstenDittmann Feb 14, 2023
0e1118c
fix: remove autofocus account name
ArmanNik Feb 15, 2023
294907e
feat: implement cloud
TorstenDittmann Feb 15, 2023
f53edc2
fix: remove unused `Projects` service from project sdk
TorstenDittmann Feb 15, 2023
0448fef
Revert "fix: remove unused `Projects` service from project sdk"
TorstenDittmann Feb 15, 2023
4c93d23
fix: remove unused `Projects` service from project sdk
TorstenDittmann Feb 15, 2023
ca08b53
Merge pull request #300 from appwrite/fix-autofocus-account-name
TorstenDittmann Feb 15, 2023
77ba318
fix: usage
TorstenDittmann Feb 15, 2023
fcba38b
fix: file name alignment
ArmanNik Feb 15, 2023
8346d94
feat: show appwrite version
TGlide Feb 15, 2023
6818598
Merge branch 'main' into feat/footer
TGlide Feb 15, 2023
8f2abfa
fix: footer mode check
TGlide Feb 15, 2023
7b0679c
fix: membership and sessions empty state
ArmanNik Feb 16, 2023
feab06f
fix: remove avatars from database settings
TGlide Feb 16, 2023
143b65c
fix: warning modal avatar color
TGlide Feb 16, 2023
a35fdf0
Fixed macOS casing
eldadfux Feb 17, 2023
94a4a40
fix: api key custom date required
ArmanNik Feb 17, 2023
d927a99
fix: use singular instead of plural
felix-d1strict Feb 18, 2023
fc71b38
fix states reset issue
yatharth1706 Feb 19, 2023
2d050a6
Fix sdk changes
Meldiron Feb 20, 2023
15cba65
Update functions modal & response
Meldiron Feb 20, 2023
267216a
Add function URL
Meldiron Feb 20, 2023
cc84474
Upgrade sdk, use new url
Meldiron Feb 20, 2023
4da4cd6
feat: update endpoint
christyjacob4 Feb 22, 2023
6f69d2c
feat: update endpoint
christyjacob4 Feb 22, 2023
3972760
feat: remove gitpod file
christyjacob4 Feb 22, 2023
a9c8274
Merge pull request #308 from appwrite/feat-fix-macos-case
TorstenDittmann Feb 23, 2023
3189f09
Merge pull request #310 from felix-d1strict/fix-5139-use-singular-ins…
TorstenDittmann Feb 23, 2023
cea85ac
fix: falsy values showing up as n/a
TGlide Feb 23, 2023
d3381b9
refactor: endpoint constant on footer
TGlide Feb 23, 2023
5834acf
tests: disable audit for now
TorstenDittmann Feb 24, 2023
007bcc5
Add function logging
Meldiron Feb 24, 2023
8db22d1
Merge pull request #321 from appwrite/tests-audit-level
TorstenDittmann Feb 24, 2023
885fdfd
Merge pull request #319 from appwrite/fix/falsy-values-shown-as-n/a
TorstenDittmann Feb 24, 2023
ded5f0a
Merge branch 'main' of https://github.com/appwrite/appwrite-console-p…
TorstenDittmann Feb 24, 2023
034150b
Merge pull request #301 from appwrite/feat-cloud
TorstenDittmann Feb 24, 2023
89ea4a8
Merge branch 'main' of https://github.com/appwrite/appwrite-console-p…
TorstenDittmann Feb 24, 2023
5bac253
fix: endpoint export from main
TorstenDittmann Feb 24, 2023
8f15dee
Merge pull request #249 from appwrite/feat/footer
TorstenDittmann Feb 24, 2023
7bcb0c7
feat: lr for cloud
TorstenDittmann Feb 24, 2023
407c9a8
fix: respect dnt
TorstenDittmann Feb 24, 2023
fbb91b5
remove unused import
TorstenDittmann Feb 24, 2023
1ebc993
Merge pull request #305 from appwrite/fix/remove-databases-avatars
TorstenDittmann Feb 24, 2023
0a26688
Merge pull request #304 from appwrite/fix-empty-state-membership
TorstenDittmann Feb 24, 2023
e450233
Merge pull request #307 from appwrite/fix/warning-modals-color
TorstenDittmann Feb 24, 2023
729493b
Merge pull request #303 from appwrite/fix-file-name-alignment
TorstenDittmann Feb 24, 2023
4711621
Merge pull request #309 from appwrite/fix-custom-date-api-key
TorstenDittmann Feb 24, 2023
88983ee
fix: footer github link
TorstenDittmann Feb 26, 2023
7d9b976
Support new execution model
Meldiron Feb 27, 2023
3290ce0
Update executions UI
Meldiron Feb 27, 2023
8e8186b
Update to new specs
Meldiron Feb 27, 2023
a247231
docs: add steps for project development setup
saurabhmehta1601 Feb 28, 2023
5f30a34
Improved headers UI
Meldiron Feb 28, 2023
830dce6
Removed log
Meldiron Feb 28, 2023
b7cab43
Update CONTRIBUTING.md
saurabhmehta1601 Feb 28, 2023
06d3530
Merge pull request #323 from appwrite/fix-footer-link
TorstenDittmann Mar 1, 2023
ac2b8d0
Merge pull request #325 from saurabhmehta1601/docs-324-add-project-se…
TorstenDittmann Mar 1, 2023
c4f7b44
Merge pull request #311 from yatharth1706/fix-5133-states-were-not-ge…
TorstenDittmann Mar 1, 2023
a085d75
feat: auto fill invite code
christyjacob4 Mar 2, 2023
668424a
Merge pull request #326 from appwrite/feat-autofill-invite-code
TorstenDittmann Mar 2, 2023
a0dfd89
fix: env condition
TorstenDittmann Mar 6, 2023
2a01dc8
Update console for new rules
Meldiron Mar 8, 2023
b81ae52
hide stuff
TorstenDittmann Mar 9, 2023
9c7d530
fix: add private to tiles
TorstenDittmann Mar 9, 2023
873de31
Merge pull request #322 from appwrite/feat-cloud-lr
TorstenDittmann Mar 9, 2023
9c56047
fix: table center for memberships
TorstenDittmann Mar 9, 2023
1218eca
fix: make execution logs private
TorstenDittmann Mar 9, 2023
cad6f3b
Merge pull request #331 from appwrite/fix-private-executions
TorstenDittmann Mar 9, 2023
d07a6d9
Function domains
Meldiron Mar 10, 2023
5bfe688
Domains component; re-impoement project domains
Meldiron Mar 10, 2023
884a5ba
Static code analysis
Meldiron Mar 10, 2023
5cebe87
Improve domains component UI
Meldiron Mar 10, 2023
7d70619
Shared variables support
Meldiron Mar 11, 2023
f0a977e
Improve UI with design feedback, add logs, fix realtime rules
Meldiron Mar 14, 2023
3f08894
review changes
Meldiron Mar 15, 2023
a1184fc
Add function entrypoint
Meldiron Mar 16, 2023
33b7582
Rename env vars
Meldiron Mar 24, 2023
863a512
custom commands support
Meldiron Mar 29, 2023
0476e1a
Add GitHub OAuth
Meldiron Apr 19, 2023
1467d4f
feat: add cloud beta card page
TGlide Apr 21, 2023
fbd62e0
refactor: beta card adjustments & light mode
TGlide Apr 24, 2023
c24af10
feat: responsive
TGlide Apr 24, 2023
58143b2
refactor: change cloud-beta-card root dir
TGlide Apr 24, 2023
b9cf923
fix: cloud beta card route
TGlide Apr 24, 2023
4e53fb1
Merge remote-tracking branch 'origin/feat-oauth' into feat/cloud-beta…
TGlide Apr 26, 2023
5a63f61
feat: get cloud cards from backend
TGlide Apr 26, 2023
5fe587c
feat: beta signup page desktop
TGlide Apr 26, 2023
8a6be9e
feat: floating signup clouds
TGlide Apr 26, 2023
6fe56ce
feat: cloud signup page
TGlide Apr 26, 2023
1e973d8
feat: style github link
TGlide Apr 27, 2023
5c5a09c
feat: claim your card btn
TGlide Apr 27, 2023
11c81c2
refactor: header animation
TGlide Apr 27, 2023
1cd5b83
refactor(wip): card routes
TGlide Apr 28, 2023
a400882
feat: shareable card link
TGlide Apr 28, 2023
9a876bd
feat: embed cloud card code
TGlide Apr 28, 2023
5272eef
feat: tweet it btn
TGlide Apr 28, 2023
100507a
fix: light theme stuff
TGlide Apr 28, 2023
c12b4b0
refactor: prefers reduced motion
TGlide Apr 28, 2023
d52e6af
chore: force redeploy
TGlide Apr 28, 2023
833d950
refactor: small changes
TGlide Apr 28, 2023
aef7607
feat: github btn styling
TGlide Apr 28, 2023
0b5fbf3
chore: force redeploy
TGlide Apr 28, 2023
9557e93
fix: GitHub naming
TGlide Apr 28, 2023
392ee06
feat: card seo
TGlide Apr 28, 2023
f44b51c
chore: remove mocked card
TGlide Apr 28, 2023
091c63a
fix: seo
TGlide Apr 28, 2023
b86d002
fix: broken build
TGlide Apr 28, 2023
e5043d0
fix: cloud card endpoint
TGlide Apr 28, 2023
8934b00
feat: trigger card page on first login
TGlide Apr 29, 2023
16329ef
refactor: cloud design review
TGlide Apr 30, 2023
cab6258
fix(WIP): desgin review stuff
TGlide May 1, 2023
af23c0d
refactor: cloud card unique url
TGlide May 1, 2023
d656fbd
fix: merge conflicts
TGlide May 1, 2023
da2c08c
refactor: twitter text and og img
TGlide May 1, 2023
2da529e
Fix text copy
Meldiron May 1, 2023
03065f7
feat: card noref
TGlide May 1, 2023
d983954
Merge branch 'cloud-cards' of https://github.com/appwrite/console int…
TGlide May 1, 2023
008b2c8
refactor: improve chrome quality
TGlide May 1, 2023
5a2d0db
fix: card loading
TGlide May 1, 2023
e6000a2
refactor: reduce card size
TGlide May 1, 2023
b4c3462
refactor: small design review changes
TGlide May 2, 2023
a0e6b7e
Merge pull request #426 from appwrite/fix/console-design-review
christyjacob4 May 2, 2023
9bff6df
feat-cloud-gtm
ArmanNik May 2, 2023
34f115d
Merge pull request #427 from appwrite/feat-cloud-gtm
TorstenDittmann May 2, 2023
73b87ad
fix: small fixes
TGlide May 2, 2023
96869ef
fix: remove unwanted file
TGlide May 2, 2023
834d0ca
Merge pull request #428 from appwrite/fix/console-design-review
christyjacob4 May 2, 2023
a54ce32
Update UI to new API
Meldiron May 11, 2023
71bbcca
feat: create hackathon page and update card page
ArmanNik May 15, 2023
3464146
Merge pull request #441 from appwrite/cloud-hackathon
christyjacob4 May 15, 2023
e6ffbd7
fix: review from Christy
ArmanNik May 15, 2023
3832577
fix: design review
ArmanNik May 16, 2023
e51d68b
feat: update prize money
christyjacob4 May 16, 2023
3a0c8f0
feat: update tweet
christyjacob4 May 17, 2023
1537bc1
Update package.json
Meldiron May 22, 2023
6a37168
Update package-lock.json
Meldiron May 22, 2023
92be261
Apply Kuhshboo's changes from feat-vcs branch
Meldiron May 22, 2023
70ac004
Fix missing import
Meldiron May 22, 2023
dd6555a
Fix bugs in Git
Meldiron May 22, 2023
5bfc75e
Implement new git abilities
Meldiron May 25, 2023
9c19f27
Merge branch 'cloud-cards' into feat-git-integration
Meldiron May 27, 2023
5e6c6ec
Fixes after merge
Meldiron May 27, 2023
a0f89b5
Revert "Fixes after merge"
Meldiron May 27, 2023
2f4e160
Revert "Merge branch 'cloud-cards' into feat-git-integration"
Meldiron May 27, 2023
4293825
Silent mode, root directory support
Meldiron Jun 7, 2023
265fb01
Remove branch dropdown
Meldiron Jun 9, 2023
9d2558c
Fix disconnect rerender
Meldiron Jun 9, 2023
86b4fab
Fix disconnect bug, add realtime logs
Meldiron Jun 14, 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
15 changes: 8 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"node": ">=16"
},
"scripts": {
"dev": "vite dev",
"dev": "vite dev --host 0.0.0.0",
"build": "vite build",
"preview": "vite preview",
"sync": "svelte-kit sync",
Expand All @@ -21,7 +21,7 @@
"dependencies": {
"@analytics/google-analytics": "^1.0.5",
"analytics": "^0.8.1",
"@aw-labs/appwrite-console": "^13.1.0",
"@aw-labs/appwrite-console": "npm:matej-appwrite-console@7.1.74",
"@aw-labs/icons": "0.0.0-77",
"@aw-labs/ui": "0.0.0-77",
"@popperjs/core": "^2.11.6",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/cardGrid.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</div>
</div>
{#if $$slots.actions}
<div class="common-section card-separator u-flex u-main-end">
<div class="common-section card-separator u-flex u-main-end u-gap-8">
<slot name="actions" />
</div>
{/if}
Expand Down
16 changes: 15 additions & 1 deletion src/lib/components/code.svelte
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
<script lang="ts">
import { Pill } from '$lib/elements';
import Prism from 'prismjs';
import 'prismjs/components/prism-ruby';
import 'prismjs/components/prism-dart';
import 'prismjs/components/prism-kotlin';
import 'prismjs/components/prism-python';
import 'prismjs/components/prism-javascript';
import 'prismjs/components/prism-json';
import 'prismjs/components/prism-bash';
import 'prismjs/components/prism-yaml';
Expand All @@ -16,7 +19,18 @@
export let label: string = null;
export let labelIcon: 'code' | 'android' | 'flutter' | 'apple' = null;
export let code: string;
export let language: 'js' | 'html' | 'dart' | 'kotlin' | 'json' | 'sh' | 'yml' | 'swift';
export let language:
| 'js'
| 'html'
| 'dart'
| 'ruby'
| 'python'
| 'php'
| 'kotlin'
| 'json'
| 'sh'
| 'yml'
| 'swift';
export let withLineNumbers = false;
export let withCopy = false;
export let noMargin = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { beforeNavigate, invalidate } from '$app/navigation';
import { wizard } from '$lib/stores/wizard';
import type { WizardStepsType } from '$lib/layout/wizard.svelte';
import { domain } from './wizard/store';
import { rule, ruleResource } from './wizard/store';
import Step1 from './wizard/step1.svelte';
import Step2 from './wizard/step2.svelte';
import Step3 from './wizard/step3.svelte';
Expand All @@ -12,15 +12,16 @@
import { Dependencies } from '$lib/constants';

onDestroy(() => {
domain.set({ $id: '', domain: '' });
rule.set({ $id: '', domain: '' });
ruleResource.set({ type: '', id: '' });
});

beforeNavigate(() => {
wizard.hide();
});

function onFinish() {
invalidate(Dependencies.DOMAINS);
invalidate(Dependencies.RULES);
wizard.hide();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
<script lang="ts">
import { invalidate } from '$app/navigation';
import { trackEvent } from '$lib/actions/analytics';
import { Modal } from '$lib/components';
import { Dependencies } from '$lib/constants';
import { Button } from '$lib/elements/forms';
import { project } from '../../store';
import { sdkForConsole } from '$lib/stores/sdk';
import { addNotification } from '$lib/stores/notifications';
import { invalidate } from '$app/navigation';
import { Dependencies } from '$lib/constants';
import { sdkForProject } from '$lib/stores/sdk';
import type { Models } from '@aw-labs/appwrite-console';
import { trackEvent } from '$lib/actions/analytics';

export let showDelete = false;
export let selectedDomain: Models.Domain;
export let selectedRule: Models.ProxyRule = null;

const deleteDomain = async () => {
const handleSubmit = async () => {
try {
await sdkForConsole.projects.deleteDomain($project.$id, selectedDomain.$id);
invalidate(Dependencies.DOMAINS);
await sdkForProject.proxy.deleteRule(selectedRule.$id);
await invalidate(Dependencies.RULES);
showDelete = false;
addNotification({
type: 'success',
message: `${selectedDomain.domain} has been deleted`
message: `Domain has been deleted`
});
trackEvent('submit_domain_delete');
trackEvent('submit_rule_delete');
} catch (error) {
addNotification({
type: 'error',
Expand All @@ -31,13 +30,9 @@
};
</script>

<Modal bind:show={showDelete} on:submit={deleteDomain} warning>
<Modal bind:show={showDelete} on:submit={handleSubmit} warning>
<svelte:fragment slot="header">Delete Domain</svelte:fragment>
{#if selectedDomain}
<p>
Are you sure you want to delete <b>{selectedDomain.domain}</b> from '{$project.name}'?
</p>
{/if}
<p>Are you sure you want to delete this domain?</p>
<svelte:fragment slot="footer">
<Button text on:click={() => (showDelete = false)}>Cancel</Button>
<Button secondary submit>Delete</Button>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<script lang="ts">
import { page } from '$app/stores';
import { Empty, Heading } from '$lib/components';
import { Pill } from '$lib/elements';
import { Button } from '$lib/elements/forms';
Expand All @@ -12,114 +11,142 @@
TableRow,
TableScroll
} from '$lib/elements/table';
import { sdkForProject } from '$lib/stores/sdk';
import { Container } from '$lib/layout';
import { addNotification } from '$lib/stores/notifications';
import { sdkForConsole } from '$lib/stores/sdk';
import { wizard } from '$lib/stores/wizard';
import { invalidate } from '$app/navigation';
import { Dependencies } from '$lib/constants';
import type { Models } from '@aw-labs/appwrite-console';
import type { PageData } from './$types';
import Create from '../create.svelte';
import Delete from '../delete.svelte';
import Create from './create.svelte';
import Delete from './delete.svelte';
import { trackEvent } from '$lib/actions/analytics';
import { ruleResource } from './wizard/store';
import Logs from './logs.svelte';

export let data: PageData;
export let rules: Models.ProxyRuleList;
export let resourceType: string;
export let resourceId: string;

const projectId = $page.params.project;
const target = window?.location.hostname ?? '';
let showDelete = false;
let selectedDomain: Models.Domain;
let showLogs = false;
let selectedRule: Models.ProxyRule;
let isVerifying = {};

const openWizard = () => {
$ruleResource = {
type: resourceType,
id: resourceId
};

wizard.start(Create);
};

const refreshDomain = async (domain: Models.Domain) => {
const domainId = domain.$id;
const refreshDomain = async (rule: Models.ProxyRule) => {
const ruleId = rule.$id;
try {
isVerifying[domainId] = true;
isVerifying[ruleId] = true;

if (domain.verification) {
invalidate(Dependencies.DOMAINS);
if (rule.status === 'verified') {
invalidate(Dependencies.RULES);
return;
}
await sdkForConsole.projects.updateDomainVerification(projectId, domainId);
invalidate(Dependencies.DOMAINS);

await sdkForProject.proxy.updateRuleVerification(ruleId);
invalidate(Dependencies.RULES);
trackEvent('submit_domain_update_verification');
} catch (error) {
addNotification({
message: error.message,
type: 'error'
});
} finally {
isVerifying[domainId] = false;
isVerifying[ruleId] = false;
}
};
</script>

<Container>
<div class="u-flex u-gap-12 common-section u-main-space-between">
<Heading tag="h2" size="5">Custom Domains</Heading>
<Heading tag="h2" size="5">Domains</Heading>

<Button on:click={openWizard}>
<span class="icon-plus" aria-hidden="true" /> <span class="text">Create domain</span>
</Button>
</div>
{#if data.domains.total}
{#if rules.total}
<TableScroll>
<TableHeader>
<TableCellHead width={150}>Domain Name</TableCellHead>
<TableCellHead width={100} />
<TableCellHead width={60}>Type</TableCellHead>
<TableCellHead width={90}>Name</TableCellHead>
<TableCellHead width={90}>Value</TableCellHead>
<TableCellHead width={40} />
<TableCellHead width={300}>Domain Name</TableCellHead>
<TableCellHead width={100}>Status</TableCellHead>
<TableCellHead width={150} />
<TableCellHead width={40}>Actions</TableCellHead>
</TableHeader>
<TableBody>
{#each data.domains.domains as domain}
{#each rules.rules as rule}
<TableRow>
<TableCellText title="Domain">
{domain.domain}
<div class="u-flex u-flex-horizontal u-cross-center u-gap-4">
<p>{rule.domain}</p>
<div style="--p-button-size: var(--button-size, 2.0rem);">
<a
class="is-text is-only-icon button"
href={`//${rule.domain}`}
target="_blank"
rel="noreferrer"
><span class="icon-external-link" aria-hidden="true" /></a>
</div>
</div>
</TableCellText>
<TableCellText title="Status">
<Pill warning={!domain.verification} success={domain.verification}>
{domain.verification ? 'verified' : 'unverified'}
<Pill
danger={rule.status === 'unverified'}
success={rule.status === 'verified'}
info={rule.status === 'created' || rule.status === 'verifying'}>
{rule.status}
</Pill>
</TableCellText>
<TableCellText title="Type">CNAME</TableCellText>
<TableCellText title="Name">
{domain.domain}
</TableCellText>
<TableCellText title="Name">
{target}
</TableCellText>
<TableCell />

<TableCell title="Actions">
<div class="u-flex u-gap-8 u-cross-center u-main-end">
{#if isVerifying[domain.$id]}
{#if rule.status === 'verifying' || isVerifying[rule.$id]}
<!-- TODO: remove inline styles -->
<div
class="loader"
style="color: hsl(var(--color-neutral-50)); inline-size: 1.25rem; block-size: 1.25rem" />
{:else if !domain.certificateId}
{:else if rule.status === 'unverified' || rule.status === 'created'}
<!-- TODO: remove inline styles -->
<button
class="button is-text is-only-icon u-padding-inline-0"
style="--p-button-size: var(--button-size, 2.0rem);"
aria-label="Verify item"
on:click={() => refreshDomain(domain)}>
<span class="icon-refresh" aria-hidden="true" />
on:click={() => refreshDomain(rule)}>
<span class="icon-key" aria-hidden="true" />
</button>
{/if}
{#if rule.status === 'unverified' || rule.status === 'verified'}
<!-- TODO: remove inline styles -->
<button
class="button is-text is-only-icon u-padding-inline-0"
style="--p-button-size: var(--button-size, 2.0rem);"
aria-label="Verify item"
on:click={() => {
showLogs = true;
selectedRule = rule;
}}>
<span class="icon-terminal" aria-hidden="true" />
</button>
{/if}

<!-- TODO: remove inline styles -->
<button
class="button tooltip is-text is-only-icon u-padding-inline-0"
style="--p-button-size: var(--button-size, 2.0rem);"
aria-label="Delete item"
on:click={async () => {
showDelete = true;
selectedDomain = domain;
selectedRule = rule;
}}>
<span class="icon-trash" aria-hidden="true" />
<span class="tooltip-popup is-bottom" role="tooltip">
Expand All @@ -141,4 +168,6 @@
{/if}
</Container>

<Delete bind:showDelete bind:selectedDomain />
<Delete bind:showDelete bind:selectedRule />

<Logs bind:showLogs logs={selectedRule?.logs ? selectedRule?.logs : 'No logs recorded.'} />
19 changes: 19 additions & 0 deletions src/lib/components/domains/logs.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<script lang="ts">
import { Modal } from '$lib/components';
import Code from '$lib/components/code.svelte';
import { Button } from '$lib/elements/forms';

export let showLogs = false;
export let logs: string;
</script>

<Modal bind:show={showLogs}>
<svelte:fragment slot="header">Certificate Logs</svelte:fragment>
<p>Logs from the process of certificate generation with LetsEncrypt and Certbot.</p>

<Code withLineNumbers withCopy language="sh" code={logs} />

<svelte:fragment slot="footer">
<Button text on:click={() => (showLogs = false)}>Close</Button>
</svelte:fragment>
</Modal>
Loading