mirror of
https://github.com/HighCapable/YukiHookAPI-ProjectBuilder.git
synced 2025-10-19 17:59:31 +08:00
Initial commit
This commit is contained in:
13559
src/content/css/mdui.css
Normal file
13559
src/content/css/mdui.css
Normal file
File diff suppressed because it is too large
Load Diff
1
src/content/css/mdui.css.map
Normal file
1
src/content/css/mdui.css.map
Normal file
File diff suppressed because one or more lines are too long
6
src/content/css/mdui.min.css
vendored
Normal file
6
src/content/css/mdui.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
src/content/css/mdui.min.css.map
Normal file
1
src/content/css/mdui.min.css.map
Normal file
File diff suppressed because one or more lines are too long
201
src/content/fonts/roboto/LICENSE.txt
Normal file
201
src/content/fonts/roboto/LICENSE.txt
Normal file
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
BIN
src/content/fonts/roboto/Roboto-Black.woff
Normal file
BIN
src/content/fonts/roboto/Roboto-Black.woff
Normal file
Binary file not shown.
BIN
src/content/fonts/roboto/Roboto-Black.woff2
Normal file
BIN
src/content/fonts/roboto/Roboto-Black.woff2
Normal file
Binary file not shown.
BIN
src/content/fonts/roboto/Roboto-BlackItalic.woff
Normal file
BIN
src/content/fonts/roboto/Roboto-BlackItalic.woff
Normal file
Binary file not shown.
BIN
src/content/fonts/roboto/Roboto-BlackItalic.woff2
Normal file
BIN
src/content/fonts/roboto/Roboto-BlackItalic.woff2
Normal file
Binary file not shown.
BIN
src/content/fonts/roboto/Roboto-Bold.woff
Normal file
BIN
src/content/fonts/roboto/Roboto-Bold.woff
Normal file
Binary file not shown.
BIN
src/content/fonts/roboto/Roboto-Bold.woff2
Normal file
BIN
src/content/fonts/roboto/Roboto-Bold.woff2
Normal file
Binary file not shown.
BIN
src/content/fonts/roboto/Roboto-BoldItalic.woff
Normal file
BIN
src/content/fonts/roboto/Roboto-BoldItalic.woff
Normal file
Binary file not shown.
BIN
src/content/fonts/roboto/Roboto-BoldItalic.woff2
Normal file
BIN
src/content/fonts/roboto/Roboto-BoldItalic.woff2
Normal file
Binary file not shown.
BIN
src/content/fonts/roboto/Roboto-Light.woff
Normal file
BIN
src/content/fonts/roboto/Roboto-Light.woff
Normal file
Binary file not shown.
BIN
src/content/fonts/roboto/Roboto-Light.woff2
Normal file
BIN
src/content/fonts/roboto/Roboto-Light.woff2
Normal file
Binary file not shown.
BIN
src/content/fonts/roboto/Roboto-LightItalic.woff
Normal file
BIN
src/content/fonts/roboto/Roboto-LightItalic.woff
Normal file
Binary file not shown.
BIN
src/content/fonts/roboto/Roboto-LightItalic.woff2
Normal file
BIN
src/content/fonts/roboto/Roboto-LightItalic.woff2
Normal file
Binary file not shown.
BIN
src/content/fonts/roboto/Roboto-Medium.woff
Normal file
BIN
src/content/fonts/roboto/Roboto-Medium.woff
Normal file
Binary file not shown.
BIN
src/content/fonts/roboto/Roboto-Medium.woff2
Normal file
BIN
src/content/fonts/roboto/Roboto-Medium.woff2
Normal file
Binary file not shown.
BIN
src/content/fonts/roboto/Roboto-MediumItalic.woff
Normal file
BIN
src/content/fonts/roboto/Roboto-MediumItalic.woff
Normal file
Binary file not shown.
BIN
src/content/fonts/roboto/Roboto-MediumItalic.woff2
Normal file
BIN
src/content/fonts/roboto/Roboto-MediumItalic.woff2
Normal file
Binary file not shown.
BIN
src/content/fonts/roboto/Roboto-Regular.woff
Normal file
BIN
src/content/fonts/roboto/Roboto-Regular.woff
Normal file
Binary file not shown.
BIN
src/content/fonts/roboto/Roboto-Regular.woff2
Normal file
BIN
src/content/fonts/roboto/Roboto-Regular.woff2
Normal file
Binary file not shown.
BIN
src/content/fonts/roboto/Roboto-RegularItalic.woff
Normal file
BIN
src/content/fonts/roboto/Roboto-RegularItalic.woff
Normal file
Binary file not shown.
BIN
src/content/fonts/roboto/Roboto-RegularItalic.woff2
Normal file
BIN
src/content/fonts/roboto/Roboto-RegularItalic.woff2
Normal file
Binary file not shown.
BIN
src/content/fonts/roboto/Roboto-Thin.woff
Normal file
BIN
src/content/fonts/roboto/Roboto-Thin.woff
Normal file
Binary file not shown.
BIN
src/content/fonts/roboto/Roboto-Thin.woff2
Normal file
BIN
src/content/fonts/roboto/Roboto-Thin.woff2
Normal file
Binary file not shown.
BIN
src/content/fonts/roboto/Roboto-ThinItalic.woff
Normal file
BIN
src/content/fonts/roboto/Roboto-ThinItalic.woff
Normal file
Binary file not shown.
BIN
src/content/fonts/roboto/Roboto-ThinItalic.woff2
Normal file
BIN
src/content/fonts/roboto/Roboto-ThinItalic.woff2
Normal file
Binary file not shown.
393
src/content/icons/material-icons/LICENSE.txt
Normal file
393
src/content/icons/material-icons/LICENSE.txt
Normal file
@@ -0,0 +1,393 @@
|
||||
Attribution 4.0 International
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons Corporation ("Creative Commons") is not a law firm and
|
||||
does not provide legal services or legal advice. Distribution of
|
||||
Creative Commons public licenses does not create a lawyer-client or
|
||||
other relationship. Creative Commons makes its licenses and related
|
||||
information available on an "as-is" basis. Creative Commons gives no
|
||||
warranties regarding its licenses, any material licensed under their
|
||||
terms and conditions, or any related information. Creative Commons
|
||||
disclaims all liability for damages resulting from their use to the
|
||||
fullest extent possible.
|
||||
|
||||
Using Creative Commons Public Licenses
|
||||
|
||||
Creative Commons public licenses provide a standard set of terms and
|
||||
conditions that creators and other rights holders may use to share
|
||||
original works of authorship and other material subject to copyright
|
||||
and certain other rights specified in the public license below. The
|
||||
following considerations are for informational purposes only, are not
|
||||
exhaustive, and do not form part of our licenses.
|
||||
|
||||
Considerations for licensors: Our public licenses are
|
||||
intended for use by those authorized to give the public
|
||||
permission to use material in ways otherwise restricted by
|
||||
copyright and certain other rights. Our licenses are
|
||||
irrevocable. Licensors should read and understand the terms
|
||||
and conditions of the license they choose before applying it.
|
||||
Licensors should also secure all rights necessary before
|
||||
applying our licenses so that the public can reuse the
|
||||
material as expected. Licensors should clearly mark any
|
||||
material not subject to the license. This includes other CC-
|
||||
licensed material, or material used under an exception or
|
||||
limitation to copyright. More considerations for licensors:
|
||||
wiki.creativecommons.org/Considerations_for_licensors
|
||||
|
||||
Considerations for the public: By using one of our public
|
||||
licenses, a licensor grants the public permission to use the
|
||||
licensed material under specified terms and conditions. If
|
||||
the licensor's permission is not necessary for any reason--for
|
||||
example, because of any applicable exception or limitation to
|
||||
copyright--then that use is not regulated by the license. Our
|
||||
licenses grant only permissions under copyright and certain
|
||||
other rights that a licensor has authority to grant. Use of
|
||||
the licensed material may still be restricted for other
|
||||
reasons, including because others have copyright or other
|
||||
rights in the material. A licensor may make special requests,
|
||||
such as asking that all changes be marked or described.
|
||||
Although not required by our licenses, you are encouraged to
|
||||
respect those requests where reasonable. More_considerations
|
||||
for the public:
|
||||
wiki.creativecommons.org/Considerations_for_licensees
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons Attribution 4.0 International Public License
|
||||
|
||||
By exercising the Licensed Rights (defined below), You accept and agree
|
||||
to be bound by the terms and conditions of this Creative Commons
|
||||
Attribution 4.0 International Public License ("Public License"). To the
|
||||
extent this Public License may be interpreted as a contract, You are
|
||||
granted the Licensed Rights in consideration of Your acceptance of
|
||||
these terms and conditions, and the Licensor grants You such rights in
|
||||
consideration of benefits the Licensor receives from making the
|
||||
Licensed Material available under these terms and conditions.
|
||||
|
||||
|
||||
Section 1 -- Definitions.
|
||||
|
||||
a. Adapted Material means material subject to Copyright and Similar
|
||||
Rights that is derived from or based upon the Licensed Material
|
||||
and in which the Licensed Material is translated, altered,
|
||||
arranged, transformed, or otherwise modified in a manner requiring
|
||||
permission under the Copyright and Similar Rights held by the
|
||||
Licensor. For purposes of this Public License, where the Licensed
|
||||
Material is a musical work, performance, or sound recording,
|
||||
Adapted Material is always produced where the Licensed Material is
|
||||
synched in timed relation with a moving image.
|
||||
|
||||
b. Adapter's License means the license You apply to Your Copyright
|
||||
and Similar Rights in Your contributions to Adapted Material in
|
||||
accordance with the terms and conditions of this Public License.
|
||||
|
||||
c. Copyright and Similar Rights means copyright and/or similar rights
|
||||
closely related to copyright including, without limitation,
|
||||
performance, broadcast, sound recording, and Sui Generis Database
|
||||
Rights, without regard to how the rights are labeled or
|
||||
categorized. For purposes of this Public License, the rights
|
||||
specified in Section 2(b)(1)-(2) are not Copyright and Similar
|
||||
Rights.
|
||||
|
||||
d. Effective Technological Measures means those measures that, in the
|
||||
absence of proper authority, may not be circumvented under laws
|
||||
fulfilling obligations under Article 11 of the WIPO Copyright
|
||||
Treaty adopted on December 20, 1996, and/or similar international
|
||||
agreements.
|
||||
|
||||
e. Exceptions and Limitations means fair use, fair dealing, and/or
|
||||
any other exception or limitation to Copyright and Similar Rights
|
||||
that applies to Your use of the Licensed Material.
|
||||
|
||||
f. Licensed Material means the artistic or literary work, database,
|
||||
or other material to which the Licensor applied this Public
|
||||
License.
|
||||
|
||||
g. Licensed Rights means the rights granted to You subject to the
|
||||
terms and conditions of this Public License, which are limited to
|
||||
all Copyright and Similar Rights that apply to Your use of the
|
||||
Licensed Material and that the Licensor has authority to license.
|
||||
|
||||
h. Licensor means the individual(s) or entity(ies) granting rights
|
||||
under this Public License.
|
||||
|
||||
i. Share means to provide material to the public by any means or
|
||||
process that requires permission under the Licensed Rights, such
|
||||
as reproduction, public display, public performance, distribution,
|
||||
dissemination, communication, or importation, and to make material
|
||||
available to the public including in ways that members of the
|
||||
public may access the material from a place and at a time
|
||||
individually chosen by them.
|
||||
|
||||
j. Sui Generis Database Rights means rights other than copyright
|
||||
resulting from Directive 96/9/EC of the European Parliament and of
|
||||
the Council of 11 March 1996 on the legal protection of databases,
|
||||
as amended and/or succeeded, as well as other essentially
|
||||
equivalent rights anywhere in the world.
|
||||
|
||||
k. You means the individual or entity exercising the Licensed Rights
|
||||
under this Public License. Your has a corresponding meaning.
|
||||
|
||||
|
||||
Section 2 -- Scope.
|
||||
|
||||
a. License grant.
|
||||
|
||||
1. Subject to the terms and conditions of this Public License,
|
||||
the Licensor hereby grants You a worldwide, royalty-free,
|
||||
non-sublicensable, non-exclusive, irrevocable license to
|
||||
exercise the Licensed Rights in the Licensed Material to:
|
||||
|
||||
a. reproduce and Share the Licensed Material, in whole or
|
||||
in part; and
|
||||
|
||||
b. produce, reproduce, and Share Adapted Material.
|
||||
|
||||
2. Exceptions and Limitations. For the avoidance of doubt, where
|
||||
Exceptions and Limitations apply to Your use, this Public
|
||||
License does not apply, and You do not need to comply with
|
||||
its terms and conditions.
|
||||
|
||||
3. Term. The term of this Public License is specified in Section
|
||||
6(a).
|
||||
|
||||
4. Media and formats; technical modifications allowed. The
|
||||
Licensor authorizes You to exercise the Licensed Rights in
|
||||
all media and formats whether now known or hereafter created,
|
||||
and to make technical modifications necessary to do so. The
|
||||
Licensor waives and/or agrees not to assert any right or
|
||||
authority to forbid You from making technical modifications
|
||||
necessary to exercise the Licensed Rights, including
|
||||
technical modifications necessary to circumvent Effective
|
||||
Technological Measures. For purposes of this Public License,
|
||||
simply making modifications authorized by this Section 2(a)
|
||||
(4) never produces Adapted Material.
|
||||
|
||||
5. Downstream recipients.
|
||||
|
||||
a. Offer from the Licensor -- Licensed Material. Every
|
||||
recipient of the Licensed Material automatically
|
||||
receives an offer from the Licensor to exercise the
|
||||
Licensed Rights under the terms and conditions of this
|
||||
Public License.
|
||||
|
||||
b. No downstream restrictions. You may not offer or impose
|
||||
any additional or different terms or conditions on, or
|
||||
apply any Effective Technological Measures to, the
|
||||
Licensed Material if doing so restricts exercise of the
|
||||
Licensed Rights by any recipient of the Licensed
|
||||
Material.
|
||||
|
||||
6. No endorsement. Nothing in this Public License constitutes or
|
||||
may be construed as permission to assert or imply that You
|
||||
are, or that Your use of the Licensed Material is, connected
|
||||
with, or sponsored, endorsed, or granted official status by,
|
||||
the Licensor or others designated to receive attribution as
|
||||
provided in Section 3(a)(1)(A)(i).
|
||||
|
||||
b. Other rights.
|
||||
|
||||
1. Moral rights, such as the right of integrity, are not
|
||||
licensed under this Public License, nor are publicity,
|
||||
privacy, and/or other similar personality rights; however, to
|
||||
the extent possible, the Licensor waives and/or agrees not to
|
||||
assert any such rights held by the Licensor to the limited
|
||||
extent necessary to allow You to exercise the Licensed
|
||||
Rights, but not otherwise.
|
||||
|
||||
2. Patent and trademark rights are not licensed under this
|
||||
Public License.
|
||||
|
||||
3. To the extent possible, the Licensor waives any right to
|
||||
collect royalties from You for the exercise of the Licensed
|
||||
Rights, whether directly or through a collecting society
|
||||
under any voluntary or waivable statutory or compulsory
|
||||
licensing scheme. In all other cases the Licensor expressly
|
||||
reserves any right to collect such royalties.
|
||||
|
||||
|
||||
Section 3 -- License Conditions.
|
||||
|
||||
Your exercise of the Licensed Rights is expressly made subject to the
|
||||
following conditions.
|
||||
|
||||
a. Attribution.
|
||||
|
||||
1. If You Share the Licensed Material (including in modified
|
||||
form), You must:
|
||||
|
||||
a. retain the following if it is supplied by the Licensor
|
||||
with the Licensed Material:
|
||||
|
||||
i. identification of the creator(s) of the Licensed
|
||||
Material and any others designated to receive
|
||||
attribution, in any reasonable manner requested by
|
||||
the Licensor (including by pseudonym if
|
||||
designated);
|
||||
|
||||
ii. a copyright notice;
|
||||
|
||||
iii. a notice that refers to this Public License;
|
||||
|
||||
iv. a notice that refers to the disclaimer of
|
||||
warranties;
|
||||
|
||||
v. a URI or hyperlink to the Licensed Material to the
|
||||
extent reasonably practicable;
|
||||
|
||||
b. indicate if You modified the Licensed Material and
|
||||
retain an indication of any previous modifications; and
|
||||
|
||||
c. indicate the Licensed Material is licensed under this
|
||||
Public License, and include the text of, or the URI or
|
||||
hyperlink to, this Public License.
|
||||
|
||||
2. You may satisfy the conditions in Section 3(a)(1) in any
|
||||
reasonable manner based on the medium, means, and context in
|
||||
which You Share the Licensed Material. For example, it may be
|
||||
reasonable to satisfy the conditions by providing a URI or
|
||||
hyperlink to a resource that includes the required
|
||||
information.
|
||||
|
||||
3. If requested by the Licensor, You must remove any of the
|
||||
information required by Section 3(a)(1)(A) to the extent
|
||||
reasonably practicable.
|
||||
|
||||
4. If You Share Adapted Material You produce, the Adapter's
|
||||
License You apply must not prevent recipients of the Adapted
|
||||
Material from complying with this Public License.
|
||||
|
||||
|
||||
Section 4 -- Sui Generis Database Rights.
|
||||
|
||||
Where the Licensed Rights include Sui Generis Database Rights that
|
||||
apply to Your use of the Licensed Material:
|
||||
|
||||
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
|
||||
to extract, reuse, reproduce, and Share all or a substantial
|
||||
portion of the contents of the database;
|
||||
|
||||
b. if You include all or a substantial portion of the database
|
||||
contents in a database in which You have Sui Generis Database
|
||||
Rights, then the database in which You have Sui Generis Database
|
||||
Rights (but not its individual contents) is Adapted Material; and
|
||||
|
||||
c. You must comply with the conditions in Section 3(a) if You Share
|
||||
all or a substantial portion of the contents of the database.
|
||||
|
||||
For the avoidance of doubt, this Section 4 supplements and does not
|
||||
replace Your obligations under this Public License where the Licensed
|
||||
Rights include other Copyright and Similar Rights.
|
||||
|
||||
|
||||
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
|
||||
|
||||
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
|
||||
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
|
||||
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
|
||||
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
|
||||
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
|
||||
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
|
||||
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
|
||||
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
|
||||
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
|
||||
|
||||
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
|
||||
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
|
||||
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
|
||||
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
|
||||
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
|
||||
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
|
||||
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
|
||||
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
|
||||
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
|
||||
|
||||
c. The disclaimer of warranties and limitation of liability provided
|
||||
above shall be interpreted in a manner that, to the extent
|
||||
possible, most closely approximates an absolute disclaimer and
|
||||
waiver of all liability.
|
||||
|
||||
|
||||
Section 6 -- Term and Termination.
|
||||
|
||||
a. This Public License applies for the term of the Copyright and
|
||||
Similar Rights licensed here. However, if You fail to comply with
|
||||
this Public License, then Your rights under this Public License
|
||||
terminate automatically.
|
||||
|
||||
b. Where Your right to use the Licensed Material has terminated under
|
||||
Section 6(a), it reinstates:
|
||||
|
||||
1. automatically as of the date the violation is cured, provided
|
||||
it is cured within 30 days of Your discovery of the
|
||||
violation; or
|
||||
|
||||
2. upon express reinstatement by the Licensor.
|
||||
|
||||
For the avoidance of doubt, this Section 6(b) does not affect any
|
||||
right the Licensor may have to seek remedies for Your violations
|
||||
of this Public License.
|
||||
|
||||
c. For the avoidance of doubt, the Licensor may also offer the
|
||||
Licensed Material under separate terms or conditions or stop
|
||||
distributing the Licensed Material at any time; however, doing so
|
||||
will not terminate this Public License.
|
||||
|
||||
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
|
||||
License.
|
||||
|
||||
|
||||
Section 7 -- Other Terms and Conditions.
|
||||
|
||||
a. The Licensor shall not be bound by any additional or different
|
||||
terms or conditions communicated by You unless expressly agreed.
|
||||
|
||||
b. Any arrangements, understandings, or agreements regarding the
|
||||
Licensed Material not stated herein are separate from and
|
||||
independent of the terms and conditions of this Public License.
|
||||
|
||||
|
||||
Section 8 -- Interpretation.
|
||||
|
||||
a. For the avoidance of doubt, this Public License does not, and
|
||||
shall not be interpreted to, reduce, limit, restrict, or impose
|
||||
conditions on any use of the Licensed Material that could lawfully
|
||||
be made without permission under this Public License.
|
||||
|
||||
b. To the extent possible, if any provision of this Public License is
|
||||
deemed unenforceable, it shall be automatically reformed to the
|
||||
minimum extent necessary to make it enforceable. If the provision
|
||||
cannot be reformed, it shall be severed from this Public License
|
||||
without affecting the enforceability of the remaining terms and
|
||||
conditions.
|
||||
|
||||
c. No term or condition of this Public License will be waived and no
|
||||
failure to comply consented to unless expressly agreed to by the
|
||||
Licensor.
|
||||
|
||||
d. Nothing in this Public License constitutes or may be interpreted
|
||||
as a limitation upon, or waiver of, any privileges and immunities
|
||||
that apply to the Licensor or You, including from the legal
|
||||
processes of any jurisdiction or authority.
|
||||
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons is not a party to its public licenses.
|
||||
Notwithstanding, Creative Commons may elect to apply one of its public
|
||||
licenses to material it publishes and in those instances will be
|
||||
considered the "Licensor." Except for the limited purpose of indicating
|
||||
that material is shared under a Creative Commons public license or as
|
||||
otherwise permitted by the Creative Commons policies published at
|
||||
creativecommons.org/policies, Creative Commons does not authorize the
|
||||
use of the trademark "Creative Commons" or any other trademark or logo
|
||||
of Creative Commons without its prior written consent including,
|
||||
without limitation, in connection with any unauthorized modifications
|
||||
to any of its public licenses or any other arrangements,
|
||||
understandings, or agreements concerning use of licensed material. For
|
||||
the avoidance of doubt, this paragraph does not form part of the public
|
||||
licenses.
|
||||
|
||||
Creative Commons may be contacted at creativecommons.org.
|
File diff suppressed because one or more lines are too long
BIN
src/content/icons/material-icons/MaterialIcons-Regular.woff
Normal file
BIN
src/content/icons/material-icons/MaterialIcons-Regular.woff
Normal file
Binary file not shown.
BIN
src/content/icons/material-icons/MaterialIcons-Regular.woff2
Normal file
BIN
src/content/icons/material-icons/MaterialIcons-Regular.woff2
Normal file
Binary file not shown.
323
src/content/index.html
Executable file
323
src/content/index.html
Executable file
@@ -0,0 +1,323 @@
|
||||
<!--
|
||||
YukiHookAPI Project Builder - A Xposed Project Builder by YukiHookAPI.
|
||||
Copyright (C) 2019-2022 HighCapable
|
||||
https://github.com/fankes/YukiHookAPI-ProjectBuilder
|
||||
|
||||
This software is non-free but opensource software: you can redistribute it
|
||||
and/or modify it under the terms of the GNU Affero General Public License
|
||||
as published by the Free Software Foundation; either
|
||||
version 3 of the License, or any later version.
|
||||
|
||||
This software 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
|
||||
Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
and eula along with this software. If not, see
|
||||
<https://www.gnu.org/licenses/>
|
||||
|
||||
This file is Created by fankes on 2022/6/27.
|
||||
-->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no" name="viewport">
|
||||
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
||||
<meta content="webkit" name="renderer">
|
||||
<meta content="no-siteapp">
|
||||
<meta content="light dark" name="color-scheme">
|
||||
<title> </title>
|
||||
<link href="css/mdui.min.css" rel="stylesheet">
|
||||
<link href="render.css" rel="stylesheet">
|
||||
<script src="js/mdui.min.js"></script>
|
||||
</head>
|
||||
<body class="mdui-container-fluid mdui-theme-primary-orange mdui-theme-accent-orange mdui-theme-layout-auto">
|
||||
<div id="root_div" style="font-size:12pt;line-height:150%;padding-top:5pt;padding-left:10pt;padding-right:10pt;display:none">
|
||||
<div class="mdui-row mdui-center">
|
||||
<div class="mdui-col-xs-6">
|
||||
<div style="margin-top: 15px"></div>
|
||||
<div class="mdui-typo-subheading-opacity i18n" style="margin-left: 5px">{{basicConfig}}</div>
|
||||
<div class="mdui-textfield mdui-textfield-floating-label">
|
||||
<i class="mdui-icon material-icons">create_new_folder</i>
|
||||
<label class="mdui-textfield-label i18n">{{projectNameTip}}</label>
|
||||
<input class="mdui-textfield-input" id="project_name_text" required/>
|
||||
</div>
|
||||
<div class="mdui-textfield mdui-textfield-floating-label">
|
||||
<i class="mdui-icon material-icons">folder</i>
|
||||
<label class="mdui-textfield-label i18n">{{modulePackageName}} (Package Name)</label>
|
||||
<input class="mdui-textfield-input" id="package_name_text" required/>
|
||||
</div>
|
||||
<div class="mdui-textfield mdui-textfield-floating-label">
|
||||
<i class="mdui-icon material-icons">edit</i>
|
||||
<label class="mdui-textfield-label i18n">{{moduleName}} (App Name)</label>
|
||||
<input class="mdui-textfield-input" id="app_name_text" required/>
|
||||
</div>
|
||||
<div class="mdui-textfield mdui-textfield-floating-label">
|
||||
<i class="mdui-icon material-icons">edit</i>
|
||||
<label class="mdui-textfield-label i18n">{{moduleDescription}} (Xposed Module Description)</label>
|
||||
<textarea class="mdui-textfield-input" id="module_description_text" required
|
||||
style="max-height: 80px;overflow: hidden"></textarea>
|
||||
</div>
|
||||
<div class="mdui-textfield">
|
||||
<i class="mdui-icon material-icons">widgets</i>
|
||||
<label class="mdui-textfield-label i18n">{{uiComponents}}</label>
|
||||
<select class="mdui-select" id="compoment_select">
|
||||
<option class="i18n" value="0">{{createDefaultActivity}}</option>
|
||||
<option class="i18n" value="1">{{createBlankActivity}}</option>
|
||||
<option class="i18n" value="2">{{withoutUiComponents}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mdui-row">
|
||||
<div class="mdui-textfield mdui-textfield-floating-label mdui-col-xs-6">
|
||||
<i class="mdui-icon material-icons">details</i>
|
||||
<label class="mdui-textfield-label i18n">{{appMinApiVersion}}</label>
|
||||
<input class="mdui-textfield-input" id="app_min_api_text" required type="number" value="27"/>
|
||||
</div>
|
||||
<div class="mdui-textfield mdui-textfield-floating-label mdui-col-xs-6">
|
||||
<i class="mdui-icon material-icons">change_history</i>
|
||||
<label class="mdui-textfield-label i18n">{{appTargetApiVersion}}</label>
|
||||
<input class="mdui-textfield-input" id="app_target_api_text" required type="number"
|
||||
value="32"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mdui-textfield mdui-textfield-floating-label">
|
||||
<i class="mdui-icon material-icons">extension</i>
|
||||
<label class="mdui-textfield-label i18n">{{xposedMinApiVersion}} (Xposed Min API Version)</label>
|
||||
<input class="mdui-textfield-input" id="xposed_min_api_text" required type="number" value="93"/>
|
||||
</div>
|
||||
<div class="mdui-textfield">
|
||||
<i class="mdui-icon material-icons">settings_input_hdmi</i>
|
||||
<label class="mdui-textfield-label i18n">{{targetXposedPlatform}} (Xposed Platform)</label>
|
||||
<select class="mdui-select" id="target_xposed_platform_select">
|
||||
<option class="i18n" value="0">{{universal}}</option>
|
||||
<option value="1">LSPosed</option>
|
||||
<!-- TODO LSPatch WIP -->
|
||||
<option disabled value="2">LSPatch (WIP)</option>
|
||||
<option value="3">TaiChi</option>
|
||||
<option class="i18n" value="4">{{nativeXposed}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mdui-textfield" id="new_xshare_prefs_div">
|
||||
<i class="mdui-icon material-icons">style</i>
|
||||
<label class="mdui-textfield-label i18n">{{declarationNewXSharePrefs}}</label>
|
||||
<select class="mdui-select" id="new_xshare_prefs_select">
|
||||
<option class="i18n" value="0">{{notConfigure}}</option>
|
||||
<option class="i18n" value="1">{{yesOfConfigure}}</option>
|
||||
<option class="i18n" value="2">{{noOfConfigure}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div id="module_scope_div">
|
||||
<div class="mdui-textfield">
|
||||
<i class="mdui-icon material-icons">view_list</i>
|
||||
<label class="mdui-textfield-label i18n" style="margin-bottom: 7px">{{moduleScope}}</label>
|
||||
</div>
|
||||
<div class="mdui-list" id="scope_list"
|
||||
style="margin-left: 40px; margin-top: -15px; max-height:100px; overflow:auto"></div>
|
||||
<button class="mdui-btn mdui-round-btn mdui-btn-block mdui-color-theme-accent mdui-ripple"
|
||||
onclick="moduleScope.showAddDialog()"
|
||||
style="margin-left: 40px;width: 92%">
|
||||
<i class="mdui-icon material-icons" style="margin-bottom: 4px;margin-right: 4px">add</i>
|
||||
<span class="i18n" style="text-transform: none">{{addApps}}</span>
|
||||
</button>
|
||||
</div>
|
||||
<div style="margin-top: 15px"></div>
|
||||
</div>
|
||||
<div class="mdui-col-xs-6">
|
||||
<div style="margin-top: 15px"></div>
|
||||
<div class="mdui-typo-subheading-opacity i18n" style="margin-left: 5px">{{yukiHookApiConfig}}</div>
|
||||
<div class="mdui-textfield mdui-textfield-floating-label">
|
||||
<i class="mdui-icon material-icons">code</i>
|
||||
<label class="mdui-textfield-label i18n">{{entryClassName}}</label>
|
||||
<input class="mdui-textfield-input" id="entry_class_name_text"/>
|
||||
</div>
|
||||
<div class="mdui-textfield">
|
||||
<i class="mdui-icon material-icons">photo_library</i>
|
||||
<label class="mdui-textfield-label i18n">{{addResourcesHookSupport}}</label>
|
||||
<select class="mdui-select" id="support_resources_hook_select">
|
||||
<option class="i18n" value="0">{{notConfigureDefYes}}</option>
|
||||
<option class="i18n" value="1">{{yesOfConfigure}}</option>
|
||||
<option class="i18n" value="2">{{noOfConfigure}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mdui-textfield mdui-textfield-floating-label">
|
||||
<i class="mdui-icon material-icons">local_offer</i>
|
||||
<label class="mdui-textfield-label i18n">{{debugTagName}}</label>
|
||||
<input class="mdui-textfield-input" id="debug_tag_name_text"/>
|
||||
</div>
|
||||
<div class="mdui-textfield">
|
||||
<i class="mdui-icon material-icons">bug_report</i>
|
||||
<label class="mdui-textfield-label i18n">{{enableDebugMode}}</label>
|
||||
<select class="mdui-select" id="enable_debug_select">
|
||||
<option class="i18n" value="0">{{notConfigureDefYes}}</option>
|
||||
<option class="i18n" value="1">{{yesOfConfigure}}</option>
|
||||
<option class="i18n" value="2">{{noOfConfigure}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mdui-textfield">
|
||||
<i class="mdui-icon material-icons">pageview</i>
|
||||
<label class="mdui-textfield-label i18n">{{enablePrintLogcat}}</label>
|
||||
<select class="mdui-select" id="enable_print_logcat_select">
|
||||
<option class="i18n" value="0">{{notConfigureDefYes}}</option>
|
||||
<option class="i18n" value="1">{{yesOfConfigure}}</option>
|
||||
<option class="i18n" value="2">{{noOfConfigure}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mdui-textfield">
|
||||
<i class="mdui-icon material-icons">storage</i>
|
||||
<label class="mdui-textfield-label i18n">{{enableYukiHookModulePrefsCache}}</label>
|
||||
<select class="mdui-select" id="enable_yprefs_cache_select">
|
||||
<option class="i18n" value="0">{{notConfigureDefYes}}</option>
|
||||
<option class="i18n" value="1">{{yesOfConfigure}}</option>
|
||||
<option class="i18n" value="2">{{noOfConfigure}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mdui-textfield">
|
||||
<i class="mdui-icon material-icons">satellite</i>
|
||||
<label class="mdui-textfield-label i18n">{{enableModuleResourcesCache}}</label>
|
||||
<select class="mdui-select" id="enable_resources_cache_select">
|
||||
<option class="i18n" value="0">{{notConfigureDefYes}}</option>
|
||||
<option class="i18n" value="1">{{yesOfConfigure}}</option>
|
||||
<option class="i18n" value="2">{{noOfConfigure}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mdui-textfield">
|
||||
<i class="mdui-icon material-icons">done_all</i>
|
||||
<label class="mdui-textfield-label i18n">{{enableModuleStatus}}</label>
|
||||
<select class="mdui-select" id="enable_module_status_select">
|
||||
<option class="i18n" value="0">{{notConfigureDefYes}}</option>
|
||||
<option class="i18n" value="1">{{yesOfConfigure}}</option>
|
||||
<option class="i18n" value="2">{{noOfConfigure}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mdui-textfield">
|
||||
<i class="mdui-icon material-icons">settings_input_composite</i>
|
||||
<label class="mdui-textfield-label i18n">{{enableYukiHookDataChannel}}</label>
|
||||
<select class="mdui-select" id="enable_ychannel_select">
|
||||
<option class="i18n" value="0">{{notConfigureDefYes}}</option>
|
||||
<option class="i18n" value="1">{{yesOfConfigure}}</option>
|
||||
<option class="i18n" value="2">{{noOfConfigure}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mdui-textfield">
|
||||
<i class="mdui-icon material-icons">texture</i>
|
||||
<label class="mdui-textfield-label i18n">{{enableMemberCache}}</label>
|
||||
<select class="mdui-select" id="enable_member_cache_select">
|
||||
<option class="i18n" value="0">{{notConfigureDefYes}}</option>
|
||||
<option class="i18n" value="1">{{yesOfConfigure}}</option>
|
||||
<option class="i18n" value="2">{{noOfConfigure}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div style="margin-top: 15px"></div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="mdui-fab mdui-fab-fixed mdui-color-theme-accent mdui-ripple" onclick="build.checking()"
|
||||
style="margin-right: 10px;margin-bottom: 10px">
|
||||
<i class="mdui-icon material-icons">archive</i>
|
||||
</button>
|
||||
</div>
|
||||
<div class="mdui-dialog" id="module_scope_dialog" style="max-width: 500px">
|
||||
<div class="mdui-dialog-title i18n">{{addApps}}</div>
|
||||
<div>
|
||||
<span class="i18n" style="margin-left: 24px">{{selectScopeAppsOrEnterOnceTip}}</span>
|
||||
<select class="mdui-select" id="module_scope_select" style="margin-left: 26px;margin-top: 10px">
|
||||
<option class="i18n" selected value="0">-- {{customize}} --</option>
|
||||
<option class="i18n" value="1">{{systemFramework}}</option>
|
||||
<option class="i18n" value="2">{{systemUi}}</option>
|
||||
</select>
|
||||
<div class="mdui-textfield" style="margin-left: 26px;margin-right: 33px">
|
||||
<input class="mdui-textfield-input i18n" id="module_scope_text" placeholder="{{enterAppNameTip}}" type="text"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mdui-dialog-actions">
|
||||
<button class="mdui-btn mdui-ripple i18n" mdui-dialog-close>{{cancel}}</button>
|
||||
<button class="mdui-btn mdui-ripple i18n" onclick="moduleScope.saveData()">{{ok}}</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mdui-dialog" id="search_depend_dialog" style="max-width: 500px">
|
||||
<div class="mdui-dialog-title i18n">{{pleaseWait}}</div>
|
||||
<div class="mdui-dialog-content">
|
||||
<span class="i18n">{{autoSearchingDependsTip}}</span>
|
||||
<div style="height: 15px"></div>
|
||||
<div class="mdui-progress">
|
||||
<div class="mdui-progress-indeterminate"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mdui-dialog" id="config_package_dialog" style="max-width: 500px">
|
||||
<div class="mdui-dialog-title i18n">{{configProjectDepends}}</div>
|
||||
<div>
|
||||
<span class="i18n" style="margin-left: 24px">{{gradlePaper}}</span>
|
||||
<select class="mdui-select" id="gradle_version_select"
|
||||
style="margin-left: 26px;margin-top: 10px;margin-bottom: 15px">
|
||||
</select>
|
||||
<span class="i18n" style="margin-left: 24px">{{agpVersion}}</span>
|
||||
<select class="mdui-select" id="agp_version_select"
|
||||
style="margin-left: 26px;margin-top: 10px;margin-bottom: 15px">
|
||||
</select>
|
||||
<span class="i18n" style="margin-left: 24px">{{kotlinVersion}}</span>
|
||||
<select class="mdui-select" id="kotlin_version_select"
|
||||
style="margin-left: 26px;margin-top: 10px;margin-bottom: 15px">
|
||||
</select>
|
||||
<span class="i18n" style="margin-left: 24px">{{yukiHookApiVersion}}</span>
|
||||
<select class="mdui-select" id="yukihookapi_version_select"
|
||||
style="margin-left: 26px;margin-top: 10px;margin-bottom: 20px">
|
||||
</select>
|
||||
<div style="margin-left: 24px;margin-right: 24px;margin-bottom: 20px">
|
||||
<span class="i18n" style="font-size:9pt;opacity: 0.55">{{oldDependsWarnTip}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mdui-dialog-actions">
|
||||
<button class="mdui-btn mdui-ripple i18n" mdui-dialog-close onclick="build.unlockStatus()">{{cancel}}</button>
|
||||
<button class="mdui-btn mdui-ripple i18n" onclick="build.run()">{{runBuild}}</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mdui-dialog" id="packaging_progress_dialog" style="max-width: 500px">
|
||||
<div class="mdui-dialog-title i18n">{{pleaseWait}}</div>
|
||||
<div class="mdui-dialog-content">
|
||||
<span id="packaging_progress_text"></span>
|
||||
<div style="height: 15px"></div>
|
||||
<div class="mdui-progress">
|
||||
<div class="mdui-progress-indeterminate"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mdui-dialog" id="about_dialog" style="max-width: 500px">
|
||||
<div class="mdui-dialog-title i18n">{{about}}</div>
|
||||
<div class="mdui-dialog-content" style="line-height: 35px">
|
||||
<span id="about_name_text"></span><br/>
|
||||
<span id="about_version_text"></span><br/>
|
||||
<span class="i18n">{{aboutTip}}</span><br/>
|
||||
<span class="i18n">{{projectAddress}}: </span>
|
||||
<span class="url-link">https://github.com/fankes/YukiHookAPI</span><br/>
|
||||
<div style="margin-top: 10px"></div>
|
||||
<span class="i18n" style="font-size: 10pt;opacity: 0.6;line-height: 18px">{{noticeTip}}</span>
|
||||
</div>
|
||||
<div class="mdui-dialog-actions">
|
||||
<button class="mdui-btn mdui-ripple i18n" mdui-dialog-close onclick="page.checkForUpdates()">{{checkUpdate}}</button>
|
||||
<button class="mdui-btn mdui-ripple i18n" mdui-dialog-close>{{close}}</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mdui-dialog" id="open_source_dialog" style="max-width: 500px">
|
||||
<div class="mdui-dialog-title i18n">{{openSource}}</div>
|
||||
<div class="mdui-dialog-content" style="line-height: 35px">
|
||||
<span>Electron</span>  <span class="license-text">MIT</span><br/>
|
||||
<span class="url-link">https://github.com/electron</span><br/>
|
||||
<span>Node.js</span>  <span class="license-text">MIT</span><br/>
|
||||
<span class="url-link">https://github.com/nodejs</span><br/>
|
||||
<span>Node.js: fs-extra</span>  <span class="license-text">MIT</span><br/>
|
||||
<span class="url-link">https://github.com/jprichardson/node-fs-extra</span><br/>
|
||||
<span>DecompressZip</span>  <span class="license-text">MIT</span><br/>
|
||||
<span class="url-link">https://github.com/NASGO/decompress-zip</span><br/>
|
||||
<span>DAY.JS</span>  <span class="license-text">MIT</span><br/>
|
||||
<span class="url-link">https://github.com/iamkun/dayjs</span><br/>
|
||||
<span>DrawableToolbox</span>  <span class="license-text">Apache-2.0</span><br/>
|
||||
<span class="url-link">https://github.com/duanhong169/DrawableToolbox</span>
|
||||
</div>
|
||||
<div class="mdui-dialog-actions">
|
||||
<button class="mdui-btn mdui-ripple i18n" mdui-dialog-close>{{close}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script src="render.js"></script>
|
||||
</html>
|
10881
src/content/js/jquery.js
vendored
Executable file
10881
src/content/js/jquery.js
vendored
Executable file
File diff suppressed because it is too large
Load Diff
2
src/content/js/jquery.min.js
vendored
Executable file
2
src/content/js/jquery.min.js
vendored
Executable file
File diff suppressed because one or more lines are too long
5976
src/content/js/mdui.esm.js
Normal file
5976
src/content/js/mdui.esm.js
Normal file
File diff suppressed because it is too large
Load Diff
1
src/content/js/mdui.esm.js.map
Normal file
1
src/content/js/mdui.esm.js.map
Normal file
File diff suppressed because one or more lines are too long
6474
src/content/js/mdui.js
Normal file
6474
src/content/js/mdui.js
Normal file
File diff suppressed because it is too large
Load Diff
1
src/content/js/mdui.js.map
Normal file
1
src/content/js/mdui.js.map
Normal file
File diff suppressed because one or more lines are too long
7
src/content/js/mdui.min.js
vendored
Normal file
7
src/content/js/mdui.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
src/content/js/mdui.min.js.map
Normal file
1
src/content/js/mdui.min.js.map
Normal file
File diff suppressed because one or more lines are too long
79
src/content/render.css
Normal file
79
src/content/render.css
Normal file
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* YukiHookAPI Project Builder - A Xposed Project Builder by YukiHookAPI.
|
||||
* Copyright (C) 2019-2022 HighCapable
|
||||
* https://github.com/fankes/YukiHookAPI-ProjectBuilder
|
||||
*
|
||||
* This software is non-free but opensource software: you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Affero General Public License
|
||||
* as published by the Free Software Foundation; either
|
||||
* version 3 of the License, or any later version.
|
||||
*
|
||||
* This software 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
|
||||
* Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* and eula along with this software. If not, see
|
||||
* <https://www.gnu.org/licenses/>
|
||||
*
|
||||
* This file is Created by fankes on 2022/7/9.
|
||||
*/
|
||||
|
||||
body {
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.mdui-dialog {
|
||||
border-radius: 15px;
|
||||
}
|
||||
|
||||
.mdui-textfield-label {
|
||||
white-space: nowrap
|
||||
}
|
||||
|
||||
.mdui-select {
|
||||
margin-left: 55px;
|
||||
width: 88%;
|
||||
}
|
||||
|
||||
.mdui-round-btn {
|
||||
border-radius: 50px;
|
||||
font-size: 11pt;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.red-circle-btn {
|
||||
background: #ff5252;
|
||||
border-style: hidden;
|
||||
border-radius: 50px;
|
||||
font-size: 12pt;
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
.url-link {
|
||||
color: #FF9800;
|
||||
cursor: hand;
|
||||
}
|
||||
|
||||
.license-text {
|
||||
font-weight: bold;
|
||||
font-size: 10pt;
|
||||
opacity: 0.75;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body {
|
||||
background-color: #2d2d2d;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
body {
|
||||
background-color: #fcfcfc;
|
||||
}
|
||||
}
|
800
src/content/render.js
Normal file
800
src/content/render.js
Normal file
@@ -0,0 +1,800 @@
|
||||
// noinspection JSUnusedGlobalSymbols, JSUnusedLocalSymbols
|
||||
|
||||
/*
|
||||
* YukiHookAPI Project Builder - A Xposed Project Builder by YukiHookAPI.
|
||||
* Copyright (C) 2019-2022 HighCapable
|
||||
* https://github.com/fankes/YukiHookAPI-ProjectBuilder
|
||||
*
|
||||
* This software is non-free but opensource software: you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Affero General Public License
|
||||
* as published by the Free Software Foundation; either
|
||||
* version 3 of the License, or any later version.
|
||||
*
|
||||
* This software 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
|
||||
* Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* and eula along with this software. If not, see
|
||||
* <https://www.gnu.org/licenses/>
|
||||
*
|
||||
* This file is Created by fankes on 2022/7/8.
|
||||
*/
|
||||
|
||||
const {ipcRenderer, ipcMain} = require('electron');
|
||||
const {locale} = require('../libs/locale');
|
||||
|
||||
/** 防止 jQuery 与 Electron 冲突 */
|
||||
window.$ = window.jQuery = require('./js/jquery.min.js');
|
||||
|
||||
/**
|
||||
* 对话框集合命名空间
|
||||
*/
|
||||
const dialogs = {
|
||||
/** 添加模块作用域对话框 */
|
||||
moduleScope: new mdui.Dialog('#module_scope_dialog'),
|
||||
/** 搜索项目依赖对话框 */
|
||||
searchDepend: new mdui.Dialog('#search_depend_dialog', {modal: true, closeOnEsc: false}),
|
||||
/** 配置项目依赖对话框 */
|
||||
configPackage: new mdui.Dialog('#config_package_dialog', {modal: true, closeOnEsc: false}),
|
||||
/** 创建进行中对话框 */
|
||||
packagingProgress: new mdui.Dialog('#packaging_progress_dialog', {modal: true, closeOnEsc: false})
|
||||
}
|
||||
|
||||
/** 当前获取到的在线依赖内容 */
|
||||
const dependenciesConfigs = {
|
||||
gradlePapers: [],
|
||||
androidGradlePluginVersions: [],
|
||||
kotlinVersions: [],
|
||||
yukiHookApiVersions: []
|
||||
};
|
||||
|
||||
/** 当前项目的配置内容 */
|
||||
const projectConfigs = {
|
||||
basicConfig: {
|
||||
projectName: '',
|
||||
packageName: '',
|
||||
appName: '',
|
||||
moduleDescription: '',
|
||||
appMinApi: 0,
|
||||
appTargetApi: 0,
|
||||
xposedMinApi: 0,
|
||||
moduleCompoment: 0,
|
||||
targetXposedPlatform: 0,
|
||||
newXSharePrefs: 0,
|
||||
moduleScopes: []
|
||||
},
|
||||
yukiHookApiConfig: {
|
||||
entryClassName: '',
|
||||
debugTagName: '',
|
||||
supportResourcesHook: 0,
|
||||
enableDebug: 0,
|
||||
enablePrintLogcat: 0,
|
||||
enableYPrefsCache: 0,
|
||||
enableResourcesCache: 0,
|
||||
enableModuleStatus: 0,
|
||||
enableYChannel: 0,
|
||||
enableMemberCache: 0
|
||||
},
|
||||
projectDependencies: {
|
||||
gradlePaper: '',
|
||||
androidGradlePluginVersion: '',
|
||||
kotlinVersion: '',
|
||||
kotlinKspVersion: '',
|
||||
yukiHookApiVersion: ''
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 字符串工具命名空间
|
||||
*/
|
||||
const valUtils = {
|
||||
/**
|
||||
* 字符串是否为空
|
||||
* @param string 字符串
|
||||
* @return boolean
|
||||
*/
|
||||
isEmpty: (string) => {
|
||||
if (string === '') return true;
|
||||
return new RegExp('^ +$').test(string);
|
||||
},
|
||||
/**
|
||||
* 字符串是否包含字母和数字以外的内容
|
||||
* @param string 字符串
|
||||
* @return boolean
|
||||
*/
|
||||
hasSpecialChar: (string) => {
|
||||
return !valUtils.isEmpty(string) && !(/^[a-zA-Z_]\w*$/.test(string));
|
||||
},
|
||||
/**
|
||||
* 字符串是否包含非法包名
|
||||
* @param string 字符串
|
||||
* @param isAllowAndroid 是否允许 "android" 包名 - 默认否
|
||||
* @return boolean
|
||||
*/
|
||||
hasIncorrectPkgName: (string, isAllowAndroid = false) => {
|
||||
return !((string.indexOf('.') >= 0 &&
|
||||
string.indexOf('..') < 0 &&
|
||||
!string.startsWith('.') &&
|
||||
!string.endsWith('.')) || (string === 'android' && isAllowAndroid));
|
||||
},
|
||||
/**
|
||||
* 转换为整型
|
||||
* @return number
|
||||
*/
|
||||
integerOf: (value) => {
|
||||
return Number.parseInt(value);
|
||||
},
|
||||
/**
|
||||
* 字符串是否以数字开头
|
||||
* @param string 字符串
|
||||
* @return boolean
|
||||
*/
|
||||
startsWithNumber: (string) => {
|
||||
return string.startsWith('0') || string.startsWith('1') ||
|
||||
string.startsWith('2') || string.startsWith('3') ||
|
||||
string.startsWith('4') || string.startsWith('5') ||
|
||||
string.startsWith('6') || string.startsWith('7') ||
|
||||
string.startsWith('8') || string.startsWith('9');
|
||||
}
|
||||
};
|
||||
|
||||
/** 开始装载 */
|
||||
window.onload = () => {
|
||||
$('#module_scope_text').bind('input propertychange', () => {
|
||||
monitor.onModuleScopeTextChange();
|
||||
});
|
||||
$('#module_scope_select').on('change', () => {
|
||||
monitor.onModuleScopeSelectChange();
|
||||
});
|
||||
$('#target_xposed_platform_select').on('change', () => {
|
||||
monitor.onTargetXposedPlatformSelect();
|
||||
});
|
||||
$('#module_scope_dialog').on('closed.mdui.dialog', () => {
|
||||
moduleScope.clearAndCloseDialog();
|
||||
});
|
||||
$('.url-link').each((_, element) => {
|
||||
$(element).on('click', () => {
|
||||
page.openBrowser(element.innerText);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 页面监听器命名空间
|
||||
*/
|
||||
const monitor = {
|
||||
/** 文本改变监听 */
|
||||
onModuleScopeTextChange: () => {
|
||||
const value = $('#module_scope_text').val();
|
||||
if (value === 'android') $('#module_scope_select').val(1);
|
||||
else if (value === 'com.android.systemui') $('#module_scope_select').val(2);
|
||||
else $('#module_scope_select').val(0);
|
||||
},
|
||||
/** 选项改变监听 */
|
||||
onModuleScopeSelectChange: () => {
|
||||
const moduleScopeText = $('#module_scope_text');
|
||||
switch (valUtils.integerOf($('#module_scope_select option:selected').val())) {
|
||||
case 0:
|
||||
moduleScopeText.val('');
|
||||
break;
|
||||
|
||||
case 1:
|
||||
moduleScopeText.val('android');
|
||||
break;
|
||||
|
||||
case 2:
|
||||
moduleScopeText.val('com.android.systemui');
|
||||
break;
|
||||
}
|
||||
},
|
||||
/** 选项改变监听 */
|
||||
onTargetXposedPlatformSelect: () => {
|
||||
const newXSharePrefsDiv = $('#new_xshare_prefs_div');
|
||||
const moduleScopeDiv = $('#module_scope_div');
|
||||
switch (valUtils.integerOf($('#target_xposed_platform_select option:selected').val())) {
|
||||
case 3:
|
||||
case 4:
|
||||
$('#scope_list').empty();
|
||||
$('#new_xshare_prefs_select').val(0);
|
||||
newXSharePrefsDiv.hide();
|
||||
moduleScopeDiv.hide();
|
||||
break;
|
||||
|
||||
default:
|
||||
newXSharePrefsDiv.show();
|
||||
moduleScopeDiv.show();
|
||||
break;
|
||||
}
|
||||
},
|
||||
/** 刷新回调全部监听 */
|
||||
refresh: () => {
|
||||
monitor.onModuleScopeTextChange();
|
||||
monitor.onModuleScopeSelectChange();
|
||||
monitor.onTargetXposedPlatformSelect();
|
||||
mdui.updateTextFields();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 控制模块作用域命名空间
|
||||
*/
|
||||
const moduleScope = {
|
||||
/**
|
||||
* 获取当前已添加的模块定义域数组
|
||||
* @return Array
|
||||
*/
|
||||
moduleScopesData: () => {
|
||||
const scopes = [];
|
||||
$('#scope_list div').each((p, dom) => {
|
||||
scopes.push($(dom).text());
|
||||
});
|
||||
return scopes;
|
||||
},
|
||||
/** 显示添加模块作用域对话框 */
|
||||
showAddDialog: () => {
|
||||
dialogs.moduleScope.open();
|
||||
},
|
||||
/** 添加模块作用域 - 使用当前对话框文本 */
|
||||
saveData: () => {
|
||||
const moduleScopeText = $('#module_scope_text').val();
|
||||
if (valUtils.isEmpty(moduleScopeText)) page.snack(locale.i18n.enterPkgNameOrSelectFromListTip);
|
||||
else if (valUtils.hasIncorrectPkgName(moduleScopeText, true)) page.snack(locale.i18n.invalidEnterPkgNameTip);
|
||||
else if (moduleScope.moduleScopesData().includes(moduleScopeText)) page.snack(locale.i18n.existEnterPkgNameTip);
|
||||
else {
|
||||
moduleScope.addData(moduleScopeText);
|
||||
dialogs.moduleScope.close();
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 添加模块作用域
|
||||
* @param packageName 包名
|
||||
*/
|
||||
addData: (packageName) => {
|
||||
const listId = Date.now();
|
||||
const scopeList = $('#scope_list')
|
||||
scopeList.append('<label class="mdui-list-item mdui-ripple" id="' + listId + '" style="padding-right: 5px">' +
|
||||
'<div class="mdui-list-item-content">' + packageName + '</div>' +
|
||||
'<button class="red-circle-btn mdui-ripple" onclick="moduleScope.removeData(\'' + packageName + '\',\''
|
||||
+ listId + '\')">—</button>' +
|
||||
'</label>');
|
||||
scopeList.scrollTop(scopeList.prop("scrollHeight"));
|
||||
},
|
||||
/**
|
||||
* 移除模块作用域
|
||||
* @param name 名称
|
||||
* @param id 列表 Id
|
||||
*/
|
||||
removeData: (name, id) => {
|
||||
mdui.confirm(locale.format(locale.i18n.areYouSureRemoveItemTip, name), locale.i18n.notice, () => {
|
||||
$('#' + id).remove();
|
||||
}, () => null, {confirmText: locale.i18n.ok, cancelText: locale.i18n.cancel});
|
||||
},
|
||||
/**
|
||||
* 刷新当前作用域列表布局
|
||||
* @param data 作用域数组
|
||||
*/
|
||||
refresh: (data) => {
|
||||
$('#scope_list').html('');
|
||||
if (data.length > 0) data.forEach((value) => {
|
||||
moduleScope.addData(value);
|
||||
});
|
||||
},
|
||||
/** 恢复默认并关闭添加模块作用域对话框 */
|
||||
clearAndCloseDialog: () => {
|
||||
$('#module_scope_select').val(0);
|
||||
$('#module_scope_text').val('');
|
||||
dialogs.moduleScope.close();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 当前配置表单命名空间
|
||||
*/
|
||||
const configForm = {
|
||||
projectNameText: () => $('#project_name_text').val(),
|
||||
packageNameText: () => $('#package_name_text').val(),
|
||||
appNameText: () => $('#app_name_text').val(),
|
||||
moduleDescriptionText: () => $('#module_description_text').val(),
|
||||
appMinApiText: () => $('#app_min_api_text').val(),
|
||||
appTargetApiText: () => $('#app_target_api_text').val(),
|
||||
xposedMinApiText: () => $('#xposed_min_api_text').val(),
|
||||
entryClassNameText: () => $('#entry_class_name_text').val(),
|
||||
debugTagNameText: () => $('#debug_tag_name_text').val(),
|
||||
compomentSelect: () => valUtils.integerOf($('#compoment_select option:selected').val()),
|
||||
targetXposedPlatformSelect: () => valUtils.integerOf($('#target_xposed_platform_select option:selected').val()),
|
||||
newXSharePrefsSelect: () => valUtils.integerOf($('#new_xshare_prefs_select option:selected').val()),
|
||||
supportResourcesHookSelect: () => valUtils.integerOf($('#support_resources_hook_select option:selected').val()),
|
||||
enableDebugSelect: () => valUtils.integerOf($('#enable_debug_select option:selected').val()),
|
||||
enablePrintLogcatSelect: () => valUtils.integerOf($('#enable_print_logcat_select option:selected').val()),
|
||||
enableYPrefsCacheSelect: () => valUtils.integerOf($('#enable_yprefs_cache_select option:selected').val()),
|
||||
enableResourcesCacheSelect: () => valUtils.integerOf($('#enable_resources_cache_select option:selected').val()),
|
||||
enableModuleStatusSelect: () => valUtils.integerOf($('#enable_module_status_select option:selected').val()),
|
||||
enableYChannelSelect: () => valUtils.integerOf($('#enable_ychannel_select option:selected').val()),
|
||||
enableMemberCacheSelect: () => valUtils.integerOf($('#enable_member_cache_select option:selected').val())
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建项目命名空间
|
||||
*/
|
||||
const build = {
|
||||
/** 标识是否正在配置创建项目功能 - 不能重复执行 */
|
||||
isLocked: false,
|
||||
/**
|
||||
* 判断是否正在创建项目 - 自动弹出消息提示
|
||||
* @return boolean
|
||||
*/
|
||||
isLockAndMsg: () => {
|
||||
if (build.isLocked) page.snack(locale.i18n.taskIsRunningTip);
|
||||
return build.isLocked;
|
||||
},
|
||||
/** 创建配置表单 */
|
||||
create: () => {
|
||||
projectConfigs.basicConfig.projectName = configForm.projectNameText();
|
||||
projectConfigs.basicConfig.packageName = configForm.packageNameText();
|
||||
projectConfigs.basicConfig.appName = configForm.appNameText();
|
||||
projectConfigs.basicConfig.moduleDescription = configForm.moduleDescriptionText();
|
||||
projectConfigs.basicConfig.appMinApi = valUtils.integerOf(configForm.appMinApiText());
|
||||
projectConfigs.basicConfig.appTargetApi = valUtils.integerOf(configForm.appTargetApiText());
|
||||
projectConfigs.basicConfig.xposedMinApi = valUtils.integerOf(configForm.xposedMinApiText());
|
||||
projectConfigs.basicConfig.moduleCompoment = configForm.compomentSelect();
|
||||
projectConfigs.basicConfig.targetXposedPlatform = configForm.targetXposedPlatformSelect();
|
||||
projectConfigs.basicConfig.newXSharePrefs = configForm.newXSharePrefsSelect();
|
||||
projectConfigs.basicConfig.moduleScopes = moduleScope.moduleScopesData();
|
||||
projectConfigs.yukiHookApiConfig.entryClassName = configForm.entryClassNameText();
|
||||
projectConfigs.yukiHookApiConfig.debugTagName = configForm.debugTagNameText();
|
||||
projectConfigs.yukiHookApiConfig.supportResourcesHook = configForm.supportResourcesHookSelect();
|
||||
projectConfigs.yukiHookApiConfig.enableDebug = configForm.enableDebugSelect();
|
||||
projectConfigs.yukiHookApiConfig.enablePrintLogcat = configForm.enablePrintLogcatSelect();
|
||||
projectConfigs.yukiHookApiConfig.enableYPrefsCache = configForm.enableYPrefsCacheSelect();
|
||||
projectConfigs.yukiHookApiConfig.enableResourcesCache = configForm.enableResourcesCacheSelect();
|
||||
projectConfigs.yukiHookApiConfig.enableModuleStatus = configForm.enableModuleStatusSelect();
|
||||
projectConfigs.yukiHookApiConfig.enableYChannel = configForm.enableYChannelSelect();
|
||||
projectConfigs.yukiHookApiConfig.enableMemberCache = configForm.enableMemberCacheSelect();
|
||||
projectConfigs.projectDependencies = {
|
||||
gradlePaper: '',
|
||||
androidGradlePluginVersion: '',
|
||||
kotlinVersion: '',
|
||||
kotlinKspVersion: '',
|
||||
yukiHookApiVersion: ''
|
||||
};
|
||||
},
|
||||
/** 检查并开始创建项目 */
|
||||
checking: () => {
|
||||
if (build.isLockAndMsg()) return;
|
||||
if (valUtils.isEmpty(configForm.projectNameText())) page.snack(locale.i18n.enterProjectNameTip);
|
||||
else if (valUtils.hasSpecialChar(configForm.projectNameText())) page.snack(locale.i18n.projectNameRuleTip);
|
||||
else if (valUtils.isEmpty(configForm.packageNameText())) page.snack(locale.i18n.enterModulePackageNameTip);
|
||||
else if (valUtils.hasIncorrectPkgName(configForm.packageNameText())) page.snack(locale.i18n.invalidModulePackageNameTip);
|
||||
else if (valUtils.isEmpty(configForm.appNameText())) page.snack(locale.i18n.enterModuleAppNameTip);
|
||||
else if (valUtils.isEmpty(configForm.moduleDescriptionText())) page.snack(locale.i18n.enterModuleDescriptionTip);
|
||||
else if (valUtils.isEmpty(configForm.appMinApiText())) page.snack(locale.i18n.enterAppMinApiVersionTip);
|
||||
else if (configForm.targetXposedPlatformSelect() === 2 && configForm.appMinApiText() < 27) page.snack(locale.i18n.lsposedSupportMinAppApiWarnTip);
|
||||
else if (configForm.appMinApiText() < 21) page.snack(locale.i18n.tooLowAppMinApiVersionWarnTip);
|
||||
else if (configForm.appMinApiText() > 33) page.snack(locale.i18n.tooHighAppMinApiVersionWarnTip);
|
||||
else if (valUtils.isEmpty(configForm.appTargetApiText())) page.snack(locale.i18n.enterAppTargetApiVersionTip);
|
||||
else if (configForm.appTargetApiText() < configForm.appMinApiText()) page.snack(locale.i18n.tooLowAppTargetApiVersionWarnTip);
|
||||
else if (configForm.appTargetApiText() > 33) page.snack(locale.i18n.maybeInvalidAppTargetApiVersionTip);
|
||||
else if (valUtils.isEmpty(configForm.xposedMinApiText())) page.snack(locale.i18n.enterXposedMinApiVersionTip);
|
||||
else if (configForm.xposedMinApiText() < 82) page.snack(locale.i18n.tooLowXposedMinApiVersionWarnTip);
|
||||
else if (configForm.xposedMinApiText() > 93) page.snack(locale.i18n.tooHighXposedMinApiVersionWarnTip);
|
||||
else if (valUtils.hasSpecialChar(configForm.entryClassNameText())) page.snack(locale.i18n.entryClassNameRuleTip);
|
||||
else if (configForm.targetXposedPlatformSelect() !== 3 && configForm.targetXposedPlatformSelect() !== 4
|
||||
&& moduleScope.moduleScopesData().length <= 0) page.snack(locale.i18n.moduleScopeRuleTip);
|
||||
else {
|
||||
build.create();
|
||||
projectDepends.search();
|
||||
}
|
||||
},
|
||||
/** 开始创建项目 */
|
||||
run: () => {
|
||||
projectConfigs.projectDependencies.gradlePaper = $('#gradle_version_select option:selected').text();
|
||||
projectConfigs.projectDependencies.androidGradlePluginVersion = $('#agp_version_select option:selected').text();
|
||||
const kotlinVersionSelect = $('#kotlin_version_select option:selected');
|
||||
projectConfigs.projectDependencies.kotlinVersion = kotlinVersionSelect.text();
|
||||
projectConfigs.projectDependencies.kotlinKspVersion = kotlinVersionSelect.val();
|
||||
projectConfigs.projectDependencies.yukiHookApiVersion = $('#yukihookapi_version_select option:selected').text();
|
||||
dialogs.configPackage.close();
|
||||
dialogs.packagingProgress.open();
|
||||
build.changeStatus(locale.i18n.waitingForBuildingTip);
|
||||
ipcRenderer.send('run-packaging-project', projectConfigs);
|
||||
},
|
||||
/**
|
||||
* 改变创建过程提示文本
|
||||
* @param msg 文本内容
|
||||
*/
|
||||
changeStatus: (msg) => {
|
||||
$('#packaging_progress_text').html(msg);
|
||||
},
|
||||
/**
|
||||
* 完成创建项目
|
||||
* @param msg 文本内容
|
||||
*/
|
||||
complete: (msg) => {
|
||||
dialogs.packagingProgress.close();
|
||||
mdui.confirm(msg, locale.i18n.buildComplete, () => {
|
||||
ipcRenderer.send('open-complete-project');
|
||||
build.unlockStatus();
|
||||
page.reload();
|
||||
}, () => {
|
||||
build.unlockStatus();
|
||||
page.reload();
|
||||
}, {confirmText: locale.i18n.openProject, cancelText: locale.i18n.done, modal: true, closeOnEsc: false});
|
||||
},
|
||||
/**
|
||||
* 创建项目失败
|
||||
* @param msg 文本内容
|
||||
*/
|
||||
failure: (msg) => {
|
||||
dialogs.packagingProgress.close();
|
||||
build.unlockStatus();
|
||||
mdui.alert(msg, locale.i18n.notice, () => null, {confirmText: locale.i18n.ok});
|
||||
},
|
||||
/** 取消创建项目任务 */
|
||||
cancel: () => {
|
||||
dialogs.packagingProgress.close();
|
||||
build.unlockStatus();
|
||||
page.snack(locale.i18n.operationCancelledTip);
|
||||
},
|
||||
/** 锁定创建项目状态 */
|
||||
lockStatus: () => {
|
||||
build.isLocked = true;
|
||||
},
|
||||
/** 解锁创建项目状态 */
|
||||
unlockStatus: () => {
|
||||
build.isLocked = false;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 依赖查找功能命名空间
|
||||
*/
|
||||
const projectDepends = {
|
||||
/** 依赖 API 获取地址 */
|
||||
urls: {
|
||||
gradlePaper: 'https://services.gradle.org/distributions',
|
||||
androidGradlePlugin: 'https://developer.android.google.cn/studio/releases/gradle-plugin.html',
|
||||
kotlin: 'https://api.github.com/repos/JetBrains/kotlin/releases',
|
||||
kotlinKsp: 'https://api.github.com/repos/google/ksp/releases',
|
||||
yukiHookApi: 'https://s01.oss.sonatype.org/content/repositories/releases/com/highcapable/yukihookapi/api'
|
||||
},
|
||||
/** 搜索项目依赖 */
|
||||
search() {
|
||||
build.lockStatus();
|
||||
dialogs.searchDepend.open();
|
||||
projectDepends.findGradlePaper();
|
||||
},
|
||||
/** 依赖装载完成 */
|
||||
loaded() {
|
||||
dialogs.searchDepend.close();
|
||||
const gradleVersionSelect = $('#gradle_version_select');
|
||||
gradleVersionSelect.html('');
|
||||
dependenciesConfigs.gradlePapers.forEach((value) => {
|
||||
gradleVersionSelect.append('<option value="' + value + '">' + value + '</option>');
|
||||
});
|
||||
const agpVersionSelect = $('#agp_version_select');
|
||||
agpVersionSelect.html('');
|
||||
dependenciesConfigs.androidGradlePluginVersions.forEach((value) => {
|
||||
agpVersionSelect.append('<option value="' + value + '">' + value + '</option>');
|
||||
});
|
||||
const kotlinVersionSelect = $('#kotlin_version_select');
|
||||
kotlinVersionSelect.html('');
|
||||
dependenciesConfigs.kotlinVersions.forEach((value) => {
|
||||
kotlinVersionSelect.append('<option value="' + value.ksp + '">' + value.main + '</option>');
|
||||
});
|
||||
const yukiHookApiVersionSelect = $('#yukihookapi_version_select');
|
||||
yukiHookApiVersionSelect.html('');
|
||||
dependenciesConfigs.yukiHookApiVersions.forEach((value) => {
|
||||
yukiHookApiVersionSelect.append('<option value="' + value + '">' + value + '</option>');
|
||||
});
|
||||
dialogs.configPackage.open();
|
||||
},
|
||||
/**
|
||||
* 回调检索失败
|
||||
* @param name 名称
|
||||
* @param isNetFail 是否为网络错误
|
||||
*/
|
||||
failure: (name, isNetFail = true) => {
|
||||
dialogs.searchDepend.close();
|
||||
build.unlockStatus();
|
||||
mdui.alert(isNetFail ? locale.i18n.networkErrorTip : locale.i18n.ruleCheckFailTip,
|
||||
locale.format(locale.i18n.findDependContentFail, name), () => null, {confirmText: locale.i18n.ok});
|
||||
},
|
||||
/** 获取 Gradle 构建器 */
|
||||
findGradlePaper: () => {
|
||||
httpClient.requestDepends('Gradle', projectDepends.urls.gradlePaper, (body) => {
|
||||
dependenciesConfigs.gradlePapers = [];
|
||||
let index = 0;
|
||||
$(body).find('.items .name').each((_, element) => {
|
||||
const isValied = (element.innerText.endsWith('bin.zip') || element.innerText.endsWith('all.zip'))
|
||||
&& element.innerText.indexOf('-rc-') < 0 && element.innerText.indexOf('mile') < 0;
|
||||
if (isValied) index++;
|
||||
if (index <= 20 && isValied) dependenciesConfigs.gradlePapers.push(element.innerText.trim());
|
||||
});
|
||||
if (dependenciesConfigs.gradlePapers.length > 0)
|
||||
projectDepends.findAgpVersion();
|
||||
else projectDepends.failure('Gradle', false);
|
||||
});
|
||||
},
|
||||
/** 获取 AGP 版本 */
|
||||
findAgpVersion: () => {
|
||||
httpClient.requestDepends('Android Gradle Plugin', projectDepends.urls.androidGradlePlugin, (body) => {
|
||||
dependenciesConfigs.androidGradlePluginVersions = [];
|
||||
$(body).find('h2').each((_, element) => {
|
||||
if (valUtils.startsWithNumber(element.innerText))
|
||||
if (element.innerText.indexOf('(') > 0)
|
||||
dependenciesConfigs.androidGradlePluginVersions.push(element.innerText.split('(')[0].trim());
|
||||
else dependenciesConfigs.androidGradlePluginVersions.push(element.innerText.split('(')[0].trim());
|
||||
});
|
||||
$(body).find('.android-updates-box b').each((_, element) => {
|
||||
if (valUtils.startsWithNumber(element.innerText))
|
||||
if (element.innerText.indexOf('(') > 0)
|
||||
dependenciesConfigs.androidGradlePluginVersions.push(element.innerText.split('(')[0].trim());
|
||||
else dependenciesConfigs.androidGradlePluginVersions.push(element.innerText.split('(')[0].trim());
|
||||
});
|
||||
dependenciesConfigs.androidGradlePluginVersions.sort((a, b) => {
|
||||
return b.localeCompare(a);
|
||||
});
|
||||
if (dependenciesConfigs.androidGradlePluginVersions.length > 0)
|
||||
projectDepends.findKotlinVersion();
|
||||
else projectDepends.failure('Android Gradle Plugin', false);
|
||||
});
|
||||
},
|
||||
/** 获取 Kotlin 版本 */
|
||||
findKotlinVersion: () => {
|
||||
httpClient.requestDepends('Kotlin', projectDepends.urls.kotlin, (body) => {
|
||||
dependenciesConfigs.kotlinVersions = [];
|
||||
body.forEach((value) => {
|
||||
const tagName = value['tag_name'];
|
||||
if (tagName.indexOf('-') < 0)
|
||||
dependenciesConfigs.kotlinVersions.push({main: tagName.replace('v', ''), ksp: ''});
|
||||
});
|
||||
if (dependenciesConfigs.kotlinVersions.length > 0)
|
||||
projectDepends.findKotlinKspVersion();
|
||||
else projectDepends.failure('Kotlin', false);
|
||||
});
|
||||
},
|
||||
/** 获取 Kotlin-Ksp 版本 */
|
||||
findKotlinKspVersion: () => {
|
||||
httpClient.requestDepends('Kotlin-Ksp', projectDepends.urls.kotlinKsp, (body) => {
|
||||
body.forEach((value) => {
|
||||
const tagName = value['tag_name'];
|
||||
if (tagName.toLowerCase().indexOf('rc') < 0 && tagName.toLowerCase().indexOf('beta') < 0)
|
||||
dependenciesConfigs.kotlinVersions.forEach((each) => {
|
||||
if (tagName.startsWith(each.main)) each.ksp = tagName;
|
||||
});
|
||||
});
|
||||
dependenciesConfigs.kotlinVersions = dependenciesConfigs.kotlinVersions.filter((value) => {
|
||||
return !valUtils.isEmpty(value.ksp);
|
||||
});
|
||||
if (dependenciesConfigs.kotlinVersions.length > 0)
|
||||
projectDepends.findYukiHookApiVersion();
|
||||
else projectDepends.failure('Kotlin-Ksp', false);
|
||||
});
|
||||
},
|
||||
/** 获取 YukiHookAPI 版本 */
|
||||
findYukiHookApiVersion: () => {
|
||||
httpClient.requestDepends('YukiHookAPI', projectDepends.urls.yukiHookApi, (body) => {
|
||||
dependenciesConfigs.yukiHookApiVersions = [];
|
||||
$(body).find('td').each((_, element) => {
|
||||
if (element.innerText.endsWith('/') && element.innerText.indexOf('fix') < 0)
|
||||
dependenciesConfigs.yukiHookApiVersions.push(element.innerText.replace('/', '').trim());
|
||||
});
|
||||
if (dependenciesConfigs.yukiHookApiVersions.length > 0) {
|
||||
dependenciesConfigs.yukiHookApiVersions.sort((a, b) => {
|
||||
return b.localeCompare(a);
|
||||
});
|
||||
const latestVersion = dependenciesConfigs.yukiHookApiVersions[0];
|
||||
dependenciesConfigs.yukiHookApiVersions = [];
|
||||
dependenciesConfigs.yukiHookApiVersions.push(latestVersion);
|
||||
projectDepends.loaded();
|
||||
} else projectDepends.failure('YukiHookAPI', false);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 配置模板命名空间
|
||||
*/
|
||||
const configTemplate = {
|
||||
/**
|
||||
* 从模板加载并覆盖当前配置
|
||||
* @param configs 模板
|
||||
*/
|
||||
load: (configs) => {
|
||||
if (build.isLockAndMsg()) return;
|
||||
const parse = JSON.parse(decodeURI(configs));
|
||||
const data = parse.value;
|
||||
mdui.confirm(locale.format(locale.i18n.doYouWantLoadConfigTemplateTip, parse.name), locale.i18n.notice, () => {
|
||||
$('#project_name_text').val(data.basicConfig.projectName);
|
||||
$('#package_name_text').val(data.basicConfig.packageName);
|
||||
$('#app_name_text').val(data.basicConfig.appName);
|
||||
$('#module_description_text').val(data.basicConfig.moduleDescription);
|
||||
$('#app_min_api_text').val(data.basicConfig.appMinApi);
|
||||
$('#app_target_api_text').val(data.basicConfig.appTargetApi);
|
||||
$('#xposed_min_api_text').val(data.basicConfig.xposedMinApi);
|
||||
$('#entry_class_name_text').val(data.yukiHookApiConfig.entryClassName);
|
||||
$('#debug_tag_name_text').val(data.yukiHookApiConfig.debugTagName);
|
||||
$('#compoment_select').val(data.basicConfig.moduleCompoment);
|
||||
$('#target_xposed_platform_select').val(data.basicConfig.targetXposedPlatform);
|
||||
$('#new_xshare_prefs_select').val(data.basicConfig.newXSharePrefs);
|
||||
$('#support_resources_hook_select').val(data.yukiHookApiConfig.supportResourcesHook);
|
||||
$('#enable_debug_select').val(data.yukiHookApiConfig.enableDebug);
|
||||
$('#enable_print_logcat_select').val(data.yukiHookApiConfig.enablePrintLogcat);
|
||||
$('#enable_yprefs_cache_select').val(data.yukiHookApiConfig.enableYPrefsCache);
|
||||
$('#enable_resources_cache_select').val(data.yukiHookApiConfig.enableResourcesCache);
|
||||
$('#enable_module_status_select').val(data.yukiHookApiConfig.enableModuleStatus);
|
||||
$('#enable_ychannel_select').val(data.yukiHookApiConfig.enableYChannel);
|
||||
$('#enable_member_cache_select').val(data.yukiHookApiConfig.enableMemberCache);
|
||||
monitor.refresh();
|
||||
moduleScope.refresh(data.basicConfig.moduleScopes);
|
||||
page.snack(locale.format(locale.i18n.configTemplateLoaded, parse.name));
|
||||
}, () => null, {confirmText: locale.i18n.ok, cancelText: locale.i18n.cancel});
|
||||
},
|
||||
/** 保存当前配置到模板 */
|
||||
createNew: () => {
|
||||
if (build.isLockAndMsg()) return;
|
||||
mdui.prompt(locale.i18n.enterTemplateNameTip, locale.i18n.newTemplateByCurrentConfig, (value, dialog) => {
|
||||
if (valUtils.isEmpty(value)) page.snack(locale.i18n.enterTemplateNameTip);
|
||||
else {
|
||||
build.create();
|
||||
ipcRenderer.send('save-config-template', {name: value, value: projectConfigs});
|
||||
dialog.close();
|
||||
page.snack(locale.format(locale.i18n.configTemplateSaved, value));
|
||||
}
|
||||
}, () => null, {confirmText: locale.i18n.ok, cancelText: locale.i18n.cancel, closeOnConfirm: false});
|
||||
},
|
||||
/** 清空全部模板 */
|
||||
clearAll: () => {
|
||||
if (build.isLockAndMsg()) return;
|
||||
mdui.confirm(locale.i18n.areYouSureClearAllTemplateTip, locale.i18n.notice, () => {
|
||||
ipcRenderer.send('clear-all-config-template');
|
||||
page.snack(locale.i18n.configTemplateCleared);
|
||||
}, () => null, {confirmText: locale.i18n.ok, cancelText: locale.i18n.cancel});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 当前页面命名空间
|
||||
*/
|
||||
const page = {
|
||||
/** 当前应用程序版本 */
|
||||
appVersion: '',
|
||||
/**
|
||||
* 初始化页面
|
||||
*
|
||||
* 启动时调用 - 不完成初始化页面将显示为空白
|
||||
* @param localeName 语言区域名称
|
||||
* @param appVersion 应用程序版本
|
||||
*/
|
||||
init: (localeName, appVersion) => {
|
||||
page.appVersion = appVersion;
|
||||
locale.initLocale(localeName);
|
||||
$('title').text(locale.i18n.windowTitle);
|
||||
$('.i18n').each((_, element) => {
|
||||
const placeholder = $(element).attr('placeholder');
|
||||
const isUsePlaceholder = placeholder !== undefined;
|
||||
const innerHtml = isUsePlaceholder ? placeholder : element.innerHTML;
|
||||
if (innerHtml.indexOf('{{') < 0 || innerHtml.indexOf('}}') < 0) return;
|
||||
const i18nText = locale.i18n[innerHtml.split('{{')[1].split('}}')[0].trim()];
|
||||
if (i18nText !== undefined)
|
||||
if (isUsePlaceholder)
|
||||
$(element).attr('placeholder', innerHtml.replace(/\{\{(.*)}}/, i18nText));
|
||||
else element.innerHTML = innerHtml.replace(/\{\{(.*)}}/, i18nText);
|
||||
});
|
||||
$('#root_div').show();
|
||||
page.checkForUpdates(false);
|
||||
},
|
||||
/**
|
||||
* 弹出提示
|
||||
* @param message 消息
|
||||
*/
|
||||
snack: (message) => {
|
||||
mdui.snackbar({message: message});
|
||||
},
|
||||
/**
|
||||
* 打开系统默认浏览器
|
||||
* @param url 地址
|
||||
*/
|
||||
openBrowser: (url) => {
|
||||
ipcRenderer.send('open-system-browser', url);
|
||||
},
|
||||
/**
|
||||
* 显示关于
|
||||
* @param name 名称
|
||||
* @param version 版本号
|
||||
*/
|
||||
showAbout: (name, version) => {
|
||||
if (build.isLockAndMsg()) return;
|
||||
$('#about_name_text').html(name);
|
||||
$('#about_version_text').html(locale.i18n.version + ': ' + version);
|
||||
new mdui.Dialog('#about_dialog').open();
|
||||
},
|
||||
/** 显示开源相关 */
|
||||
showOpenSource: () => {
|
||||
if (build.isLockAndMsg()) return;
|
||||
new mdui.Dialog('#open_source_dialog').open();
|
||||
},
|
||||
/**
|
||||
* 检查更新
|
||||
* @param isShowProcess 是否显示正在检查更新的提示
|
||||
*/
|
||||
checkForUpdates: (isShowProcess = true) => {
|
||||
if (build.isLockAndMsg()) return;
|
||||
if (isShowProcess) page.snack(locale.i18n.checkUpdateTip);
|
||||
const repoAuthor = 'fankes';
|
||||
const repoName = 'YukiHookAPI-ProjectBuilder';
|
||||
httpClient.requestGet('https://api.github.com/repos/' + repoAuthor + '/' + repoName + '/releases/latest', (body) => {
|
||||
const newVersion = body['name'] ?? '';
|
||||
const updateLogs = body['body']?.replace(/\n/g, "<br/>") ?? '';
|
||||
const updateUrl = body['html_url'] ?? '';
|
||||
if (newVersion !== page.appVersion)
|
||||
mdui.confirm(locale.i18n.version + ': ' + newVersion + '<br/><br/>' +
|
||||
'<strong>' + locale.i18n.updateLogs + '</strong><br/><br/>' + updateLogs, locale.i18n.newVersionFound, () => {
|
||||
page.openBrowser(updateUrl);
|
||||
}, () => null, {
|
||||
confirmText: locale.i18n.updateNow,
|
||||
cancelText: locale.i18n.cancel,
|
||||
modal: true,
|
||||
closeOnEsc: false
|
||||
});
|
||||
else if (isShowProcess) page.snack(locale.i18n.upToDateTip);
|
||||
}, () => {
|
||||
if (isShowProcess) page.snack(locale.i18n.checkUpdateFailTip);
|
||||
});
|
||||
},
|
||||
/** 重置当前配置 */
|
||||
restore: () => {
|
||||
if (build.isLockAndMsg()) return;
|
||||
mdui.confirm(locale.i18n.areYouSureRestoreChangeTip, locale.i18n.notice, () => {
|
||||
page.reload();
|
||||
}, () => null, {confirmText: locale.i18n.ok, cancelText: locale.i18n.cancel});
|
||||
},
|
||||
/** 初始化页面 */
|
||||
reload: () => {
|
||||
ipcRenderer.send('reload-current-page');
|
||||
},
|
||||
/** 重启以生效更改 */
|
||||
relaunch: () => {
|
||||
if (build.isLockAndMsg()) return;
|
||||
mdui.confirm(locale.i18n.mustRestartTakeEffectTip, locale.i18n.notice, () => {
|
||||
ipcRenderer.send('relaunch-app');
|
||||
}, () => null, {confirmText: locale.i18n.ok, cancelText: locale.i18n.later});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 网络请求命名空间
|
||||
*/
|
||||
const httpClient = {
|
||||
/**
|
||||
* 请求获取每个依赖的发布页面内容
|
||||
* @param name 名称
|
||||
* @param url 地址
|
||||
* @param onSuccess 回调成功结果
|
||||
*/
|
||||
requestDepends: (name, url, onSuccess) => {
|
||||
httpClient.requestGet(url, onSuccess, () => {
|
||||
projectDepends.failure(name);
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 请求页面内容 GET
|
||||
* @param url 地址
|
||||
* @param onSuccess 回调成功结果
|
||||
* @param onFaiure 回调失败结果
|
||||
*/
|
||||
requestGet: (url, onSuccess, onFaiure) => {
|
||||
$.ajax({
|
||||
url: url,
|
||||
method: 'get',
|
||||
success: (body) => {
|
||||
onSuccess(body);
|
||||
},
|
||||
error: () => {
|
||||
onFaiure();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user