You have to authenticate yourself through the powerup settings
+diff --git a/.firebaserc b/.firebaserc new file mode 100644 index 0000000..bff1c9c --- /dev/null +++ b/.firebaserc @@ -0,0 +1,5 @@ +{ + "projects": { + "prod": "trello-snooze-8c244" + } +} \ No newline at end of file diff --git a/404.html b/404.html new file mode 100644 index 0000000..01ec007 --- /dev/null +++ b/404.html @@ -0,0 +1,81 @@ + + + +
+This specified file was not found on this website. Please check the URL for mistakes and try again.
+This page was generated by the Firebase Command-Line Interface. To modify it, edit the 404.html
file in your project's configured public directory.
You have to authenticate yourself through the powerup settings
+Pick a date
'; + 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); + }) + }) +}) diff --git a/firebase.json b/firebase.json new file mode 100644 index 0000000..dd6825b --- /dev/null +++ b/firebase.json @@ -0,0 +1,19 @@ +{ + "database": { + "rules": "database.rules.json" + }, + "hosting": { + "public": "./", + "headers": [ { + "source" : "**", + "headers" : [ { + "key" : "Access-Control-Allow-Origin", + "value" : "*" + } ] + } ], + "ignore" : [ + "server/*", + ".git/" + ] + } +} diff --git a/images/icon-gray.svg b/images/icon-gray.svg new file mode 100644 index 0000000..77774c9 --- /dev/null +++ b/images/icon-gray.svg @@ -0,0 +1,38 @@ + \ No newline at end of file diff --git a/images/icon-white.svg b/images/icon-white.svg new file mode 100644 index 0000000..fa7329f --- /dev/null +++ b/images/icon-white.svg @@ -0,0 +1,38 @@ + \ No newline at end of file diff --git a/images/logo-old.png b/images/logo-old.png new file mode 100644 index 0000000..788e4d7 Binary files /dev/null and b/images/logo-old.png differ diff --git a/images/logo.png b/images/logo.png new file mode 100644 index 0000000..8b3d9ec Binary files /dev/null and b/images/logo.png differ diff --git a/images/nps.svg b/images/nps.svg new file mode 100644 index 0000000..97a470e --- /dev/null +++ b/images/nps.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..1616d02 --- /dev/null +++ b/index.html @@ -0,0 +1,4 @@ + + + + diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..690fc4f --- /dev/null +++ b/manifest.json @@ -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" + } + } +} diff --git a/server/.gitignore b/server/.gitignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/server/.gitignore @@ -0,0 +1 @@ +node_modules diff --git a/server/Procfile b/server/Procfile new file mode 100644 index 0000000..09f379e --- /dev/null +++ b/server/Procfile @@ -0,0 +1 @@ +web: node schedule-card-task.js diff --git a/server/package.json b/server/package.json new file mode 100644 index 0000000..b33771b --- /dev/null +++ b/server/package.json @@ -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 EdwinAuthorize your account to be able to have the Snooze service hide and show cards for you
+ +