mirror of
https://github.com/HeyPuter/puter.git
synced 2026-08-15 02:27:35 +00:00
Use i18n welcome text and adjust UI styles
This commit is contained in:
@@ -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">';
|
||||
|
||||
@@ -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="
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user