Compare commits
55 Commits
v1.0.4
...
c7824c920b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c7824c920b | ||
|
|
817ad978e2 | ||
|
|
1d59128e47 | ||
|
|
62537f5814 | ||
|
|
5f91160d9a | ||
|
|
64ee8189b1 | ||
|
|
665a51f962 | ||
|
|
bd77beb60a | ||
|
|
578bb926fa | ||
|
|
2c64038fda | ||
|
|
9a27ae8e69 | ||
|
|
6716456b04 | ||
|
|
ec3440a0fb | ||
|
|
598c0cbde4 | ||
|
|
bce68681ac | ||
|
|
85bc4635bc | ||
|
|
c94abdb3c5 | ||
|
|
4ed9c029ca | ||
|
|
ba7352d26e | ||
|
|
b8c370893a | ||
|
|
8b592e2e48 | ||
|
|
1e8aa3a2d4 | ||
|
|
70f4df431f | ||
|
|
6c3c15a85d | ||
|
|
b84be2ecb2 | ||
|
|
faaf254f2c | ||
|
|
0776b07b12 | ||
|
|
6ad62bfdab | ||
|
|
ab2fdb28c2 | ||
|
|
5a681067b7 | ||
|
|
bdce0ecf70 | ||
|
|
6e09c6012d | ||
|
|
851a9173af | ||
|
|
7caf726381 | ||
|
|
1a055bdca7 | ||
|
|
5d5d6d2244 | ||
|
|
862af21ec2 | ||
|
|
2037328800 | ||
|
|
bb6092e3ac | ||
|
|
014fbe78bf | ||
|
|
a89b546755 | ||
|
|
490bc0f597 | ||
|
|
d0ee140a44 | ||
|
|
e4abb578f0 | ||
|
|
fdde0037f9 | ||
|
|
e2ec85c24e | ||
|
|
3fd167e889 | ||
|
|
0e78441fa1 | ||
|
|
04de960c0f | ||
|
|
a83206bf4b | ||
|
|
6a20abae19 | ||
|
|
32ddb21ed2 | ||
|
|
68d69353e6 | ||
|
|
7f859c3eda | ||
|
|
7903977b29 |
17
CHANGELOG.md
@@ -1,3 +1,19 @@
|
||||
## v1.0.7
|
||||
* 首页任务增加分类
|
||||
* 增加国际化相关配置
|
||||
* 登录页状态栏适配
|
||||
|
||||
## v1.0.6
|
||||
* 支持切换账号功能
|
||||
* 登录页青龙图标随颜色主题变换
|
||||
* apk大小减少2/3,只支持arm架构,不再支持x86
|
||||
|
||||
## v1.0.5
|
||||
* 优化配置文件编辑功能
|
||||
* 优化文本选择样式
|
||||
* 增加页面错误toast
|
||||
* 修改iOS端app icon
|
||||
|
||||
## 1.0.4
|
||||
* 增加主题切换功能,各种颜色主题随意切换
|
||||
* 修改无法停止任务的bug
|
||||
@@ -12,6 +28,7 @@
|
||||
|
||||
* 解决2.10.12及以下版本无法登录的问题
|
||||
* 适配最新版qinglong 相关接口字段
|
||||
* 其他页面排版优化
|
||||
|
||||
## 1.0.2
|
||||
|
||||
|
||||
798
LICENSE
@@ -1,201 +1,661 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
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.
|
||||
|
||||
1. Definitions.
|
||||
Preamble
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are 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.
|
||||
|
||||
"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.
|
||||
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.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
|
||||
"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.
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
|
||||
"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).
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing under
|
||||
this license.
|
||||
|
||||
"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.
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
"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."
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
"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.
|
||||
0. Definitions.
|
||||
|
||||
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.
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
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.
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
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:
|
||||
"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.
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
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.
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
(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
|
||||
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.
|
||||
|
||||
(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.
|
||||
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.
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
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.
|
||||
1. Source Code.
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same 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.
|
||||
2. Basic Permissions.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
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.
|
||||
|
||||
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
|
||||
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.
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
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.
|
||||
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. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your version
|
||||
supports such interaction) an opportunity to receive the Corresponding
|
||||
Source of your version by providing access to the Corresponding Source
|
||||
from a network server at no charge, through some standard or customary
|
||||
means of facilitating copying of software. This Corresponding Source
|
||||
shall include the Corresponding Source for any work covered by version 3
|
||||
of the GNU General Public License that is incorporated pursuant to the
|
||||
following paragraph.
|
||||
|
||||
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 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 work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU Affero 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 Affero 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 Affero 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 Affero 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 Affero 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 Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero 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 your software can interact with users remotely through a computer
|
||||
network, you should also make sure that it provides a way for users to
|
||||
get its source. For example, if your program is a web application, its
|
||||
interface could display a "Source" link that leads users to an archive
|
||||
of the code. There are many ways you could offer source, and different
|
||||
solutions will be better for different programs; see section 13 for the
|
||||
specific requirements.
|
||||
|
||||
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 AGPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
20
README.md
@@ -38,6 +38,26 @@ iOS端暂无上架打算,用户自行下载main分支源码编译安装
|
||||
<img src="./art/8.jpg" width="200" />
|
||||
</p>
|
||||
|
||||
## [更新记录](./CHANGELOG.md)
|
||||
|
||||
|
||||
### 不支持的功能
|
||||
>* 应用设置
|
||||
>* 通知设置
|
||||
|
||||
|
||||
版本更新通知 https://t.me/qinglongapp
|
||||
|
||||
用于生成app的图标
|
||||
|
||||
flutter pub run flutter_launcher_icons:main
|
||||
生成原生的启动页面
|
||||
|
||||
flutter pub run flutter_native_splash:create
|
||||
修改app名称
|
||||
|
||||
flutter pub run flutter_app_name
|
||||
|
||||
生成json.jc.dart文件
|
||||
flutter pub run build_runner build --delete-conflicting-outputs
|
||||
|
||||
|
||||
@@ -42,19 +42,35 @@ android {
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId "work.master.qinglongapp"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion flutter.targetSdkVersion
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||
signingConfig signingConfigs.debug
|
||||
ndk {
|
||||
abiFilters 'armeabi-v7a', 'arm64-v8a'
|
||||
}
|
||||
}
|
||||
signingConfigs {
|
||||
|
||||
release {
|
||||
storeFile file("qinglong.keystore")
|
||||
storePassword "jiangyuesong"
|
||||
keyAlias "jiangyuesong"
|
||||
keyPassword "jiangyuesong"
|
||||
|
||||
// Optional, specify signing versions used
|
||||
v1SigningEnabled true
|
||||
v2SigningEnabled true
|
||||
}
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
flutter {
|
||||
|
||||
@@ -1,37 +1,30 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="work.master.qinglongapp">
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<queries>
|
||||
<intent>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<data android:scheme="https" />
|
||||
</intent>
|
||||
|
||||
</queries>
|
||||
<application
|
||||
android:label="青龙客户端"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="青龙">
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||
android:exported="true"
|
||||
android:hardwareAccelerated="true"
|
||||
android:launchMode="singleTop"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/LaunchTheme"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||
android:hardwareAccelerated="true"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<!-- Specifies an Android theme to apply to this Activity as soon as
|
||||
the Android process has started. This theme is visible to the user
|
||||
while the Flutter UI initializes. After that, this theme continues
|
||||
to determine the Window background behind the Flutter UI. -->
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.android.NormalTheme"
|
||||
android:resource="@style/NormalTheme" />
|
||||
android:name="io.flutter.embedding.android.NormalTheme"
|
||||
android:resource="@style/NormalTheme"
|
||||
/>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<!-- Don't delete the meta-data below.
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
package work.master.qinglong_app
|
||||
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
|
||||
class MainActivity: FlutterActivity() {
|
||||
}
|
||||
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 29 KiB |
18
android/app/src/main/res/values-night-v31/styles.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<item name="android:forceDarkAllowed">false</item>
|
||||
<item name="android:windowFullscreen">false</item>
|
||||
<item name="android:windowSplashScreenBackground">#000000</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
This theme determines the color of the Android Window while your
|
||||
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||
running.
|
||||
|
||||
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<item name="android:windowBackground">?android:colorBackground</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -5,6 +5,7 @@
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
Flutter draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
<item name="android:forceDarkAllowed">false</item>
|
||||
<item name="android:windowFullscreen">false</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
|
||||
18
android/app/src/main/res/values-v31/styles.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<item name="android:forceDarkAllowed">false</item>
|
||||
<item name="android:windowFullscreen">false</item>
|
||||
<item name="android:windowSplashScreenBackground">#ffffff</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
This theme determines the color of the Android Window while your
|
||||
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||
running.
|
||||
|
||||
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<item name="android:windowBackground">?android:colorBackground</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -5,6 +5,7 @@
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
Flutter draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
<item name="android:forceDarkAllowed">false</item>
|
||||
<item name="android:windowFullscreen">false</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.3.50'
|
||||
ext.kotlin_version = '1.6.10'
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
|
||||
BIN
apk/app-release-v1.0.6.apk
Normal file
BIN
apk/app-release-v1.0.8.apk
Normal file
BIN
assets/images/chun.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
assets/images/kuai.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
assets/images/le.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 115 KiB After Width: | Height: | Size: 18 KiB |
BIN
assets/images/ql_splash.png
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
assets/images/ql_white.png
Normal file
|
After Width: | Height: | Size: 62 KiB |
BIN
assets/images/xin.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
34
ios/.gitignore
vendored
@@ -1,34 +0,0 @@
|
||||
**/dgph
|
||||
*.mode1v3
|
||||
*.mode2v3
|
||||
*.moved-aside
|
||||
*.pbxuser
|
||||
*.perspectivev3
|
||||
**/*sync/
|
||||
.sconsign.dblite
|
||||
.tags*
|
||||
**/.vagrant/
|
||||
**/DerivedData/
|
||||
Icon?
|
||||
**/Pods/
|
||||
**/.symlinks/
|
||||
profile
|
||||
xcuserdata
|
||||
**/.generated/
|
||||
Flutter/App.framework
|
||||
Flutter/Flutter.framework
|
||||
Flutter/Flutter.podspec
|
||||
Flutter/Generated.xcconfig
|
||||
Flutter/ephemeral/
|
||||
Flutter/app.flx
|
||||
Flutter/app.zip
|
||||
Flutter/flutter_assets/
|
||||
Flutter/flutter_export_environment.sh
|
||||
ServiceDefinitions.json
|
||||
Runner/GeneratedPluginRegistrant.*
|
||||
|
||||
# Exceptions to above rules.
|
||||
!default.mode1v3
|
||||
!default.mode2v3
|
||||
!default.pbxuser
|
||||
!default.perspectivev3
|
||||
@@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>App</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.flutter.flutter.app</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>App</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>9.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,2 +0,0 @@
|
||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
|
||||
#include "Generated.xcconfig"
|
||||
@@ -1,2 +0,0 @@
|
||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
|
||||
#include "Generated.xcconfig"
|
||||
41
ios/Podfile
@@ -1,41 +0,0 @@
|
||||
# Uncomment this line to define a global platform for your project
|
||||
# platform :ios, '9.0'
|
||||
|
||||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
||||
platform :ios, '9.0'
|
||||
project 'Runner', {
|
||||
'Debug' => :debug,
|
||||
'Profile' => :release,
|
||||
'Release' => :release,
|
||||
}
|
||||
|
||||
def flutter_root
|
||||
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
|
||||
unless File.exist?(generated_xcode_build_settings_path)
|
||||
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
|
||||
end
|
||||
|
||||
File.foreach(generated_xcode_build_settings_path) do |line|
|
||||
matches = line.match(/FLUTTER_ROOT\=(.*)/)
|
||||
return matches[1].strip if matches
|
||||
end
|
||||
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
|
||||
end
|
||||
|
||||
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
|
||||
|
||||
flutter_ios_podfile_setup
|
||||
|
||||
target 'Runner' do
|
||||
use_frameworks!
|
||||
use_modular_headers!
|
||||
|
||||
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
|
||||
end
|
||||
|
||||
post_install do |installer|
|
||||
installer.pods_project.targets.each do |target|
|
||||
flutter_additional_ios_build_settings(target)
|
||||
end
|
||||
end
|
||||
@@ -1,53 +0,0 @@
|
||||
PODS:
|
||||
- Flutter (1.0.0)
|
||||
- fluttertoast (0.0.2):
|
||||
- Flutter
|
||||
- Toast
|
||||
- move_to_background (0.0.1):
|
||||
- Flutter
|
||||
- package_info_plus (0.4.5):
|
||||
- Flutter
|
||||
- shared_preferences_ios (0.0.1):
|
||||
- Flutter
|
||||
- Toast (4.0.0)
|
||||
- url_launcher_ios (0.0.1):
|
||||
- Flutter
|
||||
|
||||
DEPENDENCIES:
|
||||
- Flutter (from `Flutter`)
|
||||
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
|
||||
- move_to_background (from `.symlinks/plugins/move_to_background/ios`)
|
||||
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
|
||||
- shared_preferences_ios (from `.symlinks/plugins/shared_preferences_ios/ios`)
|
||||
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
|
||||
|
||||
SPEC REPOS:
|
||||
trunk:
|
||||
- Toast
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
Flutter:
|
||||
:path: Flutter
|
||||
fluttertoast:
|
||||
:path: ".symlinks/plugins/fluttertoast/ios"
|
||||
move_to_background:
|
||||
:path: ".symlinks/plugins/move_to_background/ios"
|
||||
package_info_plus:
|
||||
:path: ".symlinks/plugins/package_info_plus/ios"
|
||||
shared_preferences_ios:
|
||||
:path: ".symlinks/plugins/shared_preferences_ios/ios"
|
||||
url_launcher_ios:
|
||||
:path: ".symlinks/plugins/url_launcher_ios/ios"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
|
||||
fluttertoast: 6122fa75143e992b1d3470f61000f591a798cc58
|
||||
move_to_background: 39a5b79b26d577b0372cbe8a8c55e7aa9fcd3a2d
|
||||
package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e
|
||||
shared_preferences_ios: aef470a42dc4675a1cdd50e3158b42e3d1232b32
|
||||
Toast: 91b396c56ee72a5790816f40d3a94dd357abc196
|
||||
url_launcher_ios: 02f1989d4e14e998335b02b67a7590fa34f971af
|
||||
|
||||
PODFILE CHECKSUM: aea2ed8a4b05dec076f6f7cea39202b1133ed51c
|
||||
|
||||
COCOAPODS: 1.11.2
|
||||
@@ -1,557 +0,0 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 51;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
||||
2E5B253B8F6E332504CD094A /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D8A94003E0C6A5209401E856 /* Pods_Runner.framework */; };
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
9705A1C41CF9048500538489 /* Embed Frameworks */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
);
|
||||
name = "Embed Frameworks";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
|
||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
|
||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
|
||||
6FAEBE56016E57C6396F6C5D /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
|
||||
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
B72F12A63B85459532204337 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
|
||||
BE9194DCED1166C78BAC3036 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
|
||||
D8A94003E0C6A5209401E856 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
97C146EB1CF9000F007C117D /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
2E5B253B8F6E332504CD094A /* Pods_Runner.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
2CC5BF901E47A28826DC8B92 /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
6FAEBE56016E57C6396F6C5D /* Pods-Runner.debug.xcconfig */,
|
||||
B72F12A63B85459532204337 /* Pods-Runner.release.xcconfig */,
|
||||
BE9194DCED1166C78BAC3036 /* Pods-Runner.profile.xcconfig */,
|
||||
);
|
||||
path = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
6AC682C528FC3A77A86CCA78 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D8A94003E0C6A5209401E856 /* Pods_Runner.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9740EEB11CF90186004384FC /* Flutter */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */,
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
|
||||
9740EEB31CF90195004384FC /* Generated.xcconfig */,
|
||||
);
|
||||
name = Flutter;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146E51CF9000F007C117D = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9740EEB11CF90186004384FC /* Flutter */,
|
||||
97C146F01CF9000F007C117D /* Runner */,
|
||||
97C146EF1CF9000F007C117D /* Products */,
|
||||
2CC5BF901E47A28826DC8B92 /* Pods */,
|
||||
6AC682C528FC3A77A86CCA78 /* Frameworks */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146EF1CF9000F007C117D /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
97C146EE1CF9000F007C117D /* Runner.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146F01CF9000F007C117D /* Runner */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
97C146FA1CF9000F007C117D /* Main.storyboard */,
|
||||
97C146FD1CF9000F007C117D /* Assets.xcassets */,
|
||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
|
||||
97C147021CF9000F007C117D /* Info.plist */,
|
||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
|
||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
|
||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
|
||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
|
||||
);
|
||||
path = Runner;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
97C146ED1CF9000F007C117D /* Runner */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
|
||||
buildPhases = (
|
||||
8CB7F14EC4C8F4D08BD21907 /* [CP] Check Pods Manifest.lock */,
|
||||
9740EEB61CF901F6004384FC /* Run Script */,
|
||||
97C146EA1CF9000F007C117D /* Sources */,
|
||||
97C146EB1CF9000F007C117D /* Frameworks */,
|
||||
97C146EC1CF9000F007C117D /* Resources */,
|
||||
9705A1C41CF9048500538489 /* Embed Frameworks */,
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
||||
8939D68CBA57A50D249AF20A /* [CP] Embed Pods Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = Runner;
|
||||
productName = Runner;
|
||||
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
97C146E61CF9000F007C117D /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1300;
|
||||
ORGANIZATIONNAME = "";
|
||||
TargetAttributes = {
|
||||
97C146ED1CF9000F007C117D = {
|
||||
CreatedOnToolsVersion = 7.3.1;
|
||||
LastSwiftMigration = 1100;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
|
||||
compatibilityVersion = "Xcode 9.3";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = 97C146E51CF9000F007C117D;
|
||||
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
97C146ED1CF9000F007C117D /* Runner */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
97C146EC1CF9000F007C117D /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Thin Binary";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
|
||||
};
|
||||
8939D68CBA57A50D249AF20A /* [CP] Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
8CB7F14EC4C8F4D08BD21907 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
9740EEB61CF901F6004384FC /* Run Script */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Run Script";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
97C146EA1CF9000F007C117D /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
|
||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
97C146FA1CF9000F007C117D /* Main.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
97C146FB1CF9000F007C117D /* Base */,
|
||||
);
|
||||
name = Main.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
97C147001CF9000F007C117D /* Base */,
|
||||
);
|
||||
name = LaunchScreen.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
249021D3217E4FDB00AE95B9 /* Profile */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
PRODUCT_NAME = "";
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTED_PLATFORMS = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Profile;
|
||||
};
|
||||
249021D4217E4FDB00AE95B9 /* Profile */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
DEVELOPMENT_TEAM = MKUK6TT46Z;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = work.master.qinglongApp;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Profile;
|
||||
};
|
||||
97C147031CF9000F007C117D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PRODUCT_NAME = "";
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
97C147041CF9000F007C117D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
PRODUCT_NAME = "";
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTED_PLATFORMS = iphoneos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
97C147061CF9000F007C117D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
DEVELOPMENT_TEAM = MKUK6TT46Z;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = work.master.qinglongApp;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
97C147071CF9000F007C117D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
DEVELOPMENT_TEAM = MKUK6TT46Z;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = work.master.qinglongApp;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
97C147031CF9000F007C117D /* Debug */,
|
||||
97C147041CF9000F007C117D /* Release */,
|
||||
249021D3217E4FDB00AE95B9 /* Profile */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
97C147061CF9000F007C117D /* Debug */,
|
||||
97C147071CF9000F007C117D /* Release */,
|
||||
249021D4217E4FDB00AE95B9 /* Profile */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 97C146E61CF9000F007C117D /* Project object */;
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PreviewsEnabled</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,78 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1320"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -1,87 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1300"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<Testables>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Profile"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
10
ios/Runner.xcworkspace/contents.xcworkspacedata
generated
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:Runner.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:Pods/Pods.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PreviewsEnabled</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,13 +0,0 @@
|
||||
import UIKit
|
||||
import Flutter
|
||||
|
||||
@UIApplicationMain
|
||||
@objc class AppDelegate: FlutterAppDelegate {
|
||||
override func application(
|
||||
_ application: UIApplication,
|
||||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
||||
) -> Bool {
|
||||
GeneratedPluginRegistrant.register(with: self)
|
||||
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
||||
}
|
||||
}
|
||||
@@ -1,122 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-20x20@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-29x29@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-40x40@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-76x76@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-76x76@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "83.5x83.5",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-83.5x83.5@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "1024x1024",
|
||||
"idiom" : "ios-marketing",
|
||||
"filename" : "Icon-App-1024x1024@1x.png",
|
||||
"scale" : "1x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 62 KiB |
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "BrandingImage.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "BrandingImage@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "BrandingImage@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "background.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"filename" : "darkbackground.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 68 B |
|
Before Width: | Height: | Size: 70 B |
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "LaunchImage.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "LaunchImage@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "LaunchImage@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 71 KiB |
@@ -1,5 +0,0 @@
|
||||
# Launch Screen Assets
|
||||
|
||||
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
|
||||
|
||||
You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
|
||||
@@ -1,44 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="EHf-IW-A2E">
|
||||
<objects>
|
||||
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" image="LaunchBackground" translatesAutoresizingMaskIntoConstraints="NO" id="tWc-Dq-wcI"/>
|
||||
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4"></imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="3T2-ad-Qdv"/>
|
||||
<constraint firstItem="tWc-Dq-wcI" firstAttribute="bottom" secondItem="Ze5-6b-2t3" secondAttribute="bottom" id="RPx-PI-7Xg"/>
|
||||
<constraint firstItem="tWc-Dq-wcI" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="SdS-ul-q2q"/>
|
||||
<constraint firstAttribute="trailing" secondItem="tWc-Dq-wcI" secondAttribute="trailing" id="Swv-Gf-Rwn"/>
|
||||
<constraint firstAttribute="trailing" secondItem="YRO-k0-Ey4" secondAttribute="trailing" id="TQA-XW-tRk"/>
|
||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="bottom" secondItem="Ze5-6b-2t3" secondAttribute="bottom" id="duK-uY-Gun"/>
|
||||
<constraint firstItem="tWc-Dq-wcI" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="kV7-tw-vXt"/>
|
||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="xPn-NY-SIU"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="53" y="375"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="LaunchImage" width="240" height="240"/>
|
||||
<image name="LaunchBackground" width="1" height="1"/>
|
||||
</resources>
|
||||
</document>
|
||||
@@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Flutter View Controller-->
|
||||
<scene sceneID="tne-QT-ifu">
|
||||
<objects>
|
||||
<viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
||||
@@ -1,54 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>青龙</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>青龙</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>$(FLUTTER_BUILD_NAME)</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>LSApplicationQueriesSchemes</key>
|
||||
<array>
|
||||
<string>https</string>
|
||||
<string>http</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
<key>UIStatusBarHidden</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1 +0,0 @@
|
||||
#import "GeneratedPluginRegistrant.h"
|
||||
@@ -1,6 +1,9 @@
|
||||
import 'package:qinglong_app/base/http/http.dart';
|
||||
import 'package:qinglong_app/base/http/url.dart';
|
||||
import 'package:qinglong_app/main.dart';
|
||||
import 'package:qinglong_app/module/config/config_bean.dart';
|
||||
import 'package:qinglong_app/module/env/env_bean.dart';
|
||||
import 'package:qinglong_app/module/home/system_bean.dart';
|
||||
import 'package:qinglong_app/module/login/login_bean.dart';
|
||||
import 'package:qinglong_app/module/login/user_bean.dart';
|
||||
import 'package:qinglong_app/module/others/dependencies/dependency_bean.dart';
|
||||
@@ -8,10 +11,16 @@ import 'package:qinglong_app/module/others/login_log/login_log_bean.dart';
|
||||
import 'package:qinglong_app/module/others/scripts/script_bean.dart';
|
||||
import 'package:qinglong_app/module/others/task_log/task_log_bean.dart';
|
||||
import 'package:qinglong_app/module/task/task_bean.dart';
|
||||
|
||||
import 'url.dart';
|
||||
import 'package:qinglong_app/utils/utils.dart';
|
||||
|
||||
class Api {
|
||||
static Future<HttpResponse<SystemBean>> system() async {
|
||||
return await Http.get<SystemBean>(
|
||||
Url.system,
|
||||
{},
|
||||
);
|
||||
}
|
||||
|
||||
static Future<HttpResponse<LoginBean>> login(
|
||||
String userName,
|
||||
String passWord,
|
||||
@@ -24,10 +33,11 @@ class Api {
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
static Future<HttpResponse<LoginBean>> loginOld(
|
||||
String userName,
|
||||
String passWord,
|
||||
) async {
|
||||
String userName,
|
||||
String passWord,
|
||||
) async {
|
||||
return await Http.post<LoginBean>(
|
||||
Url.loginOld,
|
||||
{
|
||||
@@ -36,6 +46,7 @@ class Api {
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
static Future<HttpResponse<LoginBean>> loginTwo(
|
||||
String userName,
|
||||
String passWord,
|
||||
@@ -109,12 +120,21 @@ class Api {
|
||||
);
|
||||
}
|
||||
|
||||
static Future<HttpResponse<NullResponse>> addTask(String name, String command, String cron, {String? id}) async {
|
||||
var data = {"name": name, "command": command, "schedule": cron};
|
||||
static Future<HttpResponse<NullResponse>> addTask(
|
||||
String name,
|
||||
String command,
|
||||
String cron, {
|
||||
int? id,
|
||||
String? nId,
|
||||
}) async {
|
||||
var data = <String, dynamic>{"name": name, "command": command, "schedule": cron};
|
||||
|
||||
if (id != null) {
|
||||
data["_id"] = id;
|
||||
data["id"] = id;
|
||||
if (id != null || nId != null) {
|
||||
if (id != null) {
|
||||
data["id"] = id;
|
||||
} else if (nId != null) {
|
||||
data["_id"] = nId;
|
||||
}
|
||||
return await Http.put<NullResponse>(
|
||||
Url.addTask,
|
||||
data,
|
||||
@@ -210,16 +230,25 @@ class Api {
|
||||
);
|
||||
}
|
||||
|
||||
static Future<HttpResponse<NullResponse>> addEnv(String name, String value, String remarks, {String? id}) async {
|
||||
var data = {
|
||||
static Future<HttpResponse<NullResponse>> addEnv(
|
||||
String name,
|
||||
String value,
|
||||
String remarks, {
|
||||
int? id,
|
||||
String? nId,
|
||||
}) async {
|
||||
var data = <String, dynamic>{
|
||||
"value": value,
|
||||
"remarks": remarks,
|
||||
"name": name,
|
||||
};
|
||||
|
||||
if (id != null) {
|
||||
data["_id"] = id;
|
||||
data["id"] = id;
|
||||
if (id != null || nId != null) {
|
||||
if (id != null) {
|
||||
data["id"] = id;
|
||||
} else if (nId != null) {
|
||||
data["_id"] = nId;
|
||||
}
|
||||
return await Http.put<NullResponse>(
|
||||
Url.addEnv,
|
||||
data,
|
||||
@@ -246,19 +275,27 @@ class Api {
|
||||
}
|
||||
|
||||
static Future<HttpResponse<List<TaskLogBean>>> taskLog() async {
|
||||
return await Http.get<List<TaskLogBean>>(Url.taskLog, null, serializationName: "dirs");
|
||||
return await Http.get<List<TaskLogBean>>(Url.taskLog, null, serializationName: Utils.isUpperVersion2_12_2() ? "data" : "dirs");
|
||||
}
|
||||
|
||||
static Future<HttpResponse<String>> taskLogDetail(String name) async {
|
||||
return await Http.get<String>(
|
||||
Url.taskLogDetail + name,
|
||||
null,
|
||||
);
|
||||
static Future<HttpResponse<String>> taskLogDetail(String name, String path) async {
|
||||
if (Utils.isUpperVersion2_13_0()) {
|
||||
return await Http.get<String>(
|
||||
Url.taskLogDetail + name + "?path=" + path,
|
||||
null,
|
||||
);
|
||||
} else {
|
||||
return await Http.get<String>(
|
||||
Url.taskLogDetail + path + "/" + name,
|
||||
null,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
static Future<HttpResponse<List<ScriptBean>>> scripts() async {
|
||||
//2.12.2以及以上版本,脚本路径url做了修改
|
||||
return await Http.get<List<ScriptBean>>(
|
||||
Url.scripts,
|
||||
Utils.isUpperVersion2_13_0() ? Url.scripts2 : Url.scripts,
|
||||
null,
|
||||
);
|
||||
}
|
||||
@@ -328,6 +365,17 @@ class Api {
|
||||
);
|
||||
}
|
||||
|
||||
static Future<HttpResponse<NullResponse>> addScript(String name, String path, String content) async {
|
||||
return await Http.post<NullResponse>(
|
||||
Url.addScript,
|
||||
{
|
||||
"filename": name,
|
||||
"path": path,
|
||||
"content": content,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
static Future<HttpResponse<NullResponse>> delDependency(String id) async {
|
||||
return await Http.delete<NullResponse>(
|
||||
Url.dependencies,
|
||||
|
||||
@@ -127,6 +127,7 @@ class Http {
|
||||
}
|
||||
|
||||
static HttpResponse<T> exceptionHandler<T>(DioError e, String path) {
|
||||
logger.e(e);
|
||||
if (e.response?.statusCode == 401 && !Url.inWhiteList(path)) {
|
||||
if (!getIt<UserInfoViewModel>().useSecretLogined) {
|
||||
exitLogin();
|
||||
|
||||
@@ -7,18 +7,22 @@ import '../userinfo_viewmodel.dart';
|
||||
class TokenInterceptor extends Interceptor {
|
||||
@override
|
||||
void onRequest(RequestOptions options, RequestInterceptorHandler handler) {
|
||||
if (getIt<UserInfoViewModel>().token != null && getIt<UserInfoViewModel>().token!.isNotEmpty) {
|
||||
options.headers["Authorization"] = "Bearer " + getIt<UserInfoViewModel>().token!;
|
||||
}
|
||||
|
||||
options.headers["User-Agent"] =
|
||||
"Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1";
|
||||
"qinglong_client";
|
||||
|
||||
options.headers["Content-Type"] = "application/json;charset=UTF-8";
|
||||
|
||||
|
||||
if (!Url.inWhiteList(options.path)) {
|
||||
options.queryParameters["t"] = (DateTime.now().millisecondsSinceEpoch ~/ 1000).toString();
|
||||
options.queryParameters["t"] =
|
||||
(DateTime.now().millisecondsSinceEpoch ~/ 1000).toString();
|
||||
}
|
||||
|
||||
if (!Url.inLoginList(options.path)) {
|
||||
if (getIt<UserInfoViewModel>().token != null &&
|
||||
getIt<UserInfoViewModel>().token!.isNotEmpty) {
|
||||
options.headers["Authorization"] =
|
||||
"Bearer " + getIt<UserInfoViewModel>().token!;
|
||||
}
|
||||
}
|
||||
return handler.next(options);
|
||||
}
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import '../../main.dart';
|
||||
import '../userinfo_viewmodel.dart';
|
||||
import 'package:qinglong_app/base/userinfo_viewmodel.dart';
|
||||
import 'package:qinglong_app/main.dart';
|
||||
|
||||
class Url {
|
||||
static get login => "/api/user/login";
|
||||
|
||||
static get system => "/api/system";
|
||||
|
||||
static get loginOld => "/api/login";
|
||||
|
||||
static get loginTwo => "/api/user/two-factor/login";
|
||||
@@ -54,12 +56,16 @@ class Url {
|
||||
|
||||
static get scripts => getIt<UserInfoViewModel>().useSecretLogined ? "/open/scripts/files" : "/api/scripts/files";
|
||||
|
||||
static get scripts2 => getIt<UserInfoViewModel>().useSecretLogined ? "/open/scripts" : "/api/scripts";
|
||||
|
||||
static get scriptUpdate => getIt<UserInfoViewModel>().useSecretLogined ? "/open/scripts" : "/api/scripts";
|
||||
|
||||
static get scriptDetail => getIt<UserInfoViewModel>().useSecretLogined ? "/open/scripts/" : "/api/scripts/";
|
||||
|
||||
static get dependencies => getIt<UserInfoViewModel>().useSecretLogined ? "/open/dependencies" : "/api/dependencies";
|
||||
|
||||
static get addScript => getIt<UserInfoViewModel>().useSecretLogined ? "/open/scripts" : "/api/scripts";
|
||||
|
||||
static get dependencyReinstall => getIt<UserInfoViewModel>().useSecretLogined ? "/open/dependencies/reinstall" : "/api/dependencies/reinstall";
|
||||
|
||||
static intimeLog(String cronId) {
|
||||
@@ -77,5 +83,10 @@ class Url {
|
||||
return false;
|
||||
}
|
||||
|
||||
static String checkUpdateUrl = "https://raw.githubusercontent.com/qinglong-app/qinglong_app/main/version";
|
||||
static bool inLoginList(String path) {
|
||||
if (path == login || path == loginByClientId || path == loginOld) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,15 @@ class Routes {
|
||||
case routeHomePage:
|
||||
return MaterialPageRoute(builder: (context) => const HomePage());
|
||||
case routeLogin:
|
||||
return MaterialPageRoute(builder: (context) => const LoginPage());
|
||||
if (settings.arguments != null) {
|
||||
return MaterialPageRoute(
|
||||
builder: (context) => const LoginPage(
|
||||
doNotLoadLocalData: true,
|
||||
));
|
||||
} else {
|
||||
return MaterialPageRoute(builder: (context) => const LoginPage());
|
||||
}
|
||||
|
||||
case routeAddTask:
|
||||
if (settings.arguments != null) {
|
||||
return CupertinoPageRoute(
|
||||
@@ -95,7 +103,8 @@ class Routes {
|
||||
case routeTaskLogDetail:
|
||||
return CupertinoPageRoute(
|
||||
builder: (context) => TaskLogDetailPage(
|
||||
title: settings.arguments as String,
|
||||
title: (settings.arguments as Map)['title'],
|
||||
path: (settings.arguments as Map)['path'],
|
||||
),
|
||||
);
|
||||
case routeScriptDetail:
|
||||
|
||||
@@ -5,3 +5,4 @@ String spPassWord = "password";
|
||||
String spTheme = "dart_mode";
|
||||
String spSecretLogined = "secret_logined";
|
||||
String spCustomColor = "customColor";
|
||||
String spLoginHistory = "loginHistory";
|
||||
|
||||
@@ -9,13 +9,15 @@ import 'package:qinglong_app/utils/codeeditor_theme.dart';
|
||||
import 'package:qinglong_app/utils/sp_utils.dart';
|
||||
|
||||
var themeProvider = ChangeNotifierProvider((ref) => ThemeViewModel());
|
||||
Color _primaryColor = const Color(0xFF299343);
|
||||
|
||||
Color commonColor = const Color(0xFF299343);
|
||||
Color _primaryColor = commonColor;
|
||||
|
||||
class ThemeViewModel extends ChangeNotifier {
|
||||
late ThemeData currentTheme;
|
||||
|
||||
bool _isInDarkMode = false;
|
||||
Color primaryColor = const Color(0xFF299343);
|
||||
Color primaryColor = commonColor;
|
||||
|
||||
ThemeColors themeColor = LightThemeColors();
|
||||
|
||||
@@ -69,7 +71,10 @@ class ThemeViewModel extends ChangeNotifier {
|
||||
),
|
||||
scaffoldBackgroundColor: const Color(0xfff5f5f5),
|
||||
inputDecorationTheme: InputDecorationTheme(
|
||||
labelStyle: TextStyle(color: _primaryColor),
|
||||
labelStyle: TextStyle(
|
||||
color: _primaryColor,
|
||||
fontSize: 14,
|
||||
),
|
||||
focusedBorder: UnderlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: _primaryColor,
|
||||
@@ -150,7 +155,10 @@ class ThemeViewModel extends ChangeNotifier {
|
||||
),
|
||||
),
|
||||
inputDecorationTheme: InputDecorationTheme(
|
||||
labelStyle: TextStyle(color: _primaryColor),
|
||||
labelStyle: TextStyle(
|
||||
color: _primaryColor,
|
||||
fontSize: 14,
|
||||
),
|
||||
focusedBorder: UnderlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: _primaryColor,
|
||||
@@ -207,10 +215,14 @@ class ThemeViewModel extends ChangeNotifier {
|
||||
abstract class ThemeColors {
|
||||
Color settingBgColor();
|
||||
|
||||
Color settingBordorColor();
|
||||
|
||||
Color titleColor();
|
||||
|
||||
Color descColor();
|
||||
|
||||
Color tabBarColor();
|
||||
|
||||
Color pinColor();
|
||||
|
||||
Color buttonBgColor();
|
||||
@@ -248,6 +260,16 @@ class LightThemeColors extends ThemeColors {
|
||||
Color buttonBgColor() {
|
||||
return _primaryColor;
|
||||
}
|
||||
|
||||
@override
|
||||
Color settingBordorColor() {
|
||||
return Colors.white;
|
||||
}
|
||||
|
||||
@override
|
||||
Color tabBarColor() {
|
||||
return const Color(0xffF7F7F7);
|
||||
}
|
||||
}
|
||||
|
||||
class DartThemeColors extends ThemeColors {
|
||||
@@ -280,4 +302,14 @@ class DartThemeColors extends ThemeColors {
|
||||
Color buttonBgColor() {
|
||||
return const Color(0xff333333);
|
||||
}
|
||||
|
||||
@override
|
||||
Color settingBordorColor() {
|
||||
return Color(0xff333333);
|
||||
}
|
||||
|
||||
@override
|
||||
Color tabBarColor() {
|
||||
return Colors.black;
|
||||
}
|
||||
}
|
||||
|
||||
170
lib/base/ui/source_code_view.dart
Normal file
@@ -0,0 +1,170 @@
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:url_launcher/url_launcher.dart' as url_launcher;
|
||||
import 'syntax_highlighter.dart';
|
||||
|
||||
class SourceCodeView extends StatefulWidget {
|
||||
final String filePath;
|
||||
final String? codeLinkPrefix;
|
||||
final bool showLabelText;
|
||||
final Color? iconBackgroundColor;
|
||||
final Color? iconForegroundColor;
|
||||
final Color? labelBackgroundColor;
|
||||
final TextStyle? labelTextStyle;
|
||||
final SyntaxHighlighterStyle? syntaxHighlighterStyle;
|
||||
|
||||
const SourceCodeView({
|
||||
Key? key,
|
||||
required this.filePath,
|
||||
this.codeLinkPrefix,
|
||||
this.showLabelText = false,
|
||||
this.iconBackgroundColor,
|
||||
this.iconForegroundColor,
|
||||
this.labelBackgroundColor,
|
||||
this.labelTextStyle,
|
||||
this.syntaxHighlighterStyle,
|
||||
}) : super(key: key);
|
||||
|
||||
String? get codeLink => codeLinkPrefix == null
|
||||
? null
|
||||
: '$codeLinkPrefix/$filePath';
|
||||
|
||||
@override
|
||||
_SourceCodeViewState createState() {
|
||||
return _SourceCodeViewState();
|
||||
}
|
||||
}
|
||||
|
||||
class _SourceCodeViewState extends State<SourceCodeView> {
|
||||
double _textScaleFactor = 1.0;
|
||||
|
||||
Widget _getCodeView(String codeContent, BuildContext context) {
|
||||
codeContent = codeContent.replaceAll('\r\n', '\n');
|
||||
final SyntaxHighlighterStyle style = widget.syntaxHighlighterStyle ??
|
||||
(Theme.of(context).brightness == Brightness.dark
|
||||
? SyntaxHighlighterStyle.darkThemeStyle()
|
||||
: SyntaxHighlighterStyle.lightThemeStyle());
|
||||
return Container(
|
||||
constraints: BoxConstraints.expand(),
|
||||
child: Scrollbar(
|
||||
child: SingleChildScrollView(
|
||||
child: SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
child: SelectableText.rich(
|
||||
TextSpan(
|
||||
style: GoogleFonts.droidSansMono(fontSize: 12)
|
||||
.apply(fontSizeFactor: this._textScaleFactor),
|
||||
children: <TextSpan>[
|
||||
DartSyntaxHighlighter(style).format(codeContent)
|
||||
],
|
||||
),
|
||||
style: DefaultTextStyle.of(context)
|
||||
.style
|
||||
.apply(fontSizeFactor: this._textScaleFactor),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
List<SpeedDialChild> _buildFloatingButtons({
|
||||
TextStyle? labelTextStyle,
|
||||
Color? iconBackgroundColor,
|
||||
Color? iconForegroundColor,
|
||||
Color? labelBackgroundColor,
|
||||
required bool showLabelText,
|
||||
}) =>
|
||||
[
|
||||
if (this.widget.codeLink != null)
|
||||
SpeedDialChild(
|
||||
child: Icon(Icons.content_copy),
|
||||
labelWidget: showLabelText ? Text('Copy code to clipboard') : null,
|
||||
backgroundColor: iconBackgroundColor,
|
||||
foregroundColor: iconForegroundColor,
|
||||
labelBackgroundColor: labelBackgroundColor,
|
||||
labelStyle: labelTextStyle,
|
||||
onTap: () async {
|
||||
Clipboard.setData(ClipboardData(
|
||||
text: await DefaultAssetBundle.of(context)
|
||||
.loadString(widget.filePath)));
|
||||
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
|
||||
content: Text('Code copied to clipboard!'),
|
||||
));
|
||||
},
|
||||
),
|
||||
if (this.widget.codeLink != null)
|
||||
SpeedDialChild(
|
||||
child: Icon(Icons.open_in_new),
|
||||
labelWidget: showLabelText ? Text('View code in browser') : null,
|
||||
backgroundColor: iconBackgroundColor,
|
||||
foregroundColor: iconForegroundColor,
|
||||
labelBackgroundColor: labelBackgroundColor,
|
||||
labelStyle: labelTextStyle,
|
||||
onTap: () => url_launcher.launch(this.widget.codeLink!),
|
||||
),
|
||||
SpeedDialChild(
|
||||
child: Icon(Icons.zoom_out),
|
||||
label: showLabelText ? 'Zoom out' : null,
|
||||
// labelWidget: showLabelText ? Text('Zoom out') : null,
|
||||
backgroundColor: iconBackgroundColor,
|
||||
foregroundColor: iconForegroundColor,
|
||||
labelBackgroundColor: labelBackgroundColor,
|
||||
labelStyle: labelTextStyle,
|
||||
onTap: () => setState(() {
|
||||
this._textScaleFactor = max(0.8, this._textScaleFactor - 0.1);
|
||||
}),
|
||||
),
|
||||
SpeedDialChild(
|
||||
child: Icon(Icons.zoom_in),
|
||||
labelWidget: showLabelText ? Text('Zoom in') : null,
|
||||
backgroundColor: iconBackgroundColor,
|
||||
foregroundColor: iconForegroundColor,
|
||||
labelBackgroundColor: labelBackgroundColor,
|
||||
labelStyle: labelTextStyle,
|
||||
onTap: () => setState(() {
|
||||
this._textScaleFactor += 0.1;
|
||||
}),
|
||||
),
|
||||
];
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return FutureBuilder(
|
||||
future: DefaultAssetBundle.of(context).loadString(widget.filePath),
|
||||
builder: (BuildContext context, AsyncSnapshot<String> snapshot) {
|
||||
if (snapshot.hasData) {
|
||||
return Scaffold(
|
||||
body: Padding(
|
||||
padding: EdgeInsets.all(4.0),
|
||||
child: _getCodeView(snapshot.data!, context),
|
||||
),
|
||||
floatingActionButton: SpeedDial(
|
||||
renderOverlay: false,
|
||||
overlayOpacity: 0,
|
||||
children: _buildFloatingButtons(
|
||||
labelTextStyle: widget.labelTextStyle,
|
||||
iconBackgroundColor: widget.iconBackgroundColor,
|
||||
iconForegroundColor: widget.iconForegroundColor,
|
||||
labelBackgroundColor: widget.labelBackgroundColor,
|
||||
showLabelText: widget.showLabelText,
|
||||
),
|
||||
backgroundColor: Colors.blue,
|
||||
foregroundColor: Colors.white,
|
||||
activeBackgroundColor: Colors.red,
|
||||
activeForegroundColor: Colors.white,
|
||||
icon: Icons.menu,
|
||||
activeIcon: Icons.close,
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return Center(child: CircularProgressIndicator());
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
384
lib/base/ui/syntax_highlighter.dart
Normal file
@@ -0,0 +1,384 @@
|
||||
// Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:string_scanner/string_scanner.dart';
|
||||
|
||||
class SyntaxHighlighterStyle {
|
||||
SyntaxHighlighterStyle(
|
||||
{this.baseStyle,
|
||||
this.numberStyle,
|
||||
this.commentStyle,
|
||||
this.keywordStyle,
|
||||
this.stringStyle,
|
||||
this.punctuationStyle,
|
||||
this.classStyle,
|
||||
this.constantStyle});
|
||||
|
||||
static SyntaxHighlighterStyle lightThemeStyle() => SyntaxHighlighterStyle(
|
||||
baseStyle: const TextStyle(color: const Color(0xFF000000),height: 1,),
|
||||
numberStyle: const TextStyle(color: const Color(0xFF1565C0)),
|
||||
commentStyle: const TextStyle(color: const Color(0xFF9E9E9E)),
|
||||
keywordStyle: const TextStyle(color: const Color(0xFF9C27B0)),
|
||||
stringStyle: const TextStyle(color: const Color(0xFF43A047)),
|
||||
punctuationStyle: const TextStyle(color: const Color(0xFF000000)),
|
||||
classStyle: const TextStyle(color: const Color(0xFF512DA8)),
|
||||
constantStyle: const TextStyle(color: const Color(0xFF795548)),
|
||||
);
|
||||
|
||||
static SyntaxHighlighterStyle darkThemeStyle() => SyntaxHighlighterStyle(
|
||||
baseStyle: const TextStyle(color: const Color(0xFFFFFFFF)),
|
||||
numberStyle: const TextStyle(color: const Color(0xFF1565C0)),
|
||||
commentStyle: const TextStyle(color: const Color(0xFF9E9E9E)),
|
||||
keywordStyle: const TextStyle(color: const Color(0xFF80CBC4)),
|
||||
stringStyle: const TextStyle(color: const Color(0xFF009688)),
|
||||
punctuationStyle: const TextStyle(color: const Color(0xFFFFFFFF)),
|
||||
classStyle: const TextStyle(color: const Color(0xFF009688)),
|
||||
constantStyle: const TextStyle(color: const Color(0xFF795548)),
|
||||
);
|
||||
|
||||
SyntaxHighlighterStyle copyWith({
|
||||
TextStyle? baseStyle,
|
||||
TextStyle? numberStyle,
|
||||
TextStyle? commentStyle,
|
||||
TextStyle? keywordStyle,
|
||||
TextStyle? stringStyle,
|
||||
TextStyle? punctuationStyle,
|
||||
TextStyle? classStyle,
|
||||
TextStyle? constantStyle,
|
||||
}) =>
|
||||
SyntaxHighlighterStyle(
|
||||
baseStyle: baseStyle ?? this.baseStyle,
|
||||
numberStyle: numberStyle ?? this.numberStyle,
|
||||
commentStyle: commentStyle ?? this.commentStyle,
|
||||
keywordStyle: keywordStyle ?? this.keywordStyle,
|
||||
stringStyle: stringStyle ?? this.stringStyle,
|
||||
punctuationStyle: punctuationStyle ?? this.punctuationStyle,
|
||||
classStyle: classStyle ?? this.classStyle,
|
||||
constantStyle: constantStyle ?? this.constantStyle,
|
||||
);
|
||||
|
||||
final TextStyle? baseStyle;
|
||||
final TextStyle? numberStyle;
|
||||
final TextStyle? commentStyle;
|
||||
final TextStyle? keywordStyle;
|
||||
final TextStyle? stringStyle;
|
||||
final TextStyle? punctuationStyle;
|
||||
final TextStyle? classStyle;
|
||||
final TextStyle? constantStyle;
|
||||
}
|
||||
|
||||
abstract class SyntaxHighlighter {
|
||||
// ignore: one_member_abstracts
|
||||
TextSpan format(String src);
|
||||
}
|
||||
|
||||
class DartSyntaxHighlighter extends SyntaxHighlighter {
|
||||
DartSyntaxHighlighter([this._style]) {
|
||||
_spans = <_HighlightSpan>[];
|
||||
_style ??= SyntaxHighlighterStyle.darkThemeStyle();
|
||||
}
|
||||
|
||||
SyntaxHighlighterStyle? _style;
|
||||
|
||||
static const List<String> _keywords = const <String>[
|
||||
'abstract',
|
||||
'as',
|
||||
'assert',
|
||||
'async',
|
||||
'await',
|
||||
'break',
|
||||
'case',
|
||||
'catch',
|
||||
'class',
|
||||
'const',
|
||||
'continue',
|
||||
'default',
|
||||
'deferred',
|
||||
'do',
|
||||
'dynamic',
|
||||
'else',
|
||||
'enum',
|
||||
'export',
|
||||
'external',
|
||||
'extends',
|
||||
'factory',
|
||||
'false',
|
||||
'final',
|
||||
'finally',
|
||||
'for',
|
||||
'get',
|
||||
'if',
|
||||
'implements',
|
||||
'import',
|
||||
'in',
|
||||
'is',
|
||||
'library',
|
||||
'new',
|
||||
'null',
|
||||
'operator',
|
||||
'part',
|
||||
'rethrow',
|
||||
'return',
|
||||
'set',
|
||||
'static',
|
||||
'super',
|
||||
'switch',
|
||||
'sync',
|
||||
'this',
|
||||
'throw',
|
||||
'true',
|
||||
'try',
|
||||
'typedef',
|
||||
'var',
|
||||
'void',
|
||||
'while',
|
||||
'with',
|
||||
'yield'
|
||||
];
|
||||
|
||||
static const List<String> _builtInTypes = const <String>[
|
||||
'int',
|
||||
'double',
|
||||
'num',
|
||||
'bool'
|
||||
];
|
||||
|
||||
late String _src;
|
||||
late StringScanner _scanner;
|
||||
|
||||
late List<_HighlightSpan> _spans;
|
||||
|
||||
@override
|
||||
TextSpan format(String src) {
|
||||
_src = src;
|
||||
_scanner = StringScanner(_src);
|
||||
|
||||
if (_generateSpans()) {
|
||||
// Successfully parsed the code
|
||||
final List<TextSpan> formattedText = <TextSpan>[];
|
||||
int currentPosition = 0;
|
||||
|
||||
for (_HighlightSpan span in _spans) {
|
||||
if (currentPosition != span.start)
|
||||
formattedText
|
||||
.add(TextSpan(text: _src.substring(currentPosition, span.start)));
|
||||
|
||||
formattedText.add(TextSpan(
|
||||
style: span.textStyle(_style), text: span.textForSpan(_src)));
|
||||
|
||||
currentPosition = span.end;
|
||||
}
|
||||
|
||||
if (currentPosition != _src.length)
|
||||
formattedText
|
||||
.add(TextSpan(text: _src.substring(currentPosition, _src.length)));
|
||||
|
||||
return TextSpan(style: _style!.baseStyle, children: formattedText);
|
||||
} else {
|
||||
// Parsing failed, return with only basic formatting
|
||||
return TextSpan(style: _style!.baseStyle, text: src);
|
||||
}
|
||||
}
|
||||
|
||||
bool _generateSpans() {
|
||||
int lastLoopPosition = _scanner.position;
|
||||
|
||||
while (!_scanner.isDone) {
|
||||
// Skip White space
|
||||
_scanner.scan(RegExp(r'\s+'));
|
||||
|
||||
// Block comments
|
||||
if (_scanner.scan(RegExp(r'/\*(.|\n)*\*/'))) {
|
||||
_spans.add(_HighlightSpan(_HighlightType.comment,
|
||||
_scanner.lastMatch!.start, _scanner.lastMatch!.end));
|
||||
continue;
|
||||
}
|
||||
|
||||
// Line comments
|
||||
if (_scanner.scan('##')) {
|
||||
final int startComment = _scanner.lastMatch!.start;
|
||||
|
||||
bool eof = false;
|
||||
int endComment;
|
||||
if (_scanner.scan(RegExp(r'.*\n'))) {
|
||||
endComment = _scanner.lastMatch!.end - 1;
|
||||
} else {
|
||||
eof = true;
|
||||
endComment = _src.length;
|
||||
}
|
||||
|
||||
_spans.add(
|
||||
_HighlightSpan(_HighlightType.comment, startComment, endComment));
|
||||
|
||||
if (eof) break;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
// Raw r"String"
|
||||
if (_scanner.scan(RegExp(r'r".*"'))) {
|
||||
_spans.add(_HighlightSpan(_HighlightType.string,
|
||||
_scanner.lastMatch!.start, _scanner.lastMatch!.end));
|
||||
continue;
|
||||
}
|
||||
|
||||
// Raw r'String'
|
||||
if (_scanner.scan(RegExp(r"r'.*'"))) {
|
||||
_spans.add(_HighlightSpan(_HighlightType.string,
|
||||
_scanner.lastMatch!.start, _scanner.lastMatch!.end));
|
||||
continue;
|
||||
}
|
||||
|
||||
// Multiline """String"""
|
||||
if (_scanner.scan(RegExp(r'"""(?:[^"\\]|\\(.|\n))*"""'))) {
|
||||
_spans.add(_HighlightSpan(_HighlightType.string,
|
||||
_scanner.lastMatch!.start, _scanner.lastMatch!.end));
|
||||
continue;
|
||||
}
|
||||
|
||||
// Multiline '''String'''
|
||||
if (_scanner.scan(RegExp(r"'''(?:[^'\\]|\\(.|\n))*'''"))) {
|
||||
_spans.add(_HighlightSpan(_HighlightType.string,
|
||||
_scanner.lastMatch!.start, _scanner.lastMatch!.end));
|
||||
continue;
|
||||
}
|
||||
|
||||
// "String"
|
||||
if (_scanner.scan(RegExp(r'"(?:[^"\\]|\\.)*"'))) {
|
||||
_spans.add(_HighlightSpan(_HighlightType.string,
|
||||
_scanner.lastMatch!.start, _scanner.lastMatch!.end));
|
||||
continue;
|
||||
}
|
||||
|
||||
// 'String'
|
||||
if (_scanner.scan(RegExp(r"'(?:[^'\\]|\\.)*'"))) {
|
||||
_spans.add(_HighlightSpan(_HighlightType.string,
|
||||
_scanner.lastMatch!.start, _scanner.lastMatch!.end));
|
||||
continue;
|
||||
}
|
||||
|
||||
// Double
|
||||
if (_scanner.scan(RegExp(r'\d+\.\d+'))) {
|
||||
_spans.add(_HighlightSpan(_HighlightType.number,
|
||||
_scanner.lastMatch!.start, _scanner.lastMatch!.end));
|
||||
continue;
|
||||
}
|
||||
|
||||
// Integer
|
||||
if (_scanner.scan(RegExp(r'\d+'))) {
|
||||
_spans.add(_HighlightSpan(_HighlightType.number,
|
||||
_scanner.lastMatch!.start, _scanner.lastMatch!.end));
|
||||
continue;
|
||||
}
|
||||
|
||||
// Punctuation
|
||||
if (_scanner.scan(RegExp(r'[\[\]{}().!=<>&\|\?\+\-\*/%\^~;:,]'))) {
|
||||
_spans.add(_HighlightSpan(_HighlightType.punctuation,
|
||||
_scanner.lastMatch!.start, _scanner.lastMatch!.end));
|
||||
continue;
|
||||
}
|
||||
|
||||
// Meta data
|
||||
if (_scanner.scan(RegExp(r'@\w+'))) {
|
||||
_spans.add(_HighlightSpan(_HighlightType.keyword,
|
||||
_scanner.lastMatch!.start, _scanner.lastMatch!.end));
|
||||
continue;
|
||||
}
|
||||
|
||||
// Words
|
||||
if (_scanner.scan(RegExp(r'\w+'))) {
|
||||
_HighlightType? type;
|
||||
|
||||
String word = _scanner.lastMatch![0]!;
|
||||
if (word.startsWith('_')) word = word.substring(1);
|
||||
|
||||
if (_keywords.contains(word))
|
||||
type = _HighlightType.keyword;
|
||||
else if (_builtInTypes.contains(word))
|
||||
type = _HighlightType.keyword;
|
||||
else if (_firstLetterIsUpperCase(word))
|
||||
type = _HighlightType.klass;
|
||||
else if (word.length >= 2 &&
|
||||
word.startsWith('k') &&
|
||||
_firstLetterIsUpperCase(word.substring(1)))
|
||||
type = _HighlightType.constant;
|
||||
|
||||
if (type != null) {
|
||||
_spans.add(_HighlightSpan(
|
||||
type, _scanner.lastMatch!.start, _scanner.lastMatch!.end));
|
||||
}
|
||||
}
|
||||
|
||||
// Check if this loop did anything
|
||||
if (lastLoopPosition == _scanner.position) {
|
||||
// Failed to parse this file, abort gracefully
|
||||
return false;
|
||||
}
|
||||
lastLoopPosition = _scanner.position;
|
||||
}
|
||||
|
||||
_simplify();
|
||||
return true;
|
||||
}
|
||||
|
||||
void _simplify() {
|
||||
for (int i = _spans.length - 2; i >= 0; i -= 1) {
|
||||
if (_spans[i].type == _spans[i + 1].type &&
|
||||
_spans[i].end == _spans[i + 1].start) {
|
||||
_spans[i] =
|
||||
_HighlightSpan(_spans[i].type, _spans[i].start, _spans[i + 1].end);
|
||||
_spans.removeAt(i + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool _firstLetterIsUpperCase(String str) {
|
||||
if (str.isNotEmpty) {
|
||||
final String first = str.substring(0, 1);
|
||||
return first == first.toUpperCase();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
enum _HighlightType {
|
||||
number,
|
||||
comment,
|
||||
keyword,
|
||||
string,
|
||||
punctuation,
|
||||
klass,
|
||||
constant
|
||||
}
|
||||
|
||||
class _HighlightSpan {
|
||||
_HighlightSpan(this.type, this.start, this.end);
|
||||
final _HighlightType type;
|
||||
final int start;
|
||||
final int end;
|
||||
|
||||
String textForSpan(String src) {
|
||||
return src.substring(start, end);
|
||||
}
|
||||
|
||||
TextStyle? textStyle(SyntaxHighlighterStyle? style) {
|
||||
if (type == _HighlightType.number)
|
||||
return style!.numberStyle;
|
||||
else if (type == _HighlightType.comment)
|
||||
return style!.commentStyle;
|
||||
else if (type == _HighlightType.keyword)
|
||||
return style!.keywordStyle;
|
||||
else if (type == _HighlightType.string)
|
||||
return style!.stringStyle;
|
||||
else if (type == _HighlightType.punctuation)
|
||||
return style!.punctuationStyle;
|
||||
else if (type == _HighlightType.klass)
|
||||
return style!.classStyle;
|
||||
else if (type == _HighlightType.constant)
|
||||
return style!.constantStyle;
|
||||
else
|
||||
return style!.baseStyle;
|
||||
}
|
||||
}
|
||||
@@ -1,26 +1,37 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:qinglong_app/utils/extension.dart';
|
||||
import 'package:qinglong_app/utils/sp_utils.dart';
|
||||
|
||||
import '../main.dart';
|
||||
import 'sp_const.dart';
|
||||
import 'theme.dart';
|
||||
|
||||
class UserInfoViewModel {
|
||||
int _primaryColor = commonColor.value;
|
||||
String? _token;
|
||||
String? _host = "";
|
||||
String? _userName;
|
||||
String? _passWord;
|
||||
bool _useSecertLogined = false;
|
||||
int _primaryColor = 0xFF299343;
|
||||
|
||||
List<UserInfoBean> historyAccounts = [];
|
||||
|
||||
UserInfoViewModel() {
|
||||
String userInfoJson = SpUtil.getString(spUserInfo);
|
||||
_token = SpUtil.getString(spUserInfo);
|
||||
_userName = SpUtil.getString(spUserName);
|
||||
_passWord = SpUtil.getString(spPassWord);
|
||||
_primaryColor = SpUtil.getInt(spCustomColor, defValue: 0xFF299343);
|
||||
_primaryColor = SpUtil.getInt(spCustomColor, defValue: commonColor.value);
|
||||
|
||||
_useSecertLogined = SpUtil.getBool(spSecretLogined, defValue: false);
|
||||
_host = SpUtil.getString(spHost, defValue: '');
|
||||
|
||||
if (userInfoJson.isNotEmpty) {
|
||||
_token = userInfoJson;
|
||||
List<dynamic>? tempList = jsonDecode(SpUtil.getString(spLoginHistory, defValue: '[]'));
|
||||
|
||||
if (tempList != null && tempList.isNotEmpty) {
|
||||
for (Map<String, dynamic> value in tempList) {
|
||||
historyAccounts.add(UserInfoBean.fromJson(value));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,14 +40,18 @@ class UserInfoViewModel {
|
||||
SpUtil.putString(spUserInfo, token);
|
||||
}
|
||||
|
||||
void updateUserName(String userName, String password) {
|
||||
void updateUserName(String host, String userName, String password, bool secretLogin) {
|
||||
updateHost(host);
|
||||
_useSecretLogin(secretLogin);
|
||||
_userName = userName;
|
||||
_passWord = password;
|
||||
SpUtil.putString(spUserName, userName);
|
||||
SpUtil.putString(spPassWord, password);
|
||||
|
||||
save2HistoryAccount();
|
||||
}
|
||||
|
||||
void useSecretLogin(bool use) {
|
||||
void _useSecretLogin(bool use) {
|
||||
_useSecertLogined = use;
|
||||
SpUtil.putBool(spSecretLogined, _useSecertLogined);
|
||||
}
|
||||
@@ -66,4 +81,57 @@ class UserInfoViewModel {
|
||||
bool isLogined() {
|
||||
return token != null && token!.isNotEmpty;
|
||||
}
|
||||
|
||||
void save2HistoryAccount() {
|
||||
if (_host == null || _host!.isEmpty) return;
|
||||
if (_userName == null || _userName!.isEmpty) return;
|
||||
if (_passWord == null || _passWord!.isEmpty) return;
|
||||
|
||||
//如果已经存在host,那就更新
|
||||
|
||||
"login success $_host $userName $passWord".log();
|
||||
|
||||
historyAccounts.removeWhere((element) => element.host == _host);
|
||||
|
||||
historyAccounts.insert(0, UserInfoBean(userName: _userName, password: _passWord, useSecretLogined: _useSecertLogined, host: _host));
|
||||
|
||||
while (historyAccounts.length > 3) {
|
||||
historyAccounts.removeLast();
|
||||
}
|
||||
|
||||
SpUtil.putString(spLoginHistory, jsonEncode(historyAccounts));
|
||||
}
|
||||
|
||||
void removeHistoryAccount(String? host) {
|
||||
if (host == null || host.isEmpty) return;
|
||||
|
||||
historyAccounts.removeWhere((element) => element.host == host);
|
||||
|
||||
SpUtil.putString(spLoginHistory, jsonEncode(historyAccounts));
|
||||
}
|
||||
}
|
||||
|
||||
class UserInfoBean {
|
||||
String? userName;
|
||||
String? password;
|
||||
bool useSecretLogined = false;
|
||||
String? host;
|
||||
|
||||
UserInfoBean({this.userName, this.password, this.useSecretLogined = false, this.host});
|
||||
|
||||
UserInfoBean.fromJson(Map<String, dynamic> json) {
|
||||
userName = json['userName'];
|
||||
password = json['password'];
|
||||
useSecretLogined = json['useSecretLogined'] ?? false;
|
||||
host = json['host'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['userName'] = this.userName;
|
||||
data['password'] = this.password;
|
||||
data['useSecretLogined'] = this.useSecretLogined;
|
||||
data['host'] = this.host;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
import 'package:qinglong_app/module/config/config_bean.dart';
|
||||
import 'package:qinglong_app/module/env/env_bean.dart';
|
||||
import 'package:qinglong_app/module/home/system_bean.dart';
|
||||
import 'package:qinglong_app/module/login/login_bean.dart';
|
||||
import 'package:qinglong_app/module/login/user_bean.dart';
|
||||
import 'package:qinglong_app/module/others/dependencies/dependency_bean.dart';
|
||||
@@ -33,6 +34,10 @@ class JsonConversion$Json {
|
||||
return EnvBean.jsonConversion(json) as M;
|
||||
}
|
||||
|
||||
if(type == (SystemBean).toString()){
|
||||
return SystemBean.jsonConversion(json) as M;
|
||||
}
|
||||
|
||||
if(type == (LoginBean).toString()){
|
||||
return LoginBean.jsonConversion(json) as M;
|
||||
}
|
||||
@@ -60,7 +65,7 @@ class JsonConversion$Json {
|
||||
if(type == (TaskBean).toString()){
|
||||
return TaskBean.jsonConversion(json) as M;
|
||||
}
|
||||
|
||||
|
||||
throw Exception("not found");
|
||||
}
|
||||
|
||||
@@ -73,6 +78,10 @@ class JsonConversion$Json {
|
||||
return data.map<EnvBean>((e) => EnvBean.jsonConversion(e)).toList() as M;
|
||||
}
|
||||
|
||||
if(<SystemBean>[] is M){
|
||||
return data.map<SystemBean>((e) => SystemBean.jsonConversion(e)).toList() as M;
|
||||
}
|
||||
|
||||
if(<LoginBean>[] is M){
|
||||
return data.map<LoginBean>((e) => LoginBean.jsonConversion(e)).toList() as M;
|
||||
}
|
||||
@@ -100,7 +109,7 @@ class JsonConversion$Json {
|
||||
if(<TaskBean>[] is M){
|
||||
return data.map<TaskBean>((e) => TaskBean.jsonConversion(e)).toList() as M;
|
||||
}
|
||||
|
||||
|
||||
throw Exception("not found");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import 'package:logger/logger.dart';
|
||||
import 'package:qinglong_app/base/theme.dart';
|
||||
import 'package:qinglong_app/module/login/login_page.dart';
|
||||
import 'package:qinglong_app/utils/sp_utils.dart';
|
||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
|
||||
import 'base/routes.dart';
|
||||
import 'base/userinfo_viewmodel.dart';
|
||||
@@ -25,6 +26,12 @@ void main() async {
|
||||
await SpUtil.getInstance();
|
||||
getIt.registerSingleton<UserInfoViewModel>(UserInfoViewModel());
|
||||
|
||||
await SystemChrome.setPreferredOrientations(
|
||||
[
|
||||
DeviceOrientation.portraitUp,
|
||||
DeviceOrientation.portraitDown,
|
||||
],
|
||||
);
|
||||
runApp(
|
||||
ProviderScope(
|
||||
overrides: [
|
||||
@@ -55,17 +62,31 @@ class QlAppState extends ConsumerState<QlApp> {
|
||||
FocusScope.of(context).requestFocus(FocusNode());
|
||||
},
|
||||
child: MediaQuery(
|
||||
data: MediaQueryData.fromWindow(WidgetsBinding.instance!.window).copyWith(textScaleFactor: 1,),
|
||||
data: MediaQueryData.fromWindow(WidgetsBinding.instance!.window).copyWith(
|
||||
textScaleFactor: 1,
|
||||
),
|
||||
child: MaterialApp(
|
||||
title: "青龙",
|
||||
locale: const Locale('zh', 'CN'),
|
||||
navigatorKey: navigatorState,
|
||||
localizationsDelegates: const [
|
||||
GlobalMaterialLocalizations.delegate,
|
||||
GlobalWidgetsLocalizations.delegate,
|
||||
GlobalCupertinoLocalizations.delegate,
|
||||
],
|
||||
supportedLocales: const [
|
||||
Locale('zh', 'CN'),
|
||||
Locale('en', 'US'),
|
||||
],
|
||||
theme: ref.watch<ThemeViewModel>(themeProvider).currentTheme,
|
||||
onGenerateRoute: (setting) {
|
||||
return Routes.generateRoute(setting);
|
||||
},
|
||||
home: Builder(
|
||||
builder: (context) {
|
||||
if (!kReleaseMode) {
|
||||
showDebugBtn(context);
|
||||
}
|
||||
return getIt<UserInfoViewModel>().isLogined() ? const HomePage() : const LoginPage();
|
||||
},
|
||||
),
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import 'package:code_text_field/code_text_field.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:highlight/languages/powershell.dart';
|
||||
import 'package:qinglong_app/base/http/api.dart';
|
||||
import 'package:qinglong_app/base/http/http.dart';
|
||||
import 'package:qinglong_app/base/ql_app_bar.dart';
|
||||
import 'package:qinglong_app/base/theme.dart';
|
||||
import 'package:qinglong_app/module/config/config_viewmodel.dart';
|
||||
import 'package:qinglong_app/utils/extension.dart';
|
||||
|
||||
class ConfigEditPage extends ConsumerStatefulWidget {
|
||||
@@ -18,22 +19,38 @@ class ConfigEditPage extends ConsumerStatefulWidget {
|
||||
}
|
||||
|
||||
class _ConfigEditPageState extends ConsumerState<ConfigEditPage> {
|
||||
late TextEditingController _controller;
|
||||
FocusNode node = FocusNode();
|
||||
CodeController? _codeController;
|
||||
late String result;
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_codeController?.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
@override
|
||||
void initState() {
|
||||
_controller = TextEditingController(text: widget.content);
|
||||
result = widget.content;
|
||||
|
||||
super.initState();
|
||||
WidgetsBinding.instance?.addPostFrameCallback(
|
||||
(timeStamp) {
|
||||
node.requestFocus();
|
||||
},
|
||||
);
|
||||
|
||||
WidgetsBinding.instance?.addPostFrameCallback((timeStamp) {
|
||||
focusNode.requestFocus();
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
_codeController ??= CodeController(
|
||||
text: widget.content,
|
||||
language: powershell,
|
||||
onChange: (value) {
|
||||
result = value;
|
||||
},
|
||||
theme: ref.watch(themeProvider).themeColor.codeEditorTheme(),
|
||||
stringMap: {
|
||||
"export": const TextStyle(fontWeight: FontWeight.normal, color: Color(0xff6B2375)),
|
||||
},
|
||||
);
|
||||
return Scaffold(
|
||||
appBar: QlAppBar(
|
||||
canBack: true,
|
||||
@@ -44,11 +61,9 @@ class _ConfigEditPageState extends ConsumerState<ConfigEditPage> {
|
||||
actions: [
|
||||
InkWell(
|
||||
onTap: () async {
|
||||
HttpResponse<NullResponse> response =
|
||||
await Api.saveFile(widget.title, _controller.text);
|
||||
HttpResponse<NullResponse> response = await Api.saveFile(widget.title, result);
|
||||
if (response.success) {
|
||||
"提交成功".toast();
|
||||
ref.read(configProvider).loadContent(widget.title);
|
||||
Navigator.of(context).pop(widget.title);
|
||||
} else {
|
||||
(response.message ?? "").toast();
|
||||
@@ -71,24 +86,16 @@ class _ConfigEditPageState extends ConsumerState<ConfigEditPage> {
|
||||
)
|
||||
],
|
||||
),
|
||||
body: Container(
|
||||
padding: const EdgeInsets.only(
|
||||
left: 15,
|
||||
right: 15,
|
||||
),
|
||||
child: SingleChildScrollView(
|
||||
child: TextField(
|
||||
focusNode: node,
|
||||
style: TextStyle(
|
||||
color: ref.read(themeProvider).themeColor.titleColor(),
|
||||
fontSize: 14,
|
||||
),
|
||||
controller: _controller,
|
||||
minLines: 1,
|
||||
maxLines: 100,
|
||||
),
|
||||
body: SafeArea(
|
||||
top: false,
|
||||
child: CodeField(
|
||||
controller: _codeController!,
|
||||
expands: true,
|
||||
background: ref.watch(themeProvider).themeColor.settingBgColor(),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
FocusNode focusNode = FocusNode();
|
||||
}
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_highlight/flutter_highlight.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:qinglong_app/base/base_state_widget.dart';
|
||||
import 'package:qinglong_app/base/routes.dart';
|
||||
import 'package:qinglong_app/base/theme.dart';
|
||||
import 'package:qinglong_app/base/ui/abs_underline_tabindicator.dart';
|
||||
import 'package:qinglong_app/base/ui/empty_widget.dart';
|
||||
import 'package:qinglong_app/main.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
|
||||
import '../../base/ui/syntax_highlighter.dart';
|
||||
import 'config_viewmodel.dart';
|
||||
|
||||
class ConfigPage extends StatefulWidget {
|
||||
@@ -18,8 +20,9 @@ class ConfigPage extends StatefulWidget {
|
||||
}
|
||||
|
||||
class ConfigPageState extends State<ConfigPage>
|
||||
with SingleTickerProviderStateMixin {
|
||||
TabController? _tabController;
|
||||
with SingleTickerProviderStateMixin, AutomaticKeepAliveClientMixin {
|
||||
int _initIndex = 0;
|
||||
BuildContext? childContext;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@@ -33,51 +36,43 @@ class ConfigPageState extends State<ConfigPage>
|
||||
if (model.list.isEmpty) {
|
||||
return const EmptyWidget();
|
||||
}
|
||||
_tabController ??=
|
||||
TabController(length: model.list.length, vsync: this);
|
||||
|
||||
return Column(
|
||||
children: [
|
||||
TabBar(
|
||||
controller: _tabController,
|
||||
tabs: model.list
|
||||
.map((e) => Tab(
|
||||
text: e.title,
|
||||
))
|
||||
.toList(),
|
||||
isScrollable: true,
|
||||
indicator: AbsUnderlineTabIndicator(
|
||||
wantWidth: 20,
|
||||
borderSide: BorderSide(
|
||||
color: Theme.of(context).primaryColor,
|
||||
width: 2,
|
||||
return DefaultTabController(
|
||||
length: model.list.length,
|
||||
initialIndex: _initIndex,
|
||||
child: Builder(builder: (context) {
|
||||
childContext = context;
|
||||
return Column(
|
||||
children: [
|
||||
TabBar(
|
||||
tabs: model.list
|
||||
.map((e) => Tab(
|
||||
text: e.title,
|
||||
))
|
||||
.toList(),
|
||||
isScrollable: true,
|
||||
indicator: AbsUnderlineTabIndicator(
|
||||
wantWidth: 20,
|
||||
borderSide: BorderSide(
|
||||
color: Theme.of(context).primaryColor,
|
||||
width: 2,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: TabBarView(
|
||||
controller: _tabController,
|
||||
children: model.list
|
||||
.map(
|
||||
(e) => SingleChildScrollView(
|
||||
child: HighlightView(
|
||||
model.content[e.title] ?? "",
|
||||
language: "sh",
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 15,
|
||||
Expanded(
|
||||
child: TabBarView(
|
||||
children: model.list
|
||||
.map(
|
||||
(e) => CodeWidget(
|
||||
content: model.content[e.title] ?? "",
|
||||
),
|
||||
theme: ref
|
||||
.watch(themeProvider)
|
||||
.themeColor
|
||||
.codeEditorTheme(),
|
||||
tabSize: 14,
|
||||
),
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
.toList(),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}),
|
||||
);
|
||||
},
|
||||
model: configProvider,
|
||||
@@ -88,11 +83,16 @@ class ConfigPageState extends State<ConfigPage>
|
||||
}
|
||||
|
||||
void editMe(WidgetRef ref) {
|
||||
if (_tabController == null || _tabController!.length == 0) return;
|
||||
if (childContext == null) return;
|
||||
navigatorState.currentState?.pushNamed(Routes.routeConfigEdit, arguments: {
|
||||
"title": ref.read(configProvider).list[_tabController?.index ?? 0].title,
|
||||
"content": ref.read(configProvider).content[
|
||||
ref.read(configProvider).list[_tabController?.index ?? 0].title]
|
||||
"title": ref
|
||||
.read(configProvider)
|
||||
.list[DefaultTabController.of(childContext!)?.index ?? 0]
|
||||
.title,
|
||||
"content": ref.read(configProvider).content[ref
|
||||
.read(configProvider)
|
||||
.list[DefaultTabController.of(childContext!)?.index ?? 0]
|
||||
.title]
|
||||
}).then((value) async {
|
||||
if (value != null && (value as String).isNotEmpty) {
|
||||
await ref.read(configProvider).loadContent(value);
|
||||
@@ -100,4 +100,46 @@ class ConfigPageState extends State<ConfigPage>
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
bool get wantKeepAlive => true;
|
||||
}
|
||||
|
||||
class CodeWidget extends StatefulWidget {
|
||||
final String content;
|
||||
|
||||
const CodeWidget({
|
||||
Key? key,
|
||||
required this.content,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<CodeWidget> createState() => _CodeWidgetState();
|
||||
}
|
||||
|
||||
class _CodeWidgetState extends State<CodeWidget>
|
||||
with AutomaticKeepAliveClientMixin {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SelectableText.rich(
|
||||
TextSpan(
|
||||
style: GoogleFonts.droidSansMono(fontSize: 14).apply(
|
||||
fontSizeFactor: 1,
|
||||
),
|
||||
children: <TextSpan>[
|
||||
DartSyntaxHighlighter(SyntaxHighlighterStyle.lightThemeStyle())
|
||||
.format(widget.content)
|
||||
],
|
||||
),
|
||||
style: DefaultTextStyle.of(context).style.apply(
|
||||
fontSizeFactor: 1,
|
||||
),
|
||||
selectionWidthStyle: BoxWidthStyle.max,
|
||||
selectionHeightStyle: BoxHeightStyle.max,
|
||||
autofocus: true,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
bool get wantKeepAlive => true;
|
||||
}
|
||||
|
||||
2
lib/module/env/add_env_page.dart
vendored
@@ -187,7 +187,7 @@ class _AddEnvPageState extends ConsumerState<AddEnvPage> {
|
||||
envBean.remarks = _remarkController.text;
|
||||
HttpResponse<NullResponse> response = await Api.addEnv(
|
||||
_nameController.text, _valueController.text, _remarkController.text,
|
||||
id: envBean.sId);
|
||||
id: envBean.id,nId: envBean.nId,);
|
||||
|
||||
if (response.success) {
|
||||
(envBean.sId == null) ? "新增成功" : "修改成功".toast();
|
||||
|
||||
6
lib/module/env/env_bean.dart
vendored
@@ -4,6 +4,8 @@ import 'package:json_conversion_annotation/json_conversion_annotation.dart';
|
||||
class EnvBean {
|
||||
String? value;
|
||||
String? sId;
|
||||
String? _id;
|
||||
int? id;
|
||||
int? created;
|
||||
int? status;
|
||||
String? timestamp;
|
||||
@@ -12,8 +14,12 @@ class EnvBean {
|
||||
|
||||
EnvBean({this.value, this.sId, this.created, this.status, this.timestamp, this.name, this.remarks});
|
||||
|
||||
get nId => _id;
|
||||
|
||||
EnvBean.fromJson(Map<String, dynamic> json) {
|
||||
value = json['value'];
|
||||
id = json['id'];
|
||||
_id = json['_id'];
|
||||
sId = json.containsKey('_id') ? json['_id'].toString() : (json.containsKey('id') ? json['id'].toString() : "");
|
||||
created = int.tryParse(json['created'].toString());
|
||||
status = json['status'];
|
||||
|
||||
4
lib/module/env/env_detail_page.dart
vendored
@@ -1,3 +1,5 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
@@ -312,6 +314,8 @@ class EnvDetailCell extends ConsumerWidget {
|
||||
child: SelectableText(
|
||||
desc!,
|
||||
textAlign: TextAlign.right,
|
||||
selectionHeightStyle: BoxHeightStyle.max,
|
||||
selectionWidthStyle: BoxWidthStyle.max,
|
||||
onTap: () {
|
||||
if (taped != null) {
|
||||
taped!();
|
||||
|
||||
347
lib/module/env/env_page.dart
vendored
@@ -23,6 +23,14 @@ class EnvPage extends StatefulWidget {
|
||||
class _EnvPageState extends State<EnvPage> {
|
||||
final TextEditingController _searchController = TextEditingController();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_searchController.addListener(() {
|
||||
setState(() {});
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BaseStateWidget<EnvViewModel>(
|
||||
@@ -37,7 +45,7 @@ class _EnvPageState extends State<EnvPage> {
|
||||
(value.remarks?.contains(_searchController.text) ?? false)) {
|
||||
list.add(EnvItemCell(
|
||||
value,
|
||||
i + 1,
|
||||
i,
|
||||
ref,
|
||||
key: ValueKey(value.sId),
|
||||
));
|
||||
@@ -51,26 +59,28 @@ class _EnvPageState extends State<EnvPage> {
|
||||
onRefresh: () async {
|
||||
return model.loadData(false);
|
||||
},
|
||||
child: ReorderableListView(
|
||||
keyboardDismissBehavior: ScrollViewKeyboardDismissBehavior.onDrag,
|
||||
header: searchCell(ref),
|
||||
onReorder: (int oldIndex, int newIndex) {
|
||||
if (list.length != model.list.length) {
|
||||
"请先清空搜索关键词".toast();
|
||||
return;
|
||||
}
|
||||
|
||||
setState(() {
|
||||
//交换数据
|
||||
if (newIndex > oldIndex) {
|
||||
newIndex -= 1;
|
||||
child: SlidableAutoCloseBehavior(
|
||||
child: ReorderableListView(
|
||||
keyboardDismissBehavior: ScrollViewKeyboardDismissBehavior.onDrag,
|
||||
header: searchCell(ref),
|
||||
onReorder: (int oldIndex, int newIndex) {
|
||||
if (list.length != model.list.length) {
|
||||
"请先清空搜索关键词".toast();
|
||||
return;
|
||||
}
|
||||
final EnvBean item = model.list.removeAt(oldIndex);
|
||||
model.list.insert(newIndex, item);
|
||||
model.update(item.sId ?? "", newIndex, oldIndex);
|
||||
});
|
||||
},
|
||||
children: list,
|
||||
|
||||
setState(() {
|
||||
//交换数据
|
||||
if (newIndex > oldIndex) {
|
||||
newIndex -= 1;
|
||||
}
|
||||
final EnvBean item = model.list.removeAt(oldIndex);
|
||||
model.list.insert(newIndex, item);
|
||||
model.update(item.sId ?? "", newIndex, oldIndex);
|
||||
});
|
||||
},
|
||||
children: list,
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
@@ -133,185 +143,181 @@ class EnvItemCell extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.of(context).pushNamed(Routes.routeEnvDetail, arguments: bean);
|
||||
},
|
||||
child: ColoredBox(
|
||||
color: ref.watch(themeProvider).themeColor.settingBgColor(),
|
||||
child: Slidable(
|
||||
key: ValueKey(bean.sId),
|
||||
endActionPane: ActionPane(
|
||||
motion: const ScrollMotion(),
|
||||
extentRatio: 0.45,
|
||||
return ColoredBox(
|
||||
color: ref.watch(themeProvider).themeColor.settingBgColor(),
|
||||
child: Slidable(
|
||||
key: ValueKey(bean.sId),
|
||||
endActionPane: ActionPane(
|
||||
motion: const StretchMotion(),
|
||||
extentRatio: 0.5,
|
||||
children: [
|
||||
SlidableAction(
|
||||
backgroundColor: const Color(0xff5D5E70),
|
||||
onPressed: (_) {
|
||||
Navigator.of(context).pushNamed(Routes.routeAddEnv, arguments: bean);
|
||||
},
|
||||
foregroundColor: Colors.white,
|
||||
icon: CupertinoIcons.pencil_outline,
|
||||
),
|
||||
SlidableAction(
|
||||
backgroundColor: const Color(0xffA356D6),
|
||||
onPressed: (_) {
|
||||
enableEnv(context);
|
||||
},
|
||||
foregroundColor: Colors.white,
|
||||
icon: bean.status == 0 ? Icons.dnd_forwardslash : Icons.check_circle_outline_sharp,
|
||||
),
|
||||
SlidableAction(
|
||||
backgroundColor: const Color(0xffEA4D3E),
|
||||
onPressed: (_) {
|
||||
delEnv(context, ref);
|
||||
},
|
||||
foregroundColor: Colors.white,
|
||||
icon: CupertinoIcons.delete,
|
||||
),
|
||||
],
|
||||
),
|
||||
child: SizedBox(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SlidableAction(
|
||||
backgroundColor: Colors.grey,
|
||||
flex: 1,
|
||||
onPressed: (_) {
|
||||
Navigator.of(context).pushNamed(Routes.routeAddEnv, arguments: bean);
|
||||
},
|
||||
foregroundColor: Colors.white,
|
||||
icon: CupertinoIcons.pencil,
|
||||
),
|
||||
SlidableAction(
|
||||
backgroundColor: Colors.orange,
|
||||
flex: 1,
|
||||
onPressed: (_) {
|
||||
enableEnv();
|
||||
},
|
||||
foregroundColor: Colors.white,
|
||||
icon: bean.status == 0 ? Icons.dnd_forwardslash : Icons.check_circle_outline_sharp,
|
||||
),
|
||||
SlidableAction(
|
||||
backgroundColor: Colors.red,
|
||||
flex: 1,
|
||||
onPressed: (_) {
|
||||
delEnv(context, ref);
|
||||
},
|
||||
foregroundColor: Colors.white,
|
||||
icon: CupertinoIcons.delete,
|
||||
),
|
||||
],
|
||||
),
|
||||
child: SizedBox(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 15,
|
||||
vertical: 8,
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Row(
|
||||
children: [
|
||||
Material(
|
||||
color: Colors.transparent,
|
||||
child: Text(
|
||||
bean.name ?? "",
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
overflow: TextOverflow.ellipsis,
|
||||
color: ref.watch(themeProvider).themeColor.titleColor(),
|
||||
fontSize: 18,
|
||||
Material(
|
||||
color: ref.watch(themeProvider).themeColor.settingBgColor(),
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
Navigator.of(context).pushNamed(Routes.routeEnvDetail, arguments: bean);
|
||||
},
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 15,
|
||||
vertical: 8,
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Row(
|
||||
children: [
|
||||
bean.status == 1
|
||||
? const Icon(
|
||||
Icons.dnd_forwardslash,
|
||||
size: 18,
|
||||
color: Color(0xffEA4D3E),
|
||||
)
|
||||
: Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 5,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
border: Border.all(color: ref.watch(themeProvider).primaryColor, width: 1),
|
||||
),
|
||||
child: Text(
|
||||
"${getIndexByIndex(context, index)}",
|
||||
style: TextStyle(color: ref.watch(themeProvider).primaryColor, fontSize: 12),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 5,
|
||||
),
|
||||
Material(
|
||||
color: Colors.transparent,
|
||||
child: Text(
|
||||
bean.name ?? "",
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
overflow: TextOverflow.ellipsis,
|
||||
color: ref.watch(themeProvider).themeColor.titleColor(),
|
||||
fontSize: 16,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 5,
|
||||
),
|
||||
Material(
|
||||
color: Colors.transparent,
|
||||
child: Text(
|
||||
Utils.formatGMTTime(bean.timestamp ?? ""),
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
overflow: TextOverflow.ellipsis,
|
||||
color: ref.watch(themeProvider).themeColor.descColor(),
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 8.0),
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 5,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
border: Border.all(color: ref.watch(themeProvider).primaryColor, width: 1),
|
||||
),
|
||||
child: Text(
|
||||
"$index",
|
||||
style: TextStyle(color: ref.watch(themeProvider).primaryColor, fontSize: 12),
|
||||
const SizedBox(
|
||||
width: 5,
|
||||
),
|
||||
Expanded(
|
||||
child: Visibility(
|
||||
visible: bean.remarks != null && bean.remarks!.isNotEmpty,
|
||||
child: Material(
|
||||
color: Colors.transparent,
|
||||
child: Text(
|
||||
"(${bean.remarks})",
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
height: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
color: ref.watch(themeProvider).themeColor.descColor(),
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 5,
|
||||
),
|
||||
bean.status == 1
|
||||
? const Icon(
|
||||
Icons.dnd_forwardslash,
|
||||
size: 12,
|
||||
color: Colors.red,
|
||||
)
|
||||
: const SizedBox.shrink(),
|
||||
|
||||
const SizedBox(
|
||||
width: 5,
|
||||
width: 15,
|
||||
),
|
||||
Material(
|
||||
color: Colors.transparent,
|
||||
child: Text(
|
||||
bean.remarks ?? "-",
|
||||
Utils.formatGMTTime(bean.timestamp ?? ""),
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
height: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
color: ref.watch(themeProvider).themeColor.descColor(),
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 8,
|
||||
),
|
||||
Material(
|
||||
color: Colors.transparent,
|
||||
child: Text(
|
||||
bean.value ?? "",
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
overflow: TextOverflow.ellipsis,
|
||||
color: ref.watch(themeProvider).themeColor.descColor(),
|
||||
fontSize: 12,
|
||||
const SizedBox(
|
||||
height: 15,
|
||||
),
|
||||
Material(
|
||||
color: Colors.transparent,
|
||||
child: Text(
|
||||
bean.value ?? "",
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
overflow: TextOverflow.ellipsis,
|
||||
color: ref.watch(themeProvider).themeColor.descColor(),
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const Divider(
|
||||
height: 1,
|
||||
indent: 15,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const Divider(
|
||||
height: 1,
|
||||
indent: 15,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void enableEnv() {
|
||||
void enableEnv(BuildContext context) {
|
||||
ref.read(envProvider).enableEnv(bean.sId!, bean.status!);
|
||||
}
|
||||
|
||||
void delEnv(BuildContext context, WidgetRef ref) {
|
||||
showCupertinoDialog(
|
||||
useRootNavigator: false,
|
||||
context: context,
|
||||
builder: (context) => CupertinoAlertDialog(
|
||||
title: const Text("确认删除"),
|
||||
@@ -344,4 +350,17 @@ class EnvItemCell extends StatelessWidget {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
int getIndexByIndex(BuildContext context, int index) {
|
||||
var list = ref.watch(envProvider.notifier).list;
|
||||
int result = 0;
|
||||
|
||||
for (int i = 0; i <= index; i++) {
|
||||
if (list.length > index && list[i].status == 0) {
|
||||
result++;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:qinglong_app/base/http/api.dart';
|
||||
import 'package:qinglong_app/base/ql_app_bar.dart';
|
||||
import 'package:qinglong_app/base/routes.dart';
|
||||
import 'package:qinglong_app/module/config/config_page.dart';
|
||||
@@ -9,7 +11,9 @@ import 'package:qinglong_app/module/env/env_page.dart';
|
||||
import 'package:qinglong_app/module/others/other_page.dart';
|
||||
import 'package:qinglong_app/module/task/task_page.dart';
|
||||
import 'package:move_to_background/move_to_background.dart';
|
||||
import 'package:qinglong_app/utils/update_utils.dart';
|
||||
import 'dart:math' as math;
|
||||
|
||||
import '../../utils/utils.dart';
|
||||
|
||||
class HomePage extends ConsumerStatefulWidget {
|
||||
const HomePage({Key? key}) : super(key: key);
|
||||
@@ -18,24 +22,39 @@ class HomePage extends ConsumerStatefulWidget {
|
||||
_HomePageState createState() => _HomePageState();
|
||||
}
|
||||
|
||||
class _HomePageState extends ConsumerState<HomePage> {
|
||||
class _HomePageState extends ConsumerState<HomePage>
|
||||
with TickerProviderStateMixin {
|
||||
int _index = 0;
|
||||
String _title = "";
|
||||
bool isNewYear = false;
|
||||
|
||||
List<IndexBean> titles = [];
|
||||
|
||||
GlobalKey<ConfigPageState> configKey = GlobalKey();
|
||||
|
||||
late final AnimationController _controller = AnimationController(
|
||||
duration: const Duration(milliseconds: 1000),
|
||||
vsync: this,
|
||||
)..repeat();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
isNewYearDuration();
|
||||
|
||||
initTitles();
|
||||
_title = titles[0].title;
|
||||
super.initState();
|
||||
WidgetsBinding.instance?.addPostFrameCallback((timeStamp) {
|
||||
update();
|
||||
getSystemBean();
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_controller.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
List<Widget> actions = [];
|
||||
@@ -140,8 +159,30 @@ class _HomePageState extends ConsumerState<HomePage> {
|
||||
items: titles
|
||||
.map(
|
||||
(e) => BottomNavigationBarItem(
|
||||
icon: Icon(e.icon),
|
||||
activeIcon: Icon(e.checkedIcon),
|
||||
icon: (e.celebrate.isNotEmpty)
|
||||
? Image.asset(
|
||||
e.celebrate,
|
||||
width: 35,
|
||||
height: 35,
|
||||
fit: BoxFit.cover,
|
||||
)
|
||||
: Icon(e.icon),
|
||||
activeIcon: (e.celebrate.isNotEmpty)
|
||||
? AnimatedBuilder(
|
||||
builder: (context, _) {
|
||||
return Transform.rotate(
|
||||
angle: _controller.value * 2.0 * math.pi,
|
||||
child: Image.asset(
|
||||
e.celebrate,
|
||||
width: 35,
|
||||
height: 35,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
);
|
||||
},
|
||||
animation: _controller,
|
||||
)
|
||||
: Icon(e.checkedIcon),
|
||||
label: e.title,
|
||||
),
|
||||
)
|
||||
@@ -152,7 +193,12 @@ class _HomePageState extends ConsumerState<HomePage> {
|
||||
_title = titles[index].title;
|
||||
setState(() {});
|
||||
},
|
||||
elevation: 0,
|
||||
selectedFontSize: 12,
|
||||
unselectedFontSize: 12,
|
||||
type: BottomNavigationBarType.fixed,
|
||||
showSelectedLabels: !isNewYear,
|
||||
showUnselectedLabels: !isNewYear,
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -165,6 +211,7 @@ class _HomePageState extends ConsumerState<HomePage> {
|
||||
CupertinoIcons.timer,
|
||||
CupertinoIcons.timer_fill,
|
||||
"定时任务",
|
||||
celebrate: !isNewYear ? "" : "assets/images/xin.png",
|
||||
),
|
||||
);
|
||||
titles.add(
|
||||
@@ -172,6 +219,7 @@ class _HomePageState extends ConsumerState<HomePage> {
|
||||
CupertinoIcons.hammer,
|
||||
CupertinoIcons.hammer_fill,
|
||||
"环境变量",
|
||||
celebrate: !isNewYear ? "" : "assets/images/chun.png",
|
||||
),
|
||||
);
|
||||
titles.add(
|
||||
@@ -179,24 +227,35 @@ class _HomePageState extends ConsumerState<HomePage> {
|
||||
CupertinoIcons.settings,
|
||||
CupertinoIcons.settings_solid,
|
||||
"配置文件",
|
||||
celebrate: !isNewYear ? "" : "assets/images/kuai.png",
|
||||
),
|
||||
);
|
||||
titles.add(
|
||||
IndexBean(
|
||||
CupertinoIcons.cube,
|
||||
CupertinoIcons.cube_fill,
|
||||
"其他",
|
||||
"其他功能",
|
||||
celebrate: !isNewYear ? "" : "assets/images/le.png",
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void update() async {
|
||||
String? result = await UpdateUtils().checkUpdate();
|
||||
if (result != null && result.isNotEmpty) {
|
||||
UpdateDialog updateDialog = UpdateDialog(context, title: "发现新版本", updateContent: "版本号:v$result", onUpdate: () {
|
||||
UpdateUtils.launchURL(result);
|
||||
});
|
||||
updateDialog.show();
|
||||
void isNewYearDuration() {
|
||||
DateTime date = DateTime.now();
|
||||
DateTime dateYear1 = DateTime(2022, 1, 29);
|
||||
DateTime dateYear2 = DateTime(2022, 2, 6);
|
||||
|
||||
if (date.isAfter(dateYear1) && date.isBefore(dateYear2)) {
|
||||
isNewYear = true;
|
||||
} else {
|
||||
isNewYear = false;
|
||||
}
|
||||
}
|
||||
|
||||
void getSystemBean() async {
|
||||
var bean = await Api.system();
|
||||
if (bean.success) {
|
||||
Utils.systemBean.version = bean.bean?.version ?? "2.10.13";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -205,6 +264,7 @@ class IndexBean {
|
||||
IconData icon;
|
||||
IconData checkedIcon;
|
||||
String title;
|
||||
String celebrate;
|
||||
|
||||
IndexBean(this.icon, this.checkedIcon, this.title);
|
||||
IndexBean(this.icon, this.checkedIcon, this.title, {this.celebrate = ""});
|
||||
}
|
||||
|
||||
116
lib/module/home/system_bean.dart
Normal file
@@ -0,0 +1,116 @@
|
||||
/// @author NewTab
|
||||
|
||||
import 'package:json_conversion_annotation/json_conversion_annotation.dart';
|
||||
|
||||
@JsonConversion()
|
||||
class SystemBean {
|
||||
String? version;
|
||||
|
||||
SystemBean({this.version});
|
||||
|
||||
SystemBean.fromJson(Map<String, dynamic> json) {
|
||||
version = json['version'];
|
||||
}
|
||||
|
||||
//2.12.2 以及以上版本,日志从dirs换成了data
|
||||
bool isUpperVersion2_12_2() {
|
||||
try {
|
||||
List<String>? version1 = version?.split("\.");
|
||||
|
||||
String f = version1?[0] ?? "2";
|
||||
String s = version1?[1] ?? "10";
|
||||
String t = version1?[2] ?? "0";
|
||||
|
||||
if (f.length == 1) {
|
||||
f = "0$f";
|
||||
}
|
||||
if (s.length == 1) {
|
||||
s = "0$s";
|
||||
}
|
||||
if (t.length == 1) {
|
||||
t = "0$t";
|
||||
}
|
||||
|
||||
String tempSum = "$f$s$t";
|
||||
|
||||
if ((int.tryParse(tempSum) ?? 1) >= 021202) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//2.13.0 以及以上版本日志详情接口参数有变化
|
||||
bool isUpperVersion2_13_0() {
|
||||
try {
|
||||
List<String>? version1 = version?.split("\.");
|
||||
|
||||
String f = version1?[0] ?? "2";
|
||||
String s = version1?[1] ?? "10";
|
||||
String t = version1?[2] ?? "0";
|
||||
|
||||
if (f.length == 1) {
|
||||
f = "0$f";
|
||||
}
|
||||
if (s.length == 1) {
|
||||
s = "0$s";
|
||||
}
|
||||
if (t.length == 1) {
|
||||
t = "0$t";
|
||||
}
|
||||
|
||||
String tempSum = "$f$s$t";
|
||||
|
||||
if ((int.tryParse(tempSum) ?? 1) >= 021300) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// 2.10.13以上版本,针对任务,环境变量编辑做了修改
|
||||
bool isUpperVersion() {
|
||||
try {
|
||||
List<String>? version1 = version?.split("\.");
|
||||
|
||||
String f = version1?[0] ?? "2";
|
||||
String s = version1?[1] ?? "10";
|
||||
String t = version1?[2] ?? "0";
|
||||
|
||||
if (f.length == 1) {
|
||||
f = "0$f";
|
||||
}
|
||||
if (s.length == 1) {
|
||||
s = "0$s";
|
||||
}
|
||||
if (t.length == 1) {
|
||||
t = "0$t";
|
||||
}
|
||||
|
||||
String tempSum = "$f$s$t";
|
||||
|
||||
if ((int.tryParse(tempSum) ?? 1) > 021013) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['version'] = this.version;
|
||||
return data;
|
||||
}
|
||||
|
||||
static SystemBean jsonConversion(Map<String, dynamic> json) {
|
||||
return SystemBean.fromJson(json);
|
||||
}
|
||||
}
|
||||
@@ -1,31 +1,32 @@
|
||||
import 'package:dio_log/dio_log.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:qinglong_app/base/http/api.dart';
|
||||
import 'package:qinglong_app/base/http/http.dart';
|
||||
import 'package:qinglong_app/base/routes.dart';
|
||||
import 'package:qinglong_app/base/theme.dart';
|
||||
import 'package:qinglong_app/base/userinfo_viewmodel.dart';
|
||||
import 'package:qinglong_app/main.dart';
|
||||
import 'package:qinglong_app/module/login/user_bean.dart';
|
||||
import 'package:qinglong_app/utils/extension.dart';
|
||||
import 'package:qinglong_app/utils/update_utils.dart';
|
||||
import 'package:qinglong_app/utils/login_helper.dart';
|
||||
import 'package:qinglong_app/utils/utils.dart';
|
||||
import 'package:flip_card/flip_card.dart';
|
||||
|
||||
import 'login_bean.dart';
|
||||
|
||||
class LoginPage extends ConsumerStatefulWidget {
|
||||
const LoginPage({Key? key}) : super(key: key);
|
||||
final bool doNotLoadLocalData;
|
||||
|
||||
const LoginPage({
|
||||
Key? key,
|
||||
this.doNotLoadLocalData = false,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
_LoginPageState createState() => _LoginPageState();
|
||||
}
|
||||
|
||||
class _LoginPageState extends ConsumerState<LoginPage> {
|
||||
final TextEditingController _hostController =
|
||||
TextEditingController(text: getIt<UserInfoViewModel>().host);
|
||||
final TextEditingController _hostController = TextEditingController();
|
||||
final TextEditingController _userNameController = TextEditingController();
|
||||
final TextEditingController _passwordController = TextEditingController();
|
||||
final TextEditingController _cIdController = TextEditingController();
|
||||
@@ -39,30 +40,29 @@ class _LoginPageState extends ConsumerState<LoginPage> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
useSecretLogin = getIt<UserInfoViewModel>().useSecretLogined;
|
||||
|
||||
if (getIt<UserInfoViewModel>().userName != null &&
|
||||
getIt<UserInfoViewModel>().userName!.isNotEmpty) {
|
||||
if (getIt<UserInfoViewModel>().useSecretLogined) {
|
||||
_cIdController.text = getIt<UserInfoViewModel>().userName!;
|
||||
if (!widget.doNotLoadLocalData) {
|
||||
_hostController.text = getIt<UserInfoViewModel>().host ?? "";
|
||||
useSecretLogin = getIt<UserInfoViewModel>().useSecretLogined;
|
||||
if (getIt<UserInfoViewModel>().userName != null && getIt<UserInfoViewModel>().userName!.isNotEmpty) {
|
||||
if (getIt<UserInfoViewModel>().useSecretLogined) {
|
||||
_cIdController.text = getIt<UserInfoViewModel>().userName!;
|
||||
} else {
|
||||
_userNameController.text = getIt<UserInfoViewModel>().userName!;
|
||||
}
|
||||
rememberPassword = true;
|
||||
} else {
|
||||
_userNameController.text = getIt<UserInfoViewModel>().userName!;
|
||||
rememberPassword = false;
|
||||
}
|
||||
rememberPassword = true;
|
||||
} else {
|
||||
rememberPassword = false;
|
||||
}
|
||||
if (getIt<UserInfoViewModel>().passWord != null &&
|
||||
getIt<UserInfoViewModel>().passWord!.isNotEmpty) {
|
||||
if (getIt<UserInfoViewModel>().useSecretLogined) {
|
||||
_cSecretController.text = getIt<UserInfoViewModel>().passWord!;
|
||||
} else {
|
||||
_passwordController.text = getIt<UserInfoViewModel>().passWord!;
|
||||
if (getIt<UserInfoViewModel>().passWord != null && getIt<UserInfoViewModel>().passWord!.isNotEmpty) {
|
||||
if (getIt<UserInfoViewModel>().useSecretLogined) {
|
||||
_cSecretController.text = getIt<UserInfoViewModel>().passWord!;
|
||||
} else {
|
||||
_passwordController.text = getIt<UserInfoViewModel>().passWord!;
|
||||
}
|
||||
}
|
||||
}
|
||||
getIt<UserInfoViewModel>().updateToken("");
|
||||
WidgetsBinding.instance?.addPostFrameCallback((timeStamp) {
|
||||
update();
|
||||
if (useSecretLogin) {
|
||||
cardKey.currentState?.toggleCard();
|
||||
}
|
||||
@@ -71,316 +71,334 @@ class _LoginPageState extends ConsumerState<LoginPage> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ColoredBox(
|
||||
color: ref.watch(themeProvider).themeColor.settingBgColor(),
|
||||
child: SizedBox(
|
||||
height: MediaQuery.of(context).size.height,
|
||||
child: Stack(
|
||||
children: [
|
||||
Positioned(
|
||||
bottom: 0,
|
||||
child: Image.asset(
|
||||
"assets/images/login_bg.png",
|
||||
width: MediaQuery.of(context).size.width,
|
||||
),
|
||||
),
|
||||
Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
body: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 40,
|
||||
),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(
|
||||
height: MediaQuery.of(context).size.height / 8,
|
||||
return Scaffold(
|
||||
body: AnnotatedRegion<SystemUiOverlayStyle>(
|
||||
value: ref.watch(themeProvider).darkMode == true ? SystemUiOverlayStyle.light : SystemUiOverlayStyle.dark,
|
||||
child: ColoredBox(
|
||||
color: ref.watch(themeProvider).themeColor.settingBgColor(),
|
||||
child: SizedBox(
|
||||
height: MediaQuery.of(context).size.height,
|
||||
child: Stack(
|
||||
children: [
|
||||
Positioned(
|
||||
bottom: 0,
|
||||
child: Image.asset(
|
||||
"assets/images/login_bg.png",
|
||||
width: MediaQuery.of(context).size.width,
|
||||
),
|
||||
),
|
||||
Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
body: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 40,
|
||||
),
|
||||
Row(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Image.asset(
|
||||
"assets/images/login_tip.png",
|
||||
height: 45,
|
||||
SizedBox(
|
||||
height: MediaQuery.of(context).size.height / 10,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Image.asset(
|
||||
"assets/images/login_tip.png",
|
||||
height: 45,
|
||||
),
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
onDoubleTap: () {
|
||||
if (debugBtnIsShow()) {
|
||||
dismissDebugBtn();
|
||||
} else {
|
||||
showDebugBtn(context, btnColor: ref.watch(themeProvider).primaryColor);
|
||||
}
|
||||
WidgetsBinding.instance?.endOfFrame;
|
||||
},
|
||||
child: Image.asset(
|
||||
"assets/images/ql.png",
|
||||
height: 45,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: MediaQuery.of(context).size.height / 15,
|
||||
),
|
||||
const Text(
|
||||
"域名:",
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
onDoubleTap: () {
|
||||
if (debugBtnIsShow()) {
|
||||
dismissDebugBtn();
|
||||
} else {
|
||||
showDebugBtn(context,
|
||||
btnColor: ref
|
||||
.watch(themeProvider)
|
||||
.primaryColor);
|
||||
}
|
||||
WidgetsBinding.instance?.endOfFrame;
|
||||
TextField(
|
||||
onChanged: (_) {
|
||||
setState(() {});
|
||||
},
|
||||
child: ColorFiltered(
|
||||
colorFilter: ColorFilter.mode(
|
||||
ref.watch(themeProvider).primaryColor,
|
||||
BlendMode.srcIn,
|
||||
controller: _hostController,
|
||||
decoration: const InputDecoration(
|
||||
contentPadding: EdgeInsets.fromLTRB(0, 5, 0, 5),
|
||||
hintText: "http://1.1.1.1:5700",
|
||||
),
|
||||
autofocus: false,
|
||||
),
|
||||
FlipCard(
|
||||
key: cardKey,
|
||||
flipOnTouch: false,
|
||||
onFlipDone: (back) {
|
||||
useSecretLogin = back;
|
||||
setState(() {});
|
||||
},
|
||||
direction: FlipDirection.HORIZONTAL,
|
||||
front: SizedBox(
|
||||
height: 200,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const SizedBox(
|
||||
height: 15,
|
||||
),
|
||||
const Text(
|
||||
"用户名:",
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
TextField(
|
||||
onChanged: (_) {
|
||||
setState(() {});
|
||||
},
|
||||
controller: _userNameController,
|
||||
decoration: const InputDecoration(
|
||||
contentPadding: EdgeInsets.fromLTRB(0, 5, 0, 5),
|
||||
hintText: "请输入用户名",
|
||||
),
|
||||
autofocus: false,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 15,
|
||||
),
|
||||
const Text(
|
||||
"密码:",
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
TextField(
|
||||
onChanged: (_) {
|
||||
setState(() {});
|
||||
},
|
||||
controller: _passwordController,
|
||||
obscureText: true,
|
||||
decoration: const InputDecoration(
|
||||
contentPadding: EdgeInsets.fromLTRB(0, 5, 0, 5),
|
||||
hintText: "请输入密码",
|
||||
),
|
||||
autofocus: false,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Image.asset(
|
||||
"assets/images/ql.png",
|
||||
height: 45,
|
||||
),
|
||||
back: SizedBox(
|
||||
height: 200,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const SizedBox(
|
||||
height: 15,
|
||||
),
|
||||
const Text(
|
||||
"client_id:",
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
TextField(
|
||||
onChanged: (_) {
|
||||
setState(() {});
|
||||
},
|
||||
controller: _cIdController,
|
||||
decoration: const InputDecoration(
|
||||
contentPadding: EdgeInsets.fromLTRB(0, 5, 0, 5),
|
||||
hintText: "请输入client_id",
|
||||
),
|
||||
autofocus: false,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 15,
|
||||
),
|
||||
const Text(
|
||||
"client_secret:",
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
TextField(
|
||||
onChanged: (_) {
|
||||
setState(() {});
|
||||
},
|
||||
controller: _cSecretController,
|
||||
obscureText: true,
|
||||
decoration: const InputDecoration(
|
||||
contentPadding: EdgeInsets.fromLTRB(0, 5, 0, 5),
|
||||
hintText: "请输入client_secret",
|
||||
),
|
||||
autofocus: false,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: MediaQuery.of(context).size.height / 15,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 25,
|
||||
),
|
||||
const Text(
|
||||
"域名:",
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
TextField(
|
||||
onChanged: (_) {
|
||||
setState(() {});
|
||||
},
|
||||
controller: _hostController,
|
||||
decoration: const InputDecoration(
|
||||
contentPadding: EdgeInsets.fromLTRB(0, 5, 0, 5),
|
||||
hintText: "http://1.1.1.1:5700",
|
||||
),
|
||||
autofocus: false,
|
||||
),
|
||||
FlipCard(
|
||||
key: cardKey,
|
||||
flipOnTouch: false,
|
||||
onFlipDone: (back) {
|
||||
useSecretLogin = back;
|
||||
setState(() {});
|
||||
},
|
||||
direction: FlipDirection.HORIZONTAL,
|
||||
front: SizedBox(
|
||||
height: 200,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const SizedBox(
|
||||
height: 15,
|
||||
),
|
||||
const Text(
|
||||
"用户名:",
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
TextField(
|
||||
onChanged: (_) {
|
||||
setState(() {});
|
||||
},
|
||||
controller: _userNameController,
|
||||
decoration: const InputDecoration(
|
||||
contentPadding:
|
||||
EdgeInsets.fromLTRB(0, 5, 0, 5),
|
||||
hintText: "请输入用户名",
|
||||
),
|
||||
autofocus: false,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 15,
|
||||
),
|
||||
const Text(
|
||||
"密码:",
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
TextField(
|
||||
onChanged: (_) {
|
||||
setState(() {});
|
||||
},
|
||||
controller: _passwordController,
|
||||
obscureText: true,
|
||||
decoration: const InputDecoration(
|
||||
contentPadding:
|
||||
EdgeInsets.fromLTRB(0, 5, 0, 5),
|
||||
hintText: "请输入密码",
|
||||
),
|
||||
autofocus: false,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
],
|
||||
child: Row(
|
||||
children: [
|
||||
Checkbox(
|
||||
value: rememberPassword,
|
||||
onChanged: (checked) {
|
||||
rememberPassword = checked ?? false;
|
||||
setState(() {});
|
||||
},
|
||||
),
|
||||
),
|
||||
back: SizedBox(
|
||||
height: 200,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const SizedBox(
|
||||
height: 15,
|
||||
),
|
||||
const Text(
|
||||
"client_id:",
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
TextField(
|
||||
onChanged: (_) {
|
||||
setState(() {});
|
||||
},
|
||||
controller: _cIdController,
|
||||
decoration: const InputDecoration(
|
||||
contentPadding:
|
||||
EdgeInsets.fromLTRB(0, 5, 0, 5),
|
||||
hintText: "请输入client_id",
|
||||
),
|
||||
autofocus: false,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 15,
|
||||
),
|
||||
const Text(
|
||||
"client_secret:",
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
TextField(
|
||||
onChanged: (_) {
|
||||
setState(() {});
|
||||
},
|
||||
controller: _cSecretController,
|
||||
obscureText: true,
|
||||
decoration: const InputDecoration(
|
||||
contentPadding:
|
||||
EdgeInsets.fromLTRB(0, 5, 0, 5),
|
||||
hintText: "请输入client_secret",
|
||||
),
|
||||
autofocus: false,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
],
|
||||
const Text(
|
||||
"记住密码/client",
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 25,
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Checkbox(
|
||||
value: rememberPassword,
|
||||
onChanged: (checked) {
|
||||
rememberPassword = checked ?? false;
|
||||
setState(() {});
|
||||
},
|
||||
),
|
||||
const Text(
|
||||
"记住密码/client",
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
cardKey.currentState?.toggleCard();
|
||||
WidgetsBinding.instance
|
||||
?.addPostFrameCallback((timeStamp) {
|
||||
setState(() {});
|
||||
});
|
||||
},
|
||||
child: Text(
|
||||
loginByUserName() ? "client_id登录" : "账号登录",
|
||||
style: const TextStyle(
|
||||
fontSize: 14,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 10,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 30,
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.center,
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 40,
|
||||
),
|
||||
child: SizedBox(
|
||||
width: MediaQuery.of(context).size.width - 80,
|
||||
child: IgnorePointer(
|
||||
ignoring: !canClickLoginBtn(),
|
||||
child: CupertinoButton(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 5,
|
||||
),
|
||||
color: canClickLoginBtn()
|
||||
? ref.watch(themeProvider).primaryColor
|
||||
: ref
|
||||
.watch(themeProvider)
|
||||
.primaryColor
|
||||
.withOpacity(0.4),
|
||||
child: isLoading
|
||||
? const CupertinoActivityIndicator()
|
||||
: const Text(
|
||||
"登 录",
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
),
|
||||
const Spacer(),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
cardKey.currentState?.toggleCard();
|
||||
WidgetsBinding.instance?.addPostFrameCallback((timeStamp) {
|
||||
setState(() {});
|
||||
});
|
||||
},
|
||||
child: Text(
|
||||
loginByUserName() ? "client_id登录" : "账号登录",
|
||||
style: const TextStyle(
|
||||
fontSize: 14,
|
||||
),
|
||||
onPressed: () {
|
||||
Http.pushedLoginPage = false;
|
||||
Utils.hideKeyBoard(context);
|
||||
getIt<UserInfoViewModel>()
|
||||
.updateHost(_hostController.text);
|
||||
Http.clear();
|
||||
if (loginByUserName()) {
|
||||
login(_userNameController.text,
|
||||
_passwordController.text);
|
||||
} else {
|
||||
login(_cIdController.text,
|
||||
_cSecretController.text);
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 10,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 30,
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.center,
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 40,
|
||||
),
|
||||
child: SizedBox(
|
||||
width: MediaQuery.of(context).size.width - 80,
|
||||
child: IgnorePointer(
|
||||
ignoring: !canClickLoginBtn(),
|
||||
child: CupertinoButton(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 5,
|
||||
),
|
||||
color: canClickLoginBtn() ? ref.watch(themeProvider).primaryColor : ref.watch(themeProvider).primaryColor.withOpacity(0.4),
|
||||
child: isLoading
|
||||
? const CupertinoActivityIndicator()
|
||||
: const Text(
|
||||
"登 录",
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
),
|
||||
),
|
||||
onPressed: () {
|
||||
Http.pushedLoginPage = false;
|
||||
Utils.hideKeyBoard(context);
|
||||
if (loginByUserName()) {
|
||||
login(_userNameController.text, _passwordController.text);
|
||||
} else {
|
||||
login(_cIdController.text, _cSecretController.text);
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 30,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
bottom: 10,
|
||||
child: (getIt<UserInfoViewModel>().historyAccounts.isEmpty)
|
||||
? const SizedBox.shrink()
|
||||
: SizedBox(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
child: Center(
|
||||
child: Material(
|
||||
color: Colors.transparent,
|
||||
child: PopupMenuButton<UserInfoBean>(
|
||||
onSelected: (UserInfoBean result) {
|
||||
selected(result);
|
||||
},
|
||||
itemBuilder: (BuildContext context) => <PopupMenuEntry<UserInfoBean>>[
|
||||
...getIt<UserInfoViewModel>()
|
||||
.historyAccounts
|
||||
.map((e) => PopupMenuItem<UserInfoBean>(
|
||||
value: e,
|
||||
child: buildCell(e),
|
||||
))
|
||||
.toList(),
|
||||
],
|
||||
child: Text(
|
||||
"切换账号",
|
||||
style: TextStyle(
|
||||
color: ref.watch(themeProvider).primaryColor,
|
||||
fontSize: 14,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -392,78 +410,45 @@ class _LoginPageState extends ConsumerState<LoginPage> {
|
||||
return !useSecretLogin;
|
||||
}
|
||||
|
||||
LoginHelper? helper;
|
||||
|
||||
Future<void> login(String userName, String password) async {
|
||||
isLoading = true;
|
||||
setState(() {});
|
||||
HttpResponse<LoginBean> response;
|
||||
|
||||
if (loginByUserName()) {
|
||||
response = await Api.login(userName, password);
|
||||
helper = LoginHelper(useSecretLogin, _hostController.text, userName, password, rememberPassword);
|
||||
var response = await helper!.login();
|
||||
dealLoginResponse(response);
|
||||
}
|
||||
|
||||
void dealLoginResponse(int response) {
|
||||
isLoading = false;
|
||||
if (response == LoginHelper.success) {
|
||||
Navigator.of(context).pushReplacementNamed(Routes.routeHomePage);
|
||||
} else if (response == LoginHelper.failed) {
|
||||
loginFailed();
|
||||
} else {
|
||||
response = await Api.loginByClientId(userName, password);
|
||||
}
|
||||
if (response.success) {
|
||||
loginSuccess(response, userName, password);
|
||||
} else if (loginByUserName() && response.code == 401) {
|
||||
//可能用户使用的是老版本qinglong
|
||||
HttpResponse<LoginBean> oldResponse =
|
||||
await Api.loginOld(userName, password);
|
||||
if (oldResponse.success) {
|
||||
loginSuccess(oldResponse, userName, password);
|
||||
} else {
|
||||
(oldResponse.message ?? "请检查网络情况").toast();
|
||||
if (oldResponse.code == 420) {
|
||||
twoFact(userName, password);
|
||||
} else {
|
||||
isLoading = false;
|
||||
setState(() {});
|
||||
}
|
||||
}
|
||||
} else {
|
||||
print(response.code);
|
||||
(response.message ?? "请检查网络情况").toast();
|
||||
//420代表需要2步验证
|
||||
if (response.code == 420) {
|
||||
twoFact(userName, password);
|
||||
} else {
|
||||
isLoading = false;
|
||||
setState(() {});
|
||||
}
|
||||
twoFact();
|
||||
}
|
||||
}
|
||||
|
||||
void loginFailed(HttpResponse<LoginBean> response) {
|
||||
(response.message ?? "请检查网络情况").toast();
|
||||
void loginFailed() {
|
||||
isLoading = false;
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
void loginSuccess(
|
||||
HttpResponse<LoginBean> response, String userName, String password) {
|
||||
getIt<UserInfoViewModel>().updateToken(response.bean?.token ?? "");
|
||||
getIt<UserInfoViewModel>().useSecretLogin(!loginByUserName());
|
||||
if (rememberPassword) {
|
||||
getIt<UserInfoViewModel>().updateUserName(userName, password);
|
||||
} else {
|
||||
getIt<UserInfoViewModel>().updateUserName("", "");
|
||||
}
|
||||
Navigator.of(context).pushReplacementNamed(Routes.routeHomePage);
|
||||
}
|
||||
|
||||
bool canClickLoginBtn() {
|
||||
if (isLoading) return false;
|
||||
|
||||
if (_hostController.text.isEmpty) return false;
|
||||
if (!loginByUserName()) {
|
||||
return _cIdController.text.isNotEmpty &&
|
||||
_cSecretController.text.isNotEmpty;
|
||||
return _cIdController.text.isNotEmpty && _cSecretController.text.isNotEmpty;
|
||||
} else {
|
||||
return _userNameController.text.isNotEmpty &&
|
||||
_passwordController.text.isNotEmpty;
|
||||
return _userNameController.text.isNotEmpty && _passwordController.text.isNotEmpty;
|
||||
}
|
||||
}
|
||||
|
||||
void twoFact(String userName, String password) {
|
||||
void twoFact() {
|
||||
String twoFact = "";
|
||||
showCupertinoDialog(
|
||||
context: context,
|
||||
@@ -510,12 +495,11 @@ class _LoginPageState extends ConsumerState<LoginPage> {
|
||||
),
|
||||
onPressed: () async {
|
||||
Navigator.of(context).pop(true);
|
||||
HttpResponse<LoginBean> response =
|
||||
await Api.loginTwo(userName, password, twoFact);
|
||||
if (response.success) {
|
||||
loginSuccess(response, userName, password);
|
||||
if (helper != null) {
|
||||
var response = await helper!.loginTwice(twoFact);
|
||||
dealLoginResponse(response);
|
||||
} else {
|
||||
loginFailed(response);
|
||||
"状态异常,请重新点登录按钮".toast();
|
||||
}
|
||||
},
|
||||
),
|
||||
@@ -528,14 +512,42 @@ class _LoginPageState extends ConsumerState<LoginPage> {
|
||||
});
|
||||
}
|
||||
|
||||
void update() async {
|
||||
String? result = await UpdateUtils().checkUpdate();
|
||||
if (result != null && result.isNotEmpty) {
|
||||
UpdateDialog updateDialog = UpdateDialog(context,
|
||||
title: "发现新版本", updateContent: "版本号:v${result}", onUpdate: () {
|
||||
UpdateUtils.launchURL(result);
|
||||
});
|
||||
updateDialog.show();
|
||||
Widget buildCell(UserInfoBean bean) {
|
||||
return ListTile(
|
||||
title: Text(
|
||||
bean.host ?? "",
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
subtitle: Padding(
|
||||
padding: const EdgeInsets.only(top: 10.0),
|
||||
child: Text(
|
||||
bean.userName ?? "",
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void selected(UserInfoBean result) {
|
||||
_hostController.text = result.host ?? "";
|
||||
if (result.useSecretLogined) {
|
||||
_cIdController.text = result.userName ?? "";
|
||||
_cSecretController.text = result.password ?? "";
|
||||
if (cardKey.currentState?.isFront ?? false) {
|
||||
WidgetsBinding.instance?.addPostFrameCallback((timeStamp) {
|
||||
cardKey.currentState?.toggleCard();
|
||||
});
|
||||
}
|
||||
} else {
|
||||
_userNameController.text = result.userName ?? "";
|
||||
_passwordController.text = result.password ?? "";
|
||||
if (!(cardKey.currentState?.isFront ?? false)) {
|
||||
WidgetsBinding.instance?.addPostFrameCallback((timeStamp) {
|
||||
cardKey.currentState?.toggleCard();
|
||||
});
|
||||
}
|
||||
}
|
||||
rememberPassword = true;
|
||||
setState(() {});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:qinglong_app/base/ql_app_bar.dart';
|
||||
import 'package:package_info_plus/package_info_plus.dart';
|
||||
import 'package:qinglong_app/base/theme.dart';
|
||||
import 'package:qinglong_app/utils/update_utils.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
import '../../main.dart';
|
||||
@@ -25,19 +24,6 @@ class _AboutPageState extends ConsumerState<AboutPage> {
|
||||
super.initState();
|
||||
getInfo();
|
||||
|
||||
WidgetsBinding.instance?.addPostFrameCallback((timeStamp) {
|
||||
update();
|
||||
});
|
||||
}
|
||||
|
||||
void update() async {
|
||||
String? result = await UpdateUtils().checkUpdate(true);
|
||||
if (result != null && result.isNotEmpty) {
|
||||
UpdateDialog updateDialog = UpdateDialog(context, title: "发现新版本", updateContent: "版本号:v${result}", onUpdate: () {
|
||||
UpdateUtils.launchURL(result);
|
||||
});
|
||||
updateDialog.show();
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
@@ -302,6 +304,8 @@ class DependencyCell extends ConsumerWidget {
|
||||
: CupertinoScrollbar(
|
||||
child: SelectableText(
|
||||
bean.log!.join("\n"),
|
||||
selectionHeightStyle: BoxHeightStyle.max,
|
||||
selectionWidthStyle: BoxWidthStyle.max,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -21,7 +21,8 @@ class LoginLogPage extends ConsumerStatefulWidget {
|
||||
_LoginLogPageState createState() => _LoginLogPageState();
|
||||
}
|
||||
|
||||
class _LoginLogPageState extends ConsumerState<LoginLogPage> with LazyLoadState<LoginLogPage> {
|
||||
class _LoginLogPageState extends ConsumerState<LoginLogPage>
|
||||
with LazyLoadState<LoginLogPage> {
|
||||
List<LoginLogBean> list = [];
|
||||
|
||||
@override
|
||||
@@ -65,7 +66,8 @@ class _LoginLogPageState extends ConsumerState<LoginLogPage> with LazyLoadState<
|
||||
selectionWidthStyle: BoxWidthStyle.max,
|
||||
selectionHeightStyle: BoxHeightStyle.max,
|
||||
style: TextStyle(
|
||||
color: ref.watch(themeProvider).themeColor.descColor(),
|
||||
color:
|
||||
ref.watch(themeProvider).themeColor.descColor(),
|
||||
fontSize: 14,
|
||||
),
|
||||
),
|
||||
@@ -77,7 +79,8 @@ class _LoginLogPageState extends ConsumerState<LoginLogPage> with LazyLoadState<
|
||||
selectionWidthStyle: BoxWidthStyle.max,
|
||||
selectionHeightStyle: BoxHeightStyle.max,
|
||||
style: TextStyle(
|
||||
color: ref.watch(themeProvider).themeColor.descColor(),
|
||||
color:
|
||||
ref.watch(themeProvider).themeColor.descColor(),
|
||||
fontSize: 14,
|
||||
),
|
||||
),
|
||||
@@ -106,6 +109,9 @@ class _LoginLogPageState extends ConsumerState<LoginLogPage> with LazyLoadState<
|
||||
HttpResponse<List<LoginLogBean>> response = await Api.loginLog();
|
||||
|
||||
if (response.success) {
|
||||
if (response.bean == null || response.bean!.isEmpty) {
|
||||
"暂无数据".toast();
|
||||
}
|
||||
list.clear();
|
||||
list.addAll(response.bean ?? []);
|
||||
setState(() {});
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import 'package:dio_log/dio_log.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
@@ -28,10 +27,10 @@ class _OtherPageState extends ConsumerState<OtherPage> {
|
||||
Container(
|
||||
margin: const EdgeInsets.symmetric(
|
||||
horizontal: 15,
|
||||
vertical: 30,
|
||||
vertical: 15,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: ref.watch(themeProvider).themeColor.settingBgColor(),
|
||||
color: ref.watch(themeProvider).themeColor.settingBordorColor(),
|
||||
borderRadius: const BorderRadius.all(
|
||||
Radius.circular(15),
|
||||
),
|
||||
@@ -49,8 +48,8 @@ class _OtherPageState extends ConsumerState<OtherPage> {
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
top: 12,
|
||||
bottom: 8,
|
||||
top: 10,
|
||||
bottom: 5,
|
||||
left: 15,
|
||||
right: 15,
|
||||
),
|
||||
@@ -59,10 +58,7 @@ class _OtherPageState extends ConsumerState<OtherPage> {
|
||||
Text(
|
||||
"脚本管理",
|
||||
style: TextStyle(
|
||||
color: ref
|
||||
.watch(themeProvider)
|
||||
.themeColor
|
||||
.titleColor(),
|
||||
color: ref.watch(themeProvider).themeColor.titleColor(),
|
||||
fontSize: 16,
|
||||
),
|
||||
),
|
||||
@@ -87,7 +83,7 @@ class _OtherPageState extends ConsumerState<OtherPage> {
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 8,
|
||||
vertical: 5,
|
||||
horizontal: 15,
|
||||
),
|
||||
child: Row(
|
||||
@@ -95,10 +91,7 @@ class _OtherPageState extends ConsumerState<OtherPage> {
|
||||
Text(
|
||||
"依赖管理",
|
||||
style: TextStyle(
|
||||
color: ref
|
||||
.watch(themeProvider)
|
||||
.themeColor
|
||||
.titleColor(),
|
||||
color: ref.watch(themeProvider).themeColor.titleColor(),
|
||||
fontSize: 16,
|
||||
),
|
||||
),
|
||||
@@ -123,8 +116,8 @@ class _OtherPageState extends ConsumerState<OtherPage> {
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
top: 8,
|
||||
bottom: 15,
|
||||
top: 5,
|
||||
bottom: 5,
|
||||
left: 15,
|
||||
right: 15,
|
||||
),
|
||||
@@ -133,10 +126,7 @@ class _OtherPageState extends ConsumerState<OtherPage> {
|
||||
Text(
|
||||
"任务日志",
|
||||
style: TextStyle(
|
||||
color: ref
|
||||
.watch(themeProvider)
|
||||
.themeColor
|
||||
.titleColor(),
|
||||
color: ref.watch(themeProvider).themeColor.titleColor(),
|
||||
fontSize: 16,
|
||||
),
|
||||
),
|
||||
@@ -149,24 +139,9 @@ class _OtherPageState extends ConsumerState<OtherPage> {
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: const EdgeInsets.symmetric(
|
||||
horizontal: 15,
|
||||
vertical: 15,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: ref.watch(themeProvider).themeColor.settingBgColor(),
|
||||
borderRadius: const BorderRadius.all(
|
||||
Radius.circular(15),
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Divider(
|
||||
indent: 15,
|
||||
),
|
||||
GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () {
|
||||
@@ -179,9 +154,11 @@ class _OtherPageState extends ConsumerState<OtherPage> {
|
||||
}
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 10,
|
||||
horizontal: 15,
|
||||
padding: const EdgeInsets.only(
|
||||
top: 5,
|
||||
bottom: 5,
|
||||
left: 15,
|
||||
right: 15,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
@@ -189,10 +166,7 @@ class _OtherPageState extends ConsumerState<OtherPage> {
|
||||
Text(
|
||||
"登录日志",
|
||||
style: TextStyle(
|
||||
color: ref
|
||||
.watch(themeProvider)
|
||||
.themeColor
|
||||
.titleColor(),
|
||||
color: ref.watch(themeProvider).themeColor.titleColor(),
|
||||
fontSize: 16,
|
||||
),
|
||||
),
|
||||
@@ -221,8 +195,8 @@ class _OtherPageState extends ConsumerState<OtherPage> {
|
||||
behavior: HitTestBehavior.opaque,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
top: 8,
|
||||
bottom: 15,
|
||||
top: 5,
|
||||
bottom: 10,
|
||||
left: 15,
|
||||
right: 15,
|
||||
),
|
||||
@@ -233,10 +207,7 @@ class _OtherPageState extends ConsumerState<OtherPage> {
|
||||
Text(
|
||||
"修改密码",
|
||||
style: TextStyle(
|
||||
color: ref
|
||||
.watch(themeProvider)
|
||||
.themeColor
|
||||
.titleColor(),
|
||||
color: ref.watch(themeProvider).themeColor.titleColor(),
|
||||
fontSize: 16,
|
||||
),
|
||||
),
|
||||
@@ -258,7 +229,7 @@ class _OtherPageState extends ConsumerState<OtherPage> {
|
||||
vertical: 15,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: ref.watch(themeProvider).themeColor.settingBgColor(),
|
||||
color: ref.watch(themeProvider).themeColor.settingBordorColor(),
|
||||
borderRadius: const BorderRadius.all(
|
||||
Radius.circular(15),
|
||||
),
|
||||
@@ -280,8 +251,7 @@ class _OtherPageState extends ConsumerState<OtherPage> {
|
||||
Text(
|
||||
"夜间模式",
|
||||
style: TextStyle(
|
||||
color:
|
||||
ref.watch(themeProvider).themeColor.titleColor(),
|
||||
color: ref.watch(themeProvider).themeColor.titleColor(),
|
||||
fontSize: 16,
|
||||
),
|
||||
),
|
||||
@@ -295,6 +265,7 @@ class _OtherPageState extends ConsumerState<OtherPage> {
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
const Divider(
|
||||
indent: 15,
|
||||
),
|
||||
@@ -317,10 +288,7 @@ class _OtherPageState extends ConsumerState<OtherPage> {
|
||||
Text(
|
||||
"主题设置",
|
||||
style: TextStyle(
|
||||
color: ref
|
||||
.watch(themeProvider)
|
||||
.themeColor
|
||||
.titleColor(),
|
||||
color: ref.watch(themeProvider).themeColor.titleColor(),
|
||||
fontSize: 16,
|
||||
),
|
||||
),
|
||||
@@ -348,7 +316,7 @@ class _OtherPageState extends ConsumerState<OtherPage> {
|
||||
left: 15,
|
||||
right: 15,
|
||||
top: 5,
|
||||
bottom: 15,
|
||||
bottom: 10,
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
@@ -357,10 +325,7 @@ class _OtherPageState extends ConsumerState<OtherPage> {
|
||||
Text(
|
||||
"关于",
|
||||
style: TextStyle(
|
||||
color: ref
|
||||
.watch(themeProvider)
|
||||
.themeColor
|
||||
.titleColor(),
|
||||
color: ref.watch(themeProvider).themeColor.titleColor(),
|
||||
fontSize: 16,
|
||||
),
|
||||
),
|
||||
@@ -419,8 +384,7 @@ class _OtherPageState extends ConsumerState<OtherPage> {
|
||||
),
|
||||
onPressed: () {
|
||||
getIt<UserInfoViewModel>().updateToken("");
|
||||
Navigator.of(context)
|
||||
.pushReplacementNamed(Routes.routeLogin);
|
||||
Navigator.of(context).pushReplacementNamed(Routes.routeLogin);
|
||||
},
|
||||
),
|
||||
],
|
||||
|
||||