Use i18n welcome text and adjust UI styles

This commit is contained in:
jelveh
2026-04-28 10:41:01 -07:00
parent a781776b38
commit 8297cbec99
4 changed files with 5 additions and 16 deletions
+2 -10
View File
@@ -19,13 +19,6 @@
import UIWindowSaveAccount from '../UIWindowSaveAccount.js';
function getTimeGreeting () {
const hour = new Date().getHours();
if ( hour < 12 ) return 'Good morning';
if ( hour < 17 ) return 'Good afternoon';
return 'Good evening';
}
function buildRecentAppsHTML () {
let h = '';
@@ -121,7 +114,6 @@ const TabHome = {
html () {
const username = window.user?.username || 'User';
const greeting = getTimeGreeting();
const profilePicture = window.user?.profile?.picture || window.icons['profile.svg'];
let h = '';
@@ -133,9 +125,9 @@ const TabHome = {
h += '<div class="bento-welcome-pattern"></div>';
h += '<div class="bento-welcome-content">';
h += `<div class="bento-welcome-avatar profile-pic" style="background-image: url(${html_encode(profilePicture)})"></div>`;
h += `<span class="bento-greeting">${greeting},</span>`;
h += `<span class="bento-greeting">${i18n('welcome')},</span>`;
h += `<h1 class="bento-username username">${html_encode(username)}</h1>`;
h += '<p class="bento-tagline">Your personal cloud computer</p>';
h += `<p class="bento-tagline">${i18n('your_personal_internet_computer')}</p>`;
// Show warning if account is temporary/unsaved
if ( window.user?.is_temp ) {
h += '<button class="bento-save-account-warning">';
+1 -1
View File
@@ -29,7 +29,7 @@ function UIWindowCopyToken (options = {}) {
flex-direction: column;
align-items: center;
padding: 30px 20px 20px;
background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
background: #1854b6;
border-bottom: 1px solid #ced7e1;
">`;
h += `<div style="
-5
View File
@@ -2453,9 +2453,6 @@ body {
background-color: var(--dashboard-avatar-background);
border: 3px solid var(--dashboard-bento-welcome-avatar-border);
margin-bottom: 16px;
box-shadow:
0 4px 16px var(--dashboard-shadow-medium),
0 2px 8px var(--dashboard-bento-welcome-avatar-shadow);
}
.dashboard .bento-greeting {
@@ -2581,13 +2578,11 @@ body {
.dashboard .bento-card-fancy-icon-apps {
background-color: var(--dashboard-bento-apps-icon-bg);
color: #fff;
box-shadow: 0 4px 12px var(--dashboard-bento-apps-icon-shadow);
}
.dashboard .bento-card-fancy-icon-usage {
background-color: var(--dashboard-bento-usage-icon-bg);
color: #fff;
box-shadow: 0 4px 12px var(--dashboard-bento-usage-icon-shadow);
}
.dashboard .bento-card-fancy-text {
+2
View File
@@ -492,6 +492,8 @@ const en = {
'signup_error': 'An error occurred during signup. Please try again.',
// Welcome Window
'welcome': 'Welcome',
'your_personal_internet_computer': 'To your personal internet computer',
'welcome_title': 'Welcome to your Personal Internet Computer',
'welcome_description': 'Store files, play games, find awesome apps, and much more! All in one place, accessible from anywhere at any time.',
'welcome_get_started': 'Get Started',