QK Soft Green
Publisher: zrainxThemes in package: 1
柔绿护眼配色主题 — 基于 Solarized Light,将 UI 配色替换为柔和的绿色调,长时间编码不累眼
柔绿护眼配色主题 — 基于 Solarized Light,将 UI 配色替换为柔和的绿色调,长时间编码不累眼
Full workbench mockup using this variant's colors and tokenColors.
Loading...
Workbench UI color keys from the theme JSON colors map.
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| — | #657B83 | — |
| meta.embedded, source.groovy.embedded, string meta.image.inline.markdown, variable.legacy.builtin.python | #657B83 | — |
| comment | #93A1A1 | italic |
| string | #2AA198 | — |
| string.regexp | #DC322F | — |
| constant.numeric | #D33682 | — |
| variable.language, variable.other | #268BD2 | — |
| keyword | #859900 | — |
| storage | #586E75 | bold |
| entity.name.class, entity.name.type, entity.name.namespace, entity.name.scope-resolution | #CB4B16 | |
| entity.name.function | #268BD2 | — |
| punctuation.definition.variable | #859900 | — |
| punctuation.section.embedded.begin, punctuation.section.embedded.end | #DC322F | — |
| constant.language, meta.preprocessor | #B58900 | — |
| support.function.construct, keyword.other.new | #CB4B16 | — |
| constant.character, constant.other | #CB4B16 | — |
| entity.other.inherited-class, punctuation.separator.namespace.ruby | #6C71C4 | — |
| variable.parameter | — | — |
| entity.name.tag | #268BD2 | — |
| punctuation.definition.tag | #93A1A1 | — |
| entity.other.attribute-name | #93A1A1 | — |
| support.function | #268BD2 | — |
| punctuation.separator.continuation | #DC322F | — |
| support.constant, support.variable | — | — |
| support.type, support.class | #859900 | — |
| support.type.exception | #CB4B16 | — |
| support.other.variable | — | — |
| invalid | #DC322F | — |
| meta.diff, meta.diff.header | #268BD2 | italic |
| markup.deleted | #DC322F | |
| markup.changed | #CB4B16 | |
| markup.inserted | #859900 | — |
| markup.quote | #859900 | — |
| markup.list | #B58900 | — |
| markup.bold, markup.italic | #D33682 | — |
| markup.bold | — | bold |
| markup.italic | — | italic |
| markup.strikethrough | — | strikethrough |
| markup.inline.raw | #2AA198 | |
| markup.heading | #268BD2 | bold |
| markup.heading.setext | #268BD2 |
export interface User {
id: string;
name: string;
role: "admin" | "member";
tags: string[];
}
/**
* Fetch user data by ID
* @param id
* @returns User object or null if ID is invalid
*/
export async function fetchUser(id: string): Promise<User | null> {
if (!id) {
return null;
}
const response = await fetch(`/api/users/${id}`, {
method: "GET",
headers: { Accept: "application/json" },
});
if (!response.ok) {
throw new Error(`HTTP ${response.status}`);
}
return (await response.json()) as User;
}
function greet(user: User): string {
// Simple greeting function that uses the user's name
return `Hello, ${user.name}!`;
}