mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 16:55:18 +00:00
turn virtual lists into an app
This commit is contained in:
parent
162bda49c4
commit
829c46cbf0
4 changed files with 41 additions and 4 deletions
|
@ -310,6 +310,7 @@ class Apps {
|
|||
$apps = array(
|
||||
'Apps' => t('Apps'),
|
||||
'Friend Zoom' => t('Friend Zoom'),
|
||||
'Virtual Lists' => t('Virtual Lists'),
|
||||
'Articles' => t('Articles'),
|
||||
'Cards' => t('Cards'),
|
||||
'Calendar' => t('Calendar'),
|
||||
|
|
29
Zotlabs/Module/Vlists.php
Normal file
29
Zotlabs/Module/Vlists.php
Normal file
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
namespace Zotlabs\Module;
|
||||
|
||||
use Zotlabs\Lib\Apps;
|
||||
use Zotlabs\Lib\Libsync;
|
||||
use Zotlabs\Web\Controller;
|
||||
|
||||
class Vlists extends Controller {
|
||||
|
||||
|
||||
function get() {
|
||||
|
||||
$desc = t('This app creates dynamic access lists corresponding to [1] all connections, [2] all ActivityPub protocol connections, and [3] all Zot/6 protocol connections. These additional selections will be found within the Permissions setting tool.');
|
||||
|
||||
$text = '<div class="section-content-info-wrapper">' . $desc . '</div>';
|
||||
|
||||
$o .= $text;
|
||||
|
||||
|
||||
$text2 = '<div class="section-content-info-wrapper">' . t('This app is installed. ') . '</div>';
|
||||
|
||||
if (local_channel() && Apps::system_app_installed(local_channel(),'Virtual Lists')) {
|
||||
$o .= $text2;
|
||||
}
|
||||
|
||||
return $o;
|
||||
}
|
||||
}
|
6
app/vlists.apd
Normal file
6
app/vlists.apd
Normal file
|
@ -0,0 +1,6 @@
|
|||
version: 1
|
||||
url: $baseurl/vlists
|
||||
requires: local_channel
|
||||
name: Virtual Lists
|
||||
photo: icon:user-secret
|
||||
categories: Networking, Productivity
|
|
@ -5,6 +5,7 @@
|
|||
* @package acl_selectors
|
||||
*/
|
||||
|
||||
use Zotlabs\Lib\Apps;
|
||||
|
||||
function fixacl(&$item) {
|
||||
$item = str_replace( [ '<', '>' ], [ '', '' ], $item);
|
||||
|
@ -90,15 +91,15 @@ function populate_acl($defaults = null,$show_jotnets = true, $emptyACL_descripti
|
|||
}
|
||||
}
|
||||
|
||||
if ($channel) {
|
||||
if ($channel && Apps::system_app_installed($channel['channel_id'],'Virtual Lists')) {
|
||||
$selected = (($single_group && 'connections:' . $channel['channel_hash'] === $allow_gid[0]) ? ' selected = "selected" ' : '');
|
||||
$groups .= '<option id="vg1" value="connections:' . $channel['channel_hash'] . '"' . $selected . '>' . t('My connections') . ' ' . t('(List)') . '</option>' . "\r\n";
|
||||
$groups .= '<option id="vg1" value="connections:' . $channel['channel_hash'] . '"' . $selected . '>' . t('My connections') . ' ' . t('(Virtual List)') . '</option>' . "\r\n";
|
||||
if (get_pconfig($channel['channel_id'],'system','activitypub',get_config('system','activitypub',true))) {
|
||||
$selected = (($single_group && 'activitypub:' . $channel['channel_hash'] === $allow_gid[0]) ? ' selected = "selected" ' : '');
|
||||
$groups .= '<option id="vg2" value="activitypub:' . $channel['channel_hash'] . '"' . $selected . '>' . t('My ActivityPub connections') . ' ' . t('(List)') . '</option>' . "\r\n";
|
||||
$groups .= '<option id="vg2" value="activitypub:' . $channel['channel_hash'] . '"' . $selected . '>' . t('My ActivityPub connections') . ' ' . t('(Virtual List)') . '</option>' . "\r\n";
|
||||
}
|
||||
$selected = (($single_group && 'zot:' . $channel['channel_hash'] === $allow_gid[0]) ? ' selected = "selected" ' : '');
|
||||
$groups .= '<option id="vg3" value="zot:' . $channel['channel_hash'] . '"' . $selected . '>' . t('My Zot connections') . ' ' . t('(List)') . '</option>' . "\r\n";
|
||||
$groups .= '<option id="vg3" value="zot:' . $channel['channel_hash'] . '"' . $selected . '>' . t('My Zot connections') . ' ' . t('(Virtual List)') . '</option>' . "\r\n";
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue