aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dashboard
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2020-06-23 17:01:55 +0200
committerJulius Härtl <jus@bitgrid.net>2020-07-15 09:24:51 +0200
commita0cd7604812069ea7a06b89d1c104360ba2626e4 (patch)
tree6b1b2d5ad4432a54655089c1e78c7e8124b4f7ff /apps/dashboard
parent829bf1ad11caaf4e76f64addf406f0f72586d5ba (diff)
downloadnextcloud-server-a0cd7604812069ea7a06b89d1c104360ba2626e4.tar.gz
nextcloud-server-a0cd7604812069ea7a06b89d1c104360ba2626e4.zip
Separate icon from translatable text
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/dashboard')
-rw-r--r--apps/dashboard/appinfo/app.php24
-rw-r--r--apps/dashboard/src/App.vue14
2 files changed, 6 insertions, 32 deletions
diff --git a/apps/dashboard/appinfo/app.php b/apps/dashboard/appinfo/app.php
deleted file mode 100644
index 3edd53762fd..00000000000
--- a/apps/dashboard/appinfo/app.php
+++ /dev/null
@@ -1,24 +0,0 @@
-<?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');
diff --git a/apps/dashboard/src/App.vue b/apps/dashboard/src/App.vue
index 88839a6a5a8..af38e4c7b2d 100644
--- a/apps/dashboard/src/App.vue
+++ b/apps/dashboard/src/App.vue
@@ -1,6 +1,6 @@
<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">
@@ -22,8 +22,6 @@ import { getCurrentUser } from '@nextcloud/auth'
const panels = loadState('dashboard', 'panels')
-console.debug('Loading dashboard panels', panels)
-
export default {
name: 'App',
data() {
@@ -39,18 +37,18 @@ export default {
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: {