{
name: ps.name,
description: ps.description,
color: ps.color,
+ iconUrl: ps.iconUrl,
target: ps.target,
condFormula: ps.condFormula,
isPublic: ps.isPublic,
isModerator: ps.isModerator,
isAdministrator: ps.isAdministrator,
+ asBadge: ps.asBadge,
canEditMembersByModerator: ps.canEditMembersByModerator,
policies: ps.policies,
});
diff --git a/packages/frontend/src/components/MkNoteHeader.vue b/packages/frontend/src/components/MkNoteHeader.vue
index 8771168a4..6b43f1466 100644
--- a/packages/frontend/src/components/MkNoteHeader.vue
+++ b/packages/frontend/src/components/MkNoteHeader.vue
@@ -5,6 +5,9 @@
bot
+
+
+
@@ -77,4 +80,17 @@ defineProps<{
margin-left: auto;
font-size: 0.9em;
}
+
+.badgeRoles {
+ margin: 0 .5em 0 0;
+}
+
+.badgeRole {
+ height: 1.3em;
+ vertical-align: -20%;
+
+ & + .badgeRole {
+ margin-left: .125em;
+ }
+}
diff --git a/packages/frontend/src/pages/admin/roles.editor.vue b/packages/frontend/src/pages/admin/roles.editor.vue
index ae5ef39ba..086537a94 100644
--- a/packages/frontend/src/pages/admin/roles.editor.vue
+++ b/packages/frontend/src/pages/admin/roles.editor.vue
@@ -13,6 +13,10 @@
#RRGGBB
+
+ {{ i18n.ts._role.iconUrl }}
+
+
{{ i18n.ts._role.permission }}
@@ -35,6 +39,21 @@
+
+ {{ i18n.ts._role.canEditMembersByModerator }}
+ {{ i18n.ts._role.descriptionOfCanEditMembersByModerator }}
+
+
+
+ {{ i18n.ts._role.isPublic }}
+ {{ i18n.ts._role.descriptionOfIsPublic }}
+
+
+
+ {{ i18n.ts._role.asBadge }}
+ {{ i18n.ts._role.descriptionOfAsBadge }}
+
+
{{ i18n.ts._role.policies }}
@@ -358,16 +377,6 @@
-
- {{ i18n.ts._role.canEditMembersByModerator }}
- {{ i18n.ts._role.descriptionOfCanEditMembersByModerator }}
-
-
-
- {{ i18n.ts._role.isPublic }}
- {{ i18n.ts._role.descriptionOfIsPublic }}
-
-
{{ role ? i18n.ts.save : i18n.ts.create }}
@@ -426,9 +435,11 @@ let name = $ref(role?.name ?? 'New Role');
let description = $ref(role?.description ?? '');
let rolePermission = $ref(role?.isAdministrator ? 'administrator' : role?.isModerator ? 'moderator' : 'normal');
let color = $ref(role?.color ?? null);
+let iconUrl = $ref(role?.iconUrl ?? null);
let target = $ref(role?.target ?? 'manual');
let condFormula = $ref(role?.condFormula ?? { id: uuid(), type: 'isRemote' });
let isPublic = $ref(role?.isPublic ?? false);
+let asBadge = $ref(role?.asBadge ?? false);
let canEditMembersByModerator = $ref(role?.canEditMembersByModerator ?? false);
const policies = reactive>({});
@@ -466,11 +477,13 @@ async function save() {
name,
description,
color: color === '' ? null : color,
+ iconUrl: iconUrl === '' ? null : iconUrl,
target,
condFormula,
isAdministrator: rolePermission === 'administrator',
isModerator: rolePermission === 'moderator',
isPublic,
+ asBadge,
canEditMembersByModerator,
policies,
});
@@ -480,11 +493,13 @@ async function save() {
name,
description,
color: color === '' ? null : color,
+ iconUrl: iconUrl === '' ? null : iconUrl,
target,
condFormula,
isAdministrator: rolePermission === 'administrator',
isModerator: rolePermission === 'moderator',
isPublic,
+ asBadge,
canEditMembersByModerator,
policies,
});
diff --git a/packages/frontend/src/pages/user/home.vue b/packages/frontend/src/pages/user/home.vue
index c960b3127..56858a937 100644
--- a/packages/frontend/src/pages/user/home.vue
+++ b/packages/frontend/src/pages/user/home.vue
@@ -39,7 +39,10 @@
-
{{ role.name }}
+
+
+ {{ role.name }}
+