From 7394adb16fb375be6e57288e165488cee00d3647 Mon Sep 17 00:00:00 2001 From: Satsuki Yanagi <17376330+u1-liquid@users.noreply.github.com> Date: Wed, 22 May 2019 05:06:52 +0900 Subject: [PATCH] Add group update / transfer API --- locales/ja-JP.yml | 3 + .../common/views/pages/user-group-editor.vue | 81 +++++++++++++++-- src/client/app/init.ts | 2 + src/client/themes/dark.json5 | 3 + src/client/themes/light.json5 | 3 + src/models/repositories/user-group.ts | 6 ++ .../api/endpoints/users/groups/transfer.ts | 86 +++++++++++++++++++ .../api/endpoints/users/groups/update.ts | 62 +++++++++++++ 8 files changed, 240 insertions(+), 6 deletions(-) create mode 100644 src/server/api/endpoints/users/groups/transfer.ts create mode 100644 src/server/api/endpoints/users/groups/update.ts diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 904737884..c3eb0bb52 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -762,6 +762,9 @@ common/views/components/user-group-editor.vue: users: "メンバー" rename: "グループ名を変更" delete: "グループを削除" + transfer: "グループを譲渡" + transfer-are-you-sure: "グループ「$1」を「@$2」さんに譲渡しますか?" + transferred: "グループを譲渡しました" remove-user: "このグループから削除" delete-are-you-sure: "グループ「$1」を削除しますか?" deleted: "削除しました" diff --git a/src/client/app/common/views/pages/user-group-editor.vue b/src/client/app/common/views/pages/user-group-editor.vue index ef79689ae..a32148cd7 100644 --- a/src/client/app/common/views/pages/user-group-editor.vue +++ b/src/client/app/common/views/pages/user-group-editor.vue @@ -7,6 +7,7 @@ {{ $t('rename') }} {{ $t('delete') }} + {{ $t('transfer') }} @@ -28,9 +29,10 @@
+ owner @{{ user | acct }}
-
+
{{ $t('remove-user') }}
@@ -44,7 +46,7 @@