| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982 |
- // @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 (!("quickHotkey" in $$source)) {
- /**
- * 在鼠标位置弹出「快捷」菜单的全局热键
- * @member
- * @type {string}
- */
- this["quickHotkey"] = "";
- }
- if (!("proxyHotkey" in $$source)) {
- /**
- * 开关「网络代理」的全局热键(空=不设热键)
- * @member
- * @type {string}
- */
- this["proxyHotkey"] = "";
- }
- if (!("soundAlert" in $$source)) {
- /**
- * 声音提示:mute(静音默认)/ding/beep/system/qq
- * @member
- * @type {string}
- */
- this["soundAlert"] = "";
- }
- if (!("tabOrder" in $$source)) {
- /**
- * Tab 显示顺序(tabId 列表,未列出的追加到末尾)
- * @member
- * @type {string[]}
- */
- this["tabOrder"] = [];
- }
- if (!("stockCodes" in $$source)) {
- /**
- * 股市页展示的股票代码列表
- * @member
- * @type {string[]}
- */
- this["stockCodes"] = [];
- }
- if (!("links" in $$source)) {
- /**
- * 常用网址列表(扁平,未分组;分组请用 LinkGroups)
- * @member
- * @type {LinkItem[]}
- */
- this["links"] = [];
- }
- if (!("linkGroups" in $$source)) {
- /**
- * 「网址」页分组(缩进层级定义,空 Name 表示未分组)
- * @member
- * @type {LinkGroup[]}
- */
- this["linkGroups"] = [];
- }
- if (!("newsKeywords" in $$source)) {
- /**
- * 新闻关注关键词,逗号分隔
- * @member
- * @type {string}
- */
- this["newsKeywords"] = "";
- }
- if (!("biliCookie" in $$source)) {
- /**
- * B站登录 cookie(含 SESSDATA),用于抓取「关注的人最新动态」
- * @member
- * @type {string}
- */
- this["biliCookie"] = "";
- }
- if (!("biliRefreshToken" in $$source)) {
- /**
- * B站 refresh_token,用于 cookie 自动续期(可选)
- * @member
- * @type {string}
- */
- this["biliRefreshToken"] = "";
- }
- if (!("biliPopularEnabled" in $$source)) {
- /**
- * 新闻页是否显示 B站热门/关注区块(默认开启)
- * @member
- * @type {boolean}
- */
- this["biliPopularEnabled"] = false;
- }
- 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 (!("quickGroups" in $$source)) {
- /**
- * 「快捷」页分组(缩进分层,名称|路径|说明 条目)
- * @member
- * @type {QuickGroup[]}
- */
- this["quickGroups"] = [];
- }
- if (!("controlKeys" in $$source)) {
- /**
- * 控制页按键配置(前 5 键固定 上/下/左/右/休眠,第 6 键起为额外按键)
- * @member
- * @type {ControlKeyConfig[]}
- */
- this["controlKeys"] = [];
- }
- if (!("controlRepeatSecs" in $$source)) {
- /**
- * 控制页长按连发频率(秒,0.0-10.0,默认 1.0)
- * @member
- * @type {number}
- */
- this["controlRepeatSecs"] = 0;
- }
- 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)) {
- /**
- * 文件上传保存目录(空=程序所在目录/上传)
- * @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 (!("tagDBPath" in $$source)) {
- /**
- * 文件标签数据库路径:SQLite3(资源管理器右键「标签」与悬停标签提示使用)
- * @member
- * @type {string}
- */
- this["tagDBPath"] = "";
- }
- if (!("tagMenuEnabled" in $$source)) {
- /**
- * 资源管理器右键「标签」功能开关:false=关闭右键菜单+停止监听悬停(默认启用)
- * @member
- * @type {boolean}
- */
- this["tagMenuEnabled"] = false;
- }
- 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 (!("meitu" in $$source)) {
- /**
- * 美图工具配置(悬停预览大图最大边长等)
- * @member
- * @type {MeituConfig}
- */
- this["meitu"] = (new MeituConfig());
- }
- if (!("generalDownloadDir" in $$source)) {
- /**
- * 通用下载目录(美图等保存文件);空=系统下载目录
- * @member
- * @type {string}
- */
- this["generalDownloadDir"] = "";
- }
- if (!("memos" in $$source)) {
- /**
- * Memos 速记配置(地址/访问令牌)
- * @member
- * @type {MemosConfig}
- */
- this["memos"] = (new MemosConfig());
- }
- if (!("brightness" in $$source)) {
- /**
- * 显示器亮度配置(记住亮度、启动恢复)
- * @member
- * @type {BrightnessConfig}
- */
- this["brightness"] = (new BrightnessConfig());
- }
- if (!("footerDocsLabel" in $$source)) {
- /**
- * 页面右下角「官方文档」显示的标题文字
- * @member
- * @type {string}
- */
- this["footerDocsLabel"] = "";
- }
- if (!("footerDocsURL" in $$source)) {
- /**
- * 页面右下角标题文字点击打开的网址
- * @member
- * @type {string}
- */
- this["footerDocsURL"] = "";
- }
- if (!("toolOrder" in $$source)) {
- /**
- * 工具页卡片显示顺序(工具 id 列表,未列出的追加到末尾)
- * @member
- * @type {string[]}
- */
- this["toolOrder"] = [];
- }
- if (!("gitLab" in $$source)) {
- /**
- * 私有 GitLab 自动升级配置
- * @member
- * @type {GitLabConfig}
- */
- this["gitLab"] = (new GitLabConfig());
- }
- if (!("skippedUpdateVersion" in $$source)) {
- /**
- * 已跳过的版本(启动检查时视为无更新)
- * @member
- * @type {string}
- */
- this["skippedUpdateVersion"] = "";
- }
- if (!("proxy" in $$source)) {
- /**
- * 网络代理配置(工具页「网络代理」卡片)
- * @member
- * @type {ProxyConfig}
- */
- this["proxy"] = (new ProxyConfig());
- }
- if (!("resources" in $$source)) {
- /**
- * 设置-资源栏配置(下载 ffmpeg/croc 等外部工具)
- * @member
- * @type {ResourcesConfig}
- */
- this["resources"] = (new ResourcesConfig());
- }
- if (!("serviceZipUrl" in $$source)) {
- /**
- * 服务模式独立程序包地址(启用时缺失则下载解压)
- * @member
- * @type {string}
- */
- this["serviceZipUrl"] = "";
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new AppSettings instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {AppSettings}
- */
- static createFrom($$source = {}) {
- const $$createField10_0 = $$createType0;
- const $$createField11_0 = $$createType0;
- const $$createField12_0 = $$createType2;
- const $$createField13_0 = $$createType4;
- const $$createField18_0 = $$createType6;
- const $$createField19_0 = $$createType8;
- const $$createField20_0 = $$createType10;
- const $$createField21_0 = $$createType12;
- const $$createField22_0 = $$createType14;
- const $$createField36_0 = $$createType15;
- const $$createField37_0 = $$createType15;
- const $$createField38_0 = $$createType16;
- const $$createField39_0 = $$createType17;
- const $$createField50_0 = $$createType18;
- const $$createField51_0 = $$createType19;
- const $$createField52_0 = $$createType20;
- const $$createField53_0 = $$createType21;
- const $$createField55_0 = $$createType22;
- const $$createField56_0 = $$createType23;
- const $$createField59_0 = $$createType0;
- const $$createField60_0 = $$createType24;
- const $$createField62_0 = $$createType25;
- const $$createField63_0 = $$createType26;
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- if ("tabOrder" in $$parsedSource) {
- $$parsedSource["tabOrder"] = $$createField10_0($$parsedSource["tabOrder"]);
- }
- if ("stockCodes" in $$parsedSource) {
- $$parsedSource["stockCodes"] = $$createField11_0($$parsedSource["stockCodes"]);
- }
- if ("links" in $$parsedSource) {
- $$parsedSource["links"] = $$createField12_0($$parsedSource["links"]);
- }
- if ("linkGroups" in $$parsedSource) {
- $$parsedSource["linkGroups"] = $$createField13_0($$parsedSource["linkGroups"]);
- }
- if ("githubRepos" in $$parsedSource) {
- $$parsedSource["githubRepos"] = $$createField18_0($$parsedSource["githubRepos"]);
- }
- if ("customTabs" in $$parsedSource) {
- $$parsedSource["customTabs"] = $$createField19_0($$parsedSource["customTabs"]);
- }
- if ("localTools" in $$parsedSource) {
- $$parsedSource["localTools"] = $$createField20_0($$parsedSource["localTools"]);
- }
- if ("quickGroups" in $$parsedSource) {
- $$parsedSource["quickGroups"] = $$createField21_0($$parsedSource["quickGroups"]);
- }
- if ("controlKeys" in $$parsedSource) {
- $$parsedSource["controlKeys"] = $$createField22_0($$parsedSource["controlKeys"]);
- }
- if ("stockTicker" in $$parsedSource) {
- $$parsedSource["stockTicker"] = $$createField36_0($$parsedSource["stockTicker"]);
- }
- if ("newsTicker" in $$parsedSource) {
- $$parsedSource["newsTicker"] = $$createField37_0($$parsedSource["newsTicker"]);
- }
- if ("poem" in $$parsedSource) {
- $$parsedSource["poem"] = $$createField38_0($$parsedSource["poem"]);
- }
- if ("mouseAlert" in $$parsedSource) {
- $$parsedSource["mouseAlert"] = $$createField39_0($$parsedSource["mouseAlert"]);
- }
- if ("localSend" in $$parsedSource) {
- $$parsedSource["localSend"] = $$createField50_0($$parsedSource["localSend"]);
- }
- if ("croc" in $$parsedSource) {
- $$parsedSource["croc"] = $$createField51_0($$parsedSource["croc"]);
- }
- if ("ytdlp" in $$parsedSource) {
- $$parsedSource["ytdlp"] = $$createField52_0($$parsedSource["ytdlp"]);
- }
- if ("meitu" in $$parsedSource) {
- $$parsedSource["meitu"] = $$createField53_0($$parsedSource["meitu"]);
- }
- if ("memos" in $$parsedSource) {
- $$parsedSource["memos"] = $$createField55_0($$parsedSource["memos"]);
- }
- if ("brightness" in $$parsedSource) {
- $$parsedSource["brightness"] = $$createField56_0($$parsedSource["brightness"]);
- }
- if ("toolOrder" in $$parsedSource) {
- $$parsedSource["toolOrder"] = $$createField59_0($$parsedSource["toolOrder"]);
- }
- if ("gitLab" in $$parsedSource) {
- $$parsedSource["gitLab"] = $$createField60_0($$parsedSource["gitLab"]);
- }
- if ("proxy" in $$parsedSource) {
- $$parsedSource["proxy"] = $$createField62_0($$parsedSource["proxy"]);
- }
- if ("resources" in $$parsedSource) {
- $$parsedSource["resources"] = $$createField63_0($$parsedSource["resources"]);
- }
- 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 = $$createType28;
- 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));
- }
- }
- /**
- * BiliQRPollResult 轮询结果
- * Status: pending(未扫码) / scanned(已扫码未确认) / success(登录成功) / expired(失效) / error
- * Message: 附加说明(如风控提示)
- */
- export class BiliQRPollResult {
- /**
- * Creates a new BiliQRPollResult instance.
- * @param {Partial<BiliQRPollResult>} [$$source = {}] - The source object to create the BiliQRPollResult.
- */
- constructor($$source = {}) {
- if (!("status" in $$source)) {
- /**
- * @member
- * @type {string}
- */
- this["status"] = "";
- }
- if (!("message" in $$source)) {
- /**
- * @member
- * @type {string}
- */
- this["message"] = "";
- }
- if (/** @type {any} */(false)) {
- /**
- * 仅 success 时返回新 cookie(供前端回填)
- * @member
- * @type {string | undefined}
- */
- this["cookie"] = undefined;
- }
- if (/** @type {any} */(false)) {
- /**
- * 仅 success 时返回新 refresh_token(供前端回填)
- * @member
- * @type {string | undefined}
- */
- this["refreshToken"] = undefined;
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new BiliQRPollResult instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {BiliQRPollResult}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new BiliQRPollResult(/** @type {Partial<BiliQRPollResult>} */($$parsedSource));
- }
- }
- /**
- * BiliQRResult 二维码生成结果:qrcodeKey 供轮询,imageDataURI 为二维码 PNG data URI
- */
- export class BiliQRResult {
- /**
- * Creates a new BiliQRResult instance.
- * @param {Partial<BiliQRResult>} [$$source = {}] - The source object to create the BiliQRResult.
- */
- constructor($$source = {}) {
- if (!("qrcodeKey" in $$source)) {
- /**
- * @member
- * @type {string}
- */
- this["qrcodeKey"] = "";
- }
- if (!("imageDataURI" in $$source)) {
- /**
- * data:image/png;base64,...
- * @member
- * @type {string}
- */
- this["imageDataURI"] = "";
- }
- if (!("expireAt" in $$source)) {
- /**
- * 二维码过期时间戳(毫秒)
- * @member
- * @type {number}
- */
- this["expireAt"] = 0;
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new BiliQRResult instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {BiliQRResult}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new BiliQRResult(/** @type {Partial<BiliQRResult>} */($$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 = $$createType29;
- 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));
- }
- }
- /**
- * ControlKeyConfig 控制页方向盘单个按键配置(图标 + 命令 URL)
- */
- export class ControlKeyConfig {
- /**
- * Creates a new ControlKeyConfig instance.
- * @param {Partial<ControlKeyConfig>} [$$source = {}] - The source object to create the ControlKeyConfig.
- */
- constructor($$source = {}) {
- if (!("icon" in $$source)) {
- /**
- * 按钮显示字符,如 ↑、↓、←、→、休眠
- * @member
- * @type {string}
- */
- this["icon"] = "";
- }
- if (!("cmd" in $$source)) {
- /**
- * 点击时 GET 请求的完整 URL;空则回退旧指令信箱模式
- * @member
- * @type {string}
- */
- this["cmd"] = "";
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new ControlKeyConfig instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {ControlKeyConfig}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new ControlKeyConfig(/** @type {Partial<ControlKeyConfig>} */($$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));
- }
- }
- /**
- * GitLabConfig 自动升级配置(静态更新站方案)。
- * BaseURL 为静态站目录地址,清单固定放在 {BaseURL}/manifest.json,无需鉴权。
- * ProjectPath / PrivateToken / Branch 为旧私有仓库方案遗留字段,不再参与,保留以兼容旧配置。
- */
- export class GitLabConfig {
- /**
- * Creates a new GitLabConfig instance.
- * @param {Partial<GitLabConfig>} [$$source = {}] - The source object to create the GitLabConfig.
- */
- constructor($$source = {}) {
- if (!("baseUrl" in $$source)) {
- /**
- * 静态更新站目录地址,如 https://i.scwy.net/down/toolsbox
- * @member
- * @type {string}
- */
- this["baseUrl"] = "";
- }
- if (!("projectPath" in $$source)) {
- /**
- * (旧字段,不再使用)
- * @member
- * @type {string}
- */
- this["projectPath"] = "";
- }
- if (!("privateToken" in $$source)) {
- /**
- * (旧字段,不再使用)
- * @member
- * @type {string}
- */
- this["privateToken"] = "";
- }
- if (!("branch" in $$source)) {
- /**
- * (旧字段,不再使用)
- * @member
- * @type {string}
- */
- this["branch"] = "";
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new GitLabConfig instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {GitLabConfig}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new GitLabConfig(/** @type {Partial<GitLabConfig>} */($$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));
- }
- }
- /**
- * LinkGroup 「网址」页分组(设置中以缩进层级定义,类似快捷启动)
- * 未分组的条目放在 LinkGroups 的第一个 Name 为空分组的 Items 中(前端解析时统一按组渲染)
- */
- export class LinkGroup {
- /**
- * Creates a new LinkGroup instance.
- * @param {Partial<LinkGroup>} [$$source = {}] - The source object to create the LinkGroup.
- */
- constructor($$source = {}) {
- if (!("name" in $$source)) {
- /**
- * 分组名(空表示未分组)
- * @member
- * @type {string}
- */
- this["name"] = "";
- }
- if (!("items" in $$source)) {
- /**
- * 组内网址
- * @member
- * @type {LinkItem[]}
- */
- this["items"] = [];
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new LinkGroup instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {LinkGroup}
- */
- static createFrom($$source = {}) {
- const $$createField1_0 = $$createType2;
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- if ("items" in $$parsedSource) {
- $$parsedSource["items"] = $$createField1_0($$parsedSource["items"]);
- }
- return new LinkGroup(/** @type {Partial<LinkGroup>} */($$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));
- }
- }
- /**
- * MeituConfig 美图工具配置
- */
- export class MeituConfig {
- /**
- * Creates a new MeituConfig instance.
- * @param {Partial<MeituConfig>} [$$source = {}] - The source object to create the MeituConfig.
- */
- constructor($$source = {}) {
- if (!("maxSize" in $$source)) {
- /**
- * 悬停预览大图最大边长(px),默认 400
- * @member
- * @type {number}
- */
- this["maxSize"] = 0;
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new MeituConfig instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {MeituConfig}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new MeituConfig(/** @type {Partial<MeituConfig>} */($$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 = $$createType31;
- 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;
- }
- if (!("scroll" in $$source)) {
- /**
- * Scroll 是否滚动显示超长文字:nil 表示未设置(兼容旧配置,用 Speed>0 决定);
- * true=超长时水平滚动跑马灯,false=超长部分右侧裁剪不滚动。
- * @member
- * @type {boolean | null}
- */
- this["scroll"] = null;
- }
- 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));
- }
- }
- /**
- * PhoneADBInfo 描述本机 ADB 的可用性,用于前端决定是否展示下载入口。
- */
- export class PhoneADBInfo {
- /**
- * Creates a new PhoneADBInfo instance.
- * @param {Partial<PhoneADBInfo>} [$$source = {}] - The source object to create the PhoneADBInfo.
- */
- constructor($$source = {}) {
- if (!("available" in $$source)) {
- /**
- * PATH 中是否找到 adb
- * @member
- * @type {boolean}
- */
- this["available"] = false;
- }
- if (!("path" in $$source)) {
- /**
- * adb 可执行文件路径
- * @member
- * @type {string}
- */
- this["path"] = "";
- }
- if (!("version" in $$source)) {
- /**
- * 版本信息(adb version 输出)
- * @member
- * @type {string}
- */
- this["version"] = "";
- }
- if (!("scrcpyAvailable" in $$source)) {
- /**
- * 录屏依赖的 scrcpy 可用性:未找到时前端不应展示「录屏」功能(仅保留截图)。
- * 是否找到 scrcpy(PATH 或资源目录)
- * @member
- * @type {boolean}
- */
- this["scrcpyAvailable"] = false;
- }
- if (!("scrcpyPath" in $$source)) {
- /**
- * scrcpy 可执行文件路径(空=未找到)
- * @member
- * @type {string}
- */
- this["scrcpyPath"] = "";
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new PhoneADBInfo instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {PhoneADBInfo}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new PhoneADBInfo(/** @type {Partial<PhoneADBInfo>} */($$parsedSource));
- }
- }
- /**
- * PhoneAppInfo 单个已安装应用信息。
- */
- export class PhoneAppInfo {
- /**
- * Creates a new PhoneAppInfo instance.
- * @param {Partial<PhoneAppInfo>} [$$source = {}] - The source object to create the PhoneAppInfo.
- */
- constructor($$source = {}) {
- if (!("package" in $$source)) {
- /**
- * 包名
- * @member
- * @type {string}
- */
- this["package"] = "";
- }
- if (!("system" in $$source)) {
- /**
- * 是否为系统应用(非三方)
- * @member
- * @type {boolean}
- */
- this["system"] = false;
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new PhoneAppInfo instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {PhoneAppInfo}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new PhoneAppInfo(/** @type {Partial<PhoneAppInfo>} */($$parsedSource));
- }
- }
- /**
- * PhoneDevice 单个已连接(或已发现)的 Android 设备。
- */
- export class PhoneDevice {
- /**
- * Creates a new PhoneDevice instance.
- * @param {Partial<PhoneDevice>} [$$source = {}] - The source object to create the PhoneDevice.
- */
- constructor($$source = {}) {
- if (!("serial" in $$source)) {
- /**
- * 设备序列号(adb devices 第一列)
- * @member
- * @type {string}
- */
- this["serial"] = "";
- }
- if (!("state" in $$source)) {
- /**
- * 设备状态(device / unauthorized / offline)
- * @member
- * @type {string}
- */
- this["state"] = "";
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new PhoneDevice instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {PhoneDevice}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new PhoneDevice(/** @type {Partial<PhoneDevice>} */($$parsedSource));
- }
- }
- /**
- * PhoneDeviceInfo 设备信息快照(信息/系统/屏幕/电池)。
- */
- export class PhoneDeviceInfo {
- /**
- * Creates a new PhoneDeviceInfo instance.
- * @param {Partial<PhoneDeviceInfo>} [$$source = {}] - The source object to create the PhoneDeviceInfo.
- */
- constructor($$source = {}) {
- if (!("model" in $$source)) {
- /**
- * 设备型号(ro.product.model)
- * @member
- * @type {string}
- */
- this["model"] = "";
- }
- if (!("manufacturer" in $$source)) {
- /**
- * 制造商(ro.product.manufacturer)
- * @member
- * @type {string}
- */
- this["manufacturer"] = "";
- }
- if (!("androidVer" in $$source)) {
- /**
- * Android 版本(ro.build.version.release)
- * @member
- * @type {string}
- */
- this["androidVer"] = "";
- }
- if (!("sdk" in $$source)) {
- /**
- * API 级别(ro.build.version.sdk)
- * @member
- * @type {string}
- */
- this["sdk"] = "";
- }
- if (!("resolution" in $$source)) {
- /**
- * 屏幕分辨率(wm size,如 1080x2400)
- * @member
- * @type {string}
- */
- this["resolution"] = "";
- }
- if (!("density" in $$source)) {
- /**
- * 屏幕密度(wm density)
- * @member
- * @type {string}
- */
- this["density"] = "";
- }
- if (!("battery" in $$source)) {
- /**
- * 电池电量(dumpsys battery level)
- * @member
- * @type {string}
- */
- this["battery"] = "";
- }
- if (!("chargeState" in $$source)) {
- /**
- * 充电状态(dumpsys battery status)
- * @member
- * @type {string}
- */
- this["chargeState"] = "";
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new PhoneDeviceInfo instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {PhoneDeviceInfo}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new PhoneDeviceInfo(/** @type {Partial<PhoneDeviceInfo>} */($$parsedSource));
- }
- }
- /**
- * PhoneDevicesPayload 设备列表事件负载(phone:devices)。
- */
- export class PhoneDevicesPayload {
- /**
- * Creates a new PhoneDevicesPayload instance.
- * @param {Partial<PhoneDevicesPayload>} [$$source = {}] - The source object to create the PhoneDevicesPayload.
- */
- constructor($$source = {}) {
- if (!("available" in $$source)) {
- /**
- * adb 是否可用
- * @member
- * @type {boolean}
- */
- this["available"] = false;
- }
- if (!("devices" in $$source)) {
- /**
- * 发现的设备列表(含未授权/离线,前端按需过滤)
- * @member
- * @type {PhoneDevice[]}
- */
- this["devices"] = [];
- }
- if (!("error" in $$source)) {
- /**
- * 轮询错误(adb 执行失败时),空 = 正常
- * @member
- * @type {string}
- */
- this["error"] = "";
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new PhoneDevicesPayload instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {PhoneDevicesPayload}
- */
- static createFrom($$source = {}) {
- const $$createField1_0 = $$createType33;
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- if ("devices" in $$parsedSource) {
- $$parsedSource["devices"] = $$createField1_0($$parsedSource["devices"]);
- }
- return new PhoneDevicesPayload(/** @type {Partial<PhoneDevicesPayload>} */($$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));
- }
- }
- /**
- * ProxyConfig 网络代理配置(工具页「网络代理」卡片)。
- * 仅保存地址,开关状态由系统代理注册表(ProxyEnable)实时决定,不在配置里持久化。
- */
- export class ProxyConfig {
- /**
- * Creates a new ProxyConfig instance.
- * @param {Partial<ProxyConfig>} [$$source = {}] - The source object to create the ProxyConfig.
- */
- constructor($$source = {}) {
- if (!("server" in $$source)) {
- /**
- * 代理服务器地址,如 127.0.0.1:7890
- * @member
- * @type {string}
- */
- this["server"] = "";
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new ProxyConfig instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {ProxyConfig}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new ProxyConfig(/** @type {Partial<ProxyConfig>} */($$parsedSource));
- }
- }
- /**
- * ProxyStatus 网络代理当前状态
- */
- export class ProxyStatus {
- /**
- * Creates a new ProxyStatus instance.
- * @param {Partial<ProxyStatus>} [$$source = {}] - The source object to create the ProxyStatus.
- */
- constructor($$source = {}) {
- if (!("enabled" in $$source)) {
- /**
- * 系统代理是否开启
- * @member
- * @type {boolean}
- */
- this["enabled"] = false;
- }
- if (!("server" in $$source)) {
- /**
- * 代理服务器地址(如 127.0.0.1:7890)
- * @member
- * @type {string}
- */
- this["server"] = "";
- }
- if (!("configured" in $$source)) {
- /**
- * 配置里是否保存了代理地址(用于前端区分「未设置」)
- * @member
- * @type {boolean}
- */
- this["configured"] = false;
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new ProxyStatus instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {ProxyStatus}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new ProxyStatus(/** @type {Partial<ProxyStatus>} */($$parsedSource));
- }
- }
- /**
- * QuickGroup 快捷启动分组(「快捷」页)。
- * 设置文本中顶层无缩进行为分组名,其下缩进的「名称|路径|说明」条目归入该组;
- * 未缩进但在某分组之前直接出现的条目归入「未分组」。
- */
- export class QuickGroup {
- /**
- * Creates a new QuickGroup instance.
- * @param {Partial<QuickGroup>} [$$source = {}] - The source object to create the QuickGroup.
- */
- constructor($$source = {}) {
- if (!("name" in $$source)) {
- /**
- * 分组名(顶层无缩进行;空表示未分组)
- * @member
- * @type {string}
- */
- this["name"] = "";
- }
- if (!("items" in $$source)) {
- /**
- * 分组内快捷项(缩进条目)
- * @member
- * @type {QuickItem[]}
- */
- this["items"] = [];
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new QuickGroup instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {QuickGroup}
- */
- static createFrom($$source = {}) {
- const $$createField1_0 = $$createType35;
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- if ("items" in $$parsedSource) {
- $$parsedSource["items"] = $$createField1_0($$parsedSource["items"]);
- }
- return new QuickGroup(/** @type {Partial<QuickGroup>} */($$parsedSource));
- }
- }
- /**
- * QuickItem 快捷启动项(「快捷」页,设置中以缩进分层编辑)。
- * 与 Biniware Run 类似:每项为「名称|程序路径|说明」,说明可省略。
- */
- export class QuickItem {
- /**
- * Creates a new QuickItem instance.
- * @param {Partial<QuickItem>} [$$source = {}] - The source object to create the QuickItem.
- */
- constructor($$source = {}) {
- if (!("title" in $$source)) {
- /**
- * 显示名称
- * @member
- * @type {string}
- */
- this["title"] = "";
- }
- if (!("path" in $$source)) {
- /**
- * 程序路径(可执行文件,可带参数与 %VAR% 环境变量)
- * @member
- * @type {string}
- */
- this["path"] = "";
- }
- if (!("desc" in $$source)) {
- /**
- * 说明文字(可空)
- * @member
- * @type {string}
- */
- this["desc"] = "";
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new QuickItem instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {QuickItem}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new QuickItem(/** @type {Partial<QuickItem>} */($$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 = $$createType37;
- const $$createField10_0 = $$createType39;
- 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));
- }
- }
- /**
- * ResourceStatus 资源条目 + 本机安装状态,供前端列表渲染
- */
- export class ResourceStatus {
- /**
- * Creates a new ResourceStatus instance.
- * @param {Partial<ResourceStatus>} [$$source = {}] - The source object to create the ResourceStatus.
- */
- constructor($$source = {}) {
- if (!("name" in $$source)) {
- /**
- * 唯一标识,如 ffmpeg
- * @member
- * @type {string}
- */
- this["name"] = "";
- }
- if (!("version" in $$source)) {
- /**
- * 版本号,如 6.1.1
- * @member
- * @type {string}
- */
- this["version"] = "";
- }
- if (!("url" in $$source)) {
- /**
- * 主下载地址(优先 GitHub;空=无主源,改用镜像)
- * @member
- * @type {string}
- */
- this["url"] = "";
- }
- if (!("mirrorUrl" in $$source)) {
- /**
- * 镜像/资源站下载地址(备选源,可手动选择)
- * @member
- * @type {string}
- */
- this["mirrorUrl"] = "";
- }
- if (!("size" in $$source)) {
- /**
- * 字节,0=未知
- * @member
- * @type {number}
- */
- this["size"] = 0;
- }
- if (!("desc" in $$source)) {
- /**
- * 说明文字
- * @member
- * @type {string}
- */
- this["desc"] = "";
- }
- if (!("platform" in $$source)) {
- /**
- * 目标平台,如 windows-amd64
- * @member
- * @type {string}
- */
- this["platform"] = "";
- }
- if (!("os" in $$source)) {
- /**
- * 目标操作系统,如 windows/linux/darwin;空=不限(本机可用)
- * @member
- * @type {string}
- */
- this["os"] = "";
- }
- if (!("homepage" in $$source)) {
- /**
- * 官网地址,点击名称可在浏览器打开;空=不可点击
- * @member
- * @type {string}
- */
- this["homepage"] = "";
- }
- if (!("installed" in $$source)) {
- /**
- * 是否已安装到目标目录
- * @member
- * @type {boolean}
- */
- this["installed"] = false;
- }
- if (!("installedVersion" in $$source)) {
- /**
- * 已安装版本(从目录/可执行文件探测)
- * @member
- * @type {string}
- */
- this["installedVersion"] = "";
- }
- if (!("path" in $$source)) {
- /**
- * 安装后可执行文件/目录路径
- * @member
- * @type {string}
- */
- this["path"] = "";
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new ResourceStatus instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {ResourceStatus}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new ResourceStatus(/** @type {Partial<ResourceStatus>} */($$parsedSource));
- }
- }
- /**
- * ResourcesConfig 「设置-资源」栏配置:允许下载外部工具(ffmpeg/croc 等)
- */
- export class ResourcesConfig {
- /**
- * Creates a new ResourcesConfig instance.
- * @param {Partial<ResourcesConfig>} [$$source = {}] - The source object to create the ResourcesConfig.
- */
- constructor($$source = {}) {
- if (!("serverURL" in $$source)) {
- /**
- * 自定义资源清单服务器地址;空=使用内置默认清单
- * @member
- * @type {string}
- */
- this["serverURL"] = "";
- }
- if (!("downloadDir" in $$source)) {
- /**
- * 下载/解压目标目录;空=程序目录/resources
- * @member
- * @type {string}
- */
- this["downloadDir"] = "";
- }
- if (!("autoInstallPath" in $$source)) {
- /**
- * 下载成功后是否加入用户 PATH,默认 true
- * @member
- * @type {boolean}
- */
- this["autoInstallPath"] = false;
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new ResourcesConfig instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {ResourcesConfig}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new ResourcesConfig(/** @type {Partial<ResourcesConfig>} */($$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 (!("installed" in $$source)) {
- /**
- * Windows 服务是否已注册(与运行与否无关,「删除服务模式」按钮依据)
- * @member
- * @type {boolean}
- */
- this["installed"] = 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));
- }
- }
- /**
- * TagInfo 一条文件标签:完整路径 + 标签 + 备注 + 更新时间。
- * 供前端设置页/标签管理 UI 与后端悬停提示使用。
- */
- export class TagInfo {
- /**
- * Creates a new TagInfo instance.
- * @param {Partial<TagInfo>} [$$source = {}] - The source object to create the TagInfo.
- */
- constructor($$source = {}) {
- if (!("path" in $$source)) {
- /**
- * 完整路径(已规范化:小写 + Clean)
- * @member
- * @type {string}
- */
- this["path"] = "";
- }
- if (!("tag" in $$source)) {
- /**
- * 标签(可空)
- * @member
- * @type {string}
- */
- this["tag"] = "";
- }
- if (!("note" in $$source)) {
- /**
- * 备注(可空)
- * @member
- * @type {string}
- */
- this["note"] = "";
- }
- if (!("updatedAt" in $$source)) {
- /**
- * 最近更新时间 YYYY-MM-DD HH:MM:SS
- * @member
- * @type {string}
- */
- this["updatedAt"] = "";
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new TagInfo instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {TagInfo}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new TagInfo(/** @type {Partial<TagInfo>} */($$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));
- }
- }
- /**
- * UDPInfo 描述一次 UDP 键值服务的运行状态,供前端展示。
- */
- export class UDPInfo {
- /**
- * Creates a new UDPInfo instance.
- * @param {Partial<UDPInfo>} [$$source = {}] - The source object to create the UDPInfo.
- */
- constructor($$source = {}) {
- if (!("running" in $$source)) {
- /**
- * 是否运行中
- * @member
- * @type {boolean}
- */
- this["running"] = false;
- }
- if (!("port" in $$source)) {
- /**
- * 监听端口
- * @member
- * @type {number}
- */
- this["port"] = 0;
- }
- if (!("addr" in $$source)) {
- /**
- * 监听地址 udp://0.0.0.0:port
- * @member
- * @type {string}
- */
- this["addr"] = "";
- }
- if (!("startedAt" in $$source)) {
- /**
- * 启动时间
- * @member
- * @type {string}
- */
- this["startedAt"] = "";
- }
- if (!("error" in $$source)) {
- /**
- * 最近一次错误
- * @member
- * @type {string}
- */
- this["error"] = "";
- }
- if (!("rxCount" in $$source)) {
- /**
- * 累计接收数据包数
- * @member
- * @type {number}
- */
- this["rxCount"] = 0;
- }
- if (!("txCount" in $$source)) {
- /**
- * 累计发送(回发/手动)数据包数
- * @member
- * @type {number}
- */
- this["txCount"] = 0;
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new UDPInfo instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {UDPInfo}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new UDPInfo(/** @type {Partial<UDPInfo>} */($$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 (!("port" in $$source)) {
- /**
- * 监听端口
- * @member
- * @type {number}
- */
- this["port"] = 0;
- }
- 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 视频下载(yt-dlp)的配置
- */
- 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));
- }
- }
- /**
- * meituCategory 一个美图分类(对应煎蛋一个分类页)。
- */
- export class meituCategory {
- /**
- * Creates a new meituCategory instance.
- * @param {Partial<meituCategory>} [$$source = {}] - The source object to create the meituCategory.
- */
- constructor($$source = {}) {
- if (!("id" in $$source)) {
- /**
- * 分类标识(前端 key,如 "beauty")
- * @member
- * @type {string}
- */
- this["id"] = "";
- }
- if (!("name" in $$source)) {
- /**
- * 展示名(如 "女装")
- * @member
- * @type {string}
- */
- this["name"] = "";
- }
- if (!("postId" in $$source)) {
- /**
- * 煎蛋分类帖子 ID(/beauty→108629)
- * @member
- * @type {string}
- */
- this["postId"] = "";
- }
- if (!("url" in $$source)) {
- /**
- * 分类页面地址(如 https://jandan.net/beauty)
- * @member
- * @type {string}
- */
- this["url"] = "";
- }
- if (!("desc" in $$source)) {
- /**
- * 分类说明(可空)
- * @member
- * @type {string}
- */
- this["desc"] = "";
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new meituCategory instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {meituCategory}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new meituCategory(/** @type {Partial<meituCategory>} */($$parsedSource));
- }
- }
- /**
- * meituImage 单张美图(含来源帖信息)。
- */
- export class meituImage {
- /**
- * Creates a new meituImage instance.
- * @param {Partial<meituImage>} [$$source = {}] - The source object to create the meituImage.
- */
- constructor($$source = {}) {
- if (!("url" in $$source)) {
- /**
- * 图片地址(img.wangmoyu.com/mw600/...)
- * @member
- * @type {string}
- */
- this["url"] = "";
- }
- if (!("author" in $$source)) {
- /**
- * 发帖人昵称(可空)
- * @member
- * @type {string}
- */
- this["author"] = "";
- }
- if (!("date" in $$source)) {
- /**
- * 发帖时间(可空)
- * @member
- * @type {string}
- */
- this["date"] = "";
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new meituImage instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {meituImage}
- */
- static createFrom($$source = {}) {
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- return new meituImage(/** @type {Partial<meituImage>} */($$parsedSource));
- }
- }
- /**
- * meituImagesPayload 前端图片列表负载。
- */
- export class meituImagesPayload {
- /**
- * Creates a new meituImagesPayload instance.
- * @param {Partial<meituImagesPayload>} [$$source = {}] - The source object to create the meituImagesPayload.
- */
- constructor($$source = {}) {
- if (!("category" in $$source)) {
- /**
- * 分类标识
- * @member
- * @type {string}
- */
- this["category"] = "";
- }
- if (!("images" in $$source)) {
- /**
- * 本页图片
- * @member
- * @type {meituImage[]}
- */
- this["images"] = [];
- }
- if (!("hasMore" in $$source)) {
- /**
- * 是否还有更早的公开页
- * @member
- * @type {boolean}
- */
- this["hasMore"] = false;
- }
- if (!("total" in $$source)) {
- /**
- * 服务端可见总页数(0 表示未知/失败)
- * @member
- * @type {number}
- */
- this["total"] = 0;
- }
- if (!("error" in $$source)) {
- /**
- * 抓取错误(非空 = 失败)
- * @member
- * @type {string}
- */
- this["error"] = "";
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new meituImagesPayload instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {meituImagesPayload}
- */
- static createFrom($$source = {}) {
- const $$createField1_0 = $$createType41;
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- if ("images" in $$parsedSource) {
- $$parsedSource["images"] = $$createField1_0($$parsedSource["images"]);
- }
- return new meituImagesPayload(/** @type {Partial<meituImagesPayload>} */($$parsedSource));
- }
- }
- // Private type creation functions
- const $$createType0 = $Create.Array($Create.Any);
- const $$createType1 = LinkItem.createFrom;
- const $$createType2 = $Create.Array($$createType1);
- const $$createType3 = LinkGroup.createFrom;
- const $$createType4 = $Create.Array($$createType3);
- const $$createType5 = RepoItem.createFrom;
- const $$createType6 = $Create.Array($$createType5);
- const $$createType7 = CustomTab.createFrom;
- const $$createType8 = $Create.Array($$createType7);
- const $$createType9 = LocalTool.createFrom;
- const $$createType10 = $Create.Array($$createType9);
- const $$createType11 = QuickGroup.createFrom;
- const $$createType12 = $Create.Array($$createType11);
- const $$createType13 = ControlKeyConfig.createFrom;
- const $$createType14 = $Create.Array($$createType13);
- const $$createType15 = TickerConfig.createFrom;
- const $$createType16 = PoemConfig.createFrom;
- const $$createType17 = MouseAlertConfig.createFrom;
- const $$createType18 = LocalSendConfig.createFrom;
- const $$createType19 = CrocConfig.createFrom;
- const $$createType20 = YTDLPConfig.createFrom;
- const $$createType21 = MeituConfig.createFrom;
- const $$createType22 = MemosConfig.createFrom;
- const $$createType23 = BrightnessConfig.createFrom;
- const $$createType24 = GitLabConfig.createFrom;
- const $$createType25 = ProxyConfig.createFrom;
- const $$createType26 = ResourcesConfig.createFrom;
- const $$createType27 = BiliDynamicItem.createFrom;
- const $$createType28 = $Create.Array($$createType27);
- const $$createType29 = $Create.Map($Create.Any, $Create.Any);
- const $$createType30 = MinutePoint.createFrom;
- const $$createType31 = $Create.Array($$createType30);
- const $$createType32 = PhoneDevice.createFrom;
- const $$createType33 = $Create.Array($$createType32);
- const $$createType34 = QuickItem.createFrom;
- const $$createType35 = $Create.Array($$createType34);
- const $$createType36 = ReleaseItem.createFrom;
- const $$createType37 = $Create.Array($$createType36);
- const $$createType38 = CommitItem.createFrom;
- const $$createType39 = $Create.Array($$createType38);
- const $$createType40 = meituImage.createFrom;
- const $$createType41 = $Create.Array($$createType40);
|