From 1755f2ff83612fa7d29ace7edae79109908574f5 Mon Sep 17 00:00:00 2001 From: mat1th Date: Thu, 8 Jun 2017 16:13:58 +0200 Subject: [PATCH 1/4] add ESLint to gulp and fix some eslint errors; --- gulpfile.babel.js | 14 +++++++- src/scripts/background/data.js | 20 +++++------ src/scripts/background/findUserData.js | 34 ++++++++++++++++-- src/scripts/background/mantisApi.js | 4 +-- src/scripts/components/button.js | 2 +- src/scripts/components/commentbox/fileItem.js | 2 +- src/scripts/components/commentbox/index.js | 33 ++++++++++------- src/scripts/components/inputText/index.js | 2 +- src/scripts/components/loader/index.js | 2 +- src/scripts/components/rootElement/index.js | 5 +-- src/scripts/components/router/index.js | 4 ++- .../components/selector/SelectorBackground.js | 2 +- src/scripts/components/selector/index.js | 14 ++++---- .../components/selector/selectorHelper.js | 2 +- src/scripts/components/setup/index.js | 35 +++++++++++++------ .../components/textareaAutosize/index.js | 6 ++-- src/scripts/components/ticketsOnPage/index.js | 14 ++++++-- src/scripts/components/toolbar/index.js | 4 +-- .../userTour/helpers/position-helpers.js | 4 +-- src/scripts/components/userTour/index.js | 2 ++ src/scripts/config/icon.js | 4 +-- src/scripts/config/tourSteps.js | 2 +- src/scripts/utils/ext.js | 24 +++++++++---- src/scripts/utils/helpers.js | 10 +++--- src/scripts/utils/message.js | 3 +- src/scripts/utils/validate.js | 4 +-- src/styles/components/form.scss | 5 +-- 27 files changed, 175 insertions(+), 82 deletions(-) diff --git a/gulpfile.babel.js b/gulpfile.babel.js index 83c4bd7..15639c0 100755 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -93,6 +93,7 @@ gulp.task('watch', ['build'], () => { $.runSequence('icons', $.livereload.reload); }); gulp.watch(['./src/scripts/**/*']).on('change', () => { + $.runSequence('lint.js'); $.runSequence('js', $.livereload.reload); }); gulp.watch(['./src/styles/**/*']).on('change', () => { @@ -153,6 +154,16 @@ gulp.task('js', () => { return buildJS(target); }); +gulp.task('lint.js', () => { // generate a zip + return gulp.src(['./src/scripts/background/*.js', './src/scripts/components/**/*.js', './src/scripts/config/*.js', './src/scripts/utils/*.js']).pipe($.eslint()) + // $.eslint.format() outputs the lint results to the console. + // Alternatively use $.eslint.formatEach() (see Docs). + .pipe($.eslint.format()) + // To have the process exit with an error code (1) on + // lint error, return the stream and pipe to failAfterError last. + // .pipe($.eslint.failAfterError()); +}); + gulp.task('styles', () => { return gulp.src([`src/styles/index.${target}.scss`]) .pipe($.plumber()) @@ -213,6 +224,7 @@ gulp.task('dist', (cb) => { // generate a zip $.runSequence('build', 'zip', cb); }); + gulp.task('zip', () => { return pipe(`./build/${target}/**/*`, $.zip(`${target}.zip`), './dist'); }); @@ -258,7 +270,7 @@ function buildJS(target) { let tasks = files.map(file => { return browserify({ entries: 'src/scripts/' + file.source, - debug: true + debug: !production }) .transform('babelify', { presets: [ diff --git a/src/scripts/background/data.js b/src/scripts/background/data.js index b017249..89e4895 100644 --- a/src/scripts/background/data.js +++ b/src/scripts/background/data.js @@ -63,14 +63,14 @@ const data = (() => { }); } - //clean all tickets an user acount data; - function cleanAll() { - console.log('>-------- The app is cleaned'); - setStorage({ - savedTickets: [], - savedSites: [] - }); - } + // //clean all tickets an user acount data; + // function cleanAll() { + // console.log('>-------- The app is cleaned'); + // setStorage({ + // savedTickets: [], + // savedSites: [] + // }); + // } //genreal funcitons function getStorage(key) { @@ -181,7 +181,7 @@ const data = (() => { filtertTickets: filtertTickets, filtertTicketsAmout: filtertTickets.length, allTicketsFromThisWebsite: amountTicketsOnWebsite, - allTicketsFromThisWebsiteAmount: amountTicketsOnWebsite.length, + allTicketsFromThisWebsiteAmount: amountTicketsOnWebsite.length }); }).catch(function (err) { @@ -216,7 +216,7 @@ const data = (() => { account: { userName: accountUserName, passWord: accountPassword, - token: accountToken, + token: accountToken }, tool: { project: toolProjectId, diff --git a/src/scripts/background/findUserData.js b/src/scripts/background/findUserData.js index e3c199d..566f354 100644 --- a/src/scripts/background/findUserData.js +++ b/src/scripts/background/findUserData.js @@ -17,10 +17,40 @@ var data = (() => { browserVersion: browserConfig.version, osversion: browserConfig.osversion, user_agent: window.navigator.appVersion, - os: (browserConfig.mac) ? 'mac' : false || (browserConfig.windows) ? 'windows' : false || (browserConfig.windowsphone) ? 'windowsphone' : false || (browserConfig.linux) ? 'linux' : false || (browserConfig.chromeos) ? 'chromeos' : false || (browserConfig.android) ? 'android' : false || (browserConfig.ios) ? 'ios' : false || (browserConfig.blackberry) ? 'blackberry' : false || (browserConfig.firefoxos) ? 'firefoxos' : false || (browserConfig.webos) ? 'webos' : false || (browserConfig.bada) ? 'bada' : false || (browserConfig.tizen) ? 'tizen' : false || (browserConfig.sailfish) ? 'sailfish' : false + os: getOs() }; }; + function getOs() { + if (browserConfig.mac) { + return 'mac'; + } else if (browserConfig.windows) { + return 'windows'; + } else if (browserConfig.windowsphone) { + return 'windowsphone'; + } else if (browserConfig.linux) { + return 'linux'; + } else if (browserConfig.chromeos) { + return 'chromeos'; + } else if (browserConfig.android) { + return 'android'; + } else if (browserConfig.ios) { + return 'ios'; + } else if (browserConfig.blackberry) { + return 'blackberry'; + } else if (browserConfig.firefoxos) { + return 'firefoxos'; + } else if (browserConfig.webos) { + return 'webos'; + } else if (browserConfig.bada) { + return 'bada'; + } else if (browserConfig.tizen) { + return 'tizen'; + } else if (browserConfig.sailfish) { + return 'sailfish'; + } + return false; + } /** * Get specific user data @@ -35,7 +65,7 @@ var data = (() => { shortlink: shortlink, hostname: hostname, time: new Date(), - screenresolution: screenresolution, + screenresolution: screenresolution // history: getHistory() }; diff --git a/src/scripts/background/mantisApi.js b/src/scripts/background/mantisApi.js index 33d6984..c18f7f2 100644 --- a/src/scripts/background/mantisApi.js +++ b/src/scripts/background/mantisApi.js @@ -136,10 +136,10 @@ let mantisApi = (() => { os_build: newTicketObject.data.browserData.osversion, priority: { id: (newTicketObject.isImportant === true) ? IMPORTANT_WEIGHT : NOMAL_WEIGHT, - name: (newTicketObject.isImportant === true) ? 'height' : 'normal', + name: (newTicketObject.isImportant === true) ? 'height' : 'normal' }, steps_to_reproduce: JSON.stringify(newTicketObject.data), - category: 'General', //This one is requert by mantis. + category: 'General' //This one is requert by mantis. // attachments: newTicketObject.assets }; diff --git a/src/scripts/components/button.js b/src/scripts/components/button.js index c0e5894..2bb17c9 100644 --- a/src/scripts/components/button.js +++ b/src/scripts/components/button.js @@ -1,7 +1,7 @@ 'use strict'; /* Setup ==================================================================== */ -import React, {Component} from 'react'; +import React, {Component} from 'react'; // eslint-disable-line no-unused-vars /* Component ==================================================================== */ class Button extends Component { diff --git a/src/scripts/components/commentbox/fileItem.js b/src/scripts/components/commentbox/fileItem.js index 2f1a22d..33d2629 100644 --- a/src/scripts/components/commentbox/fileItem.js +++ b/src/scripts/components/commentbox/fileItem.js @@ -1,7 +1,7 @@ 'use strict'; /* Setup ==================================================================== */ -import React, {Component} from 'react'; +import React, {Component} from 'react'; // eslint-disable-line no-unused-vars import helpers, {translate} from '../../utils/helpers'; diff --git a/src/scripts/components/commentbox/index.js b/src/scripts/components/commentbox/index.js index d945c45..01944d2 100644 --- a/src/scripts/components/commentbox/index.js +++ b/src/scripts/components/commentbox/index.js @@ -1,13 +1,14 @@ 'use strict'; /* Setup ==================================================================== */ +/*eslint-disable no-unused-vars*/ import React, {Component} from 'react'; import Anime from 'react-anime'; import message from '../../utils/message.js'; //import components -import Button from '../button' +import Button from '../button'; import TextareaAutosize from '../textareaAutosize'; import FileItem from './fileItem'; import Loader from '../loader'; @@ -17,6 +18,7 @@ import helpers, {translate} from '../../utils/helpers'; import generalConfig from '../../config/general'; // import data from '../../utils/data''Turn Layernotes On' import routerHelper from '../router/routerHelper'; +/*eslint-enable no-unused-vars*/ /* Component ==================================================================== */ class CommentBox extends Component { @@ -60,15 +62,9 @@ class CommentBox extends Component { super(props); this.state = { isError: false, //it the error should be shown - errorText: '', // the error text - scale: [1] //Do not scale by default + errorText: '' // the error text }; } - componentWillUnmount() { - this.setState({ - scale: [1, 0.3] - }); - } /** * Adds for normal inputs @@ -233,8 +229,19 @@ class CommentBox extends Component { //set the posiotn of the comment box _setPosition = () => { const MAX_POSITON_BOTTOM = 250; + const HEIGHT = { + CONTENTMODE: 231, + ELSE: 192, + EDDITMODE: 480 + }; + const SPACEING = 100; + const PADDING = 15; //-------------------------------------------------------------------------------standard height with edit bar: standard height without eddit bar ------------------------------------------- the margin; - const commentBoxHeight = (document.querySelector('.ln-commentbox') === null) ? ((this.props.inEditMode) ? 231 : 192) : document.querySelector('.ln-commentbox').getBoundingClientRect().height + 15; + const commentBoxHeight = (document.querySelector('.ln-commentbox') === null) + ? ((this.props.inEditMode) + ? HEIGHT.CONTENTMODE + : HEIGHT.ELSE) + : document.querySelector('.ln-commentbox').getBoundingClientRect().height + PADDING; //this comment box is used 2 times in the app. When creating and edditigng isseu; let position = { @@ -249,8 +256,8 @@ class CommentBox extends Component { position.style.left = this.props.ticket.position.x; //when the position of the box is on the right side posion the box on the right; - if (this.props.ticket.position.x > (generalConfig.maxX(0) / 2) - 100) { - position.style.left = this.props.ticket.position.x - 480 + this.props.ticket.position.width; + if (this.props.ticket.position.x > (generalConfig.maxX(0) / 2) - SPACEING) { + position.style.left = this.props.ticket.position.x - HEIGHT.EDDITMODE + this.props.ticket.position.width; position.class = 'ln-commentbox-right'; } position.style.top = this.props.ticket.position.height + this.props.ticket.position.y; //only add the top prop to the style when creating; @@ -260,7 +267,7 @@ class CommentBox extends Component { } if (this.props.ticket.position.y > helpers.pageHeight() - this.props.ticket.position.height - MAX_POSITON_BOTTOM) { - position.style.transform = - (commentBoxHeight + this.props.ticket.position.height); + position.style.transform = -(commentBoxHeight + this.props.ticket.position.height); position.class = position.class + ' ln-commentbox-top'; } @@ -346,7 +353,7 @@ class CommentBox extends Component { render = () => { return ( - +
{this._renderOverLay()} diff --git a/src/scripts/components/inputText/index.js b/src/scripts/components/inputText/index.js index 9a8fa62..de256c5 100644 --- a/src/scripts/components/inputText/index.js +++ b/src/scripts/components/inputText/index.js @@ -3,7 +3,7 @@ /* Setup ==================================================================== */ //imports -import React, {Component} from 'react'; +import React, {Component} from 'react'; // eslint-disable-line no-unused-vars import validate from '../../utils/validate'; import {translate} from '../../utils/helpers'; diff --git a/src/scripts/components/loader/index.js b/src/scripts/components/loader/index.js index dda68e0..937b12a 100644 --- a/src/scripts/components/loader/index.js +++ b/src/scripts/components/loader/index.js @@ -3,7 +3,7 @@ /* Setup ==================================================================== */ //imports -import React, {Component} from 'react'; +import React, {Component} from 'react'; // eslint-disable-line no-unused-vars /* Component ==================================================================== */ class Loader extends Component { diff --git a/src/scripts/components/rootElement/index.js b/src/scripts/components/rootElement/index.js index 677963c..ba5ab01 100644 --- a/src/scripts/components/rootElement/index.js +++ b/src/scripts/components/rootElement/index.js @@ -1,13 +1,14 @@ 'use strict'; /* Setup ==================================================================== */ -import React, {Component} from 'react'; + +import React, {Component} from 'react'; // eslint-disable-line no-unused-vars //import helpers import helpers from '../../utils/helpers'; // Components -import Router from '../router'; +import Router from '../router'; // eslint-disable-line no-unused-vars /* Component ==================================================================== */ class Root extends Component { diff --git a/src/scripts/components/router/index.js b/src/scripts/components/router/index.js index 3c28fba..daa2540 100644 --- a/src/scripts/components/router/index.js +++ b/src/scripts/components/router/index.js @@ -1,6 +1,7 @@ 'use strict'; /* Setup ==================================================================== */ +/*eslint-disable no-unused-vars*/ import React, {Component} from 'react'; import Tour from '../../components/userTour'; @@ -9,8 +10,9 @@ import ext from '../../utils/ext'; // Components import ToolBar from '../toolbar'; import Selector from '../selector'; -import Setup from '../setup' +import Setup from '../setup'; import TicketsOnPage from '../ticketsOnPage'; +/*eslint-disable no-unused-vars*/ //data import tourSteps from '../../config/tourSteps'; diff --git a/src/scripts/components/selector/SelectorBackground.js b/src/scripts/components/selector/SelectorBackground.js index 447cdbf..6c1f6e5 100644 --- a/src/scripts/components/selector/SelectorBackground.js +++ b/src/scripts/components/selector/SelectorBackground.js @@ -1,7 +1,7 @@ 'use strict'; /* Setup ==================================================================== */ -import React, {Component} from 'react'; +import React, {Component} from 'react'; // eslint-disable-line no-unused-vars /* Component ==================================================================== */ class SelectorBackground extends Component { diff --git a/src/scripts/components/selector/index.js b/src/scripts/components/selector/index.js index 5f1ed1b..1186a66 100644 --- a/src/scripts/components/selector/index.js +++ b/src/scripts/components/selector/index.js @@ -1,19 +1,19 @@ 'use strict'; /* Setup ==================================================================== */ -import React, {Component} from 'react'; +import React, {Component} from 'react'; // eslint-disable-line no-unused-vars //tools import generalConfig from '../../config/general'; //helpers import {setMinMaxWidth} from '../../utils/helpers'; -import SelectorHelper from './selectorHelper'; -import routerHelper from '../router/routerHelper' +import SelectorHelper from './selectorHelper'; // eslint-disable-line no-unused-vars +import routerHelper from '../router/routerHelper'; //components -import SelectorBackground from './SelectorBackground' -import CommentBox from './../commentbox'; +import SelectorBackground from './SelectorBackground'; // eslint-disable-line no-unused-vars +import CommentBox from './../commentbox'; // eslint-disable-line no-unused-vars import helpers, {translate} from '../../utils/helpers'; import message from '../../utils/message'; @@ -99,7 +99,7 @@ class Selector extends Component { this.setState({ isDrawing: true, //set drawing state startX: this.state.x, //x position - startY: this.state.y, //y position + startY: this.state.y //y position }); this._onMouseMove(e); } @@ -127,7 +127,7 @@ class Selector extends Component { content: image.data, show: false, file_type: 'image/jpeg', - id: helpers.generateUUID(), //a random genreated id + id: helpers.generateUUID() //a random genreated id }; oldState.push(newScreenshot); let newStateTicket = helpers.setNewState(_this.state.ticket, 'assets', oldState); diff --git a/src/scripts/components/selector/selectorHelper.js b/src/scripts/components/selector/selectorHelper.js index d8d93c6..33f3433 100644 --- a/src/scripts/components/selector/selectorHelper.js +++ b/src/scripts/components/selector/selectorHelper.js @@ -1,7 +1,7 @@ 'use strict'; /* Setup ==================================================================== */ -import React, {Component} from 'react'; +import React, {Component} from 'react'; // eslint-disable-line no-unused-vars import generalConfig from '../../config/general'; //helpers diff --git a/src/scripts/components/setup/index.js b/src/scripts/components/setup/index.js index 4339f46..b36a377 100644 --- a/src/scripts/components/setup/index.js +++ b/src/scripts/components/setup/index.js @@ -1,14 +1,14 @@ 'use strict'; /* Setup ==================================================================== */ -import React, {Component} from 'react'; +import React, {Component} from 'react'; // eslint-disable-line no-unused-vars //Component -import Input from '../inputText'; -import Loader from '../loader'; +import Input from '../inputText'; // eslint-disable-line no-unused-vars +import Loader from '../loader'; // eslint-disable-line no-unused-vars //general funcions -import {translate} from '../../utils/helpers' +import {translate} from '../../utils/helpers'; import generalData from '../../config/general'; //helpers @@ -27,7 +27,7 @@ class Setup extends Component { value: 'mantis' }, { name: 'Github', - value: 'github', + value: 'github' }, { name: translate('setupExistingProject'), @@ -103,6 +103,11 @@ class Setup extends Component { //check the credentials from the user _checkCredetionals = (e) => { + const SLIDES = { + ONE: 1, + TWO: 2, + TREE: 3 + }; let _this = this; e.preventDefault(); if (this.state.accountUserName.length < 2 && this.state.accountPassword.length < 2 && this.state.toolUrl.length < 2) { @@ -127,7 +132,7 @@ class Setup extends Component { //go the the next step setTimeout(function() { - _this._nextStep(3); + _this._nextStep(SLIDES.TREE); }, 500); } else { @@ -148,24 +153,34 @@ class Setup extends Component { //the first stpe submit _selectBugtracker = (e) => { + const SLIDES = { + ONE: 1, + TWO: 2, + TREE: 3 + }; + e.preventDefault(); if (this.state.toolName.length < 1) { this._setError(translate('setupMissingBugtracker')); } else if (this.state.toolName === 'existing') { //check if the user chooses a existing login. If this happens go to the 3th step. - this._nextStep(3); + this._nextStep(SLIDES.TREE); } else { //the user chooses a new tool. - this._nextStep(2); + this._nextStep(SLIDES.TWO); } } //the second step - _setProject = (e) =>{ + _setProject = () =>{ + const SLIDES = { + FOUR: 4 + }; + let _this = this; this._setLoading(translate('setupSaving')); setTimeout(function() { - _this._nextStep(4); + _this._nextStep(SLIDES.FOUR); }, 2000); //save the ticket diff --git a/src/scripts/components/textareaAutosize/index.js b/src/scripts/components/textareaAutosize/index.js index ddff38a..44ebad9 100644 --- a/src/scripts/components/textareaAutosize/index.js +++ b/src/scripts/components/textareaAutosize/index.js @@ -1,3 +1,5 @@ +/*eslint-disable no-unused-vars*/ + //based on https://github.com/andreypopp/react-textarea-autosize/blob/master/src/TextareaAutosize.js /** * @@ -83,14 +85,14 @@ export default class TextareaAutosize extends React.Component { maxRows: _maxRows, onHeightChange: _onHeightChange, useCacheForDOMMeasurements: _useCacheForDOMMeasurements, - ...props, + ...props } = this.props; if (typeof valueLink === 'object') { props.value = valueLink.value; } props.style = { ...props.style, - height: this.state.height || 0, + height: this.state.height || 0 }; let maxHeight = Math.max( props.style.maxHeight ? props.style.maxHeight : Infinity, diff --git a/src/scripts/components/ticketsOnPage/index.js b/src/scripts/components/ticketsOnPage/index.js index 24aff68..5cbc535 100644 --- a/src/scripts/components/ticketsOnPage/index.js +++ b/src/scripts/components/ticketsOnPage/index.js @@ -1,10 +1,11 @@ 'use strict'; /* Setup ==================================================================== */ +/*eslint-disable no-unused-vars*/ import React, {Component} from 'react'; import Anime from 'react-anime'; -import generalData from '../../config/general' +import generalData from '../../config/general'; //components import ToolBar from '../../components/toolbar'; @@ -16,6 +17,8 @@ import CommentBox from '../../components/commentbox'; import {translate} from '../../utils/helpers'; import message from '../../utils/message'; +/*eslint-disable no-unused-vars*/ + /* Component ==================================================================== */ class TicketsOnPage extends Component { constructor(props) { @@ -29,7 +32,7 @@ class TicketsOnPage extends Component { loadingText: translate('loadingText'), total: 0, filtertTotal: 0 - } + }; } componentWillMount() { @@ -41,7 +44,7 @@ class TicketsOnPage extends Component { hostname: generalData.hostname, shortlink: generalData.shortlink }).then(function(tickets) { - + console.log('ickets.data.filtertTickets', tickets.data.filtertTickets[0]); //set all tickets _this.setState({savedTickets: tickets.data.filtertTickets, filtertTotal: tickets.data.filtertTicketsAmout, total: tickets.data.allTicketsFromThisWebsiteAmount}); }); @@ -50,11 +53,14 @@ class TicketsOnPage extends Component { //show the comment box or not _showCommentBox = (e) => { e.preventDefault(); + console.log('this.state.savedTickets', this.state.savedTickets); var ticket = this.state.savedTickets.filter(function(ticket) { if (ticket.id === e.target.getAttribute('data-id')) { //add the date to the comment box return ticket; } }); + console.log('ticket', ticket); + console.log('ticket[0', ticket[0]); this.setState({selectedTicket: ticket[0], showCommentbox: true}); } @@ -102,6 +108,8 @@ class TicketsOnPage extends Component { _renderIcons = () => { let _this = this; let savedTickets = this.state.savedTickets.map(function(ticket) { + console.log('_this.state.selectedTicket', _this.state.selectedTicket); + console.log('ticket.id', ticket.id); let buttonClass = (_this.state.selectedTicket.id === ticket.id) ? 'active' : ''; diff --git a/src/scripts/components/toolbar/index.js b/src/scripts/components/toolbar/index.js index 7fd1426..498891c 100644 --- a/src/scripts/components/toolbar/index.js +++ b/src/scripts/components/toolbar/index.js @@ -3,8 +3,8 @@ /* Setup ==================================================================== */ //imports -import React, {Component} from 'react'; -import Anime from 'react-anime'; +import React, {Component} from 'react'; // eslint-disable-line no-unused-vars +import Anime from 'react-anime'; // eslint-disable-line no-unused-vars //tools import ext from '../../utils/ext'; diff --git a/src/scripts/components/userTour/helpers/position-helpers.js b/src/scripts/components/userTour/helpers/position-helpers.js index 6dd6b4f..c2a2a42 100755 --- a/src/scripts/components/userTour/helpers/position-helpers.js +++ b/src/scripts/components/userTour/helpers/position-helpers.js @@ -13,7 +13,7 @@ const positions = { positioned: 'left' }; }, - top: ({position, tourElHeight, arrowSize, margin}) => { + top: ({position}) => { return { left: position.left, top: (position.top + window.pageYOffset), @@ -27,7 +27,7 @@ const positions = { positioned: 'topLeft' }; }, - bottom: ({position, arrowSize, offsetHeight, margin}) => { + bottom: ({position, arrowSize, offsetHeight}) => { return { left: position.left, top: (position.top + window.pageYOffset) + offsetHeight + arrowSize, diff --git a/src/scripts/components/userTour/index.js b/src/scripts/components/userTour/index.js index fe36a99..2456c3d 100755 --- a/src/scripts/components/userTour/index.js +++ b/src/scripts/components/userTour/index.js @@ -1,5 +1,6 @@ //Modified from https://github.com/socialtables/react-user-tour +/*eslint-disable no-unused-vars*/ import React, {Component} from 'react'; import Anime from 'react-anime'; @@ -7,6 +8,7 @@ import Button from '../button'; import positions from './helpers/position-helpers'; import * as viewBoxHelpers from './helpers/viewbox-helpers'; import scrollToPosition from './helpers/scroll-to-position'; +/*eslint-disable no-unused-vars*/ /* Component ==================================================================== */ export default class ReactUserTour extends Component { diff --git a/src/scripts/config/icon.js b/src/scripts/config/icon.js index e7f272a..b27fe5b 100644 --- a/src/scripts/config/icon.js +++ b/src/scripts/config/icon.js @@ -50,7 +50,7 @@ let iconConfig = (() => { if (tab.id === opendTabNumer) { //insert js; ext.tabs.executeScript(tab.id, { - file: 'scripts/contentscript/index.js', + file: 'scripts/contentscript/index.js' // frameId: tab.id // // "run_at": "document_start", @@ -59,7 +59,7 @@ let iconConfig = (() => { //insert css; ext.tabs.insertCSS(tab.id, { - file: 'styles/index.css', + file: 'styles/index.css' // cssOrigin: 'user' }); } else { diff --git a/src/scripts/config/tourSteps.js b/src/scripts/config/tourSteps.js index cfa8ed3..995f148 100644 --- a/src/scripts/config/tourSteps.js +++ b/src/scripts/config/tourSteps.js @@ -21,7 +21,7 @@ const tourSteps = [{ body: translate('userTourStepTreeBody'), onStart: () => { routerHelper.setStateApp('startIssue'); - }, + } }, { step: 4, selector: '.ln-tickets-on-page--ticket', // a ticket diff --git a/src/scripts/utils/ext.js b/src/scripts/utils/ext.js index 61be5fa..968d144 100755 --- a/src/scripts/utils/ext.js +++ b/src/scripts/utils/ext.js @@ -35,35 +35,47 @@ function Extension() { if (chrome[api]) { _this[api] = chrome[api]; } - } catch (e) {} + } catch (e) { + console.log('NOTFOUND_ERR:', e); + } try { if (window[api]) { _this[api] = window[api]; } - } catch (e) {} + } catch (e) { + console.log('NOTFOUND_ERR:', e); + } try { if (browser[api]) { _this[api] = browser[api]; } - } catch (e) {} + } catch (e) { + console.log('NOTFOUND_ERR:', e); + } try { _this.api = browser.extension[api]; - } catch (e) {} + } catch (e) { + console.log('NOTFOUND_ERR:', e); + } }); try { if (browser && browser.runtime) { this.runtime = browser.runtime; } - } catch (e) {} + } catch (e) { + console.log('NOTFOUND_ERR:', e); + } try { if (browser && browser.browserAction) { this.browserAction = browser.browserAction; } - } catch (e) {} + } catch (e) { + console.log('NOTFOUND_ERR:', e); + } } /* Export ==================================================================== */ diff --git a/src/scripts/utils/helpers.js b/src/scripts/utils/helpers.js index f365b97..c274ae4 100644 --- a/src/scripts/utils/helpers.js +++ b/src/scripts/utils/helpers.js @@ -2,8 +2,7 @@ import ext from './ext'; import generalData from '../config/general'; - -import anime from "animejs"; +import anime from 'animejs'; /* Component ==================================================================== */ const helpers = (() => { @@ -97,12 +96,13 @@ const helpers = (() => { * Generate a UUID */ generateUUID = function () { //egnerate a randmom UUID + const RANDNUMBER = 16; let d = new Date().getTime(); let uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { - let r = (d + Math.random() * 16) % 16 | 0; - d = Math.floor(d / 16); - return (c == 'x' ? r : (r & 0x3 | 0x8)).toString(16); + let r = (d + Math.random() * RANDNUMBER) % RANDNUMBER | 0; + d = Math.floor(d / RANDNUMBER); + return (c == 'x' ? r : (r & 0x3 | 0x8)).toString(RANDNUMBER); }); return uuid; }, diff --git a/src/scripts/utils/message.js b/src/scripts/utils/message.js index 944bda6..47f8ebe 100644 --- a/src/scripts/utils/message.js +++ b/src/scripts/utils/message.js @@ -1,4 +1,5 @@ -'use strict' +'use strict'; + import ext from '../utils/ext'; const message = (() => { diff --git a/src/scripts/utils/validate.js b/src/scripts/utils/validate.js index dfd3d14..2c40ca7 100644 --- a/src/scripts/utils/validate.js +++ b/src/scripts/utils/validate.js @@ -15,7 +15,7 @@ const validate = (() => { return re.test(color); }; - var text = function (text) { //validate string for a text + var text = function () { //validate string for a text return true; }; var password = function (password) { //validate string for a password @@ -37,9 +37,9 @@ const validate = (() => { }; return { - text, email, color, + text, password, number, date, diff --git a/src/styles/components/form.scss b/src/styles/components/form.scss index e09a7f5..5d13aa1 100644 --- a/src/styles/components/form.scss +++ b/src/styles/components/form.scss @@ -72,6 +72,9 @@ } select { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; padding: $padding-small 2.4em $padding-small $padding-small; } @@ -237,7 +240,6 @@ font-weight: 900; //fix font wight for some sites } } - //chekcbox label .ln-checkbox { & + label { @@ -279,7 +281,6 @@ } .ln-checkbox+ label::after { - display: none; left: 50%; position: absolute; From e9e58b39cd57843dac86d1ea0d3dfbdaf43b6616 Mon Sep 17 00:00:00 2001 From: mat1th Date: Thu, 8 Jun 2017 18:31:38 +0200 Subject: [PATCH 2/4] fix chrome issues; --- src/scripts/background/data.js | 14 +++--- src/scripts/background/mantisApi.js | 7 ++- src/scripts/components/ticketsOnPage/index.js | 4 -- src/scripts/config/icon.js | 43 ++++++++++++------- src/scripts/utils/ext.js | 22 +++------- src/scripts/utils/helpers.js | 11 +++++ src/styles/modules/setup.scss | 3 +- src/styles/modules/ticketsOnPage.scss | 4 ++ 8 files changed, 63 insertions(+), 45 deletions(-) diff --git a/src/scripts/background/data.js b/src/scripts/background/data.js index 89e4895..6978d6b 100644 --- a/src/scripts/background/data.js +++ b/src/scripts/background/data.js @@ -64,13 +64,13 @@ const data = (() => { } // //clean all tickets an user acount data; - // function cleanAll() { - // console.log('>-------- The app is cleaned'); - // setStorage({ - // savedTickets: [], - // savedSites: [] - // }); - // } + function cleanAll() { + console.log('>-------- The app is cleaned'); + setStorage({ + savedTickets: [], + savedSites: [] + }); + } //genreal funcitons function getStorage(key) { diff --git a/src/scripts/background/mantisApi.js b/src/scripts/background/mantisApi.js index c18f7f2..fcec127 100644 --- a/src/scripts/background/mantisApi.js +++ b/src/scripts/background/mantisApi.js @@ -95,7 +95,12 @@ let mantisApi = (() => { message: 'Your credentials are wrong' }); } else { - resolve(res); + //if there is only one project in mantis the api returns a object instead of a array + if (res.item) { + resolve([res.item]); + } else { + resolve(res); + } } } diff --git a/src/scripts/components/ticketsOnPage/index.js b/src/scripts/components/ticketsOnPage/index.js index 5cbc535..6cba7fa 100644 --- a/src/scripts/components/ticketsOnPage/index.js +++ b/src/scripts/components/ticketsOnPage/index.js @@ -44,7 +44,6 @@ class TicketsOnPage extends Component { hostname: generalData.hostname, shortlink: generalData.shortlink }).then(function(tickets) { - console.log('ickets.data.filtertTickets', tickets.data.filtertTickets[0]); //set all tickets _this.setState({savedTickets: tickets.data.filtertTickets, filtertTotal: tickets.data.filtertTicketsAmout, total: tickets.data.allTicketsFromThisWebsiteAmount}); }); @@ -53,14 +52,11 @@ class TicketsOnPage extends Component { //show the comment box or not _showCommentBox = (e) => { e.preventDefault(); - console.log('this.state.savedTickets', this.state.savedTickets); var ticket = this.state.savedTickets.filter(function(ticket) { if (ticket.id === e.target.getAttribute('data-id')) { //add the date to the comment box return ticket; } }); - console.log('ticket', ticket); - console.log('ticket[0', ticket[0]); this.setState({selectedTicket: ticket[0], showCommentbox: true}); } diff --git a/src/scripts/config/icon.js b/src/scripts/config/icon.js index b27fe5b..c880dd9 100644 --- a/src/scripts/config/icon.js +++ b/src/scripts/config/icon.js @@ -4,9 +4,12 @@ import ext from '../utils/ext'; // config import generalConfig from '../config/general'; +import helpers from '../utils/helpers'; //helpers -import {translate} from '../utils/helpers'; +import { + translate +} from '../utils/helpers'; /* Component ==================================================================== */ let iconConfig = (() => { @@ -29,14 +32,16 @@ let iconConfig = (() => { // badgeColor : 'red', title: translate('toolOn'), action: function (tab) { - - if (opendTabNumer === null) - opendTabNumer = tab.id; - - ext.webNavigation.onCompleted.addListener(scrirptListener.bind(this, tab)); - - injectSripts(tab); - console.log('The exention is turned on'); + ///check if the tab is a http of https site when it isn't sutch site do not inject; + if (helpers.isURL(tab.url)) { + if (opendTabNumer === null) { + opendTabNumer = tab.id; + } + + ext.webNavigation.onCompleted.addListener(scrirptListener.bind(this, tab)); + injectSripts(tab); + console.log('The exention is turned on'); + } }, nextState: 'on' } @@ -54,7 +59,7 @@ let iconConfig = (() => { // frameId: tab.id // // "run_at": "document_start", -// "all_frames": true + // "all_frames": true }); //insert css; @@ -79,12 +84,20 @@ let iconConfig = (() => { }); ext.webNavigation.onCompleted.removeListener(scrirptListener); - var removingCSS = ext.tabs.removeCSS(tab.id, { - file: 'styles/index.css' - }); - removingCSS.then(function () { + //check if ext.tabs.removeCSS is supported because Chrome does not support it. + if (ext.tabs.removeCSS) { + + var removingCSS = ext.tabs.removeCSS(tab.id, { + file: 'styles/index.css' + }); + + //when the css is removeed + removingCSS.then(function () { + opendTabNumer = null; + }, onError); + } else { opendTabNumer = null; - }, onError); + } } function onError(error) { diff --git a/src/scripts/utils/ext.js b/src/scripts/utils/ext.js index 968d144..3238074 100755 --- a/src/scripts/utils/ext.js +++ b/src/scripts/utils/ext.js @@ -35,47 +35,37 @@ function Extension() { if (chrome[api]) { _this[api] = chrome[api]; } - } catch (e) { - console.log('NOTFOUND_ERR:', e); - } + } catch (e) {} try { if (window[api]) { _this[api] = window[api]; } - } catch (e) { - console.log('NOTFOUND_ERR:', e); - } + } catch (e) {} try { if (browser[api]) { _this[api] = browser[api]; } } catch (e) { - console.log('NOTFOUND_ERR:', e); + } try { _this.api = browser.extension[api]; - } catch (e) { - console.log('NOTFOUND_ERR:', e); - } + } catch (e) {} }); try { if (browser && browser.runtime) { this.runtime = browser.runtime; } - } catch (e) { - console.log('NOTFOUND_ERR:', e); - } + } catch (e) {} try { if (browser && browser.browserAction) { this.browserAction = browser.browserAction; } - } catch (e) { - console.log('NOTFOUND_ERR:', e); - } + } catch (e) {} } /* Export ==================================================================== */ diff --git a/src/scripts/utils/helpers.js b/src/scripts/utils/helpers.js index c274ae4..b9f56bb 100644 --- a/src/scripts/utils/helpers.js +++ b/src/scripts/utils/helpers.js @@ -209,6 +209,16 @@ const helpers = (() => { return text; } }, + isURL = function (str) { + var pattern = new RegExp('^(https?:\\/\\/)?' + // protocol + '((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.?)+[a-z]{2,}|' + // domain name + '((\\d{1,3}\\.){3}\\d{1,3}))' + // OR ip (v4) address + '(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*' + // port and path + '(\\?[;&a-z\\d%_.~+=-]*)?' + // query string + '(\\#[-a-z\\d_]*)?$', 'i'); // fragment locator + + return pattern.test(str); + }, translate = function (message, value) { return ext.i18n.getMessage(message, value); }, @@ -248,6 +258,7 @@ const helpers = (() => { pageHeight, isPrommise, shortText, + isURL, translate, scrollTo }; diff --git a/src/styles/modules/setup.scss b/src/styles/modules/setup.scss index 8bd4e75..22fba78 100644 --- a/src/styles/modules/setup.scss +++ b/src/styles/modules/setup.scss @@ -32,8 +32,7 @@ justify-content: flex-start; max-height: 100vh; max-width: 500px; - overflow-x: hidden; - overflow-y: scroll; + overflow: hidden; pointer-events: all; position: fixed; width: 60vw; diff --git a/src/styles/modules/ticketsOnPage.scss b/src/styles/modules/ticketsOnPage.scss index 19dbcbd..c89e340 100644 --- a/src/styles/modules/ticketsOnPage.scss +++ b/src/styles/modules/ticketsOnPage.scss @@ -63,6 +63,10 @@ transform: translate(-50%, -50%); //position in the center; width: 75px; + span { + pointer-events: none; + } + &.active, &:hover { transform: translate(-50%, -50%) scale(1.2); //the ticket icon scale biggger From a8472a235d1c42cf244000d883a18ba31e7c41b2 Mon Sep 17 00:00:00 2001 From: mat1th Date: Thu, 8 Jun 2017 18:46:49 +0200 Subject: [PATCH 3/4] bump version; --- CHANGELOG.md | 25 +++++++++++++++++++++++++ README.md | 2 +- manifest.json | 2 +- package-lock.json | 2 +- package.json | 2 +- 5 files changed, 29 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 79eb2d4..032321d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,30 @@ # Change log +## Version 0.5.1 + +Bug fix +- fix a issue when mantis has only one project it returns a object instead of array; +- fix overflow scroll in Chrome; +- fix removing css in Chrome; +- fix chrome issue when injecting in `chrome://` pages; + +## Version 0.5 + +This release has several bug fixes. + +Improvements +- get the urls from the background scirpt instead of a predefined var; +- Remove scroll-to npm module; + +Bug fix +Fix amount of bugs: +- fix glitch on rezising page; +- Create selection on click, that can be resized after click; +- fix return key that will submit the whole page in set up; +- position the commentbox on top when selecting a bug on the bottom of the website; +- Fix the ESlint errors; + + ## Version 0.4 Improvements: diff --git a/README.md b/README.md index fc38d5c..21a2e4f 100755 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ![Layernotes](./readme/banner.png) -v0.5.0 (beta) +v0.5.1 (beta) # Layer Notes Layer Notes is a tool that you can use to easily create Tickets for the Bugtracker Mantis. diff --git a/manifest.json b/manifest.json index 763a093..582fc50 100755 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "name": "__MSG_appName__", - "version": "0.5.0", + "version": "0.5.1", "manifest_version": 2, "description": "__MSG_appDescription__", "shortName": "__MSG_appDescription__", diff --git a/package-lock.json b/package-lock.json index 6737a22..a4ed868 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "layer-notes", - "version": "0.5.0", + "version": "0.5.1", "lockfileVersion": 1, "dependencies": { "@gulp-sourcemaps/map-sources": { diff --git a/package.json b/package.json index e9d0f8d..675dfb8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "layer-notes", - "version": "0.5.0", + "version": "0.5.1", "description": "Layernotes is a tool that you can use to easaly create Tickets for the Bugtracker Manits.", "scripts": { "chrome-build": "TARGET=chrome gulp", From a04ffe9764ccb6dff8101e81305f220c17d1d8a5 Mon Sep 17 00:00:00 2001 From: mat1th Date: Thu, 8 Jun 2017 21:07:47 +0200 Subject: [PATCH 4/4] add missing dutch translation and fix englisch tranlation issues; --- src/_locales/en/messages.json | 78 +++++----- src/_locales/nl/messages.json | 274 +++++++++++++++++++++++++++++++++- 2 files changed, 310 insertions(+), 42 deletions(-) diff --git a/src/_locales/en/messages.json b/src/_locales/en/messages.json index 7285a02..c9ddb9d 100755 --- a/src/_locales/en/messages.json +++ b/src/_locales/en/messages.json @@ -8,12 +8,12 @@ "description": "Easy submit your tickets to Mantis" }, "toolOff": { - "message": "Turn Layernotes Off", + "message": "Turn Layer Notes Off", "description": "The title of the icon in the browser when the tool is on." }, "toolOn": { - "message": "Turn Layernotes On", - "description": "THe title of the icon in the browser when the tool is off." + "message": "Turn Layer Notes On", + "description": "The title of the icon in the browser when the tool is off." }, "btnTooltip": { "message": "Start a Ticket", @@ -24,16 +24,16 @@ "description": "Loading text for the app in the commentBox" }, "commentBoxErrorText": { - "message": "Please add a comment to your issue.", - "description": "This is the warning when you submit a ticket without a discription." + "message": "Please add a comment to your ticket.", + "description": "This is the warning when you submit a ticket without a description." }, "commentBoxPrioCheckboxTitle": { - "message": "Select prioroty", - "description": "The Prio button in the commentbox" + "message": "Select priority", + "description": "The priority button in the commentbox" }, "commentBoxStatusTitle": { "message": "The status of the ticket is '$STATUS$'", - "description": "Loading text for the app in the commentBox", + "description": "This will be the title of the status in the commentBox", "placeholders": { "status": { "content": "$1", @@ -42,16 +42,16 @@ } }, "commentBoxBugtrackerTitle": { - "message": "Go to this issue in your bugtracker $1", - "description": "The title form the to bugtracker text" + "message": "Go to this ticket in your bug tracker $1", + "description": "The title form the to bug tracker text" }, "commentBoxSucces": { "message": "Your ticket is uploaded", - "description": "The succes text" + "description": "The success text" }, "commentBoxAboutBrugtrackerTitle": { "message": "The browser that was used for this ticket was $BROWSER$", - "description": "The succes text", + "description": "The title from the browser icon", "placeholders": { "browser": { "content": "$1", @@ -61,7 +61,7 @@ }, "commentBoxResize": { "message": "Click to resize your browser to this resolution", - "description": "The succes text" + "description": "The title from the browser resolution in the commentbox." }, "commentBoxCancelTitle": { "message": "Cancel the ticket submit", @@ -81,7 +81,7 @@ }, "addFile": { "message": "Add an extra file", - "description": "The title fo the add file button." + "description": "The title of the add file button." }, "fileItemTitle": { "message": "Remove $1", @@ -89,11 +89,11 @@ }, "fileItemFallbackName": { "message": "Unknown", - "description": "The falback name of a unnamed item" + "description": "The fall-back name of a unnamed item" }, "inputTextHelperText": { - "message": "This is the url", - "description": "Title fallback helper popup." + "message": "This is the URL", + "description": "Title fall-back helper popup." }, "inputTextError": { "message": "The $ERROR$ is spelled wrong", @@ -111,10 +111,10 @@ }, "selectorScreenshotNameAfter": { "message": "Screenshot-after-selection.jpeg", - "description": "The name of the screenshot that will be saved. (afther selecting)" + "description": "The name of the screenshot that will be saved. (after selecting)" }, "selectorLoadingText": { - "message": "Sumbitting to bugtracker...", + "message": "Submitting to bug tracker...", "description": "The text that will be showed when the ticket is uploading." }, "selectorHelper": { @@ -130,10 +130,10 @@ "description": "Previous step indicator." }, "setupHelperOne": { - "message": "Select bugtracker" + "message": "Select bug tracker" }, "setupHelperTwo": { - "message": "Log in bugtracker" + "message": "Log in bug tracker" }, "setupHelperTree": { "message": "Select project" @@ -147,7 +147,7 @@ }, "setupMissingFieldsError": { "message": "Not all the fields are filled.", - "description": "This error will be showed if the user sumbit the form when not all fields are filed in." + "description": "This error will be showed if the user submit the form when not all fields are filed in." }, "setupLogginText": { "message": "Checking you credentials, and logging in at $TOOLNAME$.", @@ -160,8 +160,8 @@ } }, "setupMissingBugtracker": { - "message": "Please select a Bugtacker", - "description": "Shown when no bugtracker is selected" + "message": "Please select a bug tacker", + "description": "Shown when no bug tracker is selected" }, "setupSaving": { "message": "Saving credentials.", @@ -172,41 +172,41 @@ "description": "The project dropdown placeholder." }, "setupStepOneTitle": { - "message": "Choose your bugtracker", + "message": "Choose your bug tracker", "description": "The title of step one" }, "setupStepOneBody": { - "message": "This is the first time that you open Layernotes on this webiste. Please connect this site to a bugtracker. Or add it to a existing project.", + "message": "This is the first time that you open Layer Notes on this website. Please connect this site to a bug tracker. Or add it to a existing project.", "description": "The body of the first step" }, "setupStepTwoBody": { - "message": "Please fill in your bugtracker credentials, so Layernotes can connect with your account.", + "message": "Please fill in your bug tracker credentials, so Layer Notes can connect with your account.", "description": "The body of the second step." }, "setupStepTwoTitle": { - "message": "Bugtracker settings", + "message": "Bug tracker settings", "description": "The title of the second step." }, "setupHelperTextUrl": { - "message": "This is the url witch you use to access your bugtracker", - "description": "The helper text of the url." + "message": "This is the URL witch you use to access your bug tracker", + "description": "The helper text of the URL." }, "setupHelperTextUserName": { - "message": "This is the user name you use to login in your bugtracker", + "message": "This is the user name you use to login in your bug tracker", "description": "The helper text of the user name" }, "setupHelperTextPassword": { - "message": "This is the password you use to login in your bugtracker", + "message": "This is the password you use to login in your bug tracker", "description": "The helper text of the password" }, "setupStepTreeTitle": { "message": "Choose project", - "description": "The thirdt title" + "description": "The third title" }, "setupStepTreeBody": { - "message": "Choose the project that this webiste belongs to.", - "description": "The thirdt body tekst" + "message": "Choose the project that this website belongs to.", + "description": "The third body text" }, "setupStepDoneTitle": { "message": "$URL$ is added to your project.", @@ -231,7 +231,7 @@ "description": "Finish the setup." }, "ticketsOnPageUpdating": { - "message": "Updating your ticket in the bugtracker...", + "message": "Updating your ticket in the bug tracker...", "description": "" }, "toolBarNewNoteText": { @@ -272,11 +272,11 @@ }, "userTourStepTreeTitle": { "message": "Create new note", - "description": "The h1 of the thirdt step of the user tour." + "description": "The h1 of the third step of the user tour." }, "userTourStepTreeBody": { - "message": "Now select the area of your note, and add a comment. When you submit a note, there is a screenshot automaticaly added.", - "description": "The body of the thirdt step of the user tour." + "message": "Now select the area of your note, and add a comment. When you submit a note, there is a screenshot automatically added.", + "description": "The body of the third step of the user tour." }, "userTourStepFourTitle": { "message": "Nice!", diff --git a/src/_locales/nl/messages.json b/src/_locales/nl/messages.json index 7b925ee..56550d4 100644 --- a/src/_locales/nl/messages.json +++ b/src/_locales/nl/messages.json @@ -1,14 +1,282 @@ { "appName": { "message": "Layer Notes", - "description": "Makelijke manier om tickets in Mantis te submitten." + "description": "Makkelijke manier om tickets in Mantis te submitten." }, "appDescription": { - "message": "Makelijke manier om tickets in Mantis te submitten.", - "description": "Makelijke manier om tickets in Mantis te submitten." + "message": "Makkelijke manier om tickets in Mantis te submitten.", + "description": "Makkelijke manier om tickets in Mantis te submitten." }, "btnTooltip": { "message": "Start een Ticket", "description": "Start een Ticket" + }, + "loadingText": { + "message": "Laden...", + "description": "Laad tekst voor de app in de commentBox" + }, + "commentBoxErrorText": { + "message": "Voeg alsjeblieft een notitie toe aan je ticket.", + "description": "Dit is de waarschuwing die je krijgt als een ticket verzend zonder een omschrijving." + }, + "commentBoxPrioCheckboxTitle": { + "message": "Selecteer prioriteit.", + "description": "De prioriteit knop in de commentbox" + }, + "commentBoxStatusTitle": { + "message": "De status van de ticket is '$STATUS$'", + "description": "Deze wordt getoond bij de hover over de status.", + "placeholders": { + "status": { + "content": "$1", + "example": "Nieuw" + } + } + }, + "commentBoxBugtrackerTitle": { + "message": "Ga naar deze ticket in jou bug tracker $1", + "description": "De titel van de bug tracker" + }, + "commentBoxSucces": { + "message": "Je ticket is geüpload", + "description": "De succes tekst" + }, + "commentBoxAboutBrugtrackerTitle": { + "message": "De browser die gebruikt werd voor deze ticket is: $BROWSER$", + "description": "De titel van de browser icon", + "placeholders": { + "browser": { + "content": "$1", + "example": "Firefox" + } + } + }, + "commentBoxResize": { + "message": "Klik om je browser te resizen naar deze scherm resolutie.", + "description":"De titel van de browser resolutie" + }, + "commentBoxCancelTitle": { + "message": "Verzend de ticket niet.", + "description": "De titel van de cancel knop." + }, + "commentBoxCancelValue": { + "message": "Cancel", + "description": "tekst van de cancel knop" + }, + "commentBoxSaveTitle": { + "message": "Sla de ticket op", + "description": "Titel van de save knop" + }, + "commentBoxSaveValue": { + "message": "Sla op", + "description": "tekst van de sla op knop." + }, + "addFile": { + "message": "Voeg een extra bestand toe.", + "description": "De titel van de bijlage knop." + }, + "fileItemTitle": { + "message": "Verwijder $1", + "description": "De titel van de verwijder knop." + }, + "fileItemFallbackName": { + "message": "Onbekend", + "description": "De fallback naam van een item zonder naam." + }, + "inputTextHelperText": { + "message": "Dit is de URL", + "description": "Titel fallback helper pop-up." + }, + "inputTextError": { + "message": "De $ERROR$ is verkeerd gespeld.", + "description": "De error die getoond word als de input verkeerd is ingevuld.", + "placeholders": { + "error": { + "content": "$1", + "example": "URL" + } + } + }, + "selectorScreenshotName": { + "message": "Schermafbeelding-van-pagina.jpeg", + "description": "De naam van het screenshot die wordt opgeslagen." + }, + "selectorScreenshotNameAfter": { + "message": "Schermafbeelding-na-selectie.jpeg", + "description": "De naam van het screenshot die wordt opgeslagen. (Na het selecteren)" + }, + "selectorLoadingText": { + "message": "Slaat op in de bug tracker...", + "description": "Deze tekst wordt getoond als de ticket wordt geüpload." + }, + "selectorHelper": { + "message": "Teken een rechthoek om een issue te selecteren. (Druk op ESC om te stoppen)", + "description": "De helper tekst." + }, + "nextStep": { + "message": "Volgende stap", + "description": "Volgende step indicator." + }, + "previousStep": { + "message": "Vorige stap", + "description": "vorige stap indicator." + }, + "setupHelperOne": { + "message": "Selecteer bug tracker", + "description": "De titel van de setup helper." + }, + "setupHelperTwo": { + "message": "Log in bug tracker" + }, + "setupHelperTree": { + "message": "Selecteer je project" + }, + "setupHelperFour": { + "message": "Finish" + }, + "setupExistingProject": { + "message": "Voeg aan bestaand project toe.", + "description": "De optie die gebruikers de mogelijkheid geeft om een website toe te voegen aan een bestaand project." + }, + "setupMissingFieldsError": { + "message": "Nog niet alle velden zijn ingevuld.", + "description": "Dit is een foutmelding die getoond word als de gebruiker het formulier submit zonder alle velden in te vullen." + }, + "setupLogginText": { + "message": "Controleert je inlog gegevens, en logt in $TOOLNAME$.", + "description": "Dit een de laad tekst als de tool inlogt.", + "placeholders": { + "toolName": { + "content": "$1", + "example": "Mantis" + } + } + }, + "setupMissingBugtracker": { + "message": "Selecteer een bug tracker", + "description": "Foutmelding die getoond wordt als er geen bug tracker geselecteerd" + }, + "setupSaving": { + "message": "Slaat inloggegevens op.", + "description": "De laatste stap van het opslaan." + }, + "setupChooseProject": { + "message": "Kies een project", + "description": "De drop down placeholder" + }, + "setupStepOneTitle": { + "message": "Kies je bugtracker", + "description": "De titel van stap een" + }, + "setupStepOneBody": { + "message": "Dit is de eerste keer dat je Layer Notes opstart op deze website. Kies je bugtracker om deze website toe te voegen. Of voeg deze website toe aan een bestaand project.", + "description": "De content van de eerste stap." + }, + + "setupStepTwoBody": { + "message": "Vul je bug tracker inloggegevens in, zodat we met dit account kunnen connecten.", + "description": "De content van de tweede stap." + }, + "setupStepTwoTitle": { + "message": "Bugtracker instellingen", + "description": "De content van de derde stap." + }, + "setupHelperTextUrl": { + "message": "Dit is de URL die je gebruikt om naar je bug tracker toe te gaan.", + "description": "De helper tekst van de URL." + }, + "setupHelperTextUserName": { + "message": "Dit is de gebruikersnaam, om in de loggen in de bug tracker", + "description": "De helper tekst van de gebruikers name" + }, + "setupHelperTextPassword": { + "message": "Dit is het wachtwoord die gebruikt om in te loggen in je bug tracker", + "description": "De helper tekst van het wachtwoord veld." + }, + "setupStepTreeTitle": { + "message": "Kies een project", + "description": "De derde titel" + }, + "setupStepTreeBody": { + "message": "Kies het project waar deze website bij hoort.", + "description": "De derde content tekst." + }, + "setupStepDoneTitle": { + "message": "$URL$ is toegevoegd aan de tool.", + "description": "De titel van de het laatste scherm.", + "placeholders": { + "url": { + "content": "$1", + "example": "Een onbekende website" + } + } + }, + "setupStepDoneBody": { + "message": "Als dit de eerste keer is dat je de tool start kan je de tutorial starten.", + "description": "" + }, + "setupStartTutorial": { + "message": "Start tutorial", + "description": "De knop om de tutorial te starten." + }, + "setupDone": { + "message": "Finish", + "description": "Finish de setup." + }, + "ticketsOnPageUpdating": { + "message": "Update de ticket in de bug tracker...", + "description": "" + }, + "toolBarNewNoteText": { + "message": "Nieuwe notitie", + "description": "De tekst van de 'nieuwe notitie' knop in de toolbar." + }, + "toolBarNewNoteTitle": { + "message": "Maak een nieuwe notitie.", + "description": "De titel van de 'nieuwe notitie' knop in de toolbar." + }, + "toolBarSettingsText": { + "message": "Instellingen", + "description": "De tekst van de instellingen knop in de toolbar." + }, + "toolBarSettingsTitle": { + "message": "Ga naar de instellingen pagina.", + "description": "De titel van de instellingen knop in de toolbar." + }, + "toolBarAmoutTicketsTitle": { + "message": "Aantal tickets op deze pagina, en het aantal tickets op deze site.", + "description": "" + }, + "userTourStepOneTitle": { + "message": "Welkom!", + "description": "De h1 van de user tour." + }, + "userTourStepOneBody": { + "message": "Deze tutorial legt uit hoe de tool werkt.", + "description": "De body van de eerste stap van de user tour." + }, + "userTourStepTwoTitle": { + "message": "De Sidebar", + "description": "De h1 van de tweede stap in de user tour." + }, + "userTourStepTwoBody": { + "message": "Dit is de sidebar van de tool. Met de 'Nieuwe notitie' knop kan je een nieuwe notitie aanmaken. Klik op 'Volgende' om een nieuwe notitie aan te maken.", + "description": "De body van de tweede stap in de user tour." + }, + "userTourStepTreeTitle": { + "message": "Maak een nieuwe notitie", + "description": "De h1 van de derde stap van de user tour." + }, + "userTourStepTreeBody": { + "message": "Selecteer nu een gebied waar de ticket zich bevindt en voeg een notitie toe. Als je een notitie op slaat wordt er automatisch een schreenschot van de pagina gemaakt en toegevoegd aan de ticket in Mantis.", + "description": "De body van de derde stap van de user tour." + }, + "userTourStepFourTitle": { + "message": "Goed gedaan!", + "description": "De h1 van de laatste stap van de user tour." + }, + "userTourStepFourBody": { + "message": "Je hebt je eerste notitie aangemaakt! Klik op het 'Notitie icon' om je notitie te bekijken. Je weet nu hoe je een notitie moet maken. Veel succes met het testen!", + "description": "de body of de last step of de user tour." } }