Skip to content

Commit

Permalink
优化英文下的展示与文档 (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
shalldie committed Jan 24, 2024
1 parent 57b6b13 commit 0b1e368
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 15 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@ English | [中文](./README.zh-CN.md)
[![Build Status](https://img.shields.io/github/actions/workflow/status/shalldie/tnote/ci.yml?logo=github&style=flat-square)](https://github.com/shalldie/tnote/actions)
[![License](https://img.shields.io/github/license/shalldie/tnote?logo=github&style=flat-square)](https://github.com/shalldie/tnote)

<img src="https://github.com/shalldie/tnote/assets/9987486/1964cbc5-3a10-47a1-9d13-66f8debb8ad0" width="900">
<img src="https://github.com/shalldie/tnote/assets/9987486/109dac72-1596-46d5-a727-e939f74a0fd2" width="900">

</div>

<!-- 封面区域 end -->

`tnote` is a notepad application running on `Terminal`, allowing you to quickly access, synchronize content, and record your life on different devices.
`tnote` is a notepad application running on `Terminal`, allowing you to quickly access, synchronize content, and record your idea on different devices.

- [x] Application 🎯
- [x] Shortcut keys, mouse operations
- [x] Storage cloud persistence
- [x] Cloud storage persistence
- [x] i18n
- [x] Files
- [x] Add, delete, check, and modify
- [x] Detail 📝
- [x] Markdown highlight
- [x] Markdown highlighted
- [x] Edit and save
- [x] Installation
- [x] binary
Expand All @@ -53,7 +53,7 @@ The application is built on GitHub Gist and requires [applying for an access tok
export TNOTE_GIST_TOKEN="<your_access_token>"
```

| 环境变量 | 默认值 | 描述 |
| Environment Variable | Default | Description |
| :-------------------- | :-----: | :---------------------------------------------------- |
| `TNOTE_GIST_TOKEN` | | `access token` applied for |
| `TNOTE_LANG` / `LANG` | `en_US` | Language preferred, optional values: `en_US``zh_CN` |
Expand All @@ -62,7 +62,7 @@ export TNOTE_GIST_TOKEN="<your_access_token>"

### 1. binary

[Download](https://github.com/shalldie/tnote/releases), download and execute it, adding to `PATH`` would be even better.
[Download](https://github.com/shalldie/tnote/releases), download and execute it, adding to `PATH` would be even better.

| File | OS |
| :------------------- | :----------------------- |
Expand Down
6 changes: 3 additions & 3 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@
[![Build Status](https://img.shields.io/github/actions/workflow/status/shalldie/tnote/ci.yml?logo=github&style=flat-square)](https://github.com/shalldie/tnote/actions)
[![License](https://img.shields.io/github/license/shalldie/tnote?logo=github&style=flat-square)](https://github.com/shalldie/tnote)

<img src="https://github.com/shalldie/tnote/assets/9987486/1964cbc5-3a10-47a1-9d13-66f8debb8ad0" width="900">
<img src="https://github.com/shalldie/tnote/assets/9987486/109dac72-1596-46d5-a727-e939f74a0fd2" width="900">

</div>

<!-- 封面区域 end -->

`tnote` 是一个运行在 `Terminal` 的记事本应用程序,让你可以在不同设备快速访问、同步内容,记录自己的生活
`tnote` 是一个运行在 `Terminal` 的记事本应用程序,让你可以在不同设备快速访问、同步内容,记录自己的想法

- [x] 应用 🎯
- [x] 快捷键、鼠标操作
- [x] 存储云端持久化
- [x] 云端存储持久化
- [x] 国际化
- [x] 文件
- [x] 增删查改
Expand Down
6 changes: 3 additions & 3 deletions internal/app/file_list/i18n_tpl.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ key_down:
en_US: down
zh_CN: 下
key_pgup:
en_US: prev page
en_US: prev pg
zh_CN: 上一页
key_pgdown:
en_US: next page
en_US: next pg
zh_CN: 下一页
key_filter:
en_US: filter
Expand All @@ -71,7 +71,7 @@ key_filter_less:
zh_CN: 折叠
# key custom
key_new:
en_US: new file
en_US: new
zh_CN: 新建
key_rename:
en_US: rename
Expand Down
4 changes: 2 additions & 2 deletions internal/app/file_panel/markdown.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ func (m MarkdownModel) Update(msg tea.Msg) (MarkdownModel, tea.Cmd) {
}

// 向下滚动
if msg.Button == tea.MouseButtonWheelDown && msg.Action == tea.MouseActionPress {
if msg.Button == tea.MouseButtonWheelDown && msg.Action == tea.MouseActionPress && m.Active {
m.Viewport.SetYOffset(m.Viewport.YOffset + 1)
}
// 向上 滚动
if msg.Button == tea.MouseButtonWheelUp && msg.Action == tea.MouseActionPress {
if msg.Button == tea.MouseButtonWheelUp && msg.Action == tea.MouseActionPress && m.Active {
m.Viewport.SetYOffset(m.Viewport.YOffset - 1)
}
// 点击
Expand Down
2 changes: 1 addition & 1 deletion internal/conf/conf.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

var (
// 版本
VERSION = "v1.1.0"
VERSION = "v1.2.0"
// filelist 宽度
FileListWidth = 42
)
Expand Down
1 change: 1 addition & 0 deletions internal/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ func RenderMarkdown(content string, width int) string {
r, _ := glamour.NewTermRenderer(
glamour.WithWordWrap(width),
glamour.WithStandardStyle(background),
glamour.WithPreservedNewLines(),
// glamour.WithAutoStyle(),
)

Expand Down

0 comments on commit 0b1e368

Please sign in to comment.