Skip to content

Commit

Permalink
release: 3.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
zyyzyykk committed Dec 7, 2024
1 parent ee8a2ac commit e3cc4ad
Show file tree
Hide file tree
Showing 22 changed files with 143 additions and 106 deletions.
44 changes: 22 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
>
> Preview: https://ssh.kkbpro.com/ (For domestic servers) or https://ssh.kkbapps.com/ (For foreign servers)
>
> Update Time: 2024-11-29
> Update Time: 2024-12-07
>
<p align="center"><a href="https://ssh.kkbpro.com/" target="_blank" rel="noopener noreferrer"><img width="100" src="http://img.kkbapps.com/logo/terminal.png" alt="kkTerminal"></a></p>
Expand Down Expand Up @@ -68,13 +68,13 @@ Visit the following website:
- 🌐 For domestic servers: https://ssh.kkbpro.com/
- 🌍 For foreign servers: https://ssh.kkbapps.com/

![Connect](http://img.kkbapps.com/terminal/Connect-3.3.3.png)
![Connect](http://img.kkbapps.com/terminal/Connect-en-3.4.2.png)

![Preference](http://img.kkbapps.com/terminal/Preference-3.3.3.png)
![Preference](http://img.kkbapps.com/terminal/Preference-en-3.4.2.png)

![File](http://img.kkbapps.com/terminal/File-3.3.7.png)
![File](http://img.kkbapps.com/terminal/File-en-3.4.2.png)

![Editor](http://img.kkbapps.com/terminal/Editor-3.3.3.png)
![Editor](http://img.kkbapps.com/terminal/Editor-en-3.4.2.png)

[**More Module Previews**](./doc/en_US/MODULE.md)

Expand All @@ -84,30 +84,37 @@ Visit the following website:

2.Support the use of `iframe` tags in web pages for quick integration into third-party websites

3.Supports local PC deployment, automatically opens browser window upon startup
3.Supports internationalization and language switching between Chinese and English

4.Support adaptive window size and Chinese input
4.Supports local PC deployment, automatically opens browser window upon startup

5.Support custom preference settings, allowing users to choose the background/foreground color, font size, cursor display style and enable TCode for the terminal
5.Support adaptive window size and Chinese input

6.Support restart: It will automatically restart after modifying SSH connection settings or custom preference settings, or can be manually restarted after SSH connection is disconnected
6.Support custom preference settings, allowing users to choose the background/foreground color, font size, cursor display style and enable TCode for the terminal

7.Support copy and paste:
7.Support restart: It will automatically restart after modifying SSH connection settings or custom preference settings, or can be manually restarted after SSH connection is disconnected

8.Support copy and paste:

- Copy: Same as `Git` terminal, selecting text will automatically copy it
- Paste: Same as `Cmd` terminal, right-click to paste (requires browser access permission)

8.Support file management, open the File Management Module to view, decompress, upload and download files/folders
9.Support file management, open the File Management Module to view, decompress, upload and download files/folders

9.Support shortcut key operations such as multiple/all file selection, copy and paste, cut, selection switch, open
10.Support shortcut key operations such as multiple/all file selection, copy and paste, cut, selection switch, open

10.Support file browsing and editing, modify the file and save it to a remote server using `ctrl+s`
11.Support file browsing and editing, modify the file and save it to a remote server using `ctrl+s`

11.Support [TCode (Terminal Code)](./doc/en_US/TCODE.md),which can achieve automated Workflow similar to Shell scripts through Customized TCode
12.Support [TCode (Terminal Code)](./doc/en_US/TCODE.md),which can achieve automated Workflow similar to Shell scripts through Customized TCode

### 👨‍💻 Update Records

##### zyyzyykk/kkterminal:3.4.0: latest
##### zyyzyykk/kkterminal:3.4.2: latest

- Implement internationalization and support language switching between Chinese and English
- Refactored some logic of code

##### zyyzyykk/kkterminal:3.4.0:

- Add SSH Option and custom TCode deletion function
- Fixed folder pasting failure bug in File Module
Expand All @@ -120,13 +127,6 @@ Visit the following website:
- Add file item keyboard selection switch and open
- Optimization of hidden file icon style

##### zyyzyykk/kkterminal:3.3.3:

- Add compressed file decompression function
- Fixed the bug of file loss caused by folder drag upload
- Added preview for browser native supported format files
- Optimize the interface display of File Management Module

[**History Update Records**](./doc/en_US/UPDATE.md)

### 🧬 Architecture
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
/**
* 返回结果的信息类
*/
@Component
@Data
@NoArgsConstructor
@AllArgsConstructor
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
package com.kkbpro.terminal.utils;

import com.alibaba.fastjson.JSON;
import org.springframework.stereotype.Component;

import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.Map;

@Component
public class I18nUtil {

// 语言
Expand All @@ -21,10 +19,18 @@ public class I18nUtil {
// load en_US messages
static {
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
Path filePath = null;
try {
filePath = Paths.get(classLoader.getResource("locales/en_US.json").toURI());
String jsonContent = new String(Files.readAllBytes(filePath));
// 使用 getResourceAsStream() 从类路径加载资源
try(InputStream inputStream = classLoader.getResourceAsStream("locales/en_US.json")) {
// 手动读取输入流内容
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
byte[] buffer = new byte[1024];
int bytesRead;
while ((bytesRead = inputStream.read(buffer)) != -1) {
byteArrayOutputStream.write(buffer, 0, bytesRead);
}

// 将字节流转换为字符串
String jsonContent = byteArrayOutputStream.toString(StandardCharsets.UTF_8.name());
Map<String, String> messages = JSON.parseObject(jsonContent, Map.class);
messagesCache.put("en", messages);
} catch (Exception e) {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

Loading

0 comments on commit e3cc4ad

Please sign in to comment.