Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added web basic sample with localcache
- Loading branch information
Showing
89 changed files
with
8,959 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Created by .ignore support plugin (hsz.mobi) | ||
web-widget/node_modules | ||
package-lock.json | ||
node_modules | ||
.idea | ||
.node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"presets": ["env"], | ||
"env": { | ||
"test": { | ||
"presets": ["env"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
**/*.min.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
commonjs: true, | ||
es6: true | ||
}, | ||
extends: 'eslint:recommended', | ||
parserOptions: { | ||
parser: 'babel-eslint', | ||
sourceType: 'module' | ||
}, | ||
rules: { | ||
'linebreak-style': ['error', 'unix'], | ||
quotes: ['warn', 'single'], | ||
semi: ['warn', 'always'], | ||
'no-console': 1, | ||
'no-unused-vars': 1, | ||
'no-inner-declarations': 1, | ||
'no-useless-escape': 1 | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
README.md | ||
.eslintrc.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"singleQuote": true, | ||
"printWidth": 120 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# SendBird JavaScript Web Basic Sample with SyncManager | ||
This is full screen chat sample like Slack using [SendBird SDK](https://github.com/smilefam/SendBird-SDK-JavaScript) for desktop browsers. SyncManager is included and applied. | ||
|
||
- [SendBird JavaScript Web Basic Sample with SyncManager](#sendbird-javascript-web-basic-sample-with-syncmanager) | ||
- [Demo](#demo) | ||
- [Run the sample](#run-the-sample) | ||
- [Customizing the sample](#customizing-the-sample) | ||
|
||
## [Demo](https://sample.sendbird.com/basic/syncmanager) | ||
You can try out a live demo from the link [here](https://sample.sendbird.com/basic/syncmanager). | ||
|
||
|
||
## Run the sample | ||
1. Install packages | ||
|
||
> Require that you have Node v8.x+ installed. | ||
```bash | ||
npm install | ||
``` | ||
|
||
2. Run | ||
|
||
```bash | ||
npm start | ||
``` | ||
|
||
## Customizing the sample | ||
If you want to put some changes into the sample, you should build it using `webpack`. | ||
|
||
1. Install packages | ||
|
||
> Require that you have Node.js v8.x+ installed. | ||
```bash | ||
npm install | ||
``` | ||
|
||
2. Modify files | ||
If you want to change `APP_ID`, change `APP_ID` in const.js to the other `APP_ID` you want. | ||
You can test the sample with local server by running the following command. | ||
|
||
```bash | ||
npm run start:dev | ||
``` | ||
|
||
3. Build the sample | ||
When the modification is complete, you'll need to bundle the file using `webpack`. The bundled files are created in the `dist` folder. Please check `webpack.config.js` for settings. | ||
|
||
```bash | ||
npm run build | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
|
||
<link rel="icon" href="https://dxstmhyqfqr1o.cloudfront.net/favicon/favicon.ico?hash=d17264e5094efd195edf"> | ||
<link rel="shortcut icon" href="https://dxstmhyqfqr1o.cloudfront.net/favicon/favicon.ico?hash=d17264e5094efd195edf"> | ||
<link href='https://fonts.googleapis.com/css?family=Exo+2:400,900italic,900,800italic,800,700italic,700,600italic,600,500italic,500,400italic,300italic,200italic,200,100italic,100,300' | ||
rel='stylesheet' type='text/css'> | ||
|
||
<link rel="stylesheet" href="dist/sample.main.css"> | ||
<title>Basic Sample with SyncManager | SendBird</title> | ||
</head> | ||
|
||
<body> | ||
<div class="body"> | ||
<div class="body-left"> | ||
<div class="body-left-top"> | ||
<div class="top-logo"> | ||
<img src="https://dxstmhyqfqr1o.cloudfront.net/web-basic/symbol_SendBird_positive.svg" width="50" height="50" class="logo-image"> | ||
</div> | ||
<div class="top-text"> | ||
SendBird | ||
</div> | ||
</div> | ||
<div class="body-left-list"> | ||
<div class="chat-type"> | ||
<div>GROUP CHAT</div> | ||
<div> | ||
<div class="icon-create-chat" id="group_chat_add"></div> | ||
</div> | ||
</div> | ||
<div id="group_list" class="chat-list chat-list-group"> | ||
<div id="default_item_group" class="default-item">Start by inviting user to create a channel.</div> | ||
</div> | ||
</div> | ||
<div class="body-left-bottom" id="user_info"> | ||
<div class="bottom-profile"> | ||
<img src="https://dxstmhyqfqr1o.cloudfront.net/web-basic/image-profile.svg" width="30" height="30" class="image-profile"> | ||
</div> | ||
<div class="bottom-nickname"> | ||
<div class="nickname-title">username</div> | ||
<div class="nickname-content"></div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="body-center"></div> | ||
</div> | ||
<script src="./dist/sample.main.js"></script> | ||
</body> | ||
|
||
</html> |
Oops, something went wrong.