Files
obsidian-rss-union/setting/plugin_settings.ts

37 lines
1.1 KiB
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
export interface RssUnionSettings {
/** 网站根地址,例如 https://example.com(不带结尾斜杠) */
siteUrl: string;
/** 会员中心生成的授权码 */
authCode: string;
/** 文章列表每页条数 */
pageSize: number;
/** 阅读窗口打开位置:tab = 新标签页(稳),split = 当前面板右侧分栏 */
openMode: "split" | "tab";
/** 「保存为笔记」时的目录 */
saveFolder: string;
/** 自动刷新间隔(分钟),0 = 关闭 */
autoRefreshMin: number;
/** 上次验证得到的会员名,设置页展示用 */
verifyName: string;
/** 上次验证时间(ISO 字符串) */
verifyAt: string;
}
/**
* 默认用「新标签页」
*
* split 出来的新 leaf 在部分 Obsidian 版本里,setViewState 时 header 还没建好,
* Obsidian 内部会对 null 的 title 元素调 setText 抛错,整个 view 打不开。
* tab 走的路径稳定,默认给它;想要分栏的可以自己在设置里改。
*/
export const DEFAULT_SETTINGS: RssUnionSettings = {
siteUrl: "",
authCode: "",
pageSize: 30,
openMode: "tab",
saveFolder: "RssUnion",
autoRefreshMin: 5,
verifyName: "",
verifyAt: "",
};