Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
chat_webview
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abookCommunication
chat_webview
Commits
8fc5ddaf
Commit
8fc5ddaf
authored
Feb 18, 2021
by
Lee Munkyeong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
チャット詳細実装
parent
b994ba6e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
153 additions
and
81 deletions
+153
-81
public/css/chat.css
+23
-0
public/index.html
+8
-3
public/js/chat-db.js
+30
-2
public/js/chat-ui.js
+90
-75
public/js/chat-websocket.js
+2
-1
No files found.
public/css/chat.css
View file @
8fc5ddaf
...
@@ -680,3 +680,25 @@ a.article:hover {
...
@@ -680,3 +680,25 @@ a.article:hover {
#errorEnd
{
#errorEnd
{
margin-top
:
15vh
;
margin-top
:
15vh
;
}
}
.collapsible
{
height
:
40px
;
background-color
:
#eee
;
color
:
#444
;
cursor
:
pointer
;
width
:
100%
;
border
:
none
;
text-align
:
left
;
outline
:
none
;
font-size
:
15px
;
}
.collapsible-active
,
.collapsible
:hover
{
background-color
:
#ccc
;
}
.collapsible-content
{
display
:
none
;
overflow
:
hidden
;
background-color
:
#f1f1f1
;
}
\ No newline at end of file
public/index.html
View file @
8fc5ddaf
...
@@ -236,10 +236,15 @@
...
@@ -236,10 +236,15 @@
</div>
</div>
<div
id=
"my_info"
class=
"inbox_user row"
>
<div
id=
"my_info"
class=
"inbox_user row"
>
</div>
</div>
<div
id=
"favorite_list"
class=
"inbox_user row"
>
<div
class=
"collapsible-content"
>
<div
id=
"favorite_list"
class=
"inbox_user row"
>
</div>
</div>
</div>
<div
id=
"my_group_list"
class=
"inbox_user row"
>
<div
class=
"collapsible-content"
>
<div
id=
"my_group_list"
class=
"inbox_user row"
>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -354,7 +359,7 @@
...
@@ -354,7 +359,7 @@
</li>
</li>
</ul>
</ul>
</div>
</div>
<nav
class=
"navbar navbar-expand navbar-dark fixed-bottom flex-md-nowrap p-2 bg-footer talign-center border footer-nav"
>
<nav
class=
"navbar navbar-expand navbar-dark fixed-bottom flex-md-nowrap p-2 bg-footer talign-center border footer-nav"
id=
"bottomNav"
>
<div
class=
"col-4"
>
<div
class=
"col-4"
>
<img
src=
"./icon/ic_communication_meeting_gray.png"
style=
"width: 35%;"
id=
"contactButton"
>
<img
src=
"./icon/ic_communication_meeting_gray.png"
style=
"width: 35%;"
id=
"contactButton"
>
</div>
</div>
...
...
public/js/chat-db.js
View file @
8fc5ddaf
...
@@ -13,11 +13,38 @@ CHAT_DB.getRoomList = function(input) {
...
@@ -13,11 +13,38 @@ CHAT_DB.getRoomList = function(input) {
};
};
//ロカールDBからログインしたユーザのデータを取得する。
//ロカールDBからログインしたユーザのデータを取得する。
CHAT_DB
.
getMy
i
nfo
=
function
(
input
)
{
CHAT_DB
.
getMy
I
nfo
=
function
(
input
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
if
(
CHAT_UTIL
.
isIOS
())
{
//TODO IOS処理追加必要
//TODO IOS処理追加必要
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getMyinfo
());
return
JSON
.
parse
(
android
.
getMyInfo
());
}
};
CHAT_DB
.
getMessages
=
function
(
roomId
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
//TODO IOS処理追加必要
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getMessageList
(
roomId
));
}
};
CHAT_DB
.
getFavoriteUsers
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
//TODO IOS処理追加必要
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getFavoriteUsers
());
}
};
CHAT_DB
.
getFavoriteGroups
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
//TODO IOS処理追加必要
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getFavoriteGroups
());
}
}
};
};
\ No newline at end of file
public/js/chat-ui.js
View file @
8fc5ddaf
This diff is collapsed.
Click to expand it.
public/js/chat-websocket.js
View file @
8fc5ddaf
...
@@ -17,10 +17,11 @@ function connectSocket(isOnline) {
...
@@ -17,10 +17,11 @@ function connectSocket(isOnline) {
if
(
CHAT_UTIL
.
isIOS
())
{
if
(
CHAT_UTIL
.
isIOS
())
{
//TODO IOSの場合
//TODO IOSの場合
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
$
(
'.overlay'
).
removeClass
(
'active undismissable'
);
//
$('.overlay').removeClass('active undismissable');
// loadingIndicatorを表示
// loadingIndicatorを表示
CHAT_UI
.
showLoadingIndicator
();
CHAT_UI
.
showLoadingIndicator
();
android
.
getLoginParameter
();
android
.
getLoginParameter
();
console
.
log
(
'init'
)
CHAT_UI
.
refreshRoomList
();
CHAT_UI
.
refreshRoomList
();
CHAT_UI
.
dismissLoadingIndicator
();
CHAT_UI
.
dismissLoadingIndicator
();
$
(
'#createChatRoom'
).
show
();
$
(
'#createChatRoom'
).
show
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment