-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 3c18306
Showing
21 changed files
with
509 additions
and
0 deletions.
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"projects": { | ||
"prod": "trello-snooze-8c244" | ||
} | ||
} |
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,81 @@ | ||
|
||
<!doctype html> | ||
<html> | ||
<head> | ||
<title>Page Not Found</title> | ||
<style> | ||
body { | ||
margin: 0 auto; | ||
padding: 1em; | ||
font-family: Helvetica, Arial, "Lucida Grande", sans-serif; | ||
font-size: 1.1em; | ||
color: #333; | ||
} | ||
@media screen and (min-width: 40em) { | ||
body { | ||
width: 40em; | ||
} | ||
} | ||
h1, h2, h3 { | ||
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; | ||
font-weight: 300; | ||
} | ||
h1 { | ||
margin: 1em 0; | ||
padding: 0 0 0.25em 0; | ||
border-bottom: 1px dotted #ccc; | ||
text-align: center; | ||
font-size: 3em; | ||
line-height: 1.1em; | ||
} | ||
h2 { | ||
margin: 1em 0 0.45em 0; | ||
padding: 0; | ||
font-size: 1.8em; | ||
} | ||
p { | ||
margin: 0 0 0.5em 0; | ||
line-height: 1.8em; | ||
} | ||
ol { | ||
|
||
} | ||
ol li { | ||
margin: 0 0 0.5em 0; | ||
font-size: 0.9em; | ||
line-height: 1.8em; | ||
} | ||
a { | ||
color: #50B1FF; | ||
text-decoration: none; | ||
} | ||
a:hover { | ||
text-decoration: underline; | ||
} | ||
code { | ||
display: inline-block; | ||
padding: 0.1em; | ||
background-color: #F8F8F8; | ||
border: 1px solid #DDD; | ||
border-radius: 3px; | ||
font-family: Consolas,"Liberation Mono",Courier,monospace; | ||
font-size: 0.9em; | ||
line-height: 1; | ||
} | ||
.logo { | ||
display: block; | ||
margin: 3em 0; | ||
text-align: center; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<h1>Page Not Found</h1> | ||
<p>This specified file was not found on this website. Please check the URL for mistakes and try again.</p> | ||
<h2>Why am I seeing this?</h2> | ||
<p>This page was generated by the Firebase Command-Line Interface. To modify it, edit the <code>404.html</code> file in your project's configured public directory.</p> | ||
<a class="logo" href="//firebase.google.com"> | ||
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJQAAAAaCAYAAABRhnV8AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3NpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGF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ional 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,6 @@ | ||
{ | ||
"rules": { | ||
".read": true, | ||
".write": true | ||
} | ||
} |
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,3 @@ | ||
#snooze { | ||
margin-top:15px; | ||
} |
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,18 @@ | ||
<html> | ||
<head> | ||
<link rel="stylesheet" href="https://trello.com/power-ups/power-up.css"> | ||
<link rel="stylesheet" href="./date-picker.css"> | ||
<script src="https://trello.com/power-ups/power-up.min.js"></script> | ||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> | ||
<script src="https://api.trello.com/1/client.js?key=029a2bec58250bca0e3f1a29451f13ce"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.15.1/moment.min.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment-timezone/0.5.6/moment-timezone-with-data.min.js"></script> | ||
|
||
</head> | ||
<body> | ||
<div id="content" style="display: flex; flex-direction: column;"> | ||
<p>You have to authenticate yourself through the powerup settings</p> | ||
</div> | ||
<script src="./date-picker.js"></script> | ||
</body> | ||
</html> |
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,50 @@ | ||
var Promise = TrelloPowerUp.Promise; | ||
var t = TrelloPowerUp.iframe(); | ||
|
||
var now = moment.tz(moment.now().valueOf(),moment.tz.guess()) | ||
var fixedFuture = now.add(1,'day').hour(8).minute(0).format() | ||
var rightShit = moment(fixedFuture).format('YYYY-MM-DDTHH:mm') | ||
|
||
t.get('board', 'private', 'auth', null).then(function(auth) { | ||
console.log(auth); | ||
if(auth) { | ||
document.getElementById('content').innerHTML ='<p>Pick a date</p><input id="date" type="datetime-local" \><button id="snooze" class="mod-primary">Snooze</button>'; | ||
document.getElementById('date').value = rightShit; | ||
document.getElementById('snooze').addEventListener('click', function(){ | ||
var time = document.getElementById('date').value | ||
t.get('board', 'private', 'id', null).then(function(secret) { | ||
var date = moment(time); | ||
t.card('id').then(function(obj) { | ||
$.ajax({ | ||
method: "GET", | ||
url: "https://trello-snooze-webhook.herokuapp.com/close?userid="+secret+"&id="+obj.id+"&unix="+date.valueOf(), | ||
timeout:5500 | ||
}) | ||
.done(function( msg ) { | ||
if(msg.error) { | ||
if(msg.errorobj.status === 401) { | ||
Trello.deauthorize(); | ||
t.popup({ | ||
title: "Authorize", | ||
url: './settings.html' | ||
}); | ||
} | ||
} else { | ||
t.closePopup(); | ||
} | ||
}) | ||
}) | ||
}) | ||
}) | ||
} | ||
}) | ||
|
||
document.getElementById('auth').addEventListener('click', function(){ | ||
t.get('board', 'private', 'auth', null).then(function(auth) { | ||
console.log("BOARD AUTH") | ||
console.log(auth); | ||
t.get('board', 'private', 'id', null).then(function(id) { | ||
console.log(id); | ||
}) | ||
}) | ||
}) |
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,19 @@ | ||
{ | ||
"database": { | ||
"rules": "database.rules.json" | ||
}, | ||
"hosting": { | ||
"public": "./", | ||
"headers": [ { | ||
"source" : "**", | ||
"headers" : [ { | ||
"key" : "Access-Control-Allow-Origin", | ||
"value" : "*" | ||
} ] | ||
} ], | ||
"ignore" : [ | ||
"server/*", | ||
".git/" | ||
] | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 @@ | ||
<html> | ||
<script src="https://trello.com/power-ups/power-up.min.js"></script> | ||
<script src="./snooze.js"></script> | ||
</html> |
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 @@ | ||
{ | ||
"name": "Snooze Cards", | ||
"details": "This power-up will allow you to hide Trello cards for a set amount of time then return to your list.", | ||
"icon": { | ||
"url": "./images/logo.png" | ||
}, | ||
"author": "Snorre Lothar von Gohren Edwin", | ||
"capabilities": [ | ||
"board-buttons", | ||
"card-buttons", | ||
"callback", | ||
"card-badges", | ||
"card-detail-badges", | ||
"show-settings" | ||
], | ||
"connectors": { | ||
"iframe": { | ||
"url": "./index.html" | ||
} | ||
} | ||
} |
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 @@ | ||
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 @@ | ||
web: node schedule-card-task.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,17 @@ | ||
{ | ||
"name": "server", | ||
"version": "1.0.0", | ||
"description": "backendserver for mye trellotask", | ||
"main": "schedule-card-task.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"author": "Snorrre Lothar von Gohren Edwin <[email protected]> (https://github.com/Snorlock)", | ||
"license": "ISC", | ||
"dependencies": { | ||
"body-parser": "^1.15.2", | ||
"express": "^4.14.0", | ||
"firebase": "2.4.2", | ||
"superagent": "^2.3.0" | ||
} | ||
} |
Oops, something went wrong.