start with user favicon/locale personalization
This commit is contained in:
62
.vscode/vscode-kanban.json
vendored
62
.vscode/vscode-kanban.json
vendored
@@ -8,28 +8,6 @@
|
|||||||
"id": "23",
|
"id": "23",
|
||||||
"references": [],
|
"references": [],
|
||||||
"title": "colori te prego!"
|
"title": "colori te prego!"
|
||||||
}
|
|
||||||
],
|
|
||||||
"in-progress": [],
|
|
||||||
"testing": [],
|
|
||||||
"todo": [
|
|
||||||
{
|
|
||||||
"assignedTo": {
|
|
||||||
"name": "lesion"
|
|
||||||
},
|
|
||||||
"creation_time": "2019-06-01T21:00:22.155Z",
|
|
||||||
"id": "28",
|
|
||||||
"references": [],
|
|
||||||
"title": "activitypub stream"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"assignedTo": {
|
|
||||||
"name": "lesion"
|
|
||||||
},
|
|
||||||
"creation_time": "2019-05-27T15:42:35.467Z",
|
|
||||||
"id": "21",
|
|
||||||
"references": [],
|
|
||||||
"title": "all'admin deve mostrare un badge se ci sono pending operation"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"assignedTo": {
|
"assignedTo": {
|
||||||
@@ -40,15 +18,6 @@
|
|||||||
"references": [],
|
"references": [],
|
||||||
"title": "copy to clipboard"
|
"title": "copy to clipboard"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"assignedTo": {
|
|
||||||
"name": "lesion"
|
|
||||||
},
|
|
||||||
"creation_time": "2019-05-29T13:08:20.887Z",
|
|
||||||
"id": "25",
|
|
||||||
"references": [],
|
|
||||||
"title": "creazione script di backup"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"assignedTo": {
|
"assignedTo": {
|
||||||
"name": "lesion"
|
"name": "lesion"
|
||||||
@@ -93,6 +62,37 @@
|
|||||||
"id": "29",
|
"id": "29",
|
||||||
"references": [],
|
"references": [],
|
||||||
"title": "settings di istanza (default filter, eg, eventi ricorrenti)"
|
"title": "settings di istanza (default filter, eg, eventi ricorrenti)"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"in-progress": [],
|
||||||
|
"testing": [],
|
||||||
|
"todo": [
|
||||||
|
{
|
||||||
|
"assignedTo": {
|
||||||
|
"name": "lesion"
|
||||||
|
},
|
||||||
|
"creation_time": "2019-06-01T21:00:22.155Z",
|
||||||
|
"id": "28",
|
||||||
|
"references": [],
|
||||||
|
"title": "activitypub stream"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"assignedTo": {
|
||||||
|
"name": "lesion"
|
||||||
|
},
|
||||||
|
"creation_time": "2019-05-27T15:42:35.467Z",
|
||||||
|
"id": "21",
|
||||||
|
"references": [],
|
||||||
|
"title": "all'admin deve mostrare un badge se ci sono pending operation"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"assignedTo": {
|
||||||
|
"name": "lesion"
|
||||||
|
},
|
||||||
|
"creation_time": "2019-05-29T13:08:20.887Z",
|
||||||
|
"id": "25",
|
||||||
|
"references": [],
|
||||||
|
"title": "creazione script di backup"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"assignedTo": {
|
"assignedTo": {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"title": "Gancio",
|
"title": "Gancio",
|
||||||
"description": "A shared agenda for local communities",
|
"description": "A shared agenda for local communities",
|
||||||
|
"favicon" : "../dist/favicon.ico",
|
||||||
"baseurl": "http://localhost:13120",
|
"baseurl": "http://localhost:13120",
|
||||||
"server": {
|
"server": {
|
||||||
"host": "localhost",
|
"host": "localhost",
|
||||||
|
|||||||
@@ -6,11 +6,23 @@ nav_order: 3
|
|||||||
---
|
---
|
||||||
|
|
||||||
# Settings
|
# Settings
|
||||||
|
Main `gancio` configuration is done with a configuration file.
|
||||||
|
This shoud be a `.json` or a `.js` file and could be specified using the `--config` flag.
|
||||||
|
|
||||||
|
- <small>eg. `gancio start --config ./config.json'</small>
|
||||||
|
- <small>eg. `pm2 start gancio start -- --config ~/config.json'</small>
|
||||||
|
|
||||||
|
Default configuration
|
||||||
{: .no_toc }
|
{: .no_toc }
|
||||||
|
|
||||||
1. TOC
|
1. TOC
|
||||||
{:toc}
|
{:toc}
|
||||||
|
|
||||||
|
|
||||||
|
#### Title
|
||||||
|
####
|
||||||
|
|
||||||
|
|
||||||
## Default settings
|
## Default settings
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@@ -26,6 +38,7 @@ nav_order: 3
|
|||||||
"storage": "/tmp/db.sqlite"
|
"storage": "/tmp/db.sqlite"
|
||||||
},
|
},
|
||||||
"upload_path": "./",
|
"upload_path": "./",
|
||||||
|
"favicon": "../dist/favicon.ico",
|
||||||
"smtp": {
|
"smtp": {
|
||||||
"auth": {
|
"auth": {
|
||||||
"user": "",
|
"user": "",
|
||||||
|
|||||||
@@ -108,6 +108,18 @@
|
|||||||
el-form-item(v-show='allow_recurrent_event' :label="$t('admin.recurrent_event_visible')")
|
el-form-item(v-show='allow_recurrent_event' :label="$t('admin.recurrent_event_visible')")
|
||||||
el-switch(v-model='recurrent_event_visible')
|
el-switch(v-model='recurrent_event_visible')
|
||||||
|
|
||||||
|
el-divider {{$t('admin.personalization')}}
|
||||||
|
span {{$t('common.info')}}
|
||||||
|
el-input(type='textarea' v-model='about')
|
||||||
|
|
||||||
|
el-upload(action=''
|
||||||
|
:limit="1"
|
||||||
|
:auto-upload='false'
|
||||||
|
drag
|
||||||
|
accept='image/*'
|
||||||
|
:multiple='false')
|
||||||
|
|
||||||
|
|
||||||
el-divider {{$t('admin.federation')}}
|
el-divider {{$t('admin.federation')}}
|
||||||
el-form(inline @submit.native.prevent='associate_mastondon_instance' label-width='240px')
|
el-form(inline @submit.native.prevent='associate_mastondon_instance' label-width='240px')
|
||||||
p {{$t('admin.mastodon_description')}}
|
p {{$t('admin.mastodon_description')}}
|
||||||
@@ -147,7 +159,8 @@ export default {
|
|||||||
admin: false,
|
admin: false,
|
||||||
},
|
},
|
||||||
tab: "0",
|
tab: "0",
|
||||||
open: true
|
open: true,
|
||||||
|
about: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async mounted () {
|
async mounted () {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
const Mastodon = require('mastodon-api')
|
const Mastodon = require('mastodon-api')
|
||||||
const { setting: Setting } = require('../models')
|
const { setting: Setting } = require('../models')
|
||||||
const config = require('config')
|
const config = require('config')
|
||||||
|
|
||||||
const settingsController = {
|
const settingsController = {
|
||||||
settings: { initialized: false },
|
settings: { initialized: false },
|
||||||
secretSettings: {},
|
secretSettings: {},
|
||||||
@@ -36,6 +37,14 @@ const settingsController = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
async getUserLocale(req, res) {
|
||||||
|
// console.error(res)
|
||||||
|
// load user locale specified in configuration
|
||||||
|
// res.json({ about: 'dentro user locale' })
|
||||||
|
// res.sendStatus(200)
|
||||||
|
return false
|
||||||
|
},
|
||||||
|
|
||||||
async setRequest(req, res) {
|
async setRequest(req, res) {
|
||||||
const { key, value, is_secret } = req.body
|
const { key, value, is_secret } = req.body
|
||||||
const ret = await settingsController.set(key, value, is_secret)
|
const ret = await settingsController.set(key, value, is_secret)
|
||||||
|
|||||||
@@ -85,6 +85,8 @@ api.delete('/event/notification/:code', eventController.delNotification)
|
|||||||
api.get('/settings', settingsController.getAllRequest)
|
api.get('/settings', settingsController.getAllRequest)
|
||||||
api.post('/settings', jwt, fillUser, isAdmin, settingsController.setRequest)
|
api.post('/settings', jwt, fillUser, isAdmin, settingsController.setRequest)
|
||||||
|
|
||||||
|
api.get('/settings/user_locale', settingsController.getUserLocale)
|
||||||
|
|
||||||
// confirm event
|
// confirm event
|
||||||
api.get('/event/confirm/:event_id', jwt, isAuth, isAdmin, eventController.confirm)
|
api.get('/event/confirm/:event_id', jwt, isAuth, isAdmin, eventController.confirm)
|
||||||
api.get('/event/unconfirm/:event_id', jwt, isAuth, isAdmin, eventController.unconfirm)
|
api.get('/event/unconfirm/:event_id', jwt, isAuth, isAdmin, eventController.unconfirm)
|
||||||
|
|||||||
@@ -23,7 +23,9 @@ async function start() {
|
|||||||
await nuxt.ready()
|
await nuxt.ready()
|
||||||
}
|
}
|
||||||
|
|
||||||
app.use('/favicon.ico', express.static(path.resolve(__dirname, '../dist/favicon.ico')))
|
// configurable favicon && logo
|
||||||
|
app.use('/favicon.ico', express.static(path.resolve(config.favicon)))
|
||||||
|
|
||||||
app.use(morgan('dev'))
|
app.use(morgan('dev'))
|
||||||
app.use('/media/', express.static(config.upload_path))
|
app.use('/media/', express.static(config.upload_path))
|
||||||
app.use('/api', require('./api/index'))
|
app.use('/api', require('./api/index'))
|
||||||
@@ -31,7 +33,7 @@ async function start() {
|
|||||||
// Give nuxt middleware to express
|
// Give nuxt middleware to express
|
||||||
app.use(nuxt.render)
|
app.use(nuxt.render)
|
||||||
|
|
||||||
// Listen the server
|
// Listen
|
||||||
const server = app.listen(nuxt_config.server)
|
const server = app.listen(nuxt_config.server)
|
||||||
|
|
||||||
// close connections/port/unix socket
|
// close connections/port/unix socket
|
||||||
|
|||||||
Reference in New Issue
Block a user