Commit ed2a1066 authored by les's avatar les
Browse files

restore color on cal

parent 79f93864
......@@ -41,10 +41,11 @@ export default {
computed: {
...mapGetters(['filteredEventsWithPast']),
...mapState(['tags', 'filters']),
// TODO: should be better
attributes () {
const colors = ['indigo', 'orange', 'yellow', 'green', 'teal', 'blue', 'red', 'purple', 'pink', 'grey']
const tags = take(this.tags, 10)//.map(t=>t.tag)
// const tags = [this.tags[0].tag, this.tags[1].tag, this.tags[2].tag, this.tags[3].tag, this.tags[4].tag, this.tags[5].tag ]
const colors = ['green', 'orange', 'yellow', 'teal', 'indigo', 'blue', 'red', 'purple', 'pink', 'grey']
const tags = take(this.tags, 10).map(t=>t.tag)
let attributes = []
attributes.push ({ key: 'today', dates: new Date(), highlight: { color: 'green' }})
......@@ -61,10 +62,13 @@ export default {
attributes = attributes.concat(this.filteredEventsWithPast
.filter(e => !e.multidate)
.map(e => ({
key: e.id,
dot: getColor(e),
dates: new Date(e.start_datetime*1000)})))
.map(e => {
const color = getColor(e)
return {
key: e.id,
dot: color,
dates: new Date(e.start_datetime*1000)
}}))
attributes = attributes.concat(this.filteredEventsWithPast
.filter(e => e.multidate)
......
//#!/bin/env node
//const path = require('path')
//const express = require('express')
//const consola = require('consola')
//const morgan = require('morgan')
const { Nuxt, Builder } = require('nuxt')
//const api = require('./api')
//const federation = require('./federation')
//const webfinger = require('./federation/webfinger')
// Import and Set Nuxt.js options
const nuxt_config = require('../nuxt.config.js')
const config = require('config')
async function start() {
async function main() {
nuxt_config.server = config.server
// Init Nuxt.js
const nuxt = new Nuxt(nuxt_config)
......@@ -27,36 +20,14 @@ async function start() {
}
nuxt.listen()
// configurable favicon && logo
//app.use('/favicon.ico', express.static(path.resolve(config.favicon || 'assets/favicon.ico')))
//app.use(morgan('dev'))
//app.use('/media/', express.static(config.upload_path))
// gancio standard api
//app.use('/api', api)
// federation api / activitypub / webfinger / nodeinfo
//app.use('/.well-known', webfinger)
//app.use('/federation', federation)
// Give nuxt middleware to express
//app.use(nuxt.render)
// Listen
//const server = app.listen(nuxt_config.server)
// close connections/port/unix socket
function shutdown() {
consola.info(`Closing connections..`)
nuxt.close(() => {
// TODO, close db connection?
process.exit()
})
}
process.on('SIGTERM', shutdown)
process.on('SIGINT', shutdown)
}
start()
main()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment