commit ed1e8b3cc3fe901bdd5d9f01c64c3a06777f7ab7 Author: ben Date: Fri Sep 8 06:35:06 2023 -0400 first commit diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..bad5c45 --- /dev/null +++ b/Makefile @@ -0,0 +1,18 @@ +# +# Copyright (C) 2019-2020 +# +# 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:= + +include $(TOPDIR)/feeds/luci/luci.mk + +# call BuildPackage - OpenWrt buildroot signature diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/luasrc/controller/shortcutmenu.lua b/luasrc/controller/shortcutmenu.lua new file mode 100644 index 0000000..2f77085 --- /dev/null +++ b/luasrc/controller/shortcutmenu.lua @@ -0,0 +1,11 @@ +-- Copyright 2021 sudodou +-- 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 diff --git a/luasrc/model/cbi/shortcutmenu.lua b/luasrc/model/cbi/shortcutmenu.lua new file mode 100644 index 0000000..fa1528e --- /dev/null +++ b/luasrc/model/cbi/shortcutmenu.lua @@ -0,0 +1,40 @@ +--[[ +LuCI - Lua Configuration Interface + +Copyright 2020 doushang + +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(without http:// or https:// )")) + +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 "" +end + +return m diff --git a/po/zh-Hans/shortcutmenu.po b/po/zh-Hans/shortcutmenu.po new file mode 100644 index 0000000..ffe0692 --- /dev/null +++ b/po/zh-Hans/shortcutmenu.po @@ -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(without http:// or https:// )" +msgstr "网址(不需要带 http:// 或者 https:// )" + +msgid "Operator" +msgstr "操作" \ No newline at end of file diff --git a/po/zh-cn/shortcutmenu.po b/po/zh-cn/shortcutmenu.po new file mode 100644 index 0000000..ffe0692 --- /dev/null +++ b/po/zh-cn/shortcutmenu.po @@ -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(without http:// or https:// )" +msgstr "网址(不需要带 http:// 或者 https:// )" + +msgid "Operator" +msgstr "操作" \ No newline at end of file diff --git a/po/zh_Hans b/po/zh_Hans new file mode 100755 index 0000000..41451e4 --- /dev/null +++ b/po/zh_Hans @@ -0,0 +1 @@ +zh-cn \ No newline at end of file diff --git a/root/etc/config/shortcutmenu b/root/etc/config/shortcutmenu new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/root/etc/config/shortcutmenu @@ -0,0 +1 @@ + diff --git a/root/usr/share/rpcd/acl.d/luci-app-shortcutmenu.json b/root/usr/share/rpcd/acl.d/luci-app-shortcutmenu.json new file mode 100644 index 0000000..5ec8e93 --- /dev/null +++ b/root/usr/share/rpcd/acl.d/luci-app-shortcutmenu.json @@ -0,0 +1,11 @@ +{ + "luci-app-shortcutmenu": { + "description": "Grant UCI access for luci-app-shortcutmenu", + "read": { + "uci": [ "shortcutmenu" ] + }, + "write": { + "uci": [ "shortcutmenu" ] + } + } +}