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
@@ -1,4 +1,4 @@
# next_term ⚡
# hatty ⚡
> 一个超高颜值、极速响应、功能丰富的现代 Linux 终端模拟器。
@@ -57,7 +57,7 @@ npm run rebuild
## 🛠️ 架构分层
```
next_term/
hatty/
├── src/
│ ├── main/
│ │ ├── index.cjs # Electron 主进程,无边框透明窗口与 IPC 路由
+2 -2
View File
@@ -1,7 +1,7 @@
{
"name": "next_term",
"name": "hatty",
"version": "1.0.0",
"description": "",
"description": "hatty - 一个超高颜值、极速响应的现代 Linux 终端",
"main": "src/main/index.cjs",
"scripts": {
"start": "electron .",
+3
View File
@@ -3,11 +3,14 @@ const path = require('path');
const os = require('os');
const { PtyManager } = require('./pty-manager.cjs');
app.setName('hatty');
let mainWindow = null;
let ptyManager = null;
function createWindow() {
mainWindow = new BrowserWindow({
title: 'hatty',
width: 1060,
height: 680,
minWidth: 600,
+2 -2
View File
@@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline' data:; style-src 'self' 'unsafe-inline';">
<title>next_term - 现代 Linux 高性能终端</title>
<title>hatty - 现代 Linux 高性能终端</title>
<!-- 引入 xterm 基础样式与各功能模块样式 -->
<link rel="stylesheet" href="../../node_modules/@xterm/xterm/css/xterm.css">
@@ -24,7 +24,7 @@
<polyline points="4 17 10 11 4 5"></polyline>
<line x1="12" y1="19" x2="20" y2="19"></line>
</svg>
<span>next_term</span>
<span>hatty</span>
</div>
<!-- 标签页栏 -->
+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);