From 7c8dee9a9d0563de9252a8b7c0175097c070168a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 17 Jun 2019 17:15:27 +0200 Subject: [PATCH] Add ability to update/create/delete identities --- .env.sample | 4 +- js/src/App.vue | 4 +- js/src/components/Account/CreateIdentity.vue | 44 --- js/src/components/Account/Identities.vue | 54 +-- js/src/components/NavBar.vue | 53 ++- js/src/components/PictureUpload.vue | 69 +++- js/src/graphql/actor.ts | 37 +- js/src/main.ts | 6 +- js/src/plugins/notifier.ts | 32 ++ js/src/router/actor.ts | 24 +- js/src/router/index.ts | 3 +- js/src/types/actor/actor.model.ts | 3 +- js/src/types/actor/person.model.ts | 4 + js/src/views/Account/MyAccount.vue | 48 ++- js/src/views/Account/Register.vue | 1 - .../views/Account/children/EditIdentity.vue | 329 ++++++++++++++++++ js/tsconfig.json | 1 + js/tslint.json | 3 +- lib/mobilizon/actors/actors.ex | 35 +- lib/mobilizon_web/resolvers/person.ex | 73 +++- lib/mobilizon_web/schema/actors/person.ex | 28 ++ .../resolvers/person_resolver_test.exs | 229 ++++++++++++ 22 files changed, 927 insertions(+), 157 deletions(-) delete mode 100644 js/src/components/Account/CreateIdentity.vue create mode 100644 js/src/plugins/notifier.ts create mode 100644 js/src/views/Account/children/EditIdentity.vue diff --git a/.env.sample b/.env.sample index 825a3ef1c..91aab29c3 100644 --- a/.env.sample +++ b/.env.sample @@ -1,6 +1,7 @@ # Settings MOBILIZON_INSTANCE_NAME="<%= instance_name %>" MOBILIZON_INSTANCE_HOST="<%= instance_domain %>" +MOBILIZON_INSTANCE_PORT=4002 MOBILIZON_INSTANCE_EMAIL="<%= instance_email %>" MOBILIZON_INSTANCE_REGISTRATIONS_OPEN=true @@ -10,7 +11,6 @@ GRAPHQL_API_FULL_PATH="" # APP MIX_ENV=prod -MOBILIZON_INSTANCE_PORT=4002 MOBILIZON_LOGLEVEL="info" MOBILIZON_SECRET="<%= instance_secret %>" @@ -19,4 +19,4 @@ MOBILIZON_DATABASE_USERNAME="<%= database_username %>" MOBILIZON_DATABASE_PASSWORD="<%= database_password %>" MOBILIZON_DATABASE_DBNAME="<%= database_name %>" MOBILIZON_DATABASE_HOST="<%= database_host %>" -MOBILIZON_DATABASE_PORT=<%= database_port %> \ No newline at end of file +MOBILIZON_DATABASE_PORT=<%= database_port %> diff --git a/js/src/App.vue b/js/src/App.vue index 5008231a1..ef438c0c6 100644 --- a/js/src/App.vue +++ b/js/src/App.vue @@ -81,18 +81,20 @@ export default class App extends Vue { @import "~bulma/sass/elements/other.sass"; @import "~bulma/sass/elements/tag.sass"; @import "~bulma/sass/elements/title.sass"; + @import "~bulma/sass/elements/notification"; @import "~bulma/sass/grid/_all.sass"; @import "~bulma/sass/layout/_all.sass"; @import "~bulma/sass/utilities/_all"; /* Buefy imports */ + @import "~buefy/src/scss/utils/_all"; @import "~buefy/src/scss/components/datepicker"; + @import "~buefy/src/scss/components/notices"; @import "~buefy/src/scss/components/dropdown"; @import "~buefy/src/scss/components/form"; @import "~buefy/src/scss/components/modal"; @import "~buefy/src/scss/components/tag"; @import "~buefy/src/scss/components/upload"; - @import "~buefy/src/scss/utils/_all"; .router-enter-active, .router-leave-active { diff --git a/js/src/components/Account/CreateIdentity.vue b/js/src/components/Account/CreateIdentity.vue deleted file mode 100644 index ec5bdd7fe..000000000 --- a/js/src/components/Account/CreateIdentity.vue +++ /dev/null @@ -1,44 +0,0 @@ - - - diff --git a/js/src/components/Account/Identities.vue b/js/src/components/Account/Identities.vue index c81771b1c..fb0870efa 100644 --- a/js/src/components/Account/Identities.vue +++ b/js/src/components/Account/Identities.vue @@ -6,7 +6,10 @@ - + Create a new identity - + @@ -38,6 +41,7 @@ font-size: 1.3rem; padding-bottom: 0; margin-bottom: 15px; + color: #000; &.is-current-identity { background-color: rgba(0, 0, 0, 0.1); @@ -50,33 +54,29 @@ diff --git a/js/src/components/NavBar.vue b/js/src/components/NavBar.vue index fadee064b..727325053 100644 --- a/js/src/components/NavBar.vue +++ b/js/src/components/NavBar.vue @@ -17,43 +17,40 @@ +