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

. #190

Closed
wants to merge 11 commits into from
Closed

. #190

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: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ To run the Dumbledore you must have an [API token](#getting-the-api-token-for-yo
$ BOT_API_KEY={key} BOT_NAME={name} node bin/bot.js
```


## Getting the API token for your Slack channel
To allow the Dumbledore to connect your Slack channel you must provide him an API key. To retrieve it you need to add a new Bot in your Slack organization by visiting the following url: https://*yourorganization*.slack.com/services/new/bot, where *yourorganization* must be substituted with the name of your organization (e.g. https://*dumbledoretest*.slack.com/services/new/bot). Ensure you are logged to your Slack organization in your browser and you have the admin rights to add a new bot.

Expand Down
4 changes: 2 additions & 2 deletions bin/bot.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ async function startBot() {
const botCount = await query.count();

if (!botCount) {
const name = process.env.BOT_NAME;
const name = 'bot1';//process.env.BOT_NAME;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected exception block, space or tab after '//' in comment. (spaced-comment)


// base64 encoded token
let token = process.env.BOT_API_KEY;
let token = 'xoxb-248266143441-zgzDCId1tMbBG7GKaToXsUi2' //process.env.BOT_API_KEY;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon. (semi)
Expected exception block, space or tab after '//' in comment. (spaced-comment)

if (token.length > 42) token = atob(token);

const obj = new Parse.Object(DB.BOT.CALL);
Expand Down
58 changes: 58 additions & 0 deletions page/src/components/NavBar.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#navbar {
background-color: black;
padding: 1% 1.5%;
display: flex;
box-sizing: border-box;
align-items: center;
height: 6%;
color: white;
font-size: 1.3rem;
}

#login {
margin-left: auto;
}

#login_key {
position: relative;
left : 15%;
height: 33px;
}

#login_pw {
position: relative;
left : 6.7%;
height: 33px;
}

#modal-size{
position: relative;
left : 0%;
width: 30%;
margin: auto;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}

#botRegister {
margin-left: 80%;
}

#bot_name {
position: relative;
left : 8%;
height: 33px;
}

#bot_pw {
position: relative;
left : 8.6%;
height: 33px;
}

#bot_email {
position: relative;
left : 23%;
height: 33px;
}
9 changes: 9 additions & 0 deletions page/src/components/NavBar.css.rej
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
diff a/page/src/components/NavBar.css b/page/src/components/NavBar.css (rejected hunks)
@@ -36,7 +36,6 @@
}

#botRegister {
- margin-left: 83%;
margin-left: 80%;
}

1 change: 1 addition & 0 deletions page/src/containers/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class App extends Component {
render() {
return (
<div id="container">

<NavBar />
<Grid centered stackable stretched>
<Grid.Row>
Expand Down