feat(login): More consistent styling
This commit is contained in:
@@ -41,7 +41,7 @@ export class ExtensionSelectorComponent extends Container {
|
|||||||
this.addChild(new DynamicBorder());
|
this.addChild(new DynamicBorder());
|
||||||
this.addChild(new Spacer(1));
|
this.addChild(new Spacer(1));
|
||||||
|
|
||||||
this.titleText = new Text(theme.fg("accent", title), 1, 0);
|
this.titleText = new Text(theme.fg("accent", theme.bold(title)), 1, 0);
|
||||||
this.addChild(this.titleText);
|
this.addChild(this.titleText);
|
||||||
this.addChild(new Spacer(1));
|
this.addChild(new Spacer(1));
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ export class ExtensionSelectorComponent extends Container {
|
|||||||
this.countdown = new CountdownTimer(
|
this.countdown = new CountdownTimer(
|
||||||
opts.timeout,
|
opts.timeout,
|
||||||
opts.tui,
|
opts.tui,
|
||||||
(s) => this.titleText.setText(theme.fg("accent", `${this.baseTitle} (${s}s)`)),
|
(s) => this.titleText.setText(theme.fg("accent", theme.bold(`${this.baseTitle} (${s}s)`))),
|
||||||
() => this.onCancelCallback(),
|
() => this.onCancelCallback(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ export class LoginDialogComponent extends Container implements Focusable {
|
|||||||
this.addChild(new DynamicBorder());
|
this.addChild(new DynamicBorder());
|
||||||
|
|
||||||
// Title
|
// Title
|
||||||
this.addChild(new Text(theme.fg("warning", `Login to ${providerName}`), 1, 0));
|
this.addChild(new Text(theme.fg("accent", theme.bold(`Login to ${providerName}`)), 1, 0));
|
||||||
|
|
||||||
// Dynamic content area
|
// Dynamic content area
|
||||||
this.contentContainer = new Container();
|
this.contentContainer = new Container();
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ export class OAuthSelectorComponent extends Container implements Focusable {
|
|||||||
|
|
||||||
// Add title
|
// Add title
|
||||||
const title = mode === "login" ? "Select provider to configure:" : "Select provider to logout:";
|
const title = mode === "login" ? "Select provider to configure:" : "Select provider to logout:";
|
||||||
this.addChild(new TruncatedText(theme.bold(title)));
|
this.addChild(new TruncatedText(theme.fg("accent", theme.bold(title)), 1, 0));
|
||||||
this.addChild(new Spacer(1));
|
this.addChild(new Spacer(1));
|
||||||
|
|
||||||
this.searchInput = new Input();
|
this.searchInput = new Input();
|
||||||
@@ -122,16 +122,16 @@ export class OAuthSelectorComponent extends Container implements Focusable {
|
|||||||
const text = theme.fg("accent", provider.name);
|
const text = theme.fg("accent", provider.name);
|
||||||
line = prefix + text + statusIndicator;
|
line = prefix + text + statusIndicator;
|
||||||
} else {
|
} else {
|
||||||
const text = ` ${provider.name}`;
|
const text = ` ${theme.fg("text", provider.name)}`;
|
||||||
line = text + statusIndicator;
|
line = text + statusIndicator;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.listContainer.addChild(new TruncatedText(line, 0, 0));
|
this.listContainer.addChild(new TruncatedText(line, 1, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (startIndex > 0 || endIndex < this.filteredProviders.length) {
|
if (startIndex > 0 || endIndex < this.filteredProviders.length) {
|
||||||
const scrollInfo = theme.fg("muted", ` (${this.selectedIndex + 1}/${this.filteredProviders.length})`);
|
const scrollInfo = theme.fg("muted", ` (${this.selectedIndex + 1}/${this.filteredProviders.length})`);
|
||||||
this.listContainer.addChild(new TruncatedText(scrollInfo, 0, 0));
|
this.listContainer.addChild(new TruncatedText(scrollInfo, 1, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show "no providers" if empty
|
// Show "no providers" if empty
|
||||||
@@ -142,7 +142,7 @@ export class OAuthSelectorComponent extends Container implements Focusable {
|
|||||||
? "No providers available"
|
? "No providers available"
|
||||||
: "No providers logged in. Use /login first."
|
: "No providers logged in. Use /login first."
|
||||||
: "No matching providers";
|
: "No matching providers";
|
||||||
this.listContainer.addChild(new TruncatedText(theme.fg("muted", ` ${message}`), 0, 0));
|
this.listContainer.addChild(new TruncatedText(theme.fg("muted", ` ${message}`), 1, 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user