Compare commits
1 Commits
master
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8eb0dcd924 |
@@ -57,7 +57,7 @@
|
|||||||
"jest": "^26.0.1",
|
"jest": "^26.0.1",
|
||||||
"mini-css-extract-plugin": "^0.9.0",
|
"mini-css-extract-plugin": "^0.9.0",
|
||||||
"node-sass": "^4.14.1",
|
"node-sass": "^4.14.1",
|
||||||
"prettier": "^2.0.5",
|
"prettier": "^2.1.2",
|
||||||
"sass-loader": "^9.0.2",
|
"sass-loader": "^9.0.2",
|
||||||
"style-loader": "^1.2.1",
|
"style-loader": "^1.2.1",
|
||||||
"svg-inline-loader": "^0.8.2",
|
"svg-inline-loader": "^0.8.2",
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import axios from "axios"
|
import axios from "axios"
|
||||||
import { formatDate } from "utils"
|
import { formatDate } from "utils"
|
||||||
|
|
||||||
const baseURL = (subdomain) => {
|
const baseURL = subdomain => {
|
||||||
if (process.env.NODE_ENV === "production") {
|
if (process.env.NODE_ENV === "production") {
|
||||||
return `https://${encodeURIComponent(subdomain)}.mocoapp.com/api/browser_extensions`
|
return `https://${encodeURIComponent(subdomain)}.mocoapp.com/api/browser_extensions`
|
||||||
} else {
|
} 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", {
|
this.#client.post("session", {
|
||||||
api_key: this.#apiKey,
|
api_key: this.#apiKey,
|
||||||
remote_service: service?.name,
|
remote_service: service?.name,
|
||||||
@@ -46,7 +46,7 @@ export default class Client {
|
|||||||
params: { date: `${formatDate(fromDate)}:${formatDate(toDate)}` },
|
params: { date: `${formatDate(fromDate)}:${formatDate(toDate)}` },
|
||||||
})
|
})
|
||||||
|
|
||||||
activitiesStatus = (service) => {
|
activitiesStatus = service => {
|
||||||
if (!service) {
|
if (!service) {
|
||||||
return Promise.resolve({ data: { hours: 0 } })
|
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,
|
allowHostOverride: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
mstodo: {
|
wunderlist: {
|
||||||
name: "wunderlist",
|
name: "wunderlist",
|
||||||
host: "https://to-do.office.com",
|
host: "https://www.wunderlist.com",
|
||||||
urlPatterns: [":host:/tasks/id/:id(*)"],
|
urlPatterns: [":host:/(webapp)#/tasks/:id(/*)"],
|
||||||
description: (document) =>
|
description: (document) =>
|
||||||
document
|
document
|
||||||
.querySelector(".detailHeader")
|
.querySelector(".taskItem.selected .taskItem-titleWrapper-title")
|
||||||
?.textContent?.replace(/^[^[]+\[/, "[")
|
?.textContent?.trim(),
|
||||||
.replace(projectRegex, "")
|
projectId: projectIdentifierBySelector(".taskItem.selected .taskItem-titleWrapper-title"),
|
||||||
.trim(),
|
|
||||||
projectId: projectIdentifierBySelector(".detailHeader"),
|
|
||||||
allowHostOverride: false,
|
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": {
|
"gitlab-mr": {
|
||||||
name: "gitlab",
|
name: "gitlab",
|
||||||
host: "https://gitlab.com",
|
host: "https://gitlab.com",
|
||||||
@@ -174,7 +161,6 @@ export default {
|
|||||||
},
|
},
|
||||||
allowHostOverride: true,
|
allowHostOverride: true,
|
||||||
},
|
},
|
||||||
*/
|
|
||||||
|
|
||||||
monday: {
|
monday: {
|
||||||
name: "monday",
|
name: "monday",
|
||||||
|
|||||||
@@ -28,8 +28,6 @@ export function tabUpdated(tab, { messenger, settings }) {
|
|||||||
const service = matcher(tab.url)
|
const service = matcher(tab.url)
|
||||||
const apiClient = new ApiClient(settings)
|
const apiClient = new ApiClient(settings)
|
||||||
|
|
||||||
// console.log(service)
|
|
||||||
|
|
||||||
if (service?.match?.id) {
|
if (service?.match?.id) {
|
||||||
messenger.postMessage(tab, { type: "requestService" })
|
messenger.postMessage(tab, { type: "requestService" })
|
||||||
|
|
||||||
@@ -69,7 +67,7 @@ export function settingsChanged(settings, { messenger }) {
|
|||||||
queryTabs({ currentWindow: true })
|
queryTabs({ currentWindow: true })
|
||||||
.then(reject(isBrowserTab))
|
.then(reject(isBrowserTab))
|
||||||
.then(
|
.then(
|
||||||
forEach((tab) => {
|
forEach(tab => {
|
||||||
messenger.postMessage(tab, { type: "closePopup" })
|
messenger.postMessage(tab, { type: "closePopup" })
|
||||||
tabUpdated(tab, { settings, messenger })
|
tabUpdated(tab, { settings, messenger })
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ module.exports = (env) => {
|
|||||||
...manifest,
|
...manifest,
|
||||||
permissions: compact([
|
permissions: compact([
|
||||||
...manifest.permissions,
|
...manifest.permissions,
|
||||||
env.NODE_ENV === "development" ? "https://*.mocoapp.com/*" : null,
|
env.NODE_ENV === "development" ? "http://*.mocoapp.localhost/*" : null,
|
||||||
]),
|
]),
|
||||||
options_ui: {
|
options_ui: {
|
||||||
...manifest.options_ui,
|
...manifest.options_ui,
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ module.exports = (env) => {
|
|||||||
...manifest,
|
...manifest,
|
||||||
permissions: compact([
|
permissions: compact([
|
||||||
...manifest.permissions,
|
...manifest.permissions,
|
||||||
env.NODE_ENV === "development" ? "https://*.mocoapp.com/*" : null,
|
env.NODE_ENV === "development" ? "http://*.mocoapp.localhost/*" : null,
|
||||||
]),
|
]),
|
||||||
options_ui: {
|
options_ui: {
|
||||||
...manifest.options_ui,
|
...manifest.options_ui,
|
||||||
|
|||||||
@@ -6402,10 +6402,10 @@ prettier-linter-helpers@^1.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
fast-diff "^1.1.2"
|
fast-diff "^1.1.2"
|
||||||
|
|
||||||
prettier@^2.0.5:
|
prettier@^2.1.2:
|
||||||
version "2.1.1"
|
version "2.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.1.1.tgz#d9485dd5e499daa6cb547023b87a6cf51bee37d6"
|
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.1.2.tgz#3050700dae2e4c8b67c4c3f666cdb8af405e1ce5"
|
||||||
integrity sha512-9bY+5ZWCfqj3ghYBLxApy2zf6m+NJo5GzmLTpr9FsApsfjriNnS2dahWReHMi7qNPhhHl9SYHJs2cHZLgexNIw==
|
integrity sha512-16c7K+x4qVlJg9rEbXl7HEGmQyZlG4R9AgP+oHKRMsMsuk8s+ATStlf1NpDqyBI1HpVyfjLOeMhH2LvuNvV5Vg==
|
||||||
|
|
||||||
pretty-error@^2.1.1:
|
pretty-error@^2.1.1:
|
||||||
version "2.1.1"
|
version "2.1.1"
|
||||||
|
|||||||
Reference in New Issue
Block a user