Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • ffbs/ffbs-gluon
  • parabol1337/ffbs-gluon
  • darkbit/ffbs-gluon
3 results
Show changes
Showing
with 72 additions and 83 deletions
......@@ -5,12 +5,12 @@ msgid "Contact info"
msgstr ""
msgid ""
"Please provide your contact information here to allow others to contact "
"you. Note that this information will be visible <em>publicly</em> on "
"the internet together with your node's coordinates. This means it can be "
"downloaded and processed by anyone. This information is "
"not required to operate a node. If you chose to enter data, it will be "
"stored on this node and can be deleted by yourself at any time."
"Please provide your contact information here to allow others to contact you. "
"Note that this information will be visible <em>publicly</em> on the internet "
"together with your node's coordinates. This means it can be downloaded and "
"processed by anyone. This information is not required to operate a node. If "
"you chose to enter data, it will be stored on this node and can be deleted "
"by yourself at any time."
msgstr ""
msgid "e.g. E-mail or phone number"
......
......@@ -2,8 +2,6 @@ return function(form, uci)
local pkg_i18n = i18n 'gluon-config-mode-contact-info'
local site_i18n = i18n 'gluon-site'
local owner = uci:get_first("gluon-node-info", "owner")
local help = site_i18n._translate("gluon-config-mode:contact-help") or pkg_i18n.translate(
'Please provide your contact information here to allow others to contact '
.. 'you. Note that this information will be visible <em>publicly</em> on '
......@@ -14,14 +12,39 @@ return function(form, uci)
)
local s = form:section(Section, nil, help)
local publish = s:option(Flag, "publish", translate("Publish contact info on node-info page"))
publish.default=uci:get_bool("parker","owner","publish")
function publish:write(data)
uci:section("parker", "owner", "owner")
uci:set("parker", "owner", "publish", data)
local owner = uci:get_first("gluon-node-info", "owner")
if data then
local contact = uci:get("parker", "owner", "contact")
uci:set("gluon-node-info", owner, "contact", contact)
else
uci:set("gluon-node-info", owner, "contact", "")
end
end
local o = s:option(Value, "contact", pkg_i18n.translate("Contact info"),
site_i18n._translate("gluon-config-mode:contact-note") or pkg_i18n.translate("e.g. E-mail or phone number"))
o.default = uci:get("gluon-node-info", owner, "contact")
o.default = uci:get("parker", "owner", "contact")
o.datatype = 'minlength(1)'
o.optional = true
function o:write(data)
uci:set("gluon-node-info", owner, "contact", data)
end
uci:section("parker","owner","owner")
uci:set("parker", "owner", "contact", data)
local owner = uci:get_first("gluon-node-info", "owner")
local publish = uci:get_bool("parker", "owner", "publish")
if publish then
uci:set("gluon-node-info", owner, "contact", data)
else
uci:set("gluon-node-info", owner, "contact", "")
end
return {'gluon-node-info'}
uci:save("parker")
uci:save("gluon-node-info")
end
return {'parker'}
end
......@@ -4,7 +4,6 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-config-mode-core
PKG_VERSION:=2
include ../gluon.mk
......
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html lang="">
<head>
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<meta http-equiv="refresh" content="0; URL=/cgi-bin/config" />
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
<meta http-equiv="refresh" content="0; URL=/cgi-bin/config">
</head>
<body>
</body>
......
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Project-Id-Version: PACKAGE VERSION\n"
"PO-Revision-Date: 2015-08-12 23:30+0100\n"
"Last-Translator:Tobias Bernot <tqbs@airmail.cc>\n"
"Language-Team: French\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
......
local util = require "gluon.util"
local uci = require("simple-uci").cursor()
local wizard = {}
for _, entry in ipairs(util.glob('/lib/gluon/config-mode/wizard/*')) do
local f = assert(loadfile(entry))
setfenv(f, getfenv())
local w = f()
table.insert(wizard, w)
end
local f = Form(translate("Welcome!"))
f.submit = translate('Save & restart')
f.reset = false
......@@ -18,21 +9,10 @@ local s = f:section(Section)
s.template = "wizard/welcome"
s.package = "gluon-config-mode-core"
local commit = {'gluon-setup-mode'}
local run = {}
for _, w in ipairs(wizard) do
for _, c in ipairs(w(f, uci) or {}) do
if type(c) == 'string' then
if not util.contains(commit, c) then
table.insert(commit, c)
end
elseif type(c) == 'function' then
table.insert(run, c)
else
error('invalid wizard module return')
end
end
for _, entry in ipairs(util.glob('/lib/gluon/config-mode/wizard/*')) do
local section = assert(loadfile(entry))
setfenv(section, getfenv())
section()(f, uci)
end
function f:write()
......@@ -40,13 +20,9 @@ function f:write()
local unistd = require 'posix.unistd'
uci:set("gluon-setup-mode", uci:get_first("gluon-setup-mode", "setup_mode"), "configured", true)
uci:save("gluon-setup-mode")
for _, c in ipairs(commit) do
uci:commit(c)
end
for _, r in ipairs(run) do
r()
end
os.execute('exec gluon-reconfigure >/dev/null')
f.template = "wizard/reboot"
f.package = "gluon-config-mode-core"
......
include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-config-mode-domain-select
PKG_VERSION:=1
include ../gluon.mk
......
......@@ -49,20 +49,8 @@ return function(form, uci)
o:value(domain.domain_code, domain.domain_name)
end
local domain_changed = false
function o:write(data)
if data ~= selected_domain then
domain_changed = true
uci:set('gluon', 'core', 'domain', data)
end
end
local function reconfigure()
if domain_changed then
os.execute('gluon-reconfigure')
end
uci:set('gluon', 'core', 'domain', data)
uci:save('gluon')
end
return {'gluon', reconfigure}
end
include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-config-mode-geo-location-osm
PKG_VERSION:=1
include ../gluon.mk
......
......@@ -2,3 +2,9 @@ need_number(in_site({'config_mode', 'geo_location', 'osm', 'center', 'lon'}))
need_number(in_site({'config_mode', 'geo_location', 'osm', 'center', 'lat'}))
need_number(in_site({'config_mode', 'geo_location', 'osm', 'zoom'}), false)
need_string(in_site({'config_mode', 'geo_location', 'osm', 'openlayers_url'}), false)
if need_table(in_site({'config_mode', 'geo_location', 'osm', 'tile_layer'}), nil, false) then
need_one_of(in_site({'config_mode', 'geo_location', 'osm', 'tile_layer', 'type'}), {'XYZ'})
need_string(in_site({'config_mode', 'geo_location', 'osm', 'tile_layer', 'url'}))
need_string(in_site({'config_mode', 'geo_location', 'osm', 'tile_layer', 'attributions'}))
end
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Project-Id-Version: gluon-config-mode-geo-location\n"
"Last-Translator: Matthias Schiffer <mschiffer@universe-factory.net>\n"
"Language-Team: German\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
......
......@@ -19,6 +19,7 @@ function M.options()
return {
openlayers_url = config.openlayers_url(),
tile_layer = config.tile_layer(),
zoom = config.zoom(12),
pos = config.center(),
}
......
include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-config-mode-geo-location
PKG_VERSION:=1
include ../gluon.mk
......
......@@ -10,6 +10,9 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
msgid "Advertise node position"
msgstr "Knotenposition veröffentlichen"
msgid "Altitude"
msgstr "Höhe"
......@@ -29,15 +32,12 @@ msgstr "Längengrad"
msgid "Set node position"
msgstr "Knotenposition setzen"
msgid "Advertise node position"
msgstr "Knotenposition veröffentlichen"
msgid ""
"Specifying the altitude is optional; it should only be filled in if an "
"accurate value is known."
msgstr ""
"Die Höhenangabe ist optional und sollte nur gesetzt werden, wenn ein "
"exakter Wert bekannt ist."
"Die Höhenangabe ist optional und sollte nur gesetzt werden, wenn ein exakter "
"Wert bekannt ist."
msgid "e.g. %s"
msgstr "z.B. %s"
......@@ -10,6 +10,9 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
msgid "Advertise node position"
msgstr ""
msgid "Altitude"
msgstr "Hauteur"
......@@ -27,9 +30,6 @@ msgstr "Longitude"
msgid "Set node position"
msgstr ""
msgid "Advertise node position"
msgstr ""
msgid ""
"Specifying the altitude is optional; it should only be filled in if an "
"accurate value is known."
......
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
msgid "Advertise node position"
msgstr ""
msgid "Altitude"
msgstr ""
......@@ -18,9 +21,6 @@ msgstr ""
msgid "Set node position"
msgstr ""
msgid "Advertise node position"
msgstr ""
msgid ""
"Specifying the altitude is optional; it should only be filled in if an "
"accurate value is known."
......
......@@ -100,5 +100,7 @@ return function(form, uci)
end
end
return {'gluon-node-info'}
function s:write()
uci:save("gluon-node-info")
end
end
include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-config-mode-hostname
PKG_VERSION:=1
include ../gluon.mk
......
......@@ -30,7 +30,6 @@ return function(form, uci)
function o:write(data)
pretty_hostname.set(uci, data or default_hostname)
uci:save('system')
end
return {'system'}
end
include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-config-mode-mesh-vpn
PKG_VERSION:=2
include ../gluon.mk
......