allow_anon_event, comment via mastodon
This commit is contained in:
@@ -1,13 +1,5 @@
|
||||
export default function({ $axios, store }) {
|
||||
if (process.server) {
|
||||
console.error('dentro il server ', store.settings )
|
||||
// $axios.defaults.baseurl =
|
||||
} else {
|
||||
// const protocol = window.location.protocol
|
||||
// const hostname = window.location.hostname
|
||||
// const port = 8000
|
||||
// const url = `${protocol}//${hostname}:${port}`
|
||||
if (process.client) {
|
||||
$axios.defaults.baseURL = window.location.origin + '/api'
|
||||
console.error('dentro il client !')
|
||||
}
|
||||
}
|
||||
@@ -10,8 +10,8 @@ const locales = {
|
||||
en: require('element-ui/lib/locale/lang/en')
|
||||
}
|
||||
|
||||
export default ({ app }) => {
|
||||
locale.use(locales[app.i18n.locale])
|
||||
export default ({ app, store }) => {
|
||||
locale.use(locales[store.state.locale])
|
||||
Vue.use(Button)
|
||||
Vue.use(Collapse)
|
||||
Vue.use(CollapseItem)
|
||||
|
||||
@@ -2,8 +2,8 @@ import Vue from 'vue'
|
||||
import moment from 'dayjs'
|
||||
import 'dayjs/locale/it'
|
||||
|
||||
export default ({ app }) => {
|
||||
moment.locale(app.i18n.locale)
|
||||
export default ({ app, store }) => {
|
||||
moment.locale(store.state.locale)
|
||||
Vue.filter('linkify', value => value.replace(/(https?:\/\/[^\s]+)/g, '<a href="$1">$1</a>'))
|
||||
Vue.filter('datetime', value => moment(value).format('ddd, D MMMM HH:mm'))
|
||||
Vue.filter('short_datetime', value => moment(value).format('D/MM HH:mm'))
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import Vue from 'vue'
|
||||
import VueI18n from 'vue-i18n'
|
||||
import it from '@/locales/it.js'
|
||||
import en from '@/locales/en.js'
|
||||
|
||||
Vue.use(VueI18n)
|
||||
|
||||
@@ -8,10 +9,10 @@ export default ({ app, store }) => {
|
||||
// Set i18n instance on app
|
||||
// This way we can use it in middleware and pages asyncData/fetch
|
||||
app.i18n = new VueI18n({
|
||||
locale: process.env.locale,
|
||||
fallbackLocale: process.env.locale,
|
||||
locale: store.state.locale,
|
||||
fallbackLocale: 'it',
|
||||
messages: {
|
||||
it
|
||||
it, en
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user