summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-11-15 04:24:40 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-11-15 04:24:40 +0900
commit0985f7f609dd8ce0f30c1f96bb7cb0c2699e851e (patch)
tree1df1a525a6ce3c7dbc043c6f9aa61ae5f6c0c266 /src
parentModerator system (diff)
downloadmisskey-0985f7f609dd8ce0f30c1f96bb7cb0c2699e851e.tar.gz
misskey-0985f7f609dd8ce0f30c1f96bb7cb0c2699e851e.tar.bz2
misskey-0985f7f609dd8ce0f30c1f96bb7cb0c2699e851e.zip
[Client] Fix bugs
Diffstat (limited to 'src')
-rw-r--r--src/client/app/admin/views/moderators.vue2
-rw-r--r--src/client/app/admin/views/users.vue57
2 files changed, 42 insertions, 17 deletions
diff --git a/src/client/app/admin/views/moderators.vue b/src/client/app/admin/views/moderators.vue
index ebf20c12fd..ba9417d969 100644
--- a/src/client/app/admin/views/moderators.vue
+++ b/src/client/app/admin/views/moderators.vue
@@ -43,7 +43,7 @@ export default Vue.extend({
await process().catch(e => {
this.$root.alert({
type: 'error',
- text: e
+ text: e.toString()
});
});
diff --git a/src/client/app/admin/views/users.vue b/src/client/app/admin/views/users.vue
index e2a6d123c4..693d5cea84 100644
--- a/src/client/app/admin/views/users.vue
+++ b/src/client/app/admin/views/users.vue
@@ -49,6 +49,7 @@ import parseAcct from "../../../../misc/acct/parse";
export default Vue.extend({
i18n: i18n('admin/views/users.vue'),
+
data() {
return {
verifyUsername: null,
@@ -67,13 +68,19 @@ export default Vue.extend({
this.verifying = true;
const process = async () => {
- const user = await this.$root.os.api('users/show', parseAcct(this.verifyUsername));
- await this.$root.os.api('admin/verify-user', { userId: user.id });
- //this.$root.os.apis.dialog({ text: this.$t('verified') });
+ const user = await this.$root.api('users/show', parseAcct(this.verifyUsername));
+ await this.$root.api('admin/verify-user', { userId: user.id });
+ this.$root.alert({
+ type: 'success',
+ text: this.$t('verified')
+ });
};
await process().catch(e => {
- //this.$root.os.apis.dialog({ text: `Failed: ${e}` });
+ this.$root.alert({
+ type: 'error',
+ text: e.toString()
+ });
});
this.verifying = false;
@@ -83,13 +90,19 @@ export default Vue.extend({
this.unverifying = true;
const process = async () => {
- const user = await this.$root.os.api('users/show', parseAcct(this.unverifyUsername));
- await this.$root.os.api('admin/unverify-user', { userId: user.id });
- //this.$root.os.apis.dialog({ text: this.$t('unverified') });
+ const user = await this.$root.api('users/show', parseAcct(this.unverifyUsername));
+ await this.$root.api('admin/unverify-user', { userId: user.id });
+ this.$root.alert({
+ type: 'success',
+ text: this.$t('unverified')
+ });
};
await process().catch(e => {
- //this.$root.os.apis.dialog({ text: `Failed: ${e}` });
+ this.$root.alert({
+ type: 'error',
+ text: e.toString()
+ });
});
this.unverifying = false;
@@ -99,13 +112,19 @@ export default Vue.extend({
this.suspending = true;
const process = async () => {
- const user = await this.$root.os.api('users/show', parseAcct(this.suspendUsername));
- await this.$root.os.api('admin/suspend-user', { userId: user.id });
- //this.$root.os.apis.dialog({ text: this.$t('suspended') });
+ const user = await this.$root.api('users/show', parseAcct(this.suspendUsername));
+ await this.$root.api('admin/suspend-user', { userId: user.id });
+ this.$root.alert({
+ type: 'success',
+ text: this.$t('suspended')
+ });
};
await process().catch(e => {
- //this.$root.os.apis.dialog({ text: `Failed: ${e}` });
+ this.$root.alert({
+ type: 'error',
+ text: e.toString()
+ });
});
this.suspending = false;
@@ -115,13 +134,19 @@ export default Vue.extend({
this.unsuspending = true;
const process = async () => {
- const user = await this.$root.os.api('users/show', parseAcct(this.unsuspendUsername));
- await this.$root.os.api('admin/unsuspend-user', { userId: user.id });
- //this.$root.os.apis.dialog({ text: this.$t('unsuspended') });
+ const user = await this.$root.api('users/show', parseAcct(this.unsuspendUsername));
+ await this.$root.api('admin/unsuspend-user', { userId: user.id });
+ this.$root.alert({
+ type: 'success',
+ text: this.$t('unsuspended')
+ });
};
await process().catch(e => {
- //this.$root.os.apis.dialog({ text: `Failed: ${e}` });
+ this.$root.alert({
+ type: 'error',
+ text: e.toString()
+ });
});
this.unsuspending = false;