forked from microsoft/pxt
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcloud.ts
More file actions
66 lines (64 loc) · 2.14 KB
/
cloud.ts
File metadata and controls
66 lines (64 loc) · 2.14 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
58
59
60
61
62
63
64
65
66
namespace pxt.cloud {
export type CloudStatus = "none" | "synced" | "justSynced" | "offline" | "syncing" | "conflict" | "localEdits";
export type CloudStatusInfo = {
value: pxt.cloud.CloudStatus,
icon?: string,
tooltip?: string,
shortStatus?: string,
longStatus?: string,
indicator?: string
};
export const cloudStatus: { [index in pxt.cloud.CloudStatus]: CloudStatusInfo } = {
"none": {
value: "none",
},
"synced": {
value: "synced",
icon: "cloud-saved-b",
tooltip: lf("Project saved to cloud"),
shortStatus: lf("saved"),
longStatus: lf("Saved to cloud"),
indicator: "",
},
["justSynced"]: {
value: "justSynced",
icon: "cloud-saved-b",
tooltip: lf("Project saved to cloud"),
shortStatus: lf("saved!"),
longStatus: lf("Saved to cloud!"),
indicator: "",
},
["offline"]: {
value: "offline",
icon: "cloud-error-b",
tooltip: lf("Unable to connect to cloud"),
shortStatus: lf("offline"),
longStatus: lf("Offline"),
indicator: lf("offline"),
},
["syncing"]: {
value: "syncing",
icon: "cloud-saving-b",
tooltip: lf("Saving project to cloud..."),
shortStatus: lf("saving..."),
longStatus: lf("Saving to cloud..."),
indicator: lf("syncing..."),
},
["conflict"]: {
value: "conflict",
icon: "cloud-error-b",
tooltip: lf("Project was edited in two places and the changes conflict"),
shortStatus: lf("conflict!"),
longStatus: lf("Project has a conflict!"),
indicator: "!"
},
["localEdits"]: {
value: "localEdits",
icon: "cloud-saving-b",
tooltip: lf("Saving project to the cloud..."),
shortStatus: lf("saving..."),
longStatus: lf("Saving to cloud..."),
indicator: "*"
},
};
}