Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions applications/luci-app-qiyougamebooster/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# SPDX-License-Identifier: Apache-2.0
#

include $(TOPDIR)/rules.mk

PKG_LICENSE:=Apache-2.0

LUCI_TITLE:=LuCI app for QiYou Game Booster
LUCI_DEPENDS:=+qiyougamebooster
LUCI_PKGARCH:=all

PKG_MAINTAINER:=qiyouacc, Internet1235

include ../../luci.mk

# call BuildPackage - OpenWrt buildroot signature
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
// SPDX-License-Identifier: Apache-2.0

'use strict';
'require form';
'require poll';
'require uci';
'require view';
'require fs';

function getStatus() {
var result
try {
result = fs.exec('/usr/bin/qiyougamebooster.sh', ['status']);
return result.then(function(status) {
return status.stdout.trim()
})
} catch (e) { }
return result;
}

function getVersion() {
var result
try {
result = fs.exec('/usr/bin/qiyougamebooster.sh', ['version'])
return result.then(function(version) {
return version.stdout.trim() || _('QiYou Game Booster');
}).catch(function() {
return _('QiYou Game Booster');
});
} catch (e) { }
return Promise.resolve(_('QiYou Game Booster'));
}

function renderStatus(status, version) {
var spanTemp = '<span style="color:%s"><strong>%s: %s %s</strong></span>';
var renderHTML;
if (status == 'NOT ENABLED' || status == 'NOT RUNNING' || status == 'NOT SUPPORTED') {
renderHTML = spanTemp.format('red', _('Status'), _(version), _(status));
} else {
renderHTML = spanTemp.format('green', _('Status'), _(version), _(status));
}
return renderHTML;
}

return view.extend({
load: function() {
return Promise.all([
uci.load('qiyougamebooster')
]);
},

render: function() {
let m, s, o;

m = new form.Map('qiyougamebooster', _('QiYou Game Booster'),
_('Play console games online with less lag and more stability.') + '<br />' +
_('— now supporting PS, Switch, Xbox, PC, and mobile.'));

s = m.section(form.TypedSection);
s.anonymous = true;
s.render = function () {
poll.add(function () {
return L.resolveDefault(getStatus()).then(function (status) {
return L.resolveDefault(getVersion()).then(function (version) {
var view = document.getElementById('service_status');
view.innerHTML = renderStatus(status, version);
});
});
});

return E('div', { class: 'cbi-section', id: 'status_bar' }, [
E('p', { id: 'service_status' }, _('Collecting data...'))
]);
}

s = m.section(form.NamedSection, 'config', 'qiyougamebooster');

o = s.option(form.Flag, 'enabled', _('Enable'));
o.default = o.disabled;
o.rmempty = false;

s = m.section(form.TypedSection);
s.anonymous = true;
s.render = function () {
return E('div', {class: 'cbi-section'}, [
E('p', [
E('img', {src: '/qiyougamebooster/Tutorial.png', height: '350'})
])
])
}


return m.render();
}

});
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"

#: applications/luci-app-qiyougamebooster/htdocs/luci-static/resources/view/qiyougamebooster.js:26
#: applications/luci-app-qiyougamebooster/htdocs/luci-static/resources/view/qiyougamebooster.js:28
#: applications/luci-app-qiyougamebooster/htdocs/luci-static/resources/view/qiyougamebooster.js:53
msgid "QiYou Game Booster"
msgstr ""

#: applications/luci-app-qiyougamebooster/htdocs/luci-static/resources/view/qiyougamebooster.js:54
msgid "Play console games online with less lag and more stability."
msgstr ""

#: applications/luci-app-qiyougamebooster/htdocs/luci-static/resources/view/qiyougamebooster.js:55
msgid "— now supporting PS, Switch, Xbox, PC, and mobile."
msgstr ""

#: applications/luci-app-qiyougamebooster/htdocs/luci-static/resources/view/qiyougamebooster.js:70
msgid "Collecting data..."
msgstr ""

#: applications/luci-app-qiyougamebooster/htdocs/luci-static/resources/view/qiyougamebooster.js:76
msgid "Enable"
msgstr ""

#: applications/luci-app-qiyougamebooster/htdocs/luci-static/resources/view/qiyougamebooster.js:38
msgid "Status"
msgstr ""

msgid "NOT ENABLED"
msgstr ""

msgid "CLOSED"
msgstr ""

msgid "BOOSTING"
msgstr ""

msgid "RUNNING"
msgstr ""

msgid "NOT SUPPORTED"
msgstr ""

msgid "DOWNLOADING"
msgstr ""

msgid "INSTALLING"
msgstr ""

msgid "NOT RUNNING"
msgstr ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"

#: applications/luci-app-qiyougamebooster/htdocs/luci-static/resources/view/qiyougamebooster.js:26
#: applications/luci-app-qiyougamebooster/htdocs/luci-static/resources/view/qiyougamebooster.js:28
#: applications/luci-app-qiyougamebooster/htdocs/luci-static/resources/view/qiyougamebooster.js:53
msgid "QiYou Game Booster"
msgstr "奇游联机宝"

#: applications/luci-app-qiyougamebooster/htdocs/luci-static/resources/view/qiyougamebooster.js:54
msgid "Play console games online with less lag and more stability."
msgstr "加速主机游戏,实现满速下载、稳定联机、飞快匹配体验。"

#: applications/luci-app-qiyougamebooster/htdocs/luci-static/resources/view/qiyougamebooster.js:55
msgid "— now supporting PS, Switch, Xbox, PC, and mobile."
msgstr "—— 现已支持 PS、Switch、Xbox、PC 与移动端。"

#: applications/luci-app-qiyougamebooster/htdocs/luci-static/resources/view/qiyougamebooster.js:70
msgid "Collecting data..."
msgstr "正在收集数据中..."

#: applications/luci-app-qiyougamebooster/htdocs/luci-static/resources/view/qiyougamebooster.js:76
msgid "Enable"
msgstr "启用"

#: applications/luci-app-qiyougamebooster/htdocs/luci-static/resources/view/qiyougamebooster.js:38
msgid "Status"
msgstr "状态"

msgid "NOT ENABLED"
msgstr "未启用"

msgid "CLOSED"
msgstr "已关闭"

msgid "BOOSTING"
msgstr "加速中"

msgid "RUNNING"
msgstr "运行中"

msgid "NOT SUPPORTED"
msgstr "不支持"

msgid "DOWNLOADING"
msgstr "下载中"

msgid "INSTALLING"
msgstr "安装中"

msgid "NOT RUNNING"
msgstr "未运行"
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"admin/services/qiyougamebooster": {
"title": "QiYou Game Booster",
"action": {
"type": "view",
"path": "qiyougamebooster"
},
"depends": {
"acl": [ "luci-app-qiyougamebooster" ],
"fs": {
"/usr/bin/qiyougamebooster.sh": "executable"
},
"uci": { "qiyougamebooster": true }
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"luci-app-qiyougamebooster": {
"description": "Grant UCI access for luci-app-qiyougamebooster",
"read": {
"file": {
"/usr/bin/qiyougamebooster.sh": [ "exec" ]
},
"uci": [ "qiyougamebooster" ]
},
"write": {
"uci": [ "qiyougamebooster" ]
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading