add welcome message to status
Some checks failed
PHP Code Checker / PHP Code Checker (pull_request) Failing after 39s
PHPUnit / PHPUnit – PHP 8.1 (pull_request) Successful in 1m6s
PHPUnit / PHPUnit – PHP 8.2 (pull_request) Successful in 1m48s
PHPUnit / PHPUnit – PHP 8.3 (pull_request) Successful in 1m1s

This commit is contained in:
André Menrath 2024-10-19 14:23:06 +02:00
parent fdfdf6c0b2
commit 10ea2f17d1
3 changed files with 49 additions and 5 deletions

12
CHANGELOG.md Normal file
View file

@ -0,0 +1,12 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.1.0] - 2024-10-20
### Added
* Initial version tag.

View file

@ -5,6 +5,20 @@
margin-bottom: 1.5em;
}
.activitypub-event-bridge-settings-page .box ul.activitypub-event-bridge-list {
list-style-type: disc;
margin-left: 1rem;
}
.activitypub-event-bridge-settings-page .box pre {
padding: 1rem;
min-height: 200px;
box-shadow: none;
border-radius: 15px;
border: 1px solid #dfe0e2;
background-color: #f7f7f7;
}
.activitypub-event-bridge-settings {
max-width: 800px;
margin: 0 auto;
@ -50,3 +64,4 @@
.activitypub-event-bridge-settings .box h3 {
font-size: 1.1rem!important;
}

View file

@ -20,13 +20,30 @@ use ActivityPub_Event_Bridge\Setup;
$active_event_plugins = Setup::get_instance()->get_active_event_plugins();
global $wp_filesystem;
WP_Filesystem();
?>
<div class="activitypub-event-bridge-settings activitypub-event-bridge-settings-page hide-if-no-js">
<div class="box">
<h2><?php \esc_html_e( 'Detected Event Plugins', 'activitypub-event-bridge' ); ?></h2>
<h2><?php \esc_html_e( 'Welcome', 'activitypub-event-bridge' ); ?></h2>
<p><?php \esc_html_e( 'The ActivityPub Event Bridge detected the following (activated) event plugins:', 'activitypub-event-bridge' ); ?></p>
<ul class="activitypub-event-bridge-list">
<?php foreach ( $active_event_plugins as $active_event_plugin ) { ?>
<h3> <?php echo esc_html( $active_event_plugin->get_plugin_name() ); ?> </h3>
<li><?php echo esc_html( $active_event_plugin->get_plugin_name() ); ?> </li>
<?php } ?>
</ul>
</div>
<div class="box">
<h2><?php \esc_html_e( 'Changelog', 'activitypub-event-bridge' ); ?></h2>
<pre>
<?php
$changelog = $wp_filesystem->get_contents( ACTIVITYPUB_EVENT_BRIDGE_PLUGIN_DIR . '/CHANGELOG.md' );
echo esc_html( substr( $changelog, strpos( $changelog, "\n", 180 ) + 1 ) );
?>
</pre>
</div>
</div>