You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
willaengine/resources/js/Home/views/Home.vue

59 lines
1.7 KiB

<template>
<v-container fluid>
<v-layout row wrap>
<a
:href="module.href"
:class="'flex ' + module.main_class"
v-for="( module ,key ) in getModules"
:key="key"
>
5 years ago
<wm-tile
:TileClass="module.title_class"
5 years ago
:TitleEn="$_name(`${module.slug}.name_en`)"
:TitleFa="$_name(`${module.slug}.name`)"
:GradientBegin="module.gradient_begin"
:GradientEnd="module.gradient_end"
:ImageURL="module.img_url"
:ImageHeight="module.img_height"
5 years ago
/>
5 years ago
</a>
</v-layout>
<router-link v-if="getAuthUser.is_owner == 'true' || hostname == originHostName" :to="{name: 'AddModule'}">
<v-btn large fab color="cyan" fixed bottom left dark style="left:5%">
<v-icon dark>WMi-plus</v-icon>
</v-btn>
5 years ago
</router-link>
</v-container>
</template>
<script>
import Tile from "@Global/components/Tiles/Tile";
5 years ago
import { mapGetters, mapActions } from "vuex";
import routes from '@Global/utils/common/routes';
export default {
data: () => ({
hostname : window.location.hostname,
originHostName : routes.originHostName()
}),
components: {
5 years ago
"wm-tile": Tile,
},
computed: {
5 years ago
...mapGetters("rolePermission", ["getModules"]),
5 years ago
...mapGetters("auth", ["getAuthUser"]),
},
5 years ago
methods: {
5 years ago
...mapActions("rolePermission", ["loadModules"]),
},
created() {
5 years ago
this.loadModules({ home_page: true });
}
};
</script>
<style scoped lang="scss">
</style>