aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2024-02-25 13:14:56 +0100
committerLibravatar Kristóf Marussy <kristof@marussy.com>2024-02-25 13:17:27 +0100
commit26e8505f29227c79c21aa6f32226ba341481c898 (patch)
treeb856a608bba3d6e3c74a6044ea3ceb7326f2534d
parentfix(web): Sonar security issue (diff)
downloadrefinery-26e8505f29227c79c21aa6f32226ba341481c898.tar.gz
refinery-26e8505f29227c79c21aa6f32226ba341481c898.tar.zst
refinery-26e8505f29227c79c21aa6f32226ba341481c898.zip
refactor(web): improve web app styling
-rw-r--r--subprojects/frontend/src/RootStore.ts6
-rw-r--r--subprojects/frontend/src/TopBar.tsx4
2 files changed, 8 insertions, 2 deletions
diff --git a/subprojects/frontend/src/RootStore.ts b/subprojects/frontend/src/RootStore.ts
index c029f746..01b04305 100644
--- a/subprojects/frontend/src/RootStore.ts
+++ b/subprojects/frontend/src/RootStore.ts
@@ -89,7 +89,11 @@ export default class RootStore {
89 if (simpleName === undefined) { 89 if (simpleName === undefined) {
90 document.title = 'Refinery'; 90 document.title = 'Refinery';
91 } else { 91 } else {
92 document.title = `${unsavedChanges ? '\u25cf ' : ''}${simpleName} - Refinery`; 92 // Chromium web apps don't like whe the file name precedes the app name,
93 // and turn `filename - Refinery` into `Refinery - filename - Refinery`.
94 // We elect to use just `Refinery - filename` instead.
95 // Change indicator in a style similar to VSCodium.
96 document.title = `Refinery - ${unsavedChanges ? '\u25cf ' : ''}${simpleName}`;
93 } 97 }
94 }); 98 });
95 } 99 }
diff --git a/subprojects/frontend/src/TopBar.tsx b/subprojects/frontend/src/TopBar.tsx
index 738052c7..6c9c4f7e 100644
--- a/subprojects/frontend/src/TopBar.tsx
+++ b/subprojects/frontend/src/TopBar.tsx
@@ -92,7 +92,9 @@ const FileName = styled('span', {
92 fontWeight: theme.typography.fontWeightLight, 92 fontWeight: theme.typography.fontWeightLight,
93 fontSize: '1.25rem', 93 fontSize: '1.25rem',
94 lineHeight: '1.6rem', 94 lineHeight: '1.6rem',
95 fontStyle: unsavedChanges ? 'italic' : 'normal', 95 color: unsavedChanges
96 ? theme.palette.text.primary
97 : theme.palette.text.secondary,
96})); 98}));
97 99
98export default observer(function TopBar(): JSX.Element { 100export default observer(function TopBar(): JSX.Element {