adds PercentInput for value modding in sell action
This commit is contained in:
@@ -7,7 +7,8 @@
|
|||||||
<th>Objets de {{ player }}</th>
|
<th>Objets de {{ player }}</th>
|
||||||
<th v-if="canGrab"></th>
|
<th v-if="canGrab"></th>
|
||||||
<th v-if="canSell">
|
<th v-if="canSell">
|
||||||
<button class="button is-fullwidth"
|
<div class="buttons is-right">
|
||||||
|
<button class="button"
|
||||||
:class="is_selling ? 'is-danger' : 'is-warning'"
|
:class="is_selling ? 'is-danger' : 'is-warning'"
|
||||||
@click="is_selling = !is_selling"
|
@click="is_selling = !is_selling"
|
||||||
>
|
>
|
||||||
@@ -17,6 +18,8 @@
|
|||||||
<p v-if="!is_selling">Vendre</p>
|
<p v-if="!is_selling">Vendre</p>
|
||||||
<p v-else>{{ totalSellValue ? totalSellValue : 'Annuler' }}</p>
|
<p v-else>{{ totalSellValue ? totalSellValue : 'Annuler' }}</p>
|
||||||
</button>
|
</button>
|
||||||
|
<PercentInput v-show="is_selling"></PercentInput>
|
||||||
|
</div>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -28,13 +31,18 @@
|
|||||||
<Request :item="item.id"></Request>
|
<Request :item="item.id"></Request>
|
||||||
</td>
|
</td>
|
||||||
<td v-if="canSell">
|
<td v-if="canSell">
|
||||||
<label class="checkbox" v-show="is_selling">
|
<div class="field is-grouped is-pulled-right" v-show="is_selling">
|
||||||
<input type="checkbox"
|
<div class="control">
|
||||||
id="`item-${idx}`"
|
<label class="label">
|
||||||
:value="item.id"
|
<input type="checkbox"
|
||||||
v-model="sell_selected">
|
id="`item-${idx}`"
|
||||||
{{item.sell_value}} GP
|
:value="item.id"
|
||||||
</label>
|
v-model="sell_selected">
|
||||||
|
{{item.sell_value}} GP
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<PercentInput></PercentInput>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</template>
|
</template>
|
||||||
@@ -46,6 +54,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { store } from '../App.vue'
|
import { store } from '../App.vue'
|
||||||
import Request from './Request.vue'
|
import Request from './Request.vue'
|
||||||
|
import PercentInput from './PercentInput.vue'
|
||||||
/*
|
/*
|
||||||
The chest displays the collection of items owned by a player
|
The chest displays the collection of items owned by a player
|
||||||
|
|
||||||
@@ -67,7 +76,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
Request
|
Request,
|
||||||
|
PercentInput,
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
|||||||
28
lootalot_front/src/components/PercentInput.vue
Normal file
28
lootalot_front/src/components/PercentInput.vue
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<template>
|
||||||
|
<div class="field has-addons">
|
||||||
|
<div v-show="is_opened" class="control has-icons-left">
|
||||||
|
<input class="input is-small" type="number" size="3" min=-50 max=50 step=5>
|
||||||
|
<span class="icon is-small is-left">
|
||||||
|
<i class="fas fa-percent"></i>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="control">
|
||||||
|
<button class="button is-small is-outlined"
|
||||||
|
@click="is_opened = !is_opened"
|
||||||
|
>
|
||||||
|
<small v-if="!is_opened">Mod.</small>
|
||||||
|
<span v-else class="icon"><i class="fas fa-times-circle"></i></span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
is_opened: false,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
Reference in New Issue
Block a user