diff --git a/.tool-versions b/.tool-versions index 6d5c81162..73654c14d 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1,2 @@ -elixir 1.13.4-otp-25 -erlang 25.0.3 +elixir 1.14.0-otp-25 +erlang 25.0.4 diff --git a/docker/tests/Dockerfile b/docker/tests/Dockerfile index 4c87c709b..6342d6847 100644 --- a/docker/tests/Dockerfile +++ b/docker/tests/Dockerfile @@ -1,7 +1,7 @@ FROM elixir:latest LABEL maintainer="Thomas Citharel " -ENV REFRESHED_AT=2022-04-06 +ENV REFRESHED_AT=2022-09-20 RUN apt-get update -yq && apt-get install -yq build-essential inotify-tools postgresql-client git curl gnupg xvfb libgtk-3-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 cmake exiftool python3-pip python3-setuptools RUN curl -sL https://deb.nodesource.com/setup_16.x | bash && apt-get install nodejs -yq RUN npm install -g yarn wait-on diff --git a/js/.eslintrc.js b/js/.eslintrc.js index c2b3c63fa..101b36075 100644 --- a/js/.eslintrc.js +++ b/js/.eslintrc.js @@ -53,4 +53,7 @@ module.exports = { }, ignorePatterns: ["src/typings/*.d.ts", "vue.config.js"], + globals: { + GeolocationPositionError: true, + }, }; diff --git a/js/package.json b/js/package.json index 8a0add4a1..42c3de362 100644 --- a/js/package.json +++ b/js/package.json @@ -45,6 +45,7 @@ "@tiptap/extension-strike": "^2.0.0-beta.26", "@tiptap/extension-text": "^2.0.0-beta.15", "@tiptap/extension-underline": "^2.0.0-beta.7", + "@tiptap/suggestion": "^2.0.0-beta.195", "@tiptap/vue-3": "^2.0.0-beta.96", "@vue-a11y/announcer": "^2.1.0", "@vue-a11y/skip-to": "^2.1.2", @@ -54,10 +55,9 @@ "@vueuse/core": "^9.1.0", "@vueuse/head": "^0.7.9", "@vueuse/router": "^9.0.2", - "@xiaoshuapp/draggable": "^4.1.0", "apollo-absinthe-upload-link": "^1.5.0", "autoprefixer": "^10", - "blurhash": "^1.1.3", + "blurhash": "^2.0.0", "bulma": "^0.9.4", "bulma-divider": "^0.2.0", "date-fns": "^2.16.0", @@ -82,16 +82,15 @@ "tippy.js": "^6.2.3", "unfetch": "^4.2.0", "vue": "^3.2.37", - "vue-class-component": "8.0.0-rc.1", "vue-i18n": "9", "vue-material-design-icons": "^5.1.2", "vue-matomo": "^4.1.0", "vue-meta": "^2.3.1", "vue-plausible": "^1.3.1", - "vue-property-decorator": "10.0.0-rc.3", "vue-router": "4", "vue-scrollto": "^2.17.1", - "vue-use-route-query": "^1.1.0" + "vue-use-route-query": "^1.1.0", + "vuedraggable": "^4.1.0" }, "devDependencies": { "@histoire/plugin-vue": "^0.10.0", @@ -113,7 +112,7 @@ "@types/prosemirror-view": "^1.11.4", "@types/sanitize-html": "^2.5.0", "@vitejs/plugin-vue": "^3.0.3", - "@vitest/ui": "^0.22.1", + "@vitest/ui": "^0.23.4", "@vue/eslint-config-prettier": "^7.0.0", "@vue/eslint-config-typescript": "^11.0.0", "@vue/test-utils": "^2.0.2", @@ -130,10 +129,10 @@ "prettier-eslint": "^15.0.1", "rollup-plugin-visualizer": "^5.7.1", "sass": "^1.34.1", - "typescript": "~4.7.4", + "typescript": "~4.8.3", "vite": "^3.0.9", - "vite-plugin-pwa": "^0.12.3", - "vitest": "^0.22.1", + "vite-plugin-pwa": "^0.13.0", + "vitest": "^0.23.3", "vue-i18n-extract": "^2.0.4" } } diff --git a/js/src/assets/oruga-tailwindcss.css b/js/src/assets/oruga-tailwindcss.css index 811eaef1c..63dffe692 100644 --- a/js/src/assets/oruga-tailwindcss.css +++ b/js/src/assets/oruga-tailwindcss.css @@ -153,7 +153,7 @@ body { /* Modal */ .modal-content { - @apply bg-white dark:bg-zinc-800 rounded px-2 py-4 w-full; + @apply bg-white dark:bg-zinc-800 rounded px-2 py-4 w-full z-0; } /* Switch */ @@ -210,7 +210,7 @@ button.menubar__button { /* Table */ .table tr { - @apply odd:bg-white dark:odd:bg-zinc-600 even:bg-gray-50 dark:even:bg-zinc-700 border-b rounded; + @apply odd:bg-white dark:odd:bg-zinc-600 last:border-b-0 even:bg-gray-50 dark:even:bg-zinc-700 border-b rounded; } .table-td { diff --git a/js/src/components/Activity/activity.scss b/js/src/components/Activity/activity.scss index 860de64ef..a7181f137 100644 --- a/js/src/components/Activity/activity.scss +++ b/js/src/components/Activity/activity.scss @@ -8,6 +8,5 @@ border: 2px solid; z-index: 2; flex-shrink: 0; - } } diff --git a/js/src/components/Editor/Mention.ts b/js/src/components/Editor/Mention.ts index 82103a309..b866df575 100644 --- a/js/src/components/Editor/Mention.ts +++ b/js/src/components/Editor/Mention.ts @@ -62,9 +62,10 @@ const mentionOptions: MentionOptions = { let popup: any; return { - onStart: (props: any) => { + onStart: (props: Record) => { component = new VueRenderer(MentionList, { - propsData: props, + props, + editor: props.editor, }); popup = tippy("body", { diff --git a/js/src/components/Editor/MentionList.vue b/js/src/components/Editor/MentionList.vue index 30642051a..678d9c2f6 100644 --- a/js/src/components/Editor/MentionList.vue +++ b/js/src/components/Editor/MentionList.vue @@ -20,7 +20,7 @@ import { ref, watch } from "vue"; const props = defineProps<{ items: IPerson[]; - command: ({ id }: { id: string }) => {}; + command: ({ id }: { id: string }) => any; }>(); // @Prop({ type: Function, required: true }) command!: any; @@ -31,37 +31,37 @@ watch(props.items, () => { selectedIndex.value = 0; }); -const onKeyDown = ({ event }: { event: KeyboardEvent }): boolean => { - if (event.key === "ArrowUp") { - upHandler(); - return true; - } +// const onKeyDown = ({ event }: { event: KeyboardEvent }): boolean => { +// if (event.key === "ArrowUp") { +// upHandler(); +// return true; +// } - if (event.key === "ArrowDown") { - downHandler(); - return true; - } +// if (event.key === "ArrowDown") { +// downHandler(); +// return true; +// } - if (event.key === "Enter") { - enterHandler(); - return true; - } +// if (event.key === "Enter") { +// enterHandler(); +// return true; +// } - return false; -}; +// return false; +// }; -const upHandler = (): void => { - selectedIndex.value = - (selectedIndex.value + props.items.length - 1) % props.items.length; -}; +// const upHandler = (): void => { +// selectedIndex.value = +// (selectedIndex.value + props.items.length - 1) % props.items.length; +// }; -const downHandler = (): void => { - selectedIndex.value = (selectedIndex.value + 1) % props.items.length; -}; +// const downHandler = (): void => { +// selectedIndex.value = (selectedIndex.value + 1) % props.items.length; +// }; -const enterHandler = (): void => { - selectItem(selectedIndex.value); -}; +// const enterHandler = (): void => { +// selectItem(selectedIndex.value); +// }; const selectItem = (index: number): void => { const item = props.items[index]; diff --git a/js/src/components/Event/AddressAutoComplete.vue b/js/src/components/Event/AddressAutoComplete.vue deleted file mode 100644 index db105b09a..000000000 --- a/js/src/components/Event/AddressAutoComplete.vue +++ /dev/null @@ -1,149 +0,0 @@ - - - diff --git a/js/src/components/Event/EventCard.vue b/js/src/components/Event/EventCard.vue index d2aa8bf7a..bcf92c9b4 100644 --- a/js/src/components/Event/EventCard.vue +++ b/js/src/components/Event/EventCard.vue @@ -150,7 +150,7 @@ import RouteName from "../../router/name"; import InlineAddress from "@/components/Address/InlineAddress.vue"; import { computed, inject } from "vue"; -import MobilizonTag from "@/components/Tag.vue"; +import MobilizonTag from "@/components/TagElement.vue"; import AccountCircle from "vue-material-design-icons/AccountCircle.vue"; import Video from "vue-material-design-icons/Video.vue"; import { formatDateTimeForEvent } from "@/utils/datetime"; diff --git a/js/src/components/Event/EventMetadataSidebar.vue b/js/src/components/Event/EventMetadataSidebar.vue index f6cacfdbc..b6a0db330 100644 --- a/js/src/components/Event/EventMetadataSidebar.vue +++ b/js/src/components/Event/EventMetadataSidebar.vue @@ -84,7 +84,7 @@ (), - { - options: () => ({ - hideDate: true, - loggedPerson: false, - hideDetails: false, - organizerActor: null, - }), - } -); +const props = defineProps<{ + participation: IParticipant; + options?: IEventCardOptions; +}>(); const emit = defineEmits(["eventDeleted"]); @@ -353,10 +336,6 @@ const { result: currentActorResult } = useQuery(CURRENT_ACTOR_CLIENT); const currentActor = computed(() => currentActorResult.value?.currentActor); const { t } = useI18n({ useScope: "global" }); -const mergedOptions = computed(() => { - return { ...defaultOptions, ...props.options }; -}); - const dialog = inject("dialog"); const openDeleteEventModal = ( @@ -441,9 +420,8 @@ onDeleteEventError((error) => { * Delete the event */ const openDeleteEventModalWrapper = () => { - openDeleteEventModal( - props.participation.event, - deleteEvent(props.participation.event) + openDeleteEventModal(props.participation.event, (event: IEvent) => + deleteEvent({ eventId: event.id ?? "" }) ); }; @@ -474,15 +452,15 @@ const gotToWithCheck = async ( return router.push(route); }; -const organizerActor = computed(() => { - if ( - props.participation.event.attributedTo && - props.participation.event.attributedTo.id - ) { - return props.participation.event.attributedTo; - } - return props.participation.event.organizerActor; -}); +// const organizerActor = computed(() => { +// if ( +// props.participation.event.attributedTo && +// props.participation.event.attributedTo.id +// ) { +// return props.participation.event.attributedTo; +// } +// return props.participation.event.organizerActor; +// }); const seatsLeft = computed(() => { if (props.participation.event.options.maximumAttendeeCapacity > 0) { diff --git a/js/src/components/Event/FullAddressAutoComplete.vue b/js/src/components/Event/FullAddressAutoComplete.vue index dec60e5b3..640e3ce64 100644 --- a/js/src/components/Event/FullAddressAutoComplete.vue +++ b/js/src/components/Event/FullAddressAutoComplete.vue @@ -143,7 +143,7 @@ const props = withDefaults( } ); -const addressModalActive = ref(false); +// const addressModalActive = ref(false); const componentId = 0; @@ -186,14 +186,14 @@ const updateSelected = (option: IAddress): void => { emit("update:modelValue", selected.value); }; -const resetPopup = (): void => { - selected.value = new Address(); -}; +// const resetPopup = (): void => { +// selected.value = new Address(); +// }; -const openNewAddressModal = (): void => { - resetPopup(); - addressModalActive.value = true; -}; +// const openNewAddressModal = (): void => { +// resetPopup(); +// addressModalActive.value = true; +// }; const checkCurrentPosition = (e: LatLng): boolean => { if (!selected.value?.geom) return false; diff --git a/js/src/components/Group/GroupMemberCard.vue b/js/src/components/Group/GroupMemberCard.vue index 8c52ea202..748712044 100644 --- a/js/src/components/Group/GroupMemberCard.vue +++ b/js/src/components/Group/GroupMemberCard.vue @@ -94,7 +94,7 @@ import ExitToApp from "vue-material-design-icons/ExitToApp.vue"; import DotsHorizontal from "vue-material-design-icons/DotsHorizontal.vue"; import AccountGroup from "vue-material-design-icons/AccountGroup.vue"; import AccountCircle from "vue-material-design-icons/AccountCircle.vue"; -import Tag from "@/components/Tag.vue"; +import Tag from "@/components/TagElement.vue"; import { htmlToText } from "@/utils/html"; import { useI18n } from "vue-i18n"; diff --git a/js/src/components/LeafletMap.vue b/js/src/components/LeafletMap.vue index 0c6251c97..0426739ab 100644 --- a/js/src/components/LeafletMap.vue +++ b/js/src/components/LeafletMap.vue @@ -8,6 +8,8 @@ @click="clickMap" @update:zoom="updateZoom" :options="{ zoomControl: false }" + ref="mapComponent" + @ready="onMapReady" > @@ -16,28 +18,36 @@ :zoomInTitle="$t('Zoom in')" :zoomOutTitle="$t('Zoom out')" > - - + + + + {{ line }}
+