small
This commit is contained in:
@ -75,99 +75,6 @@ func (_ tStatic) ServeModule(
|
||||
}
|
||||
|
||||
|
||||
type tAuth struct {}
|
||||
var Auth tAuth
|
||||
|
||||
|
||||
func (_ tAuth) Login(
|
||||
email string,
|
||||
) string {
|
||||
args := make(map[string]string)
|
||||
|
||||
revel.Unbind(args, "email", email)
|
||||
return revel.MainRouter.Reverse("Auth.Login", args).Url
|
||||
}
|
||||
|
||||
func (_ tAuth) DoLogin(
|
||||
email string,
|
||||
pwd string,
|
||||
) string {
|
||||
args := make(map[string]string)
|
||||
|
||||
revel.Unbind(args, "email", email)
|
||||
revel.Unbind(args, "pwd", pwd)
|
||||
return revel.MainRouter.Reverse("Auth.DoLogin", args).Url
|
||||
}
|
||||
|
||||
func (_ tAuth) Logout(
|
||||
) string {
|
||||
args := make(map[string]string)
|
||||
|
||||
return revel.MainRouter.Reverse("Auth.Logout", args).Url
|
||||
}
|
||||
|
||||
func (_ tAuth) Demo(
|
||||
) string {
|
||||
args := make(map[string]string)
|
||||
|
||||
return revel.MainRouter.Reverse("Auth.Demo", args).Url
|
||||
}
|
||||
|
||||
func (_ tAuth) Register(
|
||||
) string {
|
||||
args := make(map[string]string)
|
||||
|
||||
return revel.MainRouter.Reverse("Auth.Register", args).Url
|
||||
}
|
||||
|
||||
func (_ tAuth) DoRegister(
|
||||
email string,
|
||||
pwd string,
|
||||
) string {
|
||||
args := make(map[string]string)
|
||||
|
||||
revel.Unbind(args, "email", email)
|
||||
revel.Unbind(args, "pwd", pwd)
|
||||
return revel.MainRouter.Reverse("Auth.DoRegister", args).Url
|
||||
}
|
||||
|
||||
func (_ tAuth) FindPassword(
|
||||
) string {
|
||||
args := make(map[string]string)
|
||||
|
||||
return revel.MainRouter.Reverse("Auth.FindPassword", args).Url
|
||||
}
|
||||
|
||||
func (_ tAuth) DoFindPassword(
|
||||
email string,
|
||||
) string {
|
||||
args := make(map[string]string)
|
||||
|
||||
revel.Unbind(args, "email", email)
|
||||
return revel.MainRouter.Reverse("Auth.DoFindPassword", args).Url
|
||||
}
|
||||
|
||||
func (_ tAuth) FindPassword2(
|
||||
token string,
|
||||
) string {
|
||||
args := make(map[string]string)
|
||||
|
||||
revel.Unbind(args, "token", token)
|
||||
return revel.MainRouter.Reverse("Auth.FindPassword2", args).Url
|
||||
}
|
||||
|
||||
func (_ tAuth) FindPasswordUpdate(
|
||||
token string,
|
||||
pwd string,
|
||||
) string {
|
||||
args := make(map[string]string)
|
||||
|
||||
revel.Unbind(args, "token", token)
|
||||
revel.Unbind(args, "pwd", pwd)
|
||||
return revel.MainRouter.Reverse("Auth.FindPasswordUpdate", args).Url
|
||||
}
|
||||
|
||||
|
||||
type tBlog struct {}
|
||||
var Blog tBlog
|
||||
|
||||
@ -294,39 +201,6 @@ func (_ tIndex) Suggestion(
|
||||
}
|
||||
|
||||
|
||||
type tMobile struct {}
|
||||
var Mobile tMobile
|
||||
|
||||
|
||||
func (_ tMobile) Index(
|
||||
) string {
|
||||
args := make(map[string]string)
|
||||
|
||||
return revel.MainRouter.Reverse("Mobile.Index", args).Url
|
||||
}
|
||||
|
||||
func (_ tMobile) Logout(
|
||||
) string {
|
||||
args := make(map[string]string)
|
||||
|
||||
return revel.MainRouter.Reverse("Mobile.Logout", args).Url
|
||||
}
|
||||
|
||||
|
||||
type tNoteContentHistory struct {}
|
||||
var NoteContentHistory tNoteContentHistory
|
||||
|
||||
|
||||
func (_ tNoteContentHistory) ListHistories(
|
||||
noteId string,
|
||||
) string {
|
||||
args := make(map[string]string)
|
||||
|
||||
revel.Unbind(args, "noteId", noteId)
|
||||
return revel.MainRouter.Reverse("NoteContentHistory.ListHistories", args).Url
|
||||
}
|
||||
|
||||
|
||||
type tNote struct {}
|
||||
var Note tNote
|
||||
|
||||
@ -457,6 +331,20 @@ func (_ tNote) Html2Image(
|
||||
}
|
||||
|
||||
|
||||
type tOauth struct {}
|
||||
var Oauth tOauth
|
||||
|
||||
|
||||
func (_ tOauth) GithubCallback(
|
||||
code string,
|
||||
) string {
|
||||
args := make(map[string]string)
|
||||
|
||||
revel.Unbind(args, "code", code)
|
||||
return revel.MainRouter.Reverse("Oauth.GithubCallback", args).Url
|
||||
}
|
||||
|
||||
|
||||
type tShare struct {}
|
||||
var Share tShare
|
||||
|
||||
@ -717,6 +605,99 @@ func (_ tUser) UpdateLeftIsMin(
|
||||
}
|
||||
|
||||
|
||||
type tAuth struct {}
|
||||
var Auth tAuth
|
||||
|
||||
|
||||
func (_ tAuth) Login(
|
||||
email string,
|
||||
) string {
|
||||
args := make(map[string]string)
|
||||
|
||||
revel.Unbind(args, "email", email)
|
||||
return revel.MainRouter.Reverse("Auth.Login", args).Url
|
||||
}
|
||||
|
||||
func (_ tAuth) DoLogin(
|
||||
email string,
|
||||
pwd string,
|
||||
) string {
|
||||
args := make(map[string]string)
|
||||
|
||||
revel.Unbind(args, "email", email)
|
||||
revel.Unbind(args, "pwd", pwd)
|
||||
return revel.MainRouter.Reverse("Auth.DoLogin", args).Url
|
||||
}
|
||||
|
||||
func (_ tAuth) Logout(
|
||||
) string {
|
||||
args := make(map[string]string)
|
||||
|
||||
return revel.MainRouter.Reverse("Auth.Logout", args).Url
|
||||
}
|
||||
|
||||
func (_ tAuth) Demo(
|
||||
) string {
|
||||
args := make(map[string]string)
|
||||
|
||||
return revel.MainRouter.Reverse("Auth.Demo", args).Url
|
||||
}
|
||||
|
||||
func (_ tAuth) Register(
|
||||
) string {
|
||||
args := make(map[string]string)
|
||||
|
||||
return revel.MainRouter.Reverse("Auth.Register", args).Url
|
||||
}
|
||||
|
||||
func (_ tAuth) DoRegister(
|
||||
email string,
|
||||
pwd string,
|
||||
) string {
|
||||
args := make(map[string]string)
|
||||
|
||||
revel.Unbind(args, "email", email)
|
||||
revel.Unbind(args, "pwd", pwd)
|
||||
return revel.MainRouter.Reverse("Auth.DoRegister", args).Url
|
||||
}
|
||||
|
||||
func (_ tAuth) FindPassword(
|
||||
) string {
|
||||
args := make(map[string]string)
|
||||
|
||||
return revel.MainRouter.Reverse("Auth.FindPassword", args).Url
|
||||
}
|
||||
|
||||
func (_ tAuth) DoFindPassword(
|
||||
email string,
|
||||
) string {
|
||||
args := make(map[string]string)
|
||||
|
||||
revel.Unbind(args, "email", email)
|
||||
return revel.MainRouter.Reverse("Auth.DoFindPassword", args).Url
|
||||
}
|
||||
|
||||
func (_ tAuth) FindPassword2(
|
||||
token string,
|
||||
) string {
|
||||
args := make(map[string]string)
|
||||
|
||||
revel.Unbind(args, "token", token)
|
||||
return revel.MainRouter.Reverse("Auth.FindPassword2", args).Url
|
||||
}
|
||||
|
||||
func (_ tAuth) FindPasswordUpdate(
|
||||
token string,
|
||||
pwd string,
|
||||
) string {
|
||||
args := make(map[string]string)
|
||||
|
||||
revel.Unbind(args, "token", token)
|
||||
revel.Unbind(args, "pwd", pwd)
|
||||
return revel.MainRouter.Reverse("Auth.FindPasswordUpdate", args).Url
|
||||
}
|
||||
|
||||
|
||||
type tFile struct {}
|
||||
var File tFile
|
||||
|
||||
@ -747,6 +728,25 @@ func (_ tFile) UploadImageJson(
|
||||
}
|
||||
|
||||
|
||||
type tMobile struct {}
|
||||
var Mobile tMobile
|
||||
|
||||
|
||||
func (_ tMobile) Index(
|
||||
) string {
|
||||
args := make(map[string]string)
|
||||
|
||||
return revel.MainRouter.Reverse("Mobile.Index", args).Url
|
||||
}
|
||||
|
||||
func (_ tMobile) Logout(
|
||||
) string {
|
||||
args := make(map[string]string)
|
||||
|
||||
return revel.MainRouter.Reverse("Mobile.Logout", args).Url
|
||||
}
|
||||
|
||||
|
||||
type tNotebook struct {}
|
||||
var Notebook tNotebook
|
||||
|
||||
@ -796,17 +796,17 @@ func (_ tNotebook) UpdateNotebookTitle(
|
||||
}
|
||||
|
||||
|
||||
type tOauth struct {}
|
||||
var Oauth tOauth
|
||||
type tNoteContentHistory struct {}
|
||||
var NoteContentHistory tNoteContentHistory
|
||||
|
||||
|
||||
func (_ tOauth) GithubCallback(
|
||||
code string,
|
||||
func (_ tNoteContentHistory) ListHistories(
|
||||
noteId string,
|
||||
) string {
|
||||
args := make(map[string]string)
|
||||
|
||||
revel.Unbind(args, "code", code)
|
||||
return revel.MainRouter.Reverse("Oauth.GithubCallback", args).Url
|
||||
revel.Unbind(args, "noteId", noteId)
|
||||
return revel.MainRouter.Reverse("NoteContentHistory.ListHistories", args).Url
|
||||
}
|
||||
|
||||
|
||||
|
238
app/tmp/main.go
238
app/tmp/main.go
@ -102,90 +102,6 @@ func main() {
|
||||
|
||||
})
|
||||
|
||||
revel.RegisterController((*controllers.Auth)(nil),
|
||||
[]*revel.MethodType{
|
||||
&revel.MethodType{
|
||||
Name: "Login",
|
||||
Args: []*revel.MethodArg{
|
||||
&revel.MethodArg{Name: "email", Type: reflect.TypeOf((*string)(nil)) },
|
||||
},
|
||||
RenderArgNames: map[int][]string{
|
||||
},
|
||||
},
|
||||
&revel.MethodType{
|
||||
Name: "DoLogin",
|
||||
Args: []*revel.MethodArg{
|
||||
&revel.MethodArg{Name: "email", Type: reflect.TypeOf((*string)(nil)) },
|
||||
&revel.MethodArg{Name: "pwd", Type: reflect.TypeOf((*string)(nil)) },
|
||||
},
|
||||
RenderArgNames: map[int][]string{
|
||||
},
|
||||
},
|
||||
&revel.MethodType{
|
||||
Name: "Logout",
|
||||
Args: []*revel.MethodArg{
|
||||
},
|
||||
RenderArgNames: map[int][]string{
|
||||
},
|
||||
},
|
||||
&revel.MethodType{
|
||||
Name: "Demo",
|
||||
Args: []*revel.MethodArg{
|
||||
},
|
||||
RenderArgNames: map[int][]string{
|
||||
},
|
||||
},
|
||||
&revel.MethodType{
|
||||
Name: "Register",
|
||||
Args: []*revel.MethodArg{
|
||||
},
|
||||
RenderArgNames: map[int][]string{
|
||||
},
|
||||
},
|
||||
&revel.MethodType{
|
||||
Name: "DoRegister",
|
||||
Args: []*revel.MethodArg{
|
||||
&revel.MethodArg{Name: "email", Type: reflect.TypeOf((*string)(nil)) },
|
||||
&revel.MethodArg{Name: "pwd", Type: reflect.TypeOf((*string)(nil)) },
|
||||
},
|
||||
RenderArgNames: map[int][]string{
|
||||
},
|
||||
},
|
||||
&revel.MethodType{
|
||||
Name: "FindPassword",
|
||||
Args: []*revel.MethodArg{
|
||||
},
|
||||
RenderArgNames: map[int][]string{
|
||||
},
|
||||
},
|
||||
&revel.MethodType{
|
||||
Name: "DoFindPassword",
|
||||
Args: []*revel.MethodArg{
|
||||
&revel.MethodArg{Name: "email", Type: reflect.TypeOf((*string)(nil)) },
|
||||
},
|
||||
RenderArgNames: map[int][]string{
|
||||
},
|
||||
},
|
||||
&revel.MethodType{
|
||||
Name: "FindPassword2",
|
||||
Args: []*revel.MethodArg{
|
||||
&revel.MethodArg{Name: "token", Type: reflect.TypeOf((*string)(nil)) },
|
||||
},
|
||||
RenderArgNames: map[int][]string{
|
||||
},
|
||||
},
|
||||
&revel.MethodType{
|
||||
Name: "FindPasswordUpdate",
|
||||
Args: []*revel.MethodArg{
|
||||
&revel.MethodArg{Name: "token", Type: reflect.TypeOf((*string)(nil)) },
|
||||
&revel.MethodArg{Name: "pwd", Type: reflect.TypeOf((*string)(nil)) },
|
||||
},
|
||||
RenderArgNames: map[int][]string{
|
||||
},
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
revel.RegisterController((*controllers.Blog)(nil),
|
||||
[]*revel.MethodType{
|
||||
&revel.MethodType{
|
||||
@ -296,38 +212,6 @@ func main() {
|
||||
|
||||
})
|
||||
|
||||
revel.RegisterController((*controllers.Mobile)(nil),
|
||||
[]*revel.MethodType{
|
||||
&revel.MethodType{
|
||||
Name: "Index",
|
||||
Args: []*revel.MethodArg{
|
||||
},
|
||||
RenderArgNames: map[int][]string{
|
||||
},
|
||||
},
|
||||
&revel.MethodType{
|
||||
Name: "Logout",
|
||||
Args: []*revel.MethodArg{
|
||||
},
|
||||
RenderArgNames: map[int][]string{
|
||||
},
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
revel.RegisterController((*controllers.NoteContentHistory)(nil),
|
||||
[]*revel.MethodType{
|
||||
&revel.MethodType{
|
||||
Name: "ListHistories",
|
||||
Args: []*revel.MethodArg{
|
||||
&revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil)) },
|
||||
},
|
||||
RenderArgNames: map[int][]string{
|
||||
},
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
revel.RegisterController((*controllers.Note)(nil),
|
||||
[]*revel.MethodType{
|
||||
&revel.MethodType{
|
||||
@ -441,6 +325,19 @@ func main() {
|
||||
|
||||
})
|
||||
|
||||
revel.RegisterController((*controllers.Oauth)(nil),
|
||||
[]*revel.MethodType{
|
||||
&revel.MethodType{
|
||||
Name: "GithubCallback",
|
||||
Args: []*revel.MethodArg{
|
||||
&revel.MethodArg{Name: "code", Type: reflect.TypeOf((*string)(nil)) },
|
||||
},
|
||||
RenderArgNames: map[int][]string{
|
||||
},
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
revel.RegisterController((*controllers.Share)(nil),
|
||||
[]*revel.MethodType{
|
||||
&revel.MethodType{
|
||||
@ -660,6 +557,90 @@ func main() {
|
||||
|
||||
})
|
||||
|
||||
revel.RegisterController((*controllers.Auth)(nil),
|
||||
[]*revel.MethodType{
|
||||
&revel.MethodType{
|
||||
Name: "Login",
|
||||
Args: []*revel.MethodArg{
|
||||
&revel.MethodArg{Name: "email", Type: reflect.TypeOf((*string)(nil)) },
|
||||
},
|
||||
RenderArgNames: map[int][]string{
|
||||
},
|
||||
},
|
||||
&revel.MethodType{
|
||||
Name: "DoLogin",
|
||||
Args: []*revel.MethodArg{
|
||||
&revel.MethodArg{Name: "email", Type: reflect.TypeOf((*string)(nil)) },
|
||||
&revel.MethodArg{Name: "pwd", Type: reflect.TypeOf((*string)(nil)) },
|
||||
},
|
||||
RenderArgNames: map[int][]string{
|
||||
},
|
||||
},
|
||||
&revel.MethodType{
|
||||
Name: "Logout",
|
||||
Args: []*revel.MethodArg{
|
||||
},
|
||||
RenderArgNames: map[int][]string{
|
||||
},
|
||||
},
|
||||
&revel.MethodType{
|
||||
Name: "Demo",
|
||||
Args: []*revel.MethodArg{
|
||||
},
|
||||
RenderArgNames: map[int][]string{
|
||||
},
|
||||
},
|
||||
&revel.MethodType{
|
||||
Name: "Register",
|
||||
Args: []*revel.MethodArg{
|
||||
},
|
||||
RenderArgNames: map[int][]string{
|
||||
},
|
||||
},
|
||||
&revel.MethodType{
|
||||
Name: "DoRegister",
|
||||
Args: []*revel.MethodArg{
|
||||
&revel.MethodArg{Name: "email", Type: reflect.TypeOf((*string)(nil)) },
|
||||
&revel.MethodArg{Name: "pwd", Type: reflect.TypeOf((*string)(nil)) },
|
||||
},
|
||||
RenderArgNames: map[int][]string{
|
||||
},
|
||||
},
|
||||
&revel.MethodType{
|
||||
Name: "FindPassword",
|
||||
Args: []*revel.MethodArg{
|
||||
},
|
||||
RenderArgNames: map[int][]string{
|
||||
},
|
||||
},
|
||||
&revel.MethodType{
|
||||
Name: "DoFindPassword",
|
||||
Args: []*revel.MethodArg{
|
||||
&revel.MethodArg{Name: "email", Type: reflect.TypeOf((*string)(nil)) },
|
||||
},
|
||||
RenderArgNames: map[int][]string{
|
||||
},
|
||||
},
|
||||
&revel.MethodType{
|
||||
Name: "FindPassword2",
|
||||
Args: []*revel.MethodArg{
|
||||
&revel.MethodArg{Name: "token", Type: reflect.TypeOf((*string)(nil)) },
|
||||
},
|
||||
RenderArgNames: map[int][]string{
|
||||
},
|
||||
},
|
||||
&revel.MethodType{
|
||||
Name: "FindPasswordUpdate",
|
||||
Args: []*revel.MethodArg{
|
||||
&revel.MethodArg{Name: "token", Type: reflect.TypeOf((*string)(nil)) },
|
||||
&revel.MethodArg{Name: "pwd", Type: reflect.TypeOf((*string)(nil)) },
|
||||
},
|
||||
RenderArgNames: map[int][]string{
|
||||
},
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
revel.RegisterController((*controllers.File)(nil),
|
||||
[]*revel.MethodType{
|
||||
&revel.MethodType{
|
||||
@ -688,6 +669,25 @@ func main() {
|
||||
|
||||
})
|
||||
|
||||
revel.RegisterController((*controllers.Mobile)(nil),
|
||||
[]*revel.MethodType{
|
||||
&revel.MethodType{
|
||||
Name: "Index",
|
||||
Args: []*revel.MethodArg{
|
||||
},
|
||||
RenderArgNames: map[int][]string{
|
||||
},
|
||||
},
|
||||
&revel.MethodType{
|
||||
Name: "Logout",
|
||||
Args: []*revel.MethodArg{
|
||||
},
|
||||
RenderArgNames: map[int][]string{
|
||||
},
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
revel.RegisterController((*controllers.Notebook)(nil),
|
||||
[]*revel.MethodType{
|
||||
&revel.MethodType{
|
||||
@ -729,12 +729,12 @@ func main() {
|
||||
|
||||
})
|
||||
|
||||
revel.RegisterController((*controllers.Oauth)(nil),
|
||||
revel.RegisterController((*controllers.NoteContentHistory)(nil),
|
||||
[]*revel.MethodType{
|
||||
&revel.MethodType{
|
||||
Name: "GithubCallback",
|
||||
Name: "ListHistories",
|
||||
Args: []*revel.MethodArg{
|
||||
&revel.MethodArg{Name: "code", Type: reflect.TypeOf((*string)(nil)) },
|
||||
&revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil)) },
|
||||
},
|
||||
RenderArgNames: map[int][]string{
|
||||
},
|
||||
|
@ -4,10 +4,9 @@
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="author" content="life">
|
||||
<meta name="keywords" content="leanote,leanote.com">
|
||||
<meta name="description" content="leanote, your own cloud note">
|
||||
<title>leanote, {{msg . "moto"}}</title>
|
||||
<title>leanote, your own cloud note</title>
|
||||
|
||||
<link href="css/bootstrap.css" rel="stylesheet" />
|
||||
<!-- 先加载, 没有样式, 宽度不定 -->
|
||||
|
@ -4,10 +4,9 @@
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="author" content="life">
|
||||
<meta name="keywords" content="leanote,leanote.com">
|
||||
<meta name="description" content="leanote, your own cloud note">
|
||||
<title>leanote, {{msg . "moto"}}</title>
|
||||
<title>leanote, your own cloud note</title>
|
||||
|
||||
<link href="css/bootstrap.css" rel="stylesheet" />
|
||||
<!-- 先加载, 没有样式, 宽度不定 -->
|
||||
|
File diff suppressed because one or more lines are too long
2
public/js/app/note-min.js
vendored
2
public/js/app/note-min.js
vendored
File diff suppressed because one or more lines are too long
@ -1176,8 +1176,8 @@ Note.initContextmenu = function() {
|
||||
{ text: "公开为博客", alias: 'set2Blog', icon: "", action: Note.setNote2Blog },
|
||||
{ text: "取消公开为博客", alias: 'unset2Blog', icon: "", action: Note.setNote2Blog },
|
||||
{ type: "splitLine" },
|
||||
{ text: "发送长微博", alias: 'html2Image', icon: "", action: Note.html2Image },
|
||||
{ type: "splitLine" },
|
||||
// { text: "发送长微博", alias: 'html2Image', icon: "", action: Note.html2Image },
|
||||
// { type: "splitLine" },
|
||||
{ text: "删除", icon: "", faIcon: "fa-trash-o", action: Note.deleteNote },
|
||||
{ text: "移动", alias: "move", icon: "",
|
||||
type: "group",
|
||||
|
Reference in New Issue
Block a user