Changeset View
Changeset View
Standalone View
Standalone View
src/resources/vue/Admin/User.vue
Show First 20 Lines • Show All 117 Lines • ▼ Show 20 Lines | <div class="container"> | ||||
</a> | </a> | ||||
</li> | </li> | ||||
<li class="nav-item"> | <li class="nav-item"> | ||||
<a class="nav-link" id="tab-resources" href="#user-resources" role="tab" aria-controls="user-resources" aria-selected="false"> | <a class="nav-link" id="tab-resources" href="#user-resources" role="tab" aria-controls="user-resources" aria-selected="false"> | ||||
{{ $t('user.resources') }} ({{ resources.length }}) | {{ $t('user.resources') }} ({{ resources.length }}) | ||||
</a> | </a> | ||||
</li> | </li> | ||||
<li class="nav-item"> | <li class="nav-item"> | ||||
<a class="nav-link" id="tab-shared-folders" href="#user-shared-folders" role="tab" aria-controls="user-shared-folders" aria-selected="false"> | |||||
{{ $t('dashboard.shared-folders') }} ({{ folders.length }}) | |||||
</a> | |||||
</li> | |||||
<li class="nav-item"> | |||||
<a class="nav-link" id="tab-settings" href="#user-settings" role="tab" aria-controls="user-settings" aria-selected="false"> | <a class="nav-link" id="tab-settings" href="#user-settings" role="tab" aria-controls="user-settings" aria-selected="false"> | ||||
Settings | {{ $t('form.settings') }} | ||||
</a> | </a> | ||||
</li> | </li> | ||||
</ul> | </ul> | ||||
<div class="tab-content"> | <div class="tab-content"> | ||||
<div class="tab-pane show active" id="user-finances" role="tabpanel" aria-labelledby="tab-finances"> | <div class="tab-pane show active" id="user-finances" role="tabpanel" aria-labelledby="tab-finances"> | ||||
<div class="card-body"> | <div class="card-body"> | ||||
<h2 class="card-title"> | <h2 class="card-title"> | ||||
{{ $t('wallet.title') }} | {{ $t('wallet.title') }} | ||||
▲ Show 20 Lines • Show All 208 Lines • ▼ Show 20 Lines | <div class="container"> | ||||
<tr> | <tr> | ||||
<td colspan="2">{{ $t('resource.list-empty') }}</td> | <td colspan="2">{{ $t('resource.list-empty') }}</td> | ||||
</tr> | </tr> | ||||
</tfoot> | </tfoot> | ||||
</table> | </table> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="tab-pane" id="user-shared-folders" role="tabpanel" aria-labelledby="tab-shared-folders"> | |||||
<div class="card-body"> | |||||
<div class="card-text"> | |||||
<table class="table table-sm table-hover mb-0"> | |||||
<thead> | |||||
<tr> | |||||
<th scope="col">{{ $t('form.name') }}</th> | |||||
<th scope="col">{{ $t('form.type') }}</th> | |||||
<th scope="col">{{ $t('form.email') }}</th> | |||||
</tr> | |||||
</thead> | |||||
<tbody> | |||||
<tr v-for="folder in folders" :key="folder.id" @click="$root.clickRecord"> | |||||
<td> | |||||
<svg-icon icon="folder-open" :class="$root.folderStatusClass(folder)" :title="$root.folderStatusText(folder)"></svg-icon> | |||||
<router-link :to="{ path: '/shared-folder/' + folder.id }">{{ folder.name }}</router-link> | |||||
</td> | |||||
<td>{{ $t('shf.type-' + folder.type) }}</td> | |||||
<td><router-link :to="{ path: '/shared-folder/' + folder.id }">{{ folder.email }}</router-link></td> | |||||
</tr> | |||||
</tbody> | |||||
<tfoot class="table-fake-body"> | |||||
<tr> | |||||
<td colspan="3">{{ $t('shf.list-empty') }}</td> | |||||
</tr> | |||||
</tfoot> | |||||
</table> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="tab-pane" id="user-settings" role="tabpanel" aria-labelledby="tab-settings"> | <div class="tab-pane" id="user-settings" role="tabpanel" aria-labelledby="tab-settings"> | ||||
<div class="card-body"> | <div class="card-body"> | ||||
<div class="card-text"> | <div class="card-text"> | ||||
<form class="read-only short"> | <form class="read-only short"> | ||||
<div class="row plaintext"> | <div class="row plaintext"> | ||||
<label for="greylist_enabled" class="col-sm-4 col-form-label">{{ $t('user.greylisting') }}</label> | <label for="greylist_enabled" class="col-sm-4 col-form-label">{{ $t('user.greylisting') }}</label> | ||||
<div class="col-sm-8"> | <div class="col-sm-8"> | ||||
<span class="form-control-plaintext" id="greylist_enabled"> | <span class="form-control-plaintext" id="greylist_enabled"> | ||||
▲ Show 20 Lines • Show All 127 Lines • ▼ Show 20 Lines | export default { | ||||
return { | return { | ||||
oneoff_amount: '', | oneoff_amount: '', | ||||
oneoff_description: '', | oneoff_description: '', | ||||
oneoff_negative: false, | oneoff_negative: false, | ||||
discount: 0, | discount: 0, | ||||
discount_description: '', | discount_description: '', | ||||
discounts: [], | discounts: [], | ||||
external_email: '', | external_email: '', | ||||
folders: [], | |||||
has2FA: false, | has2FA: false, | ||||
hasBeta: false, | hasBeta: false, | ||||
wallet: {}, | wallet: {}, | ||||
walletReload: false, | walletReload: false, | ||||
distlists: [], | distlists: [], | ||||
domains: [], | domains: [], | ||||
resources: [], | resources: [], | ||||
skus: [], | skus: [], | ||||
▲ Show 20 Lines • Show All 96 Lines • ▼ Show 20 Lines | export default { | ||||
this.distlists = response.data.list | this.distlists = response.data.list | ||||
}) | }) | ||||
// Fetch resources lists | // Fetch resources lists | ||||
axios.get('/api/v4/resources?owner=' + user_id) | axios.get('/api/v4/resources?owner=' + user_id) | ||||
.then(response => { | .then(response => { | ||||
this.resources = response.data.list | this.resources = response.data.list | ||||
}) | }) | ||||
// Fetch shared folders lists | |||||
axios.get('/api/v4/shared-folders?owner=' + user_id) | |||||
.then(response => { | |||||
this.folders = response.data.list | |||||
}) | |||||
}) | }) | ||||
.catch(this.$root.errorHandler) | .catch(this.$root.errorHandler) | ||||
}, | }, | ||||
mounted() { | mounted() { | ||||
$(this.$el).find('ul.nav-tabs a').on('click', this.$root.tab) | $(this.$el).find('ul.nav-tabs a').on('click', this.$root.tab) | ||||
}, | }, | ||||
methods: { | methods: { | ||||
addBetaSku() { | addBetaSku() { | ||||
▲ Show 20 Lines • Show All 186 Lines • Show Last 20 Lines |