-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1、修复邮件插入失败 2、插件支持设置页面 3、修复pop3邮箱拉取权限判断 4、修复非管理员账户的附件权限判断 Co-authored-by: jinnrry <i@jinnrry.com>
- Loading branch information
Showing
28 changed files
with
432 additions
and
224 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<template> | ||
<div id="main"> | ||
<el-tabs> | ||
<el-tab-pane v-for="(src, name) in pluginList" :label="name"> | ||
<iframe :src="src"></iframe> | ||
</el-tab-pane> | ||
</el-tabs> | ||
</div> | ||
</template> | ||
|
||
<script setup> | ||
import { reactive, ref, getCurrentInstance } from 'vue' | ||
const app = getCurrentInstance() | ||
const $http = app.appContext.config.globalProperties.$http | ||
const pluginList = reactive({}) | ||
$http.get('/api/plugin/list').then(res => { | ||
if (res.data != null && res.data.length > 0) { | ||
for (let i = 0; i < res.data.length; i++) { | ||
let name = res.data[i]; | ||
pluginList[name] = "/api/plugin/settings/"+ name +"/index.html"; | ||
} | ||
} | ||
}) | ||
</script> | ||
|
||
<style scoped> | ||
iframe{ | ||
width: 100%; | ||
border: 0; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package controllers | ||
|
||
import ( | ||
"github.com/Jinnrry/pmail/dto/response" | ||
"github.com/Jinnrry/pmail/hooks" | ||
"github.com/Jinnrry/pmail/utils/context" | ||
"io" | ||
"net/http" | ||
"strings" | ||
) | ||
|
||
func GetPluginList(ctx *context.Context, w http.ResponseWriter, req *http.Request) { | ||
ret := []string{} | ||
for s, _ := range hooks.HookList { | ||
ret = append(ret, s) | ||
} | ||
response.NewSuccessResponse(ret).FPrint(w) | ||
|
||
} | ||
|
||
func SettingsHtml(ctx *context.Context, w http.ResponseWriter, req *http.Request) { | ||
args := strings.Split(req.RequestURI, "/") | ||
if len(args) < 4 { | ||
response.NewErrorResponse(response.ParamsError, "404", "").FPrint(w) | ||
return | ||
} | ||
|
||
pluginName := args[4] | ||
if plugin, ok := hooks.HookList[pluginName]; ok { | ||
dt, err := io.ReadAll(req.Body) | ||
if err != nil { | ||
response.NewErrorResponse(response.ParamsError, err.Error(), "").FPrint(w) | ||
return | ||
} | ||
html := plugin.SettingsHtml(ctx, | ||
strings.Join(args[4:], "/"), | ||
string(dt), | ||
) | ||
w.Header().Set("Content-Type", "text/html; charset=utf-8") | ||
|
||
w.Write([]byte(html)) | ||
return | ||
|
||
} | ||
response.NewErrorResponse(response.ParamsError, "404", "") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
datasets==2.20.0 | ||
numpy==1.20.3 | ||
retvec==1.0.1 | ||
tensorflow==2.8.4 | ||
tensorflow==2.12.1 | ||
beautifulsoup4 | ||
lxml |
Oops, something went wrong.