GithubHelp home page GithubHelp logo

238ver / liteloaderqqnt-plugin-plugin-store Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zard19991/liteloaderqqnt-plugin-plugin-store

0.0 0.0 0.0 257 KB

LiteLoader插件|插件商店

JavaScript 63.60% CSS 3.72% HTML 32.68%

liteloaderqqnt-plugin-plugin-store's Introduction

LiteLoaderQQNT-Plugin-Plugin-Store | 插件商店

格式参考

第三方商店侧载

mainfest.yaml文件下添加如下值

"store": {
    "repo": "商店仓库",
    "branch": "商店分支",
    "save_folder": "插件数据目录下的文件夹相对路径,本目录是不填写"
}

并在目标仓库里创建store.json,格式如下

[
    {
        "name": "名称",
        "save_name": "保存的名称",
        "description": "简介,可选",
        "download": "下载链接",
        "details": "详细,可选"
    }
]

Tip

第三方插件可以通过调用api, 来打开商店

pluginStore.createBrowserWindow(slug)

第三方商店内容安装状态广播

插件商店在生成数据时会向主进程广播询问状态

主进程需要监听LiteLoader.${slug}.isSnippetInstall并返回是否安装

注意 已安装->true 未安装->false, ${slug}为当前插件的slug

// 主进程
ipcMain.handle(
    "LiteLoader.${slug}.isSnippetInstall",
    (event, file_name) => {
        console.log(file_name) // file_name为文件名
        return true
    }
);

第三方商店内容重启状态广播

插件商店在安装完成后会向主进程广播询问是否需要重启

主进程需要监听LiteLoader.${slug}.isSnippetRestart并返回是否需要重启

注意 需要重启->true 不需要重启->false, ${slug}为当前插件的slug

// 主进程
ipcMain.handle(
    "LiteLoader.${slug}.isSnippetRestart",
    (event, file_name) => {
        console.log(file_name) // file_name为文件名
        return true // 重启
    }
);

liteloaderqqnt-plugin-plugin-store's People

Contributors

night-stars-1 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.