1
0

models.js 92 KB

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