Compare commits

..

No commits in common. "f119bca2905188d8833706ca3606623f08080cf7" and "27d9dee68e3ea53f48e92cb5a0ae3b25873a8025" have entirely different histories.

14 changed files with 185 additions and 172 deletions

View file

@ -1,2 +1 @@
VUE_APP_BASE_URL=https://associations.espacecondorcet.org
VUE_APP_SENTRY_URL=https://wow.com
VUE_APP_BASE_URL=https://associations.espacecondorcet.org

View file

@ -8,9 +8,6 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"@sentry/browser": "^5.22.3",
"@sentry/integrations": "^5.22.3",
"@sentry/tracing": "^5.22.3",
"@types/vue-moment": "^4.0.0",
"changed-lines": "^1.0.0",
"core-js": "^3.6.5",

View file

@ -11,7 +11,7 @@ Github: https://github.com/lefuturiste
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta name="theme-color" content="#F57C00">
<title>Annuaire des associations</title>
<title>Forum virtuel des associations</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Material+Icons"/>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css">

View file

@ -0,0 +1,153 @@
<template>
<v-container>
<v-row class="text-center">
<v-col cols="12">
<v-img
:src="require('../assets/logo.svg')"
class="my-3"
contain
height="200"
/>
</v-col>
<v-col class="mb-4">
<h1 class="display-2 font-weight-bold mb-3">
Welcome to Vuetify
</h1>
<p class="subheading font-weight-regular">
For help and collaboration with other Vuetify developers,
<br>please join our online
<a
href="https://community.vuetifyjs.com"
target="_blank"
>Discord Community</a>
</p>
</v-col>
<v-col
class="mb-5"
cols="12"
>
<h2 class="headline font-weight-bold mb-3">
What's next?
</h2>
<v-row justify="center">
<a
v-for="(next, i) in whatsNext"
:key="i"
:href="next.href"
class="subheading mx-3"
target="_blank"
>
{{ next.text }}
</a>
</v-row>
</v-col>
<v-col
class="mb-5"
cols="12"
>
<h2 class="headline font-weight-bold mb-3">
Important Links
</h2>
<v-row justify="center">
<a
v-for="(link, i) in importantLinks"
:key="i"
:href="link.href"
class="subheading mx-3"
target="_blank"
>
{{ link.text }}
</a>
</v-row>
</v-col>
<v-col
class="mb-5"
cols="12"
>
<h2 class="headline font-weight-bold mb-3">
Ecosystem
</h2>
<v-row justify="center">
<a
v-for="(eco, i) in ecosystem"
:key="i"
:href="eco.href"
class="subheading mx-3"
target="_blank"
>
{{ eco.text }}
</a>
</v-row>
</v-col>
</v-row>
</v-container>
</template>
<script lang="ts">
import Vue from 'vue'
export default Vue.extend({
name: 'HelloWorld',
data: () => ({
ecosystem: [
{
text: 'vuetify-loader',
href: 'https://github.com/vuetifyjs/vuetify-loader'
},
{
text: 'github',
href: 'https://github.com/vuetifyjs/vuetify'
},
{
text: 'awesome-vuetify',
href: 'https://github.com/vuetifyjs/awesome-vuetify'
}
],
importantLinks: [
{
text: 'Documentation',
href: 'https://vuetifyjs.com'
},
{
text: 'Chat',
href: 'https://community.vuetifyjs.com'
},
{
text: 'Made with Vuetify',
href: 'https://madewithvuejs.com/vuetify'
},
{
text: 'Twitter',
href: 'https://twitter.com/vuetifyjs'
},
{
text: 'Articles',
href: 'https://medium.com/vuetify'
}
],
whatsNext: [
{
text: 'Explore components',
href: 'https://vuetifyjs.com/components/api-explorer'
},
{
text: 'Select a layout',
href: 'https://vuetifyjs.com/getting-started/pre-made-layouts'
},
{
text: 'Frequently Asked Questions',
href: 'https://vuetifyjs.com/getting-started/frequently-asked-questions'
}
]
})
})
</script>

View file

