Skip to content

Commit

Permalink
Merge pull request #48 from ItsOnlyBinary/rewrite
Browse files Browse the repository at this point in the history
Rewrote plugin to use components
  • Loading branch information
ItsOnlyBinary authored Feb 19, 2021
2 parents 5d13632 + c075c6d commit 9957f73
Show file tree
Hide file tree
Showing 16 changed files with 5,049 additions and 5,641 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
webpack.config.js
/dist/
99 changes: 53 additions & 46 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,46 +1,53 @@
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint',
sourceType: 'module'
},
extends: [
'airbnb-base',
'standard'
],
env: {
'browser': true,
},
// add your custom rules here
'rules': {
'class-methods-use-this': 0,
'comma-dangle': ['error', {
'arrays': 'always-multiline',
'objects': 'always-multiline',
'imports': 'never',
'exports': 'never',
'functions': 'ignore'
}],
'import/extensions': 0,
'import/no-extraneous-dependencies': 0,
'import/no-unresolved': 0,
'import/prefer-default-export': 0,
'indent': ['error', 4],
'no-continue': 0,
'no-multi-assign': 0,
'no-param-reassign': ['error', { 'props': false }],
'no-plusplus': 0,
'no-prototype-builtins': 0,
'prefer-promise-reject-errors': 0,
'no-control-regex': 0,
'object-shorthand': 0,
'operator-linebreak': 0,
'prefer-const': 0,
'prefer-destructuring': 0,
'prefer-template': 0,
'semi': ['error', 'always'],
'space-before-function-paren': ['error', 'never'],
'vue/html-indent': ['error', 4],
'vue/max-attributes-per-line': 0,
}
}
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint',
sourceType: 'module'
},
extends: [
'airbnb-base',
'plugin:vue/recommended',
'standard'
],
env: {
'browser': true,
},
plugins: [
'vue',
],
// add your custom rules here
rules: {
'class-methods-use-this': 0,
'comma-dangle': ['error', {
'arrays': 'always-multiline',
'objects': 'always-multiline',
'imports': 'never',
'exports': 'never',
'functions': 'ignore'
}],
'import/extensions': 0,
'import/no-extraneous-dependencies': 0,
'import/no-unresolved': 0,
'import/prefer-default-export': 0,
'indent': ['error', 4],
'no-continue': 0,
'no-multi-assign': 0,
'no-param-reassign': ['error', { 'props': false }],
'no-plusplus': 0,
'no-prototype-builtins': 0,
'prefer-promise-reject-errors': 0,
'no-control-regex': 0,
'object-shorthand': 0,
'operator-linebreak': 0,
'prefer-const': 0,
'prefer-destructuring': 0,
'prefer-object-spread': 0,
'prefer-template': 0,
'semi': ['error', 'always'],
'space-before-function-paren': ['error', 'never'],
'vue/html-indent': ['error', 4],
'vue/max-attributes-per-line': 0,
'vue/require-prop-types': 0,
'vue/require-default-prop': 0,
}
}
25 changes: 21 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
/node_modules/
/dist/
/.cache/
/yarn-error.log
.DS_Store
dist/
node_modules/

# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*
2 changes: 2 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/dist/
/node_modules/
8 changes: 8 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
extends: 'stylelint-config-standard',
rules: {
indentation: 4,
'no-descending-specificity': null,
'declaration-no-important': true,
}
};
47 changes: 28 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# KiwiIRC - Audio / Video conferencing

