|
|
@ -1,11 +1,14 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<h1 class="text-2xl font-bold uppercase mb-10">casters management</h1>
|
|
|
|
<h1 class="text-2xl font-bold uppercase mb-10">casters management</h1>
|
|
|
|
<div class="grid grid-cols-2 gap-x-8">
|
|
|
|
<div class="grid grid-cols-2 gap-x-8">
|
|
|
|
|
|
|
|
<div class="overflow-x-auto">
|
|
|
|
<table class="table-auto">
|
|
|
|
<table class="table-auto">
|
|
|
|
<thead>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<tr>
|
|
|
|
<th class="border border-gray-400 text-left px-8 py-4">Name Tag</th>
|
|
|
|
<th class="border border-gray-400 text-left px-8 py-4">Name Tag</th>
|
|
|
|
<th class="border border-gray-400 text-left px-8 py-4">Real Name</th>
|
|
|
|
<th class="border border-gray-400 text-left px-8 py-4">Real Name</th>
|
|
|
|
|
|
|
|
<th class="border border-gray-400 text-left px-8 py-4">Real Name Arabic</th>
|
|
|
|
|
|
|
|
<th class="border border-gray-400 text-left px-8 py-4">Real Name Japanese</th>
|
|
|
|
<th class="border border-gray-400 text-left px-8 py-4">Twitter</th>
|
|
|
|
<th class="border border-gray-400 text-left px-8 py-4">Twitter</th>
|
|
|
|
<th class="border border-gray-400 text-left px-8 py-4">Image</th>
|
|
|
|
<th class="border border-gray-400 text-left px-8 py-4">Image</th>
|
|
|
|
</tr>
|
|
|
|
</tr>
|
|
|
@ -14,11 +17,14 @@
|
|
|
|
<tr class="item" :class="item === e._id ? 'active' : ''" @click="setItem(e)" v-for="e in store.state.casters" :key="e._id">
|
|
|
|
<tr class="item" :class="item === e._id ? 'active' : ''" @click="setItem(e)" v-for="e in store.state.casters" :key="e._id">
|
|
|
|
<td class="border border-gray-400 text-left px-8 py-4">{{ e.username }}</td>
|
|
|
|
<td class="border border-gray-400 text-left px-8 py-4">{{ e.username }}</td>
|
|
|
|
<td class="border border-gray-400 text-left px-8 py-4">{{ e.name }}</td>
|
|
|
|
<td class="border border-gray-400 text-left px-8 py-4">{{ e.name }}</td>
|
|
|
|
|
|
|
|
<td class="border border-gray-400 text-left px-8 py-4">{{ e.name_arabic ?? '' }}</td>
|
|
|
|
|
|
|
|
<td class="border border-gray-400 text-left px-8 py-4">{{ e.name_jpn ?? '' }}</td>
|
|
|
|
<td class="border border-gray-400 text-left px-8 py-4">{{ e.twitter }}</td>
|
|
|
|
<td class="border border-gray-400 text-left px-8 py-4">{{ e.twitter }}</td>
|
|
|
|
<td class="border border-gray-400 text-left px-8 py-4"><img :src="e.image" :alt="e.name"></td>
|
|
|
|
<td class="border border-gray-400 text-left px-8 py-4"><img :src="e.image" :alt="e.name"></td>
|
|
|
|
</tr>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<h2 class="text-lg font-bold">Create / Update</h2>
|
|
|
|
<h2 class="text-lg font-bold">Create / Update</h2>
|
|
|
|
<form name="form" @submit.prevent="form">
|
|
|
|
<form name="form" @submit.prevent="form">
|
|
|
@ -26,6 +32,10 @@
|
|
|
|
<input v-model="username" class="block my-4 border border-gray-500 rounded-lg w-64 h-8 px-4" type="text" required />
|
|
|
|
<input v-model="username" class="block my-4 border border-gray-500 rounded-lg w-64 h-8 px-4" type="text" required />
|
|
|
|
<p class="mt-4">Caster real name</p>
|
|
|
|
<p class="mt-4">Caster real name</p>
|
|
|
|
<input v-model="name" class="block my-4 border border-gray-500 rounded-lg w-64 h-8 px-4" type="text" required />
|
|
|
|
<input v-model="name" class="block my-4 border border-gray-500 rounded-lg w-64 h-8 px-4" type="text" required />
|
|
|
|
|
|
|
|
<p class="mt-4">Caster real name arabic (optional)</p>
|
|
|
|
|
|
|
|
<input v-model="name_arabic" class="block my-4 border border-gray-500 rounded-lg w-64 h-8 px-4" type="text" />
|
|
|
|
|
|
|
|
<p class="mt-4">Caster real name japanese (optional)</p>
|
|
|
|
|
|
|
|
<input v-model="name_jpn" class="block my-4 border border-gray-500 rounded-lg w-64 h-8 px-4" type="text" />
|
|
|
|
<p class="mt-4">Caster twitter</p>
|
|
|
|
<p class="mt-4">Caster twitter</p>
|
|
|
|
<input v-model="twitter" class="block my-4 border border-gray-500 rounded-lg w-64 h-8 px-4" type="text" required />
|
|
|
|
<input v-model="twitter" class="block my-4 border border-gray-500 rounded-lg w-64 h-8 px-4" type="text" required />
|
|
|
|
<p class="mt-4">Caster image URL</p>
|
|
|
|
<p class="mt-4">Caster image URL</p>
|
|
|
@ -48,6 +58,8 @@ export default {
|
|
|
|
const item = ref('')
|
|
|
|
const item = ref('')
|
|
|
|
const username = ref('')
|
|
|
|
const username = ref('')
|
|
|
|
const name = ref('')
|
|
|
|
const name = ref('')
|
|
|
|
|
|
|
|
const name_arabic = ref('')
|
|
|
|
|
|
|
|
const name_jpn = ref('')
|
|
|
|
const twitter = ref('')
|
|
|
|
const twitter = ref('')
|
|
|
|
const image = ref('')
|
|
|
|
const image = ref('')
|
|
|
|
|
|
|
|
|
|
|
@ -55,6 +67,8 @@ export default {
|
|
|
|
item.value = ''
|
|
|
|
item.value = ''
|
|
|
|
username.value = ''
|
|
|
|
username.value = ''
|
|
|
|
name.value = ''
|
|
|
|
name.value = ''
|
|
|
|
|
|
|
|
name_arabic.value = ''
|
|
|
|
|
|
|
|
name_jpn.value = ''
|
|
|
|
twitter.value = ''
|
|
|
|
twitter.value = ''
|
|
|
|
image.value = ''
|
|
|
|
image.value = ''
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -63,6 +77,8 @@ export default {
|
|
|
|
item.value = e._id
|
|
|
|
item.value = e._id
|
|
|
|
username.value = e.username
|
|
|
|
username.value = e.username
|
|
|
|
name.value = e.name
|
|
|
|
name.value = e.name
|
|
|
|
|
|
|
|
name_arabic.value = e.name_arabic
|
|
|
|
|
|
|
|
name_jpn.value = e.name_jpn
|
|
|
|
twitter.value = e.twitter
|
|
|
|
twitter.value = e.twitter
|
|
|
|
image.value = e.image
|
|
|
|
image.value = e.image
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -72,6 +88,8 @@ export default {
|
|
|
|
update('casters', item.value, {
|
|
|
|
update('casters', item.value, {
|
|
|
|
username: username.value,
|
|
|
|
username: username.value,
|
|
|
|
name: name.value,
|
|
|
|
name: name.value,
|
|
|
|
|
|
|
|
name_arabic: name_arabic.value,
|
|
|
|
|
|
|
|
name_jpn: name_jpn.value,
|
|
|
|
twitter: twitter.value,
|
|
|
|
twitter: twitter.value,
|
|
|
|
image: image.value,
|
|
|
|
image: image.value,
|
|
|
|
})
|
|
|
|
})
|
|
|
@ -79,6 +97,8 @@ export default {
|
|
|
|
create('casters', {
|
|
|
|
create('casters', {
|
|
|
|
username: username.value,
|
|
|
|
username: username.value,
|
|
|
|
name: name.value,
|
|
|
|
name: name.value,
|
|
|
|
|
|
|
|
name_arabic: name_arabic.value,
|
|
|
|
|
|
|
|
name_jpn: name_jpn.value,
|
|
|
|
twitter: twitter.value,
|
|
|
|
twitter: twitter.value,
|
|
|
|
image: image.value,
|
|
|
|
image: image.value,
|
|
|
|
})
|
|
|
|
})
|
|
|
@ -98,6 +118,8 @@ export default {
|
|
|
|
item,
|
|
|
|
item,
|
|
|
|
username,
|
|
|
|
username,
|
|
|
|
name,
|
|
|
|
name,
|
|
|
|
|
|
|
|
name_arabic,
|
|
|
|
|
|
|
|
name_jpn,
|
|
|
|
twitter,
|
|
|
|
twitter,
|
|
|
|
image,
|
|
|
|
image,
|
|
|
|
setItem,
|
|
|
|
setItem,
|
|
|
|