Browse Source

make app id shorter

pull/9/head
sualko 3 years ago
parent
commit
5826bbff45
  1. 2
      Makefile
  2. 2
      README.md
  3. 2
      appinfo/app.php
  4. 2
      appinfo/info.xml
  5. 6
      lib/Settings/Admin.php
  6. 4
      lib/Settings/Personal.php
  7. 4
      lib/Settings/Section.php
  8. 2
      package.json
  9. 4
      templates/admin.php
  10. 4
      templates/manager.php
  11. 2
      ts/Manager/Api.ts
  12. 4
      ts/Manager/App.scss
  13. 2
      ts/Manager/App.tsx
  14. 4
      ts/Manager/RoomRow.tsx
  15. 2
      ts/Manager/index.tsx
  16. 6
      ts/admin.ts
  17. 6
      ts/filelist.ts

2
Makefile

@ -65,7 +65,7 @@ clean-dev:
pack:
mkdir -p archive
tar --exclude='./Makefile' --exclude='./webpack*' --exclude='./.*' --exclude='./ts' --exclude='./tests' --exclude='./node_modules' --exclude='./archive' -zcvf ./archive/cloud_bbb.tar.gz . --transform s/^./bigbluebutton/
tar --exclude='./Makefile' --exclude='./webpack*' --exclude='./.*' --exclude='./ts' --exclude='./tests' --exclude='./node_modules' --exclude='./archive' -zcvf ./archive/cloud_bbb.tar.gz . --transform s/^./bbb/
# Tests
test:

2
README.md

@ -9,7 +9,7 @@ To install it change into your Nextcloud's apps directory:
Then run:
git clone https://github.com/sualko/cloud_bbb.git bigbluebutton
git clone https://github.com/sualko/cloud_bbb.git bbb
Then install the dependencies using:

2
appinfo/app.php

@ -1,3 +1,3 @@
<?php
OCP\Util::addScript ( 'bigbluebutton', 'filelist');
OCP\Util::addScript ( 'bbb', 'filelist');

2
appinfo/info.xml

@ -1,6 +1,6 @@
<?xml version="1.0"?>
<info xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd">
<id>bigbluebutton</id>
<id>bbb</id>
<name>BigBlueButton</name>
<summary>BigBlueButton integration for Nextcloud</summary>
<description><![CDATA[This app allows to create meetings with BigBlueButton]]></description>

6
lib/Settings/Admin.php

@ -27,11 +27,11 @@ class Admin implements ISettings
public function getForm()
{
$parameters = [
'api.url' => $this->config->getAppValue('bigbluebutton', 'api.url'),
'api.secret' => $this->config->getAppValue('bigbluebutton', 'api.secret'),
'api.url' => $this->config->getAppValue('bbb', 'api.url'),
'api.secret' => $this->config->getAppValue('bbb', 'api.secret'),
];
return new TemplateResponse('bigbluebutton', 'admin', $parameters);
return new TemplateResponse('bbb', 'admin', $parameters);
}
/**

4
lib/Settings/Personal.php

@ -12,7 +12,7 @@ class Personal implements ISettings
*/
public function getForm()
{
return new TemplateResponse('bigbluebutton', 'manager');
return new TemplateResponse('bbb', 'manager');
}
/**
@ -20,7 +20,7 @@ class Personal implements ISettings
*/
public function getSection()
{
return 'bigbluebutton';
return 'bbb';
}
/**

4
lib/Settings/Section.php

@ -27,7 +27,7 @@ class Section implements IIconSection
*/
public function getID()
{
return 'bigbluebutton';
return 'bbb';
}
/**
@ -58,6 +58,6 @@ class Section implements IIconSection
*/
public function getIcon()
{
return $this->url->imagePath('bigbluebutton', 'app-dark.svg');
return $this->url->imagePath('bbb', 'app-dark.svg');
}
}

2
package.json

