correction about Phoenix upgrade - #1814
This commit is contained in:
@@ -11,7 +11,7 @@ defmodule Mobilizon.Service.Formatter do
|
||||
alias Mobilizon.Actors.Actor
|
||||
alias Mobilizon.Federation.ActivityPub.Actor, as: ActivityPubActor
|
||||
alias Mobilizon.Service.Formatter.HTML
|
||||
alias Phoenix.HTML.Tag
|
||||
alias PhoenixHTMLHelpers.Tag
|
||||
|
||||
alias Mobilizon.Web.Endpoint
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
defimpl Mobilizon.Service.Metadata, for: Mobilizon.Actors.Actor do
|
||||
alias Phoenix.HTML
|
||||
alias Phoenix.HTML.Tag
|
||||
alias PhoenixHTMLHelpers.Tag
|
||||
alias Mobilizon.Actors.Actor
|
||||
alias Mobilizon.Web.JsonLD.ObjectView
|
||||
use Mobilizon.Web, :verified_routes
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
defimpl Mobilizon.Service.Metadata, for: Mobilizon.Discussions.Comment do
|
||||
alias Phoenix.HTML.Tag
|
||||
alias PhoenixHTMLHelpers.Tag
|
||||
alias Mobilizon.Actors.Actor
|
||||
alias Mobilizon.Discussions.Comment
|
||||
import Mobilizon.Service.Metadata.Utils, only: [escape_text: 1]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
defimpl Mobilizon.Service.Metadata, for: Mobilizon.Events.Event do
|
||||
alias Phoenix.HTML
|
||||
alias Phoenix.HTML.Tag
|
||||
alias PhoenixHTMLHelpers.Tag
|
||||
alias Mobilizon.Actors.Actor
|
||||
alias Mobilizon.Addresses.Address
|
||||
alias Mobilizon.Events.{Event, EventOptions}
|
||||
|
||||
@@ -4,7 +4,7 @@ defmodule Mobilizon.Service.Metadata.Instance do
|
||||
"""
|
||||
|
||||
alias Phoenix.HTML
|
||||
alias Phoenix.HTML.Tag
|
||||
alias PhoenixHTMLHelpers.Tag
|
||||
|
||||
alias Mobilizon.Config
|
||||
alias Mobilizon.Service.Metadata.Utils
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
defimpl Mobilizon.Service.Metadata, for: Mobilizon.Posts.Post do
|
||||
alias Phoenix.HTML
|
||||
alias Phoenix.HTML.Tag
|
||||
alias PhoenixHTMLHelpers.Tag
|
||||
alias Mobilizon.Actors.Actor
|
||||
alias Mobilizon.Medias.{File, Media}
|
||||
alias Mobilizon.Posts.Post
|
||||
|
||||
@@ -45,7 +45,8 @@
|
||||
>
|
||||
<p style="margin: 0;">
|
||||
{gettext(
|
||||
"Hi there! You just registered to join this event: « <b>%{title}</b> ». Please confirm the e-mail address you provided:",
|
||||
"Hi there! You just registered to join this event: « <b>%{title}</b>
|
||||
». Please confirm the e-mail address you provided:",
|
||||
title: escape_html(@participant.event.title)
|
||||
)
|
||||
|> raw}
|
||||
|
||||
@@ -187,8 +187,7 @@
|
||||
{gettext("<b>%{instance}</b> is powered by Mobilizon.",
|
||||
instance: @instance_name
|
||||
)
|
||||
|> raw}
|
||||
<br />
|
||||
|> raw} <br />
|
||||
<a href="https://mobilizon.org">
|
||||
{gettext("Learn more about Mobilizon here!")}
|
||||
</a>
|
||||
|
||||
@@ -48,7 +48,8 @@
|
||||
>
|
||||
<p style="margin: 0;">
|
||||
{gettext(
|
||||
"Your instance's moderation team has decided to suspend <b>%{group_name}</b> (%{group_address}). You are no longer a member of this group.",
|
||||
"Your instance's moderation team has decided to suspend <b>%{group_name}</b>
|
||||
(%{group_address}). You are no longer a member of this group.",
|
||||
group_name: escape_html(display_name(@group)),
|
||||
group_address: preferred_username_and_domain(@group)
|
||||
)
|
||||
|
||||
@@ -47,8 +47,7 @@
|
||||
{gettext("<b>%{name}</b> just requested to follow your instance.",
|
||||
name: escape_html(display_name_and_username(@follower))
|
||||
)
|
||||
|> raw}
|
||||
<br />
|
||||
|> raw} <br />
|
||||
<%= if @follower.type == :Application do %>
|
||||
{gettext("If you accept, this instance will receive all of your public events.")}
|
||||
<% else %>
|
||||
|
||||
@@ -45,7 +45,8 @@
|
||||
>
|
||||
<p style="margin: 0;">
|
||||
{gettext(
|
||||
"You created an account on <b>%{host}</b> with this email address. You are one click away from activating it.",
|
||||
"You created an account on <b>%{host}</b>
|
||||
with this email address. You are one click away from activating it.",
|
||||
host: @instance_name
|
||||
)
|
||||
|> raw}
|
||||
|
||||
@@ -6,7 +6,7 @@ defmodule Mobilizon.Web.AuthView do
|
||||
use Mobilizon.Web, :view
|
||||
alias Mobilizon.Service.Metadata.Instance
|
||||
alias Mobilizon.Web.PageView
|
||||
alias Phoenix.HTML.Tag
|
||||
alias PhoenixHTMLHelpers.Tag
|
||||
|
||||
@spec render(String.t(), map()) :: String.t() | Plug.Conn.t()
|
||||
def render(
|
||||
|
||||
@@ -3,10 +3,6 @@ defmodule Mobilizon.Web.ErrorHelpers do
|
||||
Conveniences for translating and building error messages.
|
||||
"""
|
||||
|
||||
import Phoenix.HTML
|
||||
import Phoenix.HTML.Form
|
||||
use PhoenixHTMLHelpers
|
||||
|
||||
@doc """
|
||||
Translates an error message using gettext.
|
||||
"""
|
||||
|
||||
1
mix.exs
1
mix.exs
@@ -244,6 +244,7 @@ defmodule Mobilizon.Mixfile do
|
||||
{:doctor, "~> 0.21", only: :dev},
|
||||
{:haversine, "~> 0.1.0"},
|
||||
{:ecto_dev_logger, "~> 0.7"},
|
||||
{:castore, "~> 1.0"},
|
||||
{:credo_code_climate, "~> 0.1.0", only: [:dev, :test]}
|
||||
] ++ oauth_deps()
|
||||
end
|
||||
|
||||
20
package-lock.json
generated
20
package-lock.json
generated
@@ -1932,9 +1932,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@csstools/css-syntax-patches-for-csstree": {
|
||||
"version": "1.0.16",
|
||||
"resolved": "https://registry.npmjs.org/@csstools/css-syntax-patches-for-csstree/-/css-syntax-patches-for-csstree-1.0.16.tgz",
|
||||
"integrity": "sha512-2SpS4/UaWQaGpBINyG5ZuCHnUDeVByOhvbkARwfmnfxDvTaj80yOI1cD8Tw93ICV5Fx4fnyDKWQZI1CDtcWyUg==",
|
||||
"version": "1.0.17",
|
||||
"resolved": "https://registry.npmjs.org/@csstools/css-syntax-patches-for-csstree/-/css-syntax-patches-for-csstree-1.0.17.tgz",
|
||||
"integrity": "sha512-LCC++2h8pLUSPY+EsZmrrJ1EOUu+5iClpEiDhhdw3zRJpPbABML/N5lmRuBHjxtKm9VnRcsUzioyD0sekFMF0A==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -7564,16 +7564,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-vue": {
|
||||
"version": "10.5.1",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-10.5.1.tgz",
|
||||
"integrity": "sha512-SbR9ZBUFKgvWAbq3RrdCtWaW0IKm6wwUiApxf3BVTNfqUIo4IQQmreMg2iHFJJ6C/0wss3LXURBJ1OwS/MhFcQ==",
|
||||
"version": "10.6.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-10.6.0.tgz",
|
||||
"integrity": "sha512-TsoFluWxOpsJlE/l2jJygLQLWBPJ3Qdkesv7tBIunICbTcG0dS1/NBw/Ol4tJw5kHWlAVds4lUmC29/vlPUcEQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.4.0",
|
||||
"natural-compare": "^1.4.0",
|
||||
"nth-check": "^2.1.1",
|
||||
"postcss-selector-parser": "^6.0.15",
|
||||
"postcss-selector-parser": "^7.1.0",
|
||||
"semver": "^7.6.3",
|
||||
"xml-name-validator": "^4.0.0"
|
||||
},
|
||||
@@ -7596,9 +7596,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-vue/node_modules/postcss-selector-parser": {
|
||||
"version": "6.1.2",
|
||||
"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz",
|
||||
"integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==",
|
||||
"version": "7.1.0",
|
||||
"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz",
|
||||
"integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
||||
@@ -3,7 +3,6 @@ defmodule Mobilizon.Federation.ActivityStream.Converter.UtilsTest do
|
||||
Module to test converting from EventMetadata to AS
|
||||
"""
|
||||
use Mobilizon.DataCase
|
||||
import Mobilizon.Factory
|
||||
alias Mobilizon.Federation.ActivityStream.Converter.Utils
|
||||
|
||||
describe "get_medias/1" do
|
||||
|
||||
@@ -1418,7 +1418,7 @@ defmodule Mobilizon.GraphQL.Resolvers.ParticipantTest do
|
||||
}
|
||||
"""
|
||||
|
||||
test "No participate if not logging", %{conn: conn, actor: actor, event: event} do
|
||||
test "No participate if not logging", %{conn: conn, event: event} do
|
||||
res =
|
||||
conn
|
||||
|> AbsintheHelpers.graphql_query(
|
||||
@@ -1577,7 +1577,6 @@ defmodule Mobilizon.GraphQL.Resolvers.ParticipantTest do
|
||||
test "participates for group event where user is member (not allowed)", %{
|
||||
conn: conn,
|
||||
actor: actor,
|
||||
user: user,
|
||||
event: event
|
||||
} do
|
||||
user_group = insert(:user)
|
||||
@@ -1613,7 +1612,6 @@ defmodule Mobilizon.GraphQL.Resolvers.ParticipantTest do
|
||||
test "participates for group event where user is member (but allowed)", %{
|
||||
conn: conn,
|
||||
actor: actor,
|
||||
user: user,
|
||||
event: event
|
||||
} do
|
||||
user_group = insert(:user)
|
||||
|
||||
@@ -418,6 +418,7 @@ defmodule Mobilizon.GraphQL.Resolvers.UserTest do
|
||||
password: "long password",
|
||||
moderation: ""
|
||||
}
|
||||
@moderation_empty ""
|
||||
|
||||
test "test create_user/3 creates an user",
|
||||
%{conn: conn} do
|
||||
@@ -1337,7 +1338,6 @@ defmodule Mobilizon.GraphQL.Resolvers.UserTest do
|
||||
|
||||
describe "Resolver: Change password for an user" do
|
||||
@email "toto@tata.tld"
|
||||
@moderation_fill "moderation text"
|
||||
@moderation_empty ""
|
||||
@old_password "p4ssw0rd"
|
||||
@new_password "upd4t3d"
|
||||
|
||||
@@ -10,7 +10,7 @@ defmodule Mobilizon.ActorsTest do
|
||||
alias Mobilizon.Discussions.Comment
|
||||
alias Mobilizon.Events.Event
|
||||
alias Mobilizon.Federation.ActivityPub.Actor, as: ActivityPubActor
|
||||
alias Mobilizon.Medias.File, as: FileModel
|
||||
# alias Mobilizon.Medias.File, as: FileModel
|
||||
alias Mobilizon.Service.HTTP.ActivityPub.Mock
|
||||
alias Mobilizon.Service.Workers
|
||||
alias Mobilizon.Storage.Page
|
||||
|
||||
@@ -41,7 +41,7 @@ defmodule Mobilizon.Service.Metadata.UtilsTest do
|
||||
|
||||
describe "stringify_tags/1" do
|
||||
test "converts tags to string" do
|
||||
alias Phoenix.HTML.Tag
|
||||
alias PhoenixHTMLHelpers.Tag
|
||||
|
||||
tag_1 = Tag.tag(:meta, property: "og:url", content: "one")
|
||||
tag_2 = "<meta content=\"two\" property=\"og:url\">"
|
||||
|
||||
Reference in New Issue
Block a user