Compare commits
1 Commits
master
...
dependabot
Author | SHA1 | Date | |
---|---|---|---|
|
9495365a53 |
@ -44,7 +44,7 @@
|
||||
"babel-loader": "^8.1.0",
|
||||
"babel-plugin-module-resolver": "^4.0.0",
|
||||
"clean-webpack-plugin": "^3.0.0",
|
||||
"copy-webpack-plugin": "^6.0.2",
|
||||
"copy-webpack-plugin": "^6.1.1",
|
||||
"copyfiles": "^2.3.0",
|
||||
"css-loader": "^4.2.0",
|
||||
"eslint": "7.6.0",
|
||||
|
@ -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,
|
||||
|
17
yarn.lock
17
yarn.lock
@ -2661,10 +2661,10 @@ copy-descriptor@^0.1.0:
|
||||
resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d"
|
||||
integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=
|
||||
|
||||
copy-webpack-plugin@^6.0.2:
|
||||
version "6.1.0"
|
||||
resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-6.1.0.tgz#5bde7f826d87e716d8d5e761ddd34bb675448458"
|
||||
integrity sha512-aWjIuLt1OVQxaDVffnt3bnGmLA8zGgAJaFwPA+a+QYVPh1vhIKjVfh3SbOFLV0kRPvGBITbw17n5CsmiBS4LQQ==
|
||||
copy-webpack-plugin@^6.1.1:
|
||||
version "6.1.1"
|
||||
resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-6.1.1.tgz#737a3ba21c16cc6ddca972f5cf8de25568ca0616"
|
||||
integrity sha512-4TlkHFYkrZ3WppLA5XkPmBLI5lnEpFsXvpeqxCf5PzkratZiVklNXsvoQkLhUU43q7ZL3AOXtaHAd9jLNJoU0w==
|
||||
dependencies:
|
||||
cacache "^15.0.5"
|
||||
fast-glob "^3.2.4"
|
||||
@ -2675,7 +2675,7 @@ copy-webpack-plugin@^6.0.2:
|
||||
normalize-path "^3.0.0"
|
||||
p-limit "^3.0.2"
|
||||
schema-utils "^2.7.1"
|
||||
serialize-javascript "^4.0.0"
|
||||
serialize-javascript "^5.0.1"
|
||||
webpack-sources "^1.4.3"
|
||||
|
||||
copyfiles@^2.3.0:
|
||||
@ -7131,6 +7131,13 @@ serialize-javascript@^4.0.0:
|
||||
dependencies:
|
||||
randombytes "^2.1.0"
|
||||
|
||||
serialize-javascript@^5.0.1:
|
||||
version "5.0.1"
|
||||
resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-5.0.1.tgz#7886ec848049a462467a97d3d918ebb2aaf934f4"
|
||||
integrity sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==
|
||||
dependencies:
|
||||
randombytes "^2.1.0"
|
||||
|
||||
set-blocking@^2.0.0, set-blocking@~2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
|
||||
|
Loading…
Reference in New Issue
Block a user