Compare commits
1 Commits
master
...
dependabot
Author | SHA1 | Date | |
---|---|---|---|
|
1263bc882a |
@ -23,7 +23,7 @@
|
||||
"dotenv": "^8.2.0",
|
||||
"lodash": "^4.17.11",
|
||||
"mobx": "^5.15.4",
|
||||
"mobx-react": "^6.2.2",
|
||||
"mobx-react": "^6.3.1",
|
||||
"prop-types": "^15.6.2",
|
||||
"query-string": "^6.12.1",
|
||||
"react": "^16.13.1",
|
||||
|
@ -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 `https://${encodeURIComponent(subdomain)}.mocoapp.com/api/browser_extensions`
|
||||
return `http://${encodeURIComponent(subdomain)}.mocoapp.localhost:3000/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`)
|
||||
}
|
||||
|
@ -122,31 +122,18 @@ export default {
|
||||
allowHostOverride: false,
|
||||
},
|
||||
|
||||
mstodo: {
|
||||
wunderlist: {
|
||||
name: "wunderlist",
|
||||
host: "https://to-do.office.com",
|
||||
urlPatterns: [":host:/tasks/id/:id(*)"],
|
||||
host: "https://www.wunderlist.com",
|
||||
urlPatterns: [":host:/(webapp)#/tasks/:id(/*)"],
|
||||
description: (document) =>
|
||||
document
|
||||
.querySelector(".detailHeader")
|
||||
?.textContent?.replace(/^[^[]+\[/, "[")
|
||||
.replace(projectRegex, "")
|
||||
.trim(),
|
||||
projectId: projectIdentifierBySelector(".detailHeader"),
|
||||
.querySelector(".taskItem.selected .taskItem-titleWrapper-title")
|
||||
?.textContent?.trim(),
|
||||
projectId: projectIdentifierBySelector(".taskItem.selected .taskItem-titleWrapper-title"),
|
||||
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",
|
||||
@ -174,7 +161,6 @@ export default {
|
||||
},
|
||||
allowHostOverride: true,
|
||||
},
|
||||
*/
|
||||
|
||||
monday: {
|
||||
name: "monday",
|
||||
|
@ -28,8 +28,6 @@ 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" })
|
||||
|
||||
@ -69,7 +67,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 })
|
||||
}),
|
||||
@ -77,7 +75,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" ? "https://*.mocoapp.com/*" : null,
|
||||
env.NODE_ENV === "development" ? "http://*.mocoapp.localhost/*" : null,
|
||||
]),
|
||||
options_ui: {
|
||||
...manifest.options_ui,
|
||||
|
@ -21,7 +21,7 @@ module.exports = (env) => {
|
||||
...manifest,
|
||||
permissions: compact([
|
||||
...manifest.permissions,
|
||||
env.NODE_ENV === "development" ? "https://*.mocoapp.com/*" : null,
|
||||
env.NODE_ENV === "development" ? "http://*.mocoapp.localhost/*" : null,
|
||||
]),
|
||||
options_ui: {
|
||||
...manifest.options_ui,
|
||||
|
18
yarn.lock
18
yarn.lock
@ -5627,17 +5627,17 @@ mkdirp@^1.0.3, mkdirp@^1.0.4:
|
||||
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
|
||||
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
|
||||
|
||||
mobx-react-lite@>=2.2.0:
|
||||
version "2.2.1"
|
||||
resolved "https://registry.yarnpkg.com/mobx-react-lite/-/mobx-react-lite-2.2.1.tgz#9c05dd799005d29ec1671ae86ca30b3ab5411055"
|
||||
integrity sha512-SxOuV7Q1MLdj9uRUG8N1x9lBa4cS9c+YwlcrvrBVuCTlNrgRrrHuydfBHW/0f3pALhvGhcg+JEvf1gMWOuej4A==
|
||||
mobx-react-lite@^2.2.0:
|
||||
version "2.2.2"
|
||||
resolved "https://registry.yarnpkg.com/mobx-react-lite/-/mobx-react-lite-2.2.2.tgz#87c217dc72b4e47b22493daf155daf3759f868a6"
|
||||
integrity sha512-2SlXALHIkyUPDsV4VTKVR9DW7K3Ksh1aaIv3NrNJygTbhXe2A9GrcKHZ2ovIiOp/BXilOcTYemfHHZubP431dg==
|
||||
|
||||
mobx-react@^6.2.2:
|
||||
version "6.3.0"
|
||||
resolved "https://registry.yarnpkg.com/mobx-react/-/mobx-react-6.3.0.tgz#7d11799f988bbdadc49e725081993b18baa20329"
|
||||
integrity sha512-C14yya2nqEBRSEiJjPkhoWJLlV8pcCX3m2JRV7w1KivwANJqipoiPx9UMH4pm6QNMbqDdvJqoyl+LqNu9AhvEQ==
|
||||
mobx-react@^6.3.1:
|
||||
version "6.3.1"
|
||||
resolved "https://registry.yarnpkg.com/mobx-react/-/mobx-react-6.3.1.tgz#204f9756e42e19d91cb6598837063b7e7de87c52"
|
||||
integrity sha512-IOxdJGnRSNSJrL2uGpWO5w9JH5q5HoxEqwOF4gye1gmZYdjoYkkMzSGMDnRCUpN/BNzZcFoMdHXrjvkwO7KgaQ==
|
||||
dependencies:
|
||||
mobx-react-lite ">=2.2.0"
|
||||
mobx-react-lite "^2.2.0"
|
||||
|
||||
mobx@^5.15.4:
|
||||
version "5.15.6"
|
||||
|
Loading…
Reference in New Issue
Block a user