Permalink
Browse files

add mite. plugin

  • Loading branch information...
1 parent 0d05c82 commit de3d1b7062ceeb443a8125f3946b9ff06068ba29 @pixeldesu pixeldesu committed Oct 31, 2016
Showing with 60 additions and 0 deletions.
  1. BIN mite/icon.png
  2. +19 −0 mite/icon.svg
  3. +1 −0 mite/index.js
  4. +22 −0 mite/package.json
  5. +18 −0 mite/webview.js
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ width="1024px" height="1024px" viewBox="0 0 1024 1024" enable-background="new 0 0 1024 1024" xml:space="preserve">
+<g>
+ <g>
+ <path d="M181.9,449.9h1.9c40.2-60.3,77.5-96.7,156.1-96.7c65.1,0,111.1,39.3,127.3,96.7c43.1-61.3,89-96.7,160.8-96.7
+ c129.3,0,145.5,87.1,145.5,207.7v165.6c0,29.7,6.7,44,38.3,44h55.5v45H608.9v-45h45c31.6,0,38.3-14.4,38.3-44V493
+ c0-57.4-34.5-86.2-85.2-86.2c-70.9,0-129.3,75.6-129.3,137.9v181.9c0,29.7,6.7,44,38.3,44h44v45H314v-45h44
+ c31.6,0,38.3-14.4,38.3-44V504.5c0-58.4-30.6-97.7-86.2-97.7c-71.8,0-128.3,79.5-128.3,137.9v181.9c0,29.7,6.7,44,38.3,44h43.1v45
+ H0v-45h62.2c31.6,0,38.3-14.4,38.3-44v-270c0-29.7-6.7-44-38.3-44H0v-45h181.9V449.9z"/>
+ </g>
+ <g>
+ <path fill="#FF8215" d="M965.6,830.8c-32.6,0-55.5-25.8-55.5-60.3c0-35.4,23.9-60.3,57.5-60.3c33.5,0,56.5,24.9,56.5,60.3
+ c0,34.5-22,60.3-57.5,60.3H965.6z"/>
+ </g>
+</g>
+</svg>
View
@@ -0,0 +1 @@
+module.exports = Franz => Franz;
View
@@ -0,0 +1,22 @@
+{
+ "name": "mite",
+ "version": "1.0.0",
+ "description": "mite. integration for Franz",
+ "main": "index.js",
+ "author": "Andreas Nedbal <andy@pixelde.su>",
+ "license": "MIT",
+ "config": {
+ "serviceURL": "https://{teamID}.mite.yo.lk",
+ "serviceName": "Mite",
+ "message": "This plugin adds your teams mite timetracking to Franz",
+ "popup": [],
+ "hasNotificationSound": false,
+ "hasTeamID": true,
+ "customURL": false,
+ "hostedOnly": false,
+ "hasIndirectMessages": false,
+ "webviewOptions": {
+ "disablewebsecurity": ""
+ }
+ }
+}
View
@@ -0,0 +1,18 @@
+module.exports = (Franz, options) => {
+ function getStatus() {
+ // If we are on the main page, look for tracking bubbles
+ // Also look for tracker indicator
+ const count = $('.entry.tracking').length + $('#tracker_indicator a').not(':empty').length
+
+ // As we can't set time to appear in the notification bubble
+ // we will only show an indirect notification for as long as
+ // the user is tracking time
+ if (count > 0) {
+ Franz.setBadge(0, 1)
+ } else {
+ Franz.setBadge(0, 0)
+ }
+ }
+
+ Franz.loop(getStatus)
+}

0 comments on commit de3d1b7

Please sign in to comment.