diff --git a/resources/assets/src/components/admin/Players.vue b/resources/assets/src/components/admin/Players.vue
index 7e81c87d..8272e2c7 100644
--- a/resources/assets/src/components/admin/Players.vue
+++ b/resources/assets/src/components/admin/Players.vue
@@ -14,13 +14,28 @@
styleClass="vgt-table striped"
>
-
+
+ {{ props.formattedRow[props.column.field] }}
+
+
+
+
+
{{ props.formattedRow[props.column.field] }}
+
+
+
+
+
+ {{ props.formattedRow[props.column.field] }}
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -131,6 +176,11 @@ export default {
ofLabel: this.$t('vendor.datatable.of')
}
},
+ textureChanges: {
+ originalIndex: -1,
+ model: 'steve',
+ tid: '',
+ }
};
},
beforeMount() {
@@ -162,23 +212,18 @@ export default {
this.serverParams.search = params.searchTerm;
this.fetchData();
},
- async changeTexture(player, model) {
- const { dismiss, value } = await swal({
- text: this.$t('admin.pidNotice'),
- input: 'number',
- inputValue: player[`tid_${model}`]
- });
- if (dismiss) {
- return;
- }
+ async changeTexture() {
+ const player = this.players[this.textureChanges.originalIndex];
+ const { model, tid } = this.textureChanges;
const { errno, msg } = await this.$http.post(
'/admin/players?action=texture',
- { pid: player.pid, model, tid: value }
+ { pid: player.pid, model, tid }
);
if (errno === 0) {
- player[`tid_${model}`] = value;
+ player[`tid_${model}`] = tid;
toastr.success(msg);
+ $('.modal').modal('hide');
} else {
toastr.warning(msg);
}
diff --git a/resources/assets/src/components/admin/Users.vue b/resources/assets/src/components/admin/Users.vue
index 2071f6a5..718b6772 100644
--- a/resources/assets/src/components/admin/Users.vue
+++ b/resources/assets/src/components/admin/Users.vue
@@ -14,7 +14,25 @@
styleClass="vgt-table striped"
>
-
+
+ {{ props.formattedRow[props.column.field] }}
+
+
+
+
+
+ {{ props.formattedRow[props.column.field] }}
+
+
+
+
+
+ {{ props.formattedRow[props.column.field] }}
+
+
+
+
+
+
+
+
@@ -37,12 +66,8 @@
aria-haspopup="true"
aria-expanded="false"
>{{ $t('general.more') }}
-