This commit is contained in:
syuilo 2021-10-03 23:51:54 +09:00
parent 9a33495694
commit 66369b4b1d
3 changed files with 51 additions and 34 deletions

View file

@ -32,7 +32,8 @@ export default defineComponent({
return { return {
[symbols.PAGE_INFO]: { [symbols.PAGE_INFO]: {
title: this.$ts.announcements, title: this.$ts.announcements,
icon: 'fas fa-broadcast-tower' icon: 'fas fa-broadcast-tower',
bg: 'var(--bg)',
}, },
pagination: { pagination: {
endpoint: 'announcements', endpoint: 'announcements',

View file

@ -1,45 +1,42 @@
<template> <template>
<FormBase> <div>
<FormGroup> <FormSection>
<template #label>{{ $ts._exportOrImport.allNotes }}</template> <template #label>{{ $ts._exportOrImport.allNotes }}</template>
<FormButton @click="doExport('notes')"><i class="fas fa-download"></i> {{ $ts.export }}</FormButton> <MkButton :class="$style.button" inline @click="doExport('notes')"><i class="fas fa-download"></i> {{ $ts.export }}</MkButton>
</FormGroup> </FormSection>
<FormGroup> <FormSection>
<template #label>{{ $ts._exportOrImport.followingList }}</template> <template #label>{{ $ts._exportOrImport.followingList }}</template>
<FormButton @click="doExport('following')"><i class="fas fa-download"></i> {{ $ts.export }}</FormButton> <MkButton :class="$style.button" inline @click="doExport('following')"><i class="fas fa-download"></i> {{ $ts.export }}</MkButton>
<FormButton @click="doImport('following', $event)"><i class="fas fa-upload"></i> {{ $ts.import }}</FormButton> <MkButton :class="$style.button" inline @click="doImport('following', $event)"><i class="fas fa-upload"></i> {{ $ts.import }}</MkButton>
</FormGroup> </FormSection>
<FormGroup> <FormSection>
<template #label>{{ $ts._exportOrImport.userLists }}</template> <template #label>{{ $ts._exportOrImport.userLists }}</template>
<FormButton @click="doExport('user-lists')"><i class="fas fa-download"></i> {{ $ts.export }}</FormButton> <MkButton :class="$style.button" inline @click="doExport('user-lists')"><i class="fas fa-download"></i> {{ $ts.export }}</MkButton>
<FormButton @click="doImport('user-lists', $event)"><i class="fas fa-upload"></i> {{ $ts.import }}</FormButton> <MkButton :class="$style.button" inline @click="doImport('user-lists', $event)"><i class="fas fa-upload"></i> {{ $ts.import }}</MkButton>
</FormGroup> </FormSection>
<FormGroup> <FormSection>
<template #label>{{ $ts._exportOrImport.muteList }}</template> <template #label>{{ $ts._exportOrImport.muteList }}</template>
<FormButton @click="doExport('mute')"><i class="fas fa-download"></i> {{ $ts.export }}</FormButton> <MkButton :class="$style.button" inline @click="doExport('mute')"><i class="fas fa-download"></i> {{ $ts.export }}</MkButton>
</FormGroup> </FormSection>
<FormGroup> <FormSection>
<template #label>{{ $ts._exportOrImport.blockingList }}</template> <template #label>{{ $ts._exportOrImport.blockingList }}</template>
<FormButton @click="doExport('blocking')"><i class="fas fa-download"></i> {{ $ts.export }}</FormButton> <MkButton :class="$style.button" inline @click="doExport('blocking')"><i class="fas fa-download"></i> {{ $ts.export }}</MkButton>
</FormGroup> </FormSection>
</FormBase> </div>
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent } from 'vue'; import { defineComponent } from 'vue';
import FormSelect from '@client/components/form/select.vue'; import MkButton from '@client/components/ui/button.vue';
import FormButton from '@client/components/debobigego/button.vue'; import FormSection from '@client/components/form/section.vue';
import FormBase from '@client/components/debobigego/base.vue';
import FormGroup from '@client/components/debobigego/group.vue';
import * as os from '@client/os'; import * as os from '@client/os';
import { selectFile } from '@client/scripts/select-file'; import { selectFile } from '@client/scripts/select-file';
import * as symbols from '@client/symbols'; import * as symbols from '@client/symbols';
export default defineComponent({ export default defineComponent({
components: { components: {
FormBase, FormSection,
FormGroup, MkButton,
FormButton,
}, },
emits: ['info'], emits: ['info'],
@ -103,3 +100,9 @@ export default defineComponent({
} }
}); });
</script> </script>
<style module>
.button {
margin-right: 16px;
}
</style>

View file

@ -95,6 +95,18 @@ module.exports = {
}] }]
}, { }, {
test: /\.css$/, test: /\.css$/,
oneOf: [{
resourceQuery: /module/,
use: [{
loader: 'vue-style-loader'
}, {
loader: 'css-loader',
options: {
modules: true,
esModule: false, // TODO: trueにすると壊れる。Vue3移行の折にはtrueにできるかもしれない
}
}, postcss]
}, {
use: [{ use: [{
loader: 'vue-style-loader' loader: 'vue-style-loader'
}, { }, {
@ -103,6 +115,7 @@ module.exports = {
esModule: false, // TODO: trueにすると壊れる。Vue3移行の折にはtrueにできるかもしれない esModule: false, // TODO: trueにすると壊れる。Vue3移行の折にはtrueにできるかもしれない
} }
}, postcss] }, postcss]
}]
}, { }, {
test: /\.svg$/, test: /\.svg$/,
use: [ use: [