Updated eslint-config-jitsi
This commit is contained in:
parent
67cab07c73
commit
decb351ed3
|
@ -1,9 +1,5 @@
|
|||
module.exports = {
|
||||
'extends': [
|
||||
'eslint-config-jitsi',
|
||||
'plugin:react/recommended'
|
||||
],
|
||||
'plugins': [
|
||||
'react'
|
||||
'eslint-config-jitsi'
|
||||
]
|
||||
};
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
module.exports = {
|
||||
'extends': [
|
||||
'./../.eslintrc.js',
|
||||
'eslint-config-jitsi/jsdoc',
|
||||
'eslint-config-jitsi/react'
|
||||
]
|
||||
};
|
|
@ -38,8 +38,8 @@ export default class App extends Component<*> {
|
|||
<Router history = { history }>
|
||||
<Switch>
|
||||
<Route
|
||||
exact
|
||||
component = { Welcome }
|
||||
exact = { true }
|
||||
path = '/' />
|
||||
<Route
|
||||
component = { Conference }
|
||||
|
|
|
@ -57,6 +57,8 @@ class Conference extends Component<Props, *> {
|
|||
|
||||
/**
|
||||
* Attach the script to this component.
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
componentDidMount() {
|
||||
const parentNode = this._ref.current;
|
||||
|
@ -75,6 +77,8 @@ class Conference extends Component<Props, *> {
|
|||
|
||||
/**
|
||||
* Remove conference on unmounting.
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
componentWillUnmount() {
|
||||
if (this._api) {
|
||||
|
@ -85,7 +89,6 @@ class Conference extends Component<Props, *> {
|
|||
/**
|
||||
* Implements React's {@link Component#render()}.
|
||||
*
|
||||
* @inheritdoc
|
||||
* @returns {ReactElement}
|
||||
*/
|
||||
render() {
|
||||
|
@ -94,6 +97,8 @@ class Conference extends Component<Props, *> {
|
|||
|
||||
/**
|
||||
* Navigates to home screen (Welcome).
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
_navigateToHome() {
|
||||
this.props.dispatch(push('/'));
|
||||
|
@ -102,6 +107,11 @@ class Conference extends Component<Props, *> {
|
|||
/**
|
||||
* When the script is loaded create the iframe element in this component
|
||||
* and attach utils from jitsi-meet-electron-utils.
|
||||
*
|
||||
* @param {Object} parentNode - Node to which iframe has to be attached.
|
||||
* @param {string} roomName - Conference room name to be joined.
|
||||
* @param {string} domain - Jitsi Meet server domain.
|
||||
* @returns {void}
|
||||
*/
|
||||
_onScriptLoad(parentNode: Object, roomName: string, domain: string) {
|
||||
const JitsiMeetExternalAPI = window.JitsiMeetExternalAPI;
|
||||
|
|
|
@ -32,66 +32,74 @@ class HelpAction extends Component< *, State> {
|
|||
droplistOpen: false
|
||||
};
|
||||
|
||||
this._droplistToggle = this._droplistToggle.bind(this);
|
||||
this._openPrivacyPage = this._openPrivacyPage.bind(this);
|
||||
this._openTermsPage = this._openTermsPage.bind(this);
|
||||
this._sendFeedback = this._sendFeedback.bind(this);
|
||||
this._onIconClick = this._onIconClick.bind(this);
|
||||
this._onPrivacyOptionClick = this._onPrivacyOptionClick.bind(this);
|
||||
this._onTermsOptionClick = this._onTermsOptionClick.bind(this);
|
||||
this._onSendFeedback = this._onSendFeedback.bind(this);
|
||||
}
|
||||
|
||||
_droplistToggle: (*) => void;
|
||||
_onIconClick: (*) => void;
|
||||
|
||||
/**
|
||||
* Toggles the droplist.
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
_droplistToggle() {
|
||||
_onIconClick() {
|
||||
this.setState({
|
||||
droplistOpen: !this.state.droplistOpen
|
||||
});
|
||||
}
|
||||
|
||||
_openPrivacyPage: (*) => void;
|
||||
_onPrivacyOptionClick: (*) => void;
|
||||
|
||||
/**
|
||||
* Opens Privacy Policy Page in default browser.
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
_openPrivacyPage() {
|
||||
_onPrivacyOptionClick() {
|
||||
openExternalLink(config.privacyPolicyURL);
|
||||
}
|
||||
|
||||
_openTermsPage: (*) => void;
|
||||
_onTermsOptionClick: (*) => void;
|
||||
|
||||
/**
|
||||
* Opens Terms and Conditions Page in default browser.
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
_openTermsPage() {
|
||||
_onTermsOptionClick() {
|
||||
openExternalLink(config.termsAndConditionsURL);
|
||||
}
|
||||
|
||||
_sendFeedback: (*) => void;
|
||||
_onSendFeedback: (*) => void;
|
||||
|
||||
/**
|
||||
* Opens Support/Feedback Email.
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
_sendFeedback() {
|
||||
_onSendFeedback() {
|
||||
openExternalLink(config.feedbackURL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Render function of component.
|
||||
*
|
||||
* @return {ReactElement}
|
||||
* @returns {ReactElement}
|
||||
*/
|
||||
render() {
|
||||
return (
|
||||
<Droplist
|
||||
isOpen = { this.state.droplistOpen }
|
||||
onClick = { () => this._droplistToggle() }
|
||||
onOpenChange = { () => this._droplistToggle() }
|
||||
onClick = { this._onIconClick }
|
||||
onOpenChange = { this._onIconClick }
|
||||
position = 'right bottom'
|
||||
trigger = { <HelpIcon /> }>
|
||||
<Item onActivate = { this._openTermsPage }>Terms</Item>
|
||||
<Item onActivate = { this._openPrivacyPage }>Privacy</Item>
|
||||
<Item onActivate = { this._sendFeedback } >Send Feedback</Item>
|
||||
<Item onActivate = { this._onTermsOptionClick }>Terms</Item>
|
||||
<Item onActivate = { this._onPrivacyOptionClick }>Privacy</Item>
|
||||
<Item onActivate = { this._onSendFeedback }>Send Feedback</Item>
|
||||
</Droplist>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -15,6 +15,8 @@ import HelpAction from './HelpAction';
|
|||
class Navbar extends Component<*> {
|
||||
/**
|
||||
* Get the array of Secondary actions of Global Navigation.
|
||||
*
|
||||
* @returns {ReactElement[]}
|
||||
*/
|
||||
_getSecondaryActions() {
|
||||
return [
|
||||
|
@ -27,7 +29,7 @@ class Navbar extends Component<*> {
|
|||
/**
|
||||
* Render function of component.
|
||||
*
|
||||
* @return {ReactElement}
|
||||
* @returns {ReactElement}
|
||||
*/
|
||||
render() {
|
||||
return (
|
||||
|
|
|
@ -6,6 +6,9 @@ import { shell } from 'electron';
|
|||
|
||||
/**
|
||||
* Opens the provided link in default broswer.
|
||||
*
|
||||
* @param {string} link - Link to open outside the desktop app.
|
||||
* @returns {void}
|
||||
*/
|
||||
export function openExternalLink(link: string) {
|
||||
shell.openExternal(link);
|
||||
|
@ -13,6 +16,8 @@ export function openExternalLink(link: string) {
|
|||
|
||||
/**
|
||||
* Return true if Electron app is running on Mac system.
|
||||
*
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export function isElectronMac() {
|
||||
return process.platform === 'darwin';
|
||||
|
|
|
@ -58,7 +58,7 @@ class Welcome extends Component<Props, State> {
|
|||
/**
|
||||
* Render function of component.
|
||||
*
|
||||
* @return {ReactElement}
|
||||
* @returns {ReactElement}
|
||||
*/
|
||||
render() {
|
||||
return (
|
||||
|
@ -92,6 +92,9 @@ class Welcome extends Component<Props, State> {
|
|||
|
||||
/**
|
||||
* Prevents submission of the form and delegates the join logic.
|
||||
*
|
||||
* @param {Event} event - Event by which this function is called.
|
||||
* @returns {void}
|
||||
*/
|
||||
_onFormSubmit(event: Event) {
|
||||
event.preventDefault();
|
||||
|
@ -102,6 +105,8 @@ class Welcome extends Component<Props, State> {
|
|||
|
||||
/**
|
||||
* Redirect and join conference.
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
_onJoin() {
|
||||
const url = URL.parse(this.state.url);
|
||||
|
@ -122,6 +127,10 @@ class Welcome extends Component<Props, State> {
|
|||
|
||||
/**
|
||||
* Keeps URL input value and URL in state in sync.
|
||||
*
|
||||
* @param {SyntheticInputEvent<HTMLInputElement>} event - Event by which
|
||||
* this function is called.
|
||||
* @returns {void}
|
||||
*/
|
||||
_onURLChange(event: SyntheticInputEvent<HTMLInputElement>) {
|
||||
this.setState({
|
||||
|
|
|
@ -18,6 +18,8 @@ import { store } from './features/redux';
|
|||
class Root extends Component<*> {
|
||||
/**
|
||||
* Implements React's {@link Component#render()}.
|
||||
*
|
||||
* @returns {ReactElement}
|
||||
*/
|
||||
render() {
|
||||
return (
|
||||
|
|
|
@ -4264,7 +4264,7 @@
|
|||
}
|
||||
},
|
||||
"eslint-config-jitsi": {
|
||||
"version": "github:jitsi/eslint-config-jitsi#64b9f255ae804eb91bd62a3c6fbeb8104944587a",
|
||||
"version": "github:jitsi/eslint-config-jitsi#3d193df6476a73f827582e137a67a8612130a455",
|
||||
"dev": true
|
||||
},
|
||||
"eslint-import-resolver-node": {
|
||||
|
@ -7058,15 +7058,6 @@
|
|||
"postis": "2.2.0",
|
||||
"prebuild-install": "2.5.3",
|
||||
"robotjs": "github:jitsi/robotjs#5cc469f655669e728b61271c2c57ce97d62976fd"
|
||||
},
|
||||
"dependencies": {
|
||||
"robotjs": {
|
||||
"version": "github:jitsi/robotjs#5cc469f655669e728b61271c2c57ce97d62976fd",
|
||||
"requires": {
|
||||
"nan": "2.10.0",
|
||||
"prebuild-install": "2.5.3"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"js-base64": {
|
||||
|
@ -10530,6 +10521,13 @@
|
|||
"inherits": "2.0.3"
|
||||
}
|
||||
},
|
||||
"robotjs": {
|
||||
"version": "github:jitsi/robotjs#5cc469f655669e728b61271c2c57ce97d62976fd",
|
||||
"requires": {
|
||||
"nan": "2.10.0",
|
||||
"prebuild-install": "2.5.3"
|
||||
}
|
||||
},
|
||||
"run-async": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz",
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
"electron-packager": "12.0.2",
|
||||
"electron-rebuild": "1.7.3",
|
||||
"eslint": "4.12.1",
|
||||
"eslint-config-jitsi": "jitsi/eslint-config-jitsi",
|
||||
"eslint-config-jitsi": "jitsi/eslint-config-jitsi#v0.1.0",
|
||||
"eslint-plugin-flowtype": "2.46.3",
|
||||
"eslint-plugin-import": "2.11.0",
|
||||
"eslint-plugin-jsdoc": "3.2.0",
|
||||
|
|
Loading…
Reference in New Issue