first commit

main
ben 1 year ago
commit ed1e8b3cc3

@ -0,0 +1,18 @@
#
# Copyright (C) 2019-2020 <wsdosh@gmail.com>
#
# This is free software, licensed under the Apache License, Version 3.0 .
#
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-shortcutmenu
LUCI_TITLE:=LuCI Support for shortcutmenu
LUCI_DEPENDS:=
LUCI_PKGARCH:=all
PKG_LICENSE:=AGPL-3.0
PKG_MAINTAINER:=<https://github.com/doushang/luci-app-shortcutmenu>
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature

@ -0,0 +1,11 @@
-- Copyright 2021 sudodou <wsdoshb@gmail.com>
-- Licensed to the public under the Apache License 2.0.
module("luci.controller.shortcutmenu", package.seeall)
function index()
if not nixio.fs.access("/etc/config/shortcutmenu") then
return
end
entry({"admin", "apps", "shortcutmenu"}, cbi("shortcutmenu"), _("Shortcutmenu"), 55).dependent = true
end

@ -0,0 +1,40 @@
--[[
LuCI - Lua Configuration Interface
Copyright 2020 doushang <wsdosh@gmail.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
]]--
local sys = require "luci.sys"
local i18n = require "luci.i18n"
local a,b,c,d
m = Map("shortcutmenu", i18n.translate("Shortcutmenu"),
i18n.translatef("Shortcutmenu is used to provide quick access to web pages."))
s = m:section(TypedSection, "lists", i18n.translate("Lists"))
s.template = "cbi/tblsection"
s.anonymous = true
s.addremove = true
a = s:option(Value, "webname", i18n.translate("Webname"))
b = s:option(Value,"weburl", i18n.translate("Weburl<font color=\"green\">(without http:// or https:// )</font>"))
c = s:option(Value,"webpath",i18n.translate("Webpath"))
c.default = '/'
d = s:option(DummyValue,"operator",i18n.translate("Operator"))
d.rawhtml = true
function d.cfgvalue(self, s)
local e = self.map:get(s, "weburl") or ' '
local f = self.map:get(s, "webpath") or ' '
return "<input type='button' style='width:210px; border-color:Teal; text-align:center; font-weight:bold;color:Green;' value='Go' onclick=\"window.open('http://"..e..""..f.."')\"/>"
end
return m

@ -0,0 +1,26 @@
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8\n"
msgid "Shortcutmenu"
msgstr "网页快捷菜单"
msgid "Shortcutmenu is used to provide quick access to web pages."
msgstr "网页快捷菜单用于提供网页的快捷入口。"
msgid "Lists"
msgstr "列表"
msgid "Webname"
msgstr "名称"
msgid "Weburl"
msgstr "网址"
msgid "Webpath"
msgstr "路径"
msgid "Weburl<font color=\"green\">(without http:// or https:// )</font>"
msgstr "网址<font color=\"green\">(不需要带 http:// 或者 https:// )</font>"
msgid "Operator"
msgstr "操作"

@ -0,0 +1,26 @@
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8\n"
msgid "Shortcutmenu"
msgstr "网页快捷菜单"
msgid "Shortcutmenu is used to provide quick access to web pages."
msgstr "网页快捷菜单用于提供网页的快捷入口。"
msgid "Lists"
msgstr "列表"
msgid "Webname"
msgstr "名称"
msgid "Weburl"
msgstr "网址"
msgid "Webpath"
msgstr "路径"
msgid "Weburl<font color=\"green\">(without http:// or https:// )</font>"
msgstr "网址<font color=\"green\">(不需要带 http:// 或者 https:// )</font>"
msgid "Operator"
msgstr "操作"

@ -0,0 +1 @@
zh-cn

@ -0,0 +1,11 @@
{
"luci-app-shortcutmenu": {
"description": "Grant UCI access for luci-app-shortcutmenu",
"read": {
"uci": [ "shortcutmenu" ]
},
"write": {
"uci": [ "shortcutmenu" ]
}
}
}
Loading…
Cancel
Save