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