| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529 |
- // @ts-check
- // Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
- // This file is automatically generated. DO NOT EDIT
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
- // @ts-ignore: Unused imports
- import { Create as $Create } from "@wailsio/runtime";
- /**
- * APIStatus API 服务运行状态,供「主机」页展示
- */
- export class APIStatus {
- /**
- * Creates a new APIStatus instance.
- * @param {Partial<APIStatus>} [$$source = {}] - The source object to create the APIStatus.
- */
- constructor($$source = {}) {
- if (!("addr" in $$source)) {
- /**
- * 当前监听地址
- * @member
- * @type {string}
- */
- this["addr"] = "";
- }
- if (!("running" in $$source)) {
- /**
- * 是否正在监听
- * @member
- * @type {boolean}
- */
- this["running"] = false;
- }
- if (!("startedAt" in $$source)) {
- /**
- * 启动时间
- * @member
- * @type {string}
- */
- this["startedAt"] = "";
- }
- if (!("error" in $$source)) {
- /**
- * 最近错误信息
- * @member
- * @type {string}
- */
- this["error"] = "";
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new APIStatus instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {APIStatus}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new APIStatus(/** @type {Partial<APIStatus>} */($$parsedSource));
- }
- }
- /**
- * AppSettings 保存全部可自定义配置,序列化为 JSON 存于用户配置目录
- */
- export class AppSettings {
- /**
- * Creates a new AppSettings instance.
- * @param {Partial<AppSettings>} [$$source = {}] - The source object to create the AppSettings.
- */
- constructor($$source = {}) {
- if (!("theme" in $$source)) {
- /**
- * 界面主题:dark / light
- * @member
- * @type {string}
- */
- this["theme"] = "";
- }
- if (!("autostart" in $$source)) {
- /**
- * 系统启动时运行
- * @member
- * @type {boolean}
- */
- this["autostart"] = false;
- }
- if (!("alwaysOnTop" in $$source)) {
- /**
- * 窗口置顶
- * @member
- * @type {boolean}
- */
- this["alwaysOnTop"] = false;
- }
- if (!("startCompact" in $$source)) {
- /**
- * 启动时自动收拢为圆点(窗口缩小)
- * @member
- * @type {boolean}
- */
- this["startCompact"] = false;
- }
- if (!("windowWidth" in $$source)) {
- /**
- * 主窗口宽度(px),随窗口调整自动保存
- * @member
- * @type {number}
- */
- this["windowWidth"] = 0;
- }
- if (!("windowHeight" in $$source)) {
- /**
- * 主窗口高度(px),随窗口调整自动保存
- * @member
- * @type {number}
- */
- this["windowHeight"] = 0;
- }
- if (!("hotkey" in $$source)) {
- /**
- * 呼出(显示)窗口的全局热键
- * @member
- * @type {string}
- */
- this["hotkey"] = "";
- }
- if (!("tabOrder" in $$source)) {
- /**
- * Tab 显示顺序(tabId 列表,未列出的追加到末尾)
- * @member
- * @type {string[]}
- */
- this["tabOrder"] = [];
- }
- if (!("stockCodes" in $$source)) {
- /**
- * 股市页展示的股票代码列表
- * @member
- * @type {string[]}
- */
- this["stockCodes"] = [];
- }
- if (!("links" in $$source)) {
- /**
- * 常用网址列表
- * @member
- * @type {LinkItem[]}
- */
- this["links"] = [];
- }
- if (!("newsKeywords" in $$source)) {
- /**
- * 新闻关注关键词,逗号分隔
- * @member
- * @type {string}
- */
- this["newsKeywords"] = "";
- }
- if (!("biliCookie" in $$source)) {
- /**
- * B站登录 cookie(含 SESSDATA),用于抓取「关注的人最新动态」
- * @member
- * @type {string}
- */
- this["biliCookie"] = "";
- }
- if (!("githubRepos" in $$source)) {
- /**
- * 关注的 GitHub 仓库列表
- * @member
- * @type {RepoItem[]}
- */
- this["githubRepos"] = [];
- }
- if (!("customTabs" in $$source)) {
- /**
- * 用户自定义 Tab 页面(名字 + 网址)
- * @member
- * @type {CustomTab[]}
- */
- this["customTabs"] = [];
- }
- if (!("localTools" in $$source)) {
- /**
- * 「本地」页资源(标题|启动命令|说明,在设置中维护)
- * @member
- * @type {LocalTool[]}
- */
- this["localTools"] = [];
- }
- if (!("apiAddr" in $$source)) {
- /**
- * 内置 API 服务监听地址
- * @member
- * @type {string}
- */
- this["apiAddr"] = "";
- }
- if (!("serviceAddr" in $$source)) {
- /**
- * Windows 服务模式(--service)监听地址,仅电源类接口
- * @member
- * @type {string}
- */
- this["serviceAddr"] = "";
- }
- if (!("apiAutoStart" in $$source)) {
- /**
- * 应用启动时自动启动内置 API 服务(默认开启)
- * @member
- * @type {boolean}
- */
- this["apiAutoStart"] = false;
- }
- if (!("uploadPassword" in $$source)) {
- /**
- * 文件上传密码(空=不启用上传/下载接口)
- * @member
- * @type {string}
- */
- this["uploadPassword"] = "";
- }
- if (!("uploadDir" in $$source)) {
- /**
- * 文件上传保存目录(空=用户配置目录/uploads)
- * @member
- * @type {string}
- */
- this["uploadDir"] = "";
- }
- if (!("uploadMaxSize" in $$source)) {
- /**
- * 单个上传文件大小上限(MB),<=0 用默认 512
- * @member
- * @type {number}
- */
- this["uploadMaxSize"] = 0;
- }
- if (!("todoPath" in $$source)) {
- /**
- * 待办(TODO)文件路径
- * @member
- * @type {string}
- */
- this["todoPath"] = "";
- }
- if (!("recordPath" in $$source)) {
- /**
- * 记录(Record)文件路径:每行「姓名|名称|值」(保留兼容)
- * @member
- * @type {string}
- */
- this["recordPath"] = "";
- }
- if (!("recordDBPath" in $$source)) {
- /**
- * 记录数据库路径:SQLite3 数据库文件(记录 Tab 实际存储)
- * @member
- * @type {string}
- */
- this["recordDBPath"] = "";
- }
- if (!("backupDir" in $$source)) {
- /**
- * 文本文件备份目录(文件类自定义 Tab「备份」按钮使用)
- * @member
- * @type {string}
- */
- this["backupDir"] = "";
- }
- if (!("stockTicker" in $$source)) {
- /**
- * 股票滚动条配置
- * @member
- * @type {TickerConfig}
- */
- this["stockTicker"] = (new TickerConfig());
- }
- if (!("newsTicker" in $$source)) {
- /**
- * 新闻滚动条配置
- * @member
- * @type {TickerConfig}
- */
- this["newsTicker"] = (new TickerConfig());
- }
- if (!("poem" in $$source)) {
- /**
- * 随机古诗显示配置
- * @member
- * @type {PoemConfig}
- */
- this["poem"] = (new PoemConfig());
- }
- if (!("mouseAlert" in $$source)) {
- /**
- * 系统级鼠标提醒气泡配置
- * @member
- * @type {MouseAlertConfig}
- */
- this["mouseAlert"] = (new MouseAlertConfig());
- }
- if (!("browserPath" in $$source)) {
- /**
- * 指定浏览器 exe 路径(空=系统默认浏览器)
- * @member
- * @type {string}
- */
- this["browserPath"] = "";
- }
- if (!("ledColor" in $$source)) {
- /**
- * LED 滚动文字点阵颜色(如 #ff4d4d)
- * @member
- * @type {string}
- */
- this["ledColor"] = "";
- }
- if (!("stockUpColor" in $$source)) {
- /**
- * 股票上涨颜色
- * @member
- * @type {string}
- */
- this["stockUpColor"] = "";
- }
- if (!("stockDownColor" in $$source)) {
- /**
- * 股票下跌颜色
- * @member
- * @type {string}
- */
- this["stockDownColor"] = "";
- }
- if (!("stockRefreshSecs" in $$source)) {
- /**
- * 股市自动刷新间隔(秒)
- * @member
- * @type {number}
- */
- this["stockRefreshSecs"] = 0;
- }
- if (!("stockClosedRefreshSecs" in $$source)) {
- /**
- * 股市休市时自动刷新间隔(秒)
- * @member
- * @type {number}
- */
- this["stockClosedRefreshSecs"] = 0;
- }
- if (!("newsRefreshMinutes" in $$source)) {
- /**
- * 新闻自动刷新间隔(分钟)
- * @member
- * @type {number}
- */
- this["newsRefreshMinutes"] = 0;
- }
- if (!("newsCount" in $$source)) {
- /**
- * 新闻页显示条数
- * @member
- * @type {number}
- */
- this["newsCount"] = 0;
- }
- if (!("githubRefreshMinutes" in $$source)) {
- /**
- * Github 自动刷新间隔(分钟)
- * @member
- * @type {number}
- */
- this["githubRefreshMinutes"] = 0;
- }
- if (!("fontDelta" in $$source)) {
- /**
- * 全局字号偏移(px),+-3 范围内调整
- * @member
- * @type {number}
- */
- this["fontDelta"] = 0;
- }
- if (!("localSend" in $$source)) {
- /**
- * LocalSend 文件互传配置(本机名/接收目录/接收模式等)
- * @member
- * @type {LocalSendConfig}
- */
- this["localSend"] = (new LocalSendConfig());
- }
- if (!("croc" in $$source)) {
- /**
- * Croc 传送配置(发送/接收共用密码)
- * @member
- * @type {CrocConfig}
- */
- this["croc"] = (new CrocConfig());
- }
- if (!("ytdlp" in $$source)) {
- /**
- * 视频下载配置(yt-dlp 保存目录)
- * @member
- * @type {YTDLPConfig}
- */
- this["ytdlp"] = (new YTDLPConfig());
- }
- if (!("memos" in $$source)) {
- /**
- * Memos 速记配置(地址/访问令牌)
- * @member
- * @type {MemosConfig}
- */
- this["memos"] = (new MemosConfig());
- }
- if (!("brightness" in $$source)) {
- /**
- * 显示器亮度配置(记住亮度、启动恢复)
- * @member
- * @type {BrightnessConfig}
- */
- this["brightness"] = (new BrightnessConfig());
- }
- if (!("toolOrder" in $$source)) {
- /**
- * 工具页卡片显示顺序(工具 id 列表,未列出的追加到末尾)
- * @member
- * @type {string[]}
- */
- this["toolOrder"] = [];
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new AppSettings instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {AppSettings}
- */
- static createFrom($$source = {}) {
- const $$createField7_0 = $$createType0;
- const $$createField8_0 = $$createType0;
- const $$createField9_0 = $$createType2;
- const $$createField12_0 = $$createType4;
- const $$createField13_0 = $$createType6;
- const $$createField14_0 = $$createType8;
- const $$createField25_0 = $$createType9;
- const $$createField26_0 = $$createType9;
- const $$createField27_0 = $$createType10;
- const $$createField28_0 = $$createType11;
- const $$createField39_0 = $$createType12;
- const $$createField40_0 = $$createType13;
- const $$createField41_0 = $$createType14;
- const $$createField42_0 = $$createType15;
- const $$createField43_0 = $$createType16;
- const $$createField44_0 = $$createType0;
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- if ("tabOrder" in $$parsedSource) {
- $$parsedSource["tabOrder"] = $$createField7_0($$parsedSource["tabOrder"]);
- }
- if ("stockCodes" in $$parsedSource) {
- $$parsedSource["stockCodes"] = $$createField8_0($$parsedSource["stockCodes"]);
- }
- if ("links" in $$parsedSource) {
- $$parsedSource["links"] = $$createField9_0($$parsedSource["links"]);
- }
- if ("githubRepos" in $$parsedSource) {
- $$parsedSource["githubRepos"] = $$createField12_0($$parsedSource["githubRepos"]);
- }
- if ("customTabs" in $$parsedSource) {
- $$parsedSource["customTabs"] = $$createField13_0($$parsedSource["customTabs"]);
- }
- if ("localTools" in $$parsedSource) {
- $$parsedSource["localTools"] = $$createField14_0($$parsedSource["localTools"]);
- }
- if ("stockTicker" in $$parsedSource) {
- $$parsedSource["stockTicker"] = $$createField25_0($$parsedSource["stockTicker"]);
- }
- if ("newsTicker" in $$parsedSource) {
- $$parsedSource["newsTicker"] = $$createField26_0($$parsedSource["newsTicker"]);
- }
- if ("poem" in $$parsedSource) {
- $$parsedSource["poem"] = $$createField27_0($$parsedSource["poem"]);
- }
- if ("mouseAlert" in $$parsedSource) {
- $$parsedSource["mouseAlert"] = $$createField28_0($$parsedSource["mouseAlert"]);
- }
- if ("localSend" in $$parsedSource) {
- $$parsedSource["localSend"] = $$createField39_0($$parsedSource["localSend"]);
- }
- if ("croc" in $$parsedSource) {
- $$parsedSource["croc"] = $$createField40_0($$parsedSource["croc"]);
- }
- if ("ytdlp" in $$parsedSource) {
- $$parsedSource["ytdlp"] = $$createField41_0($$parsedSource["ytdlp"]);
- }
- if ("memos" in $$parsedSource) {
- $$parsedSource["memos"] = $$createField42_0($$parsedSource["memos"]);
- }
- if ("brightness" in $$parsedSource) {
- $$parsedSource["brightness"] = $$createField43_0($$parsedSource["brightness"]);
- }
- if ("toolOrder" in $$parsedSource) {
- $$parsedSource["toolOrder"] = $$createField44_0($$parsedSource["toolOrder"]);
- }
- return new AppSettings(/** @type {Partial<AppSettings>} */($$parsedSource));
- }
- }
- /**
- * BiliDynamicItem 一条 B站动态,供「新闻」页展示
- */
- export class BiliDynamicItem {
- /**
- * Creates a new BiliDynamicItem instance.
- * @param {Partial<BiliDynamicItem>} [$$source = {}] - The source object to create the BiliDynamicItem.
- */
- constructor($$source = {}) {
- if (!("source" in $$source)) {
- /**
- * 来源:B站动态
- * @member
- * @type {string}
- */
- this["source"] = "";
- }
- if (!("title" in $$source)) {
- /**
- * 标题(动态文案或视频标题)
- * @member
- * @type {string}
- */
- this["title"] = "";
- }
- if (!("url" in $$source)) {
- /**
- * 详情页地址
- * @member
- * @type {string}
- */
- this["url"] = "";
- }
- if (!("matched" in $$source)) {
- /**
- * 是否命中关注关键词
- * @member
- * @type {boolean}
- */
- this["matched"] = false;
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new BiliDynamicItem instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {BiliDynamicItem}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new BiliDynamicItem(/** @type {Partial<BiliDynamicItem>} */($$parsedSource));
- }
- }
- /**
- * BiliFeedResult B站动态抓取结果:列表 + 需要提示用户的说明(如 cookie 过期后回退热门)
- */
- export class BiliFeedResult {
- /**
- * Creates a new BiliFeedResult instance.
- * @param {Partial<BiliFeedResult>} [$$source = {}] - The source object to create the BiliFeedResult.
- */
- constructor($$source = {}) {
- if (!("items" in $$source)) {
- /**
- * @member
- * @type {BiliDynamicItem[]}
- */
- this["items"] = [];
- }
- if (!("notice" in $$source)) {
- /**
- * @member
- * @type {string}
- */
- this["notice"] = "";
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new BiliFeedResult instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {BiliFeedResult}
- */
- static createFrom($$source = {}) {
- const $$createField0_0 = $$createType18;
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- if ("items" in $$parsedSource) {
- $$parsedSource["items"] = $$createField0_0($$parsedSource["items"]);
- }
- return new BiliFeedResult(/** @type {Partial<BiliFeedResult>} */($$parsedSource));
- }
- }
- /**
- * BrightnessConfig 显示器亮度配置:记住各显示器亮度(按显示器名称),供启动时恢复
- */
- export class BrightnessConfig {
- /**
- * Creates a new BrightnessConfig instance.
- * @param {Partial<BrightnessConfig>} [$$source = {}] - The source object to create the BrightnessConfig.
- */
- constructor($$source = {}) {
- if (!("restoreOnStart" in $$source)) {
- /**
- * 启动应用时恢复上次亮度
- * @member
- * @type {boolean}
- */
- this["restoreOnStart"] = false;
- }
- if (!("levels" in $$source)) {
- /**
- * 显示器名称 -> 亮度百分比(0-100)
- * @member
- * @type {{ [_ in string]?: number }}
- */
- this["levels"] = {};
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new BrightnessConfig instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {BrightnessConfig}
- */
- static createFrom($$source = {}) {
- const $$createField1_0 = $$createType19;
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- if ("levels" in $$parsedSource) {
- $$parsedSource["levels"] = $$createField1_0($$parsedSource["levels"]);
- }
- return new BrightnessConfig(/** @type {Partial<BrightnessConfig>} */($$parsedSource));
- }
- }
- /**
- * CommitItem 仓库的一条提交记录
- */
- export class CommitItem {
- /**
- * Creates a new CommitItem instance.
- * @param {Partial<CommitItem>} [$$source = {}] - The source object to create the CommitItem.
- */
- constructor($$source = {}) {
- if (!("title" in $$source)) {
- /**
- * 提交标题(首行)
- * @member
- * @type {string}
- */
- this["title"] = "";
- }
- if (!("url" in $$source)) {
- /**
- * 提交详情页地址
- * @member
- * @type {string}
- */
- this["url"] = "";
- }
- if (!("updated" in $$source)) {
- /**
- * 提交时间(MM-DD HH:MM)
- * @member
- * @type {string}
- */
- this["updated"] = "";
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new CommitItem instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {CommitItem}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new CommitItem(/** @type {Partial<CommitItem>} */($$parsedSource));
- }
- }
- /**
- * CrocConfig 是 Croc 传送的配置(发送/接收共用密码)。
- */
- export class CrocConfig {
- /**
- * Creates a new CrocConfig instance.
- * @param {Partial<CrocConfig>} [$$source = {}] - The source object to create the CrocConfig.
- */
- constructor($$source = {}) {
- if (!("password" in $$source)) {
- /**
- * 发送/接收共用密码:作为 croc 传输码(--code),空=使用随机传输码
- * @member
- * @type {string}
- */
- this["password"] = "";
- }
- if (!("dir" in $$source)) {
- /**
- * 接收保存目录,空=当前工作目录
- * @member
- * @type {string}
- */
- this["dir"] = "";
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new CrocConfig instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {CrocConfig}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new CrocConfig(/** @type {Partial<CrocConfig>} */($$parsedSource));
- }
- }
- /**
- * CrocInfo 描述本机 croc 的可用性,用于前端决定是否展示工具卡片。
- */
- export class CrocInfo {
- /**
- * Creates a new CrocInfo instance.
- * @param {Partial<CrocInfo>} [$$source = {}] - The source object to create the CrocInfo.
- */
- constructor($$source = {}) {
- if (!("available" in $$source)) {
- /**
- * PATH 中是否找到 croc
- * @member
- * @type {boolean}
- */
- this["available"] = false;
- }
- if (!("path" in $$source)) {
- /**
- * croc 可执行文件路径
- * @member
- * @type {string}
- */
- this["path"] = "";
- }
- if (!("version" in $$source)) {
- /**
- * 版本信息(croc --version 输出)
- * @member
- * @type {string}
- */
- this["version"] = "";
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new CrocInfo instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {CrocInfo}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new CrocInfo(/** @type {Partial<CrocInfo>} */($$parsedSource));
- }
- }
- /**
- * CustomTab 用户自定义 Tab 页面
- */
- export class CustomTab {
- /**
- * Creates a new CustomTab instance.
- * @param {Partial<CustomTab>} [$$source = {}] - The source object to create the CustomTab.
- */
- constructor($$source = {}) {
- if (!("name" in $$source)) {
- /**
- * 页面名称(Tab 按钮显示文字)
- * @member
- * @type {string}
- */
- this["name"] = "";
- }
- if (!("url" in $$source)) {
- /**
- * 页面地址(iframe 加载)
- * @member
- * @type {string}
- */
- this["url"] = "";
- }
- if (!("desc" in $$source)) {
- /**
- * 备注/提示信息(可空),Tab 说明文字优先显示
- * @member
- * @type {string}
- */
- this["desc"] = "";
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new CustomTab instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {CustomTab}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new CustomTab(/** @type {Partial<CustomTab>} */($$parsedSource));
- }
- }
- /**
- * KLineBar 日 K 的一根柱子
- */
- export class KLineBar {
- /**
- * Creates a new KLineBar instance.
- * @param {Partial<KLineBar>} [$$source = {}] - The source object to create the KLineBar.
- */
- constructor($$source = {}) {
- if (!("date" in $$source)) {
- /**
- * 交易日
- * @member
- * @type {string}
- */
- this["date"] = "";
- }
- if (!("open" in $$source)) {
- /**
- * 开盘价
- * @member
- * @type {number}
- */
- this["open"] = 0;
- }
- if (!("close" in $$source)) {
- /**
- * 收盘价
- * @member
- * @type {number}
- */
- this["close"] = 0;
- }
- if (!("high" in $$source)) {
- /**
- * 最高价
- * @member
- * @type {number}
- */
- this["high"] = 0;
- }
- if (!("low" in $$source)) {
- /**
- * 最低价
- * @member
- * @type {number}
- */
- this["low"] = 0;
- }
- if (!("volume" in $$source)) {
- /**
- * 成交量(手)
- * @member
- * @type {number}
- */
- this["volume"] = 0;
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new KLineBar instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {KLineBar}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new KLineBar(/** @type {Partial<KLineBar>} */($$parsedSource));
- }
- }
- /**
- * LinkItem 常用网址条目
- */
- export class LinkItem {
- /**
- * Creates a new LinkItem instance.
- * @param {Partial<LinkItem>} [$$source = {}] - The source object to create the LinkItem.
- */
- constructor($$source = {}) {
- if (!("name" in $$source)) {
- /**
- * 网站名称
- * @member
- * @type {string}
- */
- this["name"] = "";
- }
- if (!("url" in $$source)) {
- /**
- * 网站地址
- * @member
- * @type {string}
- */
- this["url"] = "";
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new LinkItem instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {LinkItem}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new LinkItem(/** @type {Partial<LinkItem>} */($$parsedSource));
- }
- }
- /**
- * LocalSendConfig 是 LocalSend 的运行时配置。
- */
- export class LocalSendConfig {
- /**
- * Creates a new LocalSendConfig instance.
- * @param {Partial<LocalSendConfig>} [$$source = {}] - The source object to create the LocalSendConfig.
- */
- constructor($$source = {}) {
- if (!("enabled" in $$source)) {
- /**
- * 是否已启动服务
- * @member
- * @type {boolean}
- */
- this["enabled"] = false;
- }
- if (!("alias" in $$source)) {
- /**
- * 本机名称(广播给其他设备)
- * @member
- * @type {string}
- */
- this["alias"] = "";
- }
- if (!("receiveDir" in $$source)) {
- /**
- * 接收文件保存目录
- * @member
- * @type {string}
- */
- this["receiveDir"] = "";
- }
- if (!("autoAccept" in $$source)) {
- /**
- * true=自动接收;false=手动确认
- * @member
- * @type {boolean}
- */
- this["autoAccept"] = false;
- }
- if (!("port" in $$source)) {
- /**
- * 监听端口
- * @member
- * @type {number}
- */
- this["port"] = 0;
- }
- if (!("fingerprint" in $$source)) {
- /**
- * 本机证书指纹
- * @member
- * @type {string}
- */
- this["fingerprint"] = "";
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new LocalSendConfig instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {LocalSendConfig}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new LocalSendConfig(/** @type {Partial<LocalSendConfig>} */($$parsedSource));
- }
- }
- /**
- * LocalTool 本地资源/工具配置项(「本地」页,在设置中维护)
- */
- export class LocalTool {
- /**
- * Creates a new LocalTool instance.
- * @param {Partial<LocalTool>} [$$source = {}] - The source object to create the LocalTool.
- */
- constructor($$source = {}) {
- if (!("title" in $$source)) {
- /**
- * 显示标题
- * @member
- * @type {string}
- */
- this["title"] = "";
- }
- if (!("cmd" in $$source)) {
- /**
- * 启动命令(程序/脚本,可带参数与环境变量)
- * @member
- * @type {string}
- */
- this["cmd"] = "";
- }
- if (!("desc" in $$source)) {
- /**
- * 说明文字(可空)
- * @member
- * @type {string}
- */
- this["desc"] = "";
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new LocalTool instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {LocalTool}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new LocalTool(/** @type {Partial<LocalTool>} */($$parsedSource));
- }
- }
- /**
- * MemosConfig 保存 Memos 速记所需的配置。
- */
- export class MemosConfig {
- /**
- * Creates a new MemosConfig instance.
- * @param {Partial<MemosConfig>} [$$source = {}] - The source object to create the MemosConfig.
- */
- constructor($$source = {}) {
- if (!("url" in $$source)) {
- /**
- * 实例地址,如 https://m.scwy.net
- * @member
- * @type {string}
- */
- this["url"] = "";
- }
- if (!("token" in $$source)) {
- /**
- * 个人访问令牌(PAT),只存本地
- * @member
- * @type {string}
- */
- this["token"] = "";
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new MemosConfig instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {MemosConfig}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new MemosConfig(/** @type {Partial<MemosConfig>} */($$parsedSource));
- }
- }
- /**
- * MinuteChart 分时图数据
- */
- export class MinuteChart {
- /**
- * Creates a new MinuteChart instance.
- * @param {Partial<MinuteChart>} [$$source = {}] - The source object to create the MinuteChart.
- */
- constructor($$source = {}) {
- if (!("code" in $$source)) {
- /**
- * 股票代码
- * @member
- * @type {string}
- */
- this["code"] = "";
- }
- if (!("prevClose" in $$source)) {
- /**
- * 昨收,作为分时基准线
- * @member
- * @type {number}
- */
- this["prevClose"] = 0;
- }
- if (!("points" in $$source)) {
- /**
- * 分时点序列
- * @member
- * @type {MinutePoint[]}
- */
- this["points"] = [];
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new MinuteChart instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {MinuteChart}
- */
- static createFrom($$source = {}) {
- const $$createField2_0 = $$createType21;
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- if ("points" in $$parsedSource) {
- $$parsedSource["points"] = $$createField2_0($$parsedSource["points"]);
- }
- return new MinuteChart(/** @type {Partial<MinuteChart>} */($$parsedSource));
- }
- }
- /**
- * MinutePoint 分时图上的一个点
- */
- export class MinutePoint {
- /**
- * Creates a new MinutePoint instance.
- * @param {Partial<MinutePoint>} [$$source = {}] - The source object to create the MinutePoint.
- */
- constructor($$source = {}) {
- if (!("time" in $$source)) {
- /**
- * HH:MM
- * @member
- * @type {string}
- */
- this["time"] = "";
- }
- if (!("price" in $$source)) {
- /**
- * 当前价
- * @member
- * @type {number}
- */
- this["price"] = 0;
- }
- if (!("avg" in $$source)) {
- /**
- * 均价
- * @member
- * @type {number}
- */
- this["avg"] = 0;
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new MinutePoint instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {MinutePoint}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new MinutePoint(/** @type {Partial<MinutePoint>} */($$parsedSource));
- }
- }
- /**
- * MonitorBrightnessInfo 单个显示器的亮度状态(返回给前端渲染滑块)
- */
- export class MonitorBrightnessInfo {
- /**
- * Creates a new MonitorBrightnessInfo instance.
- * @param {Partial<MonitorBrightnessInfo>} [$$source = {}] - The source object to create the MonitorBrightnessInfo.
- */
- constructor($$source = {}) {
- if (!("index" in $$source)) {
- /**
- * 显示器序号(与 SetBrightness 的 index 一致)
- * @member
- * @type {number}
- */
- this["index"] = 0;
- }
- if (!("name" in $$source)) {
- /**
- * 显示器名称(物理监视器描述,取不到时用设备名)
- * @member
- * @type {string}
- */
- this["name"] = "";
- }
- if (!("percent" in $$source)) {
- /**
- * 当前亮度百分比 0-100
- * @member
- * @type {number}
- */
- this["percent"] = 0;
- }
- if (!("hardware" in $$source)) {
- /**
- * true=DDC/CI 硬件调光;false=Gamma 软件调光
- * @member
- * @type {boolean}
- */
- this["hardware"] = false;
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new MonitorBrightnessInfo instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {MonitorBrightnessInfo}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new MonitorBrightnessInfo(/** @type {Partial<MonitorBrightnessInfo>} */($$parsedSource));
- }
- }
- /**
- * MouseAlertConfig 系统级鼠标提醒气泡的显示配置
- */
- export class MouseAlertConfig {
- /**
- * Creates a new MouseAlertConfig instance.
- * @param {Partial<MouseAlertConfig>} [$$source = {}] - The source object to create the MouseAlertConfig.
- */
- constructor($$source = {}) {
- if (!("fontSize" in $$source)) {
- /**
- * 字号(px)
- * @member
- * @type {number}
- */
- this["fontSize"] = 0;
- }
- if (!("width" in $$source)) {
- /**
- * 气泡窗口宽度(px)
- * @member
- * @type {number}
- */
- this["width"] = 0;
- }
- if (!("speed" in $$source)) {
- /**
- * 超长文字滚动速度(px/s)
- * @member
- * @type {number}
- */
- this["speed"] = 0;
- }
- if (!("color" in $$source)) {
- /**
- * 文字颜色
- * @member
- * @type {string}
- */
- this["color"] = "";
- }
- if (!("background" in $$source)) {
- /**
- * 气泡背景色(COLORKEY 抠成透明,仅作底色参考)
- * @member
- * @type {string}
- */
- this["background"] = "";
- }
- if (!("duration" in $$source)) {
- /**
- * 显示时长(秒)
- * @member
- * @type {number}
- */
- this["duration"] = 0;
- }
- if (!("outlineColor" in $$source)) {
- /**
- * 文字描边颜色(白边/黑边,与文字形成反差)
- * @member
- * @type {string}
- */
- this["outlineColor"] = "";
- }
- if (!("outlineWidth" in $$source)) {
- /**
- * 文字描边宽度(px),0 表示关闭描边
- * @member
- * @type {number}
- */
- this["outlineWidth"] = 0;
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new MouseAlertConfig instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {MouseAlertConfig}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new MouseAlertConfig(/** @type {Partial<MouseAlertConfig>} */($$parsedSource));
- }
- }
- /**
- * NewsItem 一条新闻标题,供「新闻」页与新闻滚动条使用
- */
- export class NewsItem {
- /**
- * Creates a new NewsItem instance.
- * @param {Partial<NewsItem>} [$$source = {}] - The source object to create the NewsItem.
- */
- constructor($$source = {}) {
- if (!("source" in $$source)) {
- /**
- * 来源:煎蛋 / 腾讯 / Solidot / 财联社 / 热榜
- * @member
- * @type {string}
- */
- this["source"] = "";
- }
- if (!("title" in $$source)) {
- /**
- * 标题
- * @member
- * @type {string}
- */
- this["title"] = "";
- }
- if (!("url" in $$source)) {
- /**
- * 详情页地址
- * @member
- * @type {string}
- */
- this["url"] = "";
- }
- if (!("matched" in $$source)) {
- /**
- * 是否命中关注关键词
- * @member
- * @type {boolean}
- */
- this["matched"] = false;
- }
- if (!("hits" in $$source)) {
- /**
- * 命中的关键词个数(越多排越前,前端按档位配色)
- * @member
- * @type {number}
- */
- this["hits"] = 0;
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new NewsItem instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {NewsItem}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new NewsItem(/** @type {Partial<NewsItem>} */($$parsedSource));
- }
- }
- /**
- * PCStatus 电源命令状态快照,供 API 与「主机」页查询
- */
- export class PCStatus {
- /**
- * Creates a new PCStatus instance.
- * @param {Partial<PCStatus>} [$$source = {}] - The source object to create the PCStatus.
- */
- constructor($$source = {}) {
- if (!("command" in $$source)) {
- /**
- * 最近一次命令类型
- * @member
- * @type {string}
- */
- this["command"] = "";
- }
- if (!("pending" in $$source)) {
- /**
- * 是否有待执行命令
- * @member
- * @type {boolean}
- */
- this["pending"] = false;
- }
- if (!("executeAt" in $$source)) {
- /**
- * 计划执行时间
- * @member
- * @type {string}
- */
- this["executeAt"] = "";
- }
- if (!("remainingSecs" in $$source)) {
- /**
- * 剩余秒数
- * @member
- * @type {number}
- */
- this["remainingSecs"] = 0;
- }
- if (!("clientIp" in $$source)) {
- /**
- * 最近一次请求的客户端 IP
- * @member
- * @type {string}
- */
- this["clientIp"] = "";
- }
- if (!("requestTime" in $$source)) {
- /**
- * 最近一次请求时间
- * @member
- * @type {string}
- */
- this["requestTime"] = "";
- }
- if (!("requested" in $$source)) {
- /**
- * 是否收到过请求
- * @member
- * @type {boolean}
- */
- this["requested"] = false;
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new PCStatus instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {PCStatus}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new PCStatus(/** @type {Partial<PCStatus>} */($$parsedSource));
- }
- }
- /**
- * PoemConfig 古诗显示的配置
- */
- export class PoemConfig {
- /**
- * Creates a new PoemConfig instance.
- * @param {Partial<PoemConfig>} [$$source = {}] - The source object to create the PoemConfig.
- */
- constructor($$source = {}) {
- if (!("enabled" in $$source)) {
- /**
- * 是否启用古诗显示
- * @member
- * @type {boolean}
- */
- this["enabled"] = false;
- }
- if (!("color" in $$source)) {
- /**
- * 文字颜色
- * @member
- * @type {string}
- */
- this["color"] = "";
- }
- if (!("fontSize" in $$source)) {
- /**
- * 字号(px)
- * @member
- * @type {number}
- */
- this["fontSize"] = 0;
- }
- if (!("tts" in $$source)) {
- /**
- * 允许 TTS 阅读(显示朗读按钮)
- * @member
- * @type {boolean}
- */
- this["tts"] = false;
- }
- if (!("interval" in $$source)) {
- /**
- * 自动换诗间隔(秒),0 表示不自动换
- * @member
- * @type {number}
- */
- this["interval"] = 0;
- }
- if (!("speed" in $$source)) {
- /**
- * 滚动速度(秒/轮),即滚动一个文本周期所需秒数,越小越快
- * @member
- * @type {number}
- */
- this["speed"] = 0;
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new PoemConfig instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {PoemConfig}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new PoemConfig(/** @type {Partial<PoemConfig>} */($$parsedSource));
- }
- }
- /**
- * PoemData 一首古诗的完整数据(从接口解析)
- */
- export class PoemData {
- /**
- * Creates a new PoemData instance.
- * @param {Partial<PoemData>} [$$source = {}] - The source object to create the PoemData.
- */
- constructor($$source = {}) {
- if (!("title" in $$source)) {
- /**
- * 题目
- * @member
- * @type {string}
- */
- this["title"] = "";
- }
- if (!("author" in $$source)) {
- /**
- * 作者
- * @member
- * @type {string}
- */
- this["author"] = "";
- }
- if (!("dynasty" in $$source)) {
- /**
- * 朝代
- * @member
- * @type {string}
- */
- this["dynasty"] = "";
- }
- if (!("content" in $$source)) {
- /**
- * 每句诗(数组,按行显示)
- * @member
- * @type {string[]}
- */
- this["content"] = [];
- }
- if (!("type" in $$source)) {
- /**
- * 体裁,如 五言律诗
- * @member
- * @type {string}
- */
- this["type"] = "";
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new PoemData instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {PoemData}
- */
- static createFrom($$source = {}) {
- const $$createField3_0 = $$createType0;
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- if ("content" in $$parsedSource) {
- $$parsedSource["content"] = $$createField3_0($$parsedSource["content"]);
- }
- return new PoemData(/** @type {Partial<PoemData>} */($$parsedSource));
- }
- }
- /**
- * RecordItem 一条记录:姓名 + 名称 + 值 + 备注 + 录入时间,供记录 Tab 列表与柱状图使用
- */
- export class RecordItem {
- /**
- * Creates a new RecordItem instance.
- * @param {Partial<RecordItem>} [$$source = {}] - The source object to create the RecordItem.
- */
- constructor($$source = {}) {
- if (!("name" in $$source)) {
- /**
- * 姓名
- * @member
- * @type {string}
- */
- this["name"] = "";
- }
- if (!("item" in $$source)) {
- /**
- * 名称
- * @member
- * @type {string}
- */
- this["item"] = "";
- }
- if (!("value" in $$source)) {
- /**
- * 值
- * @member
- * @type {number}
- */
- this["value"] = 0;
- }
- if (!("remark" in $$source)) {
- /**
- * 备注(可选)
- * @member
- * @type {string}
- */
- this["remark"] = "";
- }
- if (!("createdAt" in $$source)) {
- /**
- * 录入时间 YYYY-MM-DD HH:MM:SS(前端新增时生成;为空时后端用当前时间)
- * @member
- * @type {string}
- */
- this["createdAt"] = "";
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new RecordItem instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {RecordItem}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new RecordItem(/** @type {Partial<RecordItem>} */($$parsedSource));
- }
- }
- /**
- * ReleaseItem 一个 GitHub release 的简略信息,用于列出 Latest 之后的版本(Pre-release 等)
- */
- export class ReleaseItem {
- /**
- * Creates a new ReleaseItem instance.
- * @param {Partial<ReleaseItem>} [$$source = {}] - The source object to create the ReleaseItem.
- */
- constructor($$source = {}) {
- if (!("tagName" in $$source)) {
- /**
- * 版本标签,如 v1.3.0-beta.1
- * @member
- * @type {string}
- */
- this["tagName"] = "";
- }
- if (!("name" in $$source)) {
- /**
- * release 显示名称(标题),可能比 tag 更完整,如 "Rolling: v2.1.0-..."
- * @member
- * @type {string}
- */
- this["name"] = "";
- }
- if (!("url" in $$source)) {
- /**
- * release 详情页地址
- * @member
- * @type {string}
- */
- this["url"] = "";
- }
- if (!("isPrerelease" in $$source)) {
- /**
- * 是否预发布版本
- * @member
- * @type {boolean}
- */
- this["isPrerelease"] = false;
- }
- if (!("isDraft" in $$source)) {
- /**
- * 是否草稿版本
- * @member
- * @type {boolean}
- */
- this["isDraft"] = false;
- }
- if (!("publishedAt" in $$source)) {
- /**
- * 发布时间(MM-DD HH:MM)
- * @member
- * @type {string}
- */
- this["publishedAt"] = "";
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new ReleaseItem instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {ReleaseItem}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new ReleaseItem(/** @type {Partial<ReleaseItem>} */($$parsedSource));
- }
- }
- /**
- * RepoFeed 一个 GitHub 仓库的最新提交摘要
- */
- export class RepoFeed {
- /**
- * Creates a new RepoFeed instance.
- * @param {Partial<RepoFeed>} [$$source = {}] - The source object to create the RepoFeed.
- */
- constructor($$source = {}) {
- if (!("url" in $$source)) {
- /**
- * 仓库地址(设置中配置)
- * @member
- * @type {string}
- */
- this["url"] = "";
- }
- if (!("desc" in $$source)) {
- /**
- * 项目说明
- * @member
- * @type {string}
- */
- this["desc"] = "";
- }
- if (!("repo" in $$source)) {
- /**
- * owner/repo 短名
- * @member
- * @type {string}
- */
- this["repo"] = "";
- }
- if (!("version" in $$source)) {
- /**
- * 本地已安装版本(设置中配置)
- * @member
- * @type {string}
- */
- this["version"] = "";
- }
- if (!("versionTime" in $$source)) {
- /**
- * 本地版本对应 release 的发布时间(MM-DD HH:MM),用于鼠标提示
- * @member
- * @type {string}
- */
- this["versionTime"] = "";
- }
- if (!("latest" in $$source)) {
- /**
- * 最新正式 release 版本号,无正式 release 时为空
- * @member
- * @type {string}
- */
- this["latest"] = "";
- }
- if (!("latestTime" in $$source)) {
- /**
- * 最新正式 release 发布时间(MM-DD HH:MM),用于鼠标提示
- * @member
- * @type {string}
- */
- this["latestTime"] = "";
- }
- if (!("hasUpdate" in $$source)) {
- /**
- * 是否存在可用更新(本地版本低于最新正式 release)
- * @member
- * @type {boolean}
- */
- this["hasUpdate"] = false;
- }
- if (!("releaseURL" in $$source)) {
- /**
- * 最新正式 release 的下载 / 详情页地址
- * @member
- * @type {string}
- */
- this["releaseURL"] = "";
- }
- if (!("newer" in $$source)) {
- /**
- * Latest 之后的版本(Pre-release 等,仅列出不参与更新比较)
- * @member
- * @type {ReleaseItem[]}
- */
- this["newer"] = [];
- }
- if (!("commits" in $$source)) {
- /**
- * 最近提交(最多 5 条)
- * @member
- * @type {CommitItem[]}
- */
- this["commits"] = [];
- }
- if (!("error" in $$source)) {
- /**
- * 抓取失败原因,为空表示正常
- * @member
- * @type {string}
- */
- this["error"] = "";
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new RepoFeed instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {RepoFeed}
- */
- static createFrom($$source = {}) {
- const $$createField9_0 = $$createType23;
- const $$createField10_0 = $$createType25;
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- if ("newer" in $$parsedSource) {
- $$parsedSource["newer"] = $$createField9_0($$parsedSource["newer"]);
- }
- if ("commits" in $$parsedSource) {
- $$parsedSource["commits"] = $$createField10_0($$parsedSource["commits"]);
- }
- return new RepoFeed(/** @type {Partial<RepoFeed>} */($$parsedSource));
- }
- }
- /**
- * RepoItem 关注的 GitHub 仓库条目
- */
- export class RepoItem {
- /**
- * Creates a new RepoItem instance.
- * @param {Partial<RepoItem>} [$$source = {}] - The source object to create the RepoItem.
- */
- constructor($$source = {}) {
- if (!("url" in $$source)) {
- /**
- * 仓库地址,如 https://github.com/wailsapp/wails
- * @member
- * @type {string}
- */
- this["url"] = "";
- }
- if (!("desc" in $$source)) {
- /**
- * 项目说明
- * @member
- * @type {string}
- */
- this["desc"] = "";
- }
- if (!("version" in $$source)) {
- /**
- * 本地已安装版本(用于与最新 release 比较),可为空
- * @member
- * @type {string}
- */
- this["version"] = "";
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new RepoItem instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {RepoItem}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new RepoItem(/** @type {Partial<RepoItem>} */($$parsedSource));
- }
- }
- /**
- * ServiceModeStatus 服务模式运行状态(服务页展示)
- */
- export class ServiceModeStatus {
- /**
- * Creates a new ServiceModeStatus instance.
- * @param {Partial<ServiceModeStatus>} [$$source = {}] - The source object to create the ServiceModeStatus.
- */
- constructor($$source = {}) {
- if (!("addr" in $$source)) {
- /**
- * 服务模式监听地址
- * @member
- * @type {string}
- */
- this["addr"] = "";
- }
- if (!("running" in $$source)) {
- /**
- * 该地址上的电源 API 是否可用
- * @member
- * @type {boolean}
- */
- this["running"] = false;
- }
- if (!("managed" in $$source)) {
- /**
- * true=由真正的 Windows 服务提供;false=界面进程兜底
- * @member
- * @type {boolean}
- */
- this["managed"] = false;
- }
- if (!("occupied" in $$source)) {
- /**
- * 端口被其他程序占用(既非服务模式也非本程序)
- * @member
- * @type {boolean}
- */
- this["occupied"] = false;
- }
- if (!("version" in $$source)) {
- /**
- * 服务端版本(可用时)
- * @member
- * @type {string}
- */
- this["version"] = "";
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new ServiceModeStatus instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {ServiceModeStatus}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new ServiceModeStatus(/** @type {Partial<ServiceModeStatus>} */($$parsedSource));
- }
- }
- /**
- * StockQuote 单只股票的行情快照,供前端「股市」页展示
- */
- export class StockQuote {
- /**
- * Creates a new StockQuote instance.
- * @param {Partial<StockQuote>} [$$source = {}] - The source object to create the StockQuote.
- */
- constructor($$source = {}) {
- if (!("code" in $$source)) {
- /**
- * 带市场前缀的代码,如 sh600519
- * @member
- * @type {string}
- */
- this["code"] = "";
- }
- if (!("name" in $$source)) {
- /**
- * 股票名称
- * @member
- * @type {string}
- */
- this["name"] = "";
- }
- if (!("price" in $$source)) {
- /**
- * 当前价
- * @member
- * @type {number}
- */
- this["price"] = 0;
- }
- if (!("change" in $$source)) {
- /**
- * 涨跌额
- * @member
- * @type {number}
- */
- this["change"] = 0;
- }
- if (!("changePercent" in $$source)) {
- /**
- * 涨跌幅(%)
- * @member
- * @type {number}
- */
- this["changePercent"] = 0;
- }
- if (!("amount" in $$source)) {
- /**
- * 成交额(万元)
- * @member
- * @type {number}
- */
- this["amount"] = 0;
- }
- if (!("time" in $$source)) {
- /**
- * 行情时间 HH:MM:SS
- * @member
- * @type {string}
- */
- this["time"] = "";
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new StockQuote instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {StockQuote}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new StockQuote(/** @type {Partial<StockQuote>} */($$parsedSource));
- }
- }
- /**
- * TickerConfig 置顶滚动条(股票 / 新闻)的显示配置
- */
- export class TickerConfig {
- /**
- * Creates a new TickerConfig instance.
- * @param {Partial<TickerConfig>} [$$source = {}] - The source object to create the TickerConfig.
- */
- constructor($$source = {}) {
- if (!("enabled" in $$source)) {
- /**
- * 是否显示滚动条窗口
- * @member
- * @type {boolean}
- */
- this["enabled"] = false;
- }
- if (!("width" in $$source)) {
- /**
- * 窗口宽度(px),0 表示默认 1400
- * @member
- * @type {number}
- */
- this["width"] = 0;
- }
- if (!("fontSize" in $$source)) {
- /**
- * 字号(px)
- * @member
- * @type {number}
- */
- this["fontSize"] = 0;
- }
- if (!("color" in $$source)) {
- /**
- * 文字颜色
- * @member
- * @type {string}
- */
- this["color"] = "";
- }
- if (!("speed" in $$source)) {
- /**
- * 滚动速度(px/s)
- * @member
- * @type {number}
- */
- this["speed"] = 0;
- }
- if (!("transparent" in $$source)) {
- /**
- * 背景透明,不遮挡下方内容
- * @member
- * @type {boolean}
- */
- this["transparent"] = false;
- }
- if (!("x" in $$source)) {
- /**
- * 窗口位置,-1 表示未设置(系统默认位置)
- * @member
- * @type {number}
- */
- this["x"] = 0;
- }
- if (!("y" in $$source)) {
- /**
- * 窗口位置,-1 表示未设置
- * @member
- * @type {number}
- */
- this["y"] = 0;
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new TickerConfig instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {TickerConfig}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new TickerConfig(/** @type {Partial<TickerConfig>} */($$parsedSource));
- }
- }
- /**
- * TranslateResult 一次翻译的结果,供前端展示。
- */
- export class TranslateResult {
- /**
- * Creates a new TranslateResult instance.
- * @param {Partial<TranslateResult>} [$$source = {}] - The source object to create the TranslateResult.
- */
- constructor($$source = {}) {
- if (!("text" in $$source)) {
- /**
- * 翻译结果文本
- * @member
- * @type {string}
- */
- this["text"] = "";
- }
- if (!("detected" in $$source)) {
- /**
- * 检测到的源语言(zh / en)
- * @member
- * @type {string}
- */
- this["detected"] = "";
- }
- if (!("target" in $$source)) {
- /**
- * 目标语言(zh / en)
- * @member
- * @type {string}
- */
- this["target"] = "";
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new TranslateResult instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {TranslateResult}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new TranslateResult(/** @type {Partial<TranslateResult>} */($$parsedSource));
- }
- }
- /**
- * TrendingRepo 一个热门仓库条目(来源可为 GitHub Trending 或 HelloGitHub)
- */
- export class TrendingRepo {
- /**
- * Creates a new TrendingRepo instance.
- * @param {Partial<TrendingRepo>} [$$source = {}] - The source object to create the TrendingRepo.
- */
- constructor($$source = {}) {
- if (!("name" in $$source)) {
- /**
- * owner/repo 短名
- * @member
- * @type {string}
- */
- this["name"] = "";
- }
- if (!("url" in $$source)) {
- /**
- * 仓库主页地址(GitHub 直链)
- * @member
- * @type {string}
- */
- this["url"] = "";
- }
- if (!("desc" in $$source)) {
- /**
- * 简介(英文已自动翻译为中文,翻译失败保留原文)
- * @member
- * @type {string}
- */
- this["desc"] = "";
- }
- if (!("lang" in $$source)) {
- /**
- * 主要语言,无则空
- * @member
- * @type {string}
- */
- this["lang"] = "";
- }
- if (!("stars" in $$source)) {
- /**
- * 总星数(如 "106,375")
- * @member
- * @type {string}
- */
- this["stars"] = "";
- }
- if (!("todayStars" in $$source)) {
- /**
- * 今日新增星数(如 "1,140",无则空)
- * @member
- * @type {string}
- */
- this["todayStars"] = "";
- }
- if (!("forks" in $$source)) {
- /**
- * fork 数(如 "9,365",无则空)
- * @member
- * @type {string}
- */
- this["forks"] = "";
- }
- if (!("source" in $$source)) {
- /**
- * 来源:"github"(GitHub Trending)/ "hellogithub"
- * @member
- * @type {string}
- */
- this["source"] = "";
- }
- if (!("heat" in $$source)) {
- /**
- * 热度(HelloGitHub 点击量,其它来源为空)
- * @member
- * @type {string}
- */
- this["heat"] = "";
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new TrendingRepo instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {TrendingRepo}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new TrendingRepo(/** @type {Partial<TrendingRepo>} */($$parsedSource));
- }
- }
- /**
- * WebServiceInfo 描述一次 Web 服务运行实例的状态,供前端展示。
- */
- export class WebServiceInfo {
- /**
- * Creates a new WebServiceInfo instance.
- * @param {Partial<WebServiceInfo>} [$$source = {}] - The source object to create the WebServiceInfo.
- */
- constructor($$source = {}) {
- if (!("running" in $$source)) {
- /**
- * 是否运行中
- * @member
- * @type {boolean}
- */
- this["running"] = false;
- }
- if (!("dir" in $$source)) {
- /**
- * 服务目录
- * @member
- * @type {string}
- */
- this["dir"] = "";
- }
- if (!("url" in $$source)) {
- /**
- * 访问地址 http://127.0.0.1:port/
- * @member
- * @type {string}
- */
- this["url"] = "";
- }
- if (!("indexName" in $$source)) {
- /**
- * 实际用作默认页的文件(index.html / readme.md / 空)
- * @member
- * @type {string}
- */
- this["indexName"] = "";
- }
- if (!("startedAt" in $$source)) {
- /**
- * 启动时间
- * @member
- * @type {string}
- */
- this["startedAt"] = "";
- }
- if (!("error" in $$source)) {
- /**
- * 最近一次错误
- * @member
- * @type {string}
- */
- this["error"] = "";
- }
- if (!("connections" in $$source)) {
- /**
- * 累计请求次数
- * @member
- * @type {number}
- */
- this["connections"] = 0;
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new WebServiceInfo instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {WebServiceInfo}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new WebServiceInfo(/** @type {Partial<WebServiceInfo>} */($$parsedSource));
- }
- }
- /**
- * YTDLPConfig 是「视频下载」的配置。
- */
- export class YTDLPConfig {
- /**
- * Creates a new YTDLPConfig instance.
- * @param {Partial<YTDLPConfig>} [$$source = {}] - The source object to create the YTDLPConfig.
- */
- constructor($$source = {}) {
- if (!("dir" in $$source)) {
- /**
- * 下载保存目录,空=程序当前工作目录
- * @member
- * @type {string}
- */
- this["dir"] = "";
- }
- if (!("mp3Quality" in $$source)) {
- /**
- * mp3 转换质量:0-9(VBR,0 最好)或 128K/192K/320K,默认 0
- * @member
- * @type {string}
- */
- this["mp3Quality"] = "";
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new YTDLPConfig instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {YTDLPConfig}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new YTDLPConfig(/** @type {Partial<YTDLPConfig>} */($$parsedSource));
- }
- }
- /**
- * YTDLPInfo 描述本机 yt-dlp 的可用性,用于前端决定是否展示工具卡片。
- */
- export class YTDLPInfo {
- /**
- * Creates a new YTDLPInfo instance.
- * @param {Partial<YTDLPInfo>} [$$source = {}] - The source object to create the YTDLPInfo.
- */
- constructor($$source = {}) {
- if (!("available" in $$source)) {
- /**
- * PATH 中是否找到 yt-dlp
- * @member
- * @type {boolean}
- */
- this["available"] = false;
- }
- if (!("path" in $$source)) {
- /**
- * yt-dlp 可执行文件路径
- * @member
- * @type {string}
- */
- this["path"] = "";
- }
- if (!("version" in $$source)) {
- /**
- * 版本信息(yt-dlp --version 输出)
- * @member
- * @type {string}
- */
- this["version"] = "";
- }
- if (!("ffmpeg" in $$source)) {
- /**
- * PATH 中是否找到 ffmpeg(用于「下载转 mp3」)
- * @member
- * @type {boolean}
- */
- this["ffmpeg"] = false;
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new YTDLPInfo instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {YTDLPInfo}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new YTDLPInfo(/** @type {Partial<YTDLPInfo>} */($$parsedSource));
- }
- }
- // Private type creation functions
- const $$createType0 = $Create.Array($Create.Any);
- const $$createType1 = LinkItem.createFrom;
- const $$createType2 = $Create.Array($$createType1);
- const $$createType3 = RepoItem.createFrom;
- const $$createType4 = $Create.Array($$createType3);
- const $$createType5 = CustomTab.createFrom;
- const $$createType6 = $Create.Array($$createType5);
- const $$createType7 = LocalTool.createFrom;
- const $$createType8 = $Create.Array($$createType7);
- const $$createType9 = TickerConfig.createFrom;
- const $$createType10 = PoemConfig.createFrom;
- const $$createType11 = MouseAlertConfig.createFrom;
- const $$createType12 = LocalSendConfig.createFrom;
- const $$createType13 = CrocConfig.createFrom;
- const $$createType14 = YTDLPConfig.createFrom;
- const $$createType15 = MemosConfig.createFrom;
- const $$createType16 = BrightnessConfig.createFrom;
- const $$createType17 = BiliDynamicItem.createFrom;
- const $$createType18 = $Create.Array($$createType17);
- const $$createType19 = $Create.Map($Create.Any, $Create.Any);
- const $$createType20 = MinutePoint.createFrom;
- const $$createType21 = $Create.Array($$createType20);
- const $$createType22 = ReleaseItem.createFrom;
- const $$createType23 = $Create.Array($$createType22);
- const $$createType24 = CommitItem.createFrom;
- const $$createType25 = $Create.Array($$createType24);
|