aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--locale/en_GB.json1
-rw-r--r--static/icons.css3
-rw-r--r--static/note.css4
-rw-r--r--static/pills.css1
-rw-r--r--templates/actor/profile.php6
-rw-r--r--templates/note/info_line.php33
6 files changed, 31 insertions, 17 deletions
diff --git a/locale/en_GB.json b/locale/en_GB.json
index f0d8bd5..d7cc08e 100644
--- a/locale/en_GB.json
+++ b/locale/en_GB.json
@@ -20,6 +20,7 @@
"user.profile.unblock.confirm": "Are you sure you want to unblock this user?",
"user.profile.displayName": "Display name",
"user.profile.pronouns": "Pronouns",
+ "user.profile.automated": "Automated account",
"user.profile.changeAvatar": "Choose a new avatar image",
"user.profile.resetAvatar": "Reset avatar",
"user.profile.avatarReset": "Avatar reset!",
diff --git a/static/icons.css b/static/icons.css
index 3cd60be..76dd360 100644
--- a/static/icons.css
+++ b/static/icons.css
@@ -135,4 +135,7 @@
&.sync {
--svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M4 20v-2h2.75l-.4-.35q-1.225-1.225-1.787-2.662T4 12.05q0-2.775 1.663-4.937T10 4.25v2.1Q8.2 7 7.1 8.563T6 12.05q0 1.125.425 2.188T7.75 16.2l.25.25V14h2v6zm10-.25v-2.1q1.8-.65 2.9-2.212T18 11.95q0-1.125-.425-2.187T16.25 7.8L16 7.55V10h-2V4h6v2h-2.75l.4.35q1.225 1.225 1.788 2.663T20 11.95q0 2.775-1.662 4.938T14 19.75'/%3E%3C/svg%3E");
}
+ &.person-off-outline {
+ --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M19.775 22.625L17.15 20H4v-2.8q0-.85.438-1.562T5.6 14.55q1.125-.575 2.288-.925t2.362-.525L1.375 4.225L2.8 2.8l18.4 18.4zM6 18h9.15l-3-3H12q-1.4 0-2.775.338T6.5 16.35q-.225.125-.363.35T6 17.2zm12.4-3.45q.725.35 1.15 1.063T20 17.15l-3.35-3.35q.45.175.888.35t.862.4m-4.2-3.2l-1.475-1.475q.575-.225.925-.737T14 8q0-.825-.587-1.412T12 6q-.625 0-1.137.35t-.738.925L8.65 5.8q.575-.85 1.45-1.325T12 4q1.65 0 2.825 1.175T16 8q0 1.025-.475 1.9T14.2 11.35m.95 6.65H6zm-3.725-9.425'/%3E%3C/svg%3E");
+ }
}
diff --git a/static/note.css b/static/note.css
index 09dbd60..6c88697 100644
--- a/static/note.css
+++ b/static/note.css
@@ -147,7 +147,9 @@ article.note {
text-decoration: underline;
}
}
- .privacyScope.inlineIcon {
+ .privacyScope {
+ display: flex;
+ gap: var(--spacing-half);
align-self: center;
}
}
diff --git a/static/pills.css b/static/pills.css
index 45f9218..3501939 100644
--- a/static/pills.css
+++ b/static/pills.css
@@ -9,6 +9,7 @@
color: var(--clr-foreground-on-secondary);
border-radius: var(--border-radius);
width: max-content !important;
+ font-weight: bold;
&:not(:has(+ .inlinePill)) {
margin-bottom: var(--spacing-single);
diff --git a/templates/actor/profile.php b/templates/actor/profile.php
index 3e1a11e..4e5f66a 100644
--- a/templates/actor/profile.php
+++ b/templates/actor/profile.php
@@ -23,6 +23,12 @@ $actorUser = UserAccount::findByLinkedActor($actor);
<div class="pronouns"><?= htmlspecialchars($actor->pronouns) ?></div>
<div class="handle">@<?= $actor->getFullHandle() ?></div>
<div class="joinedDate"><?= sprintf(__('user.profile.createdAt'), format_datetime($actor->created)) ?></div>
+ <?php if ($actor->automated): ?>
+ <div class="inlinePill">
+ <span class="pillIcon material-symbols person-off-outline"></span>
+ <span class="pillText"><?= __('user.profile.automated') ?></span>
+ </div>
+ <?php endif; ?>
</div>
<div class="profileMiniActions">
diff --git a/templates/note/info_line.php b/templates/note/info_line.php
index acc85d7..4886b1c 100644
--- a/templates/note/info_line.php
+++ b/templates/note/info_line.php
@@ -1,8 +1,4 @@
-<?php
-
-use Digitigrade\Model\NotePrivacyScope;
-
-?>
+<?php use Digitigrade\Model\NotePrivacyScope; ?>
<div class="infoLine">
<a class="authorName"
href="/@/<?= htmlspecialchars($note->author->getFullHandle()) ?>"><?= htmlspecialchars($note->author->displayName) ?></a>
@@ -14,15 +10,20 @@ use Digitigrade\Model\NotePrivacyScope;
<a class="timestamp" href="<?= htmlspecialchars($note->getLocalUiHref()) ?>">
<?= format_datetime($note->created) ?>
</a>
- <span class="privacyScope inlineIcon material-symbols <?= match ($note->privacy->scope) {
- NotePrivacyScope::NONE => 'lock',
- NotePrivacyScope::MUTUALS => 'group',
- NotePrivacyScope::FOLLOWERS => 'groups',
- NotePrivacyScope::PUBLIC => 'public'
- } ?>" title="<?= match ($note->privacy->scope) {
- NotePrivacyScope::NONE => __('note.privacy.scope.none'),
- NotePrivacyScope::MUTUALS => __('note.privacy.scope.mutuals'),
- NotePrivacyScope::FOLLOWERS => __('note.privacy.scope.followers'),
- NotePrivacyScope::PUBLIC => __('note.privacy.scope.public')
- } ?>"></span>
+ <span class="privacyScope">
+ <?php if ($note->author->automated): ?>
+ <span class="inlineIcon material-symbols person-off-outline" title="<?= __('user.profile.automated') ?>"></span>
+ <?php endif; ?>
+ <span class="inlineIcon material-symbols <?= match ($note->privacy->scope) {
+ NotePrivacyScope::NONE => 'lock',
+ NotePrivacyScope::MUTUALS => 'group',
+ NotePrivacyScope::FOLLOWERS => 'groups',
+ NotePrivacyScope::PUBLIC => 'public'
+ } ?>" title="<?= match ($note->privacy->scope) {
+ NotePrivacyScope::NONE => __('note.privacy.scope.none'),
+ NotePrivacyScope::MUTUALS => __('note.privacy.scope.mutuals'),
+ NotePrivacyScope::FOLLOWERS => __('note.privacy.scope.followers'),
+ NotePrivacyScope::PUBLIC => __('note.privacy.scope.public')
+ } ?>"></span>
+ </span>
</div> \ No newline at end of file