Skip to content
This repository was archived by the owner on May 13, 2018. It is now read-only.

Commit f227a37

Browse files
committed
かなり修正出来た。
1 parent 2fca911 commit f227a37

6 files changed

Lines changed: 202 additions & 115 deletions

File tree

DB考察.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Root
33
> xxxxxxxx
44
> gplusName: String
55
> gplusPhoto: URLString
6+
> userName: String
67
> detail: String
78
> links: Array<Object>
89
> [0]
@@ -38,6 +39,7 @@ Root
3839
> uid: UID
3940
> content: String
4041
> createdAt: DateString
42+
> plusCount: Number
4143

4244
> 1
4345
> ...

Dialog.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ window.addEventListener("DOMContentLoaded", () => {
1919
}
2020
});
2121

22+
23+
2224
DOM("#Dialogs_Thread_InfoInputer_Btns_OK").addEventListener("click", () => {
2325
base.Database.transaction("threads", (res) => {
2426
let now = new Date().getTime();
@@ -45,13 +47,19 @@ window.addEventListener("DOMContentLoaded", () => {
4547
{
4648
uid: base.user.uid,
4749
content: DOM("#Dialogs_Thread_InfoInputer_Content_Name_Input").value,
50+
plusCount: 0,
4851
createdAt: now
4952
}
5053
]
5154
});
55+
56+
DOM("#Dialogs_Thread_InfoInputer").close();
57+
parent.document.querySelector("IFrame.mdl-layout__content").src = "Thread/Viewer/?tid=" + res.length;
5258
});
5359
});
5460

61+
62+
5563
DOM("#Dialogs_Thread_Poster_Content_Value_Input").addEventListener("input", (event) => {
5664
if (event.target.value.replace(/\s/g, "").length == 0) {
5765
DOM("#Dialogs_Thread_Poster_Btns_OK").classList.add("mdl-button--disabled");
@@ -70,9 +78,14 @@ window.addEventListener("DOMContentLoaded", () => {
7078
base.Database.set("threads/" + DOM("#Dialogs_Thread_Poster_Content_TID").value + "/data/" + res.length, {
7179
uid: base.user.uid,
7280
content: DOM("#Dialogs_Thread_Poster_Content_Value_Input").value,
81+
plusCount: 0,
7382
createdAt: new Date().getTime()
7483
});
7584

85+
DOM("#Dialogs_Thread_Poster_Btns_OK").classList.add("mdl-button--disabled"),
86+
DOM("#Dialogs_Thread_Poster_Content_Value").classList.remove("is-dirty"),
87+
DOM("#Dialogs_Thread_Poster_Content_Value_Input").value = "";
88+
7689
DOM("#Screens_Loading").setAttribute("Disabled", "");
7790
DOM("#Dialogs_Thread_Poster").close();
7891
});

Profile/Profile.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@ window.addEventListener("DOMContentLoaded", () => {
22
if (!base.user) {
33
location.href = "/SimpleThread/Error/401/";
44
}
5-
6-
DOM("#Profile_Info_Name").classList.add("is-dirty"),
7-
DOM("#Profile_Info_Name_Input").value = base.user.displayName;
85

96
base.Database.get(base.Database.INTERVAL, "users/" + base.user.uid, (res) => {
107
res.links = res.links || [];
118

9+
DOM("#Profile_Info_Name").classList.add("is-dirty"),
10+
DOM("#Profile_Info_Name_Input").value = res.userName;
1211
DOM("#Profile_Info_Detail").classList.add("is-dirty"),
1312
DOM("#Profile_Info_Detail_Input").value = res.detail;
1413

@@ -38,9 +37,8 @@ window.addEventListener("DOMContentLoaded", () => {
3837

3938

4039
DOM("#Profile_Info_Btns_Apply").addEventListener("click", () => {
41-
base.user.updateProfile({ displayName: DOM("#Profile_Info_Name_Input").value });
42-
4340
base.Database.update("users/" + base.user.uid, {
41+
userName: DOM("#Profile_Info_Name_Input").value,
4442
detail: DOM("#Profile_Info_Detail_Input").value,
4543

4644
links: (() => {

Thread/Viewer/Viewer.css

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ Div[UUID="Thread_Post_Header"] > * {
1313
Font-Size: Medium;
1414
}
1515

16+
A[UUID="Thread_Post_Header_ActorPhoto"] {
17+
Background: Transparent Center / Cover;
18+
}
19+
20+
A[UUID="Thread_Post_Header_ActorPhoto"][Disabled] {
21+
Display: None;
22+
}
23+
1624
Span[UUID="Thread_Post_Header_Actor"] {
1725
Align-Self: Auto;
1826

@@ -24,6 +32,17 @@ Span[UUID="Thread_Post_Header_CreatedAt"] {
2432
Font-Size: 80%;
2533
}
2634

35+
Button[UUID="Thread_Post_Actions_Plus_Btn"] {
36+
Margin-Right: 0.5rem;
37+
}
38+
39+
Span[UUID="Thread_Post_Actions_Plus_Count"] {
40+
Vertical-Align: Middle;
41+
42+
Color: Gray;
43+
Font-Size: 14px;
44+
}
45+
2746

2847

2948
#FlowPanel {

0 commit comments

Comments
 (0)