Add support for Meistertask service
This commit is contained in:
parent
1f8bc33830
commit
e6b6f67814
@ -31,3 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
## [1.0.22] - 2019-03-28
|
## [1.0.22] - 2019-03-28
|
||||||
### Changed
|
### Changed
|
||||||
- Change the default value of subdomain to `unset` to have a well-formed URL.
|
- Change the default value of subdomain to `unset` to have a well-formed URL.
|
||||||
|
|
||||||
|
## [1.0.23] - 2019-03-28
|
||||||
|
### Added
|
||||||
|
- Add support for meistertask.com
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "moco-browser-extensions",
|
"name": "moco-browser-extensions",
|
||||||
"description": "Browser plugin for MOCO",
|
"description": "Browser plugin for MOCO",
|
||||||
"version": "1.0.22",
|
"version": "1.0.23",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "yarn start:chrome",
|
"start": "yarn start:chrome",
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#moco-bx-root {
|
#moco-bx-root {
|
||||||
font-family: $font-family;
|
font-family: $font-family;
|
||||||
color: $font-color;
|
color: $font-color;
|
||||||
|
pointer-events: all;
|
||||||
|
|
||||||
.moco-bx-bubble {
|
.moco-bx-bubble {
|
||||||
box-sizing: content-box;
|
box-sizing: content-box;
|
||||||
@ -48,6 +49,7 @@
|
|||||||
#moco-bx-popup-root {
|
#moco-bx-popup-root {
|
||||||
font-family: $font-family;
|
font-family: $font-family;
|
||||||
color: $font-color;
|
color: $font-color;
|
||||||
|
pointer-events: all;
|
||||||
|
|
||||||
iframe {
|
iframe {
|
||||||
border: 0;
|
border: 0;
|
||||||
@ -58,16 +60,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.moco-bx-popup {
|
.moco-bx-popup {
|
||||||
position: fixed; /* Stay in place */
|
position: fixed;
|
||||||
z-index: 2000; /* Sit on top */
|
z-index: 2000;
|
||||||
padding-top: 100px; /* Location of the box */
|
padding-top: 100px;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
width: 100%; /* Full width */
|
width: 100%;
|
||||||
height: 100%; /* Full height */
|
height: 100%;
|
||||||
overflow: auto; /* Enable scroll if needed */
|
overflow: auto;
|
||||||
background-color: rgb(0, 0, 0); /* Fallback color */
|
background-color: rgba(0, 0, 0, 0.4);
|
||||||
background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */
|
|
||||||
|
|
||||||
.moco-bx-popup-content {
|
.moco-bx-popup-content {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
|
@ -2,8 +2,8 @@ import React from "react"
|
|||||||
import PropTypes from "prop-types"
|
import PropTypes from "prop-types"
|
||||||
import logoUrl from "images/logo.png"
|
import logoUrl from "images/logo.png"
|
||||||
|
|
||||||
const Bubble = ({ bookedHours, onClick }) => (
|
const Bubble = ({ bookedHours }) => (
|
||||||
<div className="moco-bx-bubble-inner" onClick={onClick}>
|
<div className="moco-bx-bubble-inner">
|
||||||
<img className="moco-bx-logo" src={chrome.extension.getURL(logoUrl)} />
|
<img className="moco-bx-logo" src={chrome.extension.getURL(logoUrl)} />
|
||||||
{bookedHours > 0 ? (
|
{bookedHours > 0 ? (
|
||||||
<span className="moco-bx-booked-hours">{bookedHours.toFixed(2)}</span>
|
<span className="moco-bx-booked-hours">{bookedHours.toFixed(2)}</span>
|
||||||
@ -12,8 +12,7 @@ const Bubble = ({ bookedHours, onClick }) => (
|
|||||||
)
|
)
|
||||||
|
|
||||||
Bubble.propTypes = {
|
Bubble.propTypes = {
|
||||||
bookedHours: PropTypes.number,
|
bookedHours: PropTypes.number
|
||||||
onClick: PropTypes.func.isRequired
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Bubble.defaultProps = {
|
Bubble.defaultProps = {
|
||||||
|
@ -43,15 +43,12 @@ chrome.runtime.onConnect.addListener(function(port) {
|
|||||||
<animated.div
|
<animated.div
|
||||||
className="moco-bx-bubble"
|
className="moco-bx-bubble"
|
||||||
style={{ ...props, ...service.position }}
|
style={{ ...props, ...service.position }}
|
||||||
|
onClick={event => {
|
||||||
|
event.stopPropagation()
|
||||||
|
messenger.postMessage({ type: "togglePopup" })
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<Bubble
|
<Bubble key={service.url} bookedHours={bookedHours} />
|
||||||
key={service.url}
|
|
||||||
bookedHours={bookedHours}
|
|
||||||
onClick={event => {
|
|
||||||
event.stopPropagation()
|
|
||||||
messenger.postMessage({ type: "togglePopup" })
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</animated.div>
|
</animated.div>
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
@ -68,6 +68,11 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
meistertask: {
|
||||||
|
name: "meistertask",
|
||||||
|
urlPatterns: ["https\\://www.meistertask.com/app/task/:id/:slug"]
|
||||||
|
},
|
||||||
|
|
||||||
trello: {
|
trello: {
|
||||||
name: "trello",
|
name: "trello",
|
||||||
urlPatterns: ["https\\://trello.com/c/:id/:title"],
|
urlPatterns: ["https\\://trello.com/c/:id/:title"],
|
||||||
|
Loading…
Reference in New Issue
Block a user