Compare commits
6 Commits
fix/projec
...
master
Author | SHA1 | Date | |
---|---|---|---|
337acb5448 | |||
e019d5660b | |||
|
261db3f9db | ||
|
0b53743298 | ||
|
5b63b77102 | ||
|
7589e04207 |
@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [1.5.2] - 2020-09-10
|
||||
|
||||
### Fixed
|
||||
|
||||
- Remember last tracked project and task on card
|
||||
|
||||
## [1.5.1] - 2020-08-04
|
||||
|
||||
### Added
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "moco-browser-extensions",
|
||||
"description": "Browser plugin for MOCO",
|
||||
"version": "1.5.1",
|
||||
"version": "1.5.2",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"start": "yarn start:chrome",
|
||||
|
@ -1,11 +1,11 @@
|
||||
import axios from "axios"
|
||||
import { formatDate } from "utils"
|
||||
|
||||
const baseURL = subdomain => {
|
||||
const baseURL = (subdomain) => {
|
||||
if (process.env.NODE_ENV === "production") {
|
||||
return `https://${encodeURIComponent(subdomain)}.mocoapp.com/api/browser_extensions`
|
||||
} else {
|
||||
return `http://${encodeURIComponent(subdomain)}.mocoapp.localhost:3000/api/browser_extensions`
|
||||
return `https://${encodeURIComponent(subdomain)}.mocoapp.com/api/browser_extensions`
|
||||
}
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@ export default class Client {
|
||||
})
|
||||
}
|
||||
|
||||
login = service =>
|
||||
login = (service) =>
|
||||
this.#client.post("session", {
|
||||
api_key: this.#apiKey,
|
||||
remote_service: service?.name,
|
||||
@ -46,7 +46,7 @@ export default class Client {
|
||||
params: { date: `${formatDate(fromDate)}:${formatDate(toDate)}` },
|
||||
})
|
||||
|
||||
activitiesStatus = service => {
|
||||
activitiesStatus = (service) => {
|
||||
if (!service) {
|
||||
return Promise.resolve({ data: { hours: 0 } })
|
||||
}
|
||||
@ -55,7 +55,7 @@ export default class Client {
|
||||
})
|
||||
}
|
||||
|
||||
createActivity = activity => this.#client.post("activities", { activity })
|
||||
createActivity = (activity) => this.#client.post("activities", { activity })
|
||||
|
||||
stopTimer = timedActivity => this.#client.get(`activities/${timedActivity.id}/stop_timer`)
|
||||
stopTimer = (timedActivity) => this.#client.get(`activities/${timedActivity.id}/stop_timer`)
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
import "mobx-react-lite/batchingForReactDom"
|
||||
import React, { createRef } from "react"
|
||||
import ReactDOM from "react-dom"
|
||||
import { Transition, animated, config } from "react-spring/renderprops"
|
||||
|
@ -1,4 +1,3 @@
|
||||
import "mobx-react-lite/batchingForReactDom"
|
||||
import React from "react"
|
||||
import ReactDOM from "react-dom"
|
||||
import Options from "./components/Options"
|
||||
|
@ -1,4 +1,3 @@
|
||||
import "mobx-react-lite/batchingForReactDom"
|
||||
import React from "react"
|
||||
import ReactDOM from "react-dom"
|
||||
import App from "./components/App"
|
||||
|
@ -122,18 +122,31 @@ export default {
|
||||
allowHostOverride: false,
|
||||
},
|
||||
|
||||
wunderlist: {
|
||||
mstodo: {
|
||||
name: "wunderlist",
|
||||
host: "https://www.wunderlist.com",
|
||||
urlPatterns: [":host:/(webapp)#/tasks/:id(/*)"],
|
||||
host: "https://to-do.office.com",
|
||||
urlPatterns: [":host:/tasks/id/:id(*)"],
|
||||
description: (document) =>
|
||||
document
|
||||
.querySelector(".taskItem.selected .taskItem-titleWrapper-title")
|
||||
?.textContent?.trim(),
|
||||
projectId: projectIdentifierBySelector(".taskItem.selected .taskItem-titleWrapper-title"),
|
||||
.querySelector(".detailHeader")
|
||||
?.textContent?.replace(/^[^[]+\[/, "[")
|
||||
.replace(projectRegex, "")
|
||||
.trim(),
|
||||
projectId: projectIdentifierBySelector(".detailHeader"),
|
||||
allowHostOverride: false,
|
||||
},
|
||||
|
||||
gitbase: {
|
||||
name: "gitlab",
|
||||
host: "https://gitbase.de",
|
||||
urlPatterns: [":host:/:owner/:repo/issues/:id"],
|
||||
description: (document) =>
|
||||
document.querySelector("#issue-title")?.textContent?.replace(projectRegex, "").trim(),
|
||||
projectId: projectIdentifierBySelector(".select-project.list a"),
|
||||
allowHostOverride: false,
|
||||
},
|
||||
|
||||
/*
|
||||
"gitlab-mr": {
|
||||
name: "gitlab",
|
||||
host: "https://gitlab.com",
|
||||
@ -161,6 +174,7 @@ export default {
|
||||
},
|
||||
allowHostOverride: true,
|
||||
},
|
||||
*/
|
||||
|
||||
monday: {
|
||||
name: "monday",
|
||||
|
@ -28,6 +28,8 @@ export function tabUpdated(tab, { messenger, settings }) {
|
||||
const service = matcher(tab.url)
|
||||
const apiClient = new ApiClient(settings)
|
||||
|
||||
// console.log(service)
|
||||
|
||||
if (service?.match?.id) {
|
||||
messenger.postMessage(tab, { type: "requestService" })
|
||||
|
||||
@ -67,7 +69,7 @@ export function settingsChanged(settings, { messenger }) {
|
||||
queryTabs({ currentWindow: true })
|
||||
.then(reject(isBrowserTab))
|
||||
.then(
|
||||
forEach(tab => {
|
||||
forEach((tab) => {
|
||||
messenger.postMessage(tab, { type: "closePopup" })
|
||||
tabUpdated(tab, { settings, messenger })
|
||||
}),
|
||||
@ -75,7 +77,7 @@ export function settingsChanged(settings, { messenger }) {
|
||||
}
|
||||
|
||||
export function togglePopup(tab, { messenger }) {
|
||||
return function({ isOpen, service } = {}) {
|
||||
return function ({ isOpen, service } = {}) {
|
||||
if (isNil(isOpen)) {
|
||||
return
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ module.exports = (env) => {
|
||||
...manifest,
|
||||
permissions: compact([
|
||||
...manifest.permissions,
|
||||
env.NODE_ENV === "development" ? "http://*.mocoapp.localhost/*" : null,
|
||||
env.NODE_ENV === "development" ? "https://*.mocoapp.com/*" : null,
|
||||
]),
|
||||
options_ui: {
|
||||
...manifest.options_ui,
|
||||
|
@ -21,7 +21,7 @@ module.exports = (env) => {
|
||||
...manifest,
|
||||
permissions: compact([
|
||||
...manifest.permissions,
|
||||
env.NODE_ENV === "development" ? "http://*.mocoapp.localhost/*" : null,
|
||||
env.NODE_ENV === "development" ? "https://*.mocoapp.com/*" : null,
|
||||
]),
|
||||
options_ui: {
|
||||
...manifest.options_ui,
|
||||
|
Loading…
Reference in New Issue
Block a user