mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-16 21:43:33 +08:00
💋 Sync 2026-10-04 04:16:09
This commit is contained in:
1 parent
f6b2df73ec
commit
f62992fd80
745 files changed
+212416
-1173
No files matched your search
@@ -0,0 +1,14 @@
|
||||
{# Adapted from LuCI Bootstrap. Licensed under the Apache License 2.0. -#}
|
||||
{% if (!blank_page): %}
|
||||
</div>
|
||||
<footer>
|
||||
<span>OpenWrt RMM / <a href="https://github.com/openwrt/luci" target="_blank" rel="noreferrer">{{ version.luciname }} {{ version.luciversion }}</a> / {{ version.distname }} {{ version.distversion }}</span>
|
||||
<ul class="breadcrumb pull-right" id="modemenu" style="display:none"></ul>
|
||||
</footer>
|
||||
<script>L.require('menu-bootstrap')</script>
|
||||
<script src="{{ media }}/navigation.js?v=0.9.0" defer></script>
|
||||
<script src="{{ media }}/components.js?v=0.9.0" defer></script>
|
||||
<script src="{{ media }}/search.js?v=0.9.0" defer></script>
|
||||
{% endif %}
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,59 @@
|
||||
{#
|
||||
Copyright 2008 Steven Barth <steven@midlink.org>
|
||||
Copyright 2012 David Menting <david@nut-bolt.nl>
|
||||
Copyright 2008-2022 Jo-Philipp Wich <jo@mein.io>
|
||||
Adapted for OpenWrt RMM.
|
||||
Licensed under the Apache License 2.0.
|
||||
-#}
|
||||
{%
|
||||
import { getuid, getspnam } from 'luci.core';
|
||||
const boardinfo = ubus.call('system', 'board') ?? {};
|
||||
http.prepare_content('text/html; charset=UTF-8');
|
||||
-%}
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ dispatcher.lang }}" data-darkmode="true">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ striptags(`${boardinfo.hostname ?? '?'}${node?.title ? ` | ${_(node.title)}` : ''}`) }}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="darkreader-lock">
|
||||
<link rel="stylesheet" href="{{ media }}/cascade.css?v=0.9.0">
|
||||
<link rel="icon" href="/luci-static/bootstrap/logo.svg" sizes="any">
|
||||
{% if (node?.css): %}
|
||||
<link rel="stylesheet" href="{{ resource }}/{{ node.css }}">
|
||||
{% endif %}
|
||||
{% if (css): %}
|
||||
<style title="text/css">{{ css }}</style>
|
||||
{% endif %}
|
||||
<script src="{{ dispatcher.build_url('admin/translations', dispatcher.lang) }}"></script>
|
||||
<script src="{{ resource }}/cbi.js"></script>
|
||||
</head>
|
||||
<body data-rmm-icons="{{ media }}/icons.svg?v=0.9.0" class="lang_{{ dispatcher.lang }}" data-rmm-route="{{ entityencode(dispatcher.build_url(...ctx.path), true) }}" data-page="{{ entityencode(join('-', length(ctx.request_path) ? ctx.request_path : ctx.path), true) }}">
|
||||
{% if (!blank_page): %}
|
||||
<header>
|
||||
<a class="brand" href="{{ dispatcher.build_url('admin') }}">RMM <span class="rmm-brand-separator">/</span> <span class="rmm-brand-host">{{ striptags(boardinfo.hostname ?? '?') }}</span></a>
|
||||
<nav class="rmm-global-nav" aria-label="{{ _('Main menu') }}"><ul class="nav" id="topmenu" style="display:none"></ul></nav>
|
||||
<div id="indicators" class="pull-right"></div>
|
||||
</header>
|
||||
<div id="maincontent" class="container">
|
||||
{% if (getuid() == 0 && getspnam('root')?.pwdp === ''): %}
|
||||
<div class="alert-message warning">
|
||||
<h4>{{ _('No password set!') }}</h4>
|
||||
<p>{{ _('There is no password set on this router. Please configure a root password to protect the web interface.') }}</p>
|
||||
{% if (dispatcher.lookup('admin/system/admin')): %}
|
||||
<div class="right"><a class="btn" href="{{ dispatcher.build_url('admin/system/admin') }}">{{ _('Go to password configuration...') }}</a></div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if (boardinfo.rootfs_type == 'initramfs'): %}
|
||||
<div class="alert-message warning">
|
||||
<h4>{{ _('System running in recovery (initramfs) mode.') }}</h4>
|
||||
<p>{{ _('No changes to settings will be stored and are lost after rebooting. This mode should only be used to install a firmware upgrade') }}</p>
|
||||
{% if (dispatcher.lookup('admin/system/flash')): %}
|
||||
<div class="right"><a class="btn" href="{{ dispatcher.build_url('admin/system/flash') }}">{{ _('Go to firmware upgrade...') }}</a></div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<noscript><div class="alert-message warning"><h4>{{ _('JavaScript required!') }}</h4><p>{{ _('You must enable JavaScript in your browser or LuCI will not work properly.') }}</p></div></noscript>
|
||||
<div id="tabmenu" style="display:none"></div>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,25 @@
|
||||
{# Adapted from LuCI Bootstrap. Licensed under the Apache License 2.0. -#}
|
||||
{% include('header', { blank_page: true }) %}
|
||||
{% const login_board = ubus.call('system', 'board') ?? {}; %}
|
||||
<section hidden>
|
||||
<form method="post" class="cbi-map">
|
||||
<p class="rmm-login-context">RMM / {{ entityencode(login_board.hostname ?? '?', true) }}</p>
|
||||
<div class="cbi-section"><div class="cbi-section-node">
|
||||
<div class="cbi-value"><label class="cbi-value-title" for="luci_username">{{ _('Username') }}</label><div class="cbi-value-field"><input name="luci_username" id="luci_username" type="text" autocomplete="username" value="{{ entityencode(duser, true) }}"></div></div>
|
||||
<div class="cbi-value"><label class="cbi-value-title" for="luci_password">{{ _('Password') }}</label><div class="cbi-value-field"><input name="luci_password" id="luci_password" type="password" autocomplete="current-password"></div></div>
|
||||
{% if (auth_fields): %}
|
||||
{% for (let field in auth_fields): %}
|
||||
<div class="cbi-value"><label class="cbi-value-title" for="{{ field.name }}">{{ _(field.label ?? field.name) }}</label><div class="cbi-value-field"><input name="{{ field.name }}" id="{{ field.name }}" type="{{ field.type ?? 'text' }}" {% if (field.placeholder): %}placeholder="{{ field.placeholder }}"{% endif %} {% if (field.inputmode): %}inputmode="{{ field.inputmode }}"{% endif %} {% if (field.pattern): %}pattern="{{ field.pattern }}"{% endif %} {% if (field.maxlength): %}maxlength="{{ field.maxlength }}"{% endif %} {% if (field.autocomplete): %}autocomplete="{{ field.autocomplete }}"{% endif %} {% if (field.required): %}required{% endif %}></div></div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if (auth_html): %}<div class="cbi-value">{{ auth_html }}</div>{% endif %}
|
||||
{% if (auth_assets): %}{% for (let asset in auth_assets): %}{% if (asset.type == 'script'): %}<script src="{{ asset.src }}"></script>{% endif %}{% endfor %}{% endif %}
|
||||
</div></div>
|
||||
</form>
|
||||
<hr>
|
||||
{% if (auth_message): %}<div class="alert-message{% if (auth_plugin): %} warning{% endif %}">{{ auth_message }}</div>
|
||||
{% elif (fuser): %}<div class="alert-message error">{{ _('Invalid username and/or password! Please try again.') }}</div>{% endif %}
|
||||
<button class="btn cbi-button-positive important">{{ _('Log in') }}</button>
|
||||
</section>
|
||||
<div id="view"><div class="spinning">{{ _('Loading view…') }}</div><script>L.require('ui').then(function(ui) { ui.instantiateView('bootstrap.sysauth'); });</script></div>
|
||||
{% include('footer', { blank_page: true }) %}
|
||||
Reference in new issue
Block a user