@ -77,8 +77,6 @@
</template>
<script>
import * as Sentry from '@sentry/browser'
export default {
data: () => ({
drawer: null,
@ -113,9 +111,6 @@ export default {
window.localStorage.setItem('adminToken', adminToken)
this.loading = false
this.enabled = true
// set sentry meta data to debug
Sentry.setTag('user.type', 'admin')
Sentry.setUser({ type: 'admin' })
// this.$store.commit('ADD_ALERT', {
// color: 'success',
// text: 'Vous voilà connecté !'

View file

@ -254,7 +254,6 @@
</template>
<script>
import * as Sentry from '@sentry/browser'
import Preview from '../components/Preview'
export default {
@ -349,29 +348,6 @@ export default {
this.$apitator.setAuthorizationToken(delegateToken)
// verify the token
this.$apitator.get('/delegate', { withAuth: true }).then(res => {
const organization = res.data.data.organization
const proposedVersion = res.data.data.organization.proposedVersion
const tags = res.data.data.tags
const organizationMeta = {
_id: organization._id,
adminName: organization.adminName,
email: organization.email,
slug: organization.slugs[organization.slugs.length - 1],
publicUrl: process.env.VUE_APP_BASE_URL + '/association/' + organization.slugs[organization.slugs.length - 1],
validationState: organization.validationState,
rejectionDescription: organization.rejectionDescription,
publishedAt: organization.publishedAt
}
// set sentry meta data to debug
Sentry.setUser({
type: 'delegate',
organization: organizationMeta
})
Sentry.setTag('user.type', 'delegate')
Sentry.setTag('organization.id', organization._id)
window.localStorage.setItem('delegateToken', delegateToken)
if (this.token !== '') {
this.$router.push({ query: { delegateToken: this.token } })
@ -379,7 +355,18 @@ export default {
clearTimeout(this.loadingHandle)
this.loading = false
this.enabled = true
this.$store.commit('SET_DELEGATE', organizationMeta)
const organization = res.data.data.organization
const proposedVersion = res.data.data.organization.proposedVersion
const tags = res.data.data.tags
this.$store.commit('SET_DELEGATE', {
_id: organization._id,
adminName: organization.adminName,
email: organization.email,
slug: organization.slugs[organization.slugs.length - 1],
publicUrl: process.env.VUE_APP_BASE_URL + '/association/' + organization.slugs[organization.slugs.length - 1],
validationState: organization.validationState,
rejectionDescription: organization.rejectionDescription
})
this.$store.commit('SET_DATA', proposedVersion)
this.$store.commit('SET_TAGS', tags)
this.$nextTick(() => {

View file

@ -13,21 +13,6 @@ import apitator from 'vue-apitator'
// @ts-ignore
import { TiptapVuetifyPlugin } from 'tiptap-vuetify'
import * as Sentry from '@sentry/browser'
import { Vue as VueIntegration } from '@sentry/integrations'
import { Integrations } from '@sentry/tracing'
if (process.env.VUE_APP_SENTRY_URL != null) {
Sentry.init({
dsn: process.env.VUE_APP_SENTRY_URL,
integrations: [
new VueIntegration({ Vue, tracing: true }),
new Integrations.BrowserTracing()
],
tracesSampleRate: 1
})
}
Vue.config.productionTip = false
Vue.use(apitator, {
baseUrl: process.env.VUE_APP_BASE_URL
@ -40,7 +25,7 @@ Vue.filter('formatDate', (s: string) => {
return ''
}
const d = new Date(s)
return d.toLocaleString('en-GB', { timeZone: 'Europe/Paris' })
return d.toLocaleString('fr-FR', { timeZone: 'Europe/Paris' })
})
Vue.use(TiptapVuetifyPlugin, {
vuetify,

View file

@ -13,8 +13,12 @@ const routes: Array<RouteConfig> = [
{
path: '/about',
name: 'About',
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
},
{
path: '/admin',
component: () => import(/* webpackChunkName: "adminLayout" */ '../layouts/Admin.vue'),

View file

@ -68,12 +68,12 @@ const defaultState: State = {
validateMainCallback: (d = false) => d,
mainRules: {
name: [
(v: any) => (v != null && v.length >= 3) || 'Au minimum 3 caractères',
(v: any) => (v != null && v.length <= 50) || 'Au maximum 50 caractères'
(v: any) => v.length >= 3 || 'Au minimum 3 caractères',
(v: any) => v.length <= 50 || 'Au maximum 50 caractères'
],
descriptionShort: [
(v: any) => (v != null && v.length) >= 20 || 'Au minimum 20 caractères',
(v: any) => (v != null && v.length) <= 200 || 'Au maximum 200 caractères'
(v: any) => v.length >= 20 || 'Au minimum 20 caractères',
(v: any) => v.length <= 200 || 'Au maximum 200 caractères'
],
tags: [(v: any) => (Array.isArray(v) && v.length > 0) || 'Vous devez choisir au minimum une catégorie'],
'contacts.email': [(v: any) => /.+@.+\..+/.test(v) || "L'email est requis et doit être valide"],
@ -89,7 +89,7 @@ export default new Vuex.Store({
},
SET_TITLE (state: State, payload) {
state.title = payload
window.document.title = state.title + ' | Panel annuaire des associations'
window.document.title = state.title + ' | Panel forum des associations'
},
ADD_ALERT (state: State, payload) {
state.alert = {

View file

@ -688,10 +688,7 @@ export default {
openExternal (item) {
let queryStr = ''
if (
item.lastPublished == null ||
item.validationState === 'pending'
) {
if (item.validationState === 'pending') {
queryStr = '?version=proposed'
}

View file

@ -203,15 +203,11 @@ export default {
if (raw.length === 3) {
this.secondLine = raw[1]
raw = raw[2].split('%postalsep%')
this.postalCode = raw[0]
this.city = raw[1]
} else {
if (raw.length > 0) {
raw = raw[1].split('%postalsep%')
this.postalCode = raw[0]
this.city = raw[1]
}
raw = raw[1].split('%postalsep%')
}
this.postalCode = raw[0]
this.city = raw[1]
} else {
// encode address
let encoded = ''

View file

@ -262,11 +262,7 @@ export default {
const reader = new FileReader()
reader.readAsArrayBuffer(file)
reader.onloadend = (event) => {
let name = file.name
if (file.type.indexOf('video') !== -1) {
name += '||%_FORMAT_VIDEO_%||' // it's a dirty way to say to the back end : 'hey this is a video file !'
}
resolve(['file', event.target.result, name])
resolve(['file', event.target.result, file.name])
}
reader.onerror = () => {
console.log(reader.error)
@ -279,11 +275,7 @@ export default {
const promises = this.files.map(file => this.loadFile(file))
Promise.all(promises).then(results => {
const formData = new FormData()
results.forEach(r => formData.append(
r[0], // field name
new Blob([new Uint8Array(r[1])]), // the file
r[2] // file name
))
results.forEach(r => formData.append(r[0], new Blob([new Uint8Array(r[1])]), r[2]))
this.$apitator.post('/delegate/medias', formData, {
withAuth: true,

View file

@ -347,7 +347,7 @@ export default {
toDeleteCategory: {},
oldEditCategory: {},
whenModal: false,
when: { day: [], from: '', to: '' },
when: { day: '', from: '', to: '' },
deleteWhenModal: false,
toDeleteWhen: {},
oldEditWhen: {},

View file

@ -904,79 +904,6 @@
dependencies:
any-observable "^0.3.0"
"@sentry/browser@^5.22.3":
version "5.22.3"
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-5.22.3.tgz#7a64bd1cf01bf393741a3e4bf35f82aa927f5b4e"
integrity sha512-2TzE/CoBa5ZkvxJizDdi1Iz1ldmXSJpFQ1mL07PIXBjCt0Wxf+WOuFSj5IP4L40XHfJE5gU8wEvSH0VDR8nXtA==
dependencies:
"@sentry/core" "5.22.3"
"@sentry/types" "5.22.3"
"@sentry/utils" "5.22.3"
tslib "^1.9.3"
"@sentry/core@5.22.3":
version "5.22.3"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.22.3.tgz#030f435f2b518f282ba8bd954dac90cd70888bd7"
integrity sha512-eGL5uUarw3o4i9QUb9JoFHnhriPpWCaqeaIBB06HUpdcvhrjoowcKZj1+WPec5lFg5XusE35vez7z/FPzmJUDw==
dependencies:
"@sentry/hub" "5.22.3"
"@sentry/minimal" "5.22.3"
"@sentry/types" "5.22.3"
"@sentry/utils" "5.22.3"
tslib "^1.9.3"
"@sentry/hub@5.22.3":
version "5.22.3"
resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.22.3.tgz#08309a70d2ea8d5e313d05840c1711f34f2fffe5"
integrity sha512-INo47m6N5HFEs/7GMP9cqxOIt7rmRxdERunA3H2L37owjcr77MwHVeeJ9yawRS6FMtbWXplgWTyTIWIYOuqVbw==
dependencies:
"@sentry/types" "5.22.3"
"@sentry/utils" "5.22.3"
tslib "^1.9.3"
"@sentry/integrations@^5.22.3":
version "5.22.3"
resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-5.22.3.tgz#ecec954d1d8802930baf824cac4cd2a51c8691cb"
integrity sha512-Fx6h8DTDvUpEOymx8Wi49LBdVcNYHwaI6NqApm1qVU9qn/I50Q29KWoZTCGBjBwmkJud+DOAHWYWoU2qRrIvcQ==
dependencies:
"@sentry/types" "5.22.3"
"@sentry/utils" "5.22.3"
localforage "1.8.1"
tslib "^1.9.3"
"@sentry/minimal@5.22.3":
version "5.22.3"
resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.22.3.tgz#706e4029ae5494123d3875c658ba8911aa5cc440"
integrity sha512-HoINpYnVYCpNjn2XIPIlqH5o4BAITpTljXjtAftOx6Hzj+Opjg8tR8PWliyKDvkXPpc4kXK9D6TpEDw8MO0wZA==
dependencies:
"@sentry/hub" "5.22.3"
"@sentry/types" "5.22.3"
tslib "^1.9.3"
"@sentry/tracing@^5.22.3":
version "5.22.3"
resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-5.22.3.tgz#9b5a376e3164c007a22e8642ec094104468cac0c"
integrity sha512-Zp59kMCk5v56ZAyErqjv/QvGOWOQ5fRltzeVQVp8unIDTk6gEFXfhwPsYHOokJe1mfkmrgPDV6xAkYgtL3KCDQ==
dependencies:
"@sentry/hub" "5.22.3"
"@sentry/minimal" "5.22.3"
"@sentry/types" "5.22.3"
"@sentry/utils" "5.22.3"
tslib "^1.9.3"
"@sentry/types@5.22.3":
version "5.22.3"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.22.3.tgz#d1d547b30ee8bd7771fa893af74c4f3d71f0fd18"
integrity sha512-cv+VWK0YFgCVDvD1/HrrBWOWYG3MLuCUJRBTkV/Opdy7nkdNjhCAJQrEyMM9zX0sac8FKWKOHT0sykNh8KgmYw==
"@sentry/utils@5.22.3":
version "5.22.3"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.22.3.tgz#e3bda3e789239eb16d436f768daa12829f33d18f"
integrity sha512-AHNryXMBvIkIE+GQxTlmhBXD0Ksh+5w1SwM5qi6AttH+1qjWLvV6WB4+4pvVvEoS8t5F+WaVUZPQLmCCWp6zKw==
dependencies:
"@sentry/types" "5.22.3"
tslib "^1.9.3"
"@soda/friendly-errors-webpack-plugin@^1.7.1":
version "1.7.1"
resolved "https://registry.yarnpkg.com/@soda/friendly-errors-webpack-plugin/-/friendly-errors-webpack-plugin-1.7.1.tgz#706f64bcb4a8b9642b48ae3ace444c70334d615d"
@ -4854,11 +4781,6 @@ ignore@^5.1.1:
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57"
integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==
immediate@~3.0.5:
version "3.0.6"
resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b"
integrity sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=
import-cwd@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/import-cwd/-/import-cwd-2.1.0.tgz#aa6cf36e722761285cb371ec6519f53e2435b0a9"
@ -5541,13 +5463,6 @@ levn@^0.3.0, levn@~0.3.0:
prelude-ls "~1.1.2"
type-check "~0.3.2"
lie@3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/lie/-/lie-3.1.1.tgz#9a436b2cc7746ca59de7a41fa469b3efb76bd87e"
integrity sha1-mkNrLMd0bKWd56QfpGmz77dr2H4=
dependencies:
immediate "~3.0.5"
lines-and-columns@^1.1.6:
version "1.1.6"
resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00"
@ -5659,13 +5574,6 @@ loader-utils@^1.0.2, loader-utils@^1.1.0, loader-utils@^1.2.0, loader-utils@^1.2
emojis-list "^3.0.0"
json5 "^1.0.1"
localforage@1.8.1:
version "1.8.1"
resolved "https://registry.yarnpkg.com/localforage/-/localforage-1.8.1.tgz#f6c0a24b41ab33b10e4dc84342dd696f6f3e3433"
integrity sha512-azSSJJfc7h4bVpi0PGi+SmLQKJl2/8NErI+LhJsrORNikMZnhaQ7rv9fHj+ofwgSHrKRlsDCL/639a6nECIKuQ==
dependencies:
lie "3.1.1"
locate-path@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e"
@ -8867,7 +8775,7 @@ tsconfig-paths@^3.9.0:
minimist "^1.2.0"
strip-bom "^3.0.0"
tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3:
tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0:
version "1.13.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043"
integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==