mirror of
https://github.com/tiennm99/ccstatusline.git
synced 2026-08-08 22:24:07 +00:00
Fix display of powerline font installation message
This commit is contained in:
+11
-7
@@ -441,14 +441,18 @@ export const App: React.FC = () => {
|
||||
}}
|
||||
onInstallFonts={() => {
|
||||
setInstallingFonts(true);
|
||||
void installPowerlineFonts().then((result) => {
|
||||
setInstallingFonts(false);
|
||||
setFontInstallMessage(result.message);
|
||||
// Refresh font status
|
||||
void checkPowerlineFontsAsync().then((asyncStatus) => {
|
||||
setPowerlineFontStatus(asyncStatus);
|
||||
// Add a small delay to allow React to render the "Installing..." message
|
||||
// before the blocking execSync calls in installPowerlineFonts
|
||||
setTimeout(() => {
|
||||
void installPowerlineFonts().then((result) => {
|
||||
setInstallingFonts(false);
|
||||
setFontInstallMessage(result.message);
|
||||
// Refresh font status
|
||||
void checkPowerlineFontsAsync().then((asyncStatus) => {
|
||||
setPowerlineFontStatus(asyncStatus);
|
||||
});
|
||||
});
|
||||
});
|
||||
}, 50);
|
||||
}}
|
||||
installingFonts={installingFonts}
|
||||
fontInstallMessage={fontInstallMessage}
|
||||
|
||||
Reference in New Issue
Block a user