2020-01-29 13:37:25 -06:00
|
|
|
<template>
|
|
|
|
<div class="ieepwinx">
|
|
|
|
<portal to="icon"><fa :icon="faSatellite"/></portal>
|
2020-07-24 11:36:39 -05:00
|
|
|
<portal to="title" v-t="'manageAntennas'"></portal>
|
2020-01-29 13:37:25 -06:00
|
|
|
|
2020-02-08 02:52:36 -06:00
|
|
|
<mk-button @click="create" primary class="add"><fa :icon="faPlus"/> {{ $t('add') }}</mk-button>
|
2020-01-29 13:37:25 -06:00
|
|
|
|
|
|
|
<x-antenna v-if="draft" :antenna="draft" @created="onAntennaCreated" style="margin-bottom: var(--margin);"/>
|
|
|
|
|
|
|
|
<mk-pagination :pagination="pagination" #default="{items}" class="antennas" ref="list">
|
2020-02-05 23:23:01 -06:00
|
|
|
<x-antenna v-for="(antenna, i) in items" :key="antenna.id" :antenna="antenna" @created="onAntennaDeleted"/>
|
2020-01-29 13:37:25 -06:00
|
|
|
</mk-pagination>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
|
|
|
import { faSatellite, faPlus } from '@fortawesome/free-solid-svg-icons';
|
|
|
|
import MkPagination from '../../components/ui/pagination.vue';
|
|
|
|
import MkButton from '../../components/ui/button.vue';
|
|
|
|
import XAntenna from './index.antenna.vue';
|
|
|
|
|
|
|
|
export default Vue.extend({
|
|
|
|
metaInfo() {
|
|
|
|
return {
|
|
|
|
title: this.$t('manageAntennas') as string,
|
|
|
|
};
|
|
|
|
},
|
|
|
|
|
|
|
|
components: {
|
|
|
|
MkPagination,
|
|
|
|
MkButton,
|
|
|
|
XAntenna,
|
|
|
|
},
|
|
|
|
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
pagination: {
|
|
|
|
endpoint: 'antennas/list',
|
|
|
|
limit: 10,
|
|
|
|
},
|
|
|
|
draft: null,
|
|
|
|
faSatellite, faPlus
|
|
|
|
};
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
create() {
|
|
|
|
this.draft = {
|
|
|
|
name: '',
|
|
|
|
src: 'all',
|
|
|
|
userListId: null,
|
2020-02-14 10:03:59 -06:00
|
|
|
userGroupId: null,
|
2020-01-29 13:37:25 -06:00
|
|
|
users: [],
|
|
|
|
keywords: [],
|
2020-02-20 09:28:45 -06:00
|
|
|
excludeKeywords: [],
|
2020-01-29 13:37:25 -06:00
|
|
|
withReplies: false,
|
|
|
|
caseSensitive: false,
|
|
|
|
withFile: false,
|
|
|
|
notify: false
|
|
|
|
};
|
|
|
|
},
|
|
|
|
|
|
|
|
onAntennaCreated() {
|
|
|
|
this.$refs.list.reload();
|
|
|
|
this.draft = null;
|
|
|
|
},
|
|
|
|
|
|
|
|
onAntennaDeleted() {
|
|
|
|
this.$refs.list.reload();
|
|
|
|
},
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.ieepwinx {
|
|
|
|
> .add {
|
|
|
|
margin: 0 auto 16px auto;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|