Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added new features, refactoring code #74

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
*.swp
*.swo
node_modules/
.env.js
2,170 changes: 2,170 additions & 0 deletions data.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions error_log.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Response Error: 429
13 changes: 13 additions & 0 deletions example.env.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* Rename this file to .env.js
* How to generate api-token, read readme.md
*/

// Array of SLACK_TOKENS
const config = [
'api-token',
'api-token'
];

// Export module
module.exports = config;
16 changes: 16 additions & 0 deletions lib/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* Application state
*/

// Container for application states
const app = {
users: {},
currentUser: null,
channels: {},
currentChannelId: null,
team: {},
currentTeam: null,
};

// Export module
module.exports = app;
9 changes: 9 additions & 0 deletions lib/components.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* Components instance
*/

const ui = require('../userInterface.js');

const components = ui.init(); // ui components

module.exports = components;
10 changes: 10 additions & 0 deletions lib/constants.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const UNKNOWN_USER_NAME = 'Unknown User';
// This is a hack to make the message list scroll to the bottom whenever a message is sent.
// Multiline messages would otherwise only scroll one line per message leaving part of the message
// cut off. This assumes that messages will be less than 50 lines high in the chat window.
const SCROLL_PER_MESSAGE = 50;

module.exports = {
UNKNOWN_USER_NAME,
SCROLL_PER_MESSAGE,
};
Loading