mirror of
https://github.com/sim1222/misskey.git
synced 2025-08-07 17:23:54 +09:00
モデレーション周りのv11の機能復元 (#6249)
* モデレーション周りのv11の機能復元 * i18n * wip * wip Co-authored-by: syuilo <syuilotan@yahoo.co.jp>
This commit is contained in:
@ -99,10 +99,19 @@
|
||||
<span class="label">{{ $t('operations') }}</span>
|
||||
<mk-switch v-model="isSuspended" class="switch">{{ $t('stopActivityDelivery') }}</mk-switch>
|
||||
<mk-switch :value="isBlocked" class="switch" @change="changeBlock">{{ $t('blockThisInstance') }}</mk-switch>
|
||||
<details>
|
||||
<summary>{{ $t('deleteAllFiles') }}</summary>
|
||||
<mk-button @click="deleteAllFiles()" style="margin: 0.5em 0 0.5em 0;"><fa :icon="faTrashAlt"/> {{ $t('deleteAllFiles') }}</mk-button>
|
||||
</details>
|
||||
<details>
|
||||
<summary>{{ $t('removeAllFollowing') }}</summary>
|
||||
<mk-button @click="removeAllFollowing()" style="margin: 0.5em 0 0.5em 0;"><fa :icon="faMinusCircle"/> {{ $t('removeAllFollowing') }}</mk-button>
|
||||
<mk-info warn>{{ $t('removeAllFollowingDescription', { host: instance.host }) }}</mk-info>
|
||||
</details>
|
||||
</div>
|
||||
<details class="metadata">
|
||||
<summary class="label">{{ $t('metadata') }}</summary>
|
||||
<pre><code>{{ JSON.stringify(instance.metadata, null, 2) }}</code></pre>
|
||||
<pre><code>{{ JSON.stringify(instance, null, 2) }}</code></pre>
|
||||
</details>
|
||||
</div>
|
||||
</x-window>
|
||||
@ -112,11 +121,13 @@
|
||||
import Vue from 'vue';
|
||||
import Chart from 'chart.js';
|
||||
import i18n from '../../i18n';
|
||||
import { faTimes, faCrosshairs, faCloudDownloadAlt, faCloudUploadAlt, faUsers, faPencilAlt, faFileImage, faDatabase, faTrafficLight, faLongArrowAltUp, faLongArrowAltDown } from '@fortawesome/free-solid-svg-icons';
|
||||
import { faTimes, faCrosshairs, faCloudDownloadAlt, faCloudUploadAlt, faUsers, faPencilAlt, faFileImage, faDatabase, faTrafficLight, faLongArrowAltUp, faLongArrowAltDown, faMinusCircle, faTrashAlt } from '@fortawesome/free-solid-svg-icons';
|
||||
import XWindow from '../../components/window.vue';
|
||||
import MkUsersDialog from '../../components/users-dialog.vue';
|
||||
import MkSelect from '../../components/ui/select.vue';
|
||||
import MkButton from '../../components/ui/button.vue';
|
||||
import MkSwitch from '../../components/ui/switch.vue';
|
||||
import MkInfo from '../../components/ui/info.vue';
|
||||
|
||||
const chartLimit = 90;
|
||||
const sum = (...arr) => arr.reduce((r, a) => r.map((b, i) => a[i] + b));
|
||||
@ -135,7 +146,9 @@ export default Vue.extend({
|
||||
components: {
|
||||
XWindow,
|
||||
MkSelect,
|
||||
MkButton,
|
||||
MkSwitch,
|
||||
MkInfo,
|
||||
},
|
||||
|
||||
props: {
|
||||
@ -153,7 +166,7 @@ export default Vue.extend({
|
||||
chartInstance: null,
|
||||
chartSrc: 'requests',
|
||||
chartSpan: 'hour',
|
||||
faTimes, faCrosshairs, faCloudDownloadAlt, faCloudUploadAlt, faUsers, faPencilAlt, faFileImage, faDatabase, faTrafficLight, faLongArrowAltUp, faLongArrowAltDown
|
||||
faTimes, faCrosshairs, faCloudDownloadAlt, faCloudUploadAlt, faUsers, faPencilAlt, faFileImage, faDatabase, faTrafficLight, faLongArrowAltUp, faLongArrowAltDown, faMinusCircle, faTrashAlt
|
||||
};
|
||||
},
|
||||
|
||||
@ -239,6 +252,28 @@ export default Vue.extend({
|
||||
this.chartSrc = src;
|
||||
},
|
||||
|
||||
removeAllFollowing() {
|
||||
this.$root.api('admin/federation/remove-all-following', {
|
||||
host: this.instance.host
|
||||
}).then(() => {
|
||||
this.$root.dialog({
|
||||
type: 'success',
|
||||
iconOnly: true, autoClose: true
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
deleteAllFiles() {
|
||||
this.$root.api('admin/federation/delete-all-files', {
|
||||
host: this.instance.host
|
||||
}).then(() => {
|
||||
this.$root.dialog({
|
||||
type: 'success',
|
||||
iconOnly: true, autoClose: true
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
renderChart() {
|
||||
if (this.chartInstance) {
|
||||
this.chartInstance.destroy();
|
||||
|
Reference in New Issue
Block a user