Skip to content

Commit 4820dc2

Browse files
committed
feat: v1.4.5
1 parent 9457618 commit 4820dc2

File tree

5 files changed

+24
-7
lines changed

5 files changed

+24
-7
lines changed

.github/workflows/release.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,18 @@ jobs:
3535
VERSION=$(jq -r '.version' package.json)
3636
echo "version=$VERSION" >> $GITHUB_OUTPUT
3737
38+
- name: Get changelog body
39+
id: read_changelog
40+
run: |
41+
awk -v ver="${{ steps.read_version.outputs.version }}" '
42+
/^## / {
43+
if (found) exit
44+
if ($0 ~ "^## " ver "( |$)" ) { found=1; print; next }
45+
next
46+
}
47+
found { print }
48+
' CHANGELOG.md > RELEASE_NOTES.md
49+
3850
- name: Update version in manifest file
3951
run: |
4052
sed -i '' "s|version=0.0.1|version=${{ steps.read_version.outputs.version }}|" app/manifest
@@ -84,7 +96,6 @@ jobs:
8496
with:
8597
tag: v${{ steps.read_version.outputs.version}}
8698
name: v${{ steps.read_version.outputs.version}}
87-
body: |
88-
[更新日志](https://github.com/FNOSP/App.Bin.CodeEditor/blob/main/CHANGELOG.md)
99+
body_path: RELEASE_NOTES.md
89100
artifacts: "code.editor.x86.fpk,code.editor.arm.fpk"
90101
token: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# 更新日志
22

3+
## 1.4.5
4+
5+
- 修复:偏好设置 markdown 默认预览影响到其他文件
6+
37
## 1.4.4
48

59
- 新增:markdown 文件支持预览

frontend/src/components/MdView.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ watchEffect(async () => {
2323
top: 0;
2424
height: 100%;
2525
width: 100%;
26-
padding: 20px;
26+
padding: 0 20px;
2727
box-sizing: border-box;
2828
overflow: auto;
2929
}

frontend/src/components/MonacoEditor.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
<div style="flex: 1; position: relative">
33
<MonacoEditor
44
v-if="code.lang"
5-
v-show="!mdView"
5+
v-show="!showMdView"
66
v-model:value="code.value"
77
:language="code.lang"
88
:theme="like.cfg.theme"
99
:options="{ automaticLayout: true, ...like.cfg.editorOption }"
1010
@editorDidMount="editorDidMount"
1111
/>
1212

13-
<MdView v-show="mdView" :text="code.value" />
13+
<MdView v-show="showMdView" :text="code.value" />
1414
</div>
1515

1616
<div class="footer">
@@ -61,7 +61,7 @@
6161
</template>
6262

6363
<script setup lang="ts">
64-
import { onMounted, ref, watch } from 'vue'
64+
import { computed, onMounted, ref, watch } from 'vue'
6565
import MonacoEditor from 'monaco-editor-vue3'
6666
import * as iconv from 'iconv-lite'
6767
@@ -81,6 +81,8 @@ const like = useLikeStore()
8181
8282
const mdView = ref(like.cfg.fileMdView)
8383
84+
const showMdView = computed(() => code.lang === 'markdown' && mdView)
85+
8486
defineExpose({
8587
save: () => save(),
8688
})

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "code.editor",
3-
"version": "1.4.4",
3+
"version": "1.4.5",
44
"changelog": "<div>新增:图片查看,支持同级快速预览</div><div>新增:PDF 阅读,支持索引跳转和缩放</div><div>新增:支持刷新目录和在目录下创建文件</div><div>新增:偏好设置-启动时询问,可在桌面图标访问时不询问开启</div><div>新增:markdown 文件支持预览</div><div>新增:偏好设置支持设置打开 markdown 时默认预览</div>",
55
"scripts": {
66
"dev": "node src/app.js",

0 commit comments

Comments
 (0)