Minor: format code

pull/4020/head
Angel Fernando Quiroz Campos 4 years ago
parent e4c7e97fd1
commit c94cacbf5f
  1. 97
      assets/vue/views/message/List.vue
  2. 12
      assets/vue/views/message/Show.vue

@ -5,7 +5,7 @@
icon icon
tile tile
@click="composeHandler"> @click="composeHandler">
<v-icon icon="mdi-email-plus-outline"/> <v-icon icon="mdi-email-plus-outline" />
</v-btn> </v-btn>
<v-btn <v-btn
@ -13,7 +13,7 @@
icon icon
tile tile
@click="reloadHandler"> @click="reloadHandler">
<v-icon icon="mdi-refresh"/> <v-icon icon="mdi-refresh" />
</v-btn> </v-btn>
<v-btn <v-btn
@ -22,7 +22,7 @@
tile tile
@click="confirmDeleteMultiple" @click="confirmDeleteMultiple"
> >
<v-icon icon="mdi-delete"/> <v-icon icon="mdi-delete" />
</v-btn> </v-btn>
<!-- :disabled="!selectedItems || !selectedItems.length"--> <!-- :disabled="!selectedItems || !selectedItems.length"-->
@ -32,7 +32,7 @@
tile tile
@click="markAsReadMultiple" @click="markAsReadMultiple"
> >
<v-icon icon="mdi-email"/> <v-icon icon="mdi-email" />
</v-btn> </v-btn>
<v-btn <v-btn
@ -41,7 +41,7 @@
tile tile
@click="markAsUnReadMultiple" @click="markAsUnReadMultiple"
> >
<v-icon icon="mdi-email-open"/> <v-icon icon="mdi-email-open" />
</v-btn> </v-btn>
</template> </template>
@ -105,22 +105,22 @@
<DataTable <DataTable
v-model:filters="filters" v-model:filters="filters"
v-model:selection="selectedItems" v-model:selection="selectedItems"
:globalFilterFields="['title', 'sendDate']" :global-filter-fields="['title', 'sendDate']"
:lazy="true" :lazy="true"
:loading="isLoading" :loading="isLoading"
:paginator="true" :paginator="true"
:rows="10" :rows="10"
:rowsPerPageOptions="[5, 10, 20, 50]" :rows-per-page-options="[5, 10, 20, 50]"
:totalRecords="totalItems" :totalRecords="totalItems"
:value="items" :value="items"
class="p-datatable-sm" class="p-datatable-sm"
currentPageReportTemplate="Showing {first} to {last} of {totalRecords}" current-page-report-template="Showing {first} to {last} of {totalRecords}"
dataKey="id" dataKey="id"
filterDisplay="menu" filter-display="menu"
paginatorTemplate="CurrentPageReport FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown" paginator-template="CurrentPageReport FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown"
responsiveLayout="scroll" responsive-layout="scroll"
sortBy="sendDate" sortBy="sendDate"
sortOrder="asc" sort-order="asc"
@page="onPage($event)" @page="onPage($event)"
@sort="sortingChanged($event)"> @sort="sortingChanged($event)">
@ -129,7 +129,7 @@
<Column :header="$t('From')" :sortable="false" field="sender"> <Column :header="$t('From')" :sortable="false" field="sender">
<template #body="slotProps"> <template #body="slotProps">
<q-avatar size="40px"> <q-avatar size="40px">
<img :src="slotProps.data.sender.illustrationUrl + '?w=80&h=80&fit=crop'"/> <img :src="slotProps.data.sender.illustrationUrl + '?w=80&h=80&fit=crop'" />
</q-avatar> </q-avatar>
<a <a
@ -194,7 +194,7 @@
icon icon
tile tile
@click="confirmDeleteItem(slotProps.data)"> @click="confirmDeleteItem(slotProps.data)">
<v-icon icon="mdi-delete"/> <v-icon icon="mdi-delete" />
</v-btn> </v-btn>
</div> </div>
</template> </template>
@ -205,8 +205,13 @@
<!-- Dialogs--> <!-- Dialogs-->
<Dialog v-model:visible="itemDialog" :header="$t('New folder')" :modal="true" :style="{width: '450px'}" <Dialog
class="p-fluid"> v-model:visible="itemDialog"
:header="$t('New folder')"
:modal="true"
:style="{width: '450px'}"
class="p-fluid"
>
<div class="p-field"> <div class="p-field">
<label for="name">{{ $t('Name') }}</label> <label for="name">{{ $t('Name') }}</label>
<InputText <InputText
@ -217,34 +222,74 @@
autofocus autofocus
required="true" required="true"
/> />
<small v-if="submitted && !item.title" class="p-error">$t('Title is required')</small> <small
v-if="submitted && !item.title"
class="p-error"
>
$t('Title is required')
</small>
</div> </div>
<template #footer> <template #footer>
<Button class="p-button-text" icon="pi pi-times" label="Cancel" @click="hideDialog"/> <Button
<Button class="p-button-text" icon="pi pi-check" label="Save" @click="saveItem"/> class="p-button-text"
icon="pi pi-times"
label="Cancel"
@click="hideDialog"
/>
<Button
class="p-button-text"
icon="pi pi-check"
label="Save"
@click="saveItem"
/>
</template> </template>
</Dialog> </Dialog>
<Dialog v-model:visible="deleteItemDialog" :modal="true" :style="{width: '450px'}" header="Confirm"> <Dialog
v-model:visible="deleteItemDialog"
:modal="true"
:style="{width: '450px'}"
header="Confirm"
>
<div class="confirmation-content"> <div class="confirmation-content">
<i class="pi pi-exclamation-triangle p-mr-3" style="font-size: 2rem"/> <i class="pi pi-exclamation-triangle p-mr-3" style="font-size: 2rem" />
<span v-if="item">Are you sure you want to delete <b>{{ item.title }}</b>?</span> <span v-if="item">Are you sure you want to delete <b>{{ item.title }}</b>?</span>
</div> </div>
<template #footer> <template #footer>
<Button class="p-button-text" icon="pi pi-times" label="No" @click="deleteItemDialog = false"/> <Button
<Button class="p-button-text" icon="pi pi-check" label="Yes" @click="deleteItemButton(item)"/> class="p-button-text"
icon="pi pi-times"
label="No"
@click="deleteItemDialog = false"
/>
<Button
class="p-button-text"
icon="pi pi-check"
label="Yes"
@click="deleteItemButton(item)"
/>
</template> </template>
</Dialog> </Dialog>
<Dialog v-model:visible="deleteMultipleDialog" :modal="true" :style="{width: '450px'}" header="Confirm"> <Dialog v-model:visible="deleteMultipleDialog" :modal="true" :style="{width: '450px'}" header="Confirm">
<div class="confirmation-content"> <div class="confirmation-content">
<i class="pi pi-exclamation-triangle p-mr-3" style="font-size: 2rem"/> <i class="pi pi-exclamation-triangle p-mr-3" style="font-size: 2rem" />
<span v-if="item">Are you sure you want to delete the selected items?</span> <span v-if="item">Are you sure you want to delete the selected items?</span>
</div> </div>
<template #footer> <template #footer>
<Button class="p-button-text" icon="pi pi-times" label="No" @click="deleteMultipleDialog = false"/> <Button
<Button class="p-button-text" icon="pi pi-check" label="Yes" @click="deleteMultipleItems"/> class="p-button-text"
icon="pi pi-times"
label="No"
@click="deleteMultipleDialog = false"
/>
<Button
class="p-button-text"
icon="pi pi-check"
label="Yes"
@click="deleteMultipleItems"
/>
</template> </template>
</Dialog> </Dialog>
</template> </template>

