forked from potsda.mn/mobilizon
Hide address blocks when address has no real data
Closes #1085 Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
dc75a9beb3
commit
e36f8f53ab
|
@ -39,7 +39,7 @@
|
||||||
<div>
|
<div>
|
||||||
<inline-address
|
<inline-address
|
||||||
class="has-text-grey-dark"
|
class="has-text-grey-dark"
|
||||||
v-if="group.physicalAddress"
|
v-if="group.physicalAddress && addressFullName(group.physicalAddress)"
|
||||||
:physicalAddress="group.physicalAddress"
|
:physicalAddress="group.physicalAddress"
|
||||||
/>
|
/>
|
||||||
<p class="has-text-grey-dark">
|
<p class="has-text-grey-dark">
|
||||||
|
@ -65,6 +65,7 @@ import { displayName, IGroup, usernameWithDomain } from "@/types/actor";
|
||||||
import LazyImageWrapper from "@/components/Image/LazyImageWrapper.vue";
|
import LazyImageWrapper from "@/components/Image/LazyImageWrapper.vue";
|
||||||
import RouteName from "../../router/name";
|
import RouteName from "../../router/name";
|
||||||
import InlineAddress from "@/components/Address/InlineAddress.vue";
|
import InlineAddress from "@/components/Address/InlineAddress.vue";
|
||||||
|
import { addressFullName } from "@/types/address.model";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
components: {
|
components: {
|
||||||
|
@ -80,6 +81,8 @@ export default class GroupCard extends Vue {
|
||||||
usernameWithDomain = usernameWithDomain;
|
usernameWithDomain = usernameWithDomain;
|
||||||
|
|
||||||
displayName = displayName;
|
displayName = displayName;
|
||||||
|
|
||||||
|
addressFullName = addressFullName;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
@ -558,9 +558,10 @@
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<div class="address-wrapper">
|
<div class="address-wrapper">
|
||||||
<span v-if="!physicalAddress">{{
|
<span
|
||||||
$t("No address defined")
|
v-if="!physicalAddress || !addressFullName(physicalAddress)"
|
||||||
}}</span>
|
>{{ $t("No address defined") }}</span
|
||||||
|
>
|
||||||
<div class="address" v-if="physicalAddress">
|
<div class="address" v-if="physicalAddress">
|
||||||
<div>
|
<div>
|
||||||
<address dir="auto">
|
<address dir="auto">
|
||||||
|
@ -739,7 +740,7 @@ import DiscussionListItem from "@/components/Discussion/DiscussionListItem.vue";
|
||||||
import MultiPostListItem from "@/components/Post/MultiPostListItem.vue";
|
import MultiPostListItem from "@/components/Post/MultiPostListItem.vue";
|
||||||
import ResourceItem from "@/components/Resource/ResourceItem.vue";
|
import ResourceItem from "@/components/Resource/ResourceItem.vue";
|
||||||
import FolderItem from "@/components/Resource/FolderItem.vue";
|
import FolderItem from "@/components/Resource/FolderItem.vue";
|
||||||
import { Address } from "@/types/address.model";
|
import { Address, addressFullName } from "@/types/address.model";
|
||||||
import Invitations from "@/components/Group/Invitations.vue";
|
import Invitations from "@/components/Group/Invitations.vue";
|
||||||
import addMinutes from "date-fns/addMinutes";
|
import addMinutes from "date-fns/addMinutes";
|
||||||
import { CONFIG } from "@/graphql/config";
|
import { CONFIG } from "@/graphql/config";
|
||||||
|
@ -820,6 +821,8 @@ export default class Group extends mixins(GroupMixin) {
|
||||||
|
|
||||||
displayName = displayName;
|
displayName = displayName;
|
||||||
|
|
||||||
|
addressFullName = addressFullName;
|
||||||
|
|
||||||
PostVisibility = PostVisibility;
|
PostVisibility = PostVisibility;
|
||||||
|
|
||||||
Openness = Openness;
|
Openness = Openness;
|
||||||
|
|
Loading…
Reference in a new issue