+++ /dev/null
-<?php
-/**
- * @copyright Copyright (c) 2020 Julius Härtl <jus@bitgrid.net>
- *
- * @author Julius Härtl <jus@bitgrid.net>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-$app = new \OCP\AppFramework\App('dashboard');
<template>
<div id="app-dashboard">
- <h2>{{ greeting }}, {{ name }}</h2>
+ <h2>{{ greeting.icon }} {{ greeting.text }}, {{ name }}</h2>
<div class="panels">
<div v-for="panel in panels" :key="panel.id" class="panel">
const panels = loadState('dashboard', 'panels')
-console.debug('Loading dashboard panels', panels)
-
export default {
name: 'App',
data() {
const time = this.timer.getHours()
if (time > 18) {
- return t('dashboard', '🌙 Time to call it a day')
+ return { icon: '🌙', text: t('dashboard', 'Good evening') }
}
if (time > 12) {
- return t('dashboard', '☀ Good afternoon')
+ return { icon: '☀', text: t('dashboard', 'Good afternoon') }
}
if (time === 12) {
- return t('dashboard', '🍽 Time for lunch')
+ return { icon: '🍽', text: t('dashboard', 'Time for lunch') }
}
if (time > 5) {
- return t('dashboard', '🌄 Good morning')
+ return { icon: '🌄', text: t('dashboard', 'Good morning') }
}
- return t('dashboard', '🦉 Have a night owl')
+ return { icon: '🦉', text: t('dashboard', 'Have a night owl') }
},
},
watch: {