Remove market line

Now those actions are unnecessary
This commit is contained in:
Anton Vakhrushev 2020-07-01 11:57:47 +03:00
parent a163d36b93
commit 48bfed5f01
2 changed files with 5 additions and 26 deletions

View File

@ -83,21 +83,6 @@
v-if="!villageState.incomingResources.empty()" v-if="!villageState.incomingResources.empty()"
/> />
<tr class="normal-line">
<td class="right" colspan="7">
<a
v-for="s in shared.villageStates"
v-if="s.id !== villageState.id"
class="village-quick-link"
:href="marketPath(villageState.village, s.village)"
:title="
'Отправить ресурсы из ' + villageState.village.name + ' в ' + s.village.name
"
>$->{{ s.village.name }}</a
>
</td>
</tr>
<status-line class="second-line" :village-state="villageState" /> <status-line class="second-line" :village-state="villageState" />
<tr class="task-list-line" v-if="isTaskListVisible(villageState.id)"> <tr class="task-list-line" v-if="isTaskListVisible(villageState.id)">
@ -114,7 +99,6 @@
<script> <script>
import ResourceBalance from './ResourceBalance'; import ResourceBalance from './ResourceBalance';
import VillageResource from './VillageResource'; import VillageResource from './VillageResource';
import { MARKET_ID } from '../Core/Buildings';
import { path } from '../Helpers/Path'; import { path } from '../Helpers/Path';
import { Actions } from './Store'; import { Actions } from './Store';
import { translateProductionQueue } from '../Core/ProductionQueue'; import { translateProductionQueue } from '../Core/ProductionQueue';
@ -160,15 +144,6 @@ export default {
const toFull = villageState.storage.timeToFull; const toFull = villageState.storage.timeToFull;
return this.renderGatheringTime(toFull.never ? toZero : toFull); return this.renderGatheringTime(toFull.never ? toZero : toFull);
}, },
marketPath(fromVillage, toVillage) {
return path('/build.php', {
newdid: fromVillage.id,
gid: MARKET_ID,
t: 5,
x: toVillage.crd.x,
y: toVillage.crd.y,
});
},
renderTimeInSeconds(value) { renderTimeInSeconds(value) {
return secondsToTime(value); return secondsToTime(value);
}, },

View File

@ -5,6 +5,7 @@
<a href="#" v-text="settings.receiveResourcesMode" v-on:click.prevent="toggleMode()"></a>, <a href="#" v-text="settings.receiveResourcesMode" v-on:click.prevent="toggleMode()"></a>,
<span v-text="status"></span> <span v-text="status"></span>
| |
<a class="village-quick-link" :href="marketPath(villageState.village)">Рынок</a>
<a class="village-quick-link" :href="quartersPath(villageState.village)">Казармы</a> <a class="village-quick-link" :href="quartersPath(villageState.village)">Казармы</a>
<a class="village-quick-link" :href="horseStablePath(villageState.village)">Конюшни</a> <a class="village-quick-link" :href="horseStablePath(villageState.village)">Конюшни</a>
<a class="village-quick-link" :href="collectionPointPath(villageState.village)">Войска</a> <a class="village-quick-link" :href="collectionPointPath(villageState.village)">Войска</a>
@ -15,7 +16,7 @@
<script> <script>
import { Actions } from './Store'; import { Actions } from './Store';
import { path } from '../Helpers/Path'; import { path } from '../Helpers/Path';
import { COLLECTION_POINT_ID, HORSE_STABLE_ID, QUARTERS_ID } from '../Core/Buildings'; import { COLLECTION_POINT_ID, HORSE_STABLE_ID, MARKET_ID, QUARTERS_ID } from '../Core/Buildings';
export default { export default {
props: { props: {
@ -39,6 +40,9 @@ export default {
const villageId = this.villageState.id; const villageId = this.villageState.id;
this.$store.dispatch(Actions.ToggleVillageReceiveMode, { villageId }); this.$store.dispatch(Actions.ToggleVillageReceiveMode, { villageId });
}, },
marketPath(village) {
return path('/build.php', { newdid: village.id, gid: MARKET_ID, t: 5 });
},
collectionPointPath(village) { collectionPointPath(village) {
return path('/build.php', { newdid: village.id, gid: COLLECTION_POINT_ID, tt: 1 }); return path('/build.php', { newdid: village.id, gid: COLLECTION_POINT_ID, tt: 1 });
}, },