Replace Vuetify with Bulma

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

Remove vuetify and add Bulma

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2019-01-21 15:08:22 +01:00
parent 759a740625
commit 90fd0ff6b6
79 changed files with 3482 additions and 3369 deletions

View File

@@ -39,8 +39,8 @@ defmodule MobilizonWeb.Resolvers.Event do
@doc """
List participants for event (through an event request)
"""
def list_participants_for_event(%{uuid: uuid}, %{page: page, limit: limit}, _resolution) do
{:ok, Mobilizon.Events.list_participants_for_event(uuid, page, limit)}
def list_participants_for_event(%Event{uuid: uuid}, _args, _resolution) do
{:ok, Mobilizon.Events.list_participants_for_event(uuid, 1, 10)}
end
@doc """
@@ -81,14 +81,7 @@ defmodule MobilizonWeb.Resolvers.Event do
"""
def create_event(_parent, args, %{context: %{current_user: user}}) do
with {:ok, %Activity{data: %{"object" => %{"type" => "Event"} = object}}} <-
args
# Set default organizer_actor_id if none set
|> Map.update(
:organizer_actor_username,
Actors.get_actor_for_user(user).preferred_username,
& &1
)
|> MobilizonWeb.API.Events.create_event() do
MobilizonWeb.API.Events.create_event(args) do
{:ok,
%Event{
title: object["name"],

View File

@@ -3,6 +3,7 @@ defmodule MobilizonWeb.Resolvers.Person do
Handles the person-related GraphQL calls
"""
alias Mobilizon.Actors
alias Mobilizon.Actors.Actor
alias Mobilizon.Service.ActivityPub
@deprecated "Use find_person/3 or find_group/3 instead"
@@ -39,4 +40,28 @@ defmodule MobilizonWeb.Resolvers.Person do
def get_current_person(_parent, _args, _resolution) do
{:error, "You need to be logged-in to view current person"}
end
@doc """
Returns the list of identities for the logged-in user
"""
def identities(_parent, _args, %{context: %{current_user: user}}) do
{:ok, Actors.get_actors_for_user(user)}
end
def identities(_parent, _args, _resolution) do
{:error, "You need to be logged-in to view your list of identities"}
end
def create_person(_parent, %{preferred_username: preferred_username} = args, %{
context: %{current_user: user}
}) do
args = Map.put(args, :user_id, user.id)
with {:ok, %Actor{} = new_person} <- Actors.new_person(args) do
{:ok, new_person}
else
{:error, %Ecto.Changeset{} = e} ->
{:error, "Unable to create a profile with this username"}
end
end
end

View File

@@ -36,7 +36,7 @@ defmodule MobilizonWeb.Resolvers.User do
{:error, "User with email not found"}
{:error, :unauthorized} ->
{:error, "Impossible to authenticate"}
{:error, "Impossible to authenticate, either your email or password are invalid."}
end
end