More compact view

This commit is contained in:
Anton Vakhrushev 2020-06-24 14:15:14 +03:00
parent 1b8ba833a5
commit 138dc1e87f
2 changed files with 22 additions and 23 deletions

View File

@ -95,19 +95,7 @@
</td>
</tr>
<tr class="normal-line">
<td class="right" colspan="7">
<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="collectionPointPath(villageState.village)"
>Войска</a
>
</td>
</tr>
<status-line :village-state="villageState" />
<status-line class="second-line" :village-state="villageState" />
</template>
</tbody>
</table>
@ -117,7 +105,7 @@
<script>
import ResourceBalance from './ResourceBalance';
import VillageResource from './VillageResource';
import { COLLECTION_POINT_ID, HORSE_STABLE_ID, MARKET_ID, QUARTERS_ID } from '../Core/Buildings';
import { MARKET_ID } from '../Core/Buildings';
import { path } from '../Helpers/Path';
import { Actions } from './Store';
import { translateProductionQueue } from '../Core/ProductionQueue';
@ -170,15 +158,6 @@ export default {
y: toVillage.crd.y,
});
},
collectionPointPath(village) {
return path('/build.php', { newdid: village.id, gid: COLLECTION_POINT_ID, tt: 1 });
},
quartersPath(village) {
return path('/build.php', { newdid: village.id, gid: QUARTERS_ID });
},
horseStablePath(village) {
return path('/build.php', { newdid: village.id, gid: HORSE_STABLE_ID });
},
renderTimeInSeconds(value) {
return secondsToTime(value);
},
@ -216,6 +195,10 @@ export default {
padding: 4px;
}
.second-line td {
padding: 0 4px 4px;
}
.filling-line td {
padding: 0;
border: 1px solid #ddd;

View File

@ -4,12 +4,18 @@
режим
<a href="#" v-text="settings.receiveResourcesMode" v-on:click.prevent="toggleMode()"></a>,
<span v-text="status"></span>
|
<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="collectionPointPath(villageState.village)">Войска</a>
</td>
</tr>
</template>
<script>
import { Actions } from './Store';
import { path } from '../Helpers/Path';
import { COLLECTION_POINT_ID, HORSE_STABLE_ID, QUARTERS_ID } from '../Core/Buildings';
export default {
props: {
@ -33,6 +39,15 @@ export default {
const villageId = this.villageState.id;
this.$store.dispatch(Actions.ToggleVillageReceiveMode, { villageId });
},
collectionPointPath(village) {
return path('/build.php', { newdid: village.id, gid: COLLECTION_POINT_ID, tt: 1 });
},
quartersPath(village) {
return path('/build.php', { newdid: village.id, gid: QUARTERS_ID });
},
horseStablePath(village) {
return path('/build.php', { newdid: village.id, gid: HORSE_STABLE_ID });
},
},
};
</script>
@ -47,5 +62,6 @@ export default {
}
.status-line {
@extend %right;
@extend %small-cell;
}
</style>