Skip to content

Commit

Permalink
更新设置 fix #108
Browse files Browse the repository at this point in the history
  • Loading branch information
frostime committed Jun 4, 2023
1 parent a715a31 commit b3423a1
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/components/setting.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,13 @@
import { onDestroy, onMount } from "svelte";
import { settings } from "../global-status";
import { i18n } from "../utils";
import {eventBus} from "../event-bus";
import SettingItem from "./setting-item.svelte";
let checked = settings.get("OpenOnStart");
let defaultNotebook = settings.get("DefaultNotebook");
let iconPosition = settings.get("IconPosition");
let contents = i18n.Setting;
function onClick() {
eventBus.publish("UpdateAll");
}
onMount(() => {
console.log("Setting Svelte Mounted");
});
Expand Down Expand Up @@ -68,10 +63,9 @@
settingValue={settings.get("ExpandGutterMenu")}
/>
<SettingItem
type="button"
content={contents.update}
settingKey="Update"
settingValue={""}
on:click={onClick}
type="checkbox"
content={contents.PopupReserveDialog}
settingKey="PopupReserveDialog"
settingValue={settings.get("PopupReserveDialog")}
/>
</div>
2 changes: 2 additions & 0 deletions src/i18n/CHANGELOG_en_US-1.1.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ This minor update mainly optimizes some feature details, see [Milestone V1.1.2](
- Cancelling reservation: When tapping on the menu of a block that is already booked, the button that says 'Reserve this block' will now say 'Cancel reservation'
- Expand the feature menu to show by default: The new version of SiYuan now organises all of the plugin's menus under a secondary menu. The plugin now expands all function menus by default under the secondary menu of 'Plugins' instead of the tertiary menu of 'Plugins - Daily Note Today'. This is a configurable option that you can change in the settings.
- Block menu related settings take effect directly. All three of the existing block-related menus take effect directly after the change is made, without the need to restart the plugin.
- Added option to choose whether to display a confirmation window when reserving a block.
- Removed "Update All" button from settings.

#### Fix

Expand Down
2 changes: 2 additions & 0 deletions src/i18n/CHANGELOG_zh_CN-1.1.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
- 取消预约:现在点开一个已经预约的块的菜单,原本「预约此块」的按钮会变成「取消预约」
- 默认将功能菜单展开显示:新版本的 SiYuan 现在把所有插件的菜单全部收纳到一个二级菜单下。现在插件会默认把所有的功能菜单全部展开在「插件」的二级菜单下,而非「插件-今日笔记」的三级菜单下。这是一个可配置的选项,你可以在设置中更改。
- 块菜单相关设置直接生效。目前已有的三个和块相关的菜单都在更改后直接生效,不需要再重启插件。
- 增加设置,可以选择预约块时是否弹出确认窗口
- 去掉了设置中「更新全部」的按钮

#### Fix

Expand Down
4 changes: 4 additions & 0 deletions src/i18n/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@
"ExpandGutterMenu": {
"title": "Expand all block menu items",
"text": "When enabled, the plugin's block menu items are expanded to appear as a separate secondary menu under the plugin menu"
},
"PopupReserveDialog": {
"title": "Popup Confirmation Window When Reserving a Block",
"text": "Automatically displays a confirmation window when reserving a block to ensure the date is correct."
}
},
"Open": "Open daily note",
Expand Down
4 changes: 4 additions & 0 deletions src/i18n/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@
"ExpandGutterMenu": {
"title": "将所有块菜单项目展开",
"text": "启用后, 插件的块菜单项目都会展开到插件菜单下作为独立的二级菜单显示"
},
"PopupReserveDialog": {
"title": "预约块时弹出确认窗口",
"text": "预约块的时候自动弹出确认窗口, 确保日期无误"
}
},
"Open": "打开日记",
Expand Down

0 comments on commit b3423a1

Please sign in to comment.