Compare commits
1 Commits
master
...
dependabot
Author | SHA1 | Date | |
---|---|---|---|
|
11ee2f705b |
@ -51,7 +51,7 @@
|
||||
"eslint-config-prettier": "^6.11.0",
|
||||
"eslint-plugin-jest": "^23.13.2",
|
||||
"eslint-plugin-prettier": "^3.1.3",
|
||||
"eslint-plugin-react": "^7.20.0",
|
||||
"eslint-plugin-react": "^7.21.2",
|
||||
"file-loader": "^6.0.0",
|
||||
"html-webpack-plugin": "^4.3.0",
|
||||
"jest": "^26.0.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,
|
||||
|
@ -3320,10 +3320,10 @@ eslint-plugin-prettier@^3.1.3:
|
||||
dependencies:
|
||||
prettier-linter-helpers "^1.0.0"
|
||||
|
||||
eslint-plugin-react@^7.20.0:
|
||||
version "7.20.6"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.20.6.tgz#4d7845311a93c463493ccfa0a19c9c5d0fd69f60"
|
||||
integrity sha512-kidMTE5HAEBSLu23CUDvj8dc3LdBU0ri1scwHBZjI41oDv4tjsWZKU7MQccFzH1QYPYhsnTF2ovh7JlcIcmxgg==
|
||||
eslint-plugin-react@^7.21.2:
|
||||
version "7.21.2"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.21.2.tgz#3bd5d2c4c36d5a0428d0d6dda301ac9a84d681b2"
|
||||
integrity sha512-j3XKvrK3rpBzveKFbgAeGsWb9uz6iUOrR0jixRfjwdFeGSRsXvVTFtHDQYCjsd1/6Z/xvb8Vy3LiI5Reo7fDrg==
|
||||
dependencies:
|
||||
array-includes "^3.1.1"
|
||||
array.prototype.flatmap "^1.2.3"
|
||||
|
Loading…
Reference in New Issue
Block a user