-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.ftd
More file actions
57 lines (33 loc) · 1.09 KB
/
index.ftd
File metadata and controls
57 lines (33 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
-- import: trizwit.github.io/todoapp/pages/home
-- import: fastn/processors as pr
-- auth-resolver:
;; after modification from web-component
;; -- ftd.text: $current-user.picture
;; if: { current-user != NULL }
;; color: red
-- home.page:
-- record user-credentials:
optional string name:
optional string picture:
optional string email:
optional string access_token:
-- user-credentials $current-user:
name: *$ftd.empty
picture: *$ftd.empty
email: *$ftd.empty
access_token: *$ftd.empty
-- web-component auth-resolver:
js: $assets.files.backend.auth.js
user-credentials $current-user: $current-user
;; -- void get-data(user):
;; user-credentials $user:
;; name = ftd.local_storage.get("name", "Universe");
;; __args__.user.set(name || "Empty");
;; email = ftd.local_storage.get("email", "Universe");
;; __args__.user.set(email || "Empty");
;; picture = ftd.local_storage.get("picture", "Universe");
;; __args__.user.set(picture || "Empty");
;; access_token = ftd.local_storage.get("access_token", "Universe");
;; __args__.user.set(access_token || "Empty");
;; -- ftd.text: helo world
;; color: red