@ -1,5 +1,5 @@
{
"name": "bigbluebutton",
"name": "@sualko/cloud_bbb",
"description": "Nextcloud Integration for BigBlueButton",
"version": "0.1.0",
"author": "Klaus Herberth <klaus@jsxc.org>",

4
templates/admin.php

@ -2,10 +2,10 @@
/** @var $l \OCP\IL10N */
/** @var $_ array */
script('bigbluebutton', 'admin');
script('bbb', 'admin');
?>
<div id="bigbluebutton-settings" class="section">
<div id="bbb-settings" class="section">
<h2>BigBlueButton</h2>
<form>

4
templates/manager.php

@ -1,5 +1,5 @@
<?php
script('bigbluebutton', 'manager');
script('bbb', 'manager');
?>
<div id="bigbluebutton-root"></div>
<div id="bbb-root"></div>

2
ts/Manager/Api.ts

@ -11,7 +11,7 @@ export interface Room {
class Api {
public getUrl(endpoint: string): string {
return OC.generateUrl(`apps/bigbluebutton/${endpoint}`);
return OC.generateUrl(`apps/bbb/${endpoint}`);
}
public async getRooms(): Promise<Room[]> {

4
ts/Manager/App.scss

@ -1,9 +1,9 @@
#bigbluebutton-react-root, #bigbluebutton-root {
#bbb-react-root, #bbb-root {
height: 100%;
min-height: calc(100vh - 50px);
}
#bigbluebutton-react-root {
#bbb-react-root {
&, & > table {
width: 100%;

2
ts/Manager/App.tsx

@ -90,7 +90,7 @@ const App: React.FC<Props> = () => {
}
return (
<div id="bigbluebutton-react-root"
<div id="bbb-react-root"
onClick={() => { /* @TODO hide edit inputs */ }}>
<table>
<thead>

4
ts/Manager/RoomRow.tsx

@ -55,8 +55,8 @@ const RoomRow: React.FC<Props> = (props) => {
ev.preventDefault();
OC.dialogs.confirm(
t('bigbluebutton', 'Are you sure you want to delete "{name}"? This operation can not be undone', { name: room.name }),
t('bigbluebutton', 'Delete "{name}"?', { name: room.name }),
t('bbb', 'Are you sure you want to delete "{name}"? This operation can not be undone', { name: room.name }),
t('bbb', 'Delete "{name}"?', { name: room.name }),
confirmed => {
if (confirmed) {
props.deleteRoom(room.id);

2
ts/Manager/index.tsx

@ -8,5 +8,5 @@ import ReactDom from 'react-dom';
window['React'] = React;
$(document).ready(() => {
ReactDom.render( <App/>, document.getElementById('bigbluebutton-root'));
ReactDom.render( <App/>, document.getElementById('bbb-root'));
});

6
ts/admin.ts

@ -1,10 +1,10 @@
declare const OCP: any;
$(() => {
$('#bigbluebutton-settings form').submit(function (ev) {
$('#bbb-settings form').submit(function (ev) {
ev.preventDefault();
OCP.AppConfig.setValue('bigbluebutton', 'api.url', this['api.url'].value);
OCP.AppConfig.setValue('bigbluebutton', 'api.secret', this['api.secret'].value);
OCP.AppConfig.setValue('bbb', 'api.url', this['api.url'].value);
OCP.AppConfig.setValue('bbb', 'api.secret', this['api.secret'].value);
})
});

6
ts/filelist.ts

@ -6,7 +6,7 @@ declare const OCA: any;
class BigBlueButton {
public async getRooms(): Promise<Room[]> {
const response = await axios.get(OC.generateUrl('/apps/bigbluebutton/rooms'))
const response = await axios.get(OC.generateUrl('/apps/bbb/rooms'))
return response.data
}
@ -41,7 +41,7 @@ $(() => {
displayName: name,
mime,
permissions: OC.PERMISSION_SHARE,
icon: OC.imagePath('bigbluebutton', 'app-dark.svg'),
icon: OC.imagePath('bbb', 'app-dark.svg'),
actionHandler: (fileName, context) => {
share(context.fileInfoModel.getFullPath(), fileName, uid);
}
@ -51,7 +51,7 @@ $(() => {
async function share(path: string, filename: string, roomUid) {
const id = await createShare(path);
const shareUrl = await configureShare(id);
const joinUrl = generateUrl('/apps/bigbluebutton/b/{uid}?u={url}&filename={filename}', {
const joinUrl = generateUrl('/apps/bbb/b/{uid}?u={url}&filename={filename}', {
uid: roomUid,
url: shareUrl + '/download',
filename

Loading…
Cancel
Save