mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-22 07:52:43 +00:00
#1546 Remove private section mbz-purple color
This commit is contained in:
parent
65ad3d855b
commit
906985478d
4 changed files with 3 additions and 20 deletions
|
@ -1,11 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<section
|
<section class="flex flex-col mb-3 border-2 border-yellow-1">
|
||||||
class="flex flex-col mb-3 border-2"
|
|
||||||
:class="{
|
|
||||||
'border-mbz-purple': privateSection,
|
|
||||||
'border-yellow-1': !privateSection,
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<div class="flex items-stretch py-3 px-1 bg-yellow-1 text-violet-title">
|
<div class="flex items-stretch py-3 px-1 bg-yellow-1 text-violet-title">
|
||||||
<div class="flex flex-1 gap-1">
|
<div class="flex flex-1 gap-1">
|
||||||
<o-icon :icon="icon" custom-size="36" />
|
<o-icon :icon="icon" custom-size="36" />
|
||||||
|
@ -31,10 +25,9 @@ withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
title: string;
|
title: string;
|
||||||
icon: string;
|
icon: string;
|
||||||
privateSection?: boolean;
|
|
||||||
route: { name: string; params: { preferredUsername: string } };
|
route: { name: string; params: { preferredUsername: string } };
|
||||||
}>(),
|
}>(),
|
||||||
{ privateSection: true }
|
{}
|
||||||
);
|
);
|
||||||
const { t } = useI18n({ useScope: "global" });
|
const { t } = useI18n({ useScope: "global" });
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
<group-section
|
<group-section
|
||||||
:title="t('Events')"
|
:title="t('Events')"
|
||||||
icon="calendar"
|
icon="calendar"
|
||||||
:privateSection="false"
|
|
||||||
:route="{
|
:route="{
|
||||||
name: RouteName.GROUP_EVENTS,
|
name: RouteName.GROUP_EVENTS,
|
||||||
params: { preferredUsername: usernameWithDomain(group) },
|
params: { preferredUsername: usernameWithDomain(group) },
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
<group-section
|
<group-section
|
||||||
:title="t('Announcements')"
|
:title="t('Announcements')"
|
||||||
icon="bullhorn"
|
icon="bullhorn"
|
||||||
:privateSection="false"
|
|
||||||
:route="{
|
:route="{
|
||||||
name: RouteName.POSTS,
|
name: RouteName.POSTS,
|
||||||
params: { preferredUsername: usernameWithDomain(group) },
|
params: { preferredUsername: usernameWithDomain(group) },
|
||||||
|
|
|
@ -29,7 +29,6 @@ const createSlotButtonText = "+ Create a post";
|
||||||
type Props = {
|
type Props = {
|
||||||
title?: string;
|
title?: string;
|
||||||
icon?: string;
|
icon?: string;
|
||||||
privateSection?: boolean;
|
|
||||||
route?: { name: string; params: { preferredUsername: string } };
|
route?: { name: string; params: { preferredUsername: string } };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -73,10 +72,6 @@ describe("GroupSection", () => {
|
||||||
|
|
||||||
expect(wrapper.find("a").attributes("href")).toBe(`/@${groupUsername}/p`);
|
expect(wrapper.find("a").attributes("href")).toBe(`/@${groupUsername}/p`);
|
||||||
|
|
||||||
// expect(wrapper.find(".group-section-title").classes("privateSection")).toBe(
|
|
||||||
// true
|
|
||||||
// );
|
|
||||||
|
|
||||||
expect(wrapper.find("section > div.flex-1").text()).toBe(defaultSlotText);
|
expect(wrapper.find("section > div.flex-1").text()).toBe(defaultSlotText);
|
||||||
expect(wrapper.find(".flex.justify-end.p-2 a").text()).toBe(
|
expect(wrapper.find(".flex.justify-end.p-2 a").text()).toBe(
|
||||||
createSlotButtonText
|
createSlotButtonText
|
||||||
|
@ -88,11 +83,8 @@ describe("GroupSection", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it("renders public group section", () => {
|
it("renders public group section", () => {
|
||||||
const wrapper = generateWrapper({ privateSection: false });
|
const wrapper = generateWrapper();
|
||||||
|
|
||||||
// expect(wrapper.find(".group-section-title").classes("privateSection")).toBe(
|
|
||||||
// false
|
|
||||||
// );
|
|
||||||
expect(wrapper.html()).toMatchSnapshot();
|
expect(wrapper.html()).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue