Skip to content

Commit

Permalink
Merge pull request #586 from mahasultan/ishighrisk
Browse files Browse the repository at this point in the history
Implemented the isHighRisk Component to Activist
  • Loading branch information
andrewtavis authored Nov 29, 2023
2 parents ad6ad64 + 2ba4318 commit 60359b1
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 5 deletions.
22 changes: 18 additions & 4 deletions frontend/components/card/discussion/CardDiscussionInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,20 +83,33 @@
/>
</div>
</div>
<div class="w-full md:w-full">
<div v-if="discussionInput.highRisk" class="w-full md:w-full">
<textarea
id="message"
rows="4"
class="block p-2.5 w-full text-sm text-light-text bg-light-content rounded-lg border border-light-section-div dark:bg-dark-content dark:border-dark-section-div placeholder-light-special-text dark:placeholder-dark-special-text dark:text-dark-text focus-brand"
:placeholder="$t('components.card-discussion-input.leave-comment')"
class="block p-2.5 w-full text-sm rounded-lg border border-light-action-red dark:border-dark-action-red placeholder-light-special-text focus-brand font-bold placeholder:text-light-action-red dark:placeholder:text-dark-action-red dark:text-dark-text bg-light-content dark:bg-dark-content"
:placeholder="$t('components.card-discussion-input.leave-comment-highRisk')"
></textarea>
</div>
<div v-else class="w-full md:w-full">
<textarea
id="message"
rows="4"
class="block p-2.5 w-full text-sm text-light-text rounded-lg border border-light-section-div placeholder-light-special-text dark:placeholder-dark-special-text dark:text-dark-text dark:bg-dark-distinct focus-brand"
:placeholder="$t('components.card-discussion-input.leave-comment')"
></textarea>
</div>
<div class="flex items-center justify-between px-1">
<p class="inline-flex items-center">
{{ $t("components.card-discussion-input.markdown-support") }}
<Icon class="mx-1" name="bi:markdown" size="1.25em"></Icon>
</p>
<div class="flex space-x-1">
<div class="flex space-x-3 items-center">
<div v-if="discussionInput.highRisk" class="w-full md:w-full">
<div class="cursor-pointer rounded-lg p-1 text-light-text dark:text-light-action-red dark:bg-dark-action-red/20 dark:border-dark-action-red bg-light-action-red border border-light-text focus-brand w-16 h-10 flex justify-center items-center">
<Icon name="bi:exclamation-octagon" size="1.4em" />
</div>
</div>
<BtnLabeled
class="inline-flex justify-center items-center w-small"
:cta="true"
Expand Down Expand Up @@ -155,3 +168,4 @@ const listol = () => {
console.log("click on listol");
};
</script>

3 changes: 2 additions & 1 deletion frontend/i18n/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@
"components.card-danger-zone.username-label": "Your username",
"components.card-danger-zone.username-placeholder": "Enter your username",
"components.card-discussion-input.comment": "Comment",
"components.card-discussion-input.leave-comment": "Leave a comment",
"components.card-discussion-input.leave-comment": "Leave a public comment",
"components.card-discussion-input.leave-comment-highRisk": "You are a member of a high risk organization. Please be careful what you write.",
"components.card-discussion-input.markdown-support": "This editor supports Markdown",
"components.card-discussion-input.preview": "Preview",
"components.card-discussion-input.write": "Write",
Expand Down
1 change: 1 addition & 0 deletions frontend/pages/events/[id]/discussion.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,6 @@ const discussionInput: DiscussionInput = {
supporters: 123,
description: "I love to test!",
category: "Category",
highRisk: true,
};
</script>
2 changes: 2 additions & 0 deletions frontend/types/card-discussion-input.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ export interface DiscussionInput {
supporters: number;
description: string;
category: string;
highRisk: boolean;

}

0 comments on commit 60359b1

Please sign in to comment.