This plugin integrates the [Jitsi Meet](https://jitsi.org/jitsi-meet/) conference software into KiwiIRC.
This plugin integrates the [Jitsi Meet](https://jitsi.org/jitsi-meet/) conference software into KiwiIRC.

Features -
* Individual conference rooms for channels and private messages
Expand All @@ -13,7 +13,7 @@ Features -
yarn && yarn build
~~~

Copy `dist/plugin-conference.min.js` to your Kiwi plugins folder
Copy `dist/plugin-conference.js` to your Kiwi plugins folder

### Loading the plugin into Kiwi IRC
Add the plugin javascript file to your kiwiirc `config.json` and configure the settings:
Expand All @@ -23,7 +23,7 @@ Add the plugin javascript file to your kiwiirc `config.json` and configure the s
"plugins": [
{
"name": "conference",
"url": "static/plugins/plugin-conference/dist/plugin-conference.min.js"
"url": "static/plugins/plugin-conference.js"
}
],
"conference": {
Expand All @@ -43,44 +43,53 @@ Jitsi Meet supports extra configuration to customise its interface and functions

The defaults are:
~~~json
"conference":{
"server": "meet.jit.si",
"conference": {
"secure": false,
"enabledInChannels": [ "*" ],
"joinText": "has joined the conference",
"inviteText": "is inviting you to a private call.",
"server": "meet.jit.si",
"queries": true,
"channels": true,
"viewHeight": "40%",
"enabledInChannels": ["*"],
"groupInvitesTTL": 30000,
"maxParticipantsLength": 60,
"participantsMore": "more...",
"inviteText": "{{ nick }} is inviting you to a private call.",
"joinText": "{{ nick }} has joined the conference.",
"joinButtonText": "Join now!",
"disabledText": "Sorry. The sysop has not enabled conferences in this channel.",
"showLink": true,
"showLink": false,
"useLinkShortener": false,
"linkShortenerURL": "https://x0.no/api/?{{ link }}",
"linkShortenerAPIToken": "API_KEY_HERE",
"linkShortenerURL": "",
"interfaceConfigOverwrite": {
"SHOW_JITSI_WATERMARK": false,
"SHOW_WATERMARK_FOR_GUESTS": false,
"TOOLBAR_BUTTONS": [
"microphone", "camera", "fullscreen", "fodeviceselection", "hangup",
"settings", "videoquality", "filmstrip",
"stats", "shortcuts"
]
"microphone", "camera", "fullscreen", "hangup",
"settings", "videoquality", "filmstrip", "fodeviceselection",
"stats", "shortcuts",
],
},
"configOverwrite": {
}
"startWithVideoMuted": true,
"startWithAudioMuted": true,
},
}
~~~

The 'showLink' item, if enabled, will append a direct link to the broadcasted join message which opens the jitsi conference for non-Kiwi users.
The 'useUseLinkShortener' item, if enabled (requires showLink to also be enabled), will shorten the link displayed using a link shortening service like Bitly. If you like, yout can sign up for a free Bitly account to use the API (https://bitly.com/). Once registered, follow the instructions to generate an access token, then provide that in Kiwi's config @ "linkShortenerAPIToken". Note that some services, like x0.no do not require API tokens, in which case the token can be omitted.
The 'useUseLinkShortener' item, if enabled (requires showLink to also be enabled), will shorten the link displayed using a link shortening service like Bitly. If you like, you can sign up for a free Bitly account to use the API (https://bitly.com/). Once registered, follow the instructions to generate an access token, then provide that in Kiwi's config @ "linkShortenerAPIToken". Note that some services, like x0.no do not require API tokens, in which case the token can be omitted.

Examples of linkShortenerURL data are:

If using Bitly:

https://api-ssl.bitly.com/v3/shorten
`https://api-ssl.bitly.com/v3/shorten`

Alternative shortener that doesn't require an API token:

https://x0.no/api/
`https://x0.no/api/?{{ link }}`

note: for link shorteners other than Bitly `{{ link }}` is replaced with the conference url and the response is read from the body

More info about Jitsi's options can be found in these files:
* https://github.com/jitsi/jitsi-meet/blob/master/interface_config.js
Expand Down
5 changes: 5 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
presets: [
'@babel/env',
],
};
78 changes: 41 additions & 37 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,39 +1,43 @@
{
"name": "conference-kiwiirc-plugin",
"version": "1.0.0",
"main": "plugin-conference.js",
"license": "Apache",
"private": true,
"scripts": {
"build": "webpack",
"watch": "webpack --watch",
"serve": "webpack-dev-server",
"test": "xo",
"lint:eslint": "eslint --ext .js ./",
"lint": "npm run lint:eslint"
},
"dependencies": {
"@babel/core": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"babel-core": "^6.26.3",
"babel-loader": "^8.0.2",
"babel-preset-env": "^1.7.0",
"platform": "^1.3.5",
"regenerator-runtime": "^0.13.1"
},
"devDependencies": {
"css-loader": "^0.28.11",
"eslint": "^5.4.0",
"eslint-config-airbnb-base": "^13.1.0",
"eslint-config-standard": "^11.0.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-node": "^7.0.1",
"eslint-plugin-promise": "^4.0.0",
"eslint-plugin-standard": "^3.1.0",
"style-loader": "^0.20.3",
"webpack": "^4.8.3",
"webpack-cli": "^2.0.13",
"webpack-dev-server": "^3.1.1",
"xo": "^0.20.3"
}
"name": "kiwiirc-plugin-conference",
"version": "1.0.0",
"main": "./src/plugin.js",
"license": "Apache-2.0",
"private": true,
"scripts": {
"build": "webpack",
"watch": "webpack --watch",
"dev": "webpack-dev-server",
"lint": "npm run lint:eslint && npm run lint:stylelint",
"lint:eslint": "eslint --ext .js,.vue ./",
"lint:stylelint": "stylelint \"src/**/*.{vue,htm,html,css,sss,less,scss}\""
},
"dependencies": {
"platform": "^1.3.5"
},
"devDependencies": {
"@babel/core": "^7.9.0",
"@babel/preset-env": "^7.9.5",
"babel-eslint": "^10.0.3",
"babel-loader": "8.1.0",
"css-loader": "^3.5.1",
"eslint": "^6.8.0",
"eslint-config-airbnb-base": "^14.1.0",
"eslint-config-standard": "^14.1.1",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"eslint-plugin-vue": "^6.2.2",
"exports-loader": "^0.7.0",
"style-loader": "^1.1.3",
"stylelint": "^13.3.1",
"stylelint-config-standard": "^20.0.0",
"stylelint-webpack-plugin": "^1.2.3",
"vue-loader": "^15.9.1",
"vue-template-compiler": "^2.6.11",
"webpack": "^4.42.1",
"webpack-cli": "^3.1.1",
"webpack-dev-server": "^3.1.3"
}
}
Loading

0 comments on commit 9957f73

Please sign in to comment.