Skip to content

Commit

Permalink
feed controls
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanminutillo committed Jan 11, 2025
1 parent a0869d6 commit fb87aed
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
3 changes: 0 additions & 3 deletions lib/components/activity/object/note/note_live.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,3 @@ div[data-id="object_body"][data-rendered="smart_input"] {
@apply !my-0 !text-sm !font-normal;
}

div[data-id="object_body"][data-main-object] {
@apply md:prose-base md:prose-p:my-0;
}
13 changes: 12 additions & 1 deletion lib/components/feeds/controls/feed_controls_live.sface
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
role="banner"
@click="open = ! open"
>
<div>{l("Filters")}</div>
<div>{l("More filters")}</div>
<label class="">
{!-- <input type="checkbox" /> --}
<span x-show="!open"><#Icon solid="ChevronDown" class="fill-current w-5 h-5 opacity-80" /></span>
Expand All @@ -153,6 +153,13 @@
</div>

<div x-transition x-cloak x-show="open" class="flex p-4 flex-col gap-2">
<span class="font-semibold mt-2 uppercase text-xs text-base-content/60 pb-2 border-b border-base-content/10 mb-2">{l("Federation")}</span>
<div class="flex items-center gap-2">
<button class="btn btn-outline btn-sm rounded-full">{l "Local"}</button>
<button class="btn btn-outline btn-sm rounded-full">{l "Federated"}</button>
<button class="btn btn-outline btn-sm rounded-full">{l "All"}</button>
</div>

<span class="font-semibold mt-4 uppercase text-xs text-base-content/60 pb-2 border-b border-base-content/10 mb-2">{l("By Circles")}</span>

<div class="flex items-center gap-2 mb-6 w-full flex-1 flex-wrap">
Expand Down Expand Up @@ -213,5 +220,9 @@
mode={:quick_tags}
/>
</form>
<div class="justify-end gap-3 flex items-center mt-4">
<button phx-target={@event_target} class="btn btn-sm ">{l "Save preset"}</button>
<button phx-click="reset_filter" phx-target={@event_target} class="btn btn-sm btn-outline">{l "Reset"}</button>
</div>
</div>
</div>
2 changes: 2 additions & 0 deletions lib/components/feeds/feed_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,7 @@ defmodule Bonfire.UI.Social.FeedLive do
)
end


def handle_event(
"set_filter",
%{"toggle" => field, "toggle_type" => type} = params,
Expand Down Expand Up @@ -562,6 +563,7 @@ defmodule Bonfire.UI.Social.FeedLive do
)
end


def handle_event(
"live_select_change",
%{"text" => text, "id" => live_select_id, "field" => field},
Expand Down

0 comments on commit fb87aed

Please sign in to comment.