Compare commits
1 Commits
master
...
dependabot
Author | SHA1 | Date | |
---|---|---|---|
|
ffd32afdd8 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,3 @@
|
|||||||
node_modules/
|
node_modules/
|
||||||
build/
|
build/
|
||||||
.env
|
.env
|
||||||
/.idea
|
|
||||||
|
@ -5,12 +5,6 @@ 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/),
|
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).
|
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
|
## [1.5.1] - 2020-08-04
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
- run `yarn start:chrome` or `yarn start:firefox` (`yarn start` is an alias for `yarn start:chrome`)
|
- run `yarn start:chrome` or `yarn start:firefox` (`yarn start` is an alias for `yarn start:chrome`)
|
||||||
- load extension into browser:
|
- load extension into browser:
|
||||||
- Chrome: visit `chrome://extensions` and load unpacked extension from `build/chrome`
|
- Chrome: visit `chrome://extensions` and load unpacked extension from `build/chrome`
|
||||||
- Firefox: visit `about:debugging` and load temporary Add-on from `build/firefox/manifest.json`
|
- Firefox: visit `about:debugging` and load temporary Add-on from `build/firefox`
|
||||||
- the browser should automatically pick up your changes but from time to time it may be useful to reload the extension
|
- reload browser extension after change
|
||||||
|
|
||||||
## Production Build
|
## Production Build
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "moco-browser-extensions",
|
"name": "moco-browser-extensions",
|
||||||
"description": "Browser plugin for MOCO",
|
"description": "Browser plugin for MOCO",
|
||||||
"version": "1.5.2",
|
"version": "1.5.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "yarn start:chrome",
|
"start": "yarn start:chrome",
|
||||||
@ -17,7 +17,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/polyfill": "^7.10.1",
|
"@babel/polyfill": "^7.10.1",
|
||||||
"axios": "^0.19.2",
|
"axios": "^0.20.0",
|
||||||
"classnames": "^2.2.6",
|
"classnames": "^2.2.6",
|
||||||
"date-fns": "^2.15.0",
|
"date-fns": "^2.15.0",
|
||||||
"dotenv": "^8.2.0",
|
"dotenv": "^8.2.0",
|
||||||
|
@ -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`)
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,6 @@ import UnknownError from "components/Errors/UnknownError"
|
|||||||
import Header from "./shared/Header"
|
import Header from "./shared/Header"
|
||||||
import { head } from "lodash"
|
import { head } from "lodash"
|
||||||
import TimeInputParser from "utils/TimeInputParser"
|
import TimeInputParser from "utils/TimeInputParser"
|
||||||
import {get} from "lodash/fp";
|
|
||||||
|
|
||||||
@observer
|
@observer
|
||||||
class App extends Component {
|
class App extends Component {
|
||||||
@ -69,12 +68,11 @@ class App extends Component {
|
|||||||
|
|
||||||
@computed get project() {
|
@computed get project() {
|
||||||
const { service, projects, lastProjectId } = this.props
|
const { service, projects, lastProjectId } = this.props
|
||||||
|
|
||||||
return (
|
return (
|
||||||
findProjectByValue(this.changeset.assignment_id)(projects) ||
|
findProjectByValue(this.changeset.assignment_id)(projects) ||
|
||||||
findProjectByValue(Number(lastProjectId))(projects) ||
|
|
||||||
findProjectByIdentifier(service?.projectId)(projects) ||
|
findProjectByIdentifier(service?.projectId)(projects) ||
|
||||||
head(projects.flatMap(get("options")))
|
findProjectByValue(Number(lastProjectId))(projects) ||
|
||||||
|
head(projects)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import "mobx-react-lite/batchingForReactDom"
|
||||||
import React, { createRef } from "react"
|
import React, { createRef } from "react"
|
||||||
import ReactDOM from "react-dom"
|
import ReactDOM from "react-dom"
|
||||||
import { Transition, animated, config } from "react-spring/renderprops"
|
import { Transition, animated, config } from "react-spring/renderprops"
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import "mobx-react-lite/batchingForReactDom"
|
||||||
import React from "react"
|
import React from "react"
|
||||||
import ReactDOM from "react-dom"
|
import ReactDOM from "react-dom"
|
||||||
import Options from "./components/Options"
|
import Options from "./components/Options"
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import "mobx-react-lite/batchingForReactDom"
|
||||||
import React from "react"
|
import React from "react"
|
||||||
import ReactDOM from "react-dom"
|
import ReactDOM from "react-dom"
|
||||||
import App from "./components/App"
|
import App from "./components/App"
|
||||||
|
@ -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 })
|
||||||
}),
|
}),
|
||||||
@ -77,7 +75,7 @@ export function settingsChanged(settings, { messenger }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function togglePopup(tab, { messenger }) {
|
export function togglePopup(tab, { messenger }) {
|
||||||
return function ({ isOpen, service } = {}) {
|
return function({ isOpen, service } = {}) {
|
||||||
if (isNil(isOpen)) {
|
if (isNil(isOpen)) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user