mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-05 01:44:16 +08:00
🌴 Sync 2026-03-05 23:51:42
This commit is contained in:
1 parent
97c049ed0a
commit
0acff03804
14253 files changed
+3893239
No files matched your search
@@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
@@ -0,0 +1,27 @@
|
||||
#
|
||||
# Copyright 2022-2024 Rafał Wabik - IceG - From eko.one.pl forum
|
||||
#
|
||||
# Licensed to the GNU General Public License v3.0.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
LUCI_TITLE:=LuCI JS Support for sms-tool
|
||||
LUCI_DESCRIPTION:=LuCI JS interface for the sms-tool. The user interface supports SMS / USSD Codes / AT Commands.
|
||||
LUCI_DEPENDS:=+sms-tool +kmod-usb-serial +kmod-usb-serial-option +comgt
|
||||
|
||||
PKG_NAME:=luci-app-sms-tool-js
|
||||
PKG_VERSION:=2.0.29
|
||||
PKG_RELEASE:=1
|
||||
PKG_MAINTAINER:=Rafał Wabik <4Rafal@gmail.com>
|
||||
|
||||
define Package/luci-app-sms-tool-js/conffiles
|
||||
/etc/config/sms_tool_js
|
||||
/etc/modem/atcmmds.user
|
||||
/etc/modem/phonebook.user
|
||||
/etc/modem/ussdcodes.user
|
||||
endef
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
# call BuildPackage - OpenWrt buildroot signature
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 9.0 KiB |
@@ -0,0 +1,637 @@
|
||||
'use strict';
|
||||
'require dom';
|
||||
'require form';
|
||||
'require fs';
|
||||
'require ui';
|
||||
'require uci';
|
||||
'require view';
|
||||
|
||||
/*
|
||||
Copyright 2022-2025 Rafał Wabik - IceG - From eko.one.pl forum
|
||||
|
||||
Licensed to the GNU General Public License v3.0.
|
||||
*/
|
||||
|
||||
document.head.append(E('style', {'type': 'text/css'},
|
||||
`
|
||||
#smsTable {
|
||||
width: 100%;
|
||||
border: 1px solid var(--border-color-medium) !important;
|
||||
}
|
||||
|
||||
th, td {
|
||||
padding: 10px;
|
||||
text-align: justify !important;
|
||||
vertical-align: top !important;
|
||||
}
|
||||
|
||||
td input[type="checkbox"] {
|
||||
float: left !important;
|
||||
margin: 0 auto !important;
|
||||
width: 17px !important;
|
||||
}
|
||||
|
||||
#smsTable tr:nth-child(odd) td{
|
||||
background: var(--background-color-medium) !important;
|
||||
border-bottom: 1px solid var(--border-color-medium) !important;
|
||||
border-top: 1px solid var(--border-color-medium) !important;
|
||||
}
|
||||
|
||||
#smsTable tr:nth-child(even) td{
|
||||
border-bottom: 1px solid var(--border-color-medium) !important;
|
||||
border-top: 1px solid var(--border-color-medium) !important;
|
||||
}
|
||||
|
||||
#smsTable .checker {
|
||||
width: 7% !important;
|
||||
}
|
||||
|
||||
#smsTable .from {
|
||||
width: 11% !important;
|
||||
}
|
||||
|
||||
#smsTable .received {
|
||||
width: 15% !important;
|
||||
}
|
||||
|
||||
#smsTable .message {
|
||||
width: 88% !important;
|
||||
}
|
||||
`));
|
||||
|
||||
function msg_bar(v, m) {
|
||||
var pg = document.querySelector('#msg')
|
||||
var vn = parseInt(v) || 0;
|
||||
var mn = parseInt(m) || 100;
|
||||
var pc = Math.floor((100 / mn) * vn);
|
||||
|
||||
pg.firstElementChild.style.width = pc + '%';
|
||||
pg.setAttribute('title', '%s'.format(v) + ' / ' + '%s'.format(m) + ' ('+ pc + '%)');
|
||||
}
|
||||
|
||||
|
||||
function save_count() {
|
||||
uci.load('sms_tool_js').then(function() {
|
||||
|
||||
var storeL = (uci.get('sms_tool_js', '@sms_tool_js[0]', 'storage'));
|
||||
var portR = (uci.get('sms_tool_js', '@sms_tool_js[0]', 'readport'));
|
||||
|
||||
L.resolveDefault(fs.exec_direct('/usr/bin/sms_tool', [ '-s' , storeL , '-d' , portR , 'status' ]))
|
||||
.then(function(res) {
|
||||
if (res) {
|
||||
var total = res.substring(res.indexOf("total"));
|
||||
var t = total.replace ( /[^\d.]/g, '' );
|
||||
var used = res.substring(17, res.indexOf("total"));
|
||||
var u = used.replace ( /[^\d.]/g, '' );
|
||||
uci.set('sms_tool_js', '@sms_tool_js[0]', 'sms_count', L.toArray(u).join(' '));
|
||||
uci.save();
|
||||
uci.apply();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
return view.extend({
|
||||
load: function() {
|
||||
uci.load('sms_tool_js');
|
||||
},
|
||||
|
||||
handleSWarea: function(ev) {
|
||||
switch (document.querySelector('input[name="filter_area"]:checked').value) {
|
||||
case 'sim':
|
||||
uci.set('sms_tool_js', '@sms_tool_js[0]', 'storage', "SM");
|
||||
uci.save();
|
||||
uci.apply();
|
||||
break;
|
||||
case 'memory':
|
||||
uci.set('sms_tool_js', '@sms_tool_js[0]', 'storage', "ME");
|
||||
uci.save();
|
||||
uci.apply();
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
handleDelete: function(ev) {
|
||||
if (document.querySelectorAll('input[name="smsn"]:checked').length == 0){
|
||||
ui.addNotification(null, E('p', _('Please select the message(s) to be deleted')), 'info');
|
||||
}
|
||||
else {
|
||||
if (document.querySelectorAll('input[name="smsn"]:checked').length === document.querySelectorAll('input[name="smsn"]').length) {
|
||||
if (confirm(_('Delete all the messages?')))
|
||||
{
|
||||
var sections = uci.sections('sms_tool_js');
|
||||
var portDA = sections[0].readport;
|
||||
var storeDA = sections[0].storage;
|
||||
|
||||
fs.exec_direct('/usr/bin/sms_tool', [ '-d' , portDA , 'delete' , 'all' ]);
|
||||
document.getElementById("ch-all").checked = false;
|
||||
|
||||
var rowCount = smsTable.rows.length;
|
||||
for (var i = rowCount - 1; i > 0; i--) {
|
||||
smsTable.deleteRow(i);}
|
||||
setTimeout(function() {
|
||||
L.resolveDefault(fs.exec_direct('/usr/bin/sms_tool', [ '-s' , storeDA , '-d' , portDA , 'status' ]))
|
||||
.then(function(res) {
|
||||
if (res) {
|
||||
var total = res.substring(res.indexOf("total"));
|
||||
var t = total.replace ( /[^\d.]/g, '' );
|
||||
var u = "0";
|
||||
msg_bar(Math.floor(u), t);
|
||||
save_count();
|
||||
}
|
||||
});
|
||||
}, 2000);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
if (confirm(_('Delete selected message(s)?')))
|
||||
{
|
||||
uci.load('sms_tool_js').then(function() {
|
||||
|
||||
var storeL = (uci.get('sms_tool_js', '@sms_tool_js[0]', 'storage'));
|
||||
var portR = (uci.get('sms_tool_js', '@sms_tool_js[0]', 'readport'));
|
||||
|
||||
var array = [];
|
||||
var checkb = document.querySelectorAll('input[type=checkbox]:checked');
|
||||
|
||||
for (var i = 0; i < checkb.length; i++) {
|
||||
if (checkb[i] != source)
|
||||
array.push(checkb[i].id)
|
||||
}
|
||||
|
||||
if (array) {
|
||||
|
||||
var args = [];
|
||||
var sections = uci.sections('sms_tool_js');
|
||||
var portDEL = sections[0].readport;
|
||||
var storeDS = sections[0].storage;
|
||||
|
||||
args.push(array);
|
||||
var ax = args.toString();
|
||||
ax = ax.replace(/,/g, ' ');
|
||||
ax = ax.replace(/-/g, ' ');
|
||||
|
||||
var smsnr = ax.split(" ");
|
||||
|
||||
var smsallchars = smsnr.toString();
|
||||
var smsdelcount = 0;
|
||||
var smsdeleted = 0;
|
||||
|
||||
var inumber = false;
|
||||
|
||||
for (var i = 0; i < smsallchars.length; i++) {
|
||||
var ch = smsallchars[i];
|
||||
|
||||
if (ch >= '0' && ch <= '9') {
|
||||
if (!inumber) {
|
||||
smsdelcount++;
|
||||
inumber = true;
|
||||
}
|
||||
} else if (ch === ',') {
|
||||
inumber = false;
|
||||
} else {
|
||||
inumber = false;
|
||||
}
|
||||
}
|
||||
|
||||
var deletelabel = document.getElementById("deleteinfo");
|
||||
deletelabel.style.display = 'block';
|
||||
|
||||
for (var i=0; i < smsnr.length + 2; i++)
|
||||
{
|
||||
(function(i) {
|
||||
setTimeout(function() {
|
||||
smsnr[i] = parseInt(smsnr[i], 10);
|
||||
|
||||
if (!Number.isNaN(smsnr[i]))
|
||||
{
|
||||
fs.exec_direct('/usr/bin/sms_tool', [ '-d' , portDEL , 'delete' , smsnr[i] ]);
|
||||
smsdeleted++;
|
||||
L.resolveDefault(fs.exec_direct('/usr/bin/sms_tool', [ '-s' , storeL , '-d' , portR , 'status' ]))
|
||||
.then(function(res) {
|
||||
if (res) {
|
||||
var total = res.substring(res.indexOf("total"));
|
||||
var t = total.replace ( /[^\d.]/g, '' );
|
||||
var used = res.substring(17, res.indexOf("total"));
|
||||
var u = used.replace ( /[^\d.]/g, '' );
|
||||
msg_bar(Math.floor(u), t);
|
||||
deletelabel.innerHTML = _('Please wait... deleted')+' '+smsdeleted+' '+_('of')+' '+smsdelcount+' '+_('selected messages');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
L.resolveDefault(fs.exec_direct('/usr/bin/sms_tool', [ '-s' , storeL , '-d' , portR , 'status' ]))
|
||||
.then(function(res) {
|
||||
if (res) {
|
||||
var total = res.substring(res.indexOf("total"));
|
||||
var t = total.replace ( /[^\d.]/g, '' );
|
||||
var used = res.substring(17, res.indexOf("total"));
|
||||
var u = used.replace ( /[^\d.]/g, '' );
|
||||
msg_bar(Math.floor(u), t);
|
||||
deletelabel.innerHTML = _('Please wait... deleted')+' '+smsdeleted+' '+_('of')+' '+smsdelcount+' '+_('selected messages');
|
||||
}
|
||||
});
|
||||
|
||||
if (smsdelcount == smsdeleted) {
|
||||
setTimeout(function() {
|
||||
var hidecount = document.getElementById('deleteinfo');
|
||||
hidecount.style.display = 'none';
|
||||
save_count();
|
||||
}, 7000);
|
||||
}
|
||||
}, 1500 * i);
|
||||
})(i);
|
||||
L.resolveDefault(fs.exec_direct('/usr/bin/sms_tool', [ '-s' , storeL , '-d' , portR , 'status' ]))
|
||||
.then(function(res) {
|
||||
if (res) {
|
||||
var total = res.substring(res.indexOf("total"));
|
||||
var t = total.replace ( /[^\d.]/g, '' );
|
||||
var used = res.substring(17, res.indexOf("total"));
|
||||
var u = used.replace ( /[^\d.]/g, '' );
|
||||
msg_bar(Math.floor(u), t);
|
||||
deletelabel.innerHTML = _('Please wait... deleted')+' '+smsdeleted+' '+_('of')+' '+smsdelcount+' '+_('selected messages');
|
||||
}
|
||||
});
|
||||
}
|
||||
var table = document.getElementById("smsTable");
|
||||
var index = 1;
|
||||
while (index < table.rows.length) {
|
||||
var input = table.rows[index].cells[0].children[0];
|
||||
if (input && input.checked) {
|
||||
table.deleteRow(index);
|
||||
}
|
||||
else {
|
||||
index++;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
handleRefresh: function(ev) {
|
||||
window.location.reload();
|
||||
},
|
||||
|
||||
|
||||
handleSelect: function(ev) {
|
||||
var checkBox = document.getElementById("ch-all");
|
||||
var checkBoxes = document.querySelectorAll('input[type="checkbox"]');
|
||||
|
||||
if (checkBox.checked == true){
|
||||
for (var i = 0; i < checkBoxes.length; i++)
|
||||
checkBoxes[i].setAttribute('checked', 'true');
|
||||
} else {
|
||||
for (var i = 0; i < checkBoxes.length; i++)
|
||||
checkBoxes[i].removeAttribute('checked');
|
||||
}
|
||||
},
|
||||
|
||||
render: function(data) {
|
||||
|
||||
var sections, store;
|
||||
var view = document.getElementById("smssarea");
|
||||
store = '-';
|
||||
|
||||
uci.load('sms_tool_js').then(function() {
|
||||
var storeL = (uci.get('sms_tool_js', '@sms_tool_js[0]', 'storage'));
|
||||
var portR = (uci.get('sms_tool_js', '@sms_tool_js[0]', 'readport'));
|
||||
var smsM = (uci.get('sms_tool_js', '@sms_tool_js[0]', 'mergesms'));
|
||||
var algo = (uci.get('sms_tool_js', '@sms_tool_js[0]', 'algorithm'));
|
||||
var hide = (uci.get('sms_tool_js', '@sms_tool_js[0]', 'bnumber'));
|
||||
var ledn = (uci.get('sms_tool_js', '@sms_tool_js[0]', 'lednotify'));
|
||||
var ledt = (uci.get('sms_tool_js', '@sms_tool_js[0]', 'ledtype'));
|
||||
var direct = (uci.get('sms_tool_js', '@sms_tool_js[0]', 'direction'));
|
||||
|
||||
if (!portR) {
|
||||
ui.addNotification(null, E('p', _('The package requires user configuration. \
|
||||
<br /><br /><b>The following need to be set:</b> \
|
||||
<ul><li>1. All ports for communication with the modem.</li><li>2. Additional options specific to the given modem (for handling USSD codes).</li><li> \
|
||||
3. Notification LED (optional).</li><li><ul>')), 'info');
|
||||
}
|
||||
|
||||
var sections = uci.sections('sms_tool_js');
|
||||
var led = sections[0].smsled;
|
||||
|
||||
if (storeL == "SM")
|
||||
document.querySelector('input[name="filter_area"][value="sim"]').checked = true;
|
||||
if (storeL == "ME")
|
||||
document.querySelector('input[name="filter_area"][value="memory"]').checked = true;
|
||||
if (ledn == "1")
|
||||
{
|
||||
switch (ledt) {
|
||||
case 'S':
|
||||
fs.exec_direct('/etc/init.d/led', [ 'restart' ]);
|
||||
break;
|
||||
case 'D':
|
||||
fs.write('/sys/class/leds/'+led+'/brightness', '0');
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
||||
L.resolveDefault(fs.exec_direct('/usr/bin/sms_tool', [ '-s' , storeL , '-d' , portR , 'status' ]))
|
||||
.then(function(res) {
|
||||
if (res) {
|
||||
var total = res.substring(res.indexOf("total"));
|
||||
var t = total.replace ( /[^\d.]/g, '' );
|
||||
|
||||
var used = res.substring(17, res.indexOf("total"));
|
||||
var u = used.replace ( /[^\d.]/g, '' );
|
||||
|
||||
L.resolveDefault(fs.exec_direct('/usr/bin/sms_tool', [ '-s' , storeL , '-d' , portR , '-f' , '%Y-%m-%d %H:%M' , '-j' , 'recv' , '2>/dev/null' ]))
|
||||
.then(function(res2) {
|
||||
if (res2) {
|
||||
|
||||
var table = document.getElementById('smsTable');
|
||||
while (table.rows.length > 1) { table.deleteRow(1); }
|
||||
|
||||
var start = res2.substring(7);
|
||||
var end = start.substring(0,start.length-2);
|
||||
|
||||
var json = JSON.parse(end);
|
||||
|
||||
var aidx = [];
|
||||
|
||||
/* Merging messages */
|
||||
if (smsM == "1") {
|
||||
|
||||
var result = [];
|
||||
|
||||
if (algo == "Advanced")
|
||||
{
|
||||
switch (direct) {
|
||||
case 'Start':
|
||||
var Data = json.sort((a, b) => {
|
||||
if (a.timestamp === b.timestamp && a.sender === b.sender) {
|
||||
return a.part - b.part;
|
||||
} else if (a.timestamp === b.timestamp) {
|
||||
return a.sender - b.sender;
|
||||
} else {
|
||||
return a.timestamp.localeCompare(b.timestamp);
|
||||
}
|
||||
});
|
||||
break;
|
||||
case 'End':
|
||||
var Data = json.sort((a, b) => {
|
||||
if (a.timestamp === b.timestamp && a.sender === b.sender) {
|
||||
return b.part - a.part;
|
||||
} else if (a.timestamp === b.timestamp) {
|
||||
return a.sender - b.sender;
|
||||
} else {
|
||||
return a.timestamp.localeCompare(b.timestamp);
|
||||
}
|
||||
});
|
||||
break;
|
||||
default:
|
||||
}
|
||||
|
||||
var SortedSMS = Data.sort((function (a, b) { return new Date(b.timestamp) - new Date(a.timestamp) }));
|
||||
var combinedjson = {};
|
||||
|
||||
for (const parts of SortedSMS) {
|
||||
const { sender, timestamp, total, content, index } = parts;
|
||||
|
||||
if (total) {
|
||||
const key = `${sender}-${timestamp}-${total}`;
|
||||
if (combinedjson[key]) {
|
||||
combinedjson[key].content += content;
|
||||
combinedjson[key].index += '-' + index;
|
||||
} else {
|
||||
combinedjson[key] = { sender, timestamp, total, content, index };
|
||||
}
|
||||
} else {
|
||||
const newkey = `${sender}-${timestamp}-${index}`;
|
||||
combinedjson[newkey] = { sender, timestamp, total, content, index };
|
||||
}
|
||||
}
|
||||
var result = Object.values(combinedjson); }
|
||||
|
||||
if (algo == "Simple")
|
||||
{
|
||||
var SortedSMS = json.sort((function (a, b) { return new Date(b.timestamp) - new Date(a.timestamp) }));
|
||||
|
||||
SortedSMS.forEach(function (o) {
|
||||
if (!this[o.sender]) {
|
||||
this[o.sender] = { index: o.index, sender: o.sender, timestamp: o.timestamp, part: o.part, total: o.total, content: o.content };
|
||||
result.push(this[o.sender]);
|
||||
return;
|
||||
}
|
||||
if (this[o.sender].total == o.total && this[o.sender].timestamp == o.timestamp && this[o.sender].sender == o.sender && this[o.sender].part > 0) {
|
||||
this[o.sender].index += '-' + o.index;
|
||||
this[o.sender].content += o.content;}
|
||||
else {
|
||||
this[o.sender] = { index: o.index, sender: o.sender, timestamp: o.timestamp, part: o.part, total: o.total, content: o.content };
|
||||
result.push(this[o.sender]);
|
||||
return;
|
||||
}
|
||||
}, Object.create(null));
|
||||
}
|
||||
if (u){
|
||||
var Lres = L.resource('icons/newdelsms.png');
|
||||
var iconz = String.format('<img style="width: 24px; height: 24px; "src="%s"/>', Lres);
|
||||
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
var row = table.insertRow(-1);
|
||||
var cell1 = row.insertCell(0);
|
||||
var cell2 = row.insertCell(0);
|
||||
var cell3 = row.insertCell(0);
|
||||
var cell4 = row.insertCell(0);
|
||||
cell4.innerHTML = "<input type='checkbox' name='smsn' id="+result[i].index+","+" />"+iconz;
|
||||
if (result[i].sender.includes(hide)) {
|
||||
var removeLast5 = result[i].sender.slice(0, -5);
|
||||
cell3.innerHTML = removeLast5 + '#####';
|
||||
} else {
|
||||
cell3.innerHTML = result[i].sender;
|
||||
}
|
||||
|
||||
cell2.innerHTML = result[i].timestamp;
|
||||
cell1.innerHTML = result[i].content.replace(/\s+/g, ' ').trim();
|
||||
aidx.push(result[i].index+'-');
|
||||
}
|
||||
|
||||
var axx = aidx.toString();
|
||||
axx = axx.replace(/,/g, ' ');
|
||||
axx = axx.replace(/-/g, ' ');
|
||||
|
||||
uci.set('sms_tool_js', '@sms_tool_js[0]', 'sms_count_index', L.toArray(axx).join(' '));
|
||||
uci.set('sms_tool_js', '@sms_tool_js[0]', 'sms_count', L.toArray(u).join(' '));
|
||||
uci.save();
|
||||
uci.apply();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/* No merging messages */
|
||||
if (smsM == "0") {
|
||||
|
||||
/* Sorting messages by delivery time */
|
||||
var sortbyTime = json.sort((function (a, b) { return new Date(b.timestamp) - new Date(a.timestamp) }));
|
||||
|
||||
/* Sorting messages by parts */
|
||||
var sortedData = sortbyTime.sort((a, b) => {
|
||||
if (a.timestamp === b.timestamp && a.sender === b.sender && a.total === b.total) {
|
||||
return a.part - b.part;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
});
|
||||
|
||||
if (u){
|
||||
|
||||
var Lres = L.resource('icons/newdelsms.png');
|
||||
var iconz = String.format('<img style="width: 24px; height: 24px; "src="%s"/>', Lres);
|
||||
|
||||
for (var i = 0; i < sortedData.length; i++) {
|
||||
var row = table.insertRow(-1);
|
||||
var cell1 = row.insertCell(0);
|
||||
var cell2 = row.insertCell(0);
|
||||
var cell3 = row.insertCell(0);
|
||||
var cell4 = row.insertCell(0);
|
||||
cell4.innerHTML = "<input type='checkbox' name='smsn' id="+sortedData[i].index+","+" />"+iconz;
|
||||
if (sortedData[i].sender.includes(hide)) {
|
||||
var removeLast5 = sortedData[i].sender.slice(0, -5);
|
||||
cell3.innerHTML = removeLast5 + '#####';
|
||||
} else {
|
||||
cell3.innerHTML = sortedData[i].sender;
|
||||
}
|
||||
cell2.innerHTML = sortedData[i].timestamp;
|
||||
cell1.innerHTML = sortedData[i].content.replace(/\s+/g, ' ').trim();
|
||||
aidx.push(sortedData[i].index+'-');
|
||||
|
||||
}
|
||||
|
||||
var axx = aidx.toString();
|
||||
axx = axx.replace(/,/g, ' ');
|
||||
axx = axx.replace(/-/g, ' ');
|
||||
|
||||
uci.set('sms_tool_js', '@sms_tool_js[0]', 'sms_count_index', L.toArray(axx).join(' '));
|
||||
uci.set('sms_tool_js', '@sms_tool_js[0]', 'sms_count', L.toArray(u).join(' '));
|
||||
uci.save();
|
||||
uci.apply();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
} else {
|
||||
if ( t.lenght < 1 )
|
||||
{
|
||||
msg_bar(Math.floor(u), t);
|
||||
}
|
||||
ui.addNotification(null, E('p', _('Please set the port for communication with the modem')), 'info');
|
||||
}
|
||||
|
||||
if (document.getElementById('msg')) {
|
||||
msg_bar(Math.floor(u), t);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var v = E([], [
|
||||
E('h2', _('SMS Messages')),
|
||||
E('div', { 'class': 'cbi-map-descr' }, _('User interface for reading messages using sms-tool. More information about the sms-tool on the %seko.one.pl forum%s.').format('<a href="https://eko.one.pl/?p=openwrt-sms_tool" target="_blank">', '</a>')),
|
||||
|
||||
E('h3', _('Received Messages')),
|
||||
E('table', { 'class': 'table' }, [
|
||||
E('tr', { 'class': 'tr' }, [
|
||||
E('td', { 'class': 'td left', 'width': '33%' }, [ _('Message storage area') ]),
|
||||
E('td', { 'class': 'td' }, [
|
||||
E('div', [
|
||||
E('label', {
|
||||
'data-tooltip': _('Any change in the area from which SMS messages will be read requires refreshing the messages')
|
||||
}, [
|
||||
E('input', {
|
||||
'type': 'radio',
|
||||
'name': 'filter_area',
|
||||
'value': 'sim',
|
||||
'change': ui.createHandlerFn(this, 'handleSWarea'),
|
||||
'checked': true
|
||||
}),
|
||||
' ',
|
||||
_('SIM card')
|
||||
]),
|
||||
' \u00a0 ',
|
||||
E('label', {
|
||||
'data-tooltip': _('Any change in the area from which SMS messages will be read requires refreshing the messages')
|
||||
}, [
|
||||
E('input', {
|
||||
'type': 'radio',
|
||||
'name': 'filter_area',
|
||||
'value': 'memory',
|
||||
'change': ui.createHandlerFn(this, 'handleSWarea')
|
||||
}),
|
||||
' ',
|
||||
_('Modem memory')
|
||||
])
|
||||
])
|
||||
])
|
||||
]),
|
||||
E('tr', { 'class': 'tr' }, [
|
||||
E('td', { 'class': 'td left', 'width': '33%' }, [ _('Storage used / Total capacity') ]),
|
||||
E('td', { 'class': 'td' }, [
|
||||
E('div', { 'class': 'right' }, [
|
||||
E('div', {
|
||||
'id': 'msg',
|
||||
'class': 'cbi-progressbar',
|
||||
'title': '-'
|
||||
}, E('div')),
|
||||
E('div', { 'class': 'right' }, [
|
||||
E('div', {
|
||||
'style': 'text-align:center;font-size:90%',
|
||||
'id': 'deleteinfo'
|
||||
}, [ '' ]),
|
||||
]),
|
||||
]),
|
||||
]),
|
||||
]),
|
||||
]),
|
||||
|
||||
E('div', { 'class': 'right' }, [
|
||||
E('button', {
|
||||
//'class': 'cbi-button cbi-button-negative important',
|
||||
'class': 'cbi-button cbi-button-remove',
|
||||
'id': 'execute',
|
||||
'click': ui.createHandlerFn(this, 'handleDelete')
|
||||
}, [ _('Delete message(s)') ]),
|
||||
'\xa0\xa0\xa0',
|
||||
E('button', {
|
||||
'class': 'cbi-button cbi-button-add',
|
||||
'id': 'clr',
|
||||
'click': ui.createHandlerFn(this, 'handleRefresh')
|
||||
}, [ _('Refresh messages') ]),
|
||||
|
||||
]),
|
||||
|
||||
E('p'),
|
||||
|
||||
E('table', { 'class': 'table' , 'id' : 'smsTable' }, [
|
||||
E('tr', { 'class': 'tr table-titles' }, [
|
||||
E('th', { 'class': 'th checker' },
|
||||
E('input', {
|
||||
'id': 'ch-all',
|
||||
'type': 'checkbox',
|
||||
'name': 'checkall',
|
||||
'disabled': null,
|
||||
'checked': null,
|
||||
'click': ui.createHandlerFn(this, 'handleSelect')
|
||||
}), '',
|
||||
),
|
||||
E('th', { 'class': 'th from' }, _('From')),
|
||||
E('th', { 'class': 'th received' }, _('Received')),
|
||||
E('th', { 'class': 'th center message' }, _('Message'))
|
||||
])
|
||||
]),
|
||||
]);
|
||||
return v;
|
||||
},
|
||||
|
||||
handleSaveApply: null,
|
||||
handleSave: null,
|
||||
handleReset: null
|
||||
});
|
||||
@@ -0,0 +1,187 @@
|
||||
'use strict';
|
||||
'require dom';
|
||||
'require form';
|
||||
'require fs';
|
||||
'require ui';
|
||||
'require uci';
|
||||
'require view';
|
||||
|
||||
/*
|
||||
Copyright 2022-2025 Rafał Wabik - IceG - From eko.one.pl forum
|
||||
|
||||
Licensed to the GNU General Public License v3.0.
|
||||
*/
|
||||
|
||||
return view.extend({
|
||||
handleCommand: function(exec, args) {
|
||||
let buttons = document.querySelectorAll('.cbi-button');
|
||||
|
||||
for (let i = 0; i < buttons.length; i++)
|
||||
buttons[i].setAttribute('disabled', 'true');
|
||||
|
||||
return fs.exec(exec, args).then(function(res) {
|
||||
let out = document.querySelector('.atcommand-output');
|
||||
out.style.display = '';
|
||||
|
||||
res.stdout = res.stdout?.replace(/^(?=\n)$|^\s*|\s*$|\n\n+/gm, "") || '';
|
||||
res.stderr = res.stderr?.replace(/^(?=\n)$|^\s*|\s*$|\n\n+/gm, "") || '';
|
||||
|
||||
if (res.stdout === undefined || res.stderr === undefined || res.stderr.includes('undefined') || res.stdout.includes('undefined')) {
|
||||
return;
|
||||
}
|
||||
else {
|
||||
dom.content(out, [ res.stdout || '', res.stderr || '' ]);
|
||||
}
|
||||
|
||||
}).catch(function(err) {
|
||||
if (res.stdout === undefined || res.stderr === undefined || res.stderr.includes('undefined') || res.stdout.includes('undefined')) {
|
||||
return;
|
||||
}
|
||||
else {
|
||||
ui.addNotification(null, E('p', [ err ]));
|
||||
}
|
||||
}).finally(function() {
|
||||
for (let i = 0; i < buttons.length; i++)
|
||||
buttons[i].removeAttribute('disabled');
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
handleGo: function(ev) {
|
||||
let atcmd = document.getElementById('cmdvalue').value;
|
||||
let sections = uci.sections('sms_tool_js');
|
||||
let port = sections[0].atport;
|
||||
|
||||
if ( atcmd.length < 2 )
|
||||
{
|
||||
ui.addNotification(null, E('p', _('Please specify the command to send')), 'info');
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
if ( !port )
|
||||
{
|
||||
ui.addNotification(null, E('p', _('Please set the port for communication with the modem')), 'info');
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
//sms_tool -d /dev/ttyUSB1 at "ati"
|
||||
return this.handleCommand('sms_tool', [ '-d' , port , 'at' , atcmd ]);
|
||||
}
|
||||
}
|
||||
if ( !port )
|
||||
{
|
||||
ui.addNotification(null, E('p', _('Please set the port for communication with the modem')), 'info');
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
handleClear: function(ev) {
|
||||
let out = document.querySelector('.atcommand-output');
|
||||
out.style.display = 'none';
|
||||
|
||||
let ov = document.getElementById('cmdvalue');
|
||||
ov.value = '';
|
||||
|
||||
document.getElementById('cmdvalue').focus();
|
||||
},
|
||||
|
||||
handleCopy: function(ev) {
|
||||
let out = document.querySelector('.atcommand-output');
|
||||
out.style.display = 'none';
|
||||
|
||||
let ov = document.getElementById('cmdvalue');
|
||||
ov.value = '';
|
||||
let x = document.getElementById('tk').value;
|
||||
ov.value = x;
|
||||
},
|
||||
|
||||
load: function() {
|
||||
return Promise.all([
|
||||
L.resolveDefault(fs.read_direct('/etc/modem/atcmmds.user'), null),
|
||||
uci.load('sms_tool_js')
|
||||
]);
|
||||
},
|
||||
|
||||
render: function (loadResults) {
|
||||
|
||||
let info = _('User interface for sending AT commands using sms-tool. More information about the sms-tool on the %seko.one.pl forum%s.').format('<a href="https://eko.one.pl/?p=openwrt-sms_tool" target="_blank">', '</a>');
|
||||
|
||||
return E('div', { 'class': 'cbi-map', 'id': 'map' }, [
|
||||
E('h2', {}, [ _('AT Commands') ]),
|
||||
E('div', { 'class': 'cbi-map-descr'}, info),
|
||||
E('hr'),
|
||||
E('div', { 'class': 'cbi-section' }, [
|
||||
E('div', { 'class': 'cbi-section-node' }, [
|
||||
E('div', { 'class': 'cbi-value' }, [
|
||||
E('label', { 'class': 'cbi-value-title' }, [ _('User AT commands') ]),
|
||||
E('div', { 'class': 'cbi-value-field' }, [
|
||||
E('select', { 'class': 'cbi-input-select',
|
||||
'id': 'tk',
|
||||
'style': 'margin:5px 0; width:100%;',
|
||||
'change': ui.createHandlerFn(this, 'handleCopy'),
|
||||
'mousedown': ui.createHandlerFn(this, 'handleCopy')
|
||||
},
|
||||
(loadResults[0] || "").trim().split("\n").map(function(cmd) {
|
||||
let fields = cmd.split(/;/);
|
||||
let name = fields[0];
|
||||
let code = fields[1] || fields[0];
|
||||
return E('option', { 'value': code }, name );
|
||||
})
|
||||
)
|
||||
])
|
||||
]),
|
||||
E('div', { 'class': 'cbi-value' }, [
|
||||
E('label', { 'class': 'cbi-value-title' }, [ _('Command to send') ]),
|
||||
E('div', { 'class': 'cbi-value-field' }, [
|
||||
E('input', {
|
||||
'style': 'margin:5px 0; width:100%;',
|
||||
'type': 'text',
|
||||
'id': 'cmdvalue',
|
||||
'data-tooltip': _('Press [Enter] to send the command, press [Delete] to delete the command'),
|
||||
'keydown': function(ev) {
|
||||
if (ev.keyCode === 13)
|
||||
{
|
||||
let execBtn = document.getElementById('execute');
|
||||
if (execBtn) {
|
||||
execBtn.click();
|
||||
}
|
||||
}
|
||||
if (ev.keyCode === 46)
|
||||
{
|
||||
let del = document.getElementById('cmdvalue');
|
||||
if (del) {
|
||||
let ov = document.getElementById('cmdvalue');
|
||||
ov.value = '';
|
||||
document.getElementById('cmdvalue').focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
}),
|
||||
])
|
||||
]),
|
||||
])
|
||||
]),
|
||||
E('hr'),
|
||||
E('div', { 'class': 'right' }, [
|
||||
E('button', {
|
||||
'class': 'cbi-button cbi-button-remove',
|
||||
'id': 'clr',
|
||||
'click': ui.createHandlerFn(this, 'handleClear')
|
||||
}, [ _('Clear form') ]),
|
||||
'\xa0\xa0\xa0',
|
||||
E('button', {
|
||||
'class': 'cbi-button cbi-button-action important',
|
||||
'id': 'execute',
|
||||
'click': ui.createHandlerFn(this, 'handleGo')
|
||||
}, [ _('Send command') ]),
|
||||
]),
|
||||
E('p', _('Reply')),
|
||||
E('pre', { 'class': 'atcommand-output', 'style': 'display:none; border: 1px solid var(--border-color-medium); border-radius: 5px; font-family: monospace' }),
|
||||
|
||||
]);
|
||||
},
|
||||
|
||||
handleSaveApply: null,
|
||||
handleSave: null,
|
||||
handleReset: null
|
||||
})
|
||||
@@ -0,0 +1,329 @@
|
||||
'use strict';
|
||||
'require dom';
|
||||
'require form';
|
||||
'require fs';
|
||||
'require ui';
|
||||
'require uci';
|
||||
'require view';
|
||||
|
||||
/*
|
||||
Copyright 2022-2025 Rafał Wabik - IceG - From eko.one.pl forum
|
||||
|
||||
Licensed to the GNU General Public License v3.0.
|
||||
*/
|
||||
|
||||
return view.extend({
|
||||
handleCommand: function(exec, args) {
|
||||
let buttons = document.querySelectorAll('.cbi-button');
|
||||
|
||||
for (let i = 0; i < buttons.length; i++)
|
||||
buttons[i].setAttribute('disabled', 'true');
|
||||
|
||||
return fs.exec(exec, args).then(function(res) {
|
||||
let out = document.querySelector('.smscommand-output');
|
||||
out.style.display = '';
|
||||
|
||||
res.stdout = res.stdout?.replace(/^(?=\n)$|^\s*|\s*$|\n\n+/gm, "") || '';
|
||||
res.stderr = res.stderr?.replace(/^(?=\n)$|^\s*|\s*$|\n\n+/gm, "") || '';
|
||||
|
||||
let cut = res.stdout;
|
||||
cut = cut.substr(0, 20);
|
||||
if ( cut == "sms sent sucessfully" ) {
|
||||
res.stdout = _('SMS sent sucessfully');
|
||||
}
|
||||
|
||||
dom.content(out, [ res.stdout || '', res.stderr || '' ]);
|
||||
|
||||
}).catch(function(err) {
|
||||
ui.addNotification(null, E('p', [ err ]))
|
||||
}).finally(function() {
|
||||
for (let i = 0; i < buttons.length; i++)
|
||||
buttons[i].removeAttribute('disabled');
|
||||
});
|
||||
},
|
||||
|
||||
handleGo: function(ev) {
|
||||
let phn = document.getElementById('phonenumber').value;
|
||||
let sections = uci.sections('sms_tool_js');
|
||||
let port = sections[0].sendport;
|
||||
let dx = sections[0].delay * 1000;
|
||||
let get_smstxt = document.getElementById('smstext').value;
|
||||
|
||||
let elem = document.getElementById('execute');
|
||||
let vN = elem.innerText;
|
||||
|
||||
if (vN.includes(_('Send to number')) == true)
|
||||
{
|
||||
if ( phn.length < 3 )
|
||||
{
|
||||
ui.addNotification(null, E('p', _('Please enter phone number')), 'info');
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
if ( !port )
|
||||
{
|
||||
ui.addNotification(null, E('p', _('Please set the port for communication with the modem')), 'info');
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
if ( get_smstxt.length < 1 )
|
||||
{
|
||||
ui.addNotification(null, E('p', _('Please enter a message text')), 'info');
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
// sms_tool -d /dev/ttyUSB1 send 48500500500 "MSG"
|
||||
return this.handleCommand('sms_tool', [ '-d' , port , 'send' , phn , get_smstxt ]);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( !port )
|
||||
{
|
||||
ui.addNotification(null, E('p', _('Please set the port for communication with the modem')), 'info');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
if ( !port )
|
||||
{
|
||||
ui.addNotification(null, E('p', _('Please set the port for communication with the modem')), 'info');
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
if ( get_smstxt.length < 1 )
|
||||
{
|
||||
ui.addNotification(null, E('p', _('Please enter a message text')), 'info');
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
// sms_tool -d /dev/ttyUSB1 send 48500500500 "MSG"
|
||||
let xs = document.getElementById('pb');
|
||||
|
||||
let phone, i;
|
||||
res.stdout = '';
|
||||
|
||||
for (let i = 0; i < xs.length; i++) {
|
||||
(function(i) {
|
||||
setTimeout(function() {
|
||||
phone = xs.options[i].value;
|
||||
|
||||
let out = document.querySelector('.smscommand-output');
|
||||
out.style.display = '';
|
||||
|
||||
fs.exec_direct('/usr/bin/sms_tool', [ '-d' , port , 'send' , phone , get_smstxt ]);
|
||||
|
||||
res.stdout += (i+1)+_('/')+xs.length+' * '+_('[Bot] Message sent to number:') + ' ' + phone +'\n';
|
||||
res.stdout = res.stdout.replace(/undefined/g, "");
|
||||
|
||||
dom.content(out, [ res.stdout || '' ]);
|
||||
|
||||
}, dx * i);
|
||||
})(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
handleClear: function(ev) {
|
||||
let out = document.querySelector('.smscommand-output');
|
||||
out.style.display = '';
|
||||
out.style.display = 'none';
|
||||
|
||||
let ovc = document.getElementById('phonenumber');
|
||||
let ov2 = document.getElementById('smstext');
|
||||
ov2.value = '';
|
||||
|
||||
document.getElementById('counter').innerHTML = '160';
|
||||
|
||||
let prefixnum, sections = uci.sections('sms_tool_js');
|
||||
let addprefix = sections[0].prefix;
|
||||
if ( addprefix == '1' )
|
||||
{
|
||||
prefixnum = sections[0].pnumber;
|
||||
ovc.value = prefixnum;
|
||||
}
|
||||
else {
|
||||
ovc.value = '';
|
||||
}
|
||||
|
||||
document.getElementById('phonenumber').focus();
|
||||
},
|
||||
|
||||
handleCopy: function(ev) {
|
||||
let out = document.querySelector('.smscommand-output');
|
||||
out.style.display = 'none';
|
||||
|
||||
let ov = document.getElementById('phonenumber');
|
||||
ov.value = '';
|
||||
let x = document.getElementById('pb').value;
|
||||
ov.value = x;
|
||||
},
|
||||
|
||||
load: function() {
|
||||
return Promise.all([
|
||||
L.resolveDefault(fs.read_direct('/etc/modem/phonebook.user'), null),
|
||||
uci.load('sms_tool_js')
|
||||
]);
|
||||
},
|
||||
|
||||
render: function (loadResults) {
|
||||
|
||||
let group, prefixnum, sections = uci.sections('sms_tool_js');
|
||||
|
||||
if ( sections[0].sendingroup == '1' )
|
||||
{
|
||||
group = 1;
|
||||
}
|
||||
else {
|
||||
group = '';
|
||||
}
|
||||
|
||||
if ( sections[0].prefix == '1' ) {
|
||||
prefixnum = sections[0].pnumber;
|
||||
}
|
||||
if ( sections[0].information == '1' ) {
|
||||
ui.addNotification(null, E('p', _('The phone number should be preceded by the country prefix (for Poland it is 48, without +). If the number is 5, 4 or 3 characters, it is treated as.. short and should not be preceded by a country prefix.') ), 'info');
|
||||
}
|
||||
|
||||
let info = _('User interface for sending messages using sms-tool. More information about the sms-tool on the %seko.one.pl forum%s.').format('<a href="https://eko.one.pl/?p=openwrt-sms_tool" target="_blank">', '</a>');
|
||||
|
||||
return E('div', { 'class': 'cbi-map', 'id': 'map' }, [
|
||||
E('h2', {}, [ _('SMS Messages') ]),
|
||||
E('div', { 'class': 'cbi-map-descr'}, info),
|
||||
E('hr'),
|
||||
E('div', { 'class': 'cbi-section' }, [
|
||||
E('div', { 'class': 'cbi-section-node' }, [
|
||||
E('div', { 'class': 'cbi-value' }, [
|
||||
E('label', { 'class': 'cbi-value-title' }, [ _('User contacts') ]),
|
||||
E('div', { 'class': 'cbi-value-field' }, [
|
||||
E('select', { 'class': 'cbi-input-select',
|
||||
'id': 'pb',
|
||||
'style': 'margin:5px 0; width:100%;',
|
||||
'change': ui.createHandlerFn(this, 'handleCopy'),
|
||||
'mousedown': ui.createHandlerFn(this, 'handleCopy')
|
||||
},
|
||||
(loadResults[0] || "").trim().split("\n").map(function(cmd) {
|
||||
let fields = cmd.split(/;/);
|
||||
let name = fields[0];
|
||||
let code = fields[1] || fields[0];
|
||||
return E('option', { 'value': code }, name );
|
||||
})
|
||||
)
|
||||
])
|
||||
]),
|
||||
E('div', { 'class': 'cbi-value' }, [
|
||||
E('label', { 'class': 'cbi-value-title' }, [ _('Send to') ]),
|
||||
E('div', { 'class': 'cbi-value-field' }, [
|
||||
E('input', {
|
||||
'style': 'margin:5px 0; width:100%;',
|
||||
'type': 'text',
|
||||
'id': 'phonenumber',
|
||||
'value': prefixnum,
|
||||
'oninput': "this.value = this.value.replace(/[^0-9.]/g, '');",
|
||||
'data-tooltip': _('Press [Delete] to delete the phone number'),
|
||||
'keydown': function(ev) {
|
||||
if (ev.keyCode === 46)
|
||||
{
|
||||
let del = document.getElementById('phonenumber');
|
||||
if (del) {
|
||||
let ovc = document.getElementById('phonenumber');
|
||||
let prefixnum, sections = uci.sections('sms_tool_js');
|
||||
let addprefix = sections[0].prefix;
|
||||
if ( addprefix == '1' )
|
||||
{
|
||||
prefixnum = sections[0].pnumber;
|
||||
ovc.value = prefixnum;
|
||||
}
|
||||
else {
|
||||
ovc.value = '';
|
||||
}
|
||||
document.getElementById('phonenumber').focus();
|
||||
}
|
||||
}
|
||||
},
|
||||
}),
|
||||
])
|
||||
]),
|
||||
E('div', { 'class': 'cbi-value' }, [
|
||||
E('label', { 'class': 'cbi-value-title' }, [ _('Message text') ]),
|
||||
E('div', { 'class': 'cbi-value-field' }, [
|
||||
E('textarea', {
|
||||
'id': 'smstext',
|
||||
'style': 'width: 100%; resize: vertical; height:80px; max-height:80px; min-height:80px; min-width:100%;',
|
||||
'wrap': 'on',
|
||||
'rows': '3',
|
||||
'placeholder': _(''),
|
||||
'maxlength': '160',
|
||||
'data-tooltip': _('Press [Delete] to delete the content of the message'),
|
||||
'keydown': function(ev) {
|
||||
if (ev.keyCode === 46)
|
||||
{
|
||||
let del = document.getElementById('smstext');
|
||||
if (del) {
|
||||
let ovtxt = document.getElementById('smstext');
|
||||
ovtxt.value = '';
|
||||
document.getElementById('smstext').focus();
|
||||
}
|
||||
}
|
||||
},
|
||||
'keyup': function(ev) {
|
||||
document.getElementById('counter').innerHTML = (160 - document.getElementById('smstext').value.length);
|
||||
|
||||
this.value = this.value.replace(/ą/g, 'a').replace(/Ą/g, 'A');
|
||||
this.value = this.value.replace(/ć/g, 'c').replace(/Ć/g, 'C');
|
||||
this.value = this.value.replace(/ę/g, 'e').replace(/Ę/g, 'E');
|
||||
this.value = this.value.replace(/ł/g, 'l').replace(/Ł/g, 'L');
|
||||
this.value = this.value.replace(/ń/g, 'n').replace(/Ń/g, 'N');
|
||||
this.value = this.value.replace(/ó/g, 'o').replace(/Ó/g, 'O');
|
||||
this.value = this.value.replace(/ś/g, 's').replace(/Ś/g, 'S');
|
||||
this.value = this.value.replace(/ż/g, 'z').replace(/Ż/g, 'Z');
|
||||
this.value = this.value.replace(/ź/g, 'z').replace(/Ź/g, 'Z');
|
||||
}
|
||||
}),
|
||||
E('div', { 'class': 'left' }, [
|
||||
E('br'),
|
||||
E('label', { 'id': 'counter' }, [ _('160') ])
|
||||
])
|
||||
]),
|
||||
]),
|
||||
|
||||
])
|
||||
]),
|
||||
E('hr'),
|
||||
E('div', { 'class': 'right' }, [
|
||||
E('button', {
|
||||
'class': 'cbi-button cbi-button-remove',
|
||||
'id': 'clr',
|
||||
'click': ui.createHandlerFn(this, 'handleClear')
|
||||
}, [ _('Clear form') ]),
|
||||
'\xa0\xa0\xa0',
|
||||
E('span', { 'class': 'diag-action' }, [
|
||||
group ? new ui.ComboButton('send', {
|
||||
'send': '%s %s'.format(_('Send'), _('to number')),
|
||||
'sendg': '%s %s'.format(_('Send'), _('to group')),
|
||||
}, {
|
||||
'click': ui.createHandlerFn(this, 'handleGo'),
|
||||
'id': 'execute',
|
||||
'classes': {
|
||||
'send': 'cbi-button cbi-button-action important',
|
||||
'sendg': 'cbi-button cbi-button-action important',
|
||||
},
|
||||
'id': 'execute',
|
||||
}).render() : E('button', {
|
||||
'class': 'cbi-button cbi-button-action important',
|
||||
'id': 'execute',
|
||||
'click': ui.createHandlerFn(this, 'handleGo')
|
||||
}, [ _('Send to number') ]),
|
||||
]),
|
||||
]),
|
||||
E('p', _('Status')),
|
||||
E('pre', { 'class': 'smscommand-output', 'id': 'ans', 'style': 'display:none; border: 1px solid var(--border-color-medium); border-radius: 5px; font-family: monospace' }),
|
||||
]);
|
||||
},
|
||||
|
||||
handleSaveApply: null,
|
||||
handleSave: null,
|
||||
handleReset: null
|
||||
})
|
||||
@@ -0,0 +1,385 @@
|
||||
'use strict';
|
||||
'require dom';
|
||||
'require form';
|
||||
'require fs';
|
||||
'require ui';
|
||||
'require uci';
|
||||
'require view';
|
||||
|
||||
/*
|
||||
Copyright 2022-2025 Rafał Wabik - IceG - From eko.one.pl forum
|
||||
|
||||
Licensed to the GNU General Public License v3.0.
|
||||
*/
|
||||
|
||||
return view.extend({
|
||||
handleCommand: function(exec, args) {
|
||||
let buttons = document.querySelectorAll('.cbi-button');
|
||||
|
||||
for (let i = 0; i < buttons.length; i++)
|
||||
buttons[i].setAttribute('disabled', 'true');
|
||||
|
||||
return fs.exec(exec, args).then(function(res) {
|
||||
let out = document.querySelector('.ussdcommand-output');
|
||||
let fullhistory = document.getElementById('history-full')?.checked;
|
||||
let reversereplies = document.getElementById('reverse-replies')?.checked;
|
||||
out.style.display = '';
|
||||
|
||||
res.stdout = res.stdout?.replace(/^(?=\n)$|^\s*|\s*$|\n\n+/gm, "") || '';
|
||||
res.stderr = res.stderr?.replace(/^(?=\n)$|^\s*|\s*$|\n\n+/gm, "") || '';
|
||||
|
||||
if (res.stdout === undefined || res.stderr === undefined || res.stderr.includes('undefined') || res.stdout.includes('undefined')) {
|
||||
return;
|
||||
} else {
|
||||
let cut = res.stderr;
|
||||
if ( cut.length > 2 ) {
|
||||
if (cut.includes('error: 0'))
|
||||
res.stdout = _('Phone/Modem failure.');
|
||||
if (cut.includes('error: 1'))
|
||||
res.stdout = _('No connection to phone.');
|
||||
if (cut.includes('error: 2'))
|
||||
res.stdout = _('Phone/Modem adapter link reserved.');
|
||||
if (cut.includes('error: 3'))
|
||||
res.stdout = _('Operation not allowed.');
|
||||
if (cut.includes('error: 4'))
|
||||
res.stdout = _('Operation not supported.');
|
||||
if (cut.includes('error: 5'))
|
||||
res.stdout = _('PH_SIM PIN required.');
|
||||
if (cut.includes('error: 6'))
|
||||
res.stdout = _('PH_FSIM PIN required.');
|
||||
if (cut.includes('error: 7'))
|
||||
res.stdout = _('PH_FSIM PUK required.');
|
||||
if (cut.includes('error: 10'))
|
||||
res.stdout = _('SIM not inserted.');
|
||||
if (cut.includes('error: 11'))
|
||||
res.stdout = _('SIM PIN required.');
|
||||
if (cut.includes('error: 12'))
|
||||
res.stdout = _('SIM PUK required.');
|
||||
if (cut.includes('error: 13'))
|
||||
res.stdout = _('SIM failure.');
|
||||
if (cut.includes('error: 14'))
|
||||
res.stdout = _('SIM busy.');
|
||||
if (cut.includes('error: 15'))
|
||||
res.stdout = _('SIM wrong.');
|
||||
if (cut.includes('error: 16'))
|
||||
res.stdout = _('Incorrect password.');
|
||||
if (cut.includes('error: 17'))
|
||||
res.stdout = _('SIM PIN2 required.');
|
||||
if (cut.includes('error: 18'))
|
||||
res.stdout = _('SIM PUK2 required.');
|
||||
if (cut.includes('error: 20'))
|
||||
res.stdout = _('Memory full.');
|
||||
if (cut.includes('error: 21'))
|
||||
res.stdout = _('Invalid index.');
|
||||
if (cut.includes('error: 22'))
|
||||
res.stdout = _('Not found.');
|
||||
if (cut.includes('error: 23'))
|
||||
res.stdout = _('Memory failure.');
|
||||
if (cut.includes('error: 24'))
|
||||
res.stdout = _('Text string too long.');
|
||||
if (cut.includes('error: 25'))
|
||||
res.stdout = _('Invalid characters in text string.');
|
||||
if (cut.includes('error: 26'))
|
||||
res.stdout = _('Dial string too long.');
|
||||
if (cut.includes('error: 27'))
|
||||
res.stdout = _('Invalid characters in dial string.');
|
||||
if (cut.includes('error: 30'))
|
||||
res.stdout = _('No network service.');
|
||||
if (cut.includes('error: 31'))
|
||||
res.stdout = _('Network timeout.');
|
||||
if (cut.includes('error: 32'))
|
||||
res.stdout = _('Network not allowed, emergency calls only.');
|
||||
if (cut.includes('error: 40'))
|
||||
res.stdout = _('Network personalization PIN required.');
|
||||
if (cut.includes('error: 41'))
|
||||
res.stdout = _('Network personalization PUK required.');
|
||||
if (cut.includes('error: 42'))
|
||||
res.stdout = _('Network subset personalization PIN required.');
|
||||
if (cut.includes('error: 43'))
|
||||
res.stdout = _('Network subset personalization PUK required.');
|
||||
if (cut.includes('error: 44'))
|
||||
res.stdout = _('Service provider personalization PIN required.');
|
||||
if (cut.includes('error: 45'))
|
||||
res.stdout = _('Service provider personalization PUK required.');
|
||||
if (cut.includes('error: 46'))
|
||||
res.stdout = _('Corporate personalization PIN required.');
|
||||
if (cut.includes('error: 47'))
|
||||
res.stdout = _('Corporate personalization PUK required.');
|
||||
if (cut.includes('error: 48'))
|
||||
res.stdout = _('PH-SIM PUK required.');
|
||||
if (cut.includes('error: 100'))
|
||||
res.stdout = _('Unknown error.');
|
||||
if (cut.includes('error: 103'))
|
||||
res.stdout = _('Illegal MS.');
|
||||
if (cut.includes('error: 106'))
|
||||
res.stdout = _('Illegal ME.');
|
||||
if (cut.includes('error: 107'))
|
||||
res.stdout = _('GPRS services not allowed.');
|
||||
if (cut.includes('error: 111'))
|
||||
res.stdout = _('PLMN not allowed.');
|
||||
if (cut.includes('error: 112'))
|
||||
res.stdout = _('Location area not allowed.');
|
||||
if (cut.includes('error: 113'))
|
||||
res.stdout = _('Roaming not allowed in this location area.');
|
||||
if (cut.includes('error: 126'))
|
||||
res.stdout = _('Operation temporary not allowed.');
|
||||
if (cut.includes('error: 132'))
|
||||
res.stdout = _('Service operation not supported.');
|
||||
if (cut.includes('error: 133'))
|
||||
res.stdout = _('Requested service option not subscribed.');
|
||||
if (cut.includes('error: 134'))
|
||||
res.stdout = _('Service option temporary out of order.');
|
||||
if (cut.includes('error: 148'))
|
||||
res.stdout = _('Unspecified GPRS error.');
|
||||
if (cut.includes('error: 149'))
|
||||
res.stdout = _('PDP authentication failure.');
|
||||
if (cut.includes('error: 150'))
|
||||
res.stdout = _('Invalid mobile class.');
|
||||
if (cut.includes('error: 256'))
|
||||
res.stdout = _('Operation temporarily not allowed.');
|
||||
if (cut.includes('error: 257'))
|
||||
res.stdout = _('Call barred.');
|
||||
if (cut.includes('error: 258'))
|
||||
res.stdout = _('Phone/Modem is busy.');
|
||||
if (cut.includes('error: 259'))
|
||||
res.stdout = _('User abort.');
|
||||
if (cut.includes('error: 260'))
|
||||
res.stdout = _('Invalid dial string.');
|
||||
if (cut.includes('error: 261'))
|
||||
res.stdout = _('SS not executed.');
|
||||
if (cut.includes('error: 262'))
|
||||
res.stdout = _('SIM Blocked.');
|
||||
if (cut.includes('error: 263'))
|
||||
res.stdout = _('Invalid block.');
|
||||
if (cut.includes('error: 527'))
|
||||
res.stdout = _('Please wait, and retry your selection later (Specific Modem Sierra).');
|
||||
if (cut.includes('error: 528'))
|
||||
res.stdout = _('Location update failure – emergency calls only (Specific Modem Sierra).');
|
||||
if (cut.includes('error: 529'))
|
||||
res.stdout = _('Selection failure – emergency calls only (Specific Modem Sierra).');
|
||||
if (cut.includes('error: 772'))
|
||||
res.stdout = _('SIM powered down.');
|
||||
dom.content(out, [ res.stderr || '', res.stdout ? ' > ' + res.stdout : '' ]);
|
||||
} else {
|
||||
if ( fullhistory ) {
|
||||
const ussdreply = (res.stdout + res.stderr).replace(/^\s*\n+/g, '');
|
||||
let ussdv = document.getElementById('cmdvalue');
|
||||
ussdv.value = '';
|
||||
document.getElementById('cmdvalue').focus();
|
||||
if (reversereplies) {
|
||||
out.innerText = ussdreply + (out.innerText.trim() ? '\n\n' + out.innerText : '');
|
||||
} else {
|
||||
out.innerText += '\n\n' + res.stdout + res.stderr;
|
||||
out.innerText = out.innerText.replace(/^\s*\n+/g, '');
|
||||
}
|
||||
} else {
|
||||
dom.content(out, [ res.stdout || '', res.stderr || '' ]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}).catch(function(err) {
|
||||
if (res.stdout === undefined || res.stderr === undefined || res.stderr.includes('undefined') || res.stdout.includes('undefined')) {
|
||||
return;
|
||||
} else {
|
||||
ui.addNotification(null, E('p', [ err ]));
|
||||
}
|
||||
}).finally(function() {
|
||||
for (let i = 0; i < buttons.length; i++)
|
||||
buttons[i].removeAttribute('disabled');
|
||||
});
|
||||
},
|
||||
|
||||
handleGo: function(ev) {
|
||||
let ussd = document.getElementById('cmdvalue').value;
|
||||
let sections = uci.sections('sms_tool_js');
|
||||
let port = sections[0].ussdport;
|
||||
let get_ussd = sections[0].ussd;
|
||||
let get_pdu = sections[0].pdu;
|
||||
let get_coding = sections[0].coding;
|
||||
let tool_args = [];
|
||||
|
||||
if ( ussd.length < 1 ) {
|
||||
ui.addNotification(null, E('p', _('Please specify the code to send')), 'info');
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( !port ) {
|
||||
ui.addNotification(null, E('p', _('Please set the port for communication with the modem')), 'info');
|
||||
return false;
|
||||
}
|
||||
|
||||
tool_args.push('-d', port);
|
||||
if (get_ussd == '1')
|
||||
tool_args.push('-R');
|
||||
if (get_pdu == '1')
|
||||
tool_args.push('-r');
|
||||
if (get_coding && get_coding != 'auto')
|
||||
tool_args.push('-c', get_coding);
|
||||
tool_args.push('ussd', ussd);
|
||||
|
||||
return this.handleCommand('sms_tool', tool_args);
|
||||
},
|
||||
|
||||
handleClear: function(ev) {
|
||||
let out = document.querySelector('.ussdcommand-output');
|
||||
out.style.display = '';
|
||||
out.style.display = 'none';
|
||||
|
||||
let fullhistory = document.getElementById('history-full')?.checked;
|
||||
|
||||
if ( fullhistory ) {
|
||||
dom.content(out, [ '' ]);
|
||||
}
|
||||
|
||||
let ov = document.getElementById('cmdvalue');
|
||||
ov.value = '';
|
||||
|
||||
document.getElementById('cmdvalue').focus();
|
||||
},
|
||||
|
||||
handleClearOut: function(ev) {
|
||||
let out = document.querySelector('.ussdcommand-output');
|
||||
let fullhistory = document.getElementById('history-full')?.checked;
|
||||
|
||||
if ( fullhistory ) {
|
||||
out.style.display = '';
|
||||
out.style.display = 'none';
|
||||
dom.content(out, [ '' ]);
|
||||
document.getElementById("reverse-replies").disabled = false;
|
||||
document.getElementById("reverse-replies").checked = true;
|
||||
} else {
|
||||
document.getElementById("reverse-replies").disabled = true;
|
||||
document.getElementById("reverse-replies").checked = false;
|
||||
}
|
||||
},
|
||||
|
||||
handleCopy: function(ev) {
|
||||
let out = document.querySelector('.ussdcommand-output');
|
||||
let fullhistory = document.getElementById('history-full')?.checked;
|
||||
|
||||
if ( !fullhistory ) {
|
||||
out.style.display = 'none';
|
||||
}
|
||||
|
||||
let ov = document.getElementById('cmdvalue');
|
||||
ov.value = '';
|
||||
let x = document.getElementById('tk').value;
|
||||
ov.value = x;
|
||||
},
|
||||
|
||||
load: function() {
|
||||
|
||||
return Promise.all([
|
||||
L.resolveDefault(fs.read_direct('/etc/modem/ussdcodes.user'), null),
|
||||
uci.load('sms_tool_js')
|
||||
]);
|
||||
},
|
||||
|
||||
render: function (loadResults) {
|
||||
|
||||
let info = _('User interface for sending USSD codes using sms-tool. More information about the sms-tool on the %seko.one.pl forum%s.').format('<a href="https://eko.one.pl/?p=openwrt-sms_tool" target="_blank">', '</a>');
|
||||
|
||||
return E('div', { 'class': 'cbi-map', 'id': 'map' }, [
|
||||
E('h2', {}, [ _('USSD Codes') ]),
|
||||
E('div', { 'class': 'cbi-map-descr'}, info),
|
||||
E('hr'),
|
||||
E('div', { 'class': 'cbi-section' }, [
|
||||
E('div', { 'class': 'cbi-section-node' }, [
|
||||
E('div', { 'class': 'cbi-value' }, [
|
||||
E('label', { 'class': 'cbi-value-title' }, [ _('User USSD codes') ]),
|
||||
E('div', { 'class': 'cbi-value-field' }, [
|
||||
E('select', { 'class': 'cbi-input-select',
|
||||
'id': 'tk',
|
||||
'style': 'margin:5px 0; width:100%;',
|
||||
'change': ui.createHandlerFn(this, 'handleCopy'),
|
||||
'mousedown': ui.createHandlerFn(this, 'handleCopy')
|
||||
},
|
||||
(loadResults[0] || "").trim().split("\n").map(function(cmd) {
|
||||
let fields = cmd.split(/;/);
|
||||
let name = fields[0];
|
||||
let code = fields[1] || fields[0];
|
||||
return E('option', { 'value': code }, name );
|
||||
})
|
||||
)
|
||||
])
|
||||
]),
|
||||
E('div', { 'class': 'cbi-value' }, [
|
||||
E('label', { 'class': 'cbi-value-title' }, [ _('Code to send') ]),
|
||||
E('div', { 'class': 'cbi-value-field' }, [
|
||||
E('input', {
|
||||
'style': 'margin:5px 0; width:100%;',
|
||||
'type': 'text',
|
||||
'id': 'cmdvalue',
|
||||
'data-tooltip': _('Press [Enter] to send the code, press [Delete] to delete the code'),
|
||||
'keydown': function(ev) {
|
||||
if (ev.keyCode === 13) {
|
||||
let execBtn = document.getElementById('execute');
|
||||
if (execBtn) {
|
||||
execBtn.click();
|
||||
}
|
||||
}
|
||||
if (ev.keyCode === 46) {
|
||||
let del = document.getElementById('cmdvalue');
|
||||
if (del) {
|
||||
let ov = document.getElementById('cmdvalue');
|
||||
ov.value = '';
|
||||
document.getElementById('cmdvalue').focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
}),
|
||||
])
|
||||
]),
|
||||
|
||||
])
|
||||
]),
|
||||
E('div', { 'class': 'right' }, [
|
||||
E('label', { 'class': 'cbi-checkbox' }, [
|
||||
E('input', {
|
||||
'id': 'history-full',
|
||||
'click': ui.createHandlerFn(this, 'handleClearOut'),
|
||||
'data-tooltip': _('Check this option if you need to use the menu built on USSD codes'),
|
||||
'type': 'checkbox',
|
||||
'name': 'showhistory',
|
||||
'disabled': null
|
||||
}), ' ',
|
||||
E('label', { 'for': 'history-full' }), ' ',
|
||||
_('Keep the previous reply when sending a new USSD code.')
|
||||
]),
|
||||
'\xa0\xa0\xa0',
|
||||
E('label', { 'class': 'cbi-checkbox' }, [
|
||||
E('input', {
|
||||
'id': 'reverse-replies',
|
||||
'data-tooltip': _('View new reply from top'),
|
||||
'type': 'checkbox',
|
||||
'name': 'reversereplies',
|
||||
'disabled': true
|
||||
}), ' ',
|
||||
E('label', { 'for': 'reverse-replies' }), ' ',
|
||||
_('Turn over the replies.')
|
||||
])
|
||||
]),
|
||||
E('hr'),
|
||||
E('div', { 'class': 'right' }, [
|
||||
E('button', {
|
||||
'class': 'cbi-button cbi-button-remove',
|
||||
'id': 'clr',
|
||||
'click': ui.createHandlerFn(this, 'handleClear')
|
||||
}, [ _('Clear form') ]),
|
||||
'\xa0\xa0\xa0',
|
||||
E('button', {
|
||||
'class': 'cbi-button cbi-button-action important',
|
||||
'id': 'execute',
|
||||
'click': ui.createHandlerFn(this, 'handleGo')
|
||||
}, [ _('Send code') ]),
|
||||
]),
|
||||
E('p', _('Reply')),
|
||||
E('pre', { 'class': 'ussdcommand-output', 'style': 'display:none; border: 1px solid var(--border-color-medium); border-radius: 5px; font-family: monospace' }),
|
||||
|
||||
]);
|
||||
},
|
||||
|
||||
handleSaveApply: null,
|
||||
handleSave: null,
|
||||
handleReset: null
|
||||
})
|
||||
@@ -0,0 +1,369 @@
|
||||
'use strict';
|
||||
'require form';
|
||||
'require fs';
|
||||
'require view';
|
||||
'require uci';
|
||||
'require ui';
|
||||
'require tools.widgets as widgets'
|
||||
|
||||
/*
|
||||
Copyright 2022-2025 Rafał Wabik - IceG - From eko.one.pl forum
|
||||
|
||||
Licensed to the GNU General Public License v3.0.
|
||||
*/
|
||||
|
||||
return view.extend({
|
||||
load: function() {
|
||||
return fs.list('/dev').then(function(devs) {
|
||||
return devs.filter(function(dev) {
|
||||
return dev.name.match(/^ttyUSB/) || dev.name.match(/^cdc-wdm/) || dev.name.match(/^ttyACM/) || dev.name.match(/^mhi_/) || dev.name.match(/^wwan/);
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
render: function(devs) {
|
||||
let m, s, o;
|
||||
m = new form.Map('sms_tool_js', _('Configuration sms-tool'), _('Configuration panel for sms-tool and gui application.'));
|
||||
|
||||
s = m.section(form.TypedSection, 'sms_tool_js', '', null);
|
||||
s.anonymous = true;
|
||||
|
||||
//TAB SMS
|
||||
|
||||
s.tab('smstab' , _('SMS Settings'));
|
||||
s.anonymous = true;
|
||||
|
||||
o = s.taboption('smstab' , form.Value, 'readport', _('SMS reading port'),
|
||||
_('Select one of the available ttyUSBX ports.'));
|
||||
devs.sort((a, b) => a.name > b.name);
|
||||
devs.forEach(dev => o.value('/dev/' + dev.name));
|
||||
|
||||
o.placeholder = _('Please select a port');
|
||||
o.rmempty = false;
|
||||
|
||||
o = s.taboption('smstab', form.ListValue, 'storage', _('Message storage area'),
|
||||
_('Messages are stored in a specific location (for example, on the SIM card or modem memory), but other areas may also be available depending on the type of device.'));
|
||||
o.value('SM', _('SIM card'));
|
||||
o.value('ME', _('Modem memory'));
|
||||
o.default = 'SM';
|
||||
|
||||
o = s.taboption('smstab', form.Flag, 'mergesms', _('Merge split messages'),
|
||||
_('Checking this option will make it easier to read the messages, but it will cause a discrepancy in the number of messages shown and received.')
|
||||
);
|
||||
o.rmempty = false;
|
||||
|
||||
o = s.taboption('smstab' , form.ListValue, 'algorithm', _('Merge algorithm'),
|
||||
_(''));
|
||||
o.value('Simple', _('Simple (merge without sorting)'));
|
||||
o.value('Advanced', _('Advanced (merges with sorting)'));
|
||||
o.default = 'Advanced';
|
||||
o.depends('mergesms', '1');
|
||||
|
||||
o = s.taboption('smstab' , form.ListValue, 'direction', _('Direction of message merging'),
|
||||
_(''));
|
||||
o.value('Start', _('From beginning to end'));
|
||||
o.value('End', _('From end to beginning'));
|
||||
o.default = 'Start';
|
||||
o.depends('algorithm', 'Advanced');
|
||||
|
||||
o = s.taboption('smstab', form.Value, 'bnumber', _('Phone number to be blurred'),
|
||||
_('The last 5 digits of this number will be blurred.')
|
||||
);
|
||||
o.password = true;
|
||||
|
||||
o = s.taboption('smstab', form.Button, '_fsave');
|
||||
o.title = _('Save messages to a text file');
|
||||
o.description = _('This option allows to backup SMS messages or, for example, save messages that are not supported by the sms-tool.');
|
||||
o.inputtitle = _('Save as .txt file');
|
||||
o.onclick = function() {
|
||||
return uci.load('sms_tool_js').then(function() {
|
||||
let portES = (uci.get('sms_tool_js', '@sms_tool_js[0]', 'readport'));
|
||||
L.resolveDefault(fs.exec_direct('/usr/bin/sms_tool', [ '-d' , portES , '-f' , '%Y-%m-%d %H:%M' , 'recv' , '2>/dev/null']))
|
||||
.then(function(res) {
|
||||
if (res) {
|
||||
fs.write('/tmp/mysms.txt', res.trim().replace(/\r\n/g, '\n') + '\n');
|
||||
let fileName = 'mysms.txt';
|
||||
let filePath = '/tmp/' + fileName;
|
||||
|
||||
fs.stat(filePath)
|
||||
.then(function () {
|
||||
|
||||
if (confirm(_('Save sms to txt file?'))) {
|
||||
L.resolveDefault(fs.read_direct('/tmp/mysms.txt'), null).then(function (restxt) {
|
||||
if (restxt) {
|
||||
L.ui.showModal(_('Saving...'), [
|
||||
E('p', { 'class': 'spinning' }, _('Please wait.. Process of saving SMS message to a text file is in progress.'))
|
||||
]);
|
||||
let link = E('a', {
|
||||
'download': 'mysms.txt',
|
||||
'href': URL.createObjectURL(
|
||||
new Blob([ restxt ], { type: 'text/plain' })),
|
||||
});
|
||||
window.setTimeout(function() {
|
||||
link.click();
|
||||
URL.revokeObjectURL(link.href);
|
||||
L.hideModal();
|
||||
}, 2000).finally();
|
||||
} else {
|
||||
ui.addNotification(null, E('p', {}, _('Saving SMS messages to a file failed. Please try again.')));
|
||||
}
|
||||
}).catch(() => {
|
||||
ui.addNotification(null, E('p', {}, _('Download error') + ': ' + err.message));
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
o = s.taboption('smstab', form.Button, '_fdelete');
|
||||
o.title = _('Delete all messages');
|
||||
o.description = _("This option allows you to delete all SMS messages when they are not visible in the 'Received Messages' tab.");
|
||||
o.inputtitle = _('Delete all');
|
||||
o.onclick = function() {
|
||||
if (confirm(_('Delete all the messages?'))) {
|
||||
return uci.load('sms_tool_js').then(function() {
|
||||
let portFD = (uci.get('sms_tool_js', '@sms_tool_js[0]', 'readport'));
|
||||
fs.exec_direct('/usr/bin/sms_tool', [ '-d' , portFD , 'delete' , 'all' ]);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
o = s.taboption('smstab', form.Value, 'sendport', _('SMS sending port'),
|
||||
_("Select one of the available ttyUSBX ports."));
|
||||
devs.sort((a, b) => a.name > b.name);
|
||||
devs.forEach(dev => o.value('/dev/' + dev.name));
|
||||
|
||||
o.placeholder = _('Please select a port');
|
||||
o.rmempty = false;
|
||||
|
||||
o = s.taboption('smstab', form.Value, 'pnumber', _('Prefix number'),
|
||||
_("The phone number should be preceded by the country prefix (for Poland it is 48, without '+'). If the number is 5, 4 or 3 characters, it is treated as 'short' and should not be preceded by a country prefix."));
|
||||
o.default = '48';
|
||||
o.validate = function(section_id, value) {
|
||||
|
||||
if (value.match(/^[0-9]+(?:\.[0-9]+)?$/))
|
||||
return true;
|
||||
|
||||
return _('Expect a decimal value');
|
||||
};
|
||||
|
||||
o = s.taboption('smstab', form.Flag, 'prefix', _('Add prefix to phone number'),
|
||||
_('Automatically add prefix to the phone number field.')
|
||||
);
|
||||
o.rmempty = false;
|
||||
//o.default = true;
|
||||
|
||||
o = s.taboption('smstab', form.Flag, 'sendingroup', _('Enable group messaging'),
|
||||
_("This option allows you to send one message to all contacts in the user's contact list."));
|
||||
o.rmempty = false;
|
||||
o.default = false;
|
||||
|
||||
o = s.taboption('smstab', form.Value, 'delay', _('Message sending delay'),
|
||||
_("[3 - 59] second(s) \
|
||||
<br /><br /><b>Important</b> \
|
||||
<br />Messages are sent without verification and confirmation delivery of the message. \
|
||||
Therefore, there is a risk of non-delivery of the message."));
|
||||
o.default = "3";
|
||||
o.rmempty = false;
|
||||
o.validate = function(section_id, value) {
|
||||
|
||||
if (value.match(/^[0-9]+(?:\.[0-9]+)?$/) && +value >= 3 && +value < 60)
|
||||
return true;
|
||||
|
||||
return _('Expect a decimal value between three and fifty-nine');
|
||||
};
|
||||
o.depends("sendingroup", "1");
|
||||
o.datatype = 'range(3, 59)';
|
||||
|
||||
o = s.taboption('smstab', form.Flag, 'information', _('Explanation of number and prefix'),
|
||||
_('In the tab for sending SMSes, show an explanation of the prefix and the correct phone number.')
|
||||
);
|
||||
o.rmempty = false;
|
||||
//o.default = true;
|
||||
|
||||
o = s.taboption('smstab', form.TextValue, '_tmp2', _('User contacts'),
|
||||
_("Each line must have the following format: 'Contact name;phone number'. For user convenience, the file is saved to the location <code>/etc/modem/phonebook.user</code>."));
|
||||
o.rows = 7;
|
||||
o.cfgvalue = function(section_id) {
|
||||
return fs.trimmed('/etc/modem/phonebook.user');
|
||||
};
|
||||
o.write = function(section_id, formvalue) {
|
||||
return fs.write('/etc/modem/phonebook.user', formvalue.trim().replace(/\r\n/g, '\n') + '\n');
|
||||
};
|
||||
|
||||
//TAB USSD
|
||||
|
||||
s.tab('ussd', _('USSD Codes Settings'));
|
||||
s.anonymous = true;
|
||||
|
||||
o = s.taboption('ussd', form.Value, 'ussdport', _('USSD sending port'),
|
||||
_('Select one of the available ttyUSBX ports.'));
|
||||
devs.sort((a, b) => a.name > b.name);
|
||||
devs.forEach(dev => o.value('/dev/' + dev.name));
|
||||
|
||||
o.placeholder = _('Please select a port');
|
||||
o.rmempty = false;
|
||||
|
||||
o = s.taboption('ussd', form.Flag, 'ussd', _('Sending USSD code in plain text'),
|
||||
_('Send the USSD code in plain text. Command is not being coded to the PDU.')
|
||||
);
|
||||
o.rmempty = false;
|
||||
|
||||
o = s.taboption('ussd', form.Flag, 'pdu', _('Receive message without PDU decoding'),
|
||||
_('Receive and display the message without decoding it as a PDU.')
|
||||
);
|
||||
o.rmempty = false;
|
||||
|
||||
o = s.taboption('ussd', form.ListValue, 'coding', _('PDU decoding scheme'));
|
||||
o.value('auto', _('Autodetect'));
|
||||
o.value('0', _('7Bit'));
|
||||
o.value('2', _('UCS2'));
|
||||
o.default = 'auto';
|
||||
|
||||
o = s.taboption('ussd', form.TextValue, '_tmp4', _('User USSD codes'),
|
||||
_("Each line must have the following format: 'Code description;code'. For user convenience, the file is saved to the location <code>/etc/modem/ussdcodes.user</code>."));
|
||||
o.rows = 7;
|
||||
o.cfgvalue = function(section_id) {
|
||||
return fs.trimmed('/etc/modem/ussdcodes.user');
|
||||
};
|
||||
o.write = function(section_id, formvalue) {
|
||||
return fs.write('/etc/modem/ussdcodes.user', formvalue.trim().replace(/\r\n/g, '\n') + '\n');
|
||||
};
|
||||
|
||||
//TAB AT
|
||||
|
||||
s.tab('attab', _('AT Commands Settings'));
|
||||
s.anonymous = true;
|
||||
|
||||
o = s.taboption('attab' , form.Value, 'atport', _('AT commands sending port'),
|
||||
_('Select one of the available ttyUSBX ports.'));
|
||||
devs.sort((a, b) => a.name > b.name);
|
||||
devs.forEach(dev => o.value('/dev/' + dev.name));
|
||||
|
||||
o.placeholder = _('Please select a port');
|
||||
o.rmempty = false;
|
||||
|
||||
o = s.taboption('attab' , form.TextValue, '_tmp6', _('User AT commands'),
|
||||
_("Each line must have the following format: 'At command description;AT command'. For user convenience, the file is saved to the location <code>/etc/modem/atcmmds.user</code>."));
|
||||
o.rows = 20;
|
||||
o.cfgvalue = function(section_id) {
|
||||
return fs.trimmed('/etc/modem/atcmmds.user');
|
||||
};
|
||||
o.write = function(section_id, formvalue) {
|
||||
return fs.write('/etc/modem/atcmmds.user', formvalue.trim().replace(/\r\n/g, '\n') + '\n');
|
||||
};
|
||||
|
||||
//TAB INFO
|
||||
|
||||
s.tab('notifytab', _('Notification Settings'));
|
||||
s.anonymous = true;
|
||||
|
||||
o = s.taboption('notifytab', form.Flag, 'lednotify', _('Notify new messages'),
|
||||
_('The LED informs about a new message. Before activating this function, please config and save the SMS reading port, time to check SMS inbox and select the notification LED.')
|
||||
);
|
||||
o.rmempty = false;
|
||||
o.default = true;
|
||||
o.write = function(section_id, value) {
|
||||
|
||||
uci.load('sms_tool_js').then(function() {
|
||||
let storeL = (uci.get('sms_tool_js', '@sms_tool_js[0]', 'storage'));
|
||||
let portR = (uci.get('sms_tool_js', '@sms_tool_js[0]', 'readport'));
|
||||
let dsled = (uci.get('sms_tool_js', '@sms_tool_js[0]', 'ledtype'));
|
||||
|
||||
L.resolveDefault(fs.exec_direct('/usr/bin/sms_tool', [ '-s' , storeL , '-d' , portR , 'status' ]))
|
||||
.then(function(res) {
|
||||
if (res) {
|
||||
let total = res.substring(res.indexOf('total'));
|
||||
let t = total.replace ( /[^\d.]/g, '' );
|
||||
let used = res.substring(17, res.indexOf('total'));
|
||||
let u = used.replace ( /[^\d.]/g, '' );
|
||||
|
||||
let sections = uci.sections('sms_tool_js');
|
||||
let led = sections[0].smsled;
|
||||
|
||||
if (value == '1') {
|
||||
uci.set('sms_tool_js', '@sms_tool_js[0]', 'sms_count', L.toArray(u).join(' '));
|
||||
uci.set('sms_tool_js', '@sms_tool_js[0]', 'lednotify', "1");
|
||||
uci.save();
|
||||
fs.exec_direct('/sbin/new_cron_sync.sh');
|
||||
fs.exec_direct('/etc/init.d/my_new_sms', [ 'enable' ]);
|
||||
fs.exec('sleep 2');
|
||||
fs.exec_direct('/etc/init.d/my_new_sms', [ 'start' ]);
|
||||
}
|
||||
|
||||
if (value == '0') {
|
||||
uci.set('sms_tool_js', '@sms_tool_js[0]', 'lednotify', "0");
|
||||
uci.save();
|
||||
fs.exec_direct('/sbin/new_cron_sync.sh');
|
||||
fs.exec_direct('/etc/init.d/my_new_sms', [ 'stop' ]);
|
||||
fs.exec('sleep 2');
|
||||
fs.exec_direct('/etc/init.d/my_new_sms', [ 'disable' ]);
|
||||
fs.exec_direct('/etc/init.d/my_new_sms', [ 'disable' ]);
|
||||
|
||||
if (dsled == 'D') {
|
||||
fs.write('/sys/class/leds/'+led+'/brightness', '0');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
return form.Flag.prototype.write.apply(this, [section_id, value]);
|
||||
};
|
||||
|
||||
o = s.taboption('notifytab', form.Value, 'checktime', _('Check inbox every minute(s)'),
|
||||
_('Specify how many minutes you want your inbox to be checked.'));
|
||||
o.default = '10';
|
||||
o.rmempty = false;
|
||||
o.validate = function(section_id, value) {
|
||||
|
||||
if (value.match(/^[0-9]+(?:\.[0-9]+)?$/) && +value >= 5 && +value < 60)
|
||||
return true;
|
||||
|
||||
return _('Expect a decimal value between five and fifty-nine');
|
||||
};
|
||||
o.datatype = 'range(5, 59)';
|
||||
|
||||
o = s.taboption('notifytab' , form.ListValue, 'prestart', _('Restart the inbox checking process every'),
|
||||
_('The process will restart at the selected time interval. This will eliminate the delay in checking your inbox.'));
|
||||
o.value('4', _('4h'));
|
||||
o.value('6', _('6h'));
|
||||
o.value('8', _('8h'));
|
||||
o.value('12', _('12h'));
|
||||
o.default = '6';
|
||||
o.rmempty = false;
|
||||
|
||||
o = s.taboption('notifytab' , form.ListValue, 'ledtype',
|
||||
_('The diode is dedicated only to these notifications'),
|
||||
_("Select 'No' in case the router has only one LED or if the LED is multi-tasking. \
|
||||
<br /><br /><b>Important</b> \
|
||||
<br />This option requires LED to be defined in the system (if possible) to work properly. \
|
||||
This requirement applies when the diode supports multiple tasks."));
|
||||
o.value('S', _('No'));
|
||||
o.value('D', _('Yes'));
|
||||
o.default = 'D';
|
||||
o.rmempty = false;
|
||||
|
||||
o = s.taboption('notifytab', form.ListValue, 'smsled',_('<abbr title="Light Emitting Diode">LED</abbr> Name'),
|
||||
_('Select the notification LED.'));
|
||||
o.load = function(section_id) {
|
||||
return L.resolveDefault(fs.list('/sys/class/leds'), []).then(L.bind(function(leds) {
|
||||
if(leds.length > 0) {
|
||||
leds.sort((a, b) => a.name > b.name);
|
||||
leds.forEach(e => o.value(e.name));
|
||||
}
|
||||
return this.super('load', [section_id]);
|
||||
}, this));
|
||||
};
|
||||
o.exclude = s.section;
|
||||
o.nocreate = true;
|
||||
o.optional = true;
|
||||
o.rmempty = true;
|
||||
|
||||
return m.render();
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,425 @@
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=UTF-8"
|
||||
|
||||
msgid "SMS Messages"
|
||||
msgstr "Wiadomości SMS"
|
||||
|
||||
msgid "Received Messages"
|
||||
msgstr "Odebrane wiadomości"
|
||||
|
||||
msgid "Send Messages"
|
||||
msgstr "Wysyłanie wiadomości"
|
||||
|
||||
msgid "USSD"
|
||||
msgstr "USSD"
|
||||
|
||||
msgid "From"
|
||||
msgstr "Nadawca"
|
||||
|
||||
msgid "Received"
|
||||
msgstr "Odebrano"
|
||||
|
||||
msgid "Message"
|
||||
msgstr "Wiadomość"
|
||||
|
||||
msgid "Configuration"
|
||||
msgstr "Ustawienia"
|
||||
|
||||
msgid "AT Commands"
|
||||
msgstr "Polecenia AT"
|
||||
|
||||
msgid "Configuration"
|
||||
msgstr "Konfiguracja"
|
||||
|
||||
msgid "Please enter phone number"
|
||||
msgstr "Proszę podać numer telefonu"
|
||||
|
||||
msgid "Please enter a message text"
|
||||
msgstr "Proszę podać treść wiadomości"
|
||||
|
||||
msgid "Reply"
|
||||
msgstr "Odpowiedź"
|
||||
|
||||
msgid "Please enter a USSD code"
|
||||
msgstr "Proszę podać kod do wysłania"
|
||||
|
||||
msgid "USSD Codes"
|
||||
msgstr "Kody USSD"
|
||||
|
||||
msgid "Send to"
|
||||
msgstr "Wyślij do"
|
||||
|
||||
msgid "Message text"
|
||||
msgstr "Treść wiadomości"
|
||||
|
||||
msgid "Send"
|
||||
msgstr "Wyślij"
|
||||
|
||||
msgid "Send to number"
|
||||
msgstr "Wyślij na numer"
|
||||
|
||||
msgid "to number"
|
||||
msgstr "na numer"
|
||||
|
||||
msgid "to group"
|
||||
msgstr "do grupy"
|
||||
|
||||
msgid "SMS sent sucessfully"
|
||||
msgstr "SMS został wysłany"
|
||||
|
||||
msgid "Code to send"
|
||||
msgstr "Kod do wysłania"
|
||||
|
||||
msgid "Send code"
|
||||
msgstr "Wyślij kod"
|
||||
|
||||
msgid "SMS Settings"
|
||||
msgstr "Ustawienia dla wiadomości SMS"
|
||||
|
||||
msgid "USSD Codes Settings"
|
||||
msgstr "Ustawienia dla kodów USSD"
|
||||
|
||||
msgid "SMS reading port"
|
||||
msgstr "Port do odczytu SMS"
|
||||
|
||||
msgid "SMS sending port"
|
||||
msgstr "Port do wysyłania SMS"
|
||||
|
||||
msgid "AT commands sending port"
|
||||
msgstr "Port do wysyłania poleceń AT"
|
||||
|
||||
msgid "AT Commands Settings"
|
||||
msgstr "Ustawienia dla poleceń AT"
|
||||
|
||||
msgid "Merge split messages"
|
||||
msgstr "Połącz podzielone wiadomości"
|
||||
|
||||
msgid "Checking this option will make it easier to read the messages, but it will cause a discrepancy in the number of messages shown and received."
|
||||
msgstr "Podzielone wiadomości zostaną złączone. Zaznaczenie tej opcji ułatwi czytanie SMS-ów, ale spowoduje niezgodność w ilości pokazanych, odebranych wiadomości."
|
||||
|
||||
msgid "USSD sending port"
|
||||
msgstr "Port do wysyłania kodów USSD"
|
||||
|
||||
msgid "Sending USSD code in plain text"
|
||||
msgstr "Wysyłaj kod USSD jawnym tekstem"
|
||||
|
||||
msgid "Receive message without PDU decoding"
|
||||
msgstr "Odbierz wiadomość bez dekodowania jej jako PDU"
|
||||
|
||||
msgid "Send the USSD code in plain text. Command is not being coded to the PDU."
|
||||
msgstr "Wysyła kod USSD jawnym tekstem. Polecenie nie jest dekodowane na PDU."
|
||||
|
||||
msgid "Receive and display the message without decoding it as a PDU."
|
||||
msgstr "Odebrana wiadomość wyświetlana jest bez dekodowania jej jako PDU."
|
||||
|
||||
msgid "Explanation of number and prefix"
|
||||
msgstr "Wyjaśnienie dot. numeru i prefiksu"
|
||||
|
||||
msgid "In the tab for sending SMSes, show an explanation of the prefix and the correct phone number."
|
||||
msgstr "W zakładce umożliwiającej wysyłanie SMS-ów pokaż wyjaśnienie dotyczące prefiksu i poprawnego numeru telefonu."
|
||||
|
||||
msgid "The phone number should be preceded by the country prefix (for Poland it is 48, without '+'). If the number is 5, 4 or 3 characters, it is treated as 'short' and should not be preceded by a country prefix."
|
||||
msgstr "Numer telefonu należy poprzedzić prefiksem kraju (dla Polski jest to 48, bez znaku '+'). Jeżeli numer jest 5, 4 lub 3 znakowy to jest on traktowany jako 'krótki' i nie należy go poprzedzać prefiksem kraju."
|
||||
|
||||
msgid "The phone number should be preceded by the country prefix (for Poland it is 48, without +). If the number is 5, 4 or 3 characters, it is treated as.. short and should not be preceded by a country prefix."
|
||||
msgstr "Numer telefonu należy poprzedzić prefiksem kraju (dla Polski jest to 48, bez znaku +). Jeżeli numer jest 5, 4 lub 3 znakowy to jest on traktowany jako krótki i nie należy go poprzedzać prefiksem kraju."
|
||||
|
||||
msgid "Add prefix to phone number"
|
||||
msgstr "Dodaj prefiks do numeru telefonu"
|
||||
|
||||
msgid "Automatically add prefix to the phone number field."
|
||||
msgstr "Automatycznie uzupełnij pole numeru telefonu o prefiks."
|
||||
|
||||
msgid "Prefix number"
|
||||
msgstr "Numer prefiks"
|
||||
|
||||
msgid "Please specify the command to send"
|
||||
msgstr "Proszę podać polecenie do wysłania"
|
||||
|
||||
msgid "Please specify the code to send"
|
||||
msgstr "Proszę podać kod do wysłania"
|
||||
|
||||
msgid "Please set the port for communication with the modem"
|
||||
msgstr "Proszę podać port do komunikacji z modemem"
|
||||
|
||||
msgid "User AT commands"
|
||||
msgstr "Polecenia AT użytkownika"
|
||||
|
||||
msgid "Command to send"
|
||||
msgstr "Polecenie do wysłania"
|
||||
|
||||
msgid "Clear form"
|
||||
msgstr "Wyczyść formularz"
|
||||
|
||||
msgid "Send command"
|
||||
msgstr "Wyślij polecenie"
|
||||
|
||||
msgid "Send code"
|
||||
msgstr "Wyślij kod"
|
||||
|
||||
msgid "Reply"
|
||||
msgstr "Odpowiedź"
|
||||
|
||||
msgid "Message storage area"
|
||||
msgstr "Miejsce przechowywania wiadomości"
|
||||
|
||||
msgid "Messages are stored in a specific location (for example, on the SIM card or modem memory), but other areas may also be available depending on the type of device."
|
||||
msgstr "Wiadomości przechowywane są w określonym miejscu (np. na karcie SIM lub pamięci modemu), ale w zależności od typu urządzenia mogą być dostępne także inne obszary."
|
||||
|
||||
msgid "SIM card"
|
||||
msgstr "Karta SIM"
|
||||
|
||||
msgid "Modem memory"
|
||||
msgstr "Pamięć modemu"
|
||||
|
||||
msgid "Storage used / Total capacity"
|
||||
msgstr "Użyta pamięć / Całkowita pojemność"
|
||||
|
||||
msgid "Delete selected"
|
||||
msgstr "Usuń wybraną"
|
||||
|
||||
msgid "Delete message(s)"
|
||||
msgstr "Usuń wiadomość(-ci)"
|
||||
|
||||
msgid "Delete all"
|
||||
msgstr "Usuń wszystkie"
|
||||
|
||||
msgid "Refresh messages"
|
||||
msgstr "Odśwież wiadomości"
|
||||
|
||||
msgid "Please select the message(s) to be deleted"
|
||||
msgstr "Proszę wybrać wiadomość(-ci) do usunięcia"
|
||||
|
||||
msgid "Delete selected message(s)?"
|
||||
msgstr "Usunąć wybraną(-e) wiadomość(-ci)?"
|
||||
|
||||
msgid "Delete all the messages?"
|
||||
msgstr "Usunąć wszystkie wiadomości?"
|
||||
|
||||
msgid "User interface for reading messages using sms-tool. More information about the sms-tool on the %seko.one.pl forum%s."
|
||||
msgstr "Interfejs użytkownika do odczytywania wiadomości SMS za pomocą sms-tool. Więcej informacji o programie sms-tool na %sforum eko.one.pl%s."
|
||||
|
||||
msgid "User interface for sending messages using sms-tool. More information about the sms-tool on the %seko.one.pl forum%s."
|
||||
msgstr "Interfejs użytkownika do wysyłania wiadomości SMS za pomocą sms-tool. Więcej informacji o programie sms-tool na %sforum eko.one.pl%s."
|
||||
|
||||
msgid "User interface for sending AT commands using sms-tool. More information about the sms-tool on the %seko.one.pl forum%s."
|
||||
msgstr "Interfejs użytkownika do wysyłania poleceń AT za pomocą sms-tool. Więcej informacji o programie sms-tool na %sforum eko.one.pl%s."
|
||||
|
||||
msgid "User interface for sending USSD codes using sms-tool. More information about the sms-tool on the %seko.one.pl forum%s."
|
||||
msgstr "Interfejs użytkownika do wysyłania kodów USSD za pomocą sms-tool. Więcej informacji o programie sms-tool na %sforum eko.one.pl%s."
|
||||
|
||||
msgid "Configuration sms-tool"
|
||||
msgstr "Konfiguracja sms-tool"
|
||||
|
||||
msgid "Configuration panel for sms-tool and gui application."
|
||||
msgstr "Panel ustawień dla programu sms-tool oraz dla interfejsu użytkownika."
|
||||
|
||||
msgid "Port for communication with the modem"
|
||||
msgstr "Port do komunikacji z modemem"
|
||||
|
||||
msgid "Select one of the available ttyUSBX ports."
|
||||
msgstr "Wybierz jeden z dostępnych portów ttyUSBX."
|
||||
|
||||
msgid "Please select a port"
|
||||
msgstr "Proszę wybrać port"
|
||||
|
||||
msgid "User contacts"
|
||||
msgstr "Kontakty użytkownika"
|
||||
|
||||
msgid "Enable group messaging"
|
||||
msgstr "Włącz wiadomości grupowe"
|
||||
|
||||
msgid "This option allows you to send one message to all contacts in the user's contact list."
|
||||
msgstr "Opcja umożliwia wysłanie jednej wiadomości do wszystkich kontaktów z listy kontaktów użytkownika."
|
||||
|
||||
msgid "Message sending delay"
|
||||
msgstr "Opóźnienie przy wysyłaniu wiadomości"
|
||||
|
||||
msgid "[Bot] Message sent to number:"
|
||||
msgstr "[Bot] Wiadomość wysłano na numer:"
|
||||
|
||||
msgid "User USSD codes"
|
||||
msgstr "Kody USSD użytkownika"
|
||||
|
||||
msgid "Each line must have the following format: 'Contact name;phone number'. For user convenience, the file is saved to the location <code>/etc/modem/phonebook.user</code>."
|
||||
msgstr "Każda linijka powinna mieć następujący format: 'Nazwa kontaktu;numer telefonu'. Dla wygody użytkownika kontakty zapisywane są w pliku <code>/etc/modem/phonebook.user</code>."
|
||||
|
||||
msgid "Each line must have the following format: 'At command description;AT command'. For user convenience, the file is saved to the location <code>/etc/modem/atcmmds.user</code>."
|
||||
msgstr "Każda linijka powinna mieć następujący format: 'Opis polecenia AT;polecenie AT'. Dla wygody użytkownika polecenia zapisywane są w pliku <code>/etc/modem/atcmmds.user</code>."
|
||||
|
||||
msgid "Each line must have the following format: 'Code description;code'. For user convenience, the file is saved to the location <code>/etc/modem/ussdcodes.user</code>."
|
||||
msgstr "Każda linijka powinna mieć następujący format: 'Opis kodu;kod'. Dla wygody użytkownika kody zapisywane są w pliku <code>/etc/modem/ussdcodes.user</code>."
|
||||
|
||||
msgid "Press [Enter] to send the command, press [Delete] to delete the command"
|
||||
msgstr "Wciśnij [Enter] aby wysłać polecenie, wciśnij [Delete] aby usunąć"
|
||||
|
||||
msgid "Press [Enter] to send the code, press [Delete] to delete the code"
|
||||
msgstr "Wciśnij [Enter] aby wysłać kod, wciśnij [Delete] aby usunąć"
|
||||
|
||||
msgid "Press [Delete] to delete the phone number"
|
||||
msgstr "Wciśnij [Delete] aby usunąć numer telefonu"
|
||||
|
||||
msgid "Press [Delete] to delete the content of the message"
|
||||
msgstr "Wciśnij [Delete] aby usunąć treść wiadomości"
|
||||
|
||||
msgid "Notification Settings"
|
||||
msgstr "Ustawienia powiadomień"
|
||||
|
||||
msgid "The LED informs about a new message. Before activating this function, please config and save the SMS reading port, time to check SMS inbox and select the notification LED."
|
||||
msgstr "Powiadomienie diodą o nowej wiadomości. Przed uruchomieniem tej funkcji proszę ustawić port odczytu wiadomości, czas sprawdzania skrzynki odbiorczej oraz wybrać diodę powiadomień."
|
||||
|
||||
msgid "Check inbox every minute(s)"
|
||||
msgstr "Sprawdzaj skrzynkę odbiorczą co minut(-y)"
|
||||
|
||||
msgid "Specify how many minutes you want your inbox to be checked."
|
||||
msgstr "Podaj co ile minut ma być sprawdzana skrzynka odbiorcza w poszukiwaniu nowych wiadomości."
|
||||
|
||||
msgid "Notification LED"
|
||||
msgstr "Dioda powiadomień"
|
||||
|
||||
msgid "Select the notification LED."
|
||||
msgstr "Wybierz diodę powiadomień."
|
||||
|
||||
msgid "Notify new messages"
|
||||
msgstr "Powiadomienie o nowych wiadomościach"
|
||||
|
||||
msgid "Restart the inbox checking process every"
|
||||
msgstr "Uruchom proces ponownie po"
|
||||
|
||||
msgid "The process will restart at the selected time interval. This will eliminate the delay in checking your inbox."
|
||||
msgstr "Proces zostanie uruchomiony ponownie po wybranym przez użytkownika czasie. Pozwoli to wyeliminować opóźnienie w sprawdzaniu skrzynki odbiorczej."
|
||||
|
||||
msgid "4h"
|
||||
msgstr "4 godz."
|
||||
|
||||
msgid "6h"
|
||||
msgstr "6 godz."
|
||||
|
||||
msgid "8h"
|
||||
msgstr "8 godz."
|
||||
|
||||
msgid "12h"
|
||||
msgstr "12 godz."
|
||||
|
||||
msgid "The diode is dedicated only to these notifications"
|
||||
msgstr "Dioda jest dedykowana tylko tym powiadomieniom"
|
||||
|
||||
msgid ""
|
||||
"Select 'No' in case the router has only one LED or if the LED is multi-tasking. <br /><br /><b>Important</b> <br />This "
|
||||
"option requires LED to be defined in the system (if possible) to work properly. This requirement applies when the diode supports multiple tasks."
|
||||
msgstr ""
|
||||
"Wybierz 'Nie' w przypadku, kiedy router ma tylko jedną diodę lub gdy dioda obsługuje wiele zadań. <br /><br /><b>Ważne</b> <br />Opcja "
|
||||
"do poprawnego działania wymaga zdefiniowania diody LED w systemie (o ile to możliwe). Wymóg ten dotyczy przypadku, kiedy dioda obsługuje wiele zadań."
|
||||
|
||||
msgid ""
|
||||
"[3 - 59] second(s) <br /><br /><b>Important</b> <br />Messages "
|
||||
"are sent without verification and confirmation delivery of the message. Therefore, there is a risk of non-delivery of the message."
|
||||
msgstr ""
|
||||
"[3 - 59] sekund(y) <br /><br /><b>Ważne</b> <br />Wiadomości "
|
||||
"wysyłane są bez weryfikacji i potwierdzenia doręczenia wiadomości. W związku z tym istnieje ryzyko, że wiadomość nie zostanie doręczona."
|
||||
|
||||
msgid "No"
|
||||
msgstr "Nie"
|
||||
|
||||
msgid "Yes"
|
||||
msgstr "Tak"
|
||||
|
||||
msgid "Merge algorithm"
|
||||
msgstr "Algorytm scalania"
|
||||
|
||||
msgid "Simple (merge without sorting)"
|
||||
msgstr "Prosty (scala bez sortowania)"
|
||||
|
||||
msgid "Advanced (merges with sorting)"
|
||||
msgstr "Zaawansowany (scala z sortowaniem)"
|
||||
|
||||
msgid "Phone number to be blurred"
|
||||
msgstr "Numer telefonu do zamazania"
|
||||
|
||||
msgid "The last 5 digits of this number will be blurred."
|
||||
msgstr "Ostatnie 5 cyfr tego numeru zostanie zamazanych."
|
||||
|
||||
msgid "Expect a decimal value between five and fifty-nine"
|
||||
msgstr "Oczekiwana jest wartość dziesiętna z przedziału od pięciu do pięćdziesięciu dziewięciu"
|
||||
|
||||
msgid "Expect a decimal value between three and fifty-nine"
|
||||
msgstr "Oczekiwana jest wartość dziesiętna z przedziału od trzech do pięćdziesięciu dziewięciu"
|
||||
|
||||
msgid "Expect a decimal value"
|
||||
msgstr "Oczekiwana jest wartość dziesiętna"
|
||||
|
||||
msgid "Direction of message merging"
|
||||
msgstr "Kierunek łączenia wiadomości"
|
||||
|
||||
msgid "From beginning to end"
|
||||
msgstr "Od początku do końca"
|
||||
|
||||
msgid "From end to beginning"
|
||||
msgstr "Od końca do początku"
|
||||
|
||||
msgid "Save messages to a text file"
|
||||
msgstr "Zapisz wiadomości do pliku tekstowego"
|
||||
|
||||
msgid "Save sms to txt file?"
|
||||
msgstr "Zapisać wiadomości SMS do pliku txt?"
|
||||
|
||||
msgid "Save as .txt file"
|
||||
msgstr "Zapisz jako plik .txt"
|
||||
|
||||
msgid "Saving..."
|
||||
msgstr "Zapisywanie..."
|
||||
|
||||
msgid "Please wait.. Process of saving SMS message to a text file is in progress."
|
||||
msgstr "Proszę czekać.. Trwa proces zapisu wiadomości SMS do pliku tekstowego."
|
||||
|
||||
msgid "This option allows to backup SMS messages or, for example, save messages that are not supported by the sms-tool."
|
||||
msgstr "Opcja umożliwia wykonanie kopii zapasowej SMS-ów lub np. zapisanie wiadomości nieobsługiwanych przez sms-tool."
|
||||
|
||||
msgid "Delete all messages"
|
||||
msgstr "Usuń wszystkie wiadomości"
|
||||
|
||||
msgid "This option allows you to delete all SMS messages when they are not visible in the 'Received Messages' tab."
|
||||
msgstr "Opcja umożliwia usunięcie wszystkich wiadmości SMS w przypadku kiedy nie są one widoczne w zakładce 'Odebrane wiadomości'."
|
||||
|
||||
msgid "Saving SMS messages to a file failed. Please try again."
|
||||
msgstr "Zapis wiadomości SMS do pliku zakończony niepowodzeniem. Proszę spróbować ponownie."
|
||||
|
||||
msgid "PDU decoding scheme"
|
||||
msgstr "Schemat dekodowania PDU"
|
||||
|
||||
msgid "Autodetect"
|
||||
msgstr "Autodetekcja"
|
||||
|
||||
msgid "Keep the previous reply when sending a new USSD code."
|
||||
msgstr "Zachowaj wcześniejszą odpowiedź przy wysyłaniu nowego kodu USSD."
|
||||
|
||||
msgid "Check this option if you need to use the menu built on USSD codes"
|
||||
msgstr "Zaznacz tą opcję jeśli potrzebujesz skorzystać z menu zbudowanego na kodach USSD"
|
||||
|
||||
msgid "Turn over the replies."
|
||||
msgstr "Odwróć odpowiedzi."
|
||||
|
||||
msgid "View new reply from top"
|
||||
msgstr "Wyświetl nową odpowiedź od góry"
|
||||
|
||||
msgid "Please wait... deleted"
|
||||
msgstr "Proszę czekać... usunięto"
|
||||
|
||||
msgid "of"
|
||||
msgstr "z"
|
||||
|
||||
msgid "selected messages"
|
||||
msgstr "wybranych wiadomości"
|
||||
|
||||
msgid ""
|
||||
"The package requires user configuration. <br /><br /><b>The following "
|
||||
"need to be set:</b> <ul><li>1. All ports for communication with the modem.</li><li>2. Additional "
|
||||
"options specific to the given modem (for handling USSD codes).</li><li> 3. Notification LED (optional).</li><li><ul>"
|
||||
|
||||
msgstr ""
|
||||
"Pakiet wymaga konfiguracji przez użytkownika. <br /><br /><b>Do "
|
||||
"ustawienia są:</b> <ul><li>1. Wszystkie porty do komunikacji z modemem.</li><li>2. Dodatkowe "
|
||||
"opcje specyficzne dla danego modemu (do obsługi kodów USSD).</li><li> 3. Dioda powiadomień (opcjonalnie).</li><li><ul>"
|
||||
|
||||
msgid "Any change in the area from which SMS messages will be read requires refreshing the messages"
|
||||
msgstr "Każda zmiana miejsca z którego SMS-y będą odczytywane wymaga odświeżenia wiadomości"
|
||||
@@ -0,0 +1,388 @@
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=UTF-8"
|
||||
|
||||
msgid "SMS Messages"
|
||||
msgstr "Сообщения SMS"
|
||||
|
||||
msgid "Received Messages"
|
||||
msgstr "Полученные сообщения"
|
||||
|
||||
msgid "Send Messages"
|
||||
msgstr "Отправка сообщений"
|
||||
|
||||
msgid "USSD"
|
||||
msgstr "USSD"
|
||||
|
||||
msgid "From"
|
||||
msgstr "От"
|
||||
|
||||
msgid "Received"
|
||||
msgstr "Получено"
|
||||
|
||||
msgid "Message"
|
||||
msgstr "Сообщение"
|
||||
|
||||
msgid "Configuration"
|
||||
msgstr "Настройка"
|
||||
|
||||
msgid "AT Commands"
|
||||
msgstr "AT-команды"
|
||||
|
||||
msgid "Configuration"
|
||||
msgstr "Настройка"
|
||||
|
||||
msgid "Please enter phone number"
|
||||
msgstr "Введите номер телефона"
|
||||
|
||||
msgid "Please enter a message text"
|
||||
msgstr "Введите текст сообщения"
|
||||
|
||||
msgid "Reply"
|
||||
msgstr "Ответить"
|
||||
|
||||
msgid "Please enter a USSD code"
|
||||
msgstr "Введите команду USSD"
|
||||
|
||||
msgid "USSD Codes"
|
||||
msgstr "Команды USSD"
|
||||
|
||||
msgid "Send to"
|
||||
msgstr "Кому"
|
||||
|
||||
msgid "Message text"
|
||||
msgstr "Содержание сообщения"
|
||||
|
||||
msgid "Send"
|
||||
msgstr "Отправить"
|
||||
|
||||
msgid "Send to number"
|
||||
msgstr "Отправить на номер"
|
||||
|
||||
msgid "to number"
|
||||
msgstr "на номер"
|
||||
|
||||
msgid "to group"
|
||||
msgstr "группе"
|
||||
|
||||
msgid "SMS sent sucessfully"
|
||||
msgstr "SMS успешно отправлено"
|
||||
|
||||
msgid "Code to send"
|
||||
msgstr "Команда для отправки"
|
||||
|
||||
msgid "Send code"
|
||||
msgstr "Отправить команду"
|
||||
|
||||
msgid "SMS Settings"
|
||||
msgstr "Настройки SMS"
|
||||
|
||||
msgid "USSD Codes Settings"
|
||||
msgstr "Настройки команд USSD"
|
||||
|
||||
msgid "SMS reading port"
|
||||
msgstr "Порт для чтения SMS"
|
||||
|
||||
msgid "SMS sending port"
|
||||
msgstr "Порт для отправки SMS"
|
||||
|
||||
msgid "AT commands sending port"
|
||||
msgstr "Порт для отправки AT-команд"
|
||||
|
||||
msgid "AT Commands Settings"
|
||||
msgstr "Настройки AT-команд"
|
||||
|
||||
msgid "Merge split messages"
|
||||
msgstr "Объединять разделённые сообщения"
|
||||
|
||||
msgid "Checking this option will make it easier to read the messages, but it will cause a discrepancy in the number of messages shown and received."
|
||||
msgstr "Разделенные сообщения будут объединены. Установка этого параметра облегчит чтение SMS, но приведет к несоответствию в отображении количества полученных сообщений."
|
||||
|
||||
msgid "USSD sending port"
|
||||
msgstr "Порт для отправки команд USSD"
|
||||
|
||||
msgid "Sending USSD code in plain text"
|
||||
msgstr "Отправка команд USSD простым текстом"
|
||||
|
||||
msgid "Receive message without PDU decoding"
|
||||
msgstr "Получение сообщения без декодирования его как PDU"
|
||||
|
||||
msgid "Send the USSD code in plain text. Command is not being coded to the PDU."
|
||||
msgstr "Отправка команд USSD в виде обычного текста. Команда не кодируется в PDU."
|
||||
|
||||
msgid "Receive and display the message without decoding it as a PDU."
|
||||
msgstr "Полученное сообщение отображается без декодирования его как PDU."
|
||||
|
||||
msgid "Explanation of number and prefix"
|
||||
msgstr "Подсказка по формату номера"
|
||||
|
||||
msgid "In the tab for sending SMSes, show an explanation of the prefix and the correct phone number."
|
||||
msgstr "Отображать на вкладке для отправки SMS-сообщений пояснение о формате префикса и номера телефона."
|
||||
|
||||
msgid "The phone number should be preceded by the country prefix (for Poland it is 48, without '+'). If the number is 5, 4 or 3 characters, it is treated as 'short' and should not be preceded by a country prefix."
|
||||
msgstr "Перед телефонным номером должен стоять префикс страны (для России это 7, без знака '+'). Если номер состоит из 5, 4 или 3 символов, он считается 'коротким' и не должен предваряться префиксом страны."
|
||||
|
||||
msgid "The phone number should be preceded by the country prefix (for Poland it is 48, without +). If the number is 5, 4 or 3 characters, it is treated as.. short and should not be preceded by a country prefix."
|
||||
msgstr "Перед телефонным номером должен стоять префикс страны (для России это 7, без знака +). Если номер состоит из 5, 4 или 3 символов, он считается коротким и не должен предваряться префиксом страны."
|
||||
|
||||
msgid "Add prefix to phone number"
|
||||
msgstr "Добавить префикс к номеру телефона"
|
||||
|
||||
msgid "Automatically add prefix to the phone number field."
|
||||
msgstr "Автоматически добавлять префикс в поле номера телефона."
|
||||
|
||||
msgid "Prefix number"
|
||||
msgstr "Префикс"
|
||||
|
||||
msgid "Please specify the command to send"
|
||||
msgstr "Укажите команду для отправки"
|
||||
|
||||
msgid "Please specify the code to send"
|
||||
msgstr "Укажите команду для отправки"
|
||||
|
||||
msgid "Please set the port for communication with the modem"
|
||||
msgstr "Укажите порт для связи с модемом"
|
||||
|
||||
msgid "User AT commands"
|
||||
msgstr "Пользовательские AT-команды"
|
||||
|
||||
msgid "Command to send"
|
||||
msgstr "Команда для отправки"
|
||||
|
||||
msgid "Clear form"
|
||||
msgstr "Очистить форму"
|
||||
|
||||
msgid "Send command"
|
||||
msgstr "Отправить команду"
|
||||
|
||||
msgid "Send code"
|
||||
msgstr "Отправить команду"
|
||||
|
||||
msgid "Reply"
|
||||
msgstr "Ответить"
|
||||
|
||||
msgid "Message storage area"
|
||||
msgstr "Где хранить сообщения"
|
||||
|
||||
msgid "Messages are stored in a specific location (for example, on the SIM card or modem memory), but other areas may also be available depending on the type of device."
|
||||
msgstr "Сообщения хранятся в определенном месте (например, на SIM-карте или в памяти модема), но в зависимости от типа устройства могут быть доступны и другие места."
|
||||
|
||||
msgid "SIM card"
|
||||
msgstr "SIM-карта"
|
||||
|
||||
msgid "Modem memory"
|
||||
msgstr "Память модема"
|
||||
|
||||
msgid "Messages store in"
|
||||
msgstr "Место хранения сообщений"
|
||||
|
||||
msgid "Messages (inbox / maximum)"
|
||||
msgstr "Сообщений (в хранилище / максимум)"
|
||||
|
||||
msgid "Delete selected"
|
||||
msgstr "Удалить выбранные"
|
||||
|
||||
msgid "Delete message(s)"
|
||||
msgstr "Удалить сообщения"
|
||||
|
||||
msgid "Delete all"
|
||||
msgstr "Удалить все"
|
||||
|
||||
msgid "Refresh messages"
|
||||
msgstr "Проверить сообщения"
|
||||
|
||||
msgid "Please select the message(s) to be deleted"
|
||||
msgstr "Укажите сообщения для удаления"
|
||||
|
||||
msgid "Delete selected message(s)?"
|
||||
msgstr "Удалить выбранные сообщения?"
|
||||
|
||||
msgid "Delete all the messages?"
|
||||
msgstr "Удалить ВСЕ сообщения?"
|
||||
|
||||
msgid "User interface for reading messages using sms-tool. More information about the sms-tool on the %seko.one.pl forum%s."
|
||||
msgstr "Пользовательский интерфейс для чтения SMS-сообщений с помощью sms-tool. Для получения дополнительной информации о sms-tool посетите %sforum eko.one.pl%s."
|
||||
|
||||
msgid "User interface for sending messages using sms-tool. More information about the sms-tool on the %seko.one.pl forum%s."
|
||||
msgstr "Пользовательский интерфейс для отправки SMS-сообщений с помощью sms-tool. Дополнительная информация о sms-tool на %sforum eko.one.pl%s."
|
||||
|
||||
msgid "User interface for sending AT commands using sms-tool. More information about the sms-tool on the %seko.one.pl forum%s."
|
||||
msgstr "Пользовательский интерфейс для отправки AT-команд через sms-tool. Дополнительная информация о программе sms-tool на %sforum eko.one.pl%s."
|
||||
|
||||
msgid "User interface for sending USSD codes using sms-tool. More information about the sms-tool on the %seko.one.pl forum%s."
|
||||
msgstr "Пользовательский интерфейс для отправки команд USSD с помощью программы sms-tool. Дополнительная информация о программе sms-tool на %sforum eko.one.pl%s."
|
||||
|
||||
msgid "Configuration sms-tool"
|
||||
msgstr "Конфигурация sms-tool"
|
||||
|
||||
msgid "Configuration panel for sms-tool and gui application."
|
||||
msgstr "Панель настроек для sms-tool и пользовательского интерфейса."
|
||||
|
||||
msgid "Port for communication with the modem"
|
||||
msgstr "Порт для связи с модемом"
|
||||
|
||||
msgid "Select one of the available ttyUSBX ports."
|
||||
msgstr "Выберите один из доступных портов ttyUSBX."
|
||||
|
||||
msgid "Please select a port"
|
||||
msgstr "Выберите порт"
|
||||
|
||||
msgid "User contacts"
|
||||
msgstr "Записная книжка"
|
||||
|
||||
msgid "Enable group messaging"
|
||||
msgstr "Включить рассылку группе"
|
||||
|
||||
msgid "This option allows you to send one message to all contacts in the user's contact list."
|
||||
msgstr "Эта опция позволяет отправить одно сообщение всем контактам из записной книжки."
|
||||
|
||||
msgid "Message sending delay"
|
||||
msgstr "Задержка отправки сообщения"
|
||||
|
||||
msgid "[Bot] Message sent to number:"
|
||||
msgstr "[Бот] Сообщение отправлено на номер:"
|
||||
|
||||
msgid "User USSD codes"
|
||||
msgstr "Пользовательские команды USSD"
|
||||
|
||||
msgid "Each line must have the following format: 'Contact name;phone number'. For user convenience, the file is saved to the location <code>/etc/modem/phonebook.user</code>."
|
||||
msgstr "Каждый контакт заносится отдельной строкой в формате: 'Имя контакта;номер телефона'. Для удобства использования сохраняется в файле <code>/etc/modem/phonebook.user</code>."
|
||||
|
||||
msgid "Each line must have the following format: 'At command description;AT command'. For user convenience, the file is saved to the location <code>/etc/modem/atcmmds.user</code>."
|
||||
msgstr "Каждая команда заносится отдельной строкой в формате: 'Описание;AT-команда'. Для удобства использования сохраняется в файле <code>/etc/modem/atcmmds.user</code>."
|
||||
|
||||
msgid "Each line must have the following format: 'Code description;code'. For user convenience, the file is saved to the location <code>/etc/modem/ussdcodes.user</code>."
|
||||
msgstr "Каждая команда заносится отдельной строкой в формате: 'Описание;команда USSD'. Для удобства использования сохраняется в файле <code>/etc/modem/ussdcodes.user</code>."
|
||||
|
||||
msgid "Press [Enter] to send the command, press [Delete] to delete the command"
|
||||
msgstr "Нажмите [Enter] для отправки, или [Delete] чтобы удалить команду"
|
||||
|
||||
msgid "Press [Enter] to send the code, press [Delete] to delete the code"
|
||||
msgstr "Нажмите [Enter] для отправки, или [Delete] чтобы удалить команду"
|
||||
|
||||
msgid "Press [Delete] to delete the phone number"
|
||||
msgstr "Нажмите [Delete] чтобы удалить номер"
|
||||
|
||||
msgid "Press [Delete] to delete the content of the message"
|
||||
msgstr "Нажмите [Delete] чтобы удалить содержимое сообщения"
|
||||
|
||||
msgid "Notification Settings"
|
||||
msgstr "Настройки уведомлений"
|
||||
|
||||
msgid "The LED informs about a new message. Before activating this function, please config and save the SMS reading port, time to check SMS inbox and select the notification LED."
|
||||
msgstr "Уведомление диодом о новых сообщениях. Прежде чем активировать эту функцию, установите порт чтения сообщений, время проверки входящих сообщений и выберите диод уведомления."
|
||||
|
||||
msgid "Check inbox every minute(s)"
|
||||
msgstr "Интервал проверки входящих (мин.)"
|
||||
|
||||
msgid "Specify how many minutes you want your inbox to be checked."
|
||||
msgstr "Укажите интервал проверки папки входящих сообщений на наличие новых сообщений в минутах.."
|
||||
|
||||
msgid "Notification LED"
|
||||
msgstr "Диод уведомлений"
|
||||
|
||||
msgid "Select the notification LED."
|
||||
msgstr "Выберите диод для уведомлений."
|
||||
|
||||
msgid "Notify new messages"
|
||||
msgstr "Уведомлять о новых сообщениях"
|
||||
|
||||
msgid "Restart the inbox checking process every"
|
||||
msgstr "Перезагружать процесс проверки входящих сообщений через каждые"
|
||||
|
||||
msgid "The process will restart at the selected time interval. This will eliminate the delay in checking your inbox."
|
||||
msgstr "Процесс будет перезапускаться через выбранное время. Это устранит задержку при проверке входящих сообщений."
|
||||
|
||||
msgid "4h"
|
||||
msgstr "4 ч."
|
||||
|
||||
msgid "6h"
|
||||
msgstr "6 ч."
|
||||
|
||||
msgid "8h"
|
||||
msgstr "8 ч."
|
||||
|
||||
msgid "12h"
|
||||
msgstr "12 ч."
|
||||
|
||||
msgid "The diode is dedicated only to these notifications"
|
||||
msgstr "Диод предназначен только для этих уведомлений"
|
||||
|
||||
msgid ""
|
||||
"Select 'No' in case the router has only one LED or if the LED is multi-tasking. <br /><br /><b>Important</b> <br />This "
|
||||
"option requires LED to be defined in the system (if possible) to work properly. This requirement applies when the diode supports multiple tasks."
|
||||
msgstr ""
|
||||
"Выберите 'Нет', если маршрутизатор имеет только один диод или если диод поддерживает несколько задач. <br /><br /><b>Важно</b> <br />Данная "
|
||||
"настройка требует для корректной работы, чтобы диод был определен в системе (если это возможно). Это требование применяется, когда диод поддерживает несколько задач."
|
||||
|
||||
msgid ""
|
||||
"[3 - 59] second(s) <br /><br /><b>Important</b> <br />Messages "
|
||||
"are sent without verification and confirmation delivery of the message. Therefore, there is a risk of non-delivery of the message."
|
||||
msgstr ""
|
||||
"[3 - 59] секунд(ы) <br /><br /><b>Важно</b> <br />Сообщения "
|
||||
"отправляются без проверки и подтверждения доставки сообщения. Поэтому существует риск, что сообщение не будет доставлено."
|
||||
|
||||
msgid "No"
|
||||
msgstr "Нет"
|
||||
|
||||
msgid "Yes"
|
||||
msgstr "Да"
|
||||
|
||||
msgid "Merge algorithm"
|
||||
msgstr "Алгоритм склеивания"
|
||||
|
||||
msgid "Simple (merge without sorting)"
|
||||
msgstr "Простой (без сортировки)"
|
||||
|
||||
msgid "Advanced (merges with sorting)"
|
||||
msgstr "Продвинутый (с сортировкой)"
|
||||
|
||||
msgid "Phone number to be blurred"
|
||||
msgstr "Частично скрыть номер"
|
||||
|
||||
msgid "The last 5 digits of this number will be blurred."
|
||||
msgstr "Последние 5 цифр этого номера будут размыты."
|
||||
|
||||
msgid "Expect a decimal value between five and fifty-nine"
|
||||
msgstr "Ожидается десятичное значение от пяти до пятидесяти девяти"
|
||||
|
||||
msgid "Expect a decimal value between three and fifty-nine"
|
||||
msgstr "Ожидается десятичное значение от трёх до пятидесяти девяти"
|
||||
|
||||
msgid "Expect a decimal value"
|
||||
msgstr "Ожидается десятичное значение"
|
||||
|
||||
msgid "Direction of message merging"
|
||||
msgstr "Направление склеивания сообщений"
|
||||
|
||||
msgid "From beginning to end"
|
||||
msgstr "От начала до конца"
|
||||
|
||||
msgid "From end to beginning"
|
||||
msgstr "От конца к началу"
|
||||
|
||||
msgid "Save messages to a text file"
|
||||
msgstr "Сохранить сообщения в текстовый файл"
|
||||
|
||||
msgid "Save sms to txt file?"
|
||||
msgstr "Сохранить SMS в файл txt?"
|
||||
|
||||
msgid "Save as .txt file"
|
||||
msgstr "Сохранить как файл .txt"
|
||||
|
||||
msgid "Saving..."
|
||||
msgstr "Сохранение..."
|
||||
|
||||
msgid "Please wait.. Process of saving SMS message to a text file is in progress."
|
||||
msgstr "Подождите.. SMS сообщения записываются в файл."
|
||||
|
||||
msgid "This option allows to backup SMS messages or, for example, save messages that are not supported by the sms-tool."
|
||||
msgstr "Эта опция позволяет создавать резервные копии SMS-сообщений или, например, сохранять сообщения, не поддерживаемые sms-tool."
|
||||
|
||||
msgid "Delete all messages"
|
||||
msgstr "Удалить все сообщения"
|
||||
|
||||
msgid "This option allows you to delete all SMS messages when they are not visible in the 'Received Messages' tab."
|
||||
msgstr "Эта опция позволяет удалить все SMS-сообщения, если они не отображаются на вкладке 'Полученные сообщения'."
|
||||
|
||||
msgid "Saving SMS messages to a file failed. Please try again."
|
||||
msgstr "Не удалось сохранить SMS в файл. Пожалуйста, попробуйте еще раз."
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
zh_Hans
|
||||
@@ -0,0 +1,392 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Language: zh_Hans\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
msgid "SMS Messages"
|
||||
msgstr "短信"
|
||||
|
||||
msgid "Received Messages"
|
||||
msgstr "收件箱"
|
||||
|
||||
msgid "Send Messages"
|
||||
msgstr "发短信"
|
||||
|
||||
msgid "USSD"
|
||||
msgstr "USSD"
|
||||
|
||||
msgid "From"
|
||||
msgstr "来自"
|
||||
|
||||
msgid "Received"
|
||||
msgstr "收件时间"
|
||||
|
||||
msgid "Message"
|
||||
msgstr "短信内容"
|
||||
|
||||
msgid "Configuration"
|
||||
msgstr "配置"
|
||||
|
||||
msgid "AT Commands"
|
||||
msgstr "AT命令"
|
||||
|
||||
msgid "Configuration"
|
||||
msgstr "配置"
|
||||
|
||||
msgid "Please enter phone number"
|
||||
msgstr "请输入号码"
|
||||
|
||||
msgid "Please enter a message text"
|
||||
msgstr "请输入短信内容"
|
||||
|
||||
msgid "Reply"
|
||||
msgstr "回复"
|
||||
|
||||
msgid "Please enter a USSD code"
|
||||
msgstr "请输入USSD码"
|
||||
|
||||
msgid "USSD Codes"
|
||||
msgstr "USSD码"
|
||||
|
||||
msgid "Send to"
|
||||
msgstr "发送到"
|
||||
|
||||
msgid "Message text"
|
||||
msgstr "短信内容"
|
||||
|
||||
msgid "Send"
|
||||
msgstr "发送"
|
||||
|
||||
msgid "Send to number"
|
||||
msgstr "发送至号码"
|
||||
|
||||
msgid "to number"
|
||||
msgstr "号码"
|
||||
|
||||
msgid "to group"
|
||||
msgstr "群组"
|
||||
|
||||
msgid "SMS sent sucessfully"
|
||||
msgstr "短信发送成功"
|
||||
|
||||
msgid "Code to send"
|
||||
msgstr "发送的代码"
|
||||
|
||||
msgid "Send code"
|
||||
msgstr "发送代码"
|
||||
|
||||
msgid "SMS Settings"
|
||||
msgstr "短信设置"
|
||||
|
||||
msgid "USSD Codes Settings"
|
||||
msgstr "USSD码设置"
|
||||
|
||||
msgid "SMS reading port"
|
||||
msgstr "短信读取端口"
|
||||
|
||||
msgid "SMS sending port"
|
||||
msgstr "短信发送端口"
|
||||
|
||||
msgid "AT commands sending port"
|
||||
msgstr "发送AT命令端口"
|
||||
|
||||
msgid "AT Commands Settings"
|
||||
msgstr "AT命令设置"
|
||||
|
||||
msgid "Merge split messages"
|
||||
msgstr "合并分割短信"
|
||||
|
||||
msgid "Checking this option will make it easier to read the messages, but it will cause a discrepancy in the number of messages shown and received."
|
||||
msgstr "选中此选项将使阅读短信更容易,但会导致显示和接收的短信数量出现差异。"
|
||||
|
||||
msgid "USSD sending port"
|
||||
msgstr "USSD发送端口"
|
||||
|
||||
msgid "Sending USSD code in plain text"
|
||||
msgstr "纯文本发送USSD码"
|
||||
|
||||
msgid "Receive message without PDU decoding"
|
||||
msgstr "接收短信无需PDU解码"
|
||||
|
||||
msgid "Send the USSD code in plain text. Command is not being coded to the PDU."
|
||||
msgstr "以纯文本形式发送USSD代码,未编码到PDU"
|
||||
|
||||
msgid "Receive and display the message without decoding it as a PDU."
|
||||
msgstr "接收并显示短信而不将其解码为PDU"
|
||||
|
||||
msgid "Explanation of number and prefix"
|
||||
msgstr "号码和前缀说明"
|
||||
|
||||
msgid "In the tab for sending SMSes, show an explanation of the prefix and the correct phone number."
|
||||
msgstr "在发送短信的选项卡中,显示前缀说明和正确的电话号码。"
|
||||
|
||||
msgid "The phone number should be preceded by the country prefix (for Poland it is 48, without '+'). If the number is 5, 4 or 3 characters, it is treated as 'short' and should not be preceded by a country prefix."
|
||||
msgstr "电话号码前面应带有国家/地区前缀(波兰为48,不带“+“)。如果号码为5,4或3个字符,则被视为“短”,并且前面不应带有国家/地区前缀。"
|
||||
|
||||
msgid "The phone number should be preceded by the country prefix (for Poland it is 48, without +). If the number is 5, 4 or 3 characters, it is treated as.. short and should not be preceded by a country prefix."
|
||||
msgstr "电话号码前面应带有国家/地区前缀(波兰为48,不带“+”)。如果号码为5,4或3个字符,则被视为“短”,并且前面不应带有国家/地区前缀。"
|
||||
|
||||
msgid "Add prefix to phone number"
|
||||
msgstr "为号码添加前缀"
|
||||
|
||||
msgid "Automatically add prefix to the phone number field."
|
||||
msgstr "自动将前缀添加到电话号码字段"
|
||||
|
||||
msgid "Prefix number"
|
||||
msgstr "前缀号码"
|
||||
|
||||
msgid "Please specify the command to send"
|
||||
msgstr "请指定要发送的命令"
|
||||
|
||||
msgid "Please specify the code to send"
|
||||
msgstr "请指定要发送的代码"
|
||||
|
||||
msgid "Please set the port for communication with the modem"
|
||||
msgstr "请设置与调制解调器通信的端口"
|
||||
|
||||
msgid "User AT commands"
|
||||
msgstr "用户AT指令库"
|
||||
|
||||
msgid "Command to send"
|
||||
msgstr "发送的命令"
|
||||
|
||||
msgid "Clear form"
|
||||
msgstr "清除表格"
|
||||
|
||||
msgid "Send command"
|
||||
msgstr "发送命令"
|
||||
|
||||
msgid "Send code"
|
||||
msgstr "发送代码"
|
||||
|
||||
msgid "Reply"
|
||||
msgstr "回复"
|
||||
|
||||
msgid "Message storage area"
|
||||
msgstr "短信存储区"
|
||||
|
||||
msgid "Messages are stored in a specific location (for example, on the SIM card or modem memory), but other areas may also be available depending on the type of device."
|
||||
msgstr "短信存储在特定位置(例如, SIM卡或调制解调器内存上),但根据设备类型,其他区域也可能可用"
|
||||
|
||||
msgid "SIM card"
|
||||
msgstr "SIM卡"
|
||||
|
||||
msgid "Modem memory"
|
||||
msgstr "调制解调器内存"
|
||||
|
||||
msgid "Messages store in"
|
||||
msgstr "短信存储在"
|
||||
|
||||
msgid "Messages (inbox / maximum)"
|
||||
msgstr "短信条数(收件箱/最多)"
|
||||
|
||||
msgid "Delete selected"
|
||||
msgstr "删除所选"
|
||||
|
||||
msgid "Delete message(s)"
|
||||
msgstr "删除短信"
|
||||
|
||||
msgid "Delete all"
|
||||
msgstr "删除所有"
|
||||
|
||||
msgid "Refresh messages"
|
||||
msgstr "刷新短信"
|
||||
|
||||
msgid "Please select the message(s) to be deleted"
|
||||
msgstr "请选择要删除的短信"
|
||||
|
||||
msgid "Delete selected message(s)?"
|
||||
msgstr "删除选定的短信?"
|
||||
|
||||
msgid "Delete all the messages?"
|
||||
msgstr "删除所有短信?"
|
||||
|
||||
msgid "User interface for reading messages using sms-tool. More information about the sms-tool on the %seko.one.pl forum%s."
|
||||
msgstr "使用短信工具读取短信的用户界面。有关短信工具的更多信息,请访问%sforum eko.one.pl%s。"
|
||||
|
||||
msgid "User interface for sending messages using sms-tool. More information about the sms-tool on the %seko.one.pl forum%s."
|
||||
msgstr "使用短信工具发送短信的用户界面。有关短信工具的更多信息,请访问%sforum eko.one.pl%s。"
|
||||
|
||||
msgid "User interface for sending AT commands using sms-tool. More information about the sms-tool on the %seko.one.pl forum%s."
|
||||
msgstr "使用短信工具发送AT命令的用户界面。有关短信工具的更多信息,请访问%sforum eko.one.pl%s。"
|
||||
|
||||
msgid "User interface for sending USSD codes using sms-tool. More information about the sms-tool on the %seko.one.pl forum%s."
|
||||
msgstr "使用短信工具发送USSD码的用户界面。有关短信工具的更多信息,请访问%sforum eko.one.pl%s。"
|
||||
|
||||
msgid "Configuration sms-tool"
|
||||
msgstr "SMS工具配置"
|
||||
|
||||
msgid "Configuration panel for sms-tool and gui application."
|
||||
msgstr "SMS工具和GUI的配置面板"
|
||||
|
||||
msgid "Port for communication with the modem"
|
||||
msgstr "与调制解调器通信的端口"
|
||||
|
||||
msgid "Select one of the available ttyUSBX ports."
|
||||
msgstr "选择一个可用的ttyUSB端口与调制解调器通信"
|
||||
|
||||
msgid "Please select a port"
|
||||
msgstr "请选择端口"
|
||||
|
||||
msgid "User contacts"
|
||||
msgstr "用户联系人库"
|
||||
|
||||
msgid "Enable group messaging"
|
||||
msgstr "启用群组短信"
|
||||
|
||||
msgid "This option allows you to send one message to all contacts in the user's contact list."
|
||||
msgstr "此选项允许您向用户联系人列表中的所有联系人发送一条短信"
|
||||
|
||||
msgid "Message sending delay"
|
||||
msgstr "延迟发送短信"
|
||||
|
||||
msgid "[Bot] Message sent to number:"
|
||||
msgstr "[Bot] 短信已发送至号码:"
|
||||
|
||||
msgid "User USSD codes"
|
||||
msgstr "用户USSD代码库"
|
||||
|
||||
msgid "Each line must have the following format: 'Contact name;phone number'. For user convenience, the file is saved to the location <code>/etc/modem/phonebook.user</code>."
|
||||
msgstr "每行必须采用以下格式: “联系人姓名;电话号码”。为了方便用户,文件保存到以下位置 <code>/etc/modem/phonebook.user</code>"
|
||||
|
||||
msgid "Each line must have the following format: 'At command description;AT command'. For user convenience, the file is saved to the location <code>/etc/modem/atcmmds.user</code>."
|
||||
msgstr "每行必须具有以下格式:“At 命令描述;AT 命令”。为了方便用户,文件保存到以下位置 <code>/etc/modem/atcmmds.user</code>"
|
||||
|
||||
msgid "Each line must have the following format: 'Code description;code'. For user convenience, the file is saved to the location <code>/etc/modem/ussdcodes.user</code>."
|
||||
msgstr "每行必须采用以下格式:“代码描述;代码”。为了方便用户,文件保存到以下位置 <code>/etc/modem/ussdcodes.user</code>."
|
||||
|
||||
msgid "Press [Enter] to send the command, press [Delete] to delete the command"
|
||||
msgstr "按[Enter]发送命令, 按[Delete]删除命令"
|
||||
|
||||
msgid "Press [Enter] to send the code, press [Delete] to delete the code"
|
||||
msgstr "按[Enter]发送代码, 按[Delete]删除代码"
|
||||
|
||||
msgid "Press [Delete] to delete the phone number"
|
||||
msgstr "按[Delete]删除电话号码"
|
||||
|
||||
msgid "Press [Delete] to delete the content of the message"
|
||||
msgstr "按[Delete]删除短信内容"
|
||||
|
||||
msgid "Notification Settings"
|
||||
msgstr "通知设置"
|
||||
|
||||
msgid "The LED informs about a new message. Before activating this function, please config and save the SMS reading port, time to check SMS inbox and select the notification LED."
|
||||
msgstr "LED通知有新消息。在激活此功能之前,请配置并保存短信读取端口、查看短信收件箱的时间以及选择通知LED。"
|
||||
|
||||
msgid "Check inbox every minute(s)"
|
||||
msgstr "每隔多少分钟检查收件箱"
|
||||
|
||||
msgid "Specify how many minutes you want your inbox to be checked."
|
||||
msgstr "这将将按照选定的时间间隔检查收件箱有无新短信。"
|
||||
|
||||
msgid "Notification LED"
|
||||
msgstr "通知LED"
|
||||
|
||||
msgid "Select the notification LED."
|
||||
msgstr "选择通知LED。"
|
||||
|
||||
msgid "Notify new messages"
|
||||
msgstr "新消息通知"
|
||||
|
||||
msgid "Restart the inbox checking process every"
|
||||
msgstr "每隔多少小时重启收件箱进程"
|
||||
|
||||
msgid "The process will restart at the selected time interval. This will eliminate the delay in checking your inbox."
|
||||
msgstr "这将将按照选定的时间间隔重新启动,这将消除检查收件箱的延迟。"
|
||||
|
||||
msgid "4h"
|
||||
msgstr "4小时"
|
||||
|
||||
msgid "6h"
|
||||
msgstr "6小时"
|
||||
|
||||
msgid "8h"
|
||||
msgstr "8小时"
|
||||
|
||||
msgid "12h"
|
||||
msgstr "12小时"
|
||||
|
||||
msgid "The diode is dedicated only to these notifications"
|
||||
msgstr "LED仅用于短信通知"
|
||||
|
||||
msgid ""
|
||||
"Select 'No' in case the router has only one LED or if the LED is multi-tasking. <br /><br /><b>Important</b> <br />This "
|
||||
"option requires LED to be defined in the system (if possible) to work properly. This requirement applies when the diode supports multiple tasks."
|
||||
msgstr ""
|
||||
"如果路由器只有一个 LED 或 LED 处于多任务状态,请选择“否”。<br /><br /><b>这很重要</b> <br />"
|
||||
"选项需要在系统中定义 LED(如果可以)才能正常工作。当二极管支持多个任务时,此要求适用。"
|
||||
|
||||
msgid ""
|
||||
"[3 - 59] second(s) <br /><br /><b>Important</b> <br />Messages "
|
||||
"are sent without verification and confirmation delivery of the message. Therefore, there is a risk of non-delivery of the message."
|
||||
msgstr ""
|
||||
"[3 - 59] 秒 <br /><br /><b>重要</b> <br />短信 "
|
||||
"在没有验证或确认短信传递的情况下发送,因此存在短信无法送达的风险。"
|
||||
|
||||
msgid "No"
|
||||
msgstr "No"
|
||||
|
||||
msgid "Yes"
|
||||
msgstr "Yes"
|
||||
|
||||
msgid "Merge algorithm"
|
||||
msgstr "合并算法"
|
||||
|
||||
msgid "Simple (merge without sorting)"
|
||||
msgstr "简单 (合并而不排序)"
|
||||
|
||||
msgid "Advanced (merges with sorting)"
|
||||
msgstr "高级 (排序合并)"
|
||||
|
||||
msgid "Phone number to be blurred"
|
||||
msgstr "电话号码模糊处理"
|
||||
|
||||
msgid "The last 5 digits of this number will be blurred."
|
||||
msgstr "该号码的最后5位数字将模糊处理"
|
||||
|
||||
msgid "Expect a decimal value between five and fifty-nine"
|
||||
msgstr "预计小数值介于 5 到 59 之间"
|
||||
|
||||
msgid "Expect a decimal value between three and fifty-nine"
|
||||
msgstr "预计小数值介于 3 到 59 之间"
|
||||
|
||||
msgid "Expect a decimal value"
|
||||
msgstr "期望一个十进制值"
|
||||
|
||||
msgid "Direction of message merging"
|
||||
msgstr "短信合并方向"
|
||||
|
||||
msgid "From beginning to end"
|
||||
msgstr "从开始到结束"
|
||||
|
||||
msgid "From end to beginning"
|
||||
msgstr "从结束到开始"
|
||||
|
||||
msgid "Save messages to a text file"
|
||||
msgstr "将短信保存到文本文件"
|
||||
|
||||
msgid "Save sms to txt file?"
|
||||
msgstr "短信保存到文本文件?"
|
||||
|
||||
msgid "Save as .txt file"
|
||||
msgstr "保存为 .txt 文件"
|
||||
|
||||
msgid "Saving..."
|
||||
msgstr "保存中..."
|
||||
|
||||
msgid "Please wait.. Process of saving SMS message to a text file is in progress."
|
||||
msgstr "请稍候.. 正在将短信保存到文本文件"
|
||||
|
||||
msgid "This option allows to backup SMS messages or, for example, save messages that are not supported by the sms-tool."
|
||||
msgstr "此选项允许备份SMS短信。列如,保存SMS工具不支持的短信"
|
||||
|
||||
msgid "Delete all messages"
|
||||
msgstr "删除所有短信"
|
||||
|
||||
msgid "This option allows you to delete all SMS messages when they are not visible in the 'Received Messages' tab."
|
||||
msgstr "此选项允许您删除“已接收短信”选项卡中不可见的所有短信"
|
||||
|
||||
msgid "Saving SMS messages to a file failed. Please try again."
|
||||
msgstr "SMS短信保存到文件失败,请再试一次"
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
|
||||
config sms_tool_js
|
||||
option storage 'SM'
|
||||
option mergesms '0'
|
||||
option pnumber '48'
|
||||
option prefix '1'
|
||||
option lednotify '0'
|
||||
option ussd '0'
|
||||
option pdu '0'
|
||||
option readport ''
|
||||
option sendport ''
|
||||
option sendingroup '0'
|
||||
option information '1'
|
||||
option ussdport ''
|
||||
option atport ''
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Copyright 2023 Rafał Wabik (IceG) - From eko.one.pl forum
|
||||
# Licensed to the GNU General Public License v3.0.
|
||||
|
||||
|
||||
USE_PROCD=1
|
||||
START=95
|
||||
STOP=01
|
||||
|
||||
|
||||
start_service() {
|
||||
procd_open_instance
|
||||
procd_set_param command /bin/sh "/sbin/sms_led.sh"
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
|
||||
service_triggers()
|
||||
{
|
||||
procd_add_reload_trigger "sms_tool_js"
|
||||
}
|
||||
|
||||
|
||||
stop_service() {
|
||||
for KILLPID in `ps | grep 'my_new_sms' | awk ' { print $1;}'`; do
|
||||
(kill -9 $KILLPID >/dev/null 2>&1 )&
|
||||
done
|
||||
sleep 1
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
restart_service() {
|
||||
stop_service
|
||||
start_service
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
restart
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
Signal Quality/Strength ➜ AT+CSQ;AT+CSQ
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
Openwrt user;48500500500
|
||||
@@ -0,0 +1,5 @@
|
||||
Stan konta w sieci Play;*101#
|
||||
Stan konta w sieci Plus;*100#
|
||||
Stan pakietu internetowego w Premium Mobile;*136#
|
||||
Stan konta w sieci Orange;*124*#
|
||||
Stan konta w sieci T-Mobile;*101#
|
||||
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
# Copyright 2023 Rafał Wabik (IceG) - From eko.one.pl forum
|
||||
# Licensed to the GNU General Public License v3.0.
|
||||
|
||||
/etc/init.d/my_new_sms stop 2>&1 &
|
||||
/etc/init.d/my_new_sms disable 2>&1 &
|
||||
/etc/init.d/my_new_sms disable 2>&1 &
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
# Copyright 2023 Rafał Wabik (IceG) - From eko.one.pl forum
|
||||
# Licensed to the GNU General Public License v3.0.
|
||||
|
||||
chmod +x /sbin/sms_led.sh 2>&1 &
|
||||
chmod +x /sbin/smstool_led.sh 2>&1 &
|
||||
chmod +x /sbin/new_cron_sync.sh 2>&1 &
|
||||
chmod +x /etc/uci-defaults/off_sms.sh 2>&1 &
|
||||
chmod +x /etc/uci-defaults/setup_sms_tool_js.sh 2>&1 &
|
||||
chmod +x /etc/init.d/my_new_sms 2>&1 &
|
||||
|
||||
rm -rf /tmp/luci-indexcache 2>&1 &
|
||||
rm -rf /tmp/luci-modulecache/ 2>&1 &
|
||||
exit 0
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
# Copyright 2023-2025 Rafał Wabik (IceG) - From eko.one.pl forum
|
||||
# Licensed to the GNU General Public License v3.0.
|
||||
|
||||
sleep 2
|
||||
|
||||
[ -e /etc/crontabs/root ] || touch /etc/crontabs/root
|
||||
|
||||
SLED=$(uci -q get sms_tool_js.@sms_tool_js[0].lednotify)
|
||||
if [ "x$SLED" != "x1" ]; then
|
||||
if grep -q "my_new_sms" /etc/crontabs/root; then
|
||||
grep -v "/etc/init.d/my_new_sms" /etc/crontabs/root > /tmp/new_cron
|
||||
mv /tmp/new_cron /etc/crontabs/root
|
||||
/etc/init.d/cron restart
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if ! grep -q "my_new_sms" /etc/crontabs/root; then
|
||||
PTR=$(uci -q get sms_tool_js.@sms_tool_js[0].prestart)
|
||||
echo "1 */$PTR * * * /etc/init.d/my_new_sms enable && /etc/init.d/my_new_sms restart" >> /etc/crontabs/root
|
||||
/etc/init.d/cron restart
|
||||
fi
|
||||
|
||||
exit 0
|
||||
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
# Copyright 2023-2025 Rafał Wabik (IceG) - From eko.one.pl forum
|
||||
# Licensed to the GNU General Public License v3.0.
|
||||
|
||||
sleep 2
|
||||
CT=$(uci -q get sms_tool_js.@sms_tool_js[0].checktime)
|
||||
TX=$(echo $CT | tr -dc '0-9')
|
||||
TM=$(($TX * 60))
|
||||
|
||||
while [ 1 ]; do
|
||||
LED=$(uci -q get sms_tool_js.@sms_tool_js[0].lednotify)
|
||||
if [ $LED == "1" ]; then
|
||||
sleep $TM
|
||||
(/sbin/smstool_led.sh >/dev/null 2>&1 )&
|
||||
continue
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
|
||||
exit 0
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
#!/bin/sh
|
||||
# Copyright 2023-2025 Rafał Wabik (IceG) - From eko.one.pl forum
|
||||
# Licensed to the GNU General Public License v3.0.
|
||||
|
||||
DEV=$(uci -q get sms_tool_js.@sms_tool_js[0].readport)
|
||||
LEDX=$(uci -q get sms_tool_js.@sms_tool_js[0].smsled)
|
||||
MEM=$(uci -q get sms_tool_js.@sms_tool_js[0].storage)
|
||||
STX=$(sms_tool -s $MEM -d $DEV status | cut -c23-27)
|
||||
SMS=$(echo $STX | tr -dc '0-9')
|
||||
SMSC=$(uci -q get sms_tool_js.@sms_tool_js[0].sms_count)
|
||||
SMSD=$(echo $SMSC | tr -dc '0-9')
|
||||
LEDT="/sys/class/leds/$LEDX/trigger"
|
||||
LEDON="/sys/class/leds/$LEDX/delay_on"
|
||||
LEDOFF="/sys/class/leds/$LEDX/delay_off"
|
||||
|
||||
TMON=$((1 * 1000))
|
||||
TMOFF=$((5 * 1000))
|
||||
|
||||
if [ $SMS == $SMSD ]; then
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ $SMS -gt $SMSD ]; then
|
||||
|
||||
echo timer > $LEDT
|
||||
echo $TMOFF > $LEDOFF
|
||||
echo $TMON > $LEDON
|
||||
exit 0
|
||||
|
||||
fi
|
||||
|
||||
|
||||
exit 0
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
# Copyright 2023 Rafał Wabik (IceG) - From eko.one.pl forum
|
||||
# Licensed to the GNU General Public License v3.0.
|
||||
@@ -0,0 +1,69 @@
|
||||
{
|
||||
"admin/modem": {
|
||||
"title": "Modem",
|
||||
"order": 30,
|
||||
"action": {
|
||||
"type": "firstchild",
|
||||
"recurse": true
|
||||
}
|
||||
},
|
||||
|
||||
"admin/modem/luci-app-sms-tool-js": {
|
||||
"title": "SMS Messages",
|
||||
"order": 10,
|
||||
"action": {
|
||||
"type": "alias",
|
||||
"path": "admin/modem/luci-app-sms-tool-js/readsms"
|
||||
},
|
||||
"depends": {
|
||||
"acl": [ "luci-app-sms-tool-js" ],
|
||||
"uci": { "sms_tool_js": true }
|
||||
}
|
||||
},
|
||||
|
||||
"admin/modem/luci-app-sms-tool-js/readsms": {
|
||||
"title": "Received Messages",
|
||||
"order": 10,
|
||||
"action": {
|
||||
"type": "view",
|
||||
"path": "modem/readsms"
|
||||
}
|
||||
},
|
||||
|
||||
"admin/modem/luci-app-sms-tool-js/sendsms": {
|
||||
"title": "Send Messages",
|
||||
"order": 20,
|
||||
"action": {
|
||||
"type": "view",
|
||||
"path": "modem/sendsms"
|
||||
}
|
||||
},
|
||||
|
||||
"admin/modem/luci-app-sms-tool-js/sendussd": {
|
||||
"title": "USSD Codes",
|
||||
"order": 30,
|
||||
"action": {
|
||||
"type": "view",
|
||||
"path": "modem/sendussd"
|
||||
}
|
||||
},
|
||||
|
||||
"admin/modem/luci-app-sms-tool-js/sendat": {
|
||||
"title": "AT Commands",
|
||||
"order": 40,
|
||||
"action": {
|
||||
"type": "view",
|
||||
"path": "modem/sendat"
|
||||
}
|
||||
},
|
||||
|
||||
"admin/modem/luci-app-sms-tool-js/smsconfig": {
|
||||
"title": "Configuration",
|
||||
"order": 50,
|
||||
"action": {
|
||||
"type": "view",
|
||||
"path": "modem/smsconfig"
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"luci-app-sms-tool-js": {
|
||||
"description": "Grant access to LuCI app sms-tool",
|
||||
"read": {
|
||||
"cgi-io": [ "exec" ],
|
||||
"file": {
|
||||
"/sys/class/leds": [ "list" ],
|
||||
"/usr/bin/sms_tool": [ "exec" ],
|
||||
"/etc/init.d/my_new_sms start" : [ "exec" ],
|
||||
"/etc/init.d/my_new_sms stop" : [ "exec" ],
|
||||
"/etc/init.d/my_new_sms enable" : [ "exec" ],
|
||||
"/etc/init.d/my_new_sms disable" : [ "exec" ],
|
||||
"/etc/init.d/my_new_sms restart" : [ "exec" ],
|
||||
"/etc/init.d/led restart" : [ "exec" ],
|
||||
"/sbin/smstool_led.sh": [ "exec" ],
|
||||
"/sbin/sms_led.sh": [ "exec" ],
|
||||
"/sbin/new_cron_sync.sh": [ "exec" ],
|
||||
"/usr/bin/usr_script1.sh": [ "read" ],
|
||||
"/etc/sms_tool_js": [ "read" ],
|
||||
"/tmp/mysms.txt": [ "read" ],
|
||||
"/etc/modem/atcmmds.user": [ "read" ],
|
||||
"/etc/modem/phonebook.user": [ "read" ],
|
||||
"/etc/modem/ussdcodes.user": [ "read" ]
|
||||
},
|
||||
"uci": [ "sms_tool_js", "luci-app-sms-tool-js" ]
|
||||
},
|
||||
"write": {
|
||||
"file": {
|
||||
"/etc/sms_tool_js": [ "write" ],
|
||||
"/sys/class/leds/*/brightness": [ "write" ],
|
||||
"/tmp/mysms.txt": [ "write" ],
|
||||
"/usr/bin/usr_script1.sh": [ "write" ],
|
||||
"/etc/modem/atcmmds.user": [ "write" ],
|
||||
"/etc/modem/phonebook.user": [ "write" ],
|
||||
"/etc/modem/ussdcodes.user": [ "write" ]
|
||||
},
|
||||
"uci": [ "sms_tool_js", "luci-app-sms-tool-js" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user