chore: rename software to hatty
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user