diff --git a/audon/README.md b/audon/README.md new file mode 100644 index 00000000..beb89a1e --- /dev/null +++ b/audon/README.md @@ -0,0 +1,6 @@ +Audon Addon +============= + +This is a quick and dirty addon to add a [Audon][1] website as an app. This Addon based on webrtc. Audon is a service of realtime audio chat + +[1]: https://codeberg.org/nmkj/audon diff --git a/audon/audon.php b/audon/audon.php new file mode 100644 index 00000000..553e7f5c --- /dev/null +++ b/audon/audon.php @@ -0,0 +1,69 @@ + + * Author: Tobias Diekershoff + * Author: Matthias Ebers + */ + +use Friendica\Core\Hook; +use Friendica\Core\Renderer; +use Friendica\DI; + +function audon_install() +{ + Hook::register('app_menu', __FILE__, 'audon_app_menu'); +} + +function audon_app_menu(array &$b) +{ + $b['app_menu'][] = ''; +} + +function audon_addon_admin(string &$o) +{ + $t = Renderer::getMarkupTemplate('admin.tpl', 'addon/audon/'); + $o = Renderer::replaceMacros($t, [ + '$submit' => DI::l10n()->t('Save Settings'), + '$audonurl' => [ + 'audonurl', + DI::l10n()->t('Audon Base URL'), + DI::config()->get('audon','audonurl'), + DI::l10n()->t('Page your users will create an Audon audio chat room on. For example you could use https://audon.space.'), + ], + ]); +} + +function audon_addon_admin_post() +{ + DI::config()->set('audon', 'audonurl', trim($_POST['audonurl'] ?? '')); +} + +/** + * This is a statement rather than an actual function definition. The simple + * existence of this method is checked to figure out if the addon offers a + * module. + */ +function audon_module() {} + +function audon_content(): string +{ + $o = ''; + + /* landingpage to create chatrooms */ + $audonurl = DI::config()->get('audon', 'audonurl'); + + + /* embedd the landing page in an iframe */ + $o .= '

' . DI::l10n()->t('Audio Chat') . '

'; + $o .= '

' . DI::l10n()->t('Audon is an audio conferencing tool. Connect your account to Audon and create a room. Share the generated link to talk to other participants.') . '

'; + if ($audonurl == '') { + $o .= '

' . DI::l10n()->t('Please contact your Friendica administrator to remind them to configure the Audon addon.') . '

'; + } else { + $o .= ''; + } + + return $o; +} diff --git a/audon/lang/C/messages.po b/audon/lang/C/messages.po new file mode 100644 index 00000000..c8fd38af --- /dev/null +++ b/audon/lang/C/messages.po @@ -0,0 +1,52 @@ +# ADDON audon +# Copyright (C) +# This file is distributed under the same license as the Friendica audon addon package. +# +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-08-18 18:23+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: audon.php:22 +msgid "Audon Audiochat" +msgstr "" + +#: audon.php:29 +msgid "Save Settings" +msgstr "" + +#: audon.php:32 +msgid "Audon Base URL" +msgstr "" + +#: audon.php:34 +msgid "" +"Page your users will create an Audon audio chat room on. For example you " +"could use https://audon.space." +msgstr "" + +#: audon.php:60 +msgid "Audio Chat" +msgstr "" + +#: audon.php:61 +msgid "" +"Audon is an audio conferencing tool. Connect your account to Audon and " +"create a room. Share the generated link to talk to other participants." +msgstr "" + +#: audon.php:63 +msgid "" +"Please contact your Friendica administrator to remind them to configure the " +"Audon addon." +msgstr "" diff --git a/audon/templates/admin.tpl b/audon/templates/admin.tpl new file mode 100644 index 00000000..e2758583 --- /dev/null +++ b/audon/templates/admin.tpl @@ -0,0 +1,2 @@ +{{include file="field_input.tpl" field=$audonurl}} + diff --git a/pageheader/pageheader.css b/pageheader/pageheader.css index 8b3282fb..ba398f20 100644 --- a/pageheader/pageheader.css +++ b/pageheader/pageheader.css @@ -16,8 +16,18 @@ } .pageheader { - text-align: center; + text-align: left; /* center > left */ width: 100%; margin-top: 25px; - font-size: 20px; + font-size: 1.55rem; /* 20px > 1.55rem */ +} + +/* The pageheader box */ +.pageheader { + padding: 20px; + background-color: #2eb885; /* Green */ + color: white; + border: 1px solid transparent; + border-radius: 2px; + margin-bottom: 15px; }