chore: rename software to hatty

This commit is contained in:
2026-09-23 00:18:31 +08:00
parent cbc953948c
commit 6d315447a1
7 changed files with 14 additions and 11 deletions
+2 -2
View File
@@ -20,7 +20,7 @@ export class SettingsModal {
theme: themeManager.currentThemeKey,
};
try {
const saved = JSON.parse(localStorage.getItem('next_term:settings') || '{}');
const saved = JSON.parse(localStorage.getItem('hatty:settings') || localStorage.getItem('next_term:settings') || '{}');
return { ...defaults, ...saved };
} catch {
return defaults;
@@ -28,7 +28,7 @@ export class SettingsModal {
}
saveSettings() {
localStorage.setItem('next_term:settings', JSON.stringify(this.settings));
localStorage.setItem('hatty:settings', JSON.stringify(this.settings));
this.applyAll();
}
+1 -1
View File
@@ -23,7 +23,7 @@ export class TerminalView {
initTerminal() {
const currentTheme = themeManager.getCurrentTheme();
const config = JSON.parse(localStorage.getItem('next_term:settings') || '{}');
const config = JSON.parse(localStorage.getItem('hatty:settings') || localStorage.getItem('next_term:settings') || '{}');
const fontSize = config.fontSize || 14;
const fontFamily = config.fontFamily || "'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace";
const cursorStyle = config.cursorStyle || 'block';
+2 -2
View File
@@ -144,7 +144,7 @@ export const THEMES = {
class ThemeManager {
constructor() {
this.currentThemeKey = localStorage.getItem('next_term:theme') || 'tokyo-night';
this.currentThemeKey = localStorage.getItem('hatty:theme') || localStorage.getItem('next_term:theme') || 'tokyo-night';
this.listeners = new Set();
}
@@ -159,7 +159,7 @@ class ThemeManager {
applyTheme(themeKey) {
if (!THEMES[themeKey]) themeKey = 'tokyo-night';
this.currentThemeKey = themeKey;
localStorage.setItem('next_term:theme', themeKey);
localStorage.setItem('hatty:theme', themeKey);
const theme = THEMES[themeKey];
document.documentElement.setAttribute('data-theme', theme.themeName);