-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Basic palette selector #25
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks so much for doing this! I'll have to check it out before we merge, but probably works great :)
@@ -68,6 +66,16 @@ | |||
export let termEl: HTMLDivElement = null as any; // suppress "missing prop" warning | |||
let term: Terminal | null = null; | |||
|
|||
import { settings } from "$lib/settings"; | |||
import type { ITheme } from "xterm"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should move imports to the top of the file and sort them
<div class="text-red-500">Coming soon</div> | ||
<div> | ||
<select | ||
class="w-52 px-3 py-1.5 rounded-md bg-zinc-700 outline-none focus:ring-2 focus:ring-indigo-500" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From your screenshot, the arrow at the right side of the dropdown (when closed) is a bit too close to the right edge of the element
let theme: ITheme = themes.defaultDark; | ||
|
||
$: if ($settings.theme && term) { | ||
theme = themes[$settings.theme]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we fall back to defaultDark if this is undefined?
Hi @Cveinnt, any update on this? |
Hi @Cveinnt — I haven't gotten a response in 3 months, hope all is well. I'll use this as the base of implementing the feature now. |
Description
This PR implements a basic palette selector in the form of a dropdown menu, and added some basic themes for the users to choose from. The preset themes are converted from https://github.com/alacritty/alacritty-theme/.
Dropdown menu preview:
Example theme preview: