aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates
diff options
context:
space:
mode:
authorwinter2025-04-04 20:23:19 +0100
committerwinter2025-04-04 20:23:19 +0100
commit1dff99922724fa9fb7da7e41f645197a312786cb (patch)
tree4784e4828521040a4955f3ec8e89a84b689fb4a3 /templates
parent44212e6248c93171ddedb51bfdb212ce8ffed695 (diff)
add web+pawpub support
Diffstat (limited to 'templates')
-rw-r--r--templates/note/note.php11
-rw-r--r--templates/preferences_page.php18
2 files changed, 28 insertions, 1 deletions
diff --git a/templates/note/note.php b/templates/note/note.php
index ddc2bac..fe28416 100644
--- a/templates/note/note.php
+++ b/templates/note/note.php
@@ -126,6 +126,17 @@ if ($user != null) {
<span><?= __('action.share') ?></span>
</button>
</li>
+ <li>
+ <button data-share-url="<?= htmlspecialchars(substr_replace($note->uri, 'web+pawpub', 0, 5)) ?>" _="
+ on click
+ set url to my @data-share-url
+ js(url)
+ navigator.share({ url: url })
+ end" type="button">
+ <span class="material-symbols share-windows"></span>
+ <span><?= __('action.share.web+pawpub') ?></span>
+ </button>
+ </li>
<?php if ($note->author->isLocal && ($note->author == $user?->actor || $user?->isAdmin) && !$note->hasPage()): ?>
<li>
<button hx-get="/fragment/note/<?= $note->id ?>/edit" hx-target="closest .note" hx-swap="outerHTML">
diff --git a/templates/preferences_page.php b/templates/preferences_page.php
index 2744747..46ba1ff 100644
--- a/templates/preferences_page.php
+++ b/templates/preferences_page.php
@@ -1,7 +1,23 @@
-<?php call_template('skeleton', ['pageTitle' => __('preferences.pageTitle')], function () {
+<?php
+
+use Digitigrade\GlobalSettings;
+
+call_template('skeleton', ['pageTitle' => __('preferences.pageTitle')], function () {
global $user, $saved;
+
+ $siteName = GlobalSettings::getInstance()->get('instance.name');
+
call_template('preferences_form', ['user' => $user, 'saved' => $saved ?? false]);
?>
+
+ <h2><?= __('preferences.schemeHandler.heading') ?></h2>
+ <div class="indentedContainer">
+ <p><?= __('preferences.schemeHandler.description') ?></p>
+ <button class="primary" type="button" onclick="navigator.registerProtocolHandler('web+pawpub', '/lookup?uri=%s')">
+ <?= __('preferences.schemeHandler.action') ?>
+ </button>
+ </div>
+
<h2><?= __('changePassword.heading') ?></h2>
<?php call_template('change_password_form');
}); \ No newline at end of file