Coder Social home page Coder Social logo

autohelp's People

Contributors

bluedeer233 avatar kcn3388 avatar lanly109 avatar sonderxiaoming avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

autohelp's Issues

自定义网页背景图片

翻了资源库唯独没有看到猫猫这张图,因此无法简单粗暴的平替,本人对前端一窍不通,不知道大佬是否方便提供这一选项
(因为bot发展到现在已经和pcr没啥关系了)
如果不好提供,请大佬直接关闭,打扰大佬了

部署后无法通过公网ip:端口/bot/help实现访问【已解决】

部署成功且可以通过127.0.0.1:8080/bot/help实现本地访问和调试:
图片
但通过公网ip构造的url则提示超时:
图片
在部署bot的服务器本机上访问公网ip构造的url时提示拒绝访问请求(右边的标签是通过127.0.0.1实现的成功访问):
图片
服务器是腾讯云,防火墙准入规则已经添加8080端口:
图片
希望大佬解惑!

关于更换背景图片的问题

1655454151983
暴力搜索找到了背景图片的位置,然后也将两处文件中的图片url都替换了,可是重启bot后,打开网页帮助还是显示的原来的猫猫图。想问一下是不是需要删除缓存重新生成一遍网页资源之类的

一些小小想法

感谢dalao提供的轮子,今天尝试了进行部署,想到了点改进的方向

  1. 插件帮助文案的渲染,感觉改成服务端渲染好一点?一方面减少了二次请求和客户端渲染,另一方面做到了真正的黑名单,在服务器渲染时就把黑名单里的插件去掉。因为现在这个黑名单实际上人家还是可以查看json文案然后访问对应的url得到黑名单插件的readme
  2. 帮助文案是不是取服务Servicehelp文案好点?当然我不清楚起初是不是因为这个help文案混乱才用readme作为帮助文案。但因为readme有好些都不是给用户阅读的,而是维护人员,而每个插件单独建一个userreadme有点小麻烦;并且还有个问题就是可能一个module的文件夹里有不止一个插件,但它们只能共享一个userreadme。还有就是文件夹名也不一定是service名,用户管理员在自己启动禁用插件时还是不容易找到帮助文案对应的service名字。

第一点的改进就把要渲染的内容(插件名和插件帮助文案)变量传入render_template函数里,help.html解析该变量就可以了。
第二点的改进,在Service类里有个get_loaded_services类可以获取已加载的插件,包括其namehelp。当然可以将help 渲染成html然后嵌入到网页里,这样帮助文案里显示的插件名字就是service name

我自己对这两点改进,但由于我对JQuery UI库不太熟悉,在修改后出现了折叠效果不符合预期行为的问题(折叠动画不是从下往上慢慢闭合,而是直接闭合后往下展开一点点,如下动图所示),目前还在研究原因中。

DyhvP.gif

如果需要,我可以把我改的pr上来。

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.