models.js 92 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144
  1. // @ts-check
  2. // Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
  3. // This file is automatically generated. DO NOT EDIT
  4. // eslint-disable-next-line @typescript-eslint/ban-ts-comment
  5. // @ts-ignore: Unused imports
  6. import { Create as $Create } from "@wailsio/runtime";
  7. /**
  8. * APIStatus API 服务运行状态,供「主机」页展示
  9. */
  10. export class APIStatus {
  11. /**
  12. * Creates a new APIStatus instance.
  13. * @param {Partial<APIStatus>} [$$source = {}] - The source object to create the APIStatus.
  14. */
  15. constructor($$source = {}) {
  16. if (!("addr" in $$source)) {
  17. /**
  18. * 当前监听地址
  19. * @member
  20. * @type {string}
  21. */
  22. this["addr"] = "";
  23. }
  24. if (!("running" in $$source)) {
  25. /**
  26. * 是否正在监听
  27. * @member
  28. * @type {boolean}
  29. */
  30. this["running"] = false;
  31. }
  32. if (!("startedAt" in $$source)) {
  33. /**
  34. * 启动时间
  35. * @member
  36. * @type {string}
  37. */
  38. this["startedAt"] = "";
  39. }
  40. if (!("error" in $$source)) {
  41. /**
  42. * 最近错误信息
  43. * @member
  44. * @type {string}
  45. */
  46. this["error"] = "";
  47. }
  48. Object.assign(this, $$source);
  49. }
  50. /**
  51. * Creates a new APIStatus instance from a string or object.
  52. * @param {any} [$$source = {}]
  53. * @returns {APIStatus}
  54. */
  55. static createFrom($$source = {}) {
  56. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  57. return new APIStatus(/** @type {Partial<APIStatus>} */($$parsedSource));
  58. }
  59. }
  60. /**
  61. * AppSettings 保存全部可自定义配置,序列化为 JSON 存于用户配置目录
  62. */
  63. export class AppSettings {
  64. /**
  65. * Creates a new AppSettings instance.
  66. * @param {Partial<AppSettings>} [$$source = {}] - The source object to create the AppSettings.
  67. */
  68. constructor($$source = {}) {
  69. if (!("theme" in $$source)) {
  70. /**
  71. * 界面主题:dark / light
  72. * @member
  73. * @type {string}
  74. */
  75. this["theme"] = "";
  76. }
  77. if (!("autostart" in $$source)) {
  78. /**
  79. * 系统启动时运行
  80. * @member
  81. * @type {boolean}
  82. */
  83. this["autostart"] = false;
  84. }
  85. if (!("alwaysOnTop" in $$source)) {
  86. /**
  87. * 窗口置顶
  88. * @member
  89. * @type {boolean}
  90. */
  91. this["alwaysOnTop"] = false;
  92. }
  93. if (!("startCompact" in $$source)) {
  94. /**
  95. * 启动时自动收拢为圆点(窗口缩小)
  96. * @member
  97. * @type {boolean}
  98. */
  99. this["startCompact"] = false;
  100. }
  101. if (!("windowWidth" in $$source)) {
  102. /**
  103. * 主窗口宽度(px),随窗口调整自动保存
  104. * @member
  105. * @type {number}
  106. */
  107. this["windowWidth"] = 0;
  108. }
  109. if (!("windowHeight" in $$source)) {
  110. /**
  111. * 主窗口高度(px),随窗口调整自动保存
  112. * @member
  113. * @type {number}
  114. */
  115. this["windowHeight"] = 0;
  116. }
  117. if (!("hotkey" in $$source)) {
  118. /**
  119. * 呼出(显示)窗口的全局热键
  120. * @member
  121. * @type {string}
  122. */
  123. this["hotkey"] = "";
  124. }
  125. if (!("quickHotkey" in $$source)) {
  126. /**
  127. * 在鼠标位置弹出「快捷」菜单的全局热键
  128. * @member
  129. * @type {string}
  130. */
  131. this["quickHotkey"] = "";
  132. }
  133. if (!("proxyHotkey" in $$source)) {
  134. /**
  135. * 开关「网络代理」的全局热键(空=不设热键)
  136. * @member
  137. * @type {string}
  138. */
  139. this["proxyHotkey"] = "";
  140. }
  141. if (!("tabOrder" in $$source)) {
  142. /**
  143. * Tab 显示顺序(tabId 列表,未列出的追加到末尾)
  144. * @member
  145. * @type {string[]}
  146. */
  147. this["tabOrder"] = [];
  148. }
  149. if (!("stockCodes" in $$source)) {
  150. /**
  151. * 股市页展示的股票代码列表
  152. * @member
  153. * @type {string[]}
  154. */
  155. this["stockCodes"] = [];
  156. }
  157. if (!("links" in $$source)) {
  158. /**
  159. * 常用网址列表(扁平,未分组;分组请用 LinkGroups)
  160. * @member
  161. * @type {LinkItem[]}
  162. */
  163. this["links"] = [];
  164. }
  165. if (!("linkGroups" in $$source)) {
  166. /**
  167. * 「网址」页分组(缩进层级定义,空 Name 表示未分组)
  168. * @member
  169. * @type {LinkGroup[]}
  170. */
  171. this["linkGroups"] = [];
  172. }
  173. if (!("newsKeywords" in $$source)) {
  174. /**
  175. * 新闻关注关键词,逗号分隔
  176. * @member
  177. * @type {string}
  178. */
  179. this["newsKeywords"] = "";
  180. }
  181. if (!("biliCookie" in $$source)) {
  182. /**
  183. * B站登录 cookie(含 SESSDATA),用于抓取「关注的人最新动态」
  184. * @member
  185. * @type {string}
  186. */
  187. this["biliCookie"] = "";
  188. }
  189. if (!("biliPopularEnabled" in $$source)) {
  190. /**
  191. * 新闻页是否显示 B站热门视频区块(默认开启)
  192. * @member
  193. * @type {boolean}
  194. */
  195. this["biliPopularEnabled"] = false;
  196. }
  197. if (!("githubRepos" in $$source)) {
  198. /**
  199. * 关注的 GitHub 仓库列表
  200. * @member
  201. * @type {RepoItem[]}
  202. */
  203. this["githubRepos"] = [];
  204. }
  205. if (!("customTabs" in $$source)) {
  206. /**
  207. * 用户自定义 Tab 页面(名字 + 网址)
  208. * @member
  209. * @type {CustomTab[]}
  210. */
  211. this["customTabs"] = [];
  212. }
  213. if (!("localTools" in $$source)) {
  214. /**
  215. * 「本地」页资源(标题|启动命令|说明,在设置中维护)
  216. * @member
  217. * @type {LocalTool[]}
  218. */
  219. this["localTools"] = [];
  220. }
  221. if (!("quickGroups" in $$source)) {
  222. /**
  223. * 「快捷」页分组(缩进分层,名称|路径|说明 条目)
  224. * @member
  225. * @type {QuickGroup[]}
  226. */
  227. this["quickGroups"] = [];
  228. }
  229. if (!("controlKeys" in $$source)) {
  230. /**
  231. * 控制页按键配置(前 5 键固定 上/下/左/右/休眠,第 6 键起为额外按键)
  232. * @member
  233. * @type {ControlKeyConfig[]}
  234. */
  235. this["controlKeys"] = [];
  236. }
  237. if (!("controlRepeatSecs" in $$source)) {
  238. /**
  239. * 控制页长按连发频率(秒,0.0-10.0,默认 1.0)
  240. * @member
  241. * @type {number}
  242. */
  243. this["controlRepeatSecs"] = 0;
  244. }
  245. if (!("apiAddr" in $$source)) {
  246. /**
  247. * 内置 API 服务监听地址
  248. * @member
  249. * @type {string}
  250. */
  251. this["apiAddr"] = "";
  252. }
  253. if (!("serviceAddr" in $$source)) {
  254. /**
  255. * Windows 服务模式(--service)监听地址,仅电源类接口
  256. * @member
  257. * @type {string}
  258. */
  259. this["serviceAddr"] = "";
  260. }
  261. if (!("apiAutoStart" in $$source)) {
  262. /**
  263. * 应用启动时自动启动内置 API 服务(默认开启)
  264. * @member
  265. * @type {boolean}
  266. */
  267. this["apiAutoStart"] = false;
  268. }
  269. if (!("uploadPassword" in $$source)) {
  270. /**
  271. * 文件上传密码(空=不启用上传/下载接口)
  272. * @member
  273. * @type {string}
  274. */
  275. this["uploadPassword"] = "";
  276. }
  277. if (!("uploadDir" in $$source)) {
  278. /**
  279. * 文件上传保存目录(空=程序所在目录/上传)
  280. * @member
  281. * @type {string}
  282. */
  283. this["uploadDir"] = "";
  284. }
  285. if (!("uploadMaxSize" in $$source)) {
  286. /**
  287. * 单个上传文件大小上限(MB),<=0 用默认 512
  288. * @member
  289. * @type {number}
  290. */
  291. this["uploadMaxSize"] = 0;
  292. }
  293. if (!("todoPath" in $$source)) {
  294. /**
  295. * 待办(TODO)文件路径
  296. * @member
  297. * @type {string}
  298. */
  299. this["todoPath"] = "";
  300. }
  301. if (!("recordPath" in $$source)) {
  302. /**
  303. * 记录(Record)文件路径:每行「姓名|名称|值」(保留兼容)
  304. * @member
  305. * @type {string}
  306. */
  307. this["recordPath"] = "";
  308. }
  309. if (!("recordDBPath" in $$source)) {
  310. /**
  311. * 记录数据库路径:SQLite3 数据库文件(记录 Tab 实际存储)
  312. * @member
  313. * @type {string}
  314. */
  315. this["recordDBPath"] = "";
  316. }
  317. if (!("tagDBPath" in $$source)) {
  318. /**
  319. * 文件标签数据库路径:SQLite3(资源管理器右键「标签」与悬停标签提示使用)
  320. * @member
  321. * @type {string}
  322. */
  323. this["tagDBPath"] = "";
  324. }
  325. if (!("tagMenuEnabled" in $$source)) {
  326. /**
  327. * 资源管理器右键「标签」功能开关:false=关闭右键菜单+停止监听悬停(默认启用)
  328. * @member
  329. * @type {boolean}
  330. */
  331. this["tagMenuEnabled"] = false;
  332. }
  333. if (!("backupDir" in $$source)) {
  334. /**
  335. * 文本文件备份目录(文件类自定义 Tab「备份」按钮使用)
  336. * @member
  337. * @type {string}
  338. */
  339. this["backupDir"] = "";
  340. }
  341. if (!("stockTicker" in $$source)) {
  342. /**
  343. * 股票滚动条配置
  344. * @member
  345. * @type {TickerConfig}
  346. */
  347. this["stockTicker"] = (new TickerConfig());
  348. }
  349. if (!("newsTicker" in $$source)) {
  350. /**
  351. * 新闻滚动条配置
  352. * @member
  353. * @type {TickerConfig}
  354. */
  355. this["newsTicker"] = (new TickerConfig());
  356. }
  357. if (!("poem" in $$source)) {
  358. /**
  359. * 随机古诗显示配置
  360. * @member
  361. * @type {PoemConfig}
  362. */
  363. this["poem"] = (new PoemConfig());
  364. }
  365. if (!("mouseAlert" in $$source)) {
  366. /**
  367. * 系统级鼠标提醒气泡配置
  368. * @member
  369. * @type {MouseAlertConfig}
  370. */
  371. this["mouseAlert"] = (new MouseAlertConfig());
  372. }
  373. if (!("browserPath" in $$source)) {
  374. /**
  375. * 指定浏览器 exe 路径(空=系统默认浏览器)
  376. * @member
  377. * @type {string}
  378. */
  379. this["browserPath"] = "";
  380. }
  381. if (!("ledColor" in $$source)) {
  382. /**
  383. * LED 滚动文字点阵颜色(如 #ff4d4d)
  384. * @member
  385. * @type {string}
  386. */
  387. this["ledColor"] = "";
  388. }
  389. if (!("stockUpColor" in $$source)) {
  390. /**
  391. * 股票上涨颜色
  392. * @member
  393. * @type {string}
  394. */
  395. this["stockUpColor"] = "";
  396. }
  397. if (!("stockDownColor" in $$source)) {
  398. /**
  399. * 股票下跌颜色
  400. * @member
  401. * @type {string}
  402. */
  403. this["stockDownColor"] = "";
  404. }
  405. if (!("stockRefreshSecs" in $$source)) {
  406. /**
  407. * 股市自动刷新间隔(秒)
  408. * @member
  409. * @type {number}
  410. */
  411. this["stockRefreshSecs"] = 0;
  412. }
  413. if (!("stockClosedRefreshSecs" in $$source)) {
  414. /**
  415. * 股市休市时自动刷新间隔(秒)
  416. * @member
  417. * @type {number}
  418. */
  419. this["stockClosedRefreshSecs"] = 0;
  420. }
  421. if (!("newsRefreshMinutes" in $$source)) {
  422. /**
  423. * 新闻自动刷新间隔(分钟)
  424. * @member
  425. * @type {number}
  426. */
  427. this["newsRefreshMinutes"] = 0;
  428. }
  429. if (!("newsCount" in $$source)) {
  430. /**
  431. * 新闻页显示条数
  432. * @member
  433. * @type {number}
  434. */
  435. this["newsCount"] = 0;
  436. }
  437. if (!("githubRefreshMinutes" in $$source)) {
  438. /**
  439. * Github 自动刷新间隔(分钟)
  440. * @member
  441. * @type {number}
  442. */
  443. this["githubRefreshMinutes"] = 0;
  444. }
  445. if (!("fontDelta" in $$source)) {
  446. /**
  447. * 全局字号偏移(px),+-3 范围内调整
  448. * @member
  449. * @type {number}
  450. */
  451. this["fontDelta"] = 0;
  452. }
  453. if (!("localSend" in $$source)) {
  454. /**
  455. * LocalSend 文件互传配置(本机名/接收目录/接收模式等)
  456. * @member
  457. * @type {LocalSendConfig}
  458. */
  459. this["localSend"] = (new LocalSendConfig());
  460. }
  461. if (!("croc" in $$source)) {
  462. /**
  463. * Croc 传送配置(发送/接收共用密码)
  464. * @member
  465. * @type {CrocConfig}
  466. */
  467. this["croc"] = (new CrocConfig());
  468. }
  469. if (!("ytdlp" in $$source)) {
  470. /**
  471. * 视频下载配置(yt-dlp 保存目录)
  472. * @member
  473. * @type {YTDLPConfig}
  474. */
  475. this["ytdlp"] = (new YTDLPConfig());
  476. }
  477. if (!("memos" in $$source)) {
  478. /**
  479. * Memos 速记配置(地址/访问令牌)
  480. * @member
  481. * @type {MemosConfig}
  482. */
  483. this["memos"] = (new MemosConfig());
  484. }
  485. if (!("brightness" in $$source)) {
  486. /**
  487. * 显示器亮度配置(记住亮度、启动恢复)
  488. * @member
  489. * @type {BrightnessConfig}
  490. */
  491. this["brightness"] = (new BrightnessConfig());
  492. }
  493. if (!("footerDocsLabel" in $$source)) {
  494. /**
  495. * 页面右下角「官方文档」显示的标题文字
  496. * @member
  497. * @type {string}
  498. */
  499. this["footerDocsLabel"] = "";
  500. }
  501. if (!("footerDocsURL" in $$source)) {
  502. /**
  503. * 页面右下角标题文字点击打开的网址
  504. * @member
  505. * @type {string}
  506. */
  507. this["footerDocsURL"] = "";
  508. }
  509. if (!("toolOrder" in $$source)) {
  510. /**
  511. * 工具页卡片显示顺序(工具 id 列表,未列出的追加到末尾)
  512. * @member
  513. * @type {string[]}
  514. */
  515. this["toolOrder"] = [];
  516. }
  517. if (!("gitLab" in $$source)) {
  518. /**
  519. * 私有 GitLab 自动升级配置
  520. * @member
  521. * @type {GitLabConfig}
  522. */
  523. this["gitLab"] = (new GitLabConfig());
  524. }
  525. if (!("skippedUpdateVersion" in $$source)) {
  526. /**
  527. * 已跳过的版本(启动检查时视为无更新)
  528. * @member
  529. * @type {string}
  530. */
  531. this["skippedUpdateVersion"] = "";
  532. }
  533. if (!("proxy" in $$source)) {
  534. /**
  535. * 网络代理配置(工具页「网络代理」卡片)
  536. * @member
  537. * @type {ProxyConfig}
  538. */
  539. this["proxy"] = (new ProxyConfig());
  540. }
  541. Object.assign(this, $$source);
  542. }
  543. /**
  544. * Creates a new AppSettings instance from a string or object.
  545. * @param {any} [$$source = {}]
  546. * @returns {AppSettings}
  547. */
  548. static createFrom($$source = {}) {
  549. const $$createField9_0 = $$createType0;
  550. const $$createField10_0 = $$createType0;
  551. const $$createField11_0 = $$createType2;
  552. const $$createField12_0 = $$createType4;
  553. const $$createField16_0 = $$createType6;
  554. const $$createField17_0 = $$createType8;
  555. const $$createField18_0 = $$createType10;
  556. const $$createField19_0 = $$createType12;
  557. const $$createField20_0 = $$createType14;
  558. const $$createField34_0 = $$createType15;
  559. const $$createField35_0 = $$createType15;
  560. const $$createField36_0 = $$createType16;
  561. const $$createField37_0 = $$createType17;
  562. const $$createField48_0 = $$createType18;
  563. const $$createField49_0 = $$createType19;
  564. const $$createField50_0 = $$createType20;
  565. const $$createField51_0 = $$createType21;
  566. const $$createField52_0 = $$createType22;
  567. const $$createField55_0 = $$createType0;
  568. const $$createField56_0 = $$createType23;
  569. const $$createField58_0 = $$createType24;
  570. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  571. if ("tabOrder" in $$parsedSource) {
  572. $$parsedSource["tabOrder"] = $$createField9_0($$parsedSource["tabOrder"]);
  573. }
  574. if ("stockCodes" in $$parsedSource) {
  575. $$parsedSource["stockCodes"] = $$createField10_0($$parsedSource["stockCodes"]);
  576. }
  577. if ("links" in $$parsedSource) {
  578. $$parsedSource["links"] = $$createField11_0($$parsedSource["links"]);
  579. }
  580. if ("linkGroups" in $$parsedSource) {
  581. $$parsedSource["linkGroups"] = $$createField12_0($$parsedSource["linkGroups"]);
  582. }
  583. if ("githubRepos" in $$parsedSource) {
  584. $$parsedSource["githubRepos"] = $$createField16_0($$parsedSource["githubRepos"]);
  585. }
  586. if ("customTabs" in $$parsedSource) {
  587. $$parsedSource["customTabs"] = $$createField17_0($$parsedSource["customTabs"]);
  588. }
  589. if ("localTools" in $$parsedSource) {
  590. $$parsedSource["localTools"] = $$createField18_0($$parsedSource["localTools"]);
  591. }
  592. if ("quickGroups" in $$parsedSource) {
  593. $$parsedSource["quickGroups"] = $$createField19_0($$parsedSource["quickGroups"]);
  594. }
  595. if ("controlKeys" in $$parsedSource) {
  596. $$parsedSource["controlKeys"] = $$createField20_0($$parsedSource["controlKeys"]);
  597. }
  598. if ("stockTicker" in $$parsedSource) {
  599. $$parsedSource["stockTicker"] = $$createField34_0($$parsedSource["stockTicker"]);
  600. }
  601. if ("newsTicker" in $$parsedSource) {
  602. $$parsedSource["newsTicker"] = $$createField35_0($$parsedSource["newsTicker"]);
  603. }
  604. if ("poem" in $$parsedSource) {
  605. $$parsedSource["poem"] = $$createField36_0($$parsedSource["poem"]);
  606. }
  607. if ("mouseAlert" in $$parsedSource) {
  608. $$parsedSource["mouseAlert"] = $$createField37_0($$parsedSource["mouseAlert"]);
  609. }
  610. if ("localSend" in $$parsedSource) {
  611. $$parsedSource["localSend"] = $$createField48_0($$parsedSource["localSend"]);
  612. }
  613. if ("croc" in $$parsedSource) {
  614. $$parsedSource["croc"] = $$createField49_0($$parsedSource["croc"]);
  615. }
  616. if ("ytdlp" in $$parsedSource) {
  617. $$parsedSource["ytdlp"] = $$createField50_0($$parsedSource["ytdlp"]);
  618. }
  619. if ("memos" in $$parsedSource) {
  620. $$parsedSource["memos"] = $$createField51_0($$parsedSource["memos"]);
  621. }
  622. if ("brightness" in $$parsedSource) {
  623. $$parsedSource["brightness"] = $$createField52_0($$parsedSource["brightness"]);
  624. }
  625. if ("toolOrder" in $$parsedSource) {
  626. $$parsedSource["toolOrder"] = $$createField55_0($$parsedSource["toolOrder"]);
  627. }
  628. if ("gitLab" in $$parsedSource) {
  629. $$parsedSource["gitLab"] = $$createField56_0($$parsedSource["gitLab"]);
  630. }
  631. if ("proxy" in $$parsedSource) {
  632. $$parsedSource["proxy"] = $$createField58_0($$parsedSource["proxy"]);
  633. }
  634. return new AppSettings(/** @type {Partial<AppSettings>} */($$parsedSource));
  635. }
  636. }
  637. /**
  638. * BiliDynamicItem 一条 B站动态,供「新闻」页展示
  639. */
  640. export class BiliDynamicItem {
  641. /**
  642. * Creates a new BiliDynamicItem instance.
  643. * @param {Partial<BiliDynamicItem>} [$$source = {}] - The source object to create the BiliDynamicItem.
  644. */
  645. constructor($$source = {}) {
  646. if (!("source" in $$source)) {
  647. /**
  648. * 来源:B站动态
  649. * @member
  650. * @type {string}
  651. */
  652. this["source"] = "";
  653. }
  654. if (!("title" in $$source)) {
  655. /**
  656. * 标题(动态文案或视频标题)
  657. * @member
  658. * @type {string}
  659. */
  660. this["title"] = "";
  661. }
  662. if (!("url" in $$source)) {
  663. /**
  664. * 详情页地址
  665. * @member
  666. * @type {string}
  667. */
  668. this["url"] = "";
  669. }
  670. if (!("matched" in $$source)) {
  671. /**
  672. * 是否命中关注关键词
  673. * @member
  674. * @type {boolean}
  675. */
  676. this["matched"] = false;
  677. }
  678. Object.assign(this, $$source);
  679. }
  680. /**
  681. * Creates a new BiliDynamicItem instance from a string or object.
  682. * @param {any} [$$source = {}]
  683. * @returns {BiliDynamicItem}
  684. */
  685. static createFrom($$source = {}) {
  686. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  687. return new BiliDynamicItem(/** @type {Partial<BiliDynamicItem>} */($$parsedSource));
  688. }
  689. }
  690. /**
  691. * BiliFeedResult B站动态抓取结果:列表 + 需要提示用户的说明(如 cookie 过期后回退热门)
  692. */
  693. export class BiliFeedResult {
  694. /**
  695. * Creates a new BiliFeedResult instance.
  696. * @param {Partial<BiliFeedResult>} [$$source = {}] - The source object to create the BiliFeedResult.
  697. */
  698. constructor($$source = {}) {
  699. if (!("items" in $$source)) {
  700. /**
  701. * @member
  702. * @type {BiliDynamicItem[]}
  703. */
  704. this["items"] = [];
  705. }
  706. if (!("notice" in $$source)) {
  707. /**
  708. * @member
  709. * @type {string}
  710. */
  711. this["notice"] = "";
  712. }
  713. Object.assign(this, $$source);
  714. }
  715. /**
  716. * Creates a new BiliFeedResult instance from a string or object.
  717. * @param {any} [$$source = {}]
  718. * @returns {BiliFeedResult}
  719. */
  720. static createFrom($$source = {}) {
  721. const $$createField0_0 = $$createType26;
  722. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  723. if ("items" in $$parsedSource) {
  724. $$parsedSource["items"] = $$createField0_0($$parsedSource["items"]);
  725. }
  726. return new BiliFeedResult(/** @type {Partial<BiliFeedResult>} */($$parsedSource));
  727. }
  728. }
  729. /**
  730. * BrightnessConfig 显示器亮度配置:记住各显示器亮度(按显示器名称),供启动时恢复
  731. */
  732. export class BrightnessConfig {
  733. /**
  734. * Creates a new BrightnessConfig instance.
  735. * @param {Partial<BrightnessConfig>} [$$source = {}] - The source object to create the BrightnessConfig.
  736. */
  737. constructor($$source = {}) {
  738. if (!("restoreOnStart" in $$source)) {
  739. /**
  740. * 启动应用时恢复上次亮度
  741. * @member
  742. * @type {boolean}
  743. */
  744. this["restoreOnStart"] = false;
  745. }
  746. if (!("levels" in $$source)) {
  747. /**
  748. * 显示器名称 -> 亮度百分比(0-100)
  749. * @member
  750. * @type {{ [_ in string]?: number }}
  751. */
  752. this["levels"] = {};
  753. }
  754. Object.assign(this, $$source);
  755. }
  756. /**
  757. * Creates a new BrightnessConfig instance from a string or object.
  758. * @param {any} [$$source = {}]
  759. * @returns {BrightnessConfig}
  760. */
  761. static createFrom($$source = {}) {
  762. const $$createField1_0 = $$createType27;
  763. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  764. if ("levels" in $$parsedSource) {
  765. $$parsedSource["levels"] = $$createField1_0($$parsedSource["levels"]);
  766. }
  767. return new BrightnessConfig(/** @type {Partial<BrightnessConfig>} */($$parsedSource));
  768. }
  769. }
  770. /**
  771. * CommitItem 仓库的一条提交记录
  772. */
  773. export class CommitItem {
  774. /**
  775. * Creates a new CommitItem instance.
  776. * @param {Partial<CommitItem>} [$$source = {}] - The source object to create the CommitItem.
  777. */
  778. constructor($$source = {}) {
  779. if (!("title" in $$source)) {
  780. /**
  781. * 提交标题(首行)
  782. * @member
  783. * @type {string}
  784. */
  785. this["title"] = "";
  786. }
  787. if (!("url" in $$source)) {
  788. /**
  789. * 提交详情页地址
  790. * @member
  791. * @type {string}
  792. */
  793. this["url"] = "";
  794. }
  795. if (!("updated" in $$source)) {
  796. /**
  797. * 提交时间(MM-DD HH:MM)
  798. * @member
  799. * @type {string}
  800. */
  801. this["updated"] = "";
  802. }
  803. Object.assign(this, $$source);
  804. }
  805. /**
  806. * Creates a new CommitItem instance from a string or object.
  807. * @param {any} [$$source = {}]
  808. * @returns {CommitItem}
  809. */
  810. static createFrom($$source = {}) {
  811. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  812. return new CommitItem(/** @type {Partial<CommitItem>} */($$parsedSource));
  813. }
  814. }
  815. /**
  816. * ControlKeyConfig 控制页方向盘单个按键配置(图标 + 命令 URL)
  817. */
  818. export class ControlKeyConfig {
  819. /**
  820. * Creates a new ControlKeyConfig instance.
  821. * @param {Partial<ControlKeyConfig>} [$$source = {}] - The source object to create the ControlKeyConfig.
  822. */
  823. constructor($$source = {}) {
  824. if (!("icon" in $$source)) {
  825. /**
  826. * 按钮显示字符,如 ↑、↓、←、→、休眠
  827. * @member
  828. * @type {string}
  829. */
  830. this["icon"] = "";
  831. }
  832. if (!("cmd" in $$source)) {
  833. /**
  834. * 点击时 GET 请求的完整 URL;空则回退旧指令信箱模式
  835. * @member
  836. * @type {string}
  837. */
  838. this["cmd"] = "";
  839. }
  840. Object.assign(this, $$source);
  841. }
  842. /**
  843. * Creates a new ControlKeyConfig instance from a string or object.
  844. * @param {any} [$$source = {}]
  845. * @returns {ControlKeyConfig}
  846. */
  847. static createFrom($$source = {}) {
  848. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  849. return new ControlKeyConfig(/** @type {Partial<ControlKeyConfig>} */($$parsedSource));
  850. }
  851. }
  852. /**
  853. * CrocConfig 是 Croc 传送的配置(发送/接收共用密码)。
  854. */
  855. export class CrocConfig {
  856. /**
  857. * Creates a new CrocConfig instance.
  858. * @param {Partial<CrocConfig>} [$$source = {}] - The source object to create the CrocConfig.
  859. */
  860. constructor($$source = {}) {
  861. if (!("password" in $$source)) {
  862. /**
  863. * 发送/接收共用密码:作为 croc 传输码(--code),空=使用随机传输码
  864. * @member
  865. * @type {string}
  866. */
  867. this["password"] = "";
  868. }
  869. if (!("dir" in $$source)) {
  870. /**
  871. * 接收保存目录,空=当前工作目录
  872. * @member
  873. * @type {string}
  874. */
  875. this["dir"] = "";
  876. }
  877. Object.assign(this, $$source);
  878. }
  879. /**
  880. * Creates a new CrocConfig instance from a string or object.
  881. * @param {any} [$$source = {}]
  882. * @returns {CrocConfig}
  883. */
  884. static createFrom($$source = {}) {
  885. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  886. return new CrocConfig(/** @type {Partial<CrocConfig>} */($$parsedSource));
  887. }
  888. }
  889. /**
  890. * CrocInfo 描述本机 croc 的可用性,用于前端决定是否展示工具卡片。
  891. */
  892. export class CrocInfo {
  893. /**
  894. * Creates a new CrocInfo instance.
  895. * @param {Partial<CrocInfo>} [$$source = {}] - The source object to create the CrocInfo.
  896. */
  897. constructor($$source = {}) {
  898. if (!("available" in $$source)) {
  899. /**
  900. * PATH 中是否找到 croc
  901. * @member
  902. * @type {boolean}
  903. */
  904. this["available"] = false;
  905. }
  906. if (!("path" in $$source)) {
  907. /**
  908. * croc 可执行文件路径
  909. * @member
  910. * @type {string}
  911. */
  912. this["path"] = "";
  913. }
  914. if (!("version" in $$source)) {
  915. /**
  916. * 版本信息(croc --version 输出)
  917. * @member
  918. * @type {string}
  919. */
  920. this["version"] = "";
  921. }
  922. Object.assign(this, $$source);
  923. }
  924. /**
  925. * Creates a new CrocInfo instance from a string or object.
  926. * @param {any} [$$source = {}]
  927. * @returns {CrocInfo}
  928. */
  929. static createFrom($$source = {}) {
  930. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  931. return new CrocInfo(/** @type {Partial<CrocInfo>} */($$parsedSource));
  932. }
  933. }
  934. /**
  935. * CustomTab 用户自定义 Tab 页面
  936. */
  937. export class CustomTab {
  938. /**
  939. * Creates a new CustomTab instance.
  940. * @param {Partial<CustomTab>} [$$source = {}] - The source object to create the CustomTab.
  941. */
  942. constructor($$source = {}) {
  943. if (!("name" in $$source)) {
  944. /**
  945. * 页面名称(Tab 按钮显示文字)
  946. * @member
  947. * @type {string}
  948. */
  949. this["name"] = "";
  950. }
  951. if (!("url" in $$source)) {
  952. /**
  953. * 页面地址(iframe 加载)
  954. * @member
  955. * @type {string}
  956. */
  957. this["url"] = "";
  958. }
  959. if (!("desc" in $$source)) {
  960. /**
  961. * 备注/提示信息(可空),Tab 说明文字优先显示
  962. * @member
  963. * @type {string}
  964. */
  965. this["desc"] = "";
  966. }
  967. Object.assign(this, $$source);
  968. }
  969. /**
  970. * Creates a new CustomTab instance from a string or object.
  971. * @param {any} [$$source = {}]
  972. * @returns {CustomTab}
  973. */
  974. static createFrom($$source = {}) {
  975. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  976. return new CustomTab(/** @type {Partial<CustomTab>} */($$parsedSource));
  977. }
  978. }
  979. /**
  980. * GitLabConfig 自动升级配置(静态更新站方案)。
  981. * BaseURL 为静态站目录地址,清单固定放在 {BaseURL}/manifest.json,无需鉴权。
  982. * ProjectPath / PrivateToken / Branch 为旧私有仓库方案遗留字段,不再参与,保留以兼容旧配置。
  983. */
  984. export class GitLabConfig {
  985. /**
  986. * Creates a new GitLabConfig instance.
  987. * @param {Partial<GitLabConfig>} [$$source = {}] - The source object to create the GitLabConfig.
  988. */
  989. constructor($$source = {}) {
  990. if (!("baseUrl" in $$source)) {
  991. /**
  992. * 静态更新站目录地址,如 https://i.scwy.net/down/toolsbox
  993. * @member
  994. * @type {string}
  995. */
  996. this["baseUrl"] = "";
  997. }
  998. if (!("projectPath" in $$source)) {
  999. /**
  1000. * (旧字段,不再使用)
  1001. * @member
  1002. * @type {string}
  1003. */
  1004. this["projectPath"] = "";
  1005. }
  1006. if (!("privateToken" in $$source)) {
  1007. /**
  1008. * (旧字段,不再使用)
  1009. * @member
  1010. * @type {string}
  1011. */
  1012. this["privateToken"] = "";
  1013. }
  1014. if (!("branch" in $$source)) {
  1015. /**
  1016. * (旧字段,不再使用)
  1017. * @member
  1018. * @type {string}
  1019. */
  1020. this["branch"] = "";
  1021. }
  1022. Object.assign(this, $$source);
  1023. }
  1024. /**
  1025. * Creates a new GitLabConfig instance from a string or object.
  1026. * @param {any} [$$source = {}]
  1027. * @returns {GitLabConfig}
  1028. */
  1029. static createFrom($$source = {}) {
  1030. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1031. return new GitLabConfig(/** @type {Partial<GitLabConfig>} */($$parsedSource));
  1032. }
  1033. }
  1034. /**
  1035. * KLineBar 日 K 的一根柱子
  1036. */
  1037. export class KLineBar {
  1038. /**
  1039. * Creates a new KLineBar instance.
  1040. * @param {Partial<KLineBar>} [$$source = {}] - The source object to create the KLineBar.
  1041. */
  1042. constructor($$source = {}) {
  1043. if (!("date" in $$source)) {
  1044. /**
  1045. * 交易日
  1046. * @member
  1047. * @type {string}
  1048. */
  1049. this["date"] = "";
  1050. }
  1051. if (!("open" in $$source)) {
  1052. /**
  1053. * 开盘价
  1054. * @member
  1055. * @type {number}
  1056. */
  1057. this["open"] = 0;
  1058. }
  1059. if (!("close" in $$source)) {
  1060. /**
  1061. * 收盘价
  1062. * @member
  1063. * @type {number}
  1064. */
  1065. this["close"] = 0;
  1066. }
  1067. if (!("high" in $$source)) {
  1068. /**
  1069. * 最高价
  1070. * @member
  1071. * @type {number}
  1072. */
  1073. this["high"] = 0;
  1074. }
  1075. if (!("low" in $$source)) {
  1076. /**
  1077. * 最低价
  1078. * @member
  1079. * @type {number}
  1080. */
  1081. this["low"] = 0;
  1082. }
  1083. if (!("volume" in $$source)) {
  1084. /**
  1085. * 成交量(手)
  1086. * @member
  1087. * @type {number}
  1088. */
  1089. this["volume"] = 0;
  1090. }
  1091. Object.assign(this, $$source);
  1092. }
  1093. /**
  1094. * Creates a new KLineBar instance from a string or object.
  1095. * @param {any} [$$source = {}]
  1096. * @returns {KLineBar}
  1097. */
  1098. static createFrom($$source = {}) {
  1099. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1100. return new KLineBar(/** @type {Partial<KLineBar>} */($$parsedSource));
  1101. }
  1102. }
  1103. /**
  1104. * LinkGroup 「网址」页分组(设置中以缩进层级定义,类似快捷启动)
  1105. * 未分组的条目放在 LinkGroups 的第一个 Name 为空分组的 Items 中(前端解析时统一按组渲染)
  1106. */
  1107. export class LinkGroup {
  1108. /**
  1109. * Creates a new LinkGroup instance.
  1110. * @param {Partial<LinkGroup>} [$$source = {}] - The source object to create the LinkGroup.
  1111. */
  1112. constructor($$source = {}) {
  1113. if (!("name" in $$source)) {
  1114. /**
  1115. * 分组名(空表示未分组)
  1116. * @member
  1117. * @type {string}
  1118. */
  1119. this["name"] = "";
  1120. }
  1121. if (!("items" in $$source)) {
  1122. /**
  1123. * 组内网址
  1124. * @member
  1125. * @type {LinkItem[]}
  1126. */
  1127. this["items"] = [];
  1128. }
  1129. Object.assign(this, $$source);
  1130. }
  1131. /**
  1132. * Creates a new LinkGroup instance from a string or object.
  1133. * @param {any} [$$source = {}]
  1134. * @returns {LinkGroup}
  1135. */
  1136. static createFrom($$source = {}) {
  1137. const $$createField1_0 = $$createType2;
  1138. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1139. if ("items" in $$parsedSource) {
  1140. $$parsedSource["items"] = $$createField1_0($$parsedSource["items"]);
  1141. }
  1142. return new LinkGroup(/** @type {Partial<LinkGroup>} */($$parsedSource));
  1143. }
  1144. }
  1145. /**
  1146. * LinkItem 常用网址条目
  1147. */
  1148. export class LinkItem {
  1149. /**
  1150. * Creates a new LinkItem instance.
  1151. * @param {Partial<LinkItem>} [$$source = {}] - The source object to create the LinkItem.
  1152. */
  1153. constructor($$source = {}) {
  1154. if (!("name" in $$source)) {
  1155. /**
  1156. * 网站名称
  1157. * @member
  1158. * @type {string}
  1159. */
  1160. this["name"] = "";
  1161. }
  1162. if (!("url" in $$source)) {
  1163. /**
  1164. * 网站地址
  1165. * @member
  1166. * @type {string}
  1167. */
  1168. this["url"] = "";
  1169. }
  1170. Object.assign(this, $$source);
  1171. }
  1172. /**
  1173. * Creates a new LinkItem instance from a string or object.
  1174. * @param {any} [$$source = {}]
  1175. * @returns {LinkItem}
  1176. */
  1177. static createFrom($$source = {}) {
  1178. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1179. return new LinkItem(/** @type {Partial<LinkItem>} */($$parsedSource));
  1180. }
  1181. }
  1182. /**
  1183. * LocalSendConfig 是 LocalSend 的运行时配置。
  1184. */
  1185. export class LocalSendConfig {
  1186. /**
  1187. * Creates a new LocalSendConfig instance.
  1188. * @param {Partial<LocalSendConfig>} [$$source = {}] - The source object to create the LocalSendConfig.
  1189. */
  1190. constructor($$source = {}) {
  1191. if (!("enabled" in $$source)) {
  1192. /**
  1193. * 是否已启动服务
  1194. * @member
  1195. * @type {boolean}
  1196. */
  1197. this["enabled"] = false;
  1198. }
  1199. if (!("alias" in $$source)) {
  1200. /**
  1201. * 本机名称(广播给其他设备)
  1202. * @member
  1203. * @type {string}
  1204. */
  1205. this["alias"] = "";
  1206. }
  1207. if (!("receiveDir" in $$source)) {
  1208. /**
  1209. * 接收文件保存目录
  1210. * @member
  1211. * @type {string}
  1212. */
  1213. this["receiveDir"] = "";
  1214. }
  1215. if (!("autoAccept" in $$source)) {
  1216. /**
  1217. * true=自动接收;false=手动确认
  1218. * @member
  1219. * @type {boolean}
  1220. */
  1221. this["autoAccept"] = false;
  1222. }
  1223. if (!("port" in $$source)) {
  1224. /**
  1225. * 监听端口
  1226. * @member
  1227. * @type {number}
  1228. */
  1229. this["port"] = 0;
  1230. }
  1231. if (!("fingerprint" in $$source)) {
  1232. /**
  1233. * 本机证书指纹
  1234. * @member
  1235. * @type {string}
  1236. */
  1237. this["fingerprint"] = "";
  1238. }
  1239. Object.assign(this, $$source);
  1240. }
  1241. /**
  1242. * Creates a new LocalSendConfig instance from a string or object.
  1243. * @param {any} [$$source = {}]
  1244. * @returns {LocalSendConfig}
  1245. */
  1246. static createFrom($$source = {}) {
  1247. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1248. return new LocalSendConfig(/** @type {Partial<LocalSendConfig>} */($$parsedSource));
  1249. }
  1250. }
  1251. /**
  1252. * LocalTool 本地资源/工具配置项(「本地」页,在设置中维护)
  1253. */
  1254. export class LocalTool {
  1255. /**
  1256. * Creates a new LocalTool instance.
  1257. * @param {Partial<LocalTool>} [$$source = {}] - The source object to create the LocalTool.
  1258. */
  1259. constructor($$source = {}) {
  1260. if (!("title" in $$source)) {
  1261. /**
  1262. * 显示标题
  1263. * @member
  1264. * @type {string}
  1265. */
  1266. this["title"] = "";
  1267. }
  1268. if (!("cmd" in $$source)) {
  1269. /**
  1270. * 启动命令(程序/脚本,可带参数与环境变量)
  1271. * @member
  1272. * @type {string}
  1273. */
  1274. this["cmd"] = "";
  1275. }
  1276. if (!("desc" in $$source)) {
  1277. /**
  1278. * 说明文字(可空)
  1279. * @member
  1280. * @type {string}
  1281. */
  1282. this["desc"] = "";
  1283. }
  1284. Object.assign(this, $$source);
  1285. }
  1286. /**
  1287. * Creates a new LocalTool instance from a string or object.
  1288. * @param {any} [$$source = {}]
  1289. * @returns {LocalTool}
  1290. */
  1291. static createFrom($$source = {}) {
  1292. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1293. return new LocalTool(/** @type {Partial<LocalTool>} */($$parsedSource));
  1294. }
  1295. }
  1296. /**
  1297. * MemosConfig 保存 Memos 速记所需的配置。
  1298. */
  1299. export class MemosConfig {
  1300. /**
  1301. * Creates a new MemosConfig instance.
  1302. * @param {Partial<MemosConfig>} [$$source = {}] - The source object to create the MemosConfig.
  1303. */
  1304. constructor($$source = {}) {
  1305. if (!("url" in $$source)) {
  1306. /**
  1307. * 实例地址,如 https://m.scwy.net
  1308. * @member
  1309. * @type {string}
  1310. */
  1311. this["url"] = "";
  1312. }
  1313. if (!("token" in $$source)) {
  1314. /**
  1315. * 个人访问令牌(PAT),只存本地
  1316. * @member
  1317. * @type {string}
  1318. */
  1319. this["token"] = "";
  1320. }
  1321. Object.assign(this, $$source);
  1322. }
  1323. /**
  1324. * Creates a new MemosConfig instance from a string or object.
  1325. * @param {any} [$$source = {}]
  1326. * @returns {MemosConfig}
  1327. */
  1328. static createFrom($$source = {}) {
  1329. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1330. return new MemosConfig(/** @type {Partial<MemosConfig>} */($$parsedSource));
  1331. }
  1332. }
  1333. /**
  1334. * MinuteChart 分时图数据
  1335. */
  1336. export class MinuteChart {
  1337. /**
  1338. * Creates a new MinuteChart instance.
  1339. * @param {Partial<MinuteChart>} [$$source = {}] - The source object to create the MinuteChart.
  1340. */
  1341. constructor($$source = {}) {
  1342. if (!("code" in $$source)) {
  1343. /**
  1344. * 股票代码
  1345. * @member
  1346. * @type {string}
  1347. */
  1348. this["code"] = "";
  1349. }
  1350. if (!("prevClose" in $$source)) {
  1351. /**
  1352. * 昨收,作为分时基准线
  1353. * @member
  1354. * @type {number}
  1355. */
  1356. this["prevClose"] = 0;
  1357. }
  1358. if (!("points" in $$source)) {
  1359. /**
  1360. * 分时点序列
  1361. * @member
  1362. * @type {MinutePoint[]}
  1363. */
  1364. this["points"] = [];
  1365. }
  1366. Object.assign(this, $$source);
  1367. }
  1368. /**
  1369. * Creates a new MinuteChart instance from a string or object.
  1370. * @param {any} [$$source = {}]
  1371. * @returns {MinuteChart}
  1372. */
  1373. static createFrom($$source = {}) {
  1374. const $$createField2_0 = $$createType29;
  1375. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1376. if ("points" in $$parsedSource) {
  1377. $$parsedSource["points"] = $$createField2_0($$parsedSource["points"]);
  1378. }
  1379. return new MinuteChart(/** @type {Partial<MinuteChart>} */($$parsedSource));
  1380. }
  1381. }
  1382. /**
  1383. * MinutePoint 分时图上的一个点
  1384. */
  1385. export class MinutePoint {
  1386. /**
  1387. * Creates a new MinutePoint instance.
  1388. * @param {Partial<MinutePoint>} [$$source = {}] - The source object to create the MinutePoint.
  1389. */
  1390. constructor($$source = {}) {
  1391. if (!("time" in $$source)) {
  1392. /**
  1393. * HH:MM
  1394. * @member
  1395. * @type {string}
  1396. */
  1397. this["time"] = "";
  1398. }
  1399. if (!("price" in $$source)) {
  1400. /**
  1401. * 当前价
  1402. * @member
  1403. * @type {number}
  1404. */
  1405. this["price"] = 0;
  1406. }
  1407. if (!("avg" in $$source)) {
  1408. /**
  1409. * 均价
  1410. * @member
  1411. * @type {number}
  1412. */
  1413. this["avg"] = 0;
  1414. }
  1415. Object.assign(this, $$source);
  1416. }
  1417. /**
  1418. * Creates a new MinutePoint instance from a string or object.
  1419. * @param {any} [$$source = {}]
  1420. * @returns {MinutePoint}
  1421. */
  1422. static createFrom($$source = {}) {
  1423. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1424. return new MinutePoint(/** @type {Partial<MinutePoint>} */($$parsedSource));
  1425. }
  1426. }
  1427. /**
  1428. * MonitorBrightnessInfo 单个显示器的亮度状态(返回给前端渲染滑块)
  1429. */
  1430. export class MonitorBrightnessInfo {
  1431. /**
  1432. * Creates a new MonitorBrightnessInfo instance.
  1433. * @param {Partial<MonitorBrightnessInfo>} [$$source = {}] - The source object to create the MonitorBrightnessInfo.
  1434. */
  1435. constructor($$source = {}) {
  1436. if (!("index" in $$source)) {
  1437. /**
  1438. * 显示器序号(与 SetBrightness 的 index 一致)
  1439. * @member
  1440. * @type {number}
  1441. */
  1442. this["index"] = 0;
  1443. }
  1444. if (!("name" in $$source)) {
  1445. /**
  1446. * 显示器名称(物理监视器描述,取不到时用设备名)
  1447. * @member
  1448. * @type {string}
  1449. */
  1450. this["name"] = "";
  1451. }
  1452. if (!("percent" in $$source)) {
  1453. /**
  1454. * 当前亮度百分比 0-100
  1455. * @member
  1456. * @type {number}
  1457. */
  1458. this["percent"] = 0;
  1459. }
  1460. if (!("hardware" in $$source)) {
  1461. /**
  1462. * true=DDC/CI 硬件调光;false=Gamma 软件调光
  1463. * @member
  1464. * @type {boolean}
  1465. */
  1466. this["hardware"] = false;
  1467. }
  1468. Object.assign(this, $$source);
  1469. }
  1470. /**
  1471. * Creates a new MonitorBrightnessInfo instance from a string or object.
  1472. * @param {any} [$$source = {}]
  1473. * @returns {MonitorBrightnessInfo}
  1474. */
  1475. static createFrom($$source = {}) {
  1476. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1477. return new MonitorBrightnessInfo(/** @type {Partial<MonitorBrightnessInfo>} */($$parsedSource));
  1478. }
  1479. }
  1480. /**
  1481. * MouseAlertConfig 系统级鼠标提醒气泡的显示配置
  1482. */
  1483. export class MouseAlertConfig {
  1484. /**
  1485. * Creates a new MouseAlertConfig instance.
  1486. * @param {Partial<MouseAlertConfig>} [$$source = {}] - The source object to create the MouseAlertConfig.
  1487. */
  1488. constructor($$source = {}) {
  1489. if (!("fontSize" in $$source)) {
  1490. /**
  1491. * 字号(px)
  1492. * @member
  1493. * @type {number}
  1494. */
  1495. this["fontSize"] = 0;
  1496. }
  1497. if (!("width" in $$source)) {
  1498. /**
  1499. * 气泡窗口宽度(px)
  1500. * @member
  1501. * @type {number}
  1502. */
  1503. this["width"] = 0;
  1504. }
  1505. if (!("speed" in $$source)) {
  1506. /**
  1507. * 超长文字滚动速度(px/s)
  1508. * @member
  1509. * @type {number}
  1510. */
  1511. this["speed"] = 0;
  1512. }
  1513. if (!("color" in $$source)) {
  1514. /**
  1515. * 文字颜色
  1516. * @member
  1517. * @type {string}
  1518. */
  1519. this["color"] = "";
  1520. }
  1521. if (!("background" in $$source)) {
  1522. /**
  1523. * 气泡背景色(COLORKEY 抠成透明,仅作底色参考)
  1524. * @member
  1525. * @type {string}
  1526. */
  1527. this["background"] = "";
  1528. }
  1529. if (!("duration" in $$source)) {
  1530. /**
  1531. * 显示时长(秒)
  1532. * @member
  1533. * @type {number}
  1534. */
  1535. this["duration"] = 0;
  1536. }
  1537. if (!("outlineColor" in $$source)) {
  1538. /**
  1539. * 文字描边颜色(白边/黑边,与文字形成反差)
  1540. * @member
  1541. * @type {string}
  1542. */
  1543. this["outlineColor"] = "";
  1544. }
  1545. if (!("outlineWidth" in $$source)) {
  1546. /**
  1547. * 文字描边宽度(px),0 表示关闭描边
  1548. * @member
  1549. * @type {number}
  1550. */
  1551. this["outlineWidth"] = 0;
  1552. }
  1553. if (!("scroll" in $$source)) {
  1554. /**
  1555. * Scroll 是否滚动显示超长文字:nil 表示未设置(兼容旧配置,用 Speed>0 决定);
  1556. * true=超长时水平滚动跑马灯,false=超长部分右侧裁剪不滚动。
  1557. * @member
  1558. * @type {boolean | null}
  1559. */
  1560. this["scroll"] = null;
  1561. }
  1562. Object.assign(this, $$source);
  1563. }
  1564. /**
  1565. * Creates a new MouseAlertConfig instance from a string or object.
  1566. * @param {any} [$$source = {}]
  1567. * @returns {MouseAlertConfig}
  1568. */
  1569. static createFrom($$source = {}) {
  1570. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1571. return new MouseAlertConfig(/** @type {Partial<MouseAlertConfig>} */($$parsedSource));
  1572. }
  1573. }
  1574. /**
  1575. * NewsItem 一条新闻标题,供「新闻」页与新闻滚动条使用
  1576. */
  1577. export class NewsItem {
  1578. /**
  1579. * Creates a new NewsItem instance.
  1580. * @param {Partial<NewsItem>} [$$source = {}] - The source object to create the NewsItem.
  1581. */
  1582. constructor($$source = {}) {
  1583. if (!("source" in $$source)) {
  1584. /**
  1585. * 来源:煎蛋 / 腾讯 / Solidot / 财联社 / 热榜
  1586. * @member
  1587. * @type {string}
  1588. */
  1589. this["source"] = "";
  1590. }
  1591. if (!("title" in $$source)) {
  1592. /**
  1593. * 标题
  1594. * @member
  1595. * @type {string}
  1596. */
  1597. this["title"] = "";
  1598. }
  1599. if (!("url" in $$source)) {
  1600. /**
  1601. * 详情页地址
  1602. * @member
  1603. * @type {string}
  1604. */
  1605. this["url"] = "";
  1606. }
  1607. if (!("matched" in $$source)) {
  1608. /**
  1609. * 是否命中关注关键词
  1610. * @member
  1611. * @type {boolean}
  1612. */
  1613. this["matched"] = false;
  1614. }
  1615. if (!("hits" in $$source)) {
  1616. /**
  1617. * 命中的关键词个数(越多排越前,前端按档位配色)
  1618. * @member
  1619. * @type {number}
  1620. */
  1621. this["hits"] = 0;
  1622. }
  1623. Object.assign(this, $$source);
  1624. }
  1625. /**
  1626. * Creates a new NewsItem instance from a string or object.
  1627. * @param {any} [$$source = {}]
  1628. * @returns {NewsItem}
  1629. */
  1630. static createFrom($$source = {}) {
  1631. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1632. return new NewsItem(/** @type {Partial<NewsItem>} */($$parsedSource));
  1633. }
  1634. }
  1635. /**
  1636. * PCStatus 电源命令状态快照,供 API 与「主机」页查询
  1637. */
  1638. export class PCStatus {
  1639. /**
  1640. * Creates a new PCStatus instance.
  1641. * @param {Partial<PCStatus>} [$$source = {}] - The source object to create the PCStatus.
  1642. */
  1643. constructor($$source = {}) {
  1644. if (!("command" in $$source)) {
  1645. /**
  1646. * 最近一次命令类型
  1647. * @member
  1648. * @type {string}
  1649. */
  1650. this["command"] = "";
  1651. }
  1652. if (!("pending" in $$source)) {
  1653. /**
  1654. * 是否有待执行命令
  1655. * @member
  1656. * @type {boolean}
  1657. */
  1658. this["pending"] = false;
  1659. }
  1660. if (!("executeAt" in $$source)) {
  1661. /**
  1662. * 计划执行时间
  1663. * @member
  1664. * @type {string}
  1665. */
  1666. this["executeAt"] = "";
  1667. }
  1668. if (!("remainingSecs" in $$source)) {
  1669. /**
  1670. * 剩余秒数
  1671. * @member
  1672. * @type {number}
  1673. */
  1674. this["remainingSecs"] = 0;
  1675. }
  1676. if (!("clientIp" in $$source)) {
  1677. /**
  1678. * 最近一次请求的客户端 IP
  1679. * @member
  1680. * @type {string}
  1681. */
  1682. this["clientIp"] = "";
  1683. }
  1684. if (!("requestTime" in $$source)) {
  1685. /**
  1686. * 最近一次请求时间
  1687. * @member
  1688. * @type {string}
  1689. */
  1690. this["requestTime"] = "";
  1691. }
  1692. if (!("requested" in $$source)) {
  1693. /**
  1694. * 是否收到过请求
  1695. * @member
  1696. * @type {boolean}
  1697. */
  1698. this["requested"] = false;
  1699. }
  1700. Object.assign(this, $$source);
  1701. }
  1702. /**
  1703. * Creates a new PCStatus instance from a string or object.
  1704. * @param {any} [$$source = {}]
  1705. * @returns {PCStatus}
  1706. */
  1707. static createFrom($$source = {}) {
  1708. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1709. return new PCStatus(/** @type {Partial<PCStatus>} */($$parsedSource));
  1710. }
  1711. }
  1712. /**
  1713. * PoemConfig 古诗显示的配置
  1714. */
  1715. export class PoemConfig {
  1716. /**
  1717. * Creates a new PoemConfig instance.
  1718. * @param {Partial<PoemConfig>} [$$source = {}] - The source object to create the PoemConfig.
  1719. */
  1720. constructor($$source = {}) {
  1721. if (!("enabled" in $$source)) {
  1722. /**
  1723. * 是否启用古诗显示
  1724. * @member
  1725. * @type {boolean}
  1726. */
  1727. this["enabled"] = false;
  1728. }
  1729. if (!("color" in $$source)) {
  1730. /**
  1731. * 文字颜色
  1732. * @member
  1733. * @type {string}
  1734. */
  1735. this["color"] = "";
  1736. }
  1737. if (!("fontSize" in $$source)) {
  1738. /**
  1739. * 字号(px)
  1740. * @member
  1741. * @type {number}
  1742. */
  1743. this["fontSize"] = 0;
  1744. }
  1745. if (!("tts" in $$source)) {
  1746. /**
  1747. * 允许 TTS 阅读(显示朗读按钮)
  1748. * @member
  1749. * @type {boolean}
  1750. */
  1751. this["tts"] = false;
  1752. }
  1753. if (!("interval" in $$source)) {
  1754. /**
  1755. * 自动换诗间隔(秒),0 表示不自动换
  1756. * @member
  1757. * @type {number}
  1758. */
  1759. this["interval"] = 0;
  1760. }
  1761. if (!("speed" in $$source)) {
  1762. /**
  1763. * 滚动速度(秒/轮),即滚动一个文本周期所需秒数,越小越快
  1764. * @member
  1765. * @type {number}
  1766. */
  1767. this["speed"] = 0;
  1768. }
  1769. Object.assign(this, $$source);
  1770. }
  1771. /**
  1772. * Creates a new PoemConfig instance from a string or object.
  1773. * @param {any} [$$source = {}]
  1774. * @returns {PoemConfig}
  1775. */
  1776. static createFrom($$source = {}) {
  1777. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1778. return new PoemConfig(/** @type {Partial<PoemConfig>} */($$parsedSource));
  1779. }
  1780. }
  1781. /**
  1782. * PoemData 一首古诗的完整数据(从接口解析)
  1783. */
  1784. export class PoemData {
  1785. /**
  1786. * Creates a new PoemData instance.
  1787. * @param {Partial<PoemData>} [$$source = {}] - The source object to create the PoemData.
  1788. */
  1789. constructor($$source = {}) {
  1790. if (!("title" in $$source)) {
  1791. /**
  1792. * 题目
  1793. * @member
  1794. * @type {string}
  1795. */
  1796. this["title"] = "";
  1797. }
  1798. if (!("author" in $$source)) {
  1799. /**
  1800. * 作者
  1801. * @member
  1802. * @type {string}
  1803. */
  1804. this["author"] = "";
  1805. }
  1806. if (!("dynasty" in $$source)) {
  1807. /**
  1808. * 朝代
  1809. * @member
  1810. * @type {string}
  1811. */
  1812. this["dynasty"] = "";
  1813. }
  1814. if (!("content" in $$source)) {
  1815. /**
  1816. * 每句诗(数组,按行显示)
  1817. * @member
  1818. * @type {string[]}
  1819. */
  1820. this["content"] = [];
  1821. }
  1822. if (!("type" in $$source)) {
  1823. /**
  1824. * 体裁,如 五言律诗
  1825. * @member
  1826. * @type {string}
  1827. */
  1828. this["type"] = "";
  1829. }
  1830. Object.assign(this, $$source);
  1831. }
  1832. /**
  1833. * Creates a new PoemData instance from a string or object.
  1834. * @param {any} [$$source = {}]
  1835. * @returns {PoemData}
  1836. */
  1837. static createFrom($$source = {}) {
  1838. const $$createField3_0 = $$createType0;
  1839. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1840. if ("content" in $$parsedSource) {
  1841. $$parsedSource["content"] = $$createField3_0($$parsedSource["content"]);
  1842. }
  1843. return new PoemData(/** @type {Partial<PoemData>} */($$parsedSource));
  1844. }
  1845. }
  1846. /**
  1847. * ProxyConfig 网络代理配置(工具页「网络代理」卡片)。
  1848. * 仅保存地址,开关状态由系统代理注册表(ProxyEnable)实时决定,不在配置里持久化。
  1849. */
  1850. export class ProxyConfig {
  1851. /**
  1852. * Creates a new ProxyConfig instance.
  1853. * @param {Partial<ProxyConfig>} [$$source = {}] - The source object to create the ProxyConfig.
  1854. */
  1855. constructor($$source = {}) {
  1856. if (!("server" in $$source)) {
  1857. /**
  1858. * 代理服务器地址,如 127.0.0.1:7890
  1859. * @member
  1860. * @type {string}
  1861. */
  1862. this["server"] = "";
  1863. }
  1864. Object.assign(this, $$source);
  1865. }
  1866. /**
  1867. * Creates a new ProxyConfig instance from a string or object.
  1868. * @param {any} [$$source = {}]
  1869. * @returns {ProxyConfig}
  1870. */
  1871. static createFrom($$source = {}) {
  1872. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1873. return new ProxyConfig(/** @type {Partial<ProxyConfig>} */($$parsedSource));
  1874. }
  1875. }
  1876. /**
  1877. * ProxyStatus 网络代理当前状态
  1878. */
  1879. export class ProxyStatus {
  1880. /**
  1881. * Creates a new ProxyStatus instance.
  1882. * @param {Partial<ProxyStatus>} [$$source = {}] - The source object to create the ProxyStatus.
  1883. */
  1884. constructor($$source = {}) {
  1885. if (!("enabled" in $$source)) {
  1886. /**
  1887. * 系统代理是否开启
  1888. * @member
  1889. * @type {boolean}
  1890. */
  1891. this["enabled"] = false;
  1892. }
  1893. if (!("server" in $$source)) {
  1894. /**
  1895. * 代理服务器地址(如 127.0.0.1:7890)
  1896. * @member
  1897. * @type {string}
  1898. */
  1899. this["server"] = "";
  1900. }
  1901. if (!("configured" in $$source)) {
  1902. /**
  1903. * 配置里是否保存了代理地址(用于前端区分「未设置」)
  1904. * @member
  1905. * @type {boolean}
  1906. */
  1907. this["configured"] = false;
  1908. }
  1909. Object.assign(this, $$source);
  1910. }
  1911. /**
  1912. * Creates a new ProxyStatus instance from a string or object.
  1913. * @param {any} [$$source = {}]
  1914. * @returns {ProxyStatus}
  1915. */
  1916. static createFrom($$source = {}) {
  1917. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1918. return new ProxyStatus(/** @type {Partial<ProxyStatus>} */($$parsedSource));
  1919. }
  1920. }
  1921. /**
  1922. * QuickGroup 快捷启动分组(「快捷」页)。
  1923. * 设置文本中顶层无缩进行为分组名,其下缩进的「名称|路径|说明」条目归入该组;
  1924. * 未缩进但在某分组之前直接出现的条目归入「未分组」。
  1925. */
  1926. export class QuickGroup {
  1927. /**
  1928. * Creates a new QuickGroup instance.
  1929. * @param {Partial<QuickGroup>} [$$source = {}] - The source object to create the QuickGroup.
  1930. */
  1931. constructor($$source = {}) {
  1932. if (!("name" in $$source)) {
  1933. /**
  1934. * 分组名(顶层无缩进行;空表示未分组)
  1935. * @member
  1936. * @type {string}
  1937. */
  1938. this["name"] = "";
  1939. }
  1940. if (!("items" in $$source)) {
  1941. /**
  1942. * 分组内快捷项(缩进条目)
  1943. * @member
  1944. * @type {QuickItem[]}
  1945. */
  1946. this["items"] = [];
  1947. }
  1948. Object.assign(this, $$source);
  1949. }
  1950. /**
  1951. * Creates a new QuickGroup instance from a string or object.
  1952. * @param {any} [$$source = {}]
  1953. * @returns {QuickGroup}
  1954. */
  1955. static createFrom($$source = {}) {
  1956. const $$createField1_0 = $$createType31;
  1957. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1958. if ("items" in $$parsedSource) {
  1959. $$parsedSource["items"] = $$createField1_0($$parsedSource["items"]);
  1960. }
  1961. return new QuickGroup(/** @type {Partial<QuickGroup>} */($$parsedSource));
  1962. }
  1963. }
  1964. /**
  1965. * QuickItem 快捷启动项(「快捷」页,设置中以缩进分层编辑)。
  1966. * 与 Biniware Run 类似:每项为「名称|程序路径|说明」,说明可省略。
  1967. */
  1968. export class QuickItem {
  1969. /**
  1970. * Creates a new QuickItem instance.
  1971. * @param {Partial<QuickItem>} [$$source = {}] - The source object to create the QuickItem.
  1972. */
  1973. constructor($$source = {}) {
  1974. if (!("title" in $$source)) {
  1975. /**
  1976. * 显示名称
  1977. * @member
  1978. * @type {string}
  1979. */
  1980. this["title"] = "";
  1981. }
  1982. if (!("path" in $$source)) {
  1983. /**
  1984. * 程序路径(可执行文件,可带参数与 %VAR% 环境变量)
  1985. * @member
  1986. * @type {string}
  1987. */
  1988. this["path"] = "";
  1989. }
  1990. if (!("desc" in $$source)) {
  1991. /**
  1992. * 说明文字(可空)
  1993. * @member
  1994. * @type {string}
  1995. */
  1996. this["desc"] = "";
  1997. }
  1998. Object.assign(this, $$source);
  1999. }
  2000. /**
  2001. * Creates a new QuickItem instance from a string or object.
  2002. * @param {any} [$$source = {}]
  2003. * @returns {QuickItem}
  2004. */
  2005. static createFrom($$source = {}) {
  2006. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2007. return new QuickItem(/** @type {Partial<QuickItem>} */($$parsedSource));
  2008. }
  2009. }
  2010. /**
  2011. * RecordItem 一条记录:姓名 + 名称 + 值 + 备注 + 录入时间,供记录 Tab 列表与柱状图使用
  2012. */
  2013. export class RecordItem {
  2014. /**
  2015. * Creates a new RecordItem instance.
  2016. * @param {Partial<RecordItem>} [$$source = {}] - The source object to create the RecordItem.
  2017. */
  2018. constructor($$source = {}) {
  2019. if (!("name" in $$source)) {
  2020. /**
  2021. * 姓名
  2022. * @member
  2023. * @type {string}
  2024. */
  2025. this["name"] = "";
  2026. }
  2027. if (!("item" in $$source)) {
  2028. /**
  2029. * 名称
  2030. * @member
  2031. * @type {string}
  2032. */
  2033. this["item"] = "";
  2034. }
  2035. if (!("value" in $$source)) {
  2036. /**
  2037. * 值
  2038. * @member
  2039. * @type {number}
  2040. */
  2041. this["value"] = 0;
  2042. }
  2043. if (!("remark" in $$source)) {
  2044. /**
  2045. * 备注(可选)
  2046. * @member
  2047. * @type {string}
  2048. */
  2049. this["remark"] = "";
  2050. }
  2051. if (!("createdAt" in $$source)) {
  2052. /**
  2053. * 录入时间 YYYY-MM-DD HH:MM:SS(前端新增时生成;为空时后端用当前时间)
  2054. * @member
  2055. * @type {string}
  2056. */
  2057. this["createdAt"] = "";
  2058. }
  2059. Object.assign(this, $$source);
  2060. }
  2061. /**
  2062. * Creates a new RecordItem instance from a string or object.
  2063. * @param {any} [$$source = {}]
  2064. * @returns {RecordItem}
  2065. */
  2066. static createFrom($$source = {}) {
  2067. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2068. return new RecordItem(/** @type {Partial<RecordItem>} */($$parsedSource));
  2069. }
  2070. }
  2071. /**
  2072. * ReleaseItem 一个 GitHub release 的简略信息,用于列出 Latest 之后的版本(Pre-release 等)
  2073. */
  2074. export class ReleaseItem {
  2075. /**
  2076. * Creates a new ReleaseItem instance.
  2077. * @param {Partial<ReleaseItem>} [$$source = {}] - The source object to create the ReleaseItem.
  2078. */
  2079. constructor($$source = {}) {
  2080. if (!("tagName" in $$source)) {
  2081. /**
  2082. * 版本标签,如 v1.3.0-beta.1
  2083. * @member
  2084. * @type {string}
  2085. */
  2086. this["tagName"] = "";
  2087. }
  2088. if (!("name" in $$source)) {
  2089. /**
  2090. * release 显示名称(标题),可能比 tag 更完整,如 "Rolling: v2.1.0-..."
  2091. * @member
  2092. * @type {string}
  2093. */
  2094. this["name"] = "";
  2095. }
  2096. if (!("url" in $$source)) {
  2097. /**
  2098. * release 详情页地址
  2099. * @member
  2100. * @type {string}
  2101. */
  2102. this["url"] = "";
  2103. }
  2104. if (!("isPrerelease" in $$source)) {
  2105. /**
  2106. * 是否预发布版本
  2107. * @member
  2108. * @type {boolean}
  2109. */
  2110. this["isPrerelease"] = false;
  2111. }
  2112. if (!("isDraft" in $$source)) {
  2113. /**
  2114. * 是否草稿版本
  2115. * @member
  2116. * @type {boolean}
  2117. */
  2118. this["isDraft"] = false;
  2119. }
  2120. if (!("publishedAt" in $$source)) {
  2121. /**
  2122. * 发布时间(MM-DD HH:MM)
  2123. * @member
  2124. * @type {string}
  2125. */
  2126. this["publishedAt"] = "";
  2127. }
  2128. Object.assign(this, $$source);
  2129. }
  2130. /**
  2131. * Creates a new ReleaseItem instance from a string or object.
  2132. * @param {any} [$$source = {}]
  2133. * @returns {ReleaseItem}
  2134. */
  2135. static createFrom($$source = {}) {
  2136. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2137. return new ReleaseItem(/** @type {Partial<ReleaseItem>} */($$parsedSource));
  2138. }
  2139. }
  2140. /**
  2141. * RepoFeed 一个 GitHub 仓库的最新提交摘要
  2142. */
  2143. export class RepoFeed {
  2144. /**
  2145. * Creates a new RepoFeed instance.
  2146. * @param {Partial<RepoFeed>} [$$source = {}] - The source object to create the RepoFeed.
  2147. */
  2148. constructor($$source = {}) {
  2149. if (!("url" in $$source)) {
  2150. /**
  2151. * 仓库地址(设置中配置)
  2152. * @member
  2153. * @type {string}
  2154. */
  2155. this["url"] = "";
  2156. }
  2157. if (!("desc" in $$source)) {
  2158. /**
  2159. * 项目说明
  2160. * @member
  2161. * @type {string}
  2162. */
  2163. this["desc"] = "";
  2164. }
  2165. if (!("repo" in $$source)) {
  2166. /**
  2167. * owner/repo 短名
  2168. * @member
  2169. * @type {string}
  2170. */
  2171. this["repo"] = "";
  2172. }
  2173. if (!("version" in $$source)) {
  2174. /**
  2175. * 本地已安装版本(设置中配置)
  2176. * @member
  2177. * @type {string}
  2178. */
  2179. this["version"] = "";
  2180. }
  2181. if (!("versionTime" in $$source)) {
  2182. /**
  2183. * 本地版本对应 release 的发布时间(MM-DD HH:MM),用于鼠标提示
  2184. * @member
  2185. * @type {string}
  2186. */
  2187. this["versionTime"] = "";
  2188. }
  2189. if (!("latest" in $$source)) {
  2190. /**
  2191. * 最新正式 release 版本号,无正式 release 时为空
  2192. * @member
  2193. * @type {string}
  2194. */
  2195. this["latest"] = "";
  2196. }
  2197. if (!("latestTime" in $$source)) {
  2198. /**
  2199. * 最新正式 release 发布时间(MM-DD HH:MM),用于鼠标提示
  2200. * @member
  2201. * @type {string}
  2202. */
  2203. this["latestTime"] = "";
  2204. }
  2205. if (!("hasUpdate" in $$source)) {
  2206. /**
  2207. * 是否存在可用更新(本地版本低于最新正式 release)
  2208. * @member
  2209. * @type {boolean}
  2210. */
  2211. this["hasUpdate"] = false;
  2212. }
  2213. if (!("releaseURL" in $$source)) {
  2214. /**
  2215. * 最新正式 release 的下载 / 详情页地址
  2216. * @member
  2217. * @type {string}
  2218. */
  2219. this["releaseURL"] = "";
  2220. }
  2221. if (!("newer" in $$source)) {
  2222. /**
  2223. * Latest 之后的版本(Pre-release 等,仅列出不参与更新比较)
  2224. * @member
  2225. * @type {ReleaseItem[]}
  2226. */
  2227. this["newer"] = [];
  2228. }
  2229. if (!("commits" in $$source)) {
  2230. /**
  2231. * 最近提交(最多 5 条)
  2232. * @member
  2233. * @type {CommitItem[]}
  2234. */
  2235. this["commits"] = [];
  2236. }
  2237. if (!("error" in $$source)) {
  2238. /**
  2239. * 抓取失败原因,为空表示正常
  2240. * @member
  2241. * @type {string}
  2242. */
  2243. this["error"] = "";
  2244. }
  2245. Object.assign(this, $$source);
  2246. }
  2247. /**
  2248. * Creates a new RepoFeed instance from a string or object.
  2249. * @param {any} [$$source = {}]
  2250. * @returns {RepoFeed}
  2251. */
  2252. static createFrom($$source = {}) {
  2253. const $$createField9_0 = $$createType33;
  2254. const $$createField10_0 = $$createType35;
  2255. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2256. if ("newer" in $$parsedSource) {
  2257. $$parsedSource["newer"] = $$createField9_0($$parsedSource["newer"]);
  2258. }
  2259. if ("commits" in $$parsedSource) {
  2260. $$parsedSource["commits"] = $$createField10_0($$parsedSource["commits"]);
  2261. }
  2262. return new RepoFeed(/** @type {Partial<RepoFeed>} */($$parsedSource));
  2263. }
  2264. }
  2265. /**
  2266. * RepoItem 关注的 GitHub 仓库条目
  2267. */
  2268. export class RepoItem {
  2269. /**
  2270. * Creates a new RepoItem instance.
  2271. * @param {Partial<RepoItem>} [$$source = {}] - The source object to create the RepoItem.
  2272. */
  2273. constructor($$source = {}) {
  2274. if (!("url" in $$source)) {
  2275. /**
  2276. * 仓库地址,如 https://github.com/wailsapp/wails
  2277. * @member
  2278. * @type {string}
  2279. */
  2280. this["url"] = "";
  2281. }
  2282. if (!("desc" in $$source)) {
  2283. /**
  2284. * 项目说明
  2285. * @member
  2286. * @type {string}
  2287. */
  2288. this["desc"] = "";
  2289. }
  2290. if (!("version" in $$source)) {
  2291. /**
  2292. * 本地已安装版本(用于与最新 release 比较),可为空
  2293. * @member
  2294. * @type {string}
  2295. */
  2296. this["version"] = "";
  2297. }
  2298. Object.assign(this, $$source);
  2299. }
  2300. /**
  2301. * Creates a new RepoItem instance from a string or object.
  2302. * @param {any} [$$source = {}]
  2303. * @returns {RepoItem}
  2304. */
  2305. static createFrom($$source = {}) {
  2306. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2307. return new RepoItem(/** @type {Partial<RepoItem>} */($$parsedSource));
  2308. }
  2309. }
  2310. /**
  2311. * ServiceModeStatus 服务模式运行状态(服务页展示)
  2312. */
  2313. export class ServiceModeStatus {
  2314. /**
  2315. * Creates a new ServiceModeStatus instance.
  2316. * @param {Partial<ServiceModeStatus>} [$$source = {}] - The source object to create the ServiceModeStatus.
  2317. */
  2318. constructor($$source = {}) {
  2319. if (!("addr" in $$source)) {
  2320. /**
  2321. * 服务模式监听地址
  2322. * @member
  2323. * @type {string}
  2324. */
  2325. this["addr"] = "";
  2326. }
  2327. if (!("running" in $$source)) {
  2328. /**
  2329. * 该地址上的电源 API 是否可用
  2330. * @member
  2331. * @type {boolean}
  2332. */
  2333. this["running"] = false;
  2334. }
  2335. if (!("managed" in $$source)) {
  2336. /**
  2337. * true=由真正的 Windows 服务提供;false=界面进程兜底
  2338. * @member
  2339. * @type {boolean}
  2340. */
  2341. this["managed"] = false;
  2342. }
  2343. if (!("occupied" in $$source)) {
  2344. /**
  2345. * 端口被其他程序占用(既非服务模式也非本程序)
  2346. * @member
  2347. * @type {boolean}
  2348. */
  2349. this["occupied"] = false;
  2350. }
  2351. if (!("version" in $$source)) {
  2352. /**
  2353. * 服务端版本(可用时)
  2354. * @member
  2355. * @type {string}
  2356. */
  2357. this["version"] = "";
  2358. }
  2359. Object.assign(this, $$source);
  2360. }
  2361. /**
  2362. * Creates a new ServiceModeStatus instance from a string or object.
  2363. * @param {any} [$$source = {}]
  2364. * @returns {ServiceModeStatus}
  2365. */
  2366. static createFrom($$source = {}) {
  2367. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2368. return new ServiceModeStatus(/** @type {Partial<ServiceModeStatus>} */($$parsedSource));
  2369. }
  2370. }
  2371. /**
  2372. * StockQuote 单只股票的行情快照,供前端「股市」页展示
  2373. */
  2374. export class StockQuote {
  2375. /**
  2376. * Creates a new StockQuote instance.
  2377. * @param {Partial<StockQuote>} [$$source = {}] - The source object to create the StockQuote.
  2378. */
  2379. constructor($$source = {}) {
  2380. if (!("code" in $$source)) {
  2381. /**
  2382. * 带市场前缀的代码,如 sh600519
  2383. * @member
  2384. * @type {string}
  2385. */
  2386. this["code"] = "";
  2387. }
  2388. if (!("name" in $$source)) {
  2389. /**
  2390. * 股票名称
  2391. * @member
  2392. * @type {string}
  2393. */
  2394. this["name"] = "";
  2395. }
  2396. if (!("price" in $$source)) {
  2397. /**
  2398. * 当前价
  2399. * @member
  2400. * @type {number}
  2401. */
  2402. this["price"] = 0;
  2403. }
  2404. if (!("change" in $$source)) {
  2405. /**
  2406. * 涨跌额
  2407. * @member
  2408. * @type {number}
  2409. */
  2410. this["change"] = 0;
  2411. }
  2412. if (!("changePercent" in $$source)) {
  2413. /**
  2414. * 涨跌幅(%)
  2415. * @member
  2416. * @type {number}
  2417. */
  2418. this["changePercent"] = 0;
  2419. }
  2420. if (!("amount" in $$source)) {
  2421. /**
  2422. * 成交额(万元)
  2423. * @member
  2424. * @type {number}
  2425. */
  2426. this["amount"] = 0;
  2427. }
  2428. if (!("time" in $$source)) {
  2429. /**
  2430. * 行情时间 HH:MM:SS
  2431. * @member
  2432. * @type {string}
  2433. */
  2434. this["time"] = "";
  2435. }
  2436. Object.assign(this, $$source);
  2437. }
  2438. /**
  2439. * Creates a new StockQuote instance from a string or object.
  2440. * @param {any} [$$source = {}]
  2441. * @returns {StockQuote}
  2442. */
  2443. static createFrom($$source = {}) {
  2444. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2445. return new StockQuote(/** @type {Partial<StockQuote>} */($$parsedSource));
  2446. }
  2447. }
  2448. /**
  2449. * TagInfo 一条文件标签:完整路径 + 标签 + 备注 + 更新时间。
  2450. * 供前端设置页/标签管理 UI 与后端悬停提示使用。
  2451. */
  2452. export class TagInfo {
  2453. /**
  2454. * Creates a new TagInfo instance.
  2455. * @param {Partial<TagInfo>} [$$source = {}] - The source object to create the TagInfo.
  2456. */
  2457. constructor($$source = {}) {
  2458. if (!("path" in $$source)) {
  2459. /**
  2460. * 完整路径(已规范化:小写 + Clean)
  2461. * @member
  2462. * @type {string}
  2463. */
  2464. this["path"] = "";
  2465. }
  2466. if (!("tag" in $$source)) {
  2467. /**
  2468. * 标签(可空)
  2469. * @member
  2470. * @type {string}
  2471. */
  2472. this["tag"] = "";
  2473. }
  2474. if (!("note" in $$source)) {
  2475. /**
  2476. * 备注(可空)
  2477. * @member
  2478. * @type {string}
  2479. */
  2480. this["note"] = "";
  2481. }
  2482. if (!("updatedAt" in $$source)) {
  2483. /**
  2484. * 最近更新时间 YYYY-MM-DD HH:MM:SS
  2485. * @member
  2486. * @type {string}
  2487. */
  2488. this["updatedAt"] = "";
  2489. }
  2490. Object.assign(this, $$source);
  2491. }
  2492. /**
  2493. * Creates a new TagInfo instance from a string or object.
  2494. * @param {any} [$$source = {}]
  2495. * @returns {TagInfo}
  2496. */
  2497. static createFrom($$source = {}) {
  2498. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2499. return new TagInfo(/** @type {Partial<TagInfo>} */($$parsedSource));
  2500. }
  2501. }
  2502. /**
  2503. * TickerConfig 置顶滚动条(股票 / 新闻)的显示配置
  2504. */
  2505. export class TickerConfig {
  2506. /**
  2507. * Creates a new TickerConfig instance.
  2508. * @param {Partial<TickerConfig>} [$$source = {}] - The source object to create the TickerConfig.
  2509. */
  2510. constructor($$source = {}) {
  2511. if (!("enabled" in $$source)) {
  2512. /**
  2513. * 是否显示滚动条窗口
  2514. * @member
  2515. * @type {boolean}
  2516. */
  2517. this["enabled"] = false;
  2518. }
  2519. if (!("width" in $$source)) {
  2520. /**
  2521. * 窗口宽度(px),0 表示默认 1400
  2522. * @member
  2523. * @type {number}
  2524. */
  2525. this["width"] = 0;
  2526. }
  2527. if (!("fontSize" in $$source)) {
  2528. /**
  2529. * 字号(px)
  2530. * @member
  2531. * @type {number}
  2532. */
  2533. this["fontSize"] = 0;
  2534. }
  2535. if (!("color" in $$source)) {
  2536. /**
  2537. * 文字颜色
  2538. * @member
  2539. * @type {string}
  2540. */
  2541. this["color"] = "";
  2542. }
  2543. if (!("speed" in $$source)) {
  2544. /**
  2545. * 滚动速度(px/s)
  2546. * @member
  2547. * @type {number}
  2548. */
  2549. this["speed"] = 0;
  2550. }
  2551. if (!("transparent" in $$source)) {
  2552. /**
  2553. * 背景透明,不遮挡下方内容
  2554. * @member
  2555. * @type {boolean}
  2556. */
  2557. this["transparent"] = false;
  2558. }
  2559. if (!("x" in $$source)) {
  2560. /**
  2561. * 窗口位置,-1 表示未设置(系统默认位置)
  2562. * @member
  2563. * @type {number}
  2564. */
  2565. this["x"] = 0;
  2566. }
  2567. if (!("y" in $$source)) {
  2568. /**
  2569. * 窗口位置,-1 表示未设置
  2570. * @member
  2571. * @type {number}
  2572. */
  2573. this["y"] = 0;
  2574. }
  2575. Object.assign(this, $$source);
  2576. }
  2577. /**
  2578. * Creates a new TickerConfig instance from a string or object.
  2579. * @param {any} [$$source = {}]
  2580. * @returns {TickerConfig}
  2581. */
  2582. static createFrom($$source = {}) {
  2583. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2584. return new TickerConfig(/** @type {Partial<TickerConfig>} */($$parsedSource));
  2585. }
  2586. }
  2587. /**
  2588. * TranslateResult 一次翻译的结果,供前端展示。
  2589. */
  2590. export class TranslateResult {
  2591. /**
  2592. * Creates a new TranslateResult instance.
  2593. * @param {Partial<TranslateResult>} [$$source = {}] - The source object to create the TranslateResult.
  2594. */
  2595. constructor($$source = {}) {
  2596. if (!("text" in $$source)) {
  2597. /**
  2598. * 翻译结果文本
  2599. * @member
  2600. * @type {string}
  2601. */
  2602. this["text"] = "";
  2603. }
  2604. if (!("detected" in $$source)) {
  2605. /**
  2606. * 检测到的源语言(zh / en)
  2607. * @member
  2608. * @type {string}
  2609. */
  2610. this["detected"] = "";
  2611. }
  2612. if (!("target" in $$source)) {
  2613. /**
  2614. * 目标语言(zh / en)
  2615. * @member
  2616. * @type {string}
  2617. */
  2618. this["target"] = "";
  2619. }
  2620. Object.assign(this, $$source);
  2621. }
  2622. /**
  2623. * Creates a new TranslateResult instance from a string or object.
  2624. * @param {any} [$$source = {}]
  2625. * @returns {TranslateResult}
  2626. */
  2627. static createFrom($$source = {}) {
  2628. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2629. return new TranslateResult(/** @type {Partial<TranslateResult>} */($$parsedSource));
  2630. }
  2631. }
  2632. /**
  2633. * TrendingRepo 一个热门仓库条目(来源可为 GitHub Trending 或 HelloGitHub)
  2634. */
  2635. export class TrendingRepo {
  2636. /**
  2637. * Creates a new TrendingRepo instance.
  2638. * @param {Partial<TrendingRepo>} [$$source = {}] - The source object to create the TrendingRepo.
  2639. */
  2640. constructor($$source = {}) {
  2641. if (!("name" in $$source)) {
  2642. /**
  2643. * owner/repo 短名
  2644. * @member
  2645. * @type {string}
  2646. */
  2647. this["name"] = "";
  2648. }
  2649. if (!("url" in $$source)) {
  2650. /**
  2651. * 仓库主页地址(GitHub 直链)
  2652. * @member
  2653. * @type {string}
  2654. */
  2655. this["url"] = "";
  2656. }
  2657. if (!("desc" in $$source)) {
  2658. /**
  2659. * 简介(英文已自动翻译为中文,翻译失败保留原文)
  2660. * @member
  2661. * @type {string}
  2662. */
  2663. this["desc"] = "";
  2664. }
  2665. if (!("lang" in $$source)) {
  2666. /**
  2667. * 主要语言,无则空
  2668. * @member
  2669. * @type {string}
  2670. */
  2671. this["lang"] = "";
  2672. }
  2673. if (!("stars" in $$source)) {
  2674. /**
  2675. * 总星数(如 "106,375")
  2676. * @member
  2677. * @type {string}
  2678. */
  2679. this["stars"] = "";
  2680. }
  2681. if (!("todayStars" in $$source)) {
  2682. /**
  2683. * 今日新增星数(如 "1,140",无则空)
  2684. * @member
  2685. * @type {string}
  2686. */
  2687. this["todayStars"] = "";
  2688. }
  2689. if (!("forks" in $$source)) {
  2690. /**
  2691. * fork 数(如 "9,365",无则空)
  2692. * @member
  2693. * @type {string}
  2694. */
  2695. this["forks"] = "";
  2696. }
  2697. if (!("source" in $$source)) {
  2698. /**
  2699. * 来源:"github"(GitHub Trending)/ "hellogithub"
  2700. * @member
  2701. * @type {string}
  2702. */
  2703. this["source"] = "";
  2704. }
  2705. if (!("heat" in $$source)) {
  2706. /**
  2707. * 热度(HelloGitHub 点击量,其它来源为空)
  2708. * @member
  2709. * @type {string}
  2710. */
  2711. this["heat"] = "";
  2712. }
  2713. Object.assign(this, $$source);
  2714. }
  2715. /**
  2716. * Creates a new TrendingRepo instance from a string or object.
  2717. * @param {any} [$$source = {}]
  2718. * @returns {TrendingRepo}
  2719. */
  2720. static createFrom($$source = {}) {
  2721. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2722. return new TrendingRepo(/** @type {Partial<TrendingRepo>} */($$parsedSource));
  2723. }
  2724. }
  2725. /**
  2726. * UDPInfo 描述一次 UDP 键值服务的运行状态,供前端展示。
  2727. */
  2728. export class UDPInfo {
  2729. /**
  2730. * Creates a new UDPInfo instance.
  2731. * @param {Partial<UDPInfo>} [$$source = {}] - The source object to create the UDPInfo.
  2732. */
  2733. constructor($$source = {}) {
  2734. if (!("running" in $$source)) {
  2735. /**
  2736. * 是否运行中
  2737. * @member
  2738. * @type {boolean}
  2739. */
  2740. this["running"] = false;
  2741. }
  2742. if (!("port" in $$source)) {
  2743. /**
  2744. * 监听端口
  2745. * @member
  2746. * @type {number}
  2747. */
  2748. this["port"] = 0;
  2749. }
  2750. if (!("addr" in $$source)) {
  2751. /**
  2752. * 监听地址 udp://0.0.0.0:port
  2753. * @member
  2754. * @type {string}
  2755. */
  2756. this["addr"] = "";
  2757. }
  2758. if (!("startedAt" in $$source)) {
  2759. /**
  2760. * 启动时间
  2761. * @member
  2762. * @type {string}
  2763. */
  2764. this["startedAt"] = "";
  2765. }
  2766. if (!("error" in $$source)) {
  2767. /**
  2768. * 最近一次错误
  2769. * @member
  2770. * @type {string}
  2771. */
  2772. this["error"] = "";
  2773. }
  2774. if (!("rxCount" in $$source)) {
  2775. /**
  2776. * 累计接收数据包数
  2777. * @member
  2778. * @type {number}
  2779. */
  2780. this["rxCount"] = 0;
  2781. }
  2782. if (!("txCount" in $$source)) {
  2783. /**
  2784. * 累计发送(回发/手动)数据包数
  2785. * @member
  2786. * @type {number}
  2787. */
  2788. this["txCount"] = 0;
  2789. }
  2790. Object.assign(this, $$source);
  2791. }
  2792. /**
  2793. * Creates a new UDPInfo instance from a string or object.
  2794. * @param {any} [$$source = {}]
  2795. * @returns {UDPInfo}
  2796. */
  2797. static createFrom($$source = {}) {
  2798. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2799. return new UDPInfo(/** @type {Partial<UDPInfo>} */($$parsedSource));
  2800. }
  2801. }
  2802. /**
  2803. * WebServiceInfo 描述一次 Web 服务运行实例的状态,供前端展示。
  2804. */
  2805. export class WebServiceInfo {
  2806. /**
  2807. * Creates a new WebServiceInfo instance.
  2808. * @param {Partial<WebServiceInfo>} [$$source = {}] - The source object to create the WebServiceInfo.
  2809. */
  2810. constructor($$source = {}) {
  2811. if (!("running" in $$source)) {
  2812. /**
  2813. * 是否运行中
  2814. * @member
  2815. * @type {boolean}
  2816. */
  2817. this["running"] = false;
  2818. }
  2819. if (!("dir" in $$source)) {
  2820. /**
  2821. * 服务目录
  2822. * @member
  2823. * @type {string}
  2824. */
  2825. this["dir"] = "";
  2826. }
  2827. if (!("url" in $$source)) {
  2828. /**
  2829. * 访问地址 http://127.0.0.1:port/
  2830. * @member
  2831. * @type {string}
  2832. */
  2833. this["url"] = "";
  2834. }
  2835. if (!("port" in $$source)) {
  2836. /**
  2837. * 监听端口
  2838. * @member
  2839. * @type {number}
  2840. */
  2841. this["port"] = 0;
  2842. }
  2843. if (!("indexName" in $$source)) {
  2844. /**
  2845. * 实际用作默认页的文件(index.html / readme.md / 空)
  2846. * @member
  2847. * @type {string}
  2848. */
  2849. this["indexName"] = "";
  2850. }
  2851. if (!("startedAt" in $$source)) {
  2852. /**
  2853. * 启动时间
  2854. * @member
  2855. * @type {string}
  2856. */
  2857. this["startedAt"] = "";
  2858. }
  2859. if (!("error" in $$source)) {
  2860. /**
  2861. * 最近一次错误
  2862. * @member
  2863. * @type {string}
  2864. */
  2865. this["error"] = "";
  2866. }
  2867. if (!("connections" in $$source)) {
  2868. /**
  2869. * 累计请求次数
  2870. * @member
  2871. * @type {number}
  2872. */
  2873. this["connections"] = 0;
  2874. }
  2875. Object.assign(this, $$source);
  2876. }
  2877. /**
  2878. * Creates a new WebServiceInfo instance from a string or object.
  2879. * @param {any} [$$source = {}]
  2880. * @returns {WebServiceInfo}
  2881. */
  2882. static createFrom($$source = {}) {
  2883. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2884. return new WebServiceInfo(/** @type {Partial<WebServiceInfo>} */($$parsedSource));
  2885. }
  2886. }
  2887. /**
  2888. * YTDLPConfig 是「视频下载」的配置。
  2889. */
  2890. export class YTDLPConfig {
  2891. /**
  2892. * Creates a new YTDLPConfig instance.
  2893. * @param {Partial<YTDLPConfig>} [$$source = {}] - The source object to create the YTDLPConfig.
  2894. */
  2895. constructor($$source = {}) {
  2896. if (!("dir" in $$source)) {
  2897. /**
  2898. * 下载保存目录,空=程序当前工作目录
  2899. * @member
  2900. * @type {string}
  2901. */
  2902. this["dir"] = "";
  2903. }
  2904. if (!("mp3Quality" in $$source)) {
  2905. /**
  2906. * mp3 转换质量:0-9(VBR,0 最好)或 128K/192K/320K,默认 0
  2907. * @member
  2908. * @type {string}
  2909. */
  2910. this["mp3Quality"] = "";
  2911. }
  2912. Object.assign(this, $$source);
  2913. }
  2914. /**
  2915. * Creates a new YTDLPConfig instance from a string or object.
  2916. * @param {any} [$$source = {}]
  2917. * @returns {YTDLPConfig}
  2918. */
  2919. static createFrom($$source = {}) {
  2920. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2921. return new YTDLPConfig(/** @type {Partial<YTDLPConfig>} */($$parsedSource));
  2922. }
  2923. }
  2924. /**
  2925. * YTDLPInfo 描述本机 yt-dlp 的可用性,用于前端决定是否展示工具卡片。
  2926. */
  2927. export class YTDLPInfo {
  2928. /**
  2929. * Creates a new YTDLPInfo instance.
  2930. * @param {Partial<YTDLPInfo>} [$$source = {}] - The source object to create the YTDLPInfo.
  2931. */
  2932. constructor($$source = {}) {
  2933. if (!("available" in $$source)) {
  2934. /**
  2935. * PATH 中是否找到 yt-dlp
  2936. * @member
  2937. * @type {boolean}
  2938. */
  2939. this["available"] = false;
  2940. }
  2941. if (!("path" in $$source)) {
  2942. /**
  2943. * yt-dlp 可执行文件路径
  2944. * @member
  2945. * @type {string}
  2946. */
  2947. this["path"] = "";
  2948. }
  2949. if (!("version" in $$source)) {
  2950. /**
  2951. * 版本信息(yt-dlp --version 输出)
  2952. * @member
  2953. * @type {string}
  2954. */
  2955. this["version"] = "";
  2956. }
  2957. if (!("ffmpeg" in $$source)) {
  2958. /**
  2959. * PATH 中是否找到 ffmpeg(用于「下载转 mp3」)
  2960. * @member
  2961. * @type {boolean}
  2962. */
  2963. this["ffmpeg"] = false;
  2964. }
  2965. Object.assign(this, $$source);
  2966. }
  2967. /**
  2968. * Creates a new YTDLPInfo instance from a string or object.
  2969. * @param {any} [$$source = {}]
  2970. * @returns {YTDLPInfo}
  2971. */
  2972. static createFrom($$source = {}) {
  2973. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2974. return new YTDLPInfo(/** @type {Partial<YTDLPInfo>} */($$parsedSource));
  2975. }
  2976. }
  2977. // Private type creation functions
  2978. const $$createType0 = $Create.Array($Create.Any);
  2979. const $$createType1 = LinkItem.createFrom;
  2980. const $$createType2 = $Create.Array($$createType1);
  2981. const $$createType3 = LinkGroup.createFrom;
  2982. const $$createType4 = $Create.Array($$createType3);
  2983. const $$createType5 = RepoItem.createFrom;
  2984. const $$createType6 = $Create.Array($$createType5);
  2985. const $$createType7 = CustomTab.createFrom;
  2986. const $$createType8 = $Create.Array($$createType7);
  2987. const $$createType9 = LocalTool.createFrom;
  2988. const $$createType10 = $Create.Array($$createType9);
  2989. const $$createType11 = QuickGroup.createFrom;
  2990. const $$createType12 = $Create.Array($$createType11);
  2991. const $$createType13 = ControlKeyConfig.createFrom;
  2992. const $$createType14 = $Create.Array($$createType13);
  2993. const $$createType15 = TickerConfig.createFrom;
  2994. const $$createType16 = PoemConfig.createFrom;
  2995. const $$createType17 = MouseAlertConfig.createFrom;
  2996. const $$createType18 = LocalSendConfig.createFrom;
  2997. const $$createType19 = CrocConfig.createFrom;
  2998. const $$createType20 = YTDLPConfig.createFrom;
  2999. const $$createType21 = MemosConfig.createFrom;
  3000. const $$createType22 = BrightnessConfig.createFrom;
  3001. const $$createType23 = GitLabConfig.createFrom;
  3002. const $$createType24 = ProxyConfig.createFrom;
  3003. const $$createType25 = BiliDynamicItem.createFrom;
  3004. const $$createType26 = $Create.Array($$createType25);
  3005. const $$createType27 = $Create.Map($Create.Any, $Create.Any);
  3006. const $$createType28 = MinutePoint.createFrom;
  3007. const $$createType29 = $Create.Array($$createType28);
  3008. const $$createType30 = QuickItem.createFrom;
  3009. const $$createType31 = $Create.Array($$createType30);
  3010. const $$createType32 = ReleaseItem.createFrom;
  3011. const $$createType33 = $Create.Array($$createType32);
  3012. const $$createType34 = CommitItem.createFrom;
  3013. const $$createType35 = $Create.Array($$createType34);