@ -15,7 +15,7 @@
tile tile
@click="reply" @click="reply"
> >
<v-icon icon="mdi-reply"/> <v-icon icon="mdi-reply" />
</v-btn> </v-btn>
<v-btn <v-btn
@ -24,7 +24,7 @@
tile tile
@click="replyAll" @click="replyAll"
> >
<v-icon icon="mdi-reply-all"/> <v-icon icon="mdi-reply-all" />
</v-btn> </v-btn>
<v-btn <v-btn
@ -32,7 +32,7 @@
tile tile
@click="createEvent" @click="createEvent"
> >
<v-icon icon="mdi-calendar-plus"/> <v-icon icon="mdi-calendar-plus" />
</v-btn> </v-btn>
</template> </template>
</Toolbar> </Toolbar>
@ -67,7 +67,7 @@
class="text-subtitle2" class="text-subtitle2"
> >
<q-avatar size="32px"> <q-avatar size="32px">
<img :src="item.sender['illustrationUrl'] + '?w=80&h=80&fit=crop'"/> <img :src="item.sender['illustrationUrl'] + '?w=80&h=80&fit=crop'" />
</q-avatar> </q-avatar>
{{ item.sender['username'] }} {{ item.sender['username'] }}
{{ $luxonDateTime.fromISO(item['sendDate']).toRelative() }} {{ $luxonDateTime.fromISO(item['sendDate']).toRelative() }}
@ -101,7 +101,7 @@
<q-card-section <q-card-section
v-if="item.attachments && item.attachments.length > 0" v-if="item.attachments && item.attachments.length > 0"
> >
<q-separator/> <q-separator />
<p class="my-3"> <p class="my-3">
{{ item.attachments.length }} {{ $t('Attachments') }} {{ item.attachments.length }} {{ $t('Attachments') }}
@ -133,7 +133,7 @@
</div> </div>
</q-card-section> </q-card-section>
</q-card> </q-card>
<Loading :visible="isLoading"/> <Loading :visible="isLoading" />
</div> </div>
</template> </template>

Loading…
Cancel
Save