Compare commits
48 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c9da66d38f | ||
|
|
dc93985834 | ||
|
|
3e487ba22a | ||
|
|
bb2853d857 | ||
|
|
be84935ac3 | ||
|
|
19691a1dc0 | ||
|
|
5c6e54864d | ||
|
|
dda1ae23c9 | ||
|
|
f08c691b25 | ||
|
|
0340406bd8 | ||
|
|
32fb702872 | ||
|
|
b510dbd0ec | ||
|
|
e7f8dd6d80 | ||
|
|
f985889811 | ||
|
|
eb20fc1457 | ||
|
|
67721112cc | ||
|
|
070e3cf18c | ||
|
|
991097fa34 | ||
|
|
c4e87f66e6 | ||
|
|
8d01653714 | ||
|
|
db7b126bda | ||
|
|
023329f021 | ||
|
|
e66fdbaeac | ||
|
|
bbbaea9224 | ||
|
|
c7c18cf684 | ||
|
|
4d501fed3e | ||
|
|
8168ef5329 | ||
|
|
608bc58771 | ||
|
|
2cba1ec286 | ||
|
|
b6eb65814f | ||
|
|
a5a43ea0b9 | ||
|
|
da356bb212 | ||
|
|
c29ab3de29 | ||
|
|
fceb4e050f | ||
|
|
8feea02f68 | ||
|
|
939e4f4d48 | ||
|
|
a401ff32d9 | ||
|
|
84e7fc60c2 | ||
|
|
6821887263 | ||
|
|
8f8ceb0597 | ||
|
|
deb2403c23 | ||
|
|
d65c722ef0 | ||
|
|
1bdc1409e4 | ||
|
|
467eca6c14 | ||
|
|
da3abb7fb7 | ||
|
|
a8a818225e | ||
|
|
5e650869f2 | ||
|
|
6e06d82b1a |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -48,3 +48,5 @@ filcnaplo/ios/Podfile.lock
|
||||
key.properties
|
||||
|
||||
.flutter-plugins*
|
||||
filcnaplo/ios/Flutter/flutter_export_environment 4.sh
|
||||
filcnaplo/ios/Flutter/Generated 4.xcconfig
|
||||
|
||||
29
.vscode/launch.json
vendored
29
.vscode/launch.json
vendored
@@ -10,17 +10,16 @@
|
||||
"--dart-define=APPVER=$(cat pubspec.yaml | grep version: | cut -d' ' -f2 | cut -d+ -f1)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "filcnaplo release",
|
||||
"cwd": "filcnaplo release",
|
||||
"request": "launch",
|
||||
"type": "dart",
|
||||
"flutterMode": "release",
|
||||
"program": "lib/main.dart",
|
||||
"toolArgs": [
|
||||
"--dart-define=APPVER=$(cat pubspec.yaml | grep version: | cut -d' ' -f2 | cut -d+ -f1)"
|
||||
]
|
||||
},
|
||||
// {
|
||||
// "name": "filcnaplo release",
|
||||
// "cwd": "filcnaplo release",
|
||||
// "request": "launch",
|
||||
// "type": "dart",
|
||||
// "program": "lib/main.dart",
|
||||
// "toolArgs": [
|
||||
// "--dart-define=APPVER=$(cat pubspec.yaml | grep version: | cut -d' ' -f2 | cut -d+ -f1)"
|
||||
// ]
|
||||
// },
|
||||
{
|
||||
"name": "Flutter",
|
||||
"program": "lib/main.dart",
|
||||
@@ -28,6 +27,14 @@
|
||||
"request": "launch",
|
||||
"type": "dart",
|
||||
"flutterMode": "debug"
|
||||
},
|
||||
{
|
||||
"name": "Flutter (release)",
|
||||
"program": "lib/main.dart",
|
||||
"cwd": "filcnaplo",
|
||||
"request": "launch",
|
||||
"type": "dart",
|
||||
"flutterMode": "release"
|
||||
}
|
||||
]
|
||||
}
|
||||
678
LICENSE
678
LICENSE
@@ -1,29 +1,661 @@
|
||||
BSD 3-Clause License
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (c) 2023, reFilc
|
||||
All rights reserved.
|
||||
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.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
Preamble
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
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.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
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.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
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.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. 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/>.
|
||||
|
||||
18
README.md
18
README.md
@@ -3,7 +3,7 @@
|
||||
<h1 align=center><b>reFilc</b></h1>
|
||||
</p>
|
||||
|
||||
#### Nem hivatalos e-napló alkalmazás az eKRÉTA rendszerhez - tanulóktól, tanulóknak.
|
||||
#### Nem hivatalos e-napló alkalmazás az e-KRÉTA rendszerhez - tanulóktól, tanulóknak.
|
||||
|
||||
[](https://github.com/refilc/naplo/releases) [](https://dc.refilc.hu)
|
||||
|
||||
@@ -35,10 +35,18 @@ Az összes (ugyan azon verzióhoz tartozó) contribution meg fog jelenni a relea
|
||||
|
||||
-------
|
||||
|
||||
# Developers
|
||||
# Team
|
||||
|
||||
**annon:** a Filc napló készítője (ez az app a Filcen alapul)
|
||||
**kima:** head developer / project manager
|
||||
|
||||
**kima, mog, WolfY:** fő fejlesztők
|
||||
**Reiner, pdf, Pearoo, Zizi:** community- and project manager / developer
|
||||
|
||||
**Regő, Pearoo:** weboldal design és community management
|
||||
**vrolandd, TMarccci:** head developer
|
||||
|
||||
**dwe., xou, SebRHQ:** designer
|
||||
|
||||
**Péter:** video editor
|
||||
|
||||
**annon:** a régi Filc Napló fejlesztője (ez az app, ha bár sokban változott, alapjaiban a Filc-re épül)
|
||||
|
||||
<sup>Ez a projekt egy fork; az eredeti projektet megtaláljátok itt: [filc/naplo-archive](https://github.com/filc/naplo-archive) (köszi, annon)</sup>
|
||||
|
||||
@@ -26,6 +26,11 @@ import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
import hu.refilc.naplo.database.DBManager;
|
||||
import hu.refilc.naplo.MainActivity;
|
||||
@@ -247,71 +252,61 @@ public class WidgetTimetable extends HomeWidgetProvider {
|
||||
}
|
||||
|
||||
public static List<JSONArray> genJsonDays(Context context) {
|
||||
List<JSONArray> gen_days = new ArrayList<>();
|
||||
List<JSONArray> genDays = new ArrayList<>();
|
||||
Map<String, JSONArray> dayMap = new HashMap<>();
|
||||
|
||||
DBManager dbManager = new DBManager(context.getApplicationContext());
|
||||
|
||||
try {
|
||||
dbManager.open();
|
||||
Cursor ct = dbManager.fetchTimetable();
|
||||
dbManager.close();
|
||||
|
||||
if(ct.getCount() == 0) {
|
||||
return gen_days;
|
||||
if (ct.getCount() == 0) {
|
||||
return genDays;
|
||||
}
|
||||
|
||||
JSONObject fecthtt = new JSONObject(ct.getString(0));
|
||||
JSONObject fetchedTimetable = new JSONObject(ct.getString(0));
|
||||
String currentWeek = String.valueOf(Week.current().id());
|
||||
JSONArray week = fetchedTimetable.getJSONArray(currentWeek);
|
||||
|
||||
JSONArray dayArray = new JSONArray();
|
||||
String currday = "";
|
||||
|
||||
String currweek = String.valueOf(Week.current().id());
|
||||
|
||||
JSONArray week = fecthtt.getJSONArray(currweek);
|
||||
|
||||
for (int i=0; i < week.length(); i++)
|
||||
{
|
||||
// Organize lessons into dates
|
||||
for (int i = 0; i < week.length(); i++) {
|
||||
try {
|
||||
if(i == 0) currday = week.getJSONObject(0).getString("Datum");
|
||||
JSONObject oraObj = week.getJSONObject(i);
|
||||
|
||||
if(!currday.equals(oraObj.getString("Datum"))) {
|
||||
gen_days.add(dayArray);
|
||||
currday = week.getJSONObject(i).getString("Datum");
|
||||
dayArray = new JSONArray();
|
||||
}
|
||||
|
||||
dayArray.put(oraObj);
|
||||
if(i == week.length() - 1) {
|
||||
gen_days.add(dayArray);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
JSONObject entry = week.getJSONObject(i);
|
||||
String date = entry.getString("Datum");
|
||||
dayMap.computeIfAbsent(date, k -> new JSONArray()).put(entry);
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
genDays.addAll(dayMap.values());
|
||||
|
||||
// Sort the 'genDays' list of JSON based on the start time of the first entry
|
||||
genDays.sort((day1, day2) -> {
|
||||
try {
|
||||
// Extract the start time of the first entry in each day's JSON
|
||||
String startTime1 = day1.getJSONObject(0).getString("KezdetIdopont");
|
||||
String startTime2 = day2.getJSONObject(0).getString("KezdetIdopont");
|
||||
// Compare the start times and return the result for sorting
|
||||
return startTime1.compareTo(startTime2);
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
return 0;
|
||||
}
|
||||
});
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
dbManager.close();
|
||||
}
|
||||
|
||||
Collections.sort(gen_days, new Comparator<JSONArray>() {
|
||||
|
||||
public int compare(JSONArray a, JSONArray b) {
|
||||
long valA = 0;
|
||||
long valB = 0;
|
||||
|
||||
try {
|
||||
valA = (long) new DateTime( a.getJSONObject(0).getString("Datum")).getMillis();
|
||||
valB = (long) new DateTime( b.getJSONObject(0).getString("Datum")).getMillis();
|
||||
}
|
||||
catch (JSONException ignored) {
|
||||
}
|
||||
|
||||
return (int) (valA - valB);
|
||||
}
|
||||
});
|
||||
|
||||
return gen_days;
|
||||
return genDays;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static String zeroPad(int value, int padding){
|
||||
StringBuilder b = new StringBuilder();
|
||||
b.append(value);
|
||||
|
||||
@@ -335,10 +335,12 @@ public class WidgetTimetableDataProvider implements RemoteViewsService.RemoteVie
|
||||
|
||||
public Lesson jsonToLesson(JSONObject json) {
|
||||
try {
|
||||
String name = json.getString("Nev");
|
||||
name = name.substring(0, 1).toUpperCase() + name.substring(1); // Capitalize name
|
||||
return new Lesson(
|
||||
json.getJSONObject("Allapot").getString("Nev"),
|
||||
!json.getString("Oraszam").equals("null") ? json.getString("Oraszam") : "+",
|
||||
json.getString("Nev"),
|
||||
name,
|
||||
json.getString("Tema"),
|
||||
json.getString("TeremNeve"),
|
||||
new DateTime(json.getString("KezdetIdopont")).getMillis(),
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
// This is a generated file; do not edit or check into version control.
|
||||
FLUTTER_ROOT=/Users/kima/development/flutter
|
||||
FLUTTER_APPLICATION_PATH=/Users/kima/Documents/refilc/app/naplo/filcnaplo
|
||||
COCOAPODS_PARALLEL_CODE_SIGN=true
|
||||
FLUTTER_TARGET=/Users/kima/Documents/refilc/app/naplo/filcnaplo/lib/main.dart
|
||||
FLUTTER_BUILD_DIR=build
|
||||
FLUTTER_BUILD_NAME=3.5.1
|
||||
FLUTTER_BUILD_NUMBER=197
|
||||
EXCLUDED_ARCHS[sdk=iphonesimulator*]=i386
|
||||
EXCLUDED_ARCHS[sdk=iphoneos*]=armv7
|
||||
DART_DEFINES=RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ==,RkxVVFRFUl9XRUJfQ0FOVkFTS0lUX1VSTD1odHRwczovL3d3dy5nc3RhdGljLmNvbS9mbHV0dGVyLWNhbnZhc2tpdC9iNGZiMTEyMTRkZDJkZGE2Y2UwMTJkZDk4ZWE0OThlOWU4YjkxMjYyLw==
|
||||
DART_OBFUSCATION=false
|
||||
TRACK_WIDGET_CREATION=true
|
||||
TREE_SHAKE_ICONS=false
|
||||
PACKAGE_CONFIG=/Users/kima/Documents/refilc/app/naplo/filcnaplo/.dart_tool/package_config.json
|
||||
@@ -1,15 +0,0 @@
|
||||
// This is a generated file; do not edit or check into version control.
|
||||
FLUTTER_ROOT=/Users/kima/development/flutter
|
||||
FLUTTER_APPLICATION_PATH=/Users/kima/Documents/refilc/app/naplo/filcnaplo
|
||||
COCOAPODS_PARALLEL_CODE_SIGN=true
|
||||
FLUTTER_TARGET=/Users/kima/Documents/refilc/app/naplo/filcnaplo/lib/main.dart
|
||||
FLUTTER_BUILD_DIR=build
|
||||
FLUTTER_BUILD_NAME=4.1.0
|
||||
FLUTTER_BUILD_NUMBER=213
|
||||
EXCLUDED_ARCHS[sdk=iphonesimulator*]=i386
|
||||
EXCLUDED_ARCHS[sdk=iphoneos*]=armv7
|
||||
DART_DEFINES=RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ==,RkxVVFRFUl9XRUJfQ0FOVkFTS0lUX1VSTD1odHRwczovL3d3dy5nc3RhdGljLmNvbS9mbHV0dGVyLWNhbnZhc2tpdC8yYTM0MDFjOWJiYjVhOWE5YWVjNzRkNGY3MzVkMThhOWRkM2ViZjJkLw==
|
||||
DART_OBFUSCATION=false
|
||||
TRACK_WIDGET_CREATION=true
|
||||
TREE_SHAKE_ICONS=false
|
||||
PACKAGE_CONFIG=/Users/kima/Documents/refilc/app/naplo/filcnaplo/.dart_tool/package_config.json
|
||||
@@ -1,14 +0,0 @@
|
||||
#!/bin/sh
|
||||
# This is a generated file; do not edit or check into version control.
|
||||
export "FLUTTER_ROOT=/Users/kima/development/flutter"
|
||||
export "FLUTTER_APPLICATION_PATH=/Users/kima/Documents/refilc/app/naplo/filcnaplo"
|
||||
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
|
||||
export "FLUTTER_TARGET=/Users/kima/Documents/refilc/app/naplo/filcnaplo/lib/main.dart"
|
||||
export "FLUTTER_BUILD_DIR=build"
|
||||
export "FLUTTER_BUILD_NAME=4.1.0"
|
||||
export "FLUTTER_BUILD_NUMBER=213"
|
||||
export "DART_DEFINES=RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ==,RkxVVFRFUl9XRUJfQ0FOVkFTS0lUX1VSTD1odHRwczovL3d3dy5nc3RhdGljLmNvbS9mbHV0dGVyLWNhbnZhc2tpdC8yYTM0MDFjOWJiYjVhOWE5YWVjNzRkNGY3MzVkMThhOWRkM2ViZjJkLw=="
|
||||
export "DART_OBFUSCATION=false"
|
||||
export "TRACK_WIDGET_CREATION=true"
|
||||
export "TREE_SHAKE_ICONS=false"
|
||||
export "PACKAGE_CONFIG=/Users/kima/Documents/refilc/app/naplo/filcnaplo/.dart_tool/package_config.json"
|
||||
@@ -1,10 +1,13 @@
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:filcnaplo/models/ad.dart';
|
||||
import 'package:filcnaplo/models/config.dart';
|
||||
import 'package:filcnaplo/models/news.dart';
|
||||
import 'package:filcnaplo/models/release.dart';
|
||||
import 'package:filcnaplo/models/settings.dart';
|
||||
import 'package:filcnaplo/models/shared_theme.dart';
|
||||
import 'package:filcnaplo/models/supporter.dart';
|
||||
import 'package:filcnaplo_kreta_api/models/school.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
@@ -12,14 +15,18 @@ import 'package:http/http.dart' as http;
|
||||
import 'package:connectivity_plus/connectivity_plus.dart';
|
||||
|
||||
class FilcAPI {
|
||||
// API base
|
||||
static const baseUrl = "https://api.refilc.hu";
|
||||
|
||||
// Public API
|
||||
static const schoolList = "https://api.refilc.hu/v1/public/school-list";
|
||||
static const news = "https://api.refilc.hu/v1/public/news";
|
||||
static const supporters = "https://api.refilc.hu/v1/public/supporters";
|
||||
static const schoolList = "$baseUrl/v1/public/school-list";
|
||||
static const news = "$baseUrl/v1/public/news";
|
||||
static const supporters = "$baseUrl/v1/public/supporters";
|
||||
|
||||
// Private API
|
||||
static const config = "https://api.refilc.hu/v1/private/config";
|
||||
static const reportApi = "https://api.refilc.hu/v1/private/crash-report";
|
||||
static const ads = "$baseUrl/v1/private/ads";
|
||||
static const config = "$baseUrl/v1/private/config";
|
||||
static const reportApi = "$baseUrl/v1/private/crash-report";
|
||||
static const premiumApi = "https://api.filcnaplo.hu/premium/activate";
|
||||
// static const premiumScopesApi = "https://api.filcnaplo.hu/premium/scopes";
|
||||
|
||||
@@ -27,6 +34,12 @@ class FilcAPI {
|
||||
static const repo = "refilc/naplo";
|
||||
static const releases = "https://api.github.com/repos/$repo/releases";
|
||||
|
||||
// Share API
|
||||
static const themeShare = "$baseUrl/v2/shared/theme/add";
|
||||
static const themeGet = "$baseUrl/v2/shared/theme/get";
|
||||
static const allThemes = "$themeGet/all";
|
||||
static const themeByID = "$themeGet/";
|
||||
|
||||
static Future<bool> checkConnectivity() async =>
|
||||
(await Connectivity().checkConnectivity()) != ConnectivityResult.none;
|
||||
|
||||
@@ -117,6 +130,24 @@ class FilcAPI {
|
||||
return null;
|
||||
}
|
||||
|
||||
static Future<List<Ad>?> getAds() async {
|
||||
try {
|
||||
http.Response res = await http.get(Uri.parse(ads));
|
||||
|
||||
if (res.statusCode == 200) {
|
||||
return (jsonDecode(res.body) as List)
|
||||
.cast<Map>()
|
||||
.map((e) => Ad.fromJson(e))
|
||||
.toList();
|
||||
} else {
|
||||
throw "HTTP ${res.statusCode}: ${res.body}";
|
||||
}
|
||||
} on Exception catch (error, stacktrace) {
|
||||
log("ERROR: FilcAPI.getAds: $error $stacktrace");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static Future<List<Release>?> getReleases() async {
|
||||
try {
|
||||
http.Response res = await http.get(Uri.parse(releases));
|
||||
@@ -163,6 +194,46 @@ class FilcAPI {
|
||||
log("ERROR: FilcAPI.sendReport: $error $stacktrace");
|
||||
}
|
||||
}
|
||||
|
||||
// sharing
|
||||
static Future<void> addSharedTheme(SharedTheme theme) async {
|
||||
try {
|
||||
theme.json.remove('json');
|
||||
theme.json['is_public'] = theme.isPublic.toString();
|
||||
theme.json['background_color'] = theme.backgroundColor.value.toString();
|
||||
theme.json['panels_color'] = theme.panelsColor.value.toString();
|
||||
theme.json['accent_color'] = theme.accentColor.value.toString();
|
||||
|
||||
http.Response res = await http.post(
|
||||
Uri.parse(themeShare),
|
||||
body: theme.json,
|
||||
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
|
||||
);
|
||||
|
||||
if (res.statusCode != 201) {
|
||||
throw "HTTP ${res.statusCode}: ${res.body}";
|
||||
}
|
||||
|
||||
log('Shared theme successfully with ID: ${theme.id}');
|
||||
} on Exception catch (error, stacktrace) {
|
||||
log("ERROR: FilcAPI.addSharedTheme: $error $stacktrace");
|
||||
}
|
||||
}
|
||||
|
||||
static Future<Map?> getSharedTheme(String id) async {
|
||||
try {
|
||||
http.Response res = await http.get(Uri.parse(themeByID + id));
|
||||
|
||||
if (res.statusCode == 200) {
|
||||
return (jsonDecode(res.body) as Map);
|
||||
} else {
|
||||
throw "HTTP ${res.statusCode}: ${res.body}";
|
||||
}
|
||||
} on Exception catch (error, stacktrace) {
|
||||
log("ERROR: FilcAPI.addSharedTheme: $error $stacktrace");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
class ErrorReport {
|
||||
|
||||
@@ -27,7 +27,7 @@ enum LoginState {
|
||||
failed,
|
||||
normal,
|
||||
inProgress,
|
||||
success
|
||||
success,
|
||||
}
|
||||
|
||||
Nonce getNonce(String nonce, String username, String instituteCode) {
|
||||
@@ -39,7 +39,7 @@ Nonce getNonce(String nonce, String username, String instituteCode) {
|
||||
return nonceEncoder;
|
||||
}
|
||||
|
||||
Future loginApi({
|
||||
Future loginAPI({
|
||||
required String username,
|
||||
required String password,
|
||||
required String instituteCode,
|
||||
@@ -121,7 +121,7 @@ Future loginApi({
|
||||
|
||||
return LoginState.success;
|
||||
} catch (error) {
|
||||
print("ERROR: loginApi: $error");
|
||||
print("ERROR: loginAPI: $error");
|
||||
// maybe check debug mode
|
||||
// ScaffoldMessenger.of(context).showSnackBar(SnackBar(content: Text("ERROR: $error")));
|
||||
return LoginState.failed;
|
||||
|
||||
29
filcnaplo/lib/api/providers/ad_provider.dart
Normal file
29
filcnaplo/lib/api/providers/ad_provider.dart
Normal file
@@ -0,0 +1,29 @@
|
||||
import 'package:filcnaplo/api/client.dart';
|
||||
import 'package:filcnaplo/models/ad.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class AdProvider extends ChangeNotifier {
|
||||
// private
|
||||
late List<Ad> _ads;
|
||||
bool get available => _ads.isNotEmpty;
|
||||
|
||||
// public
|
||||
List<Ad> get ads => _ads;
|
||||
|
||||
AdProvider({
|
||||
List<Ad> initialAds = const [],
|
||||
required BuildContext context,
|
||||
}) {
|
||||
_ads = List.castFrom(initialAds);
|
||||
}
|
||||
|
||||
Future<void> fetch() async {
|
||||
_ads = await FilcAPI.getAds() ?? [];
|
||||
_ads.sort((a, b) => -a.date.compareTo(b.date));
|
||||
|
||||
// check for new ads
|
||||
if (_ads.isNotEmpty) {
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ import 'dart:math';
|
||||
|
||||
import 'package:dynamic_color/dynamic_color.dart';
|
||||
import 'package:filcnaplo/api/client.dart';
|
||||
import 'package:filcnaplo/api/providers/ad_provider.dart';
|
||||
import 'package:filcnaplo/api/providers/live_card_provider.dart';
|
||||
import 'package:filcnaplo/api/providers/news_provider.dart';
|
||||
import 'package:filcnaplo/api/providers/database_provider.dart';
|
||||
@@ -13,6 +14,7 @@ import 'package:filcnaplo/theme/theme.dart';
|
||||
import 'package:filcnaplo_kreta_api/client/client.dart';
|
||||
import 'package:filcnaplo_kreta_api/providers/grade_provider.dart';
|
||||
import 'package:filcnaplo_premium/providers/goal_provider.dart';
|
||||
import 'package:filcnaplo_premium/providers/share_provider.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -98,47 +100,78 @@ class App extends StatelessWidget {
|
||||
Provider<KretaClient>(create: (_) => kreta),
|
||||
Provider<DatabaseProvider>(create: (context) => database),
|
||||
ChangeNotifierProvider<ThemeModeObserver>(
|
||||
create: (context) =>
|
||||
ThemeModeObserver(initialTheme: settings.theme)),
|
||||
create: (context) => ThemeModeObserver(
|
||||
initialTheme: settings.theme,
|
||||
),
|
||||
),
|
||||
ChangeNotifierProvider<NewsProvider>(
|
||||
create: (context) => NewsProvider(context: context)),
|
||||
create: (context) => NewsProvider(context: context),
|
||||
),
|
||||
ChangeNotifierProvider<UpdateProvider>(
|
||||
create: (context) => UpdateProvider(context: context)),
|
||||
create: (context) => UpdateProvider(context: context),
|
||||
),
|
||||
ChangeNotifierProvider<AdProvider>(
|
||||
create: (context) => AdProvider(context: context),
|
||||
),
|
||||
|
||||
// user data (kreten) providers
|
||||
ChangeNotifierProvider<GradeProvider>(
|
||||
create: (_) => GradeProvider(
|
||||
settings: settings,
|
||||
user: user,
|
||||
database: database,
|
||||
kreta: kreta)),
|
||||
create: (_) => GradeProvider(
|
||||
settings: settings,
|
||||
user: user,
|
||||
database: database,
|
||||
kreta: kreta,
|
||||
),
|
||||
),
|
||||
ChangeNotifierProvider<TimetableProvider>(create: (_) => timetable),
|
||||
ChangeNotifierProvider<ExamProvider>(
|
||||
create: (context) => ExamProvider(context: context)),
|
||||
create: (context) => ExamProvider(context: context),
|
||||
),
|
||||
ChangeNotifierProvider<HomeworkProvider>(
|
||||
create: (context) =>
|
||||
HomeworkProvider(context: context, database: database)),
|
||||
create: (context) => HomeworkProvider(
|
||||
context: context,
|
||||
database: database,
|
||||
),
|
||||
),
|
||||
ChangeNotifierProvider<MessageProvider>(
|
||||
create: (context) => MessageProvider(context: context)),
|
||||
create: (context) => MessageProvider(context: context),
|
||||
),
|
||||
ChangeNotifierProvider<NoteProvider>(
|
||||
create: (context) => NoteProvider(context: context)),
|
||||
create: (context) => NoteProvider(context: context),
|
||||
),
|
||||
ChangeNotifierProvider<EventProvider>(
|
||||
create: (context) => EventProvider(context: context)),
|
||||
create: (context) => EventProvider(context: context),
|
||||
),
|
||||
ChangeNotifierProvider<AbsenceProvider>(
|
||||
create: (context) => AbsenceProvider(context: context)),
|
||||
create: (context) => AbsenceProvider(context: context),
|
||||
),
|
||||
|
||||
// other providers
|
||||
ChangeNotifierProvider<GradeCalculatorProvider>(
|
||||
create: (_) => GradeCalculatorProvider(
|
||||
settings: settings,
|
||||
user: user,
|
||||
database: database,
|
||||
kreta: kreta)),
|
||||
create: (_) => GradeCalculatorProvider(
|
||||
settings: settings,
|
||||
user: user,
|
||||
database: database,
|
||||
kreta: kreta,
|
||||
),
|
||||
),
|
||||
ChangeNotifierProvider<LiveCardProvider>(
|
||||
create: (context) =>
|
||||
LiveCardProvider(timetable: timetable, settings: settings)),
|
||||
create: (context) => LiveCardProvider(
|
||||
timetable: timetable,
|
||||
settings: settings,
|
||||
),
|
||||
),
|
||||
ChangeNotifierProvider<GoalProvider>(
|
||||
create: (context) => GoalProvider(database: database, user: user)),
|
||||
create: (context) => GoalProvider(
|
||||
database: database,
|
||||
user: user,
|
||||
),
|
||||
),
|
||||
ChangeNotifierProvider<ShareProvider>(
|
||||
create: (context) => ShareProvider(
|
||||
user: user,
|
||||
),
|
||||
),
|
||||
],
|
||||
child: Consumer<ThemeModeObserver>(
|
||||
builder: (context, themeMode, child) {
|
||||
|
||||
@@ -9,7 +9,7 @@ import 'package:permission_handler/permission_handler.dart';
|
||||
class StorageHelper {
|
||||
static Future<bool> write(String path, Uint8List data) async {
|
||||
try {
|
||||
if (await Permission.storage.request().isGranted) {
|
||||
if (await Permission.manageExternalStorage.request().isGranted) {
|
||||
await File(path).writeAsBytes(data);
|
||||
return true;
|
||||
} else {
|
||||
@@ -34,5 +34,6 @@ class StorageHelper {
|
||||
}
|
||||
|
||||
return downloads;
|
||||
// return (await getTemporaryDirectory()).path;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,10 +33,10 @@ extension UpdateHelper on Release {
|
||||
|
||||
updateCallback(-1, UpdateState.installing);
|
||||
|
||||
var permStatus =
|
||||
var installPerms =
|
||||
(await Permission.manageExternalStorage.request().isGranted &&
|
||||
await Permission.requestInstallPackages.request().isGranted);
|
||||
if (permStatus) {
|
||||
if (installPerms) {
|
||||
var result = await OpenFile.open(apk.path);
|
||||
|
||||
if (result.type != ResultType.done) {
|
||||
|
||||
38
filcnaplo/lib/models/ad.dart
Normal file
38
filcnaplo/lib/models/ad.dart
Normal file
@@ -0,0 +1,38 @@
|
||||
class Ad {
|
||||
String title;
|
||||
String description;
|
||||
String author;
|
||||
Uri? logoUrl;
|
||||
bool overridePremium;
|
||||
DateTime date;
|
||||
DateTime expireDate;
|
||||
Uri launchUrl;
|
||||
|
||||
Ad({
|
||||
required this.title,
|
||||
required this.description,
|
||||
required this.author,
|
||||
this.logoUrl,
|
||||
this.overridePremium = false,
|
||||
required this.date,
|
||||
required this.expireDate,
|
||||
required this.launchUrl,
|
||||
});
|
||||
|
||||
factory Ad.fromJson(Map json) {
|
||||
print(json);
|
||||
return Ad(
|
||||
title: json['title'] ?? 'Ad',
|
||||
description: json['description'] ?? '',
|
||||
author: json['author'] ?? 'reFilc',
|
||||
logoUrl: json['logo_url'] != null ? Uri.parse(json['logo_url']) : null,
|
||||
overridePremium: json['override_premium'] ?? false,
|
||||
date:
|
||||
json['date'] != null ? DateTime.parse(json['date']) : DateTime.now(),
|
||||
expireDate: json['expire_date'] != null
|
||||
? DateTime.parse(json['expire_date'])
|
||||
: DateTime.now(),
|
||||
launchUrl: Uri.parse(json['launch_url'] ?? 'https://refilc.hu'),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -3,18 +3,22 @@ import 'dart:io';
|
||||
class Config {
|
||||
String _userAgent;
|
||||
Map? json;
|
||||
static const String _version = String.fromEnvironment("APPVER", defaultValue: "2.2.0");
|
||||
static const String _version =
|
||||
String.fromEnvironment("APPVER", defaultValue: "3.0.4");
|
||||
|
||||
Config({required String userAgent, this.json}) : _userAgent = userAgent;
|
||||
|
||||
factory Config.fromJson(Map json) {
|
||||
return Config(
|
||||
userAgent: json["user_agent"] ?? "hu.refilc.naplo/\$0/\$1/\$2",
|
||||
userAgent: json["user_agent"] ?? "hu.ekreta.student/\$0/\$1/\$2",
|
||||
json: json,
|
||||
);
|
||||
}
|
||||
|
||||
String get userAgent => _userAgent.replaceAll("\$0", _version).replaceAll("\$1", platform).replaceAll("\$2", "0");
|
||||
String get userAgent => _userAgent
|
||||
.replaceAll("\$0", _version)
|
||||
.replaceAll("\$1", platform)
|
||||
.replaceAll("\$2", "0");
|
||||
|
||||
static String get platform {
|
||||
if (Platform.isAndroid) {
|
||||
|
||||
@@ -313,7 +313,7 @@ class SettingsProvider extends ChangeNotifier {
|
||||
bellDelay: 0,
|
||||
gradeOpeningFun: true,
|
||||
iconPack: IconPack.cupertino,
|
||||
customAccentColor: const Color(0xff20AC9B),
|
||||
customAccentColor: const Color(0xff3D7BF4),
|
||||
customBackgroundColor: const Color(0xff000000),
|
||||
customHighlightColor: const Color(0xff222222),
|
||||
premiumScopes: [PremiumScopes.all],
|
||||
|
||||
33
filcnaplo/lib/models/shared_theme.dart
Normal file
33
filcnaplo/lib/models/shared_theme.dart
Normal file
@@ -0,0 +1,33 @@
|
||||
import 'dart:ui';
|
||||
|
||||
class SharedTheme {
|
||||
Map json;
|
||||
String id;
|
||||
bool isPublic;
|
||||
String nickname;
|
||||
Color backgroundColor;
|
||||
Color panelsColor;
|
||||
Color accentColor;
|
||||
|
||||
SharedTheme({
|
||||
required this.json,
|
||||
required this.id,
|
||||
this.isPublic = false,
|
||||
this.nickname = 'Anonymous',
|
||||
required this.backgroundColor,
|
||||
required this.panelsColor,
|
||||
required this.accentColor,
|
||||
});
|
||||
|
||||
factory SharedTheme.fromJson(Map json) {
|
||||
return SharedTheme(
|
||||
json: json,
|
||||
id: json['public_id'],
|
||||
isPublic: json['is_public'] ?? false,
|
||||
nickname: json['nickname'] ?? 'Anonymous',
|
||||
backgroundColor: Color(json['background_color']),
|
||||
panelsColor: Color(json['panels_color']),
|
||||
accentColor: Color(json['accent_color']),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'package:filcnaplo/api/providers/ad_provider.dart';
|
||||
import 'package:filcnaplo/api/providers/update_provider.dart';
|
||||
import 'package:filcnaplo/models/settings.dart';
|
||||
import 'package:filcnaplo/ui/date_widget.dart';
|
||||
@@ -14,6 +15,7 @@ import 'package:filcnaplo/ui/filter/widgets/lessons.dart' as lesson_filter;
|
||||
import 'package:filcnaplo/ui/filter/widgets/update.dart' as update_filter;
|
||||
import 'package:filcnaplo/ui/filter/widgets/missed_exams.dart'
|
||||
as missed_exam_filter;
|
||||
import 'package:filcnaplo/ui/filter/widgets/ads.dart' as ad_filter;
|
||||
import 'package:filcnaplo_kreta_api/models/week.dart';
|
||||
import 'package:filcnaplo_kreta_api/providers/absence_provider.dart';
|
||||
import 'package:filcnaplo_kreta_api/providers/event_provider.dart';
|
||||
@@ -50,7 +52,8 @@ enum FilterType {
|
||||
lessons,
|
||||
updates,
|
||||
certifications,
|
||||
missedExams
|
||||
missedExams,
|
||||
ads,
|
||||
}
|
||||
|
||||
Future<List<DateWidget>> getFilterWidgets(FilterType activeData,
|
||||
@@ -65,6 +68,7 @@ Future<List<DateWidget>> getFilterWidgets(FilterType activeData,
|
||||
final eventProvider = Provider.of<EventProvider>(context);
|
||||
final updateProvider = Provider.of<UpdateProvider>(context);
|
||||
final settingsProvider = Provider.of<SettingsProvider>(context);
|
||||
final adProvider = Provider.of<AdProvider>(context);
|
||||
|
||||
List<DateWidget> items = [];
|
||||
|
||||
@@ -82,6 +86,7 @@ Future<List<DateWidget>> getFilterWidgets(FilterType activeData,
|
||||
getFilterWidgets(FilterType.updates, context: context),
|
||||
getFilterWidgets(FilterType.certifications, context: context),
|
||||
getFilterWidgets(FilterType.missedExams, context: context),
|
||||
getFilterWidgets(FilterType.ads, context: context),
|
||||
]);
|
||||
items = all.expand((x) => x).toList();
|
||||
|
||||
@@ -89,9 +94,9 @@ Future<List<DateWidget>> getFilterWidgets(FilterType activeData,
|
||||
|
||||
// Grades
|
||||
case FilterType.grades:
|
||||
if(!settingsProvider.gradeOpeningFun) {
|
||||
gradeProvider.seenAll();
|
||||
}
|
||||
if (!settingsProvider.gradeOpeningFun) {
|
||||
gradeProvider.seenAll();
|
||||
}
|
||||
items = grade_filter.getWidgets(
|
||||
gradeProvider.grades, gradeProvider.lastSeenDate);
|
||||
if (settingsProvider.gradeOpeningFun) {
|
||||
@@ -164,6 +169,13 @@ Future<List<DateWidget>> getFilterWidgets(FilterType activeData,
|
||||
items = missed_exam_filter
|
||||
.getWidgets(timetableProvider.getWeek(Week.current()) ?? []);
|
||||
break;
|
||||
|
||||
// Ads
|
||||
case FilterType.ads:
|
||||
if (adProvider.available) {
|
||||
items = ad_filter.getWidgets(adProvider.ads);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return items;
|
||||
}
|
||||
|
||||
25
filcnaplo/lib/ui/filter/widgets/ads.dart
Normal file
25
filcnaplo/lib/ui/filter/widgets/ads.dart
Normal file
@@ -0,0 +1,25 @@
|
||||
import 'package:filcnaplo/models/ad.dart';
|
||||
import 'package:filcnaplo/ui/date_widget.dart';
|
||||
import 'package:filcnaplo_mobile_ui/common/widgets/ad/ad_viewable.dart'
|
||||
as mobile;
|
||||
|
||||
List<DateWidget> getWidgets(List<Ad> providerAds) {
|
||||
List<DateWidget> items = [];
|
||||
|
||||
if (providerAds.isNotEmpty) {
|
||||
for (var ad in providerAds) {
|
||||
if (ad.date.isBefore(DateTime.now()) &&
|
||||
ad.expireDate.isAfter(DateTime.now())) {
|
||||
providerAds.sort((a, b) => -a.date.compareTo(b.date));
|
||||
|
||||
items.add(DateWidget(
|
||||
key: ad.description,
|
||||
date: ad.date,
|
||||
widget: mobile.AdViewable(ad),
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return items;
|
||||
}
|
||||
@@ -44,7 +44,8 @@ class LessonTile extends StatelessWidget {
|
||||
fillLeading = true;
|
||||
}
|
||||
|
||||
if (lesson.substituteTeacher?.name != "") {
|
||||
if (lesson.substituteTeacher != null &&
|
||||
lesson.substituteTeacher?.name != "") {
|
||||
fill = true;
|
||||
accent = AppColors.of(context).yellow;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ description: "Nem hivatalos e-napló alkalmazás az e-Kréta rendszerhez"
|
||||
homepage: https://refilc.hu
|
||||
publish_to: "none"
|
||||
|
||||
version: 4.2.0+220
|
||||
version: 4.2.3+223
|
||||
|
||||
environment:
|
||||
sdk: ">=2.17.0 <3.0.0"
|
||||
|
||||
@@ -5,7 +5,6 @@ import 'package:elegant_notification/elegant_notification.dart';
|
||||
import 'package:elegant_notification/resources/arrays.dart';
|
||||
import 'package:filcnaplo/api/client.dart';
|
||||
import 'package:filcnaplo/api/login.dart';
|
||||
import 'package:filcnaplo/theme/colors/colors.dart';
|
||||
import 'package:filcnaplo_mobile_ui/screens/login/login_button.dart';
|
||||
import 'package:filcnaplo_mobile_ui/screens/login/login_input.dart';
|
||||
import 'package:filcnaplo_mobile_ui/screens/login/school_input/school_input.dart';
|
||||
@@ -14,6 +13,17 @@ import 'package:flutter/services.dart';
|
||||
import 'package:flutter_acrylic/flutter_acrylic.dart';
|
||||
import 'login_screen.i18n.dart';
|
||||
|
||||
const LinearGradient _backgroundGradient = LinearGradient(
|
||||
colors: [
|
||||
Color.fromARGB(255, 0, 0, 0),
|
||||
Color.fromARGB(255, 23, 77, 185),
|
||||
Color.fromARGB(255, 7, 42, 112),
|
||||
],
|
||||
begin: Alignment(-0.8, -2),
|
||||
end: Alignment(0.8, 1.0),
|
||||
stops: [-1.0, 0.0, 1.0],
|
||||
);
|
||||
|
||||
class LoginScreen extends StatefulWidget {
|
||||
const LoginScreen({Key? key, this.back = false}) : super(key: key);
|
||||
|
||||
@@ -70,226 +80,254 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
}
|
||||
});
|
||||
|
||||
if (Platform.isMacOS) Window.getTitlebarHeight().then((value) => setState(() => topInset = value));
|
||||
if (Platform.isMacOS) {
|
||||
Window.getTitlebarHeight()
|
||||
.then((value) => setState(() => topInset = value));
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.of(context).filc,
|
||||
body: SafeArea(
|
||||
child: Stack(
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
// App logo
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 24.0),
|
||||
child: ClipRect(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(left: 12.0, right: 12.0, bottom: 32.0),
|
||||
child: SizedBox(
|
||||
width: 82.0,
|
||||
height: 82.0,
|
||||
// Png shadow *hack*
|
||||
child: Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 8.0),
|
||||
child: Opacity(child: Image.asset("assets/icons/ic_splash.png", color: Colors.black), opacity: 0.3),
|
||||
),
|
||||
BackdropFilter(
|
||||
filter: ImageFilter.blur(sigmaX: 6.0, sigmaY: 6.0),
|
||||
child: Image.asset("assets/icons/ic_splash.png"),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
// Inputs
|
||||
SizedBox(
|
||||
width: 400.0,
|
||||
child: AutofillGroup(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// Username
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 6.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"username".i18n,
|
||||
maxLines: 1,
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 14.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
"usernameHint".i18n,
|
||||
maxLines: 1,
|
||||
textAlign: TextAlign.right,
|
||||
style: const TextStyle(
|
||||
color: Colors.white54,
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 12.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 12.0),
|
||||
child: LoginInput(
|
||||
style: LoginInputStyle.username,
|
||||
controller: usernameController,
|
||||
),
|
||||
),
|
||||
|
||||
// Password
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 6.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"password".i18n,
|
||||
maxLines: 1,
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 14.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
"passwordHint".i18n,
|
||||
maxLines: 1,
|
||||
textAlign: TextAlign.right,
|
||||
style: const TextStyle(
|
||||
color: Colors.white54,
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 12.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 12.0),
|
||||
child: LoginInput(
|
||||
style: LoginInputStyle.password,
|
||||
controller: passwordController,
|
||||
),
|
||||
),
|
||||
|
||||
// School
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 6.0),
|
||||
child: Text(
|
||||
"school".i18n,
|
||||
maxLines: 1,
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 14.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
SchoolInput(
|
||||
scroll: _scrollController,
|
||||
controller: schoolController,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
// Log in button
|
||||
SizedBox(
|
||||
width: 400.0,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 42.0),
|
||||
child: Visibility(
|
||||
child: LoginButton(
|
||||
child: Text("login".i18n,
|
||||
maxLines: 1,
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 15.0,
|
||||
)),
|
||||
onPressed: () => _loginApi(context: context),
|
||||
),
|
||||
visible: _loginState != LoginState.inProgress,
|
||||
replacement: const Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 6.0),
|
||||
child: Center(
|
||||
child: CircularProgressIndicator(
|
||||
valueColor: AlwaysStoppedAnimation<Color>(Colors.white),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
if (_loginState == LoginState.missingFields || _loginState == LoginState.invalidGrant || _loginState == LoginState.failed)
|
||||
body: Container(
|
||||
decoration: BoxDecoration(
|
||||
gradient: _backgroundGradient,
|
||||
),
|
||||
child: SafeArea(
|
||||
child: Stack(
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
// App logo
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 8.0),
|
||||
child: Text(
|
||||
["missing_fields", "invalid_grant", "error"][_loginState.index].i18n,
|
||||
style: const TextStyle(color: Colors.red, fontWeight: FontWeight.w500),
|
||||
padding: const EdgeInsets.only(bottom: 24.0),
|
||||
child: ClipRect(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
left: 12.0, right: 12.0, bottom: 32.0),
|
||||
child: SizedBox(
|
||||
width: 100.0,
|
||||
height: 100.0,
|
||||
// Png shadow *hack*
|
||||
child: Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 8.0),
|
||||
child: Opacity(
|
||||
child: Image.asset(
|
||||
"assets/icons/ic_splash.png",
|
||||
color: Colors.black),
|
||||
opacity: 0.3),
|
||||
),
|
||||
BackdropFilter(
|
||||
filter: ImageFilter.blur(
|
||||
sigmaX: 6.0, sigmaY: 6.0),
|
||||
child: Image.asset(
|
||||
"assets/icons/ic_splash.png"),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
// Inputs
|
||||
SizedBox(
|
||||
width: 400.0,
|
||||
child: AutofillGroup(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// Username
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 6.0),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"username".i18n,
|
||||
maxLines: 1,
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 14.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
"usernameHint".i18n,
|
||||
maxLines: 1,
|
||||
textAlign: TextAlign.right,
|
||||
style: const TextStyle(
|
||||
color: Colors.white54,
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 12.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 12.0),
|
||||
child: LoginInput(
|
||||
style: LoginInputStyle.username,
|
||||
controller: usernameController,
|
||||
),
|
||||
),
|
||||
|
||||
// Password
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 6.0),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"password".i18n,
|
||||
maxLines: 1,
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 14.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
"passwordHint".i18n,
|
||||
maxLines: 1,
|
||||
textAlign: TextAlign.right,
|
||||
style: const TextStyle(
|
||||
color: Colors.white54,
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 12.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 12.0),
|
||||
child: LoginInput(
|
||||
style: LoginInputStyle.password,
|
||||
controller: passwordController,
|
||||
),
|
||||
),
|
||||
|
||||
// School
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 6.0),
|
||||
child: Text(
|
||||
"school".i18n,
|
||||
maxLines: 1,
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 14.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
SchoolInput(
|
||||
scroll: _scrollController,
|
||||
controller: schoolController,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
// Log in button
|
||||
SizedBox(
|
||||
width: 400.0,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 42.0),
|
||||
child: Visibility(
|
||||
child: LoginButton(
|
||||
child: Text("login".i18n,
|
||||
maxLines: 1,
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 15.0,
|
||||
)),
|
||||
onPressed: () => _loginAPI(context: context),
|
||||
),
|
||||
visible: _loginState != LoginState.inProgress,
|
||||
replacement: const Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 6.0),
|
||||
child: Center(
|
||||
child: CircularProgressIndicator(
|
||||
valueColor: AlwaysStoppedAnimation<Color>(
|
||||
Colors.white),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
if (_loginState == LoginState.missingFields ||
|
||||
_loginState == LoginState.invalidGrant ||
|
||||
_loginState == LoginState.failed)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 8.0),
|
||||
child: Text(
|
||||
[
|
||||
"missing_fields",
|
||||
"invalid_grant",
|
||||
"error"
|
||||
][_loginState.index]
|
||||
.i18n,
|
||||
style: const TextStyle(
|
||||
color: Colors.red,
|
||||
fontWeight: FontWeight.w500),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
if (showBack)
|
||||
Container(
|
||||
alignment: Alignment.topLeft,
|
||||
padding: EdgeInsets.only(left: 16.0, top: topInset),
|
||||
child: const ClipOval(
|
||||
child: Material(
|
||||
type: MaterialType.transparency,
|
||||
child: BackButton(color: Colors.white),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
if (showBack)
|
||||
Container(
|
||||
alignment: Alignment.topLeft,
|
||||
padding: EdgeInsets.only(left: 16.0, top: topInset),
|
||||
child: const ClipOval(
|
||||
child: Material(
|
||||
type: MaterialType.transparency,
|
||||
child: BackButton(color: Colors.white),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void _loginApi({required BuildContext context}) {
|
||||
void _loginAPI({required BuildContext context}) {
|
||||
String username = usernameController.text;
|
||||
String password = passwordController.text;
|
||||
|
||||
if (username == "" || password == "" || schoolController.selectedSchool == null) {
|
||||
if (username == "" ||
|
||||
password == "" ||
|
||||
schoolController.selectedSchool == null) {
|
||||
return setState(() => _loginState = LoginState.missingFields);
|
||||
}
|
||||
|
||||
setState(() => _loginState = LoginState.inProgress);
|
||||
|
||||
loginApi(
|
||||
loginAPI(
|
||||
username: username,
|
||||
password: password,
|
||||
instituteCode: schoolController.selectedSchool!.instituteCode,
|
||||
@@ -313,7 +351,8 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
).show(context);
|
||||
},
|
||||
onSuccess: () {
|
||||
Navigator.of(context).pushNamedAndRemoveUntil("login_to_navigation", (_) => false);
|
||||
Navigator.of(context)
|
||||
.pushNamedAndRemoveUntil("login_to_navigation", (_) => false);
|
||||
}).then((res) => setState(() => _loginState = res));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,11 @@ class KretaAPI {
|
||||
KretaApiEndpoints.groupAverages +
|
||||
"?oktatasiNevelesiFeladatUid=" +
|
||||
uid;
|
||||
static String averages(String iss, String uid) =>
|
||||
BaseKreta.kreta(iss) +
|
||||
KretaApiEndpoints.averages +
|
||||
"?oktatasiNevelesiFeladatUid=" +
|
||||
uid;
|
||||
static String timetable(String iss, {DateTime? start, DateTime? end}) =>
|
||||
BaseKreta.kreta(iss) +
|
||||
KretaApiEndpoints.timetable +
|
||||
@@ -90,6 +95,7 @@ class KretaApiEndpoints {
|
||||
static const groups = "/ellenorzo/V3/Sajat/OsztalyCsoportok";
|
||||
static const groupAverages =
|
||||
"/ellenorzo/V3/Sajat/Ertekelesek/Atlagok/OsztalyAtlagok";
|
||||
static const averages = "/ellenorzo/V3/idk";
|
||||
static const timetable = "/ellenorzo/V3/Sajat/OrarendElemek";
|
||||
static const exams = "/ellenorzo/V3/Sajat/BejelentettSzamonkeresek";
|
||||
static const homework = "/ellenorzo/V3/Sajat/HaziFeladatok";
|
||||
|
||||
@@ -62,45 +62,45 @@ class Lesson {
|
||||
|
||||
factory Lesson.fromJson(Map json) {
|
||||
return Lesson(
|
||||
id: json["Uid"] ?? "",
|
||||
status:
|
||||
json["Allapot"] != null ? Category.fromJson(json["Allapot"]) : null,
|
||||
date: json["Datum"] != null
|
||||
? DateTime.parse(json["Datum"]).toLocal()
|
||||
: DateTime(0),
|
||||
subject: Subject.fromJson(json["Tantargy"] ?? {}),
|
||||
lessonIndex: json["Oraszam"] != null ? json["Oraszam"].toString() : "+",
|
||||
lessonYearIndex: json["OraEvesSorszama"],
|
||||
substituteTeacher:
|
||||
Teacher.fromString((json["HelyettesTanarNeve"] ?? "").trim()),
|
||||
teacher: Teacher.fromString((json["TanarNeve"] ?? "").trim()),
|
||||
homeworkEnabled: json["IsTanuloHaziFeladatEnabled"] ?? false,
|
||||
start: json["KezdetIdopont"] != null
|
||||
? DateTime.parse(json["KezdetIdopont"]).toLocal()
|
||||
: DateTime(0),
|
||||
studentPresence: json["TanuloJelenlet"] != null
|
||||
? (json["TanuloJelenlet"]["Nev"] ?? "") == "Hianyzas"
|
||||
? false
|
||||
: true
|
||||
: true,
|
||||
end: json["VegIdopont"] != null
|
||||
? DateTime.parse(json["VegIdopont"]).toLocal()
|
||||
: DateTime(0),
|
||||
homeworkId: json["HaziFeladatUid"] ?? "",
|
||||
exam: json["BejelentettSzamonkeresUid"] ?? "",
|
||||
type: json["Tipus"] != null ? Category.fromJson(json["Tipus"]) : null,
|
||||
description: json["Tema"] ?? "",
|
||||
room: ((json["TeremNeve"] ?? "").split("_").join(" ") as String)
|
||||
.replaceAll(RegExp(r" ?terem ?", caseSensitive: false), ""),
|
||||
groupName: json["OsztalyCsoport"] != null
|
||||
? json["OsztalyCsoport"]["Nev"] ?? ""
|
||||
: "",
|
||||
name: json["Nev"] ?? "",
|
||||
online: json["IsDigitalisOra"] ?? false,
|
||||
isEmpty: json['isEmpty'] ?? false,
|
||||
json: json,
|
||||
isSeen: false
|
||||
);
|
||||
id: json["Uid"] ?? "",
|
||||
status:
|
||||
json["Allapot"] != null ? Category.fromJson(json["Allapot"]) : null,
|
||||
date: json["Datum"] != null
|
||||
? DateTime.parse(json["Datum"]).toLocal()
|
||||
: DateTime(0),
|
||||
subject: Subject.fromJson(json["Tantargy"] ?? {}),
|
||||
lessonIndex: json["Oraszam"] != null ? json["Oraszam"].toString() : "+",
|
||||
lessonYearIndex: json["OraEvesSorszama"],
|
||||
substituteTeacher: json["HelyettesTanarNeve"] != null
|
||||
? Teacher.fromString((json["HelyettesTanarNeve"]).trim())
|
||||
: null,
|
||||
teacher: Teacher.fromString((json["TanarNeve"] ?? "").trim()),
|
||||
homeworkEnabled: json["IsTanuloHaziFeladatEnabled"] ?? false,
|
||||
start: json["KezdetIdopont"] != null
|
||||
? DateTime.parse(json["KezdetIdopont"]).toLocal()
|
||||
: DateTime(0),
|
||||
studentPresence: json["TanuloJelenlet"] != null
|
||||
? (json["TanuloJelenlet"]["Nev"] ?? "") == "Hianyzas"
|
||||
? false
|
||||
: true
|
||||
: true,
|
||||
end: json["VegIdopont"] != null
|
||||
? DateTime.parse(json["VegIdopont"]).toLocal()
|
||||
: DateTime(0),
|
||||
homeworkId: json["HaziFeladatUid"] ?? "",
|
||||
exam: json["BejelentettSzamonkeresUid"] ?? "",
|
||||
type: json["Tipus"] != null ? Category.fromJson(json["Tipus"]) : null,
|
||||
description: json["Tema"] ?? "",
|
||||
room: ((json["TeremNeve"] ?? "").split("_").join(" ") as String)
|
||||
.replaceAll(RegExp(r" ?terem ?", caseSensitive: false), ""),
|
||||
groupName: json["OsztalyCsoport"] != null
|
||||
? json["OsztalyCsoport"]["Nev"] ?? ""
|
||||
: "",
|
||||
name: json["Nev"] ?? "",
|
||||
online: json["IsDigitalisOra"] ?? false,
|
||||
isEmpty: json['isEmpty'] ?? false,
|
||||
json: json,
|
||||
isSeen: false);
|
||||
}
|
||||
|
||||
int? getFloor() {
|
||||
|
||||
@@ -73,8 +73,16 @@ class HomeworkProvider with ChangeNotifier {
|
||||
if (user == null) throw "Cannot fetch Homework for User null";
|
||||
|
||||
String iss = user.instituteCode;
|
||||
List? homeworkJson = await Provider.of<KretaClient>(_context, listen: false)
|
||||
.getAPI(KretaAPI.homework(iss, start: from));
|
||||
|
||||
List? homeworkJson = [];
|
||||
|
||||
try {
|
||||
homeworkJson = await Provider.of<KretaClient>(_context, listen: false)
|
||||
.getAPI(KretaAPI.homework(iss, start: from));
|
||||
} catch (e) {
|
||||
// error fetcing homework (unknown error)
|
||||
}
|
||||
|
||||
if (homeworkJson == null) throw "Cannot fetch Homework for User ${user.id}";
|
||||
|
||||
List<Homework> homework = [];
|
||||
|
||||
53
filcnaplo_mobile_ui/lib/common/widgets/ad/ad_tile.dart
Normal file
53
filcnaplo_mobile_ui/lib/common/widgets/ad/ad_tile.dart
Normal file
@@ -0,0 +1,53 @@
|
||||
import 'package:filcnaplo/models/ad.dart';
|
||||
import 'package:filcnaplo/theme/colors/colors.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:filcnaplo_mobile_ui/common/panel/panel_button.dart';
|
||||
import 'package:flutter_feather_icons/flutter_feather_icons.dart';
|
||||
|
||||
class AdTile extends StatelessWidget {
|
||||
const AdTile(this.ad, {Key? key, this.onTap, this.padding}) : super(key: key);
|
||||
|
||||
final Ad ad;
|
||||
final Function()? onTap;
|
||||
final EdgeInsetsGeometry? padding;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
print('geic');
|
||||
print(ad);
|
||||
|
||||
return Padding(
|
||||
padding: padding ?? const EdgeInsets.symmetric(horizontal: 8.0),
|
||||
child: PanelButton(
|
||||
padding: const EdgeInsets.only(left: 8.0, right: 16.0),
|
||||
onPressed: onTap,
|
||||
title: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
ad.title,
|
||||
),
|
||||
Text(
|
||||
ad.description,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppColors.of(context).text.withOpacity(0.7),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
leading: ad.logoUrl != null
|
||||
? Image.network(
|
||||
ad.logoUrl.toString(),
|
||||
errorBuilder: (context, error, stackTrace) {
|
||||
ad.logoUrl = null;
|
||||
return const SizedBox();
|
||||
},
|
||||
)
|
||||
: null,
|
||||
trailing: const Icon(FeatherIcons.externalLink),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
22
filcnaplo_mobile_ui/lib/common/widgets/ad/ad_viewable.dart
Normal file
22
filcnaplo_mobile_ui/lib/common/widgets/ad/ad_viewable.dart
Normal file
@@ -0,0 +1,22 @@
|
||||
import 'package:filcnaplo/models/ad.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
import 'ad_tile.dart';
|
||||
|
||||
class AdViewable extends StatelessWidget {
|
||||
const AdViewable(this.ad, {Key? key}) : super(key: key);
|
||||
|
||||
final Ad ad;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AdTile(
|
||||
ad,
|
||||
onTap: () => launchUrl(
|
||||
ad.launchUrl,
|
||||
mode: LaunchMode.externalApplication,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -22,7 +22,8 @@ class LessonView extends StatelessWidget {
|
||||
|
||||
if (RegExp(r'\d').hasMatch(lesson.lessonIndex)) lessonIndexTrailing = ".";
|
||||
|
||||
if (lesson.substituteTeacher?.name != "") {
|
||||
if (lesson.substituteTeacher != null &&
|
||||
lesson.substituteTeacher?.name != "") {
|
||||
accent = AppColors.of(context).yellow;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,8 @@ class UpdateView extends StatefulWidget {
|
||||
|
||||
final Release release;
|
||||
|
||||
static void show(Release release, {required BuildContext context}) => showBottomCard(context: context, child: UpdateView(release));
|
||||
static void show(Release release, {required BuildContext context}) =>
|
||||
showBottomCard(context: context, child: UpdateView(release));
|
||||
|
||||
@override
|
||||
_UpdateViewState createState() => _UpdateViewState();
|
||||
@@ -45,7 +46,8 @@ class _UpdateViewState extends State<UpdateView> {
|
||||
children: [
|
||||
Text(
|
||||
"new_update".i18n,
|
||||
style: const TextStyle(fontWeight: FontWeight.w700, fontSize: 18.0),
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.w700, fontSize: 18.0),
|
||||
),
|
||||
Text(
|
||||
"${widget.release.version}",
|
||||
@@ -75,7 +77,7 @@ class _UpdateViewState extends State<UpdateView> {
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
),
|
||||
child: SizedBox(
|
||||
height: 125.0,
|
||||
height: 200.0,
|
||||
child: Markdown(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12.0),
|
||||
physics: const BouncingScrollPhysics(),
|
||||
@@ -91,21 +93,30 @@ class _UpdateViewState extends State<UpdateView> {
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
if (state == UpdateState.downloading || state == UpdateState.preparing)
|
||||
if (state == UpdateState.downloading ||
|
||||
state == UpdateState.preparing)
|
||||
Container(
|
||||
height: 18.0,
|
||||
width: 18.0,
|
||||
margin: const EdgeInsets.only(right: 8.0),
|
||||
child: CircularProgressIndicator(
|
||||
value: progress > 0.05 ? progress : null,
|
||||
color: ColorUtils.foregroundColor(AppColors.of(context).filc),
|
||||
color: ColorUtils.foregroundColor(
|
||||
AppColors.of(context).filc),
|
||||
),
|
||||
),
|
||||
Text(["download".i18n, "downloading".i18n, "downloading".i18n, "installing".i18n][state.index].toUpperCase()),
|
||||
Text([
|
||||
"download".i18n,
|
||||
"downloading".i18n,
|
||||
"downloading".i18n,
|
||||
"installing".i18n
|
||||
][state.index]
|
||||
.toUpperCase()),
|
||||
],
|
||||
),
|
||||
backgroundColor: AppColors.of(context).filc,
|
||||
onPressed: state == UpdateState.none ? () => downloadPrecheck() : null,
|
||||
onPressed:
|
||||
state == UpdateState.none ? () => downloadPrecheck() : null,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -113,7 +124,8 @@ class _UpdateViewState extends State<UpdateView> {
|
||||
);
|
||||
}
|
||||
|
||||
String fmtSize() => "${(widget.release.downloads.first.size / 1024 / 1024).toStringAsFixed(1)} MB";
|
||||
String fmtSize() =>
|
||||
"${(widget.release.downloads.first.size / 1024 / 1024).toStringAsFixed(1)} MB";
|
||||
|
||||
void downloadPrecheck() {
|
||||
final status = Provider.of<StatusProvider>(context, listen: false);
|
||||
@@ -157,6 +169,7 @@ class _UpdateViewState extends State<UpdateView> {
|
||||
.then((_) => Navigator.of(context).maybePop())
|
||||
.catchError((error, stackTrace) {
|
||||
if (mounted) {
|
||||
Navigator.of(context).maybePop();
|
||||
ScaffoldMessenger.of(context).showSnackBar(CustomSnackBar(
|
||||
context: context,
|
||||
content: Text("error".i18n),
|
||||
|
||||
@@ -5,6 +5,8 @@ import 'package:filcnaplo/api/providers/database_provider.dart';
|
||||
import 'package:filcnaplo/api/providers/user_provider.dart';
|
||||
import 'package:filcnaplo/models/settings.dart';
|
||||
import 'package:filcnaplo/utils/format.dart';
|
||||
// import 'package:filcnaplo_kreta_api/client/api.dart';
|
||||
// import 'package:filcnaplo_kreta_api/client/client.dart';
|
||||
import 'package:filcnaplo_kreta_api/providers/grade_provider.dart';
|
||||
import 'package:filcnaplo/helpers/average_helper.dart';
|
||||
import 'package:filcnaplo/helpers/subject.dart';
|
||||
|
||||
@@ -2,6 +2,8 @@ import 'dart:math';
|
||||
|
||||
import 'package:auto_size_text/auto_size_text.dart';
|
||||
import 'package:filcnaplo/api/providers/update_provider.dart';
|
||||
// import 'package:filcnaplo_kreta_api/client/api.dart';
|
||||
// import 'package:filcnaplo_kreta_api/client/client.dart';
|
||||
import 'package:filcnaplo_kreta_api/providers/grade_provider.dart';
|
||||
import 'package:filcnaplo/api/providers/user_provider.dart';
|
||||
import 'package:filcnaplo/theme/colors/colors.dart';
|
||||
@@ -112,6 +114,18 @@ class _GradesPageState extends State<GradesPage> {
|
||||
} else {
|
||||
tiles.insert(
|
||||
0,
|
||||
// TextButton(
|
||||
// onPressed: () async {
|
||||
// var url = KretaAPI.averages(
|
||||
// user.instituteCode!,
|
||||
// user.id!,
|
||||
// );
|
||||
// print(url);
|
||||
// var res = await Provider.of<KretaClient>(context, listen: false)
|
||||
// .getAPI(url);
|
||||
// print(res);
|
||||
// },
|
||||
// child: Text('test')),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 24.0),
|
||||
child: Empty(subtitle: "empty".i18n),
|
||||
|
||||
@@ -4,7 +4,13 @@ import 'package:flutter_feather_icons/flutter_feather_icons.dart';
|
||||
enum LoginInputStyle { username, password, school }
|
||||
|
||||
class LoginInput extends StatefulWidget {
|
||||
const LoginInput({Key? key, required this.style, this.controller, this.focusNode, this.onClear}) : super(key: key);
|
||||
const LoginInput(
|
||||
{Key? key,
|
||||
required this.style,
|
||||
this.controller,
|
||||
this.focusNode,
|
||||
this.onClear})
|
||||
: super(key: key);
|
||||
|
||||
final Function()? onClear;
|
||||
final LoginInputStyle style;
|
||||
@@ -59,8 +65,10 @@ class _LoginInputState extends State<LoginInput> {
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
borderSide: const BorderSide(width: 0, color: Colors.transparent),
|
||||
),
|
||||
suffixIconConstraints: const BoxConstraints(maxHeight: 42.0, maxWidth: 48.0),
|
||||
suffixIcon: widget.style == LoginInputStyle.password || widget.style == LoginInputStyle.school
|
||||
suffixIconConstraints:
|
||||
const BoxConstraints(maxHeight: 42.0, maxWidth: 48.0),
|
||||
suffixIcon: widget.style == LoginInputStyle.password ||
|
||||
widget.style == LoginInputStyle.school
|
||||
? ClipOval(
|
||||
child: Material(
|
||||
type: MaterialType.transparency,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// import 'dart:async';
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:filcnaplo/api/client.dart';
|
||||
@@ -42,6 +43,8 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
stops: [-1.0, 0.0, 1.0],
|
||||
);
|
||||
|
||||
late String tempUsername = '';
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
@@ -250,7 +253,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 15.0,
|
||||
)),
|
||||
onPressed: () => _loginApi(context: context),
|
||||
onPressed: () => _loginAPI(context: context),
|
||||
),
|
||||
visible: _loginState != LoginState.inProgress,
|
||||
replacement: const Padding(
|
||||
@@ -275,7 +278,10 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
][_loginState.index]
|
||||
.i18n,
|
||||
style: const TextStyle(
|
||||
color: Colors.red, fontWeight: FontWeight.w500),
|
||||
color: Colors.red,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
const Spacer()
|
||||
@@ -288,35 +294,54 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
);
|
||||
}
|
||||
|
||||
void _loginApi({required BuildContext context}) {
|
||||
void _loginAPI({required BuildContext context}) {
|
||||
String username = usernameController.text;
|
||||
String password = passwordController.text;
|
||||
|
||||
tempUsername = username;
|
||||
|
||||
if (username == "" ||
|
||||
password == "" ||
|
||||
schoolController.selectedSchool == null) {
|
||||
return setState(() => _loginState = LoginState.missingFields);
|
||||
}
|
||||
|
||||
setState(() => _loginState = LoginState.inProgress);
|
||||
void _callAPI() {
|
||||
loginAPI(
|
||||
username: username,
|
||||
password: password,
|
||||
instituteCode: schoolController.selectedSchool!.instituteCode,
|
||||
context: context,
|
||||
onLogin: (user) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(CustomSnackBar(
|
||||
context: context,
|
||||
brightness: Brightness.light,
|
||||
content: Text("welcome".i18n.fill([user.name]),
|
||||
overflow: TextOverflow.ellipsis),
|
||||
));
|
||||
},
|
||||
onSuccess: () {
|
||||
ScaffoldMessenger.of(context).hideCurrentSnackBar();
|
||||
setSystemChrome(context);
|
||||
Navigator.of(context).pushReplacementNamed("login_to_navigation");
|
||||
}).then(
|
||||
(res) => setState(() {
|
||||
// if (res == LoginState.invalidGrant &&
|
||||
// tempUsername.replaceAll(username, '').length <= 3) {
|
||||
// tempUsername = username + ' ';
|
||||
// Timer(
|
||||
// const Duration(milliseconds: 500),
|
||||
// () => _loginAPI(context: context),
|
||||
// );
|
||||
// // _loginAPI(context: context);
|
||||
// } else {
|
||||
_loginState = res;
|
||||
// }
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
loginApi(
|
||||
username: username,
|
||||
password: password,
|
||||
instituteCode: schoolController.selectedSchool!.instituteCode,
|
||||
context: context,
|
||||
onLogin: (user) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(CustomSnackBar(
|
||||
context: context,
|
||||
brightness: Brightness.light,
|
||||
content: Text("welcome".i18n.fill([user.name]),
|
||||
overflow: TextOverflow.ellipsis),
|
||||
));
|
||||
},
|
||||
onSuccess: () {
|
||||
ScaffoldMessenger.of(context).hideCurrentSnackBar();
|
||||
setSystemChrome(context);
|
||||
Navigator.of(context).pushReplacementNamed("login_to_navigation");
|
||||
}).then((res) => setState(() => _loginState = res));
|
||||
setState(() => _loginState = LoginState.inProgress);
|
||||
_callAPI();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,8 @@ extension Localization on String {
|
||||
"login": "Log in",
|
||||
"welcome": "Welcome, %s!",
|
||||
"missing_fields": "Missing Fields!",
|
||||
"invalid_grant": "Invalid Username/Password!",
|
||||
"invalid_grant":
|
||||
"Invalid Username/Password! (Try adding spaces after Username)",
|
||||
"error": "Failed to log in.",
|
||||
"schools_error": "Failed to get schools."
|
||||
},
|
||||
@@ -25,7 +26,8 @@ extension Localization on String {
|
||||
"login": "Belépés",
|
||||
"welcome": "Üdv, %s!",
|
||||
"missing_fields": "Hiányzó adatok!",
|
||||
"invalid_grant": "Helytelen Felhasználónév/Jelszó!",
|
||||
"invalid_grant":
|
||||
"Helytelen Felhasználónév/Jelszó! (Próbálj szóközöket írni a Felhasználónév után)",
|
||||
"error": "Sikertelen bejelentkezés.",
|
||||
"schools_error": "Nem sikerült lekérni az iskolákat."
|
||||
},
|
||||
|
||||
@@ -12,51 +12,48 @@ class SchoolInputTile extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
child: GestureDetector(
|
||||
onPanDown: (e) {
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
onTap!();
|
||||
},
|
||||
child: InkWell(
|
||||
onTapDown: (e) {},
|
||||
borderRadius: BorderRadius.circular(6.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(6.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// School name
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 4.0),
|
||||
child: Text(
|
||||
school.name,
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: const TextStyle(fontWeight: FontWeight.w600),
|
||||
borderRadius: BorderRadius.circular(6.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(6.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// School name
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 4.0),
|
||||
child: Text(
|
||||
school.name,
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: const TextStyle(fontWeight: FontWeight.w600),
|
||||
),
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
// School id
|
||||
Expanded(
|
||||
child: Text(
|
||||
school.instituteCode,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
// School id
|
||||
Expanded(
|
||||
child: Text(
|
||||
school.instituteCode,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
// School city
|
||||
Expanded(
|
||||
child: Text(
|
||||
school.city,
|
||||
textAlign: TextAlign.right,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
// School city
|
||||
Expanded(
|
||||
child: Text(
|
||||
school.city,
|
||||
textAlign: TextAlign.right,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -26,6 +26,7 @@ import 'package:home_widget/home_widget.dart';
|
||||
import 'package:wtf_sliding_sheet/wtf_sliding_sheet.dart';
|
||||
import 'package:background_fetch/background_fetch.dart';
|
||||
import 'package:filcnaplo_premium/providers/goal_provider.dart';
|
||||
import 'package:filcnaplo/api/providers/ad_provider.dart';
|
||||
|
||||
class NavigationScreen extends StatefulWidget {
|
||||
const NavigationScreen({Key? key}) : super(key: key);
|
||||
@@ -48,6 +49,7 @@ class NavigationScreenState extends State<NavigationScreen>
|
||||
late GoalProvider goalProvider;
|
||||
late UpdateProvider updateProvider;
|
||||
late GradeProvider gradeProvicer;
|
||||
late AdProvider adProvider;
|
||||
|
||||
NavigatorState? get navigator => _navigatorState.currentState;
|
||||
|
||||
@@ -176,6 +178,10 @@ class NavigationScreenState extends State<NavigationScreen>
|
||||
updateProvider = Provider.of<UpdateProvider>(context, listen: false);
|
||||
updateProvider.fetch();
|
||||
|
||||
// get advertisements
|
||||
adProvider = Provider.of<AdProvider>(context, listen: false);
|
||||
adProvider.fetch();
|
||||
|
||||
// initial sync
|
||||
syncAll(context);
|
||||
setupQuickActions();
|
||||
|
||||
@@ -46,6 +46,7 @@ dependencies:
|
||||
rounded_expansion_tile:
|
||||
git:
|
||||
url: https://github.com/kimaah/rounded_expansion_tile.git
|
||||
go_router: ^10.1.2
|
||||
|
||||
dev_dependencies:
|
||||
flutter_lints: ^1.0.0
|
||||
|
||||
58
filcnaplo_premium/lib/providers/share_provider.dart
Normal file
58
filcnaplo_premium/lib/providers/share_provider.dart
Normal file
@@ -0,0 +1,58 @@
|
||||
import 'package:filcnaplo/api/client.dart';
|
||||
import 'package:filcnaplo/api/providers/user_provider.dart';
|
||||
import 'package:filcnaplo/models/settings.dart';
|
||||
import 'package:filcnaplo/models/shared_theme.dart';
|
||||
// import 'package:filcnaplo/models/shared_theme.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:uuid/uuid.dart';
|
||||
|
||||
class ShareProvider extends ChangeNotifier {
|
||||
final UserProvider _user;
|
||||
|
||||
ShareProvider({
|
||||
required UserProvider user,
|
||||
}) : _user = user;
|
||||
|
||||
// Future<void> shareTheme({required SharedTheme theme}) async {
|
||||
|
||||
// }
|
||||
Future<SharedTheme> shareCurrentTheme(BuildContext context,
|
||||
{bool isPublic = false, bool shareNick = true}) async {
|
||||
final SettingsProvider settings =
|
||||
Provider.of<SettingsProvider>(context, listen: false);
|
||||
|
||||
Map themeJson = {
|
||||
'public_id': const Uuid().v4(),
|
||||
'is_public': isPublic,
|
||||
'nickname': shareNick ? _user.nickname : 'Anonymous',
|
||||
'background_color': (settings.customBackgroundColor ??
|
||||
SettingsProvider.defaultSettings().customBackgroundColor)
|
||||
?.value,
|
||||
'panels_color': (settings.customHighlightColor ??
|
||||
SettingsProvider.defaultSettings().customHighlightColor)
|
||||
?.value,
|
||||
'accent_color': (settings.customAccentColor ??
|
||||
SettingsProvider.defaultSettings().customAccentColor)
|
||||
?.value ??
|
||||
const Color(0xFF3D7BF4).value,
|
||||
};
|
||||
|
||||
SharedTheme theme = SharedTheme.fromJson(themeJson);
|
||||
FilcAPI.addSharedTheme(theme);
|
||||
|
||||
return theme;
|
||||
}
|
||||
|
||||
Future<SharedTheme?> getThemeById(BuildContext context,
|
||||
{required String id}) async {
|
||||
Map? themeJson = await FilcAPI.getSharedTheme(id);
|
||||
|
||||
if (themeJson != null) {
|
||||
SharedTheme theme = SharedTheme.fromJson(themeJson);
|
||||
return theme;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,9 @@
|
||||
|
||||
library hsv_picker;
|
||||
|
||||
import 'package:filcnaplo/models/shared_theme.dart';
|
||||
import 'package:filcnaplo_mobile_ui/common/custom_snack_bar.dart';
|
||||
import 'package:filcnaplo_premium/providers/share_provider.dart';
|
||||
import 'package:filcnaplo_premium/ui/mobile/flutter_colorpicker/block_picker.dart';
|
||||
import 'package:filcnaplo_premium/ui/mobile/flutter_colorpicker/palette.dart';
|
||||
import 'package:filcnaplo_premium/ui/mobile/flutter_colorpicker/utils.dart';
|
||||
@@ -17,6 +20,7 @@ import 'package:filcnaplo_premium/ui/mobile/settings/theme.i18n.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:filcnaplo/theme/colors/colors.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class FilcColorPicker extends StatefulWidget {
|
||||
const FilcColorPicker({
|
||||
@@ -48,6 +52,7 @@ class FilcColorPicker extends StatefulWidget {
|
||||
this.hexInputController,
|
||||
this.colorHistory,
|
||||
this.onHistoryChanged,
|
||||
required this.onThemeIdProvided,
|
||||
}) : super(key: key);
|
||||
|
||||
final CustomColorMode colorMode;
|
||||
@@ -70,12 +75,17 @@ class FilcColorPicker extends StatefulWidget {
|
||||
final TextEditingController? hexInputController;
|
||||
final List<Color>? colorHistory;
|
||||
final ValueChanged<List<Color>>? onHistoryChanged;
|
||||
final void Function(SharedTheme theme) onThemeIdProvided;
|
||||
|
||||
@override
|
||||
_FilcColorPickerState createState() => _FilcColorPickerState();
|
||||
}
|
||||
|
||||
class _FilcColorPickerState extends State<FilcColorPicker> {
|
||||
final idController = TextEditingController();
|
||||
|
||||
late final ShareProvider shareProvider;
|
||||
|
||||
HSVColor currentHsvColor = const HSVColor.fromAHSV(0.0, 0.0, 0.0, 0.0);
|
||||
List<Color> colorHistory = [];
|
||||
bool isAdvancedView = false;
|
||||
@@ -98,6 +108,7 @@ class _FilcColorPickerState extends State<FilcColorPicker> {
|
||||
if (widget.colorHistory != null && widget.onHistoryChanged != null) {
|
||||
colorHistory = widget.colorHistory ?? [];
|
||||
}
|
||||
shareProvider = Provider.of<ShareProvider>(context, listen: false);
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@@ -182,7 +193,8 @@ class _FilcColorPickerState extends State<FilcColorPicker> {
|
||||
widget.portraitOnly) {
|
||||
return Column(
|
||||
children: [
|
||||
if (widget.colorMode != CustomColorMode.theme)
|
||||
if (widget.colorMode != CustomColorMode.theme &&
|
||||
widget.colorMode != CustomColorMode.enterId)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 8.0),
|
||||
child: Column(
|
||||
@@ -215,7 +227,9 @@ class _FilcColorPickerState extends State<FilcColorPicker> {
|
||||
],
|
||||
),
|
||||
),
|
||||
if (isAdvancedView && widget.colorMode != CustomColorMode.theme)
|
||||
if (isAdvancedView &&
|
||||
widget.colorMode != CustomColorMode.theme &&
|
||||
widget.colorMode != CustomColorMode.enterId)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 6.0),
|
||||
child: ColorPickerInput(
|
||||
@@ -231,57 +245,105 @@ class _FilcColorPickerState extends State<FilcColorPicker> {
|
||||
embeddedText: false,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 70 * (widget.colorMode == CustomColorMode.theme ? 2 : 1),
|
||||
child: BlockPicker(
|
||||
pickerColor: Colors.red,
|
||||
layoutBuilder: (context, colors, child) {
|
||||
return GridView.count(
|
||||
shrinkWrap: true,
|
||||
crossAxisCount:
|
||||
widget.colorMode == CustomColorMode.theme ? 2 : 1,
|
||||
scrollDirection: Axis.horizontal,
|
||||
crossAxisSpacing: 15,
|
||||
physics: const BouncingScrollPhysics(),
|
||||
mainAxisSpacing: 15,
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 12.0, vertical: 8.0),
|
||||
children: List.generate(
|
||||
colors.toSet().length +
|
||||
(widget.colorMode == CustomColorMode.theme ? 1 : 0),
|
||||
(index) {
|
||||
if (widget.colorMode == CustomColorMode.theme) {
|
||||
if (index == 0) {
|
||||
return GestureDetector(
|
||||
onTap: () => widget.onColorChangeEnd(
|
||||
Colors.transparent,
|
||||
adaptive: true),
|
||||
child: ColorIndicator(
|
||||
HSVColor.fromColor(
|
||||
const Color.fromARGB(255, 255, 238, 177)),
|
||||
icon: CupertinoIcons.wand_stars,
|
||||
currentHsvColor: currentHsvColor,
|
||||
width: 30,
|
||||
height: 30,
|
||||
adaptive: true),
|
||||
if (widget.colorMode == CustomColorMode.enterId)
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsets.symmetric(vertical: 10.0, horizontal: 10.0),
|
||||
child: Column(
|
||||
children: [
|
||||
TextField(
|
||||
autocorrect: false,
|
||||
autofocus: true,
|
||||
onEditingComplete: () async {
|
||||
SharedTheme? theme = await shareProvider.getThemeById(
|
||||
context,
|
||||
id: idController.text.replaceAll(' ', ''),
|
||||
);
|
||||
|
||||
if (theme != null) {
|
||||
widget.onThemeIdProvided(theme);
|
||||
} else {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
CustomSnackBar(
|
||||
content: Text("theme_not_found".i18n,
|
||||
style: const TextStyle(color: Colors.white)),
|
||||
backgroundColor: AppColors.of(context).red,
|
||||
context: context,
|
||||
),
|
||||
);
|
||||
}
|
||||
index--;
|
||||
}
|
||||
return GestureDetector(
|
||||
onTap: () => widget.onColorChangeEnd(colors[index]),
|
||||
child: ColorIndicator(HSVColor.fromColor(colors[index]),
|
||||
currentHsvColor: currentHsvColor,
|
||||
width: 30,
|
||||
height: 30),
|
||||
);
|
||||
}),
|
||||
);
|
||||
},
|
||||
onColorChanged: (c) => {},
|
||||
},
|
||||
controller: idController,
|
||||
decoration: InputDecoration(
|
||||
hintText: 'theme_id'.i18n,
|
||||
),
|
||||
),
|
||||
// MaterialActionButton(
|
||||
// child: Row(
|
||||
// mainAxisSize: MainAxisSize.min,
|
||||
// children: [
|
||||
// Text('check_id'.i18n),
|
||||
// ],
|
||||
// ),
|
||||
// backgroundColor: AppColors.of(context).filc,
|
||||
// onPressed: () {},
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
if (widget.colorMode != CustomColorMode.theme)
|
||||
if (widget.colorMode != CustomColorMode.enterId)
|
||||
SizedBox(
|
||||
height: 70 * (widget.colorMode == CustomColorMode.theme ? 2 : 1),
|
||||
child: BlockPicker(
|
||||
pickerColor: Colors.red,
|
||||
layoutBuilder: (context, colors, child) {
|
||||
return GridView.count(
|
||||
shrinkWrap: true,
|
||||
crossAxisCount:
|
||||
widget.colorMode == CustomColorMode.theme ? 2 : 1,
|
||||
scrollDirection: Axis.horizontal,
|
||||
crossAxisSpacing: 15,
|
||||
physics: const BouncingScrollPhysics(),
|
||||
mainAxisSpacing: 15,
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 12.0, vertical: 8.0),
|
||||
children: List.generate(
|
||||
colors.toSet().length +
|
||||
(widget.colorMode == CustomColorMode.theme ? 1 : 0),
|
||||
(index) {
|
||||
if (widget.colorMode == CustomColorMode.theme) {
|
||||
if (index == 0) {
|
||||
return GestureDetector(
|
||||
onTap: () => widget.onColorChangeEnd(
|
||||
Colors.transparent,
|
||||
adaptive: true),
|
||||
child: ColorIndicator(
|
||||
HSVColor.fromColor(
|
||||
const Color.fromARGB(255, 255, 238, 177)),
|
||||
icon: CupertinoIcons.wand_stars,
|
||||
currentHsvColor: currentHsvColor,
|
||||
width: 30,
|
||||
height: 30,
|
||||
adaptive: true),
|
||||
);
|
||||
}
|
||||
index--;
|
||||
}
|
||||
return GestureDetector(
|
||||
onTap: () => widget.onColorChangeEnd(colors[index]),
|
||||
child: ColorIndicator(HSVColor.fromColor(colors[index]),
|
||||
currentHsvColor: currentHsvColor,
|
||||
width: 30,
|
||||
height: 30),
|
||||
);
|
||||
}),
|
||||
);
|
||||
},
|
||||
onColorChanged: (c) => {},
|
||||
),
|
||||
),
|
||||
if (widget.colorMode != CustomColorMode.theme &&
|
||||
widget.colorMode != CustomColorMode.enterId)
|
||||
Material(
|
||||
color: Colors.transparent,
|
||||
child: InkWell(
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'package:filcnaplo/api/providers/database_provider.dart';
|
||||
import 'package:filcnaplo/api/providers/user_provider.dart';
|
||||
import 'package:filcnaplo/theme/colors/colors.dart';
|
||||
import 'package:filcnaplo_kreta_api/models/subject.dart';
|
||||
import 'package:filcnaplo_mobile_ui/common/average_display.dart';
|
||||
import 'package:filcnaplo_premium/ui/mobile/goal_planner/goal_state_screen.i18n.dart';
|
||||
@@ -33,7 +34,7 @@ class GoalCompleteModal extends StatelessWidget {
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
color: Theme.of(context).colorScheme.background,
|
||||
borderRadius: BorderRadius.circular(20.0),
|
||||
),
|
||||
child: Column(
|
||||
@@ -79,19 +80,21 @@ class GoalCompleteModal extends StatelessWidget {
|
||||
Text(
|
||||
'congrats_title'.i18n,
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontSize: 27.0,
|
||||
fontWeight: FontWeight.w700,
|
||||
height: 1.1,
|
||||
height: 1.2,
|
||||
color: AppColors.of(context).text,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'goal_reached'.i18n.fill(['20']),
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontSize: 15.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
height: 1.1,
|
||||
color: AppColors.of(context).text,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 18.0),
|
||||
@@ -103,9 +106,10 @@ class GoalCompleteModal extends StatelessWidget {
|
||||
Text(
|
||||
'started_at'.i18n,
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontSize: 17.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppColors.of(context).text,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 5.0),
|
||||
@@ -119,9 +123,10 @@ class GoalCompleteModal extends StatelessWidget {
|
||||
averageDifference.toStringAsFixed(2) + '%',
|
||||
]),
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontSize: 17.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppColors.of(context).text,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -173,17 +178,17 @@ class GoalCompleteModal extends StatelessWidget {
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
color: const Color(0xFFF5FAF9),
|
||||
color: const Color.fromARGB(38, 131, 131, 131),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 8.0),
|
||||
child: Text(
|
||||
'later'.i18n,
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontSize: 18.0,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Color(0xFF01342D),
|
||||
color: AppColors.of(context).text,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
26
filcnaplo_premium/lib/ui/mobile/settings/share_theme.dart
Normal file
26
filcnaplo_premium/lib/ui/mobile/settings/share_theme.dart
Normal file
@@ -0,0 +1,26 @@
|
||||
import 'package:filcnaplo/models/settings.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class PremiumShareTheme extends StatefulWidget {
|
||||
const PremiumShareTheme({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<PremiumShareTheme> createState() => _PremiumShareThemeState();
|
||||
}
|
||||
|
||||
class _PremiumShareThemeState extends State<PremiumShareTheme>
|
||||
with TickerProviderStateMixin {
|
||||
late final SettingsProvider settingsProvider;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
settingsProvider = Provider.of<SettingsProvider>(context, listen: false);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const Scaffold();
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:filcnaplo/models/settings.dart';
|
||||
import 'package:filcnaplo/models/shared_theme.dart';
|
||||
import 'package:filcnaplo/theme/colors/accent.dart';
|
||||
import 'package:filcnaplo/theme/colors/colors.dart';
|
||||
import 'package:filcnaplo/theme/observer.dart';
|
||||
@@ -13,12 +14,15 @@ import 'package:filcnaplo_mobile_ui/common/widgets/grade/new_grades.dart';
|
||||
import 'package:filcnaplo_mobile_ui/common/widgets/homework/homework_tile.dart';
|
||||
import 'package:filcnaplo_premium/models/premium_scopes.dart';
|
||||
import 'package:filcnaplo_premium/providers/premium_provider.dart';
|
||||
import 'package:filcnaplo_premium/providers/share_provider.dart';
|
||||
import 'package:filcnaplo_premium/ui/mobile/flutter_colorpicker/colorpicker.dart';
|
||||
import 'package:filcnaplo_premium/ui/mobile/premium/upsell.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_feather_icons/flutter_feather_icons.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'theme.i18n.dart';
|
||||
import 'package:share_plus/share_plus.dart';
|
||||
|
||||
class PremiumCustomAccentColorSetting extends StatefulWidget {
|
||||
const PremiumCustomAccentColorSetting({Key? key}) : super(key: key);
|
||||
@@ -28,12 +32,20 @@ class PremiumCustomAccentColorSetting extends StatefulWidget {
|
||||
_PremiumCustomAccentColorSettingState();
|
||||
}
|
||||
|
||||
enum CustomColorMode { theme, saved, accent, background, highlight }
|
||||
enum CustomColorMode {
|
||||
theme,
|
||||
saved,
|
||||
accent,
|
||||
background,
|
||||
highlight,
|
||||
enterId,
|
||||
}
|
||||
|
||||
class _PremiumCustomAccentColorSettingState
|
||||
extends State<PremiumCustomAccentColorSetting>
|
||||
with TickerProviderStateMixin {
|
||||
late final SettingsProvider settings;
|
||||
late final ShareProvider shareProvider;
|
||||
bool colorSelection = false;
|
||||
bool customColorMenu = false;
|
||||
CustomColorMode colorMode = CustomColorMode.theme;
|
||||
@@ -95,9 +107,10 @@ class _PremiumCustomAccentColorSettingState
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_colorsTabController = TabController(length: 4, vsync: this);
|
||||
_colorsTabController = TabController(length: 5, vsync: this);
|
||||
_testTabController = TabController(length: 4, vsync: this);
|
||||
settings = Provider.of<SettingsProvider>(context, listen: false);
|
||||
shareProvider = Provider.of<ShareProvider>(context, listen: false);
|
||||
|
||||
_openAnimController = AnimationController(
|
||||
vsync: this, duration: const Duration(milliseconds: 750));
|
||||
@@ -132,10 +145,14 @@ class _PremiumCustomAccentColorSettingState
|
||||
return settings.customHighlightColor;
|
||||
case CustomColorMode.accent:
|
||||
return settings.customAccentColor;
|
||||
case CustomColorMode.enterId:
|
||||
// do nothing here lol
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void updateCustomColor(dynamic v, bool store) {
|
||||
void updateCustomColor(dynamic v, bool store,
|
||||
{Color? accent, Color? background, Color? panels}) {
|
||||
if (colorMode != CustomColorMode.theme) {
|
||||
settings.update(accentColor: AccentColor.custom, store: store);
|
||||
}
|
||||
@@ -168,6 +185,11 @@ class _PremiumCustomAccentColorSettingState
|
||||
case CustomColorMode.accent:
|
||||
settings.update(customAccentColor: v, store: store);
|
||||
break;
|
||||
case CustomColorMode.enterId:
|
||||
settings.update(customBackgroundColor: background, store: store);
|
||||
settings.update(customHighlightColor: panels, store: store);
|
||||
settings.update(customAccentColor: accent, store: store);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -230,6 +252,34 @@ class _PremiumCustomAccentColorSettingState
|
||||
appBar: AppBar(
|
||||
surfaceTintColor: Theme.of(context).scaffoldBackgroundColor,
|
||||
leading: BackButton(color: AppColors.of(context).text),
|
||||
actions: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 10.0),
|
||||
child: IconButton(
|
||||
focusColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
splashColor: Colors.transparent,
|
||||
onPressed: () async {
|
||||
// ScaffoldMessenger.of(context).showSnackBar(
|
||||
// const SnackBar(
|
||||
// duration: Duration(milliseconds: 1000),
|
||||
// content: Text(
|
||||
// "Hamarosan...",
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
SharedTheme theme =
|
||||
await shareProvider.shareCurrentTheme(context);
|
||||
Share.share(theme.id,
|
||||
subject: 'reFilc Téma / reFilc Theme');
|
||||
},
|
||||
icon: const Icon(
|
||||
FeatherIcons.share2,
|
||||
size: 22.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
title: Text(
|
||||
"theme_prev".i18n,
|
||||
style: TextStyle(color: AppColors.of(context).text),
|
||||
@@ -588,6 +638,9 @@ class _PremiumCustomAccentColorSettingState
|
||||
tab: Tab(
|
||||
text: "colorpicker_presets"
|
||||
.i18n)),
|
||||
ColorTab(
|
||||
color: unknownColor,
|
||||
tab: Tab(text: "enter_id".i18n)),
|
||||
/*ColorTab(
|
||||
color:
|
||||
settings.customAccentColor ??
|
||||
@@ -639,25 +692,31 @@ class _PremiumCustomAccentColorSettingState
|
||||
CustomColorMode.theme;
|
||||
});
|
||||
break;
|
||||
case 1:
|
||||
setState(() {
|
||||
colorMode =
|
||||
CustomColorMode.enterId;
|
||||
});
|
||||
break;
|
||||
/*case 1:
|
||||
setState(() {
|
||||
colorMode =
|
||||
CustomColorMode.saved;
|
||||
});
|
||||
break;*/
|
||||
case 1:
|
||||
case 2:
|
||||
setState(() {
|
||||
colorMode =
|
||||
CustomColorMode.background;
|
||||
});
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
setState(() {
|
||||
colorMode =
|
||||
CustomColorMode.highlight;
|
||||
});
|
||||
break;
|
||||
case 3:
|
||||
case 4:
|
||||
setState(() {
|
||||
colorMode =
|
||||
CustomColorMode.accent;
|
||||
@@ -721,6 +780,19 @@ class _PremiumCustomAccentColorSettingState
|
||||
});
|
||||
setTheme(settings.theme, true);
|
||||
},
|
||||
onThemeIdProvided: (theme) {
|
||||
setState(() {
|
||||
updateCustomColor(
|
||||
null,
|
||||
true,
|
||||
accent: theme.accentColor,
|
||||
background:
|
||||
theme.backgroundColor,
|
||||
panels: theme.panelsColor,
|
||||
);
|
||||
});
|
||||
setTheme(settings.theme, true);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -11,6 +11,9 @@ extension SettingsLocalization on String {
|
||||
"colorpicker_accent": "Accent",
|
||||
"need_sub": "You need Kupak subscription to use modify this.",
|
||||
"advanced": "Advanced",
|
||||
"enter_id": "Enter ID",
|
||||
"theme_id": "Theme ID...",
|
||||
"theme_not_found": "Theme not found!",
|
||||
},
|
||||
"hu_hu": {
|
||||
"theme_prev": "Előnézet",
|
||||
@@ -20,6 +23,9 @@ extension SettingsLocalization on String {
|
||||
"colorpicker_accent": "Színtónus",
|
||||
"need_sub": "A módosításhoz Kupak szintű támogatás szükséges.",
|
||||
"advanced": "Haladó",
|
||||
"enter_id": "ID megadása",
|
||||
"theme_id": "Téma azonosító...",
|
||||
"theme_not_found": "A téma nem található!",
|
||||
},
|
||||
"de_de": {
|
||||
"theme_prev": "Vorschau",
|
||||
@@ -30,6 +36,9 @@ extension SettingsLocalization on String {
|
||||
"need_sub":
|
||||
"Sie benötigen ein Kupak-Abonnement, um diese Funktion zu ändern.",
|
||||
"advanced": "Fortschrittlich",
|
||||
"enter_id": "Geben Sie die ID ein",
|
||||
"theme_id": "Themen-ID...",
|
||||
"theme_not_found": "Thema nicht gefunden!",
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user