Add most minimal setup wizard, welcome page with status and basic health checks #67

Merged
linos merged 6 commits from status_page into main 2024-10-19 16:46:51 +02:00
3 changed files with 49 additions and 5 deletions
Showing only changes of commit 10ea2f17d1 - Show all commits

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;
@ -49,4 +63,5 @@
.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>
<?php foreach ( $active_event_plugins as $active_event_plugin ) { ?>
<h3> <?php echo esc_html( $active_event_plugin->get_plugin_name() ); ?> </h3>
<?php } ?>
<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 ) { ?>
<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>