Theme and translations

This commit is contained in:
Nicola Benaglia 2025-05-26 23:26:32 +02:00
parent 8fcd3be9cc
commit 7da1d5661b
15 changed files with 51 additions and 19 deletions

View File

@ -3,25 +3,20 @@ import { styled } from '@mui/system';
export const AppsParent = styled(Box)(({ theme }) => ({ export const AppsParent = styled(Box)(({ theme }) => ({
alignItems: 'center', alignItems: 'center',
backgroundColor: theme.palette.background.default,
color: theme.palette.text.primary,
display: 'flex', display: 'flex',
flexDirection: 'column', flexDirection: 'column',
height: '100%', height: '100%',
msOverflowStyle: 'none', // Hides scrollbar in IE and Edge
overflow: 'auto', overflow: 'auto',
scrollbarWidth: 'none', // Hides the scrollbar in Firefox
width: '100%', width: '100%',
// For WebKit-based browsers (Chrome, Safari, etc.) // For WebKit-based browsers (Chrome, Safari, etc.)
'::-webkit-scrollbar': { '::-webkit-scrollbar': {
width: '0px', // Set the width to 0 to hide the scrollbar width: '0px', // Set the width to 0 to hide the scrollbar
height: '0px', // Set the height to 0 for horizontal scrollbar height: '0px', // Set the height to 0 for horizontal scrollbar
}, },
// For Firefox
scrollbarWidth: 'none', // Hides the scrollbar in Firefox
// Optional for better cross-browser consistency
msOverflowStyle: 'none', // Hides scrollbar in IE and Edge
backgroundColor: theme.palette.background.default,
color: theme.palette.text.primary,
})); }));
export const AppsContainer = styled(Box)(({ theme }) => ({ export const AppsContainer = styled(Box)(({ theme }) => ({

View File

@ -97,6 +97,8 @@ export const AppsHomeDesktop = ({
placeholder="qortal://" placeholder="qortal://"
sx={{ sx={{
width: '100%', width: '100%',
backgroundColor: theme.palette.background.surface,
borderRadius: '7px',
color: theme.palette.text.primary, color: theme.palette.text.primary,
'& .MuiInput-input::placeholder': { '& .MuiInput-input::placeholder': {
color: theme.palette.text.secondary, color: theme.palette.text.secondary,
@ -110,7 +112,6 @@ export const AppsHomeDesktop = ({
'&:focus': { '&:focus': {
outline: 'none', outline: 'none',
}, },
// Add any additional styles for the input here
}} }}
onKeyDown={(e) => { onKeyDown={(e) => {
if (e.key === 'Enter' && qortalUrl) { if (e.key === 'Enter' && qortalUrl) {

View File

@ -27,6 +27,7 @@ import { ContextMenuPinnedApps } from '../ContextMenuPinnedApps';
import LockIcon from '@mui/icons-material/Lock'; import LockIcon from '@mui/icons-material/Lock';
import { useHandlePrivateApps } from '../../hooks/useHandlePrivateApps'; import { useHandlePrivateApps } from '../../hooks/useHandlePrivateApps';
import { useAtom, useSetAtom } from 'jotai'; import { useAtom, useSetAtom } from 'jotai';
import { useTranslation } from 'react-i18next';
const SortableItem = ({ id, name, app, isDesktop }) => { const SortableItem = ({ id, name, app, isDesktop }) => {
const { openApp } = useHandlePrivateApps(); const { openApp } = useHandlePrivateApps();
@ -46,6 +47,14 @@ const SortableItem = ({ id, name, app, isDesktop }) => {
transition, transition,
}; };
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
return ( return (
<ContextMenuPinnedApps app={app} isMine={!!app?.isMine}> <ContextMenuPinnedApps app={app} isMine={!!app?.isMine}>
<ButtonBase <ButtonBase
@ -112,7 +121,6 @@ const SortableItem = ({ id, name, app, isDesktop }) => {
width: '31px', width: '31px',
height: 'auto', height: 'auto',
}} }}
// src={LogoSelected}
alt="center-icon" alt="center-icon"
/> />
</Avatar> </Avatar>
@ -120,7 +128,12 @@ const SortableItem = ({ id, name, app, isDesktop }) => {
</AppCircle> </AppCircle>
{app?.isPrivate ? ( {app?.isPrivate ? (
<AppCircleLabel> <AppCircleLabel>
{`${app?.privateAppProperties?.appName || 'Private'}`} {`${
app?.privateAppProperties?.appName ||
t('core:app_private', {
postProcess: 'capitalizeFirstChar',
})
}`}
</AppCircleLabel> </AppCircleLabel>
) : ( ) : (
<AppCircleLabel>{app?.metadata?.title || app?.name}</AppCircleLabel> <AppCircleLabel>{app?.metadata?.title || app?.name}</AppCircleLabel>

View File

@ -34,8 +34,8 @@ const TabComponent = ({ isSelected, app }) => {
<NavCloseTab <NavCloseTab
style={{ style={{
position: 'absolute', position: 'absolute',
top: '-5px',
right: '-5px', right: '-5px',
top: '-5px',
zIndex: 1, zIndex: 1,
}} }}
/> />

View File

@ -1,3 +1,4 @@
import { useTheme } from '@mui/material';
import Box from '@mui/material/Box'; import Box from '@mui/material/Box';
import Drawer from '@mui/material/Drawer'; import Drawer from '@mui/material/Drawer';
@ -6,6 +7,8 @@ export const DrawerUserLookup = ({ open, setOpen, children }) => {
setOpen(newOpen); setOpen(newOpen);
}; };
const theme = useTheme();
return ( return (
<div> <div>
<Drawer <Drawer
@ -13,6 +16,7 @@ export const DrawerUserLookup = ({ open, setOpen, children }) => {
hideBackdrop={true} hideBackdrop={true}
open={open} open={open}
onClose={toggleDrawer(false)} onClose={toggleDrawer(false)}
sx={{ color: theme.palette.text.primary }}
> >
<Box <Box
sx={{ width: '70vw', height: '100%', maxWidth: '1000px' }} sx={{ width: '70vw', height: '100%', maxWidth: '1000px' }}

View File

@ -193,6 +193,9 @@ export const UserLookup = ({ isOpenDrawerLookup, setIsOpenDrawerLookup }) => {
}} }}
id="controllable-states-demo" id="controllable-states-demo"
loading={isLoading} loading={isLoading}
noOptionsText={t('core:option_no', {
postProcess: 'capitalizeFirstChar',
})}
options={options} options={options}
sx={{ width: 300 }} sx={{ width: 300 }}
renderInput={(params) => ( renderInput={(params) => (

View File

@ -105,8 +105,9 @@
"api": "API", "api": "API",
"app": "app", "app": "app",
"app_other": "apps", "app_other": "apps",
"app_name": "app -Name", "app_name": "aname der App",
"app_service_type": "app -Service -Typ", "app_private": "privat",
"app_service_type": "app-Diensttyp",
"apps_dashboard": "apps Dashboard", "apps_dashboard": "apps Dashboard",
"apps_official": "offizielle Apps", "apps_official": "offizielle Apps",
"attachment": "anhang", "attachment": "anhang",
@ -319,6 +320,7 @@
"none": "keiner", "none": "keiner",
"note": "notiz", "note": "notiz",
"option": "option", "option": "option",
"option_no": "keine Optionen",
"option_other": "optionen", "option_other": "optionen",
"page": { "page": {
"last": "zuletzt", "last": "zuletzt",

View File

@ -109,6 +109,7 @@
"app": "app", "app": "app",
"app_other": "apps", "app_other": "apps",
"app_name": "app name", "app_name": "app name",
"app_private": "private",
"app_service_type": "app service type", "app_service_type": "app service type",
"apps_dashboard": "apps Dashboard", "apps_dashboard": "apps Dashboard",
"apps_official": "official Apps", "apps_official": "official Apps",
@ -322,6 +323,7 @@
"none": "none", "none": "none",
"note": "note", "note": "note",
"option": "option", "option": "option",
"option_no": "no options",
"option_other": "options", "option_other": "options",
"page": { "page": {
"last": "last", "last": "last",

View File

@ -106,6 +106,7 @@
"app": "aplicación", "app": "aplicación",
"app_other": "aplicaciones", "app_other": "aplicaciones",
"app_name": "nombre de la aplicación", "app_name": "nombre de la aplicación",
"app_private": "privada",
"app_service_type": "tipo de servicio de aplicaciones", "app_service_type": "tipo de servicio de aplicaciones",
"apps_dashboard": "panel de aplicaciones", "apps_dashboard": "panel de aplicaciones",
"apps_official": "aplicaciones oficiales", "apps_official": "aplicaciones oficiales",
@ -319,6 +320,7 @@
"none": "ninguno", "none": "ninguno",
"note": "nota", "note": "nota",
"option": "opción", "option": "opción",
"option_no": "sin opción",
"option_other": "opción", "option_other": "opción",
"page": { "page": {
"last": "último", "last": "último",

View File

@ -107,6 +107,7 @@
"app": "appliquer", "app": "appliquer",
"app_other": "applications", "app_other": "applications",
"app_name": "nom de l'application", "app_name": "nom de l'application",
"app_private": "privé",
"app_service_type": "type de service d'application", "app_service_type": "type de service d'application",
"apps_dashboard": "tableau de bord Apps", "apps_dashboard": "tableau de bord Apps",
"apps_official": "applications officielles", "apps_official": "applications officielles",
@ -320,6 +321,7 @@
"none": "aucun", "none": "aucun",
"note": "note", "note": "note",
"option": "option", "option": "option",
"option_no": "aucune option",
"option_other": "options", "option_other": "options",
"page": { "page": {
"last": "dernier", "last": "dernier",

View File

@ -27,7 +27,7 @@
"copy_link": "copia link", "copy_link": "copia link",
"create_apps": "crea app", "create_apps": "crea app",
"create_file": "crea file", "create_file": "crea file",
"create_transaction": "crea transazioni sulla blockchain Qortal", "create_transaction": "creare transazioni sulla blockchain Qortal",
"create_thread": "crea thread", "create_thread": "crea thread",
"decline": "rifiuta", "decline": "rifiuta",
"decrypt": "decripta", "decrypt": "decripta",
@ -109,8 +109,9 @@
"app": "app", "app": "app",
"app_other": "app", "app_other": "app",
"app_name": "nome app", "app_name": "nome app",
"app_private": "privata",
"app_service_type": "tipo di servizio app", "app_service_type": "tipo di servizio app",
"apps_dashboard": "dashboard di app", "apps_dashboard": "dashboard delle app",
"apps_official": "app ufficiali", "apps_official": "app ufficiali",
"attachment": "allegato", "attachment": "allegato",
"balance": "bilancia:", "balance": "bilancia:",
@ -322,6 +323,7 @@
"none": "nessuno", "none": "nessuno",
"note": "nota", "note": "nota",
"option": "opzione", "option": "opzione",
"option_no": "nessuna opzione",
"option_other": "opzioni", "option_other": "opzioni",
"page": { "page": {
"last": "scorso", "last": "scorso",

View File

@ -6,11 +6,11 @@
"account_creation": "creazione dell'account", "account_creation": "creazione dell'account",
"important_info": "informazioni importanti", "important_info": "informazioni importanti",
"apps": { "apps": {
"dashboard": "1. Dashboard di app", "dashboard": "1. Dashboard delle app",
"navigation": "2. Navigazione delle app" "navigation": "2. Navigazione delle app"
}, },
"initial": { "initial": {
"recommended_qort_qty": "avere almeno {{ quantity }} QORT nel tuo wallet", "recommended_qort_qty": "avere almeno {{ quantity }} QORT nel proprio wallet",
"explore": "esplora", "explore": "esplora",
"general_chat": "chat generale", "general_chat": "chat generale",
"getting_started": "come iniziare", "getting_started": "come iniziare",

View File

@ -106,6 +106,7 @@
"app": "アプリ", "app": "アプリ",
"app_other": "アプリ", "app_other": "アプリ",
"app_name": "アプリ名", "app_name": "アプリ名",
"app_private": "プライベート",
"app_service_type": "アプリサービスタイプ", "app_service_type": "アプリサービスタイプ",
"apps_dashboard": "アプリダッシュボード", "apps_dashboard": "アプリダッシュボード",
"apps_official": "公式アプリ", "apps_official": "公式アプリ",
@ -319,6 +320,7 @@
"none": "なし", "none": "なし",
"note": "注記", "note": "注記",
"option": "オプション", "option": "オプション",
"option_no": "オプションなし",
"option_other": "オプション", "option_other": "オプション",
"page": { "page": {
"last": "最後", "last": "最後",

View File

@ -106,6 +106,7 @@
"app": "приложение", "app": "приложение",
"app_other": "приложения", "app_other": "приложения",
"app_name": "Название приложения", "app_name": "Название приложения",
"app_private": "частное",
"app_service_type": "Тип службы приложений", "app_service_type": "Тип службы приложений",
"apps_dashboard": "приложения панель панели", "apps_dashboard": "приложения панель панели",
"apps_official": "официальные приложения", "apps_official": "официальные приложения",
@ -320,6 +321,7 @@
"none": "никто", "none": "никто",
"note": "примечание", "note": "примечание",
"option": "вариант", "option": "вариант",
"option_no": "выбора нет",
"option_other": "параметры", "option_other": "параметры",
"page": { "page": {
"last": "последний", "last": "последний",

View File

@ -106,6 +106,7 @@
"app": "应用程序", "app": "应用程序",
"app_other": "应用", "app_other": "应用",
"app_name": "应用名称", "app_name": "应用名称",
"app_private": "私人应用程序",
"app_service_type": "应用服务类型", "app_service_type": "应用服务类型",
"apps_dashboard": "应用仪表板", "apps_dashboard": "应用仪表板",
"apps_official": "官方应用程序", "apps_official": "官方应用程序",
@ -319,6 +320,7 @@
"none": "没有任何", "none": "没有任何",
"note": "笔记", "note": "笔记",
"option": "选项", "option": "选项",
"option_no": "没有选择",
"option_other": "选项", "option_other": "选项",
"page": { "page": {
"last": "最后的", "last": "最后的",