Merge branch 'manual-addresses' into 'main'
Allow to enter manual addresses Closes #142, #610, #867 et #1040 See merge request framasoft/mobilizon!1367
This commit is contained in:
commit
3a9188e081
|
@ -10,32 +10,24 @@
|
|||
>
|
||||
<template #label>
|
||||
{{ actualLabel }}
|
||||
<span v-if="gettingLocation">{{ t("Getting location") }}</span>
|
||||
</template>
|
||||
<p class="control" v-if="canShowLocateMeButton">
|
||||
<o-loading
|
||||
:full-page="false"
|
||||
v-model:active="gettingLocation"
|
||||
:can-cancel="false"
|
||||
:container="mapMarker?.$el"
|
||||
/>
|
||||
<o-button
|
||||
ref="mapMarker"
|
||||
icon-right="map-marker"
|
||||
@click="locateMe"
|
||||
:title="t('Use my location')"
|
||||
/>
|
||||
</p>
|
||||
<o-button
|
||||
v-if="canShowLocateMeButton"
|
||||
ref="mapMarker"
|
||||
icon-right="map-marker"
|
||||
@click="locateMe"
|
||||
:title="t('Use my location')"
|
||||
/>
|
||||
<o-autocomplete
|
||||
:data="addressData"
|
||||
v-model="queryText"
|
||||
v-model="queryTextWithDefault"
|
||||
:placeholder="placeholderWithDefault"
|
||||
:customFormatter="(elem: IAddress) => addressFullName(elem)"
|
||||
:debounceTyping="debounceDelay"
|
||||
@typing="asyncData"
|
||||
:icon="canShowLocateMeButton ? null : 'map-marker'"
|
||||
expanded
|
||||
@select="updateSelected"
|
||||
@select="setSelected"
|
||||
:id="id"
|
||||
:disabled="disabled"
|
||||
dir="auto"
|
||||
|
@ -49,35 +41,39 @@
|
|||
<small>{{ addressToPoiInfos(option).alternativeName }}</small>
|
||||
</template>
|
||||
<template #empty>
|
||||
<span v-if="isFetching">{{ t("Searching…") }}</span>
|
||||
<div v-else-if="queryText.length >= 3" class="enabled">
|
||||
<span>{{
|
||||
t('No results for "{queryText}"', { queryText })
|
||||
}}</span>
|
||||
<span>{{
|
||||
t(
|
||||
"You can try another search term or drag and drop the marker on the map",
|
||||
{
|
||||
queryText,
|
||||
}
|
||||
)
|
||||
}}</span>
|
||||
<!-- <p class="control" @click="openNewAddressModal">-->
|
||||
<!-- <button type="button" class="button is-primary">{{ t('Add') }}</button>-->
|
||||
<!-- </p>-->
|
||||
</div>
|
||||
<template v-if="isFetching">{{ t("Searching…") }}</template>
|
||||
<template v-else-if="queryTextWithDefault.length >= 3">
|
||||
<p>
|
||||
{{
|
||||
t('No results for "{queryText}"', {
|
||||
queryText: queryTextWithDefault,
|
||||
})
|
||||
}}
|
||||
</p>
|
||||
<p>
|
||||
{{
|
||||
t(
|
||||
"You can try another search term or add the address details manually below."
|
||||
)
|
||||
}}
|
||||
</p>
|
||||
</template>
|
||||
</template>
|
||||
</o-autocomplete>
|
||||
<o-button
|
||||
:disabled="!queryText"
|
||||
:disabled="!queryTextWithDefault"
|
||||
@click="resetAddress"
|
||||
class="reset-area"
|
||||
icon-left="close"
|
||||
:title="t('Clear address field')"
|
||||
/>
|
||||
</o-field>
|
||||
<p v-if="gettingLocation" class="flex gap-2">
|
||||
<Loading class="animate-spin" />
|
||||
{{ t("Getting location") }}
|
||||
</p>
|
||||
<div
|
||||
class="mt-2 p-2 rounded-lg shadow-md dark:bg-violet-3"
|
||||
class="mt-2 p-2 rounded-lg shadow-md bg-white dark:bg-violet-3"
|
||||
v-if="!hideSelected && (selected?.originId || selected?.url)"
|
||||
>
|
||||
<div class="">
|
||||
|
@ -90,16 +86,80 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="map" v-if="!hideMap && selected && selected.geom">
|
||||
<o-collapse
|
||||
v-model:open="detailsAddress"
|
||||
:aria-id="`${id}-address-details`"
|
||||
class="my-3"
|
||||
>
|
||||
<template #trigger>
|
||||
<o-button
|
||||
variant="primary"
|
||||
outlined
|
||||
:aria-controls="`${id}-address-details`"
|
||||
:icon-right="detailsAddress ? 'chevron-up' : 'chevron-down'"
|
||||
>
|
||||
{{ t("Details") }}
|
||||
</o-button>
|
||||
</template>
|
||||
<form @submit.prevent="saveManualAddress">
|
||||
<header>
|
||||
<h2>{{ t("Manually enter address") }}</h2>
|
||||
</header>
|
||||
<section>
|
||||
<o-field :label="t('Name')" labelFor="addressNameInput">
|
||||
<o-input
|
||||
aria-required="true"
|
||||
required
|
||||
v-model="selected.description"
|
||||
id="addressNameInput"
|
||||
/>
|
||||
</o-field>
|
||||
|
||||
<o-field :label="t('Street')" labelFor="streetInput">
|
||||
<o-input v-model="selected.street" id="streetInput" />
|
||||
</o-field>
|
||||
|
||||
<o-field grouped>
|
||||
<o-field :label="t('Postal Code')" labelFor="postalCodeInput">
|
||||
<o-input v-model="selected.postalCode" id="postalCodeInput" />
|
||||
</o-field>
|
||||
|
||||
<o-field :label="t('Locality')" labelFor="localityInput">
|
||||
<o-input v-model="selected.locality" id="localityInput" />
|
||||
</o-field>
|
||||
</o-field>
|
||||
|
||||
<o-field grouped>
|
||||
<o-field :label="t('Region')" labelFor="regionInput">
|
||||
<o-input v-model="selected.region" id="regionInput" />
|
||||
</o-field>
|
||||
|
||||
<o-field :label="t('Country')" labelFor="countryInput">
|
||||
<o-input v-model="selected.country" id="countryInput" />
|
||||
</o-field>
|
||||
</o-field>
|
||||
</section>
|
||||
<footer class="mt-3 flex gap-2 items-center">
|
||||
<o-button native-type="submit">
|
||||
{{ t("Save") }}
|
||||
</o-button>
|
||||
<o-button outlined type="button" @click="resetAddress">
|
||||
{{ t("Clear") }}
|
||||
</o-button>
|
||||
<p>
|
||||
{{
|
||||
t(
|
||||
"You can drag and drop the marker below to the desired location"
|
||||
)
|
||||
}}
|
||||
</p>
|
||||
</footer>
|
||||
</form>
|
||||
</o-collapse>
|
||||
<div class="map" v-if="!hideMap">
|
||||
<map-leaflet
|
||||
:coords="selected.geom"
|
||||
:marker="{
|
||||
text: [
|
||||
addressToPoiInfos(selected).name,
|
||||
addressToPoiInfos(selected).alternativeName,
|
||||
],
|
||||
icon: addressToPoiInfos(selected).poiIcon.icon,
|
||||
}"
|
||||
:coords="selected.geom ?? defaultCoords"
|
||||
:marker="mapMarkerValue"
|
||||
:updateDraggableMarkerCallback="reverseGeoCode"
|
||||
:options="{ zoom: mapDefaultZoom }"
|
||||
:readOnly="false"
|
||||
|
@ -114,15 +174,25 @@ import {
|
|||
IAddress,
|
||||
addressFullName,
|
||||
addressToPoiInfos,
|
||||
resetAddress as resetAddressAction,
|
||||
} from "../../types/address.model";
|
||||
import AddressInfo from "../../components/Address/AddressInfo.vue";
|
||||
import { computed, ref, watch, defineAsyncComponent } from "vue";
|
||||
import {
|
||||
computed,
|
||||
ref,
|
||||
watch,
|
||||
defineAsyncComponent,
|
||||
onMounted,
|
||||
reactive,
|
||||
onBeforeMount,
|
||||
} from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { useGeocodingAutocomplete } from "@/composition/apollo/config";
|
||||
import { ADDRESS } from "@/graphql/address";
|
||||
import { useReverseGeocode } from "@/composition/apollo/address";
|
||||
import { useLazyQuery } from "@vue/apollo-composable";
|
||||
import { AddressSearchType } from "@/types/enums";
|
||||
import Loading from "vue-material-design-icons/Loading.vue";
|
||||
const MapLeaflet = defineAsyncComponent(
|
||||
() => import("@/components/LeafletMap.vue")
|
||||
);
|
||||
|
@ -139,29 +209,38 @@ const props = withDefaults(
|
|||
hideSelected?: boolean;
|
||||
placeholder?: string;
|
||||
resultType?: AddressSearchType;
|
||||
defaultCoords?: string;
|
||||
}>(),
|
||||
{
|
||||
defaultCoords: "0;0",
|
||||
labelClass: "",
|
||||
defaultText: "",
|
||||
disabled: false,
|
||||
hideMap: false,
|
||||
hideSelected: false,
|
||||
}
|
||||
);
|
||||
|
||||
// const addressModalActive = ref(false);
|
||||
|
||||
const componentId = 0;
|
||||
const componentId = ref(0);
|
||||
|
||||
const emit = defineEmits(["update:modelValue"]);
|
||||
|
||||
const gettingLocationError = ref<string | null>(null);
|
||||
const gettingLocation = ref(false);
|
||||
const mapDefaultZoom = ref(15);
|
||||
const mapDefaultZoom = computed(() => {
|
||||
if (selected.description) {
|
||||
return 15;
|
||||
}
|
||||
return 5;
|
||||
});
|
||||
|
||||
const addressData = ref<IAddress[]>([]);
|
||||
|
||||
const selected = ref<IAddress | null>(null);
|
||||
const defaultAddress = new Address();
|
||||
defaultAddress.geom = undefined;
|
||||
defaultAddress.id = undefined;
|
||||
const selected = reactive<IAddress>(defaultAddress);
|
||||
|
||||
const detailsAddress = ref(false);
|
||||
|
||||
const isFetching = ref(false);
|
||||
|
||||
|
@ -171,40 +250,45 @@ const placeholderWithDefault = computed(
|
|||
() => props.placeholder ?? t("e.g. 10 Rue Jangot")
|
||||
);
|
||||
|
||||
// created(): void {
|
||||
// componentId += 1;
|
||||
// }
|
||||
onBeforeMount(() => {
|
||||
componentId.value += 1;
|
||||
});
|
||||
|
||||
const id = computed((): string => {
|
||||
return `full-address-autocomplete-${componentId}`;
|
||||
return `full-address-autocomplete-${componentId.value}`;
|
||||
});
|
||||
|
||||
const modelValue = computed(() => props.modelValue);
|
||||
|
||||
watch(modelValue, () => {
|
||||
if (!modelValue.value) return;
|
||||
selected.value = modelValue.value;
|
||||
console.debug("modelValue changed");
|
||||
setSelected(modelValue.value);
|
||||
});
|
||||
|
||||
const updateSelected = (option: IAddress): void => {
|
||||
if (option == null) return;
|
||||
selected.value = option;
|
||||
emit("update:modelValue", selected.value);
|
||||
onMounted(() => {
|
||||
setSelected(modelValue.value);
|
||||
});
|
||||
|
||||
const setSelected = (newValue: IAddress | null) => {
|
||||
if (!newValue) return;
|
||||
console.debug("setting selected to model value");
|
||||
Object.assign(selected, newValue);
|
||||
};
|
||||
|
||||
// const resetPopup = (): void => {
|
||||
// selected.value = new Address();
|
||||
// };
|
||||
|
||||
// const openNewAddressModal = (): void => {
|
||||
// resetPopup();
|
||||
// addressModalActive.value = true;
|
||||
// };
|
||||
const saveManualAddress = (): void => {
|
||||
console.debug("saving address");
|
||||
selected.id = undefined;
|
||||
selected.originId = undefined;
|
||||
selected.url = undefined;
|
||||
emit("update:modelValue", selected);
|
||||
detailsAddress.value = false;
|
||||
};
|
||||
|
||||
const checkCurrentPosition = (e: LatLng): boolean => {
|
||||
if (!selected.value?.geom) return false;
|
||||
const lat = parseFloat(selected.value?.geom.split(";")[1]);
|
||||
const lon = parseFloat(selected.value?.geom.split(";")[0]);
|
||||
console.debug("checkCurrentPosition");
|
||||
if (!selected?.geom || !e) return false;
|
||||
const lat = parseFloat(selected?.geom.split(";")[1]);
|
||||
const lon = parseFloat(selected?.geom.split(";")[0]);
|
||||
|
||||
return e.lat === lat && e.lng === lon;
|
||||
};
|
||||
|
@ -238,12 +322,11 @@ onAddressSearchResult((result) => {
|
|||
isFetching.value = false;
|
||||
});
|
||||
|
||||
const searchQuery = ref("");
|
||||
|
||||
const asyncData = async (query: string): Promise<void> => {
|
||||
console.debug("Finding addresses");
|
||||
if (!query.length) {
|
||||
addressData.value = [];
|
||||
selected.value = new Address();
|
||||
Object.assign(selected, defaultAddress);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -254,33 +337,39 @@ const asyncData = async (query: string): Promise<void> => {
|
|||
|
||||
isFetching.value = true;
|
||||
|
||||
searchQuery.value = query;
|
||||
|
||||
searchAddress(undefined, {
|
||||
query: searchQuery.value,
|
||||
query,
|
||||
locale: locale,
|
||||
type: props.resultType,
|
||||
});
|
||||
};
|
||||
|
||||
const queryText = computed({
|
||||
const selectedAddressText = computed(() => {
|
||||
if (!selected) return undefined;
|
||||
return addressFullName(selected);
|
||||
});
|
||||
|
||||
const queryText = ref();
|
||||
|
||||
const queryTextWithDefault = computed({
|
||||
get() {
|
||||
console.log("queryTextWithDefault 1", queryText.value);
|
||||
console.log("queryTextWithDefault 2", selectedAddressText.value);
|
||||
console.log("queryTextWithDefault 3", props.defaultText);
|
||||
return (
|
||||
(selected.value ? addressFullName(selected.value) : props.defaultText) ??
|
||||
""
|
||||
queryText.value ?? selectedAddressText.value ?? props.defaultText ?? ""
|
||||
);
|
||||
},
|
||||
set(text) {
|
||||
if (text === "" && selected.value?.id) {
|
||||
console.debug("doing reset");
|
||||
resetAddress();
|
||||
}
|
||||
set(newValue: string) {
|
||||
queryText.value = newValue;
|
||||
},
|
||||
});
|
||||
|
||||
const resetAddress = (): void => {
|
||||
console.debug("resetting address");
|
||||
emit("update:modelValue", null);
|
||||
selected.value = new Address();
|
||||
resetAddressAction(selected);
|
||||
queryTextWithDefault.value = "";
|
||||
};
|
||||
|
||||
const locateMe = async (): Promise<void> => {
|
||||
|
@ -288,7 +377,7 @@ const locateMe = async (): Promise<void> => {
|
|||
gettingLocationError.value = null;
|
||||
try {
|
||||
const location = await getLocation();
|
||||
mapDefaultZoom.value = 12;
|
||||
// mapDefaultZoom.value = 12;
|
||||
reverseGeoCode(
|
||||
new LatLng(location.coords.latitude, location.coords.longitude),
|
||||
12
|
||||
|
@ -308,15 +397,26 @@ onReverseGeocodeResult((result) => {
|
|||
addressData.value = data.reverseGeocode;
|
||||
|
||||
if (addressData.value.length > 0) {
|
||||
const defaultAddress = addressData.value[0];
|
||||
selected.value = defaultAddress;
|
||||
emit("update:modelValue", selected.value);
|
||||
const foundAddress = addressData.value[0];
|
||||
Object.assign(selected, foundAddress);
|
||||
console.debug("reverse geocode succeded, setting new address");
|
||||
queryTextWithDefault.value = addressFullName(foundAddress);
|
||||
emit("update:modelValue", selected);
|
||||
}
|
||||
});
|
||||
|
||||
const reverseGeoCode = (e: LatLng, zoom: number) => {
|
||||
console.debug("reverse geocode");
|
||||
|
||||
// If the details is opened, just update coords, don't reverse geocode
|
||||
if (e && detailsAddress.value) {
|
||||
selected.geom = `${e.lng};${e.lat}`;
|
||||
console.debug("no reverse geocode, just setting new coords");
|
||||
return;
|
||||
}
|
||||
|
||||
// If the position has been updated through autocomplete selection, no need to geocode it!
|
||||
if (checkCurrentPosition(e)) return;
|
||||
if (!e || checkCurrentPosition(e)) return;
|
||||
|
||||
loadReverseGeocode(undefined, {
|
||||
latitude: e.lat,
|
||||
|
@ -358,6 +458,17 @@ const getLocation = async (): Promise<GeolocationPosition> => {
|
|||
});
|
||||
};
|
||||
|
||||
const mapMarkerValue = computed(() => {
|
||||
if (!selected.description) return undefined;
|
||||
return {
|
||||
text: [
|
||||
addressToPoiInfos(selected).name,
|
||||
addressToPoiInfos(selected).alternativeName,
|
||||
],
|
||||
icon: addressToPoiInfos(selected).poiIcon.icon,
|
||||
};
|
||||
});
|
||||
|
||||
const fieldErrors = computed(() => {
|
||||
return gettingLocationError.value;
|
||||
});
|
||||
|
|
|
@ -21,10 +21,15 @@
|
|||
<l-marker
|
||||
:lat-lng="[lat, lon]"
|
||||
@add="openPopup"
|
||||
@update:latLng="updateDraggableMarkerPosition"
|
||||
@update:latLng="updateDraggableMarkerPositionDebounced"
|
||||
:draggable="!readOnly"
|
||||
>
|
||||
<l-icon>
|
||||
<l-icon
|
||||
:icon-size="[48, 48]"
|
||||
:shadow-size="[30, 30]"
|
||||
:icon-anchor="[24, 48]"
|
||||
:popup-anchor="[-24, -40]"
|
||||
>
|
||||
<MapMarker :size="48" class="text-mbz-purple" />
|
||||
</l-icon>
|
||||
<l-popup v-if="popupMultiLine" :options="{ offset: new Point(22, 8) }">
|
||||
|
@ -63,6 +68,7 @@ import { useI18n } from "vue-i18n";
|
|||
import Locatecontrol from "leaflet.locatecontrol";
|
||||
import CrosshairsGps from "vue-material-design-icons/CrosshairsGps.vue";
|
||||
import MapMarker from "vue-material-design-icons/MapMarker.vue";
|
||||
import { useDebounceFn } from "@vueuse/core";
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
|
@ -159,22 +165,25 @@ const mergedOptions = computed((): Record<string, unknown> => {
|
|||
});
|
||||
|
||||
const lat = computed((): number => {
|
||||
return Number.parseFloat(props.coords?.split(";")[1]);
|
||||
return Number.parseFloat(props.coords?.split(";")[1] || "0");
|
||||
});
|
||||
|
||||
const lon = computed((): number => {
|
||||
return Number.parseFloat(props.coords.split(";")[0]);
|
||||
return Number.parseFloat(props.coords?.split(";")[0] || "0");
|
||||
});
|
||||
|
||||
const popupMultiLine = computed((): Array<string | undefined> => {
|
||||
const popupMultiLine = computed((): Array<string> | undefined => {
|
||||
if (Array.isArray(props.marker?.text)) {
|
||||
return props.marker?.text as string[];
|
||||
}
|
||||
return [props.marker?.text];
|
||||
if (props.marker?.text) {
|
||||
return [props.marker?.text];
|
||||
}
|
||||
return undefined;
|
||||
});
|
||||
|
||||
const clickMap = (event: LeafletMouseEvent): void => {
|
||||
updateDraggableMarkerPosition(event.latlng);
|
||||
updateDraggableMarkerPositionDebounced(event.latlng);
|
||||
};
|
||||
|
||||
const updateDraggableMarkerPosition = (e: LatLng): void => {
|
||||
|
@ -183,6 +192,10 @@ const updateDraggableMarkerPosition = (e: LatLng): void => {
|
|||
}
|
||||
};
|
||||
|
||||
const updateDraggableMarkerPositionDebounced = useDebounceFn((e: LatLng) => {
|
||||
updateDraggableMarkerPosition(e);
|
||||
}, 1000);
|
||||
|
||||
const updateZoom = (newZoom: number): void => {
|
||||
zoom.value = newZoom;
|
||||
};
|
||||
|
@ -211,4 +224,9 @@ div.map-container {
|
|||
</style>
|
||||
<style>
|
||||
@import "leaflet.locatecontrol/dist/L.Control.Locate.css";
|
||||
|
||||
.leaflet-div-icon {
|
||||
background: unset;
|
||||
border: unset;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -229,8 +229,9 @@ const { registrationsOpen, registrationsAllowlist, databaseLogin } =
|
|||
|
||||
const canRegister = computed(() => {
|
||||
return (
|
||||
(registrationsOpen.value || registrationsAllowlist.value) &&
|
||||
databaseLogin.value
|
||||
((registrationsOpen.value || registrationsAllowlist.value) &&
|
||||
databaseLogin.value) ??
|
||||
false
|
||||
);
|
||||
});
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ export const scope: Record<
|
|||
write: {
|
||||
title: t("Modify all of your account's data"),
|
||||
text: t(
|
||||
"This application will be allowed to publish and manage events on your behalf, post and manage comments, participate to events, manage all of your groups, including group events, resources, posts and discussions. It will also be allowed to manage your account and profile settings."
|
||||
"This application will be allowed to publish and manage events, post and manage comments, participate to events, manage all of your groups, including group events, resources, posts and discussions. It will also be allowed to manage your account and profile settings."
|
||||
),
|
||||
type: "warning",
|
||||
icon: "pencil-outline",
|
||||
|
@ -25,134 +25,134 @@ export const scope: Record<
|
|||
"write:event:create": {
|
||||
title: t("Publish events"),
|
||||
text: t(
|
||||
"This application will be allowed to publish events on your behalf"
|
||||
"This application will be allowed to publish events"
|
||||
),
|
||||
icon: "calendar",
|
||||
},
|
||||
"write:event:update": {
|
||||
title: t("Update events"),
|
||||
text: t("This application will be allowed to update events on your behalf"),
|
||||
text: t("This application will be allowed to update events"),
|
||||
icon: "calendar",
|
||||
},
|
||||
"write:event:delete": {
|
||||
title: t("Delete events"),
|
||||
text: t("This application will be allowed to delete events on your behalf"),
|
||||
text: t("This application will be allowed to delete events"),
|
||||
icon: "calendar",
|
||||
},
|
||||
"write:media:upload": {
|
||||
title: t("Upload media"),
|
||||
text: t("This application will be allowed to upload media on your behalf"),
|
||||
text: t("This application will be allowed to upload media"),
|
||||
icon: "image",
|
||||
},
|
||||
"write:media:remove": {
|
||||
title: t("Remove uploaded media"),
|
||||
text: t(
|
||||
"This application will be allowed to remove uploaded media on your behalf"
|
||||
"This application will be allowed to remove uploaded media"
|
||||
),
|
||||
icon: "image",
|
||||
},
|
||||
"write:group:post:create": {
|
||||
title: t("Publish group posts"),
|
||||
text: t(
|
||||
"This application will be allowed to publish group posts on your behalf"
|
||||
"This application will be allowed to publish group posts"
|
||||
),
|
||||
icon: "bullhorn",
|
||||
},
|
||||
"write:group:post:update": {
|
||||
title: t("Update group posts"),
|
||||
text: t(
|
||||
"This application will be allowed to update group posts on your behalf"
|
||||
"This application will be allowed to update group posts"
|
||||
),
|
||||
icon: "bullhorn",
|
||||
},
|
||||
"write:group:post:delete": {
|
||||
title: t("Delete group posts"),
|
||||
text: t(
|
||||
"This application will be allowed to delete group posts on your behalf"
|
||||
"This application will be allowed to delete group posts"
|
||||
),
|
||||
icon: "bullhorn",
|
||||
},
|
||||
"read:group:resources": {
|
||||
title: t("Access your group's resources"),
|
||||
text: t(
|
||||
"This application will be allowed to access all of the groups you're a member of on your behalf"
|
||||
"This application will be allowed to access all of the groups you're a member of"
|
||||
),
|
||||
icon: "link",
|
||||
},
|
||||
"write:group:resources:create": {
|
||||
title: t("Create group resources"),
|
||||
text: t(
|
||||
"This application will be allowed to create resources in all of the groups you're a member of on your behalf"
|
||||
"This application will be allowed to create resources in all of the groups you're a member of"
|
||||
),
|
||||
icon: "link",
|
||||
},
|
||||
"write:group:resources:update": {
|
||||
title: t("Update group resources"),
|
||||
text: t(
|
||||
"This application will be allowed to update resources in all of the groups you're a member of on your behalf"
|
||||
"This application will be allowed to update resources in all of the groups you're a member of"
|
||||
),
|
||||
icon: "link",
|
||||
},
|
||||
"write:group:resources:delete": {
|
||||
title: t("Delete group resources"),
|
||||
text: t(
|
||||
"This application will be allowed to delete resources in all of the groups you're a member of on your behalf"
|
||||
"This application will be allowed to delete resources in all of the groups you're a member of"
|
||||
),
|
||||
icon: "link",
|
||||
},
|
||||
"read:group:events": {
|
||||
title: t("Access group events"),
|
||||
text: t(
|
||||
"This application will be allowed to list and access group events in all of the groups you're a member of on your behalf"
|
||||
"This application will be allowed to list and access group events in all of the groups you're a member of"
|
||||
),
|
||||
icon: "calendar",
|
||||
},
|
||||
"read:group:discussions": {
|
||||
title: t("Access group discussions"),
|
||||
text: t(
|
||||
"This application will be allowed to list and access group discussions in all of the groups you're a member of on your behalf"
|
||||
"This application will be allowed to list and access group discussions in all of the groups you're a member of"
|
||||
),
|
||||
icon: "chat",
|
||||
},
|
||||
"read:group:members": {
|
||||
title: t("Access group members"),
|
||||
text: t(
|
||||
"This application will be allowed to list group members in all of the groups you're a member of on your behalf"
|
||||
"This application will be allowed to list group members in all of the groups you're a member of"
|
||||
),
|
||||
icon: "account-circle",
|
||||
},
|
||||
"read:group:followers": {
|
||||
title: t("Access group followers"),
|
||||
text: t(
|
||||
"This application will be allowed to list group followers in all of the groups you're a member of on your behalf"
|
||||
"This application will be allowed to list group followers in all of the groups you're a member of"
|
||||
),
|
||||
icon: "account-circle",
|
||||
},
|
||||
"read:group:activities": {
|
||||
title: t("Access group activities"),
|
||||
text: t(
|
||||
"This application will be allowed to access group activities in all of the groups you're a member of on your behalf"
|
||||
"This application will be allowed to access group activities in all of the groups you're a member of"
|
||||
),
|
||||
icon: "timeline-text",
|
||||
},
|
||||
"read:group:todo_lists": {
|
||||
title: t("Access group todo-lists"),
|
||||
text: t(
|
||||
"This application will be allowed to list and access group todo-lists in all of the groups you're a member of on your behalf"
|
||||
"This application will be allowed to list and access group todo-lists in all of the groups you're a member of"
|
||||
),
|
||||
icon: "checkbox-marked",
|
||||
},
|
||||
"write:group:group_membership": {
|
||||
title: t("Manage group memberships"),
|
||||
text: t(
|
||||
"This application will be allowed to join and leave groups on your behalf"
|
||||
"This application will be allowed to join and leave groups"
|
||||
),
|
||||
icon: "account-circle",
|
||||
},
|
||||
"write:group:members": {
|
||||
title: t("Manage group members"),
|
||||
text: t(
|
||||
"This application will be allowed to manage group members in all of the groups you're a member of on your behalf"
|
||||
"This application will be allowed to manage group members in all of the groups you're a member of"
|
||||
),
|
||||
icon: "account-circle",
|
||||
},
|
||||
|
@ -171,7 +171,7 @@ export const scope: Record<
|
|||
icon: "account-circle",
|
||||
},
|
||||
"read:profile:memberships": {
|
||||
title: t("Access memberships"),
|
||||
title: t("Access group memberships"),
|
||||
text: t(
|
||||
"This application will be allowed to list and view the groups you're a member of"
|
||||
),
|
||||
|
@ -187,82 +187,82 @@ export const scope: Record<
|
|||
"write:profile:create": {
|
||||
title: t("Create new profiles"),
|
||||
text: t(
|
||||
"This application will be allowed to create new profiles for your account on your behalf"
|
||||
"This application will be allowed to create new profiles for your account"
|
||||
),
|
||||
icon: "account-circle",
|
||||
},
|
||||
"write:profile:update": {
|
||||
title: t("Update profiles"),
|
||||
text: t(
|
||||
"This application will be allowed to update your profiles on your behalf"
|
||||
"This application will be allowed to update your profiles"
|
||||
),
|
||||
icon: "account-circle",
|
||||
},
|
||||
"write:profile:delete": {
|
||||
title: t("Delete profiles"),
|
||||
text: t(
|
||||
"This application will be allowed to delete your profiles on your behalf"
|
||||
"This application will be allowed to delete your profiles"
|
||||
),
|
||||
icon: "account-circle",
|
||||
},
|
||||
"write:comment:create": {
|
||||
title: t("Post comments"),
|
||||
text: t("This application will be allowed to post comments on your behalf"),
|
||||
text: t("This application will be allowed to post comments"),
|
||||
icon: "comment",
|
||||
},
|
||||
"write:comment:update": {
|
||||
title: t("Update comments"),
|
||||
text: t(
|
||||
"This application will be allowed to update comments on your behalf"
|
||||
"This application will be allowed to update comments"
|
||||
),
|
||||
icon: "comment",
|
||||
},
|
||||
"write:comment:delete": {
|
||||
title: t("Delete comments"),
|
||||
text: t(
|
||||
"This application will be allowed to delete comments on your behalf"
|
||||
"This application will be allowed to delete comments"
|
||||
),
|
||||
icon: "comment",
|
||||
},
|
||||
"write:group:discussion:create": {
|
||||
title: t("Create group discussions"),
|
||||
text: t(
|
||||
"This application will be allowed to create group discussions on your behalf"
|
||||
"This application will be allowed to create group discussions"
|
||||
),
|
||||
icon: "comment",
|
||||
},
|
||||
"write:group:discussion:update": {
|
||||
title: t("Update group discussions"),
|
||||
text: t(
|
||||
"This application will be allowed to update group discussions on your behalf"
|
||||
"This application will be allowed to update group discussions"
|
||||
),
|
||||
icon: "comment",
|
||||
},
|
||||
"write:group:discussion:delete": {
|
||||
title: t("Delete group discussions"),
|
||||
text: t(
|
||||
"This application will be allowed to delete group discussions on your behalf"
|
||||
"This application will be allowed to delete group discussions"
|
||||
),
|
||||
icon: "comment",
|
||||
},
|
||||
"write:profile:feed_token:create": {
|
||||
title: t("Create feed tokens"),
|
||||
text: t(
|
||||
"This application will be allowed to create feed tokens on your behalf"
|
||||
"This application will be allowed to create feed tokens"
|
||||
),
|
||||
icon: "rss",
|
||||
},
|
||||
"write:feed_token:delete": {
|
||||
title: t("Delete feed tokens"),
|
||||
text: t(
|
||||
"This application will be allowed to delete feed tokens on your behalf"
|
||||
"This application will be allowed to delete feed tokens"
|
||||
),
|
||||
icon: "rss",
|
||||
},
|
||||
"write:participation": {
|
||||
title: t("Manage event participations"),
|
||||
text: t(
|
||||
"This application will be allowed to manage events participations on your behalf"
|
||||
"This application will be allowed to manage events participations"
|
||||
),
|
||||
icon: "rss",
|
||||
},
|
||||
|
|
|
@ -258,6 +258,8 @@ const icons: Record<string, () => Promise<any>> = {
|
|||
import(`../../../node_modules/vue-material-design-icons/EyeOutline.vue`),
|
||||
PencilOutline: () =>
|
||||
import(`../../../node_modules/vue-material-design-icons/PencilOutline.vue`),
|
||||
Apps: () =>
|
||||
import(`../../../node_modules/vue-material-design-icons/Apps.vue`),
|
||||
};
|
||||
|
||||
const props = withDefaults(
|
||||
|
|
|
@ -54,6 +54,50 @@ export const LIST_GROUPS = gql`
|
|||
${ACTOR_FRAGMENT}
|
||||
`;
|
||||
|
||||
export const GROUP_VERY_BASIC_FIELDS_FRAGMENTS = gql`
|
||||
fragment GroupVeryBasicFields on Group {
|
||||
...ActorFragment
|
||||
suspended
|
||||
visibility
|
||||
openness
|
||||
manuallyApprovesFollowers
|
||||
physicalAddress {
|
||||
description
|
||||
street
|
||||
locality
|
||||
postalCode
|
||||
region
|
||||
country
|
||||
geom
|
||||
type
|
||||
id
|
||||
originId
|
||||
url
|
||||
}
|
||||
avatar {
|
||||
id
|
||||
url
|
||||
name
|
||||
metadata {
|
||||
width
|
||||
height
|
||||
blurhash
|
||||
}
|
||||
}
|
||||
banner {
|
||||
id
|
||||
url
|
||||
name
|
||||
metadata {
|
||||
width
|
||||
height
|
||||
blurhash
|
||||
}
|
||||
}
|
||||
}
|
||||
${ACTOR_FRAGMENT}
|
||||
`;
|
||||
|
||||
export const GROUP_BASIC_FIELDS_FRAGMENTS = gql`
|
||||
fragment GroupBasicFields on Group {
|
||||
...ActorFragment
|
||||
|
@ -296,17 +340,10 @@ export const UPDATE_GROUP = gql`
|
|||
physicalAddress: $physicalAddress
|
||||
manuallyApprovesFollowers: $manuallyApprovesFollowers
|
||||
) {
|
||||
...ActorFragment
|
||||
visibility
|
||||
openness
|
||||
manuallyApprovesFollowers
|
||||
banner {
|
||||
id
|
||||
url
|
||||
}
|
||||
...GroupVeryBasicFields
|
||||
}
|
||||
}
|
||||
${ACTOR_FRAGMENT}
|
||||
${GROUP_VERY_BASIC_FIELDS_FRAGMENTS}
|
||||
`;
|
||||
|
||||
export const DELETE_GROUP = gql`
|
||||
|
|
|
@ -552,7 +552,7 @@
|
|||
"Application": "Application",
|
||||
"In the following context, an application is a software, either provided by the Mobilizon team or by a 3rd-party, used to interact with your instance.": "In the following context, an application is a software, either provided by the Mobilizon team or by a 3rd-party, used to interact with your instance.",
|
||||
"API": "API",
|
||||
"An “application programming interface” or “API” is a communication protocol that allows software components to communicate with each other. The Mobilizon API, for example, can allow third-party software tools to communicate with Mobilizon instances to carry out certain actions, such as posting events on your behalf, automatically and remotely.": "An “application programming interface” or “API” is a communication protocol that allows software components to communicate with each other. The Mobilizon API, for example, can allow third-party software tools to communicate with Mobilizon instances to carry out certain actions, such as posting events on your behalf, automatically and remotely.",
|
||||
"An “application programming interface” or “API” is a communication protocol that allows software components to communicate with each other. The Mobilizon API, for example, can allow third-party software tools to communicate with Mobilizon instances to carry out certain actions, such as posting events, automatically and remotely.": "An “application programming interface” or “API” is a communication protocol that allows software components to communicate with each other. The Mobilizon API, for example, can allow third-party software tools to communicate with Mobilizon instances to carry out certain actions, such as posting events, automatically and remotely.",
|
||||
"SSL/TLS": "SSL/TLS",
|
||||
"Cookies and Local storage": "Cookies and Local storage",
|
||||
"An instance is an installed version of the Mobilizon software running on a server. An instance can be run by anyone using the {mobilizon_software} or other federated apps, aka the “fediverse”. This instance's name is {instance_name}. Mobilizon is a federated network of multiple instances (just like email servers), users registered on different instances may communicate even though they didn't register on the same instance.": "An instance is an installed version of the Mobilizon software running on a server. An instance can be run by anyone using the {mobilizon_software} or other federated apps, aka the “fediverse”. This instance's name is {instance_name}. Mobilizon is a federated network of multiple instances (just like email servers), users registered on different instances may communicate even though they didn't register on the same instance.",
|
||||
|
@ -1455,86 +1455,86 @@
|
|||
"The report contents (eventual comments and event) and the reported profile details will be transmitted to Akismet.": "The report contents (eventual comments and event) and the reported profile details will be transmitted to Akismet.",
|
||||
"Submit to Akismet": "Submit to Akismet",
|
||||
"Autorize this application to access your account?": "Autorize this application to access your account?",
|
||||
"This application will be able to access all of your informations and post content on your behalf. Make sure you only approve applications you trust.": "This application will be able to access all of your informations and post content on your behalf. Make sure you only approve applications you trust.",
|
||||
"This application will be able to access all of your informations and post content. Make sure you only approve applications you trust.": "This application will be able to access all of your informations and post content. Make sure you only approve applications you trust.",
|
||||
"Authorize application": "Authorize application",
|
||||
"Authorize": "Authorize",
|
||||
"You'll be able to revoke access for this application in your account settings.": "You'll be able to revoke access for this application in your account settings.",
|
||||
"Read all of your account's data": "Read all of your account's data",
|
||||
"This application will be allowed to see all of your events organized, the events you participate to, …": "",
|
||||
"Modify all of your account's data": "Modify all of your account's data",
|
||||
"This application will be allowed to publish events on your behalf, participate to events": "",
|
||||
"This application will be allowed to publish events, participate to events": "",
|
||||
"Publish events": "Publish events",
|
||||
"This application will be allowed to publish events on your behalf": "This application will be allowed to publish events on your behalf",
|
||||
"This application will be allowed to publish events": "This application will be allowed to publish events",
|
||||
"Update events": "Update events",
|
||||
"This application will be allowed to update events on your behalf": "This application will be allowed to update events on your behalf",
|
||||
"This application will be allowed to update events": "This application will be allowed to update events",
|
||||
"Delete events": "Delete events",
|
||||
"This application will be allowed to delete events on your behalf": "This application will be allowed to delete events on your behalf",
|
||||
"This application will be allowed to delete events": "This application will be allowed to delete events",
|
||||
"Upload media": "Upload media",
|
||||
"This application will be allowed to upload media on your behalf": "This application will be allowed to upload media on your behalf",
|
||||
"This application will be allowed to upload media": "This application will be allowed to upload media",
|
||||
"Remove uploaded media": "Remove uploaded media",
|
||||
"This application will be allowed to remove uploaded media on your behalf": "This application will be allowed to remove uploaded media on your behalf",
|
||||
"This application will be allowed to remove uploaded media": "This application will be allowed to remove uploaded media",
|
||||
"Publish group posts": "Publish group posts",
|
||||
"This application will be allowed to publish group posts on your behalf": "This application will be allowed to publish group posts on your behalf",
|
||||
"This application will be allowed to publish group posts": "This application will be allowed to publish group posts",
|
||||
"Update group posts": "Update group posts",
|
||||
"This application will be allowed to update group posts on your behalf": "This application will be allowed to update group posts on your behalf",
|
||||
"This application will be allowed to update group posts": "This application will be allowed to update group posts",
|
||||
"Delete group posts": "Delete group posts",
|
||||
"This application will be allowed to delete group posts on your behalf": "This application will be allowed to delete group posts on your behalf",
|
||||
"This application will be allowed to delete group posts": "This application will be allowed to delete group posts",
|
||||
"Access your group's resources": "Access your group's resources",
|
||||
"This application will be allowed to access all of the groups you're a member of on your behalf": "This application will be allowed to access all of the groups you're a member of on your behalf",
|
||||
"This application will be allowed to access all of the groups you're a member of": "This application will be allowed to access all of the groups you're a member of",
|
||||
"Create group resources": "Create group resources",
|
||||
"This application will be allowed to create resources in all of the groups you're a member of on your behalf": "This application will be allowed to create resources in all of the groups you're a member of on your behalf",
|
||||
"This application will be allowed to create resources in all of the groups you're a member of": "This application will be allowed to create resources in all of the groups you're a member of",
|
||||
"Update group resources": "Update group resources",
|
||||
"This application will be allowed to update resources in all of the groups you're a member of on your behalf": "This application will be allowed to update resources in all of the groups you're a member of on your behalf",
|
||||
"This application will be allowed to update resources in all of the groups you're a member of": "This application will be allowed to update resources in all of the groups you're a member of",
|
||||
"Delete group resources": "Delete group resources",
|
||||
"This application will be allowed to delete resources in all of the groups you're a member of on your behalf": "This application will be allowed to delete resources in all of the groups you're a member of on your behalf",
|
||||
"This application will be allowed to delete resources in all of the groups you're a member of": "This application will be allowed to delete resources in all of the groups you're a member of",
|
||||
"Access group events": "Access group events",
|
||||
"This application will be allowed to list and access group events in all of the groups you're a member of on your behalf": "This application will be allowed to list and access group events in all of the groups you're a member of on your behalf",
|
||||
"This application will be allowed to list and access group events in all of the groups you're a member of": "This application will be allowed to list and access group events in all of the groups you're a member of",
|
||||
"Access group discussions": "Access group discussions",
|
||||
"This application will be allowed to list and access group discussions in all of the groups you're a member of on your behalf": "This application will be allowed to list and access group discussions in all of the groups you're a member of on your behalf",
|
||||
"This application will be allowed to list and access group discussions in all of the groups you're a member of": "This application will be allowed to list and access group discussions in all of the groups you're a member of",
|
||||
"Access group members": "Access group members",
|
||||
"This application will be allowed to list group members in all of the groups you're a member of on your behalf": "This application will be allowed to list group members in all of the groups you're a member of on your behalf",
|
||||
"This application will be allowed to list group members in all of the groups you're a member of": "This application will be allowed to list group members in all of the groups you're a member of",
|
||||
"Access group followers": "Access group followers",
|
||||
"This application will be allowed to list group followers in all of the groups you're a member of on your behalf": "This application will be allowed to list group followers in all of the groups you're a member of on your behalf",
|
||||
"This application will be allowed to list group followers in all of the groups you're a member of": "This application will be allowed to list group followers in all of the groups you're a member of",
|
||||
"Access group activities": "Access group activities",
|
||||
"This application will be allowed to access group activities in all of the groups you're a member of on your behalf": "This application will be allowed to access group activities in all of the groups you're a member of on your behalf",
|
||||
"This application will be allowed to access group activities in all of the groups you're a member of": "This application will be allowed to access group activities in all of the groups you're a member of",
|
||||
"Access group todo-lists": "Access group todo-lists",
|
||||
"This application will be allowed to list and access group todo-lists in all of the groups you're a member of on your behalf": "This application will be allowed to list and access group todo-lists in all of the groups you're a member of on your behalf",
|
||||
"This application will be allowed to list and access group todo-lists in all of the groups you're a member of": "This application will be allowed to list and access group todo-lists in all of the groups you're a member of",
|
||||
"Manage group memberships": "Manage group memberships",
|
||||
"This application will be allowed to join and leave groups on your behalf": "This application will be allowed to join and leave groups on your behalf",
|
||||
"This application will be allowed to join and leave groups": "This application will be allowed to join and leave groups",
|
||||
"Manage group members": "Manage group members",
|
||||
"This application will be allowed to manage group members in all of the groups you're a member of on your behalf": "This application will be allowed to manage group members in all of the groups you're a member of on your behalf",
|
||||
"This application will be allowed to manage group members in all of the groups you're a member of": "This application will be allowed to manage group members in all of the groups you're a member of",
|
||||
"Access organized events": "Access organized events",
|
||||
"This application will be allowed to list and view your organized events": "This application will be allowed to list and view your organized events",
|
||||
"Access participations": "Access participations",
|
||||
"This application will be allowed to list and view the events you're participating to": "This application will be allowed to list and view the events you're participating to",
|
||||
"Access memberships": "Access memberships",
|
||||
"Access group memberships": "Access group memberships",
|
||||
"This application will be allowed to list and view the groups you're a member of": "This application will be allowed to list and view the groups you're a member of",
|
||||
"Access followed groups": "Access followed groups",
|
||||
"This application will be allowed to list and view the groups you're following": "This application will be allowed to list and view the groups you're following",
|
||||
"Create new profiles": "Create new profiles",
|
||||
"This application will be allowed to create new profiles for your account on your behalf": "This application will be allowed to create new profiles for your account on your behalf",
|
||||
"This application will be allowed to create new profiles for your account": "This application will be allowed to create new profiles for your account",
|
||||
"Update profiles": "Update profiles",
|
||||
"This application will be allowed to update your profiles on your behalf": "This application will be allowed to update your profiles on your behalf",
|
||||
"This application will be allowed to update your profiles": "This application will be allowed to update your profiles",
|
||||
"Delete profiles": "Delete profiles",
|
||||
"This application will be allowed to delete your profiles on your behalf": "This application will be allowed to delete your profiles on your behalf",
|
||||
"This application will be allowed to delete your profiles": "This application will be allowed to delete your profiles",
|
||||
"Post comments": "Post comments",
|
||||
"This application will be allowed to post comments on your behalf": "This application will be allowed to post comments on your behalf",
|
||||
"This application will be allowed to post comments": "This application will be allowed to post comments",
|
||||
"Update comments": "Update comments",
|
||||
"This application will be allowed to update comments on your behalf": "This application will be allowed to update comments on your behalf",
|
||||
"This application will be allowed to update comments": "This application will be allowed to update comments",
|
||||
"Delete comments": "Delete comments",
|
||||
"This application will be allowed to delete comments on your behalf": "This application will be allowed to delete comments on your behalf",
|
||||
"This application will be allowed to delete comments": "This application will be allowed to delete comments",
|
||||
"Create group discussions": "Create group discussions",
|
||||
"This application will be allowed to create group discussions on your behalf": "This application will be allowed to create group discussions on your behalf",
|
||||
"This application will be allowed to create group discussions": "This application will be allowed to create group discussions",
|
||||
"Update group discussions": "Update group discussions",
|
||||
"This application will be allowed to update group discussions on your behalf": "This application will be allowed to update group discussions on your behalf",
|
||||
"This application will be allowed to update group discussions": "This application will be allowed to update group discussions",
|
||||
"Delete group discussions": "Delete group discussions",
|
||||
"This application will be allowed to delete group discussions on your behalf": "This application will be allowed to delete group discussions on your behalf",
|
||||
"This application will be allowed to delete group discussions": "This application will be allowed to delete group discussions",
|
||||
"Create feed tokens": "Create feed tokens",
|
||||
"This application will be allowed to create feed tokens on your behalf": "This application will be allowed to create feed tokens on your behalf",
|
||||
"This application will be allowed to create feed tokens": "This application will be allowed to create feed tokens",
|
||||
"Delete feed tokens": "Delete feed tokens",
|
||||
"This application will be allowed to delete feed tokens on your behalf": "This application will be allowed to delete feed tokens on your behalf",
|
||||
"This application will be allowed to delete feed tokens": "This application will be allowed to delete feed tokens",
|
||||
"Manage event participations": "Manage event participations",
|
||||
"This application will be allowed to manage events participations on your behalf": "This application will be allowed to manage events participations on your behalf",
|
||||
"This application will be allowed to manage events participations": "This application will be allowed to manage events participations",
|
||||
"Manage activity settings": "Manage activity settings",
|
||||
"This application will be allowed to manage your account activity settings": "This application will be allowed to manage your account activity settings",
|
||||
"Manage push notification settings": "Manage push notification settings",
|
||||
|
@ -1544,7 +1544,7 @@
|
|||
"Application not found": "Application not found",
|
||||
"The provided application was not found.": "The provided application was not found.",
|
||||
"Your application code": "Your application code",
|
||||
"You need to provide the following code to your application": "You need to provide the following code to your application",
|
||||
"You need to provide the following code to your application. It will only be valid for a few minutes.": "You need to provide the following code to your application. It will only be valid for a few minutes.",
|
||||
"Enter the code displayed on your device": "Enter the code displayed on your device",
|
||||
"Continue": "Continue",
|
||||
"The device code is incorrect or no longer valid.": "The device code is incorrect or no longer valid.",
|
||||
|
@ -1553,5 +1553,15 @@
|
|||
"Never used": "Never used",
|
||||
"Authorized on {authorization_date}": "Authorized on {authorization_date}",
|
||||
"Revoke": "Revoke",
|
||||
"Application was revoked": "Application was revoked"
|
||||
"Application was revoked": "Application was revoked",
|
||||
"Create a new metadata element": "Create a new metadata element",
|
||||
"You can put any arbitrary content in this element. URLs will be clickable.": "You can put any arbitrary content in this element. URLs will be clickable.",
|
||||
"You can try another search term or add the address details manually below.": "You can try another search term or add the address details manually below.",
|
||||
"Manually enter address": "Manually enter address",
|
||||
"You can drag and drop the marker below to the desired location": "You can drag and drop the marker below to the desired location",
|
||||
"This application didn't ask for known permissions. It's likely the request is incorrect.": "This application didn't ask for known permissions. It's likely the request is incorrect.",
|
||||
"This application asks for the following permissions:": "This application asks for the following permissions:",
|
||||
"This application will be allowed to see all of your events organized, the events you participate to, as well as every data from your groups.": "This application will be allowed to see all of your events organized, the events you participate to, as well as every data from your groups.",
|
||||
"This application will be allowed to publish and manage events, post and manage comments, participate to events, manage all of your groups, including group events, resources, posts and discussions. It will also be allowed to manage your account and profile settings.": "This application will be allowed to publish and manage events, post and manage comments, participate to events, manage all of your groups, including group events, resources, posts and discussions. It will also be allowed to manage your account and profile settings.",
|
||||
"No apps authorized yet": "No apps authorized yet"
|
||||
}
|
|
@ -99,7 +99,7 @@
|
|||
"An event from one of my groups has been published": "Un événement d'un de mes groupes a été publié",
|
||||
"An event from one of my groups has been updated or deleted": "Un événement d'un de mes groupes a été mis à jour ou supprimé",
|
||||
"An instance is an installed version of the Mobilizon software running on a server. An instance can be run by anyone using the {mobilizon_software} or other federated apps, aka the “fediverse”. This instance's name is {instance_name}. Mobilizon is a federated network of multiple instances (just like email servers), users registered on different instances may communicate even though they didn't register on the same instance.": "Une instance est une version du logiciel Mobilizon fonctionnant sur un serveur. Une instance peut être gérée par n'importe qui avec le {mobilizon_software} ou d'autres applications fédérées, correspondant au « fediverse ». Cette instance se nomme {instance_name}. Mobilizon est un réseau fédéré de multiples instances (tout comme des serveurs email), des utilisateur·rice·s inscrites sur différentes instances peuvent communiquer bien qu'il·elle·s ne se soient pas enregistré·e·s sur la même instance.",
|
||||
"An “application programming interface” or “API” is a communication protocol that allows software components to communicate with each other. The Mobilizon API, for example, can allow third-party software tools to communicate with Mobilizon instances to carry out certain actions, such as posting events on your behalf, automatically and remotely.": "Une « interface de programmation d'application » ou « API » est un protocole de communication qui permet à des composants logiciels de communiquer entre eux. L'API de Mobilizon, par exemple, peut permettre à des outils logiciels tiers de communiquer avec des instances de Mobilizon pour effectuer certaines actions, comme la publication d'événements en votre nom, automatiquement et à distance.",
|
||||
"An “application programming interface” or “API” is a communication protocol that allows software components to communicate with each other. The Mobilizon API, for example, can allow third-party software tools to communicate with Mobilizon instances to carry out certain actions, such as posting events, automatically and remotely.": "Une « interface de programmation d'application » ou « API » est un protocole de communication qui permet à des composants logiciels de communiquer entre eux. L'API de Mobilizon, par exemple, peut permettre à des outils logiciels tiers de communiquer avec des instances de Mobilizon pour effectuer certaines actions, comme la publication d'événements, automatiquement et à distance.",
|
||||
"And {number} comments": "Et {number} commentaires",
|
||||
"Announcements and mentions notifications are always sent straight away.": "Les notifications d'annonces et de mentions sont toujours envoyées directement.",
|
||||
"Anonymous participant": "Participant⋅e anonyme",
|
||||
|
@ -1453,101 +1453,111 @@
|
|||
"{user}'s follow request was rejected": "La demande de suivi de {user} a été rejetée",
|
||||
"© The OpenStreetMap Contributors": "© Les Contributeur⋅ices OpenStreetMap",
|
||||
"Autorize this application to access your account?": "Autoriser cette application à accéder à votre compte ?",
|
||||
"This application will be able to access all of your informations and post content on your behalf. Make sure you only approve applications you trust.": "Cette application sera capable d'accéder à toutes vos informations et poster du contenu en votre nom. Assurez-vous d'approuver uniquement des applications en lesquelles vous avez confiance.",
|
||||
"This application will be able to access all of your informations and post content. Make sure you only approve applications you trust.": "Cette application sera capable d'accéder à toutes vos informations et poster du contenu. Assurez-vous d'approuver uniquement des applications en lesquelles vous avez confiance.",
|
||||
"Authorize application": "Autoriser l'application",
|
||||
"Authorize": "Autoriser",
|
||||
"You'll be able to revoke access for this application in your account settings.": "Vous pourrez révoquer l'accès pour cette applications dans les paramètres de votre compte.",
|
||||
"Read all of your account's data": "Lire toutes les données de votre compte",
|
||||
"Modify all of your account's data": "Modifier toutes les données de votre compte",
|
||||
"Publish events": "Publier des événements",
|
||||
"This application will be allowed to publish events on your behalf": "Cette application pourra publier des événements en votre nom",
|
||||
"Update events": "Update events",
|
||||
"This application will be allowed to update events on your behalf": "Cette application pourra mettre à jour des événements en votre nom",
|
||||
"Delete events": "Delete events",
|
||||
"This application will be allowed to delete events on your behalf": "Cette application pourra supprimer des événements en votre nom",
|
||||
"Upload media": "Upload media",
|
||||
"This application will be allowed to upload media on your behalf": "Cette application pourra téléverser des médias en votre nom",
|
||||
"Remove uploaded media": "Remove uploaded media",
|
||||
"This application will be allowed to remove uploaded media on your behalf": "Cette application pourra supprimer des médias téléversés en votre nom",
|
||||
"Publish group posts": "Publish group posts",
|
||||
"This application will be allowed to publish group posts on your behalf": "Cette application pourra publier des billets de groupes en votre nom",
|
||||
"Update group posts": "Update group posts",
|
||||
"This application will be allowed to update group posts on your behalf": "Cette application pourra mettre à jour des billets de groupes en votre nom",
|
||||
"Delete group posts": "Delete group posts",
|
||||
"This application will be allowed to delete group posts on your behalf": "Cette application pourra supprimer des billets de groupes en votre nom",
|
||||
"Access your group's resources": "Access your group's resources",
|
||||
"This application will be allowed to access all of the groups you're a member of on your behalf": "Cette application pourra accéder à tous les groupes dont vous êtes membres",
|
||||
"Create group resources": "Create group resources",
|
||||
"This application will be allowed to create resources in all of the groups you're a member of on your behalf": "Cette application pourra créer des ressources dans chacun des groupes dont vous êtes membre en votre nom",
|
||||
"Update group resources": "Update group resources",
|
||||
"This application will be allowed to update resources in all of the groups you're a member of on your behalf": "Cette application pourra mettre à jour des ressources dans chacun des groupes dont vous êtes membre en votre nom",
|
||||
"Delete group resources": "Delete group resources",
|
||||
"This application will be allowed to delete resources in all of the groups you're a member of on your behalf": "Cette application pourra supprimer des ressources dans chacun des groupes dont vous êtes membre en votre nom",
|
||||
"Access group events": "Access group events",
|
||||
"This application will be allowed to list and access group events in all of the groups you're a member of on your behalf": "Cette application pourra lister et accéder aux événements des groupes dont vous êtes membre",
|
||||
"Access group discussions": "Access group discussions",
|
||||
"This application will be allowed to list and access group discussions in all of the groups you're a member of on your behalf": "This application will be allowed to list and access group discussions in all of the groups you're a member of on your behalf",
|
||||
"Access group members": "Access group members",
|
||||
"This application will be allowed to list group members in all of the groups you're a member of on your behalf": "This application will be allowed to list group members in all of the groups you're a member of on your behalf",
|
||||
"Access group followers": "Access group followers",
|
||||
"This application will be allowed to list group followers in all of the groups you're a member of on your behalf": "This application will be allowed to list group followers in all of the groups you're a member of on your behalf",
|
||||
"Access group activities": "Access group activities",
|
||||
"This application will be allowed to access group activities in all of the groups you're a member of on your behalf": "This application will be allowed to access group activities in all of the groups you're a member of on your behalf",
|
||||
"Access group todo-lists": "Access group todo-lists",
|
||||
"This application will be allowed to list and access group todo-lists in all of the groups you're a member of on your behalf": "This application will be allowed to list and access group todo-lists in all of the groups you're a member of on your behalf",
|
||||
"Manage group memberships": "Manage group memberships",
|
||||
"This application will be allowed to join and leave groups on your behalf": "This application will be allowed to join and leave groups on your behalf",
|
||||
"Manage group members": "Manage group members",
|
||||
"This application will be allowed to manage group members in all of the groups you're a member of on your behalf": "This application will be allowed to manage group members in all of the groups you're a member of on your behalf",
|
||||
"Access organized events": "Access organized events",
|
||||
"This application will be allowed to publish events": "Cette application pourra publier des événements",
|
||||
"Update events": "Mettre à jour des événements",
|
||||
"This application will be allowed to update events": "Cette application pourra mettre à jour des événements",
|
||||
"Delete events": "Supprimer des événements",
|
||||
"This application will be allowed to delete events": "Cette application pourra supprimer des événements",
|
||||
"Upload media": "Téléverser des médias",
|
||||
"This application will be allowed to upload media": "Cette application pourra téléverser des médias",
|
||||
"Remove uploaded media": "Supprimer des médias téléversés",
|
||||
"This application will be allowed to remove uploaded media": "Cette application pourra supprimer des médias téléversés",
|
||||
"Publish group posts": "Publier des billets de groupes",
|
||||
"This application will be allowed to publish group posts": "Cette application pourra publier des billets de groupes",
|
||||
"Update group posts": "Mettre à jour des billets de groupes",
|
||||
"This application will be allowed to update group posts": "Cette application pourra mettre à jour des billets de groupes",
|
||||
"Delete group posts": "Supprimer des billets de groupes",
|
||||
"This application will be allowed to delete group posts": "Cette application pourra supprimer des billets de groupes",
|
||||
"Access your group's resources": "Accéder aux ressources de vos groupes",
|
||||
"This application will be allowed to access all of the groups you're a member of": "Cette application pourra accéder à tous les groupes dont vous êtes membres",
|
||||
"Create group resources": "Créer des ressources de groupes",
|
||||
"This application will be allowed to create resources in all of the groups you're a member of": "Cette application pourra créer des ressources dans chacun des groupes dont vous êtes membre",
|
||||
"Update group resources": "Mettre à jour des ressources de groupes",
|
||||
"This application will be allowed to update resources in all of the groups you're a member of": "Cette application pourra mettre à jour des ressources dans chacun des groupes dont vous êtes membre",
|
||||
"Delete group resources": "Supprimer des ressources de groupes",
|
||||
"This application will be allowed to delete resources in all of the groups you're a member of": "Cette application pourra supprimer des ressources dans chacun des groupes dont vous êtes membre",
|
||||
"Access group events": "Accéder aux événements des groupes",
|
||||
"This application will be allowed to list and access group events in all of the groups you're a member of": "Cette application pourra lister et accéder aux événements des groupes dont vous êtes membre",
|
||||
"Access group discussions": "Accéder aux discussions des groupes",
|
||||
"This application will be allowed to list and access group discussions in all of the groups you're a member of": "This application will be allowed to list and access group discussions in all of the groups you're a member of",
|
||||
"Access group members": "Accéder à la liste des membres des groupes",
|
||||
"This application will be allowed to list group members in all of the groups you're a member of": "This application will be allowed to list group members in all of the groups you're a member of",
|
||||
"Access group followers": "Accéder à la liste des abonnés des groupes",
|
||||
"This application will be allowed to list group followers in all of the groups you're a member of": "This application will be allowed to list group followers in all of the groups you're a member of",
|
||||
"Access group activities": "Accéder aux activités des groupes",
|
||||
"This application will be allowed to access group activities in all of the groups you're a member of": "This application will be allowed to access group activities in all of the groups you're a member of",
|
||||
"Access group todo-lists": "Accéder aux listes de tâches des groupes",
|
||||
"This application will be allowed to list and access group todo-lists in all of the groups you're a member of": "This application will be allowed to list and access group todo-lists in all of the groups you're a member of",
|
||||
"Manage group memberships": "Gérer vos adhésions à des groupes",
|
||||
"This application will be allowed to join and leave groups": "This application will be allowed to join and leave groups",
|
||||
"Manage group members": "Gérer les membres des groupes",
|
||||
"This application will be allowed to manage group members in all of the groups you're a member of": "This application will be allowed to manage group members in all of the groups you're a member of",
|
||||
"Access organized events": "Accéder à la liste de vos événements organisés",
|
||||
"This application will be allowed to list and view your organized events": "This application will be allowed to list and view your organized events",
|
||||
"Access participations": "Access participations",
|
||||
"Access participations": "Accéder à la liste de vos participations",
|
||||
"This application will be allowed to list and view the events you're participating to": "This application will be allowed to list and view the events you're participating to",
|
||||
"Access memberships": "Access memberships",
|
||||
"Access group memberships": "Accéder à la liste de vos adhésions à des groupes",
|
||||
"This application will be allowed to list and view the groups you're a member of": "This application will be allowed to list and view the groups you're a member of",
|
||||
"Access followed groups": "Access followed groups",
|
||||
"Access followed groups": "Accéder à la liste des groupes suivis",
|
||||
"This application will be allowed to list and view the groups you're following": "This application will be allowed to list and view the groups you're following",
|
||||
"Create new profiles": "Create new profiles",
|
||||
"This application will be allowed to create new profiles for your account on your behalf": "This application will be allowed to create new profiles for your account on your behalf",
|
||||
"Update profiles": "Update profiles",
|
||||
"This application will be allowed to update your profiles on your behalf": "This application will be allowed to update your profiles on your behalf",
|
||||
"Delete profiles": "Delete profiles",
|
||||
"This application will be allowed to delete your profiles on your behalf": "This application will be allowed to delete your profiles on your behalf",
|
||||
"Post comments": "Post comments",
|
||||
"This application will be allowed to post comments on your behalf": "This application will be allowed to post comments on your behalf",
|
||||
"Update comments": "Update comments",
|
||||
"This application will be allowed to update comments on your behalf": "This application will be allowed to update comments on your behalf",
|
||||
"Delete comments": "Delete comments",
|
||||
"This application will be allowed to delete comments on your behalf": "This application will be allowed to delete comments on your behalf",
|
||||
"Create group discussions": "Create group discussions",
|
||||
"This application will be allowed to create group discussions on your behalf": "This application will be allowed to create group discussions on your behalf",
|
||||
"Update group discussions": "Update group discussions",
|
||||
"This application will be allowed to update group discussions on your behalf": "This application will be allowed to update group discussions on your behalf",
|
||||
"Delete group discussions": "Delete group discussions",
|
||||
"This application will be allowed to delete group discussions on your behalf": "This application will be allowed to delete group discussions on your behalf",
|
||||
"Create feed tokens": "Create feed tokens",
|
||||
"This application will be allowed to create feed tokens on your behalf": "This application will be allowed to create feed tokens on your behalf",
|
||||
"Delete feed tokens": "Delete feed tokens",
|
||||
"This application will be allowed to delete feed tokens on your behalf": "This application will be allowed to delete feed tokens on your behalf",
|
||||
"Manage event participations": "Manage event participations",
|
||||
"This application will be allowed to manage events participations on your behalf": "This application will be allowed to manage events participations on your behalf",
|
||||
"Manage activity settings": "Manage activity settings",
|
||||
"This application will be allowed to manage your account activity settings": "This application will be allowed to manage your account activity settings",
|
||||
"Manage push notification settings": "Manage push notification settings",
|
||||
"This application will be allowed to manage your account push notification settings": "This application will be allowed to manage your account push notification settings",
|
||||
"Apps": "Apps",
|
||||
"Device activation": "Device activation",
|
||||
"Application not found": "Application not found",
|
||||
"The provided application was not found.": "The provided application was not found.",
|
||||
"Your application code": "Your application code",
|
||||
"You need to provide the following code to your application": "You need to provide the following code to your application",
|
||||
"Enter the code displayed on your device": "Enter the code displayed on your device",
|
||||
"Continue": "Continue",
|
||||
"The device code is incorrect or no longer valid.": "The device code is incorrect or no longer valid.",
|
||||
"These apps can access your account through the API. If you see here apps that you don't recognize, that don't work as expected or that you don't use anymore, you can revoke their access.": "These apps can access your account through the API. If you see here apps that you don't recognize, that don't work as expected or that you don't use anymore, you can revoke their access.",
|
||||
"Last used on {last_used_date}": "Last used on {last_used_date}",
|
||||
"Never used": "Never used",
|
||||
"Authorized on {authorization_date}": "Authorized on {authorization_date}",
|
||||
"Revoke": "Revoke",
|
||||
"Application was revoked": "Application was revoked"
|
||||
"Create new profiles": "Créer des nouveaux profils",
|
||||
"This application will be allowed to create new profiles for your account": "This application will be allowed to create new profiles for your account",
|
||||
"Update profiles": "Mettre à jour des profils",
|
||||
"This application will be allowed to update your profiles": "This application will be allowed to update your profiles",
|
||||
"Delete profiles": "Supprimer des profils",
|
||||
"This application will be allowed to delete your profiles": "This application will be allowed to delete your profiles",
|
||||
"Post comments": "Poster des commentaires",
|
||||
"This application will be allowed to post comments": "This application will be allowed to post comments",
|
||||
"Update comments": "Mettre à jour des commentaires",
|
||||
"This application will be allowed to update comments": "This application will be allowed to update comments",
|
||||
"Delete comments": "Supprimer des commentaires",
|
||||
"This application will be allowed to delete comments": "This application will be allowed to delete comments",
|
||||
"Create group discussions": "Créer des discussions de groupes",
|
||||
"This application will be allowed to create group discussions": "This application will be allowed to create group discussions",
|
||||
"Update group discussions": "Mettre à jour des discussions de groupes",
|
||||
"This application will be allowed to update group discussions": "This application will be allowed to update group discussions",
|
||||
"Delete group discussions": "Supprimer des discussions de groupes",
|
||||
"This application will be allowed to delete group discussions": "This application will be allowed to delete group discussions",
|
||||
"Create feed tokens": "Créer des jetons de flux",
|
||||
"This application will be allowed to create feed tokens": "This application will be allowed to create feed tokens",
|
||||
"Delete feed tokens": "Supprimer les jetons de flux",
|
||||
"This application will be allowed to delete feed tokens": "This application will be allowed to delete feed tokens",
|
||||
"Manage event participations": "Gérer les participations aux événements",
|
||||
"This application will be allowed to manage events participations": "Cette application sera autorisée à gérer vos participations à des événements",
|
||||
"Manage activity settings": "Gérer les paramètres d'activité",
|
||||
"This application will be allowed to manage your account activity settings": "Cette application sera autorisée à gérer vos paramètres d'activité",
|
||||
"Manage push notification settings": "Gérer les paramètres de notification push",
|
||||
"This application will be allowed to manage your account push notification settings": "Cette application sera autorisée à gérer vos paramètres de notification push",
|
||||
"Apps": "Applications",
|
||||
"Device activation": "Activation de l'appareil",
|
||||
"Application not found": "Application non trouvée",
|
||||
"The provided application was not found.": "L'application fournie n'a pas été trouvée.",
|
||||
"Your application code": "Votre code d'application",
|
||||
"You need to provide the following code to your application. It will only be valid for a few minutes.": "Vous devez fournir le code suivant à votre application. Il sera seulement valide pendant quelques minutes.",
|
||||
"Enter the code displayed on your device": "Saisissez le code affiché sur votre appareil",
|
||||
"Continue": "Continuer",
|
||||
"The device code is incorrect or no longer valid.": "Le code de l'appareil est incorrect ou n'est plus valide.",
|
||||
"These apps can access your account through the API. If you see here apps that you don't recognize, that don't work as expected or that you don't use anymore, you can revoke their access.": "Ces applications peuvent accéder à votre compte via l'API. Si vous voyez ici des applications que vous ne reconnaissez pas, qui ne fonctionnent pas comme prévu ou que vous n'utilisez plus, vous pouvez révoquer leur accès.",
|
||||
"Last used on {last_used_date}": "Utilisée pour la dernière fois le {last_used_date}",
|
||||
"Never used": "Jamais utilisée",
|
||||
"Authorized on {authorization_date}": "Authorisée le {authorization_date}",
|
||||
"Revoke": "Révoquer",
|
||||
"Application was revoked": "L'application a été révoquée",
|
||||
"Create a new metadata element": "Créer un nouvel élément de métadonnées",
|
||||
"You can put any arbitrary content in this element. URLs will be clickable.": "Vous pouvez placer n'importe quel contenu arbitraire dans cet élément. Les URL seront cliquables.",
|
||||
"You can try another search term or add the address details manually below.": "Vous pouvez essayer un autre terme de recherche ou ajouter manuellement les détails de l'adresse ci-dessous.",
|
||||
"Manually enter address": "Saisir manuellement l'adresse",
|
||||
"You can drag and drop the marker below to the desired location": "Vous pouvez faire glisser et déposer le marqueur ci-dessous à l'endroit souhaité",
|
||||
"This application didn't ask for known permissions. It's likely the request is incorrect.": "Cette application n'a pas demandé d'autorisations connues. Il est probable que la demande soit incorrecte.",
|
||||
"This application asks for the following permissions:": "Cette application demande les autorisations suivantes :",
|
||||
"This application will be allowed to see all of your events organized, the events you participate to, as well as every data from your groups.": "Cette application vous permettra de voir tous les événements que vous avez organisés, les événements auxquels vous participez, ainsi que toutes les données de vos groupes.",
|
||||
"This application will be allowed to publish and manage events, post and manage comments, participate to events, manage all of your groups, including group events, resources, posts and discussions. It will also be allowed to manage your account and profile settings.": "Cette application sera autorisée à publier et à gérer des événements, à publier et à gérer des commentaires, à participer à des événements, à gérer tous vos groupes, y compris les événements de groupe, les ressources, les messages et les discussions. Elle pourra également gérer les paramètres de votre compte et de votre profil.",
|
||||
"No apps authorized yet": "Aucune application autorisée pour le moment"
|
||||
}
|
||||
|
|
|
@ -93,7 +93,10 @@ export function addressToPoiInfos(address: IAddress): IPoiInfo {
|
|||
switch (addressType) {
|
||||
case "house":
|
||||
name = address.description;
|
||||
alternativeName = [address.postalCode, address.locality, address.country]
|
||||
alternativeName = (
|
||||
address.description !== address.street ? [address.street] : []
|
||||
)
|
||||
.concat([address.postalCode, address.locality, address.country])
|
||||
.filter((zone) => zone)
|
||||
.join(", ");
|
||||
poiIcon = poiIcons.defaultAddress;
|
||||
|
@ -123,8 +126,11 @@ export function addressToPoiInfos(address: IAddress): IPoiInfo {
|
|||
alternativeName = "";
|
||||
if (address.street && address.street.trim()) {
|
||||
alternativeName = `${address.street}`;
|
||||
if (address.postalCode) {
|
||||
alternativeName += `, ${address.postalCode}`;
|
||||
}
|
||||
if (address.locality) {
|
||||
alternativeName += ` (${address.locality})`;
|
||||
alternativeName += `, ${address.locality}`;
|
||||
}
|
||||
} else if (address.locality && address.locality.trim()) {
|
||||
alternativeName = `${address.locality}, ${address.region}, ${address.country}`;
|
||||
|
@ -158,3 +164,19 @@ export function addressFullName(address: IAddress): string {
|
|||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
export function resetAddress(address: IAddress): void {
|
||||
address.id = undefined;
|
||||
address.description = "";
|
||||
address.street = "";
|
||||
address.locality = "";
|
||||
address.postalCode = "";
|
||||
address.region = "";
|
||||
address.country = "";
|
||||
address.type = "";
|
||||
address.geom = undefined;
|
||||
address.url = undefined;
|
||||
address.originId = undefined;
|
||||
address.timezone = undefined;
|
||||
address.pictureInfo = undefined;
|
||||
}
|
||||
|
|
|
@ -612,59 +612,6 @@ const FullAddressAutoComplete = defineAsyncComponent(
|
|||
() => import("@/components/Event/FullAddressAutoComplete.vue")
|
||||
);
|
||||
|
||||
// apollo: {
|
||||
// config: CONFIG_EDIT_EVENT,
|
||||
// event: {
|
||||
// query: FETCH_EVENT,
|
||||
// variables() {
|
||||
// return {
|
||||
// uuid: this.eventId,
|
||||
// };
|
||||
// },
|
||||
// update(data) {
|
||||
// let event = data.event;
|
||||
// if (this.isDuplicate) {
|
||||
// event = { ...event, organizerActor: this.currentActor };
|
||||
// }
|
||||
// return new EventModel(event);
|
||||
// },
|
||||
// skip() {
|
||||
// return !this.eventId;
|
||||
// },
|
||||
// },
|
||||
// person: {
|
||||
// query: PERSON_STATUS_GROUP,
|
||||
// fetchPolicy: "cache-and-network",
|
||||
// variables() {
|
||||
// return {
|
||||
// id: this.currentActor.id,
|
||||
// group: usernameWithDomain(this.event?.attributedTo),
|
||||
// };
|
||||
// },
|
||||
// skip() {
|
||||
// return (
|
||||
// !this.event?.attributedTo ||
|
||||
// !this.event?.attributedTo?.preferredUsername
|
||||
// );
|
||||
// },
|
||||
// },
|
||||
// group: {
|
||||
// query: FETCH_GROUP_PUBLIC,
|
||||
// fetchPolicy: "cache-and-network",
|
||||
// variables() {
|
||||
// return {
|
||||
// name: this.event?.attributedTo?.preferredUsername,
|
||||
// };
|
||||
// },
|
||||
// skip() {
|
||||
// return (
|
||||
// !this.event?.attributedTo ||
|
||||
// !this.event?.attributedTo?.preferredUsername
|
||||
// );
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
|
||||
const { t } = useI18n({ useScope: "global" });
|
||||
|
||||
useHead({
|
||||
|
@ -689,7 +636,6 @@ const unmodifiedEvent = ref<IEditableEvent>(new EventModel());
|
|||
|
||||
const pictureFile = ref<File | null>(null);
|
||||
|
||||
// const canPromote = ref(true);
|
||||
const limitedPlaces = ref(false);
|
||||
const showFixedNavbar = ref(true);
|
||||
|
||||
|
@ -1051,6 +997,7 @@ const buildVariables = async () => {
|
|||
res.picture = { mediaId: event.value?.picture.id };
|
||||
}
|
||||
}
|
||||
console.debug("builded variables", res);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
|
|
|
@ -369,7 +369,10 @@ const currentAddress = computed({
|
|||
},
|
||||
set(address: IAddress) {
|
||||
if (editableGroup.value) {
|
||||
editableGroup.value.physicalAddress = address;
|
||||
editableGroup.value = {
|
||||
...editableGroup.value,
|
||||
physicalAddress: address,
|
||||
};
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
|
@ -21,49 +21,56 @@
|
|||
)
|
||||
}}
|
||||
</p>
|
||||
<div
|
||||
class="flex justify-between items-center rounded-lg bg-white shadow-xl my-6"
|
||||
v-for="authAuthorizedApplication in authAuthorizedApplications"
|
||||
:key="authAuthorizedApplication.id"
|
||||
>
|
||||
<div class="p-4">
|
||||
<p class="text-3xl font-bold">
|
||||
{{ authAuthorizedApplication.application.name }}
|
||||
</p>
|
||||
<a
|
||||
v-if="authAuthorizedApplication.application.website"
|
||||
target="_blank"
|
||||
:href="authAuthorizedApplication.application.website"
|
||||
>{{
|
||||
urlToHostname(authAuthorizedApplication.application.website)
|
||||
}}</a
|
||||
>
|
||||
<p>
|
||||
<span v-if="authAuthorizedApplication.lastUsedAt">{{
|
||||
t("Last used on {last_used_date}", {
|
||||
last_used_date: formatDateString(
|
||||
authAuthorizedApplication.lastUsedAt
|
||||
),
|
||||
})
|
||||
}}</span>
|
||||
<span v-else>{{ t("Never used") }}</span> ⋅
|
||||
{{
|
||||
t("Authorized on {authorization_date}", {
|
||||
authorization_date: formatDateString(
|
||||
authAuthorizedApplication.insertedAt
|
||||
),
|
||||
})
|
||||
}}
|
||||
</p>
|
||||
</div>
|
||||
<div class="p-4">
|
||||
<o-button
|
||||
@click="() => revoke({ appTokenId: authAuthorizedApplication.id })"
|
||||
variant="danger"
|
||||
>{{ t("Revoke") }}</o-button
|
||||
>
|
||||
<div v-if="authAuthorizedApplications.length > 0">
|
||||
<div
|
||||
class="flex justify-between items-center rounded-lg bg-white shadow-xl my-6"
|
||||
v-for="authAuthorizedApplication in authAuthorizedApplications"
|
||||
:key="authAuthorizedApplication.id"
|
||||
>
|
||||
<div class="p-4">
|
||||
<p class="text-3xl font-bold">
|
||||
{{ authAuthorizedApplication.application.name }}
|
||||
</p>
|
||||
<a
|
||||
v-if="authAuthorizedApplication.application.website"
|
||||
target="_blank"
|
||||
:href="authAuthorizedApplication.application.website"
|
||||
>{{
|
||||
urlToHostname(authAuthorizedApplication.application.website)
|
||||
}}</a
|
||||
>
|
||||
<p>
|
||||
<span v-if="authAuthorizedApplication.lastUsedAt">{{
|
||||
t("Last used on {last_used_date}", {
|
||||
last_used_date: formatDateString(
|
||||
authAuthorizedApplication.lastUsedAt
|
||||
),
|
||||
})
|
||||
}}</span>
|
||||
<span v-else>{{ t("Never used") }}</span> ⋅
|
||||
{{
|
||||
t("Authorized on {authorization_date}", {
|
||||
authorization_date: formatDateString(
|
||||
authAuthorizedApplication.insertedAt
|
||||
),
|
||||
})
|
||||
}}
|
||||
</p>
|
||||
</div>
|
||||
<div class="p-4">
|
||||
<o-button
|
||||
@click="
|
||||
() => revoke({ appTokenId: authAuthorizedApplication.id })
|
||||
"
|
||||
variant="danger"
|
||||
>{{ t("Revoke") }}</o-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<EmptyContent v-else icon="apps" inline>
|
||||
{{ t("No apps authorized yet") }}
|
||||
</EmptyContent>
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -82,6 +89,7 @@ import RouteName from "../../router/name";
|
|||
import { IUser } from "@/types/current-user.model";
|
||||
import { formatDateString } from "@/filters/datetime";
|
||||
import { Notifier } from "@/plugins/notifier";
|
||||
import EmptyContent from "@/components/Utils/EmptyContent.vue";
|
||||
|
||||
const { t } = useI18n({ useScope: "global" });
|
||||
|
||||
|
@ -94,7 +102,7 @@ const { result: authAuthorizedApplicationsResult } = useQuery<{
|
|||
const authAuthorizedApplications = computed(
|
||||
() =>
|
||||
authAuthorizedApplicationsResult.value?.loggedUser
|
||||
?.authAuthorizedApplications
|
||||
?.authAuthorizedApplications ?? []
|
||||
);
|
||||
|
||||
const urlToHostname = (url: string | undefined): string | null => {
|
||||
|
|
Loading…
Reference in a new issue