enhance(client): 設定から自分のロールを確認できるように

This commit is contained in:
syuilo 2023-03-12 16:39:16 +09:00
parent 7c2d8d73ce
commit 8ac5c35f09
4 changed files with 66 additions and 0 deletions

View file

@ -16,6 +16,7 @@ You should also include the user name that made the change.
- ユーザーごとにRenoteをミュートできるように - ユーザーごとにRenoteをミュートできるように
- ノートごとに絵文字リアクションを受け取るか設定できるように - ノートごとに絵文字リアクションを受け取るか設定できるように
- ロールの並び順を設定可能に - ロールの並び順を設定可能に
- enhance(client): 設定から自分のロールを確認できるように
- enhance(client): DM作成時にメンションも含むように - enhance(client): DM作成時にメンションも含むように
- enhance(client): フォロー申請のボタンのデザインを改善 - enhance(client): フォロー申請のボタンのデザインを改善
- enhance(backend): OpenAPIエンドポイントを復旧 - enhance(backend): OpenAPIエンドポイントを復旧

View file

@ -134,6 +134,11 @@ const menuDef = computed(() => [{
text: i18n.ts.importAndExport, text: i18n.ts.importAndExport,
to: '/settings/import-export', to: '/settings/import-export',
active: currentPage?.route.name === 'import-export', active: currentPage?.route.name === 'import-export',
}, {
icon: 'ti ti-badges',
text: i18n.ts.roles,
to: '/settings/roles',
active: currentPage?.route.name === 'roles',
}, { }, {
icon: 'ti ti-planet-off', icon: 'ti ti-planet-off',
text: i18n.ts.instanceMute, text: i18n.ts.instanceMute,

View file

@ -0,0 +1,56 @@
<template>
<div class="_gaps_m">
<FormSection first>
<template #label>{{ i18n.ts.rolesAssignedToMe }}</template>
<div class="_gaps_s">
<MkRolePreview v-for="role in $i.roles" :key="role.id" :role="role" :for-moderation="false"/>
</div>
</FormSection>
<FormSection>
<template #label>{{ i18n.ts._role.policies }}</template>
<div class="_gaps_s">
<div v-for="policy in Object.keys($i.policies)" :key="policy">
{{ policy }} ... {{ $i.policies[policy] }}
</div>
</div>
</FormSection>
</div>
</template>
<script lang="ts" setup>
import { computed, reactive, watch } from 'vue';
import MkButton from '@/components/MkButton.vue';
import MkInput from '@/components/MkInput.vue';
import MkTextarea from '@/components/MkTextarea.vue';
import MkSwitch from '@/components/MkSwitch.vue';
import MkSelect from '@/components/MkSelect.vue';
import FormSplit from '@/components/form/split.vue';
import MkFolder from '@/components/MkFolder.vue';
import FormSlot from '@/components/form/slot.vue';
import FormSection from '@/components/form/section.vue';
import * as os from '@/os';
import { i18n } from '@/i18n';
import { $i } from '@/account';
import { definePageMetadata } from '@/scripts/page-metadata';
import { defaultStore } from '@/store';
import MkRolePreview from '@/components/MkRolePreview.vue';
function save() {
os.apiWithDialog('i/update', {
});
}
const headerActions = $computed(() => []);
const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.roles,
icon: 'ti ti-badges',
});
</script>
<style lang="scss" module>
</style>

View file

@ -49,6 +49,10 @@ export const routes = [{
path: '/profile', path: '/profile',
name: 'profile', name: 'profile',
component: page(() => import('./pages/settings/profile.vue')), component: page(() => import('./pages/settings/profile.vue')),
}, {
path: '/roles',
name: 'roles',
component: page(() => import('./pages/settings/roles.vue')),
}, { }, {
path: '/privacy', path: '/privacy',
name: 'privacy', name: 'privacy',