From 5f0497144ab1df69bdb98e639510e44daf50a146 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 31 Aug 2020 12:40:30 +0200 Subject: [PATCH] Improve texts Signed-off-by: Thomas Citharel --- js/.eslintrc.js | 2 + js/package.json | 2 +- js/src/App.vue | 36 - js/src/common.scss | 40 +- .../Discussion/DiscussionComment.vue | 5 +- .../components/Event/AddressAutoComplete.vue | 1 + js/src/components/Event/EventListCard.vue | 7 +- js/src/components/Event/EventListViewCard.vue | 11 +- .../Event/FullAddressAutoComplete.vue | 1 + js/src/components/Group/GroupSection.vue | 89 +- js/src/components/NavBar.vue | 2 +- .../Participation/UnloggedParticipation.vue | 5 +- js/src/components/SearchField.vue | 2 +- js/src/i18n/en_US.json | 40 +- js/src/i18n/fr_FR.json | 36 +- js/src/router/groups.ts | 9 + js/src/types/actor/actor.model.ts | 3 +- js/src/types/actor/group.model.ts | 1 + js/src/types/discussions.ts | 4 +- js/src/variables.scss | 6 +- js/src/views/About/AboutMobilizon.vue | 20 +- js/src/views/About/Glossary.vue | 2 +- js/src/views/Account/IdentityPicker.vue | 3 +- .../views/Account/IdentityPickerWrapper.vue | 34 +- js/src/views/Account/Profile.vue | 10 +- js/src/views/Account/Register.vue | 22 +- js/src/views/Admin/AdminGroupProfile.vue | 2 +- js/src/views/Admin/GroupProfiles.vue | 2 +- js/src/views/Discussions/Discussion.vue | 2 +- js/src/views/Discussions/DiscussionsList.vue | 19 +- js/src/views/Event/Edit.vue | 2 +- js/src/views/Event/GroupEvents.vue | 79 + js/src/views/Group/Create.vue | 4 +- js/src/views/Group/Group.vue | 263 +- js/src/views/Group/GroupList.vue | 2 +- js/src/views/Group/GroupSettings.vue | 2 +- js/src/views/Group/MyGroups.vue | 10 +- js/src/views/Posts/Edit.vue | 2 +- js/src/views/Posts/List.vue | 94 +- js/src/views/Posts/Post.vue | 2 +- js/src/views/Resources/ResourceFolder.vue | 75 +- js/src/views/Search.vue | 26 +- js/src/views/Todos/TodoLists.vue | 22 +- js/src/views/User/Register.vue | 13 +- js/vue.config.js | 16 +- js/yarn.lock | 96 +- lib/web/templates/api/privacy.html.eex | 16 +- lib/web/templates/api/terms.html.eex | 22 +- priv/gettext/ar/LC_MESSAGES/default.po | 222 +- priv/gettext/be/LC_MESSAGES/default.po | 222 +- priv/gettext/ca/LC_MESSAGES/default.po | 222 +- priv/gettext/cs/LC_MESSAGES/default.po | 222 +- priv/gettext/de/LC_MESSAGES/default.po | 222 +- priv/gettext/default.pot | 218 +- priv/gettext/en/LC_MESSAGES/default.po | 222 +- priv/gettext/es/LC_MESSAGES/default.po | 2199 ++++++++--------- priv/gettext/fi/LC_MESSAGES/default.po | 362 ++- priv/gettext/fr/LC_MESSAGES/default.po | 566 +++-- priv/gettext/it/LC_MESSAGES/default.po | 222 +- priv/gettext/ja/LC_MESSAGES/default.po | 222 +- priv/gettext/nl/LC_MESSAGES/default.po | 222 +- priv/gettext/oc/LC_MESSAGES/default.po | 226 +- priv/gettext/pl/LC_MESSAGES/default.po | 222 +- priv/gettext/pt/LC_MESSAGES/default.po | 222 +- priv/gettext/pt_BR/LC_MESSAGES/default.po | 292 +-- priv/gettext/ru/LC_MESSAGES/default.po | 222 +- priv/gettext/sv/LC_MESSAGES/default.po | 222 +- 67 files changed, 4235 insertions(+), 3678 deletions(-) create mode 100644 js/src/views/Event/GroupEvents.vue diff --git a/js/.eslintrc.js b/js/.eslintrc.js index 0a836b8c7..ac692e5ee 100644 --- a/js/.eslintrc.js +++ b/js/.eslintrc.js @@ -46,6 +46,8 @@ module.exports = { "@typescript-eslint/interface-name-prefix": "off", "@typescript-eslint/no-use-before-define": "off", "import/prefer-default-export": "off", + "import/extensions": "off", + "import/no-unresolved": "off", }, ignorePatterns: ["src/typings/*.d.ts", "vue.config.js"], diff --git a/js/package.json b/js/package.json index 832b8e665..0043591a3 100644 --- a/js/package.json +++ b/js/package.json @@ -78,7 +78,7 @@ "@vue/eslint-config-airbnb": "^5.0.2", "@vue/eslint-config-prettier": "^6.0.0", "@vue/eslint-config-typescript": "^5.0.2", - "@vue/test-utils": "1.0.4", + "@vue/test-utils": "1.0.5", "chai": "^4.1.2", "eslint": "^7.7.0", "eslint-config-prettier": "^6.11.0", diff --git a/js/src/App.vue b/js/src/App.vue index 55b2f2310..03d84ad5d 100644 --- a/js/src/App.vue +++ b/js/src/App.vue @@ -107,45 +107,9 @@ export default class App extends Vue { diff --git a/js/src/common.scss b/js/src/common.scss index f739115fc..e2057c385 100644 --- a/js/src/common.scss +++ b/js/src/common.scss @@ -12,7 +12,7 @@ a.out, } input.input { - border-color: $input-border-color !important; + // border-color: $input-border-color !important; } .section { @@ -44,3 +44,41 @@ $color-black: #000; background: initial; margin-right: 0; } + +.select select { + border-color: $borders; +} + +.fade-enter-active, +.fade-leave-active { + transition: opacity 0.5s; +} +.fade-enter, +.fade-leave-to { + opacity: 0; +} + +body { + // background: #f7f8fa; + background: $body-background-color; + font-family: BlinkMacSystemFont, Roboto, Oxygen, Ubuntu, Cantarell, "Segoe UI", + "Fira Sans", "Droid Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; + + /*main {*/ + /* margin: 1rem auto 0;*/ + /*}*/ +} + +#mobilizon > .container > .message { + margin: 1rem auto auto; + .message-header { + button.delete { + background: #4a4a4a; + } + } +} + +.module-description { + margin-bottom: 2rem; + color: $violet-1; +} diff --git a/js/src/components/Discussion/DiscussionComment.vue b/js/src/components/Discussion/DiscussionComment.vue index 26707c4a1..38d71967c 100644 --- a/js/src/components/Discussion/DiscussionComment.vue +++ b/js/src/components/Discussion/DiscussionComment.vue @@ -91,8 +91,9 @@ import { CURRENT_ACTOR_CLIENT } from "../../graphql/actor"; export default class DiscussionComment extends Vue { @Prop({ required: true, type: Object }) comment!: IComment; - editMode: boolean = false; - updatedComment: string = ""; + editMode = false; + + updatedComment = ""; currentActor!: IPerson; diff --git a/js/src/components/Event/AddressAutoComplete.vue b/js/src/components/Event/AddressAutoComplete.vue index 83292ce5c..511fc4dae 100644 --- a/js/src/components/Event/AddressAutoComplete.vue +++ b/js/src/components/Event/AddressAutoComplete.vue @@ -45,6 +45,7 @@ import { IConfig } from "../../types/config.model"; }) export default class AddressAutoComplete extends Vue { @Prop({ required: true }) value!: IAddress; + @Prop({ required: false }) placeholder!: string; addressData: IAddress[] = []; diff --git a/js/src/components/Event/EventListCard.vue b/js/src/components/Event/EventListCard.vue index ed580836c..c572110d3 100644 --- a/js/src/components/Event/EventListCard.vue +++ b/js/src/components/Event/EventListCard.vue @@ -186,7 +186,7 @@ import { Component, Prop } from "vue-property-decorator"; import DateCalendarIcon from "@/components/Event/DateCalendarIcon.vue"; import { mixins } from "vue-class-component"; -import { RawLocation } from "vue-router"; +import { RawLocation, Route } from "vue-router"; import { IParticipant, ParticipantRole, @@ -246,12 +246,13 @@ export default class EventListCard extends mixins(ActorMixin, EventMixin) { /** * Delete the event */ - async openDeleteEventModalWrapper() { + async openDeleteEventModalWrapper(): Promise { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore await this.openDeleteEventModal(this.participation.event, this.currentActor); } - async gotToWithCheck(participation: IParticipant, route: RawLocation) { + async gotToWithCheck(participation: IParticipant, route: RawLocation): Promise { if (participation.actor.id !== this.currentActor.id && participation.event.organizerActor) { const organizer = participation.event.organizerActor as IPerson; await changeIdentity(this.$apollo.provider.defaultClient, organizer); diff --git a/js/src/components/Event/EventListViewCard.vue b/js/src/components/Event/EventListViewCard.vue index 59d9ce971..8e68e2f20 100644 --- a/js/src/components/Event/EventListViewCard.vue +++ b/js/src/components/Event/EventListViewCard.vue @@ -50,12 +50,7 @@ diff --git a/js/src/components/NavBar.vue b/js/src/components/NavBar.vue index 146333c5e..5d52f8c18 100644 --- a/js/src/components/NavBar.vue +++ b/js/src/components/NavBar.vue @@ -157,7 +157,7 @@ export default class NavBar extends Vue { RouteName = RouteName; - mobileNavbarActive: boolean = false; + mobileNavbarActive = false; @Watch("currentActor") async initializeListOfIdentities() { diff --git a/js/src/components/Participation/UnloggedParticipation.vue b/js/src/components/Participation/UnloggedParticipation.vue index 93dd390c4..9adfc7d8a 100644 --- a/js/src/components/Participation/UnloggedParticipation.vue +++ b/js/src/components/Participation/UnloggedParticipation.vue @@ -73,7 +73,6 @@ diff --git a/js/src/views/Admin/AdminGroupProfile.vue b/js/src/views/Admin/AdminGroupProfile.vue index 3c7b36ffa..0e4638cf9 100644 --- a/js/src/views/Admin/AdminGroupProfile.vue +++ b/js/src/views/Admin/AdminGroupProfile.vue @@ -197,13 +197,13 @@ diff --git a/js/src/views/Group/Create.vue b/js/src/views/Group/Create.vue index f6d1a0e27..0b28a2f1e 100644 --- a/js/src/views/Group/Create.vue +++ b/js/src/views/Group/Create.vue @@ -56,9 +56,9 @@ import { Group, IPerson, usernameWithDomain, MemberRole } from "@/types/actor"; import { CURRENT_ACTOR_CLIENT, PERSON_MEMBERSHIPS } from "@/graphql/actor"; import { CREATE_GROUP } from "@/graphql/group"; import PictureUpload from "@/components/PictureUpload.vue"; -import RouteName from "../../router/name"; import { mixins } from "vue-class-component"; import IdentityEditionMixin from "@/mixins/identityEdition"; +import RouteName from "../../router/name"; import { convertToUsername } from "../../utils/username"; @Component({ @@ -98,7 +98,7 @@ export default class CreateGroup extends mixins(IdentityEditionMixin) { }; const membershipData = store.readQuery<{ person: IPerson }>(query); if (!membershipData) return; - const person: IPerson = membershipData.person; + const { person } = membershipData; person.memberships.elements.push({ parent: createGroup, role: MemberRole.ADMINISTRATOR, diff --git a/js/src/views/Group/Group.vue b/js/src/views/Group/Group.vue index bf09a7410..db93fa014 100644 --- a/js/src/views/Group/Group.vue +++ b/js/src/views/Group/Group.vue @@ -120,109 +120,181 @@
- -
- -
-
-

{{ $t("No discussions yet") }}

-
- {{ $t("View all discussions") }} -
- - -
-
- -

- {{ - $tc("{title} ({count} todos)", todoList.todos.total, { - count: todoList.todos.total, - title: todoList.title, - }) - }} -

-
- + + - -
-
- - + + + + + + + +
- -
- -
-
-

{{ $t("No public upcoming events") }}

-
- - {{ $t("View all events") }} + + + - -
- -
-
-

{{ $t("No posts yet") }}

-
- {{ $t("Post a public message") }} + + +
@@ -294,11 +366,11 @@ import DiscussionListItem from "@/components/Discussion/DiscussionListItem.vue"; import PostListItem from "@/components/Post/PostListItem.vue"; import ResourceItem from "@/components/Resource/ResourceItem.vue"; import FolderItem from "@/components/Resource/FolderItem.vue"; -import RouteName from "../../router/name"; import { Address } from "@/types/address.model"; -import GroupSection from "../../components/Group/GroupSection.vue"; import Invitations from "@/components/Group/Invitations.vue"; import addMinutes from "date-fns/addMinutes"; +import GroupSection from "../../components/Group/GroupSection.vue"; +import RouteName from "../../router/name"; @Component({ apollo: { @@ -493,7 +565,7 @@ div.container { .header, .public-container { - margin: auto 2rem; + margin: auto 1rem; display: flex; flex-direction: column; } @@ -501,6 +573,7 @@ div.container { .block-container { display: flex; flex-wrap: wrap; + margin-top: 15px; &.presentation { border: 2px solid $purple-2; @@ -560,7 +633,7 @@ div.container { .block-column { flex: 1; - margin: 0 2rem; + margin: 0 1rem; section { .posts-wrapper { diff --git a/js/src/views/Group/GroupList.vue b/js/src/views/Group/GroupList.vue index 86b3fadf6..b70566a70 100644 --- a/js/src/views/Group/GroupList.vue +++ b/js/src/views/Group/GroupList.vue @@ -21,8 +21,8 @@ import { Component, Vue } from "vue-property-decorator"; import { LIST_GROUPS } from "@/graphql/group"; import { Group, IGroup } from "@/types/actor"; import GroupMemberCard from "@/components/Group/GroupMemberCard.vue"; -import RouteName from "../../router/name"; import { Paginate } from "@/types/paginate"; +import RouteName from "../../router/name"; @Component({ apollo: { diff --git a/js/src/views/Group/GroupSettings.vue b/js/src/views/Group/GroupSettings.vue index deae0d90d..4d207e605 100644 --- a/js/src/views/Group/GroupSettings.vue +++ b/js/src/views/Group/GroupSettings.vue @@ -102,13 +102,13 @@