mirror of
https://github.com/lxsang/antos-frontend.git
synced 2025-07-13 13:14:22 +02:00
Compare commits
99 Commits
Author | SHA1 | Date | |
---|---|---|---|
46cec340e2 | |||
b2db12e42f | |||
3cad7be3bf | |||
ab084d9e79 | |||
7a4ba008b0 | |||
59cde330da | |||
e72aaddf45 | |||
5837fa742b | |||
47bf528f89 | |||
9f0986bc8d | |||
d788f87ab9 | |||
57971e4338 | |||
ca647d31c0 | |||
c403a5b8bf | |||
035a7f3723 | |||
2438153c02 | |||
af542f32c4 | |||
3922f3764d | |||
278ee54b2e | |||
da342ea574 | |||
1b4f117060 | |||
519209af0c | |||
93622ec98a | |||
0510da0701 | |||
988993483f | |||
857b2167c5 | |||
f4f2e6f124 | |||
f89c71e2b3 | |||
09f72fd436 | |||
0882a6a1f1 | |||
1e4c134454 | |||
8643b819fd | |||
e8d4815e93 | |||
cd3bba7cf8 | |||
09ca30ad9a | |||
6fdf907868 | |||
b767e40db4 | |||
6be5672e43 | |||
ceb704d862 | |||
023b928bc7 | |||
02a601b739 | |||
8ae8251d0a | |||
286fb256c8 | |||
129633844f | |||
b4428d0188 | |||
4290ea602a | |||
a111162e7b | |||
5c5517e685 | |||
6d8c17e8e7 | |||
f548c241af | |||
7133bdcbab | |||
0ff98fee98 | |||
2f57c05ef3 | |||
9deb575628 | |||
1450891943 | |||
2221ea0bc4 | |||
373f305848 | |||
43cbbf9e3d | |||
9dc4420ff2 | |||
bfedca3e3e | |||
7fa73561c4 | |||
df80cbd652 | |||
f671966b96 | |||
1ff616786e | |||
7878364f57 | |||
a0008663ab | |||
f1616d0240 | |||
bb0a20b2ad | |||
377834e0ff | |||
7a609e3270 | |||
a06d3258f9 | |||
56cf8ea770 | |||
d2677eb380 | |||
9d5f2250ba | |||
d310d2c03b | |||
7fd6492a31 | |||
6c7aec69b7 | |||
e01d41c76b | |||
02f8a256d3 | |||
07bb58b7eb | |||
8fef0c5e96 | |||
10015d99b0 | |||
800c95830d | |||
7fefc17f04 | |||
702a83df6a | |||
6367c321da | |||
88cf90ae50 | |||
a624d853ed | |||
1b9e6e88fa | |||
45c89be5be | |||
d072566be8 | |||
9e0cd29030 | |||
696114e2f7 | |||
30da6fa8fc | |||
8d3ae96f01 | |||
318f26d164 | |||
c82da84240 | |||
4afc368bdd | |||
8877f46771 |
9
.travis.yml
Normal file
9
.travis.yml
Normal file
@ -0,0 +1,9 @@
|
||||
language: javascript
|
||||
install:
|
||||
- npm install -g coffeescript@1.9.3
|
||||
- npm install -g uglify-js
|
||||
- npm install -g uglifycss
|
||||
- npm install -g riot
|
||||
script:
|
||||
- make
|
||||
- make release
|
687
LICENSE
687
LICENSE
@ -1,21 +1,674 @@
|
||||
MIT License
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (c) 2018 Xuan Sang LE
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
Preamble
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
|
51
Makefile
51
Makefile
@ -4,6 +4,13 @@ BUILDDIR = build/htdocs/os
|
||||
BLUE=\033[1;34m
|
||||
NC=\033[0m
|
||||
|
||||
GSED=sed
|
||||
UNAME_S := $(shell uname -s)
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
GSED=gsed
|
||||
endif
|
||||
|
||||
|
||||
coffees= src/core/core.coffee\
|
||||
src/core/api.coffee\
|
||||
src/core/settings.coffee\
|
||||
@ -22,12 +29,15 @@ coffees= src/core/core.coffee\
|
||||
|
||||
|
||||
|
||||
packages = CoreServices NotePad wTerm ActivityMonitor Files MarkOn MarketPlace Blogger Preview
|
||||
packages = CoreServices NotePad wTerm ActivityMonitor Files MarkOn MarketPlace Preview Setting
|
||||
|
||||
main: build_coffees build_tags build_themes schemes libs build_packages
|
||||
main: initd build_coffees build_tags build_themes schemes libs build_packages languages
|
||||
- cp src/index.html $(BUILDDIR)/
|
||||
|
||||
lite: build_coffee build_tag build_theme schemes build_packages
|
||||
initd:
|
||||
- mkdir -p $(BUILDDIR)
|
||||
|
||||
lite: build_coffees build_tags build_themes schemes build_packages
|
||||
#%.js: %.coffee
|
||||
# coffee --compile $<
|
||||
|
||||
@ -56,12 +66,20 @@ testdata:
|
||||
cp src/core/handlers/jsons/* $(BUILDDIR)/resources/jsons
|
||||
build_tags:
|
||||
@echo "$(BLUE)Building tag files$(NC)"
|
||||
-mkdir $(BUILDDIR)/resources
|
||||
-mkdir $(BUILDDIR)/resources
|
||||
-rm $(BUILDDIR)/resources/antos_tags.js
|
||||
for f in src/core/tags/*; do (cat "$${f}"; echo) >> $(BUILDDIR)/resources/antos_tags.js; done
|
||||
|
||||
build_themes: antos_themes_build
|
||||
languages:
|
||||
-mkdir $(BUILDDIR)/resources
|
||||
-mkdir $(BUILDDIR)/resources/languages
|
||||
cp src/core/languages/*.json $(BUILDDIR)/resources/languages/
|
||||
|
||||
genlang:
|
||||
read -r -p "Enter locale: " LOCAL;\
|
||||
./src/core/languages/gen.sh ./src ./src/core/languages/$$LOCAL.json
|
||||
build_themes: antos_themes_build
|
||||
cp -r src/themes/system $(BUILDDIR)/resources/themes/
|
||||
|
||||
antos_themes_build:
|
||||
@echo "$(BLUE)Building themes name: antos$(NC)"
|
||||
@ -89,6 +107,13 @@ package:
|
||||
cp -rf src/packages/$$PKG/build/* $(BUILDDIR)/packages/$$PKG/;\
|
||||
test -d src/packages/$$PKG/build && rm -r src/packages/$$PKG/build;
|
||||
|
||||
pkgar:
|
||||
read -r -p "Enter package name: " PKG;\
|
||||
echo $$PKG | make package &&\
|
||||
test -f $(BUILDDIR)/packages/$$PKG/main.js && uglifyjs $(BUILDDIR)/packages/$$PKG/main.js --compress --mangle --output $(BUILDDIR)/packages/$$PKG/main.js;\
|
||||
test -f $(BUILDDIR)/packages/$$PKG/main.css && uglifycss --output $(BUILDDIR)/packages/$$PKG/main.css $(BUILDDIR)/packages/$$PKG/main.css;\
|
||||
cd $(BUILDDIR)/packages/$$PKG && zip -r "$$PKG.zip" ./ ; \
|
||||
cd ../../ && (mkdir repo/$$PKG || true) && mv packages/$$PKG/"$$PKG.zip" repo/$$PKG && touch repo/$$PKG/$$PKG.md && rm -r packages/$$PKG
|
||||
|
||||
uglify:
|
||||
# uglify antos.js
|
||||
@ -98,20 +123,22 @@ uglify:
|
||||
# npm install riot -g
|
||||
riot --ext js $(BUILDDIR)/resources/antos_tags.js $(BUILDDIR)/resources/antos_tags.js
|
||||
uglifyjs $(BUILDDIR)/resources/antos_tags.js --compress --mangle --output $(BUILDDIR)/resources/antos_tags.js
|
||||
sed -i 's/resources\/antos_tags.js/scripts\/riot.min.js/g' $(BUILDDIR)/index.html
|
||||
sed -i 's/scripts\/riot.compiler.min.js/resources\/antos_tags.js/g' $(BUILDDIR)/index.html
|
||||
sed -i 's/type=\"riot\/tag\"//g' $(BUILDDIR)/index.html
|
||||
# npm install minify -g
|
||||
$(GSED) -i 's/resources\/antos_tags.js/scripts\/riot.min.js/g' $(BUILDDIR)/index.html
|
||||
$(GSED) -i 's/scripts\/riot.compiler.min.js/resources\/antos_tags.js/g' $(BUILDDIR)/index.html
|
||||
$(GSED) -i 's/type=\"riot\/tag\"/ /g' "$(BUILDDIR)/index.html"
|
||||
# npm install uglifycss -g
|
||||
# uglify the css
|
||||
minify --output $(BUILDDIR)/resources/themes/antos/antos.css $(BUILDDIR)/resources/themes/antos/antos.css
|
||||
uglifycss --output $(BUILDDIR)/resources/themes/antos/antos.css $(BUILDDIR)/resources/themes/antos/antos.css
|
||||
uglifycss --output $(BUILDDIR)/resources/themes/system/font-awesome.css $(BUILDDIR)/resources/themes/system/font-awesome.css
|
||||
#uglify each packages
|
||||
|
||||
for d in $(packages); do\
|
||||
echo "Uglifying $$d";\
|
||||
test -f $(BUILDDIR)/packages/$$d/main.js && uglifyjs $(BUILDDIR)/packages/$$d/main.js --compress --mangle --output $(BUILDDIR)/packages/$$d/main.js;\
|
||||
test -f $(BUILDDIR)/packages/$$d/main.css && minify --output $(BUILDDIR)/packages/$$d/main.css $(BUILDDIR)/packages/$$d/main.css;\
|
||||
test -f $(BUILDDIR)/packages/$$d/main.css && uglifycss --output $(BUILDDIR)/packages/$$d/main.css $(BUILDDIR)/packages/$$d/main.css;\
|
||||
done
|
||||
|
||||
release: main uglify
|
||||
|
||||
clean:
|
||||
rm -rf $(BUILDDIR)/*
|
||||
rm -rf $(BUILDDIR)/*
|
||||
|
19
README.md
19
README.md
@ -1,11 +1,14 @@
|
||||
# antOS
|
||||
[](https://travis-ci.org/lxsang/antos)
|
||||
[](https://app.fossa.io/projects/git%2Bgithub.com%2Flxsang%2Fantos?ref=badge_shield)
|
||||
|
||||
Server or Embedded Linux are often headless, so accessing the resource on these systems is not always obvious. The aim of this project is to develop a client core API that provides a desktop like experience to remotely access resource on the server using web technologies. AntOS is based on jQuery and Riot, it is designed to be used along with our antd server and Lua based server side app, but can be adapted to be used with any server side languages (PHP, etc) and server, by implementing all the system calls API defined in core/handlers/RemoteHandler.coffee. Basically, application design for the web os relies on these system calls to communicating with the server. The API defines the core UI, system calls (to server), Virtual File system, virtual database and the necessary libraries for easing the development of webOS's applications. Applications can be developped with coffee/javascript/css without the need of a server side script.
|
||||
|
||||
Note that, the development of the project is in early alpha state, so bugs are very welcome :)
|
||||
The WebOS is tested on recent Firefox, Chrome and Safari, however i did not test it on IE or Edge since i have no Windows device :)
|
||||
|
||||
## Demo
|
||||
A demo of the webOS is available at my page [https://os.lxsang.me](https://os.lxsang.me) using username: demo and password: demo
|
||||
A demo of the web desktop is available at my page [https://os.lxsang.me](https://os.lxsang.me) using username: demo and password: demo
|
||||
|
||||

|
||||
|
||||
@ -24,10 +27,18 @@ It you have any problem, please contact me or open an issue, i'll try to respons
|
||||
|
||||
Copyright 2017-2018 Xuan Sang LE <xsang.le AT gmail DOT com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
AnTOS is is licensed under the GNU General Public License v3.0, see the LICENCE file for more information
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
3
TODO
3
TODO
@ -1,3 +1,2 @@
|
||||
# add version number
|
||||
# SDK for application development right on the OS
|
||||
# bug tracking app
|
||||
# packages manager (restricted mode)
|
||||
|
@ -1,7 +1,26 @@
|
||||
# Copyright 2017-2018 Xuan Sang LE <xsang.le AT gmail DOT com>
|
||||
|
||||
# AnTOS Web desktop is is licensed under the GNU General Public
|
||||
# License v3.0, see the LICENCE file for more information
|
||||
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
_GUI = self.OS.GUI
|
||||
_API = self.OS.API
|
||||
_PM = self.OS.PM
|
||||
_OS = self.OS
|
||||
_courrier = self.OS.courrier
|
||||
this.onload = () ->
|
||||
($ document).on 'webkitfullscreenchange mozfullscreenchange fullscreenchange MSFullscreenChange', ()->
|
||||
_GUI.fullscreen = not _GUI.fullscreen
|
||||
self.OS.boot()
|
@ -1,3 +1,20 @@
|
||||
# Copyright 2017-2018 Xuan Sang LE <xsang.le AT gmail DOT com>
|
||||
|
||||
# AnTOS Web desktop is is licensed under the GNU General Public
|
||||
# License v3.0, see the LICENCE file for more information
|
||||
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
class BaseApplication extends this.OS.GUI.BaseModel
|
||||
constructor: (name, args) ->
|
||||
super name, args
|
||||
@ -8,13 +25,12 @@ class BaseApplication extends this.OS.GUI.BaseModel
|
||||
CTRL: {}
|
||||
SHIFT: {}
|
||||
META: {}
|
||||
me = @
|
||||
init: ->
|
||||
me = @
|
||||
@off "*"
|
||||
@on "exit", () -> me.quit()
|
||||
# first register some base event to the app
|
||||
@subscribe "appregistry"
|
||||
, ( m ) ->
|
||||
me.applySetting m.data.m if (m.name is me.name)
|
||||
|
||||
@on "focus", () ->
|
||||
me.sysdock.set "selectedApp", me
|
||||
me.appmenu.pid = me.pid
|
||||
@ -30,6 +46,10 @@ class BaseApplication extends this.OS.GUI.BaseModel
|
||||
switch d.e.item.data.dataid
|
||||
when "#{me.name}-about" then me.openDialog "AboutDialog", ()->
|
||||
when "#{me.name}-exit" then me.trigger "exit"
|
||||
@on "apptitlechange", () -> me.sysdock.update()
|
||||
@loadScheme()
|
||||
|
||||
loadScheme: () ->
|
||||
#now load the scheme
|
||||
path = "#{@meta().path}/scheme.html"
|
||||
@.render path
|
||||
@ -49,6 +69,8 @@ class BaseApplication extends this.OS.GUI.BaseModel
|
||||
return false
|
||||
|
||||
applySetting: (k) ->
|
||||
applyAllSetting: () ->
|
||||
@applySetting k for k, v of @setting
|
||||
registry: (k, v) ->
|
||||
@setting[k] = v
|
||||
@publish "appregistry", k
|
||||
@ -65,7 +87,10 @@ class BaseApplication extends this.OS.GUI.BaseModel
|
||||
|
||||
toggle: () ->
|
||||
@trigger "toggle"
|
||||
|
||||
|
||||
title: () ->
|
||||
@scheme.get "apptitle"
|
||||
|
||||
onexit: (evt) ->
|
||||
@cleanup(evt)
|
||||
if not evt.prevent
|
||||
@ -77,8 +102,8 @@ class BaseApplication extends this.OS.GUI.BaseModel
|
||||
[{
|
||||
text: _OS.APP[@name].meta.name,
|
||||
child: [
|
||||
{ text: "About", dataid: "#{@name}-about" },
|
||||
{ text: "Exit", dataid: "#{@name}-exit" }
|
||||
{ text: "__(About)", dataid: "#{@name}-about" },
|
||||
{ text: "__(Exit)", dataid: "#{@name}-exit" }
|
||||
]
|
||||
}]
|
||||
mn = mn.concat @menu() || []
|
||||
@ -96,8 +121,7 @@ class BaseApplication extends this.OS.GUI.BaseModel
|
||||
data:->
|
||||
#implement by subclasses
|
||||
# to return app data
|
||||
update:->
|
||||
#implement by subclasses
|
||||
|
||||
cleanup: (e) ->
|
||||
#implement by subclasses
|
||||
# to handle the exit event
|
||||
|
@ -1,3 +1,20 @@
|
||||
# Copyright 2017-2018 Xuan Sang LE <xsang.le AT gmail DOT com>
|
||||
|
||||
# AnTOS Web desktop is is licensed under the GNU General Public
|
||||
# License v3.0, see the LICENCE file for more information
|
||||
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
class SubWindow extends this.OS.GUI.BaseModel
|
||||
constructor: (name) ->
|
||||
super name, null
|
||||
@ -54,16 +71,17 @@ class BasicDialog extends BaseDialog
|
||||
|
||||
init: () ->
|
||||
@title = @name if not @title
|
||||
html = "<afx-app-window data-id = 'dia-window' apptitle='#{@title}' width='#{@conf.width}' height='#{@conf.height}'>
|
||||
<afx-vbox>"
|
||||
html += "<#{v.tag} #{v.att} style = 'margin-left:5px; margin-right:5px;' data-id = 'content#{k}'></#{v.tag}>" for k,v of @conf.tags
|
||||
html = "<afx-app-window data-id = '#{@name}' width='#{@conf.width}' height='#{@conf.height}'>"
|
||||
html += "<afx-hbox><div data-width='7'></div><afx-vbox><div data-height='5'></div>"
|
||||
html += "<#{v.tag} #{v.att} data-id = 'content#{k}'></#{v.tag}>" for k,v of @conf.tags
|
||||
html += "<div data-height = '35' style=' text-align:right;padding-top:3px;'>"
|
||||
html += "<afx-button data-id = 'bt#{k}' text = '#{v.label}' style='margin-right:5px;'></afx-button>" for k,v of @conf.buttons
|
||||
html += "</div></afx-vbox></afx-app-window>"
|
||||
html += "<afx-button data-id = 'bt#{k}' text = '#{v.label}' style='margin-left:5px;'></afx-button>" for k,v of @conf.buttons
|
||||
html += "</div><div data-height='5'></div></afx-vbox><div data-width='7'></div></afx-hbox></afx-app-window>"
|
||||
#render the html
|
||||
_GUI.htmlToScheme html, @, @host
|
||||
|
||||
main: () ->
|
||||
@scheme.set "apptitle", @title
|
||||
@scheme.set "minimizable", false
|
||||
@scheme.set "resizable", @conf.resizable if @conf.resizable isnt undefined
|
||||
me = @
|
||||
@ -79,15 +97,15 @@ class PromptDialog extends BasicDialog
|
||||
constructor: () ->
|
||||
super "PromptDialog", {
|
||||
tags: [
|
||||
{ tag: "afx-label", att: "data-height = '20'" },
|
||||
{ tag: "input", att: "type = 'text'" }
|
||||
{ tag: "afx-label" },
|
||||
{ tag: "input", att: "type = 'text' data-height='25'" }
|
||||
],
|
||||
width: 200,
|
||||
height: 100,
|
||||
height: 120,
|
||||
resizable: false,
|
||||
buttons: [
|
||||
{
|
||||
label: "0k",
|
||||
label: "__(Ok)",
|
||||
onclick: (d) ->
|
||||
txt = (d.find "content1").value
|
||||
return d.quit() if txt is ""
|
||||
@ -95,7 +113,7 @@ class PromptDialog extends BasicDialog
|
||||
d.quit()
|
||||
},
|
||||
{
|
||||
label: "Cancel",
|
||||
label: "__(Cancel)",
|
||||
onclick: (d) -> d.quit()
|
||||
}
|
||||
],
|
||||
@ -115,21 +133,21 @@ class CalendarDialog extends BasicDialog
|
||||
super "CalendarDialog", {
|
||||
tags: [{ tag: 'afx-calendar-view' }],
|
||||
width: 300,
|
||||
height: 220,
|
||||
height: 230,
|
||||
resizable: false,
|
||||
buttons: [
|
||||
{
|
||||
label: 'Ok',
|
||||
label: "__(Ok)",
|
||||
onclick: (d) ->
|
||||
date = (d.find "content0").get "selectedDate"
|
||||
if date
|
||||
d.handler date if d.handler
|
||||
d.quit()
|
||||
else
|
||||
d.notify "Please select a date"
|
||||
d.notify __("Please select a date")
|
||||
},
|
||||
{
|
||||
label: 'Cancel',
|
||||
label: "__(Cancel)",
|
||||
onclick: (d) -> d.quit()
|
||||
}
|
||||
]
|
||||
@ -145,7 +163,7 @@ class ColorPickerDialog extends BasicDialog
|
||||
resizable: false,
|
||||
buttons: [
|
||||
{
|
||||
label: 'Ok',
|
||||
label: "__(Ok)",
|
||||
onclick: (d) ->
|
||||
c = (d.find "content0").get "selectedColor"
|
||||
if c
|
||||
@ -155,7 +173,7 @@ class ColorPickerDialog extends BasicDialog
|
||||
d.notify "Please select a color"
|
||||
},
|
||||
{
|
||||
label: 'Cancel',
|
||||
label: "__(Cancel)",
|
||||
onclick: (d) -> d.quit()
|
||||
}
|
||||
]
|
||||
@ -169,7 +187,7 @@ class InfoDialog extends BasicDialog
|
||||
width: 250,
|
||||
height: 300,
|
||||
resizable: true,
|
||||
buttons: [ { label: 'Cancel', onclick: (d) -> d.quit() } ],
|
||||
buttons: [ { label: "__(Cancel)", onclick: (d) -> d.quit() } ],
|
||||
filldata: (d) ->
|
||||
return unless d.data
|
||||
rows = []
|
||||
@ -182,18 +200,18 @@ this.OS.register "InfoDialog", InfoDialog
|
||||
class YesNoDialog extends BasicDialog
|
||||
constructor: () ->
|
||||
super "YesNoDialog", {
|
||||
tags: [{ tag: "afx-label", att: "style = 'padding-left:10px;'" }],
|
||||
tags: [{ tag: "afx-label" }],
|
||||
width: 300,
|
||||
height: 100,
|
||||
resizable: true,
|
||||
buttons: [
|
||||
{
|
||||
label: "Yes", onclick: (d) ->
|
||||
label: "__(Yes)", onclick: (d) ->
|
||||
d.handler true if d.handler
|
||||
d.quit()
|
||||
},
|
||||
{
|
||||
label: "No", onclick: (d) ->
|
||||
label: "__(No)", onclick: (d) ->
|
||||
d.handler false if d.handler
|
||||
d.quit()
|
||||
}
|
||||
@ -215,14 +233,14 @@ class SelectionDialog extends BasicDialog
|
||||
resizable: false,
|
||||
buttons: [
|
||||
{
|
||||
label: "Ok", onclick: (d) ->
|
||||
label: "__(Ok)", onclick: (d) ->
|
||||
el = d.find "content0"
|
||||
it = el.get "selected"
|
||||
return unless it
|
||||
d.handler it if d.handler
|
||||
d.quit()
|
||||
},
|
||||
{ label: "Cancel", onclick: (d) -> d.quit() }
|
||||
{ label: "__(Cancel)", onclick: (d) -> d.quit() }
|
||||
],
|
||||
filldata: (d) ->
|
||||
return unless d.data
|
||||
@ -239,11 +257,11 @@ class AboutDialog extends BaseDialog
|
||||
super "AboutDialog"
|
||||
|
||||
init: () ->
|
||||
@render "os:///resources/schemes/about.html"
|
||||
@render "os://resources/schemes/about.html"
|
||||
|
||||
main: () ->
|
||||
mt = @meta()
|
||||
@scheme.set "apptitle", "About: #{mt.name}"
|
||||
@scheme.set "apptitle", __("About: {0}",mt.name)
|
||||
(@find "mylabel").set "*", {icon:mt.icon, iconclass:mt.iconclass, text:"#{mt.name}(v#{mt.version})"}
|
||||
($ @find "mydesc").html mt.description
|
||||
# grid data for author info
|
||||
@ -259,45 +277,53 @@ class FileDiaLog extends BaseDialog
|
||||
super "FileDiaLog"
|
||||
|
||||
init: () ->
|
||||
@render "os:///resources/schemes/filedialog.html"
|
||||
@render "os://resources/schemes/filedialog.html"
|
||||
|
||||
main: () ->
|
||||
fileview = @find "fileview"
|
||||
location = @find "location"
|
||||
filename = @find "filename"
|
||||
me = @
|
||||
@scheme.set "apptitle", "#{@title}"
|
||||
@scheme.set "apptitle", @title
|
||||
fileview.set "fetch", (e, f) ->
|
||||
return unless e.child
|
||||
e.child.path.asFileHandler().read (d) ->
|
||||
return me.error "Resource not found #{e.child.path}" if d.error
|
||||
return me.error __("Resource not found: {0}", e.child.path) if d.error
|
||||
f d.result
|
||||
location.set "onlistselect", (e) ->
|
||||
return unless e and e.data.path
|
||||
e.data.path.asFileHandler().read (d) ->
|
||||
setroot = (path) ->
|
||||
path.asFileHandler().read (d) ->
|
||||
if(d.error)
|
||||
return me.error "Resource not found #{e.data.path}"
|
||||
fileview.set "path", e.data.path
|
||||
return me.error __("Resource not found: {0}", path)
|
||||
fileview.set "path", path
|
||||
fileview.set "data", d.result
|
||||
location.set "items", ( i for i in @systemsetting.VFS.mountpoints when i.type isnt "app" )
|
||||
location.set "selected", 0 unless location.get "selected"
|
||||
if not @data or not @data.root
|
||||
location.set "onlistselect", (e) ->
|
||||
return unless e and e.data.path
|
||||
setroot e.data.path
|
||||
location.set "items", ( i for i in @systemsetting.VFS.mountpoints when i.type isnt "app" )
|
||||
location.set "selected", 0 unless location.get "selected"
|
||||
else
|
||||
$(location).hide()
|
||||
@trigger "calibrate"
|
||||
setroot @data.root
|
||||
fileview.set "onfileselect", (f) ->
|
||||
|
||||
($ filename).val f.filename if f.type is "file"
|
||||
(@find "bt-ok").set "onbtclick", (e) ->
|
||||
f = fileview.get "selectedFile"
|
||||
return me.notify "Please select a file" unless f
|
||||
return me.notify __("Please select a file/fofler") unless f
|
||||
return me.notify __("Please select {0} only", me.data.type) if me.data and me.data.type and me.data.type isnt f.type
|
||||
if me.data and me.data.mimes
|
||||
#verify the mime
|
||||
m = false
|
||||
for v in me.data.mimes
|
||||
if f.mime.match (new RegExp v, "g")
|
||||
m = true
|
||||
break
|
||||
return me.notify "Only #{me.data.mimes.join(",")} could be selected" unless m
|
||||
if f.mime
|
||||
for v in me.data.mimes
|
||||
if f.mime.match (new RegExp v, "g")
|
||||
m = true
|
||||
break
|
||||
return me.notify __("Only {0} could be selected", me.data.mimes.join(",")) unless m
|
||||
d = f.path
|
||||
d = f.path.asFileHandler().parent() if f.type is "file"
|
||||
me.handler d, ($ filename).val(), f.path if me.handler
|
||||
me.handler d, ($ filename).val(), f.path, f if me.handler
|
||||
#sel = if me.data and me.data.selection then me.data.selection else "file"
|
||||
#me.handler f, ($ filename).val() if me.handler and ((f.type is sel) or (sel is "*"))
|
||||
me.quit()
|
||||
@ -307,5 +333,6 @@ class FileDiaLog extends BaseDialog
|
||||
if @data and @data.file
|
||||
($ filename).css("display", "block").val @data.file.basename or "Untitled"
|
||||
@trigger "resize"
|
||||
fileview.set "showhidden", @data.hidden if @data and @data.hidden
|
||||
|
||||
this.OS.register "FileDiaLog", FileDiaLog
|
@ -1,7 +1,24 @@
|
||||
# Copyright 2017-2018 Xuan Sang LE <xsang.le AT gmail DOT com>
|
||||
|
||||
# AnTOS Web desktop is is licensed under the GNU General Public
|
||||
# License v3.0, see the LICENCE file for more information
|
||||
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
class BaseEvent
|
||||
constructor: (@name) ->
|
||||
constructor: (@name, @force) ->
|
||||
@prevent = false
|
||||
preventDefault:()->
|
||||
@prevent = true
|
||||
preventDefault: () ->
|
||||
@prevent = true if not @force
|
||||
|
||||
this.OS.GUI.BaseEvent = BaseEvent
|
@ -1,5 +1,24 @@
|
||||
# Copyright 2017-2018 Xuan Sang LE <xsang.le AT gmail DOT com>
|
||||
|
||||
# AnTOS Web desktop is is licensed under the GNU General Public
|
||||
# License v3.0, see the LICENCE file for more information
|
||||
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
|
||||
class BaseModel
|
||||
constructor: (@name, @args) ->
|
||||
me = @
|
||||
@observable = riot.observable()
|
||||
@_api = self.OS.API
|
||||
@_gui = self.OS.GUI
|
||||
@ -8,14 +27,14 @@ class BaseModel
|
||||
@on "exit", () -> me.quit()
|
||||
@host = "#desktop"
|
||||
@dialog = undefined
|
||||
|
||||
render: (p) ->
|
||||
_GUI.loadScheme p, @, @host
|
||||
|
||||
quit: () ->
|
||||
evt = new _GUI.BaseEvent("exit")
|
||||
quit: (force) ->
|
||||
evt = new _GUI.BaseEvent("exit", force)
|
||||
@onexit(evt)
|
||||
if not evt.prevent
|
||||
@observable.off "*"
|
||||
delete @.observable
|
||||
@dialog.quit() if @dialog
|
||||
_PM.kill @
|
||||
@ -32,7 +51,9 @@ class BaseModel
|
||||
|
||||
one: (e, f) -> @observable.one e, f
|
||||
on: (e, f) -> @observable.on e, f
|
||||
|
||||
off: (e, f) ->
|
||||
return @observable.off e unless f
|
||||
@observable.off e, f
|
||||
trigger: (e, d) -> @observable.trigger e, d
|
||||
|
||||
subscribe: (e, f) ->
|
||||
@ -42,10 +63,13 @@ class BaseModel
|
||||
if @dialog
|
||||
@dialog.show()
|
||||
return
|
||||
if not _GUI.subwindows[d]
|
||||
@error "Dialog #{d} not found"
|
||||
return
|
||||
@dialog = new _GUI.subwindows[d]()
|
||||
if typeof d is "string"
|
||||
if not _GUI.subwindows[d]
|
||||
@error __("Dialog {0} not found", d)
|
||||
return
|
||||
@dialog = new _GUI.subwindows[d]()
|
||||
else
|
||||
@dialog = d
|
||||
#@dialog.observable = riot.observable() unless @dialog
|
||||
@dialog.parent = @
|
||||
@dialog.handler = f
|
||||
@ -54,9 +78,14 @@ class BaseModel
|
||||
@dialog.title = title
|
||||
@dialog.init()
|
||||
|
||||
publish: (t, m) ->
|
||||
ask: (t, m, f) ->
|
||||
@._gui.openDialog "YesNoDialog", (d) ->
|
||||
f() if d
|
||||
, t, { text: m }
|
||||
|
||||
publish: (t, m, e) ->
|
||||
mt = @meta()
|
||||
_courrier.trigger t, { id: @pid, name: @name, data: { m: m, icon: mt.icon, iconclass: mt.iconclass } }
|
||||
_courrier.trigger t, { id: @pid, name: @name, data: { m: m, icon: mt.icon, iconclass: mt.iconclass }, error: e }
|
||||
|
||||
notify: (m) ->
|
||||
@publish "notification", m
|
||||
@ -65,7 +94,7 @@ class BaseModel
|
||||
@publish "warning", m
|
||||
|
||||
error: (m) ->
|
||||
@publish "error", m + (@_api.throwe @name)
|
||||
@publish "error", m, (@_api.throwe @name)
|
||||
|
||||
fail: (m) ->
|
||||
@publish "fail", m
|
||||
@ -73,6 +102,9 @@ class BaseModel
|
||||
throwe: () ->
|
||||
@_api.throwe @name
|
||||
|
||||
update:->
|
||||
@scheme.update() if @scheme
|
||||
|
||||
find: (id) -> ($ "[data-id='#{id}']", @scheme)[0] if @scheme
|
||||
|
||||
select: (sel) -> $ sel, @scheme if @scheme
|
||||
|
@ -1,3 +1,21 @@
|
||||
# Copyright 2017-2018 Xuan Sang LE <xsang.le AT gmail DOT com>
|
||||
|
||||
# AnTOS Web desktop is is licensed under the GNU General Public
|
||||
# License v3.0, see the LICENCE file for more information
|
||||
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
|
||||
class BaseService extends this.OS.GUI.BaseModel
|
||||
constructor: (name, args) ->
|
||||
super name, args
|
||||
@ -16,7 +34,9 @@ class BaseService extends this.OS.GUI.BaseModel
|
||||
attach: (h) ->
|
||||
@holder = h
|
||||
|
||||
update: () -> @holder.update() if @holder
|
||||
update: () ->
|
||||
@holder.update() if @holder
|
||||
@scheme.update() if @scheme
|
||||
|
||||
watch: ( t, f) ->
|
||||
me = @
|
||||
|
@ -1,9 +1,100 @@
|
||||
# Copyright 2017-2018 Xuan Sang LE <xsang.le AT gmail DOT com>
|
||||
|
||||
# AnTOS Web desktop is is licensed under the GNU General Public
|
||||
# License v3.0, see the LICENCE file for more information
|
||||
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
class FormatedString
|
||||
constructor: (@fs, args) ->
|
||||
@values = []
|
||||
return unless args
|
||||
@values[i] = args[i] for i in [0..args.length - 1]
|
||||
toString: () ->
|
||||
@__()
|
||||
__: () ->
|
||||
me = @
|
||||
return @fs.l().replace /{(\d+)}/g, (match, number) ->
|
||||
return if typeof me.values[number] != 'undefined' then me.values[number].__() else match
|
||||
hash: () ->
|
||||
@__().hash()
|
||||
|
||||
asBase64: () ->
|
||||
@__().asBase64()
|
||||
|
||||
unescape: () ->
|
||||
@__().unescape()
|
||||
|
||||
asUint8Array: () ->
|
||||
@__().asUint8Array()
|
||||
|
||||
format: () ->
|
||||
args = arguments
|
||||
@values[i] = args[i] for i in [0..args.length - 1]
|
||||
|
||||
class Version
|
||||
constructor:(@string) ->
|
||||
arr = @string.split "-"
|
||||
br =
|
||||
"r": 3,
|
||||
"b": 2,
|
||||
"a": 1
|
||||
@branch = 3
|
||||
@branch = br[arr[1]] if arr.length is 2 and br[arr[1]]
|
||||
mt = arr[0].match /\d+/g
|
||||
throw new Error __("Version string is in invalid format: {0}", @string) if not mt
|
||||
@major = 0
|
||||
@minor = 0
|
||||
@patch = 0
|
||||
@major = Number mt[0] if mt.length >= 1
|
||||
@minor = Number mt[1] if mt.length >= 2
|
||||
@patch = Number mt[2] if mt.length >= 3
|
||||
|
||||
# this function return
|
||||
# 0 if the version is unchanged
|
||||
# 1 if the current version is newer
|
||||
# -1 if the current version is older
|
||||
compare: (o) ->
|
||||
other = o.__v()
|
||||
return 1 if @branch > other.branch
|
||||
return -1 if @branch < other.branch
|
||||
return 0 if @major is other.major and @minor is other.minor and @patch is other.patch
|
||||
return 1 if @major > other.major
|
||||
return -1 if @major < other.major
|
||||
return 1 if @minor > other.minor
|
||||
return -1 if @minor < other.minor
|
||||
return 1 if @patch > other.patch
|
||||
return -1
|
||||
nt: (o) ->
|
||||
return (@compare o) is 1
|
||||
ot: (o) ->
|
||||
return (@compare o) is -1
|
||||
__v: () -> @
|
||||
toString: () -> @string
|
||||
|
||||
Object.defineProperty Object.prototype, '__',
|
||||
value: () ->
|
||||
return @toString()
|
||||
enumerable: false
|
||||
writable: true
|
||||
|
||||
String.prototype.hash = () ->
|
||||
hash = 5381
|
||||
i = this.length
|
||||
hash = (hash * 33) ^ this.charCodeAt(--i) while i
|
||||
hash >>> 0
|
||||
|
||||
String.prototype.__v = () ->
|
||||
return new Version @
|
||||
String.prototype.asBase64 = () ->
|
||||
tmp = encodeURIComponent this
|
||||
return btoa ( tmp.replace /%([0-9A-F]{2})/g, (match, p1) ->
|
||||
@ -19,13 +110,41 @@ String.prototype.unescape = () ->
|
||||
d = d.replace /\\f/g, "\f"
|
||||
d = d.replace /\\r/g, "\r"
|
||||
d
|
||||
String.prototype.asUnit8Array = () ->
|
||||
String.prototype.asUint8Array = () ->
|
||||
bytes = []
|
||||
for i in [0..(@length - 1)]
|
||||
bytes.push @charCodeAt i
|
||||
bytes = new Uint8Array(bytes)
|
||||
return bytes
|
||||
|
||||
if not String.prototype.format
|
||||
String.prototype.format = () ->
|
||||
args = arguments
|
||||
return @replace /{(\d+)}/g, (match, number) ->
|
||||
return if typeof args[number] != 'undefined' then args[number].__() else match
|
||||
|
||||
String.prototype.f = () ->
|
||||
args = arguments
|
||||
return new FormatedString(@, args)
|
||||
|
||||
String.prototype.__ = () ->
|
||||
match = @match(/^__\((.*)\)$/)
|
||||
return match[1].l() if match
|
||||
return @
|
||||
String.prototype.l = () ->
|
||||
_API = window.OS.API
|
||||
_API.lang[@] = @ unless _API.lang[@]
|
||||
return _API.lang[@]
|
||||
# language directive
|
||||
|
||||
this.__ = () ->
|
||||
_API = window.OS.API
|
||||
args = arguments
|
||||
return "Undefined" unless args.length > 0
|
||||
d = args[0]
|
||||
d.l()
|
||||
return new FormatedString d, (args[i] for i in [1 .. args.length - 1])
|
||||
|
||||
Date.prototype.toString = () ->
|
||||
dd = @getDate()
|
||||
mm = @getMonth() + 1
|
||||
@ -51,6 +170,7 @@ self.OS.API =
|
||||
handler: {}
|
||||
shared: {} # shared libraries
|
||||
searchHandler:{}
|
||||
lang:{}
|
||||
#request a user data
|
||||
mid: () ->
|
||||
return _courrier.getMID()
|
||||
@ -178,9 +298,9 @@ self.OS.API =
|
||||
_courrier.trigger "sharedlibraryloaded", l
|
||||
f() if f
|
||||
, (e, s) ->
|
||||
_courrier.oserror "Cannot load 3rd library at: #{l}", e, r
|
||||
_courrier.oserror __("Cannot load 3rd library at: {0}", l), e, r
|
||||
else
|
||||
path = "os:///scripts/"
|
||||
path = "os://scripts/"
|
||||
js = "#{path}#{l}.js"
|
||||
js.asFileHandler().onready (d) ->
|
||||
_API.shared[l] = true
|
||||
@ -196,7 +316,8 @@ self.OS.API =
|
||||
_courrier.trigger "sharedlibraryloaded", l
|
||||
f() if f
|
||||
else
|
||||
console.log l, "Library exist, no need to load"
|
||||
console.log l, "Library exist, no need to load"
|
||||
f() if f
|
||||
_courrier.trigger "sharedlibraryloaded", l
|
||||
|
||||
requires:(libs, f) ->
|
||||
@ -214,7 +335,8 @@ self.OS.API =
|
||||
_API.handler.packages {
|
||||
command: "cache", args: { paths: (v for k, v of _OS.setting.system.pkgpaths) }
|
||||
}, f
|
||||
|
||||
setting: (f) ->
|
||||
_API.handler.setting f
|
||||
search: (text) ->
|
||||
r = []
|
||||
|
||||
@ -228,6 +350,18 @@ self.OS.API =
|
||||
onsearch: (name, fn) ->
|
||||
self.OS.API.searchHandler[name] = fn unless self.OS.API.searchHandler[name]
|
||||
|
||||
setLocale: (name, f) ->
|
||||
path = "resources/languages/#{name}.json"
|
||||
_API.get path, (d) ->
|
||||
_OS.setting.system.locale = name
|
||||
_API.lang = d
|
||||
if f then f() else _courrier.trigger "systemlocalechange", name
|
||||
, (e, s) ->
|
||||
#_OS.setting.system.locale = "en_GB"
|
||||
_courrier.oserror __("Language file {0} not found", path), e, s
|
||||
f() if f
|
||||
, "json"
|
||||
|
||||
throwe: (n) ->
|
||||
err = undefined
|
||||
try
|
||||
@ -235,4 +369,33 @@ self.OS.API =
|
||||
catch e
|
||||
err = e
|
||||
return "" if not err
|
||||
return err
|
||||
return err
|
||||
# utilities functioncs
|
||||
switcher: () ->
|
||||
o = {}
|
||||
p = {}
|
||||
p[arguments[i]] = false for i in [0..arguments.length - 1 ]
|
||||
Object.defineProperty o, "__p", {
|
||||
enumerable: false,
|
||||
value: p
|
||||
}
|
||||
fn = (o, v) ->
|
||||
Object.defineProperty o, v, {
|
||||
enumerable: true,
|
||||
set: (value) ->
|
||||
for k,l of @__p
|
||||
@__p[k] = false
|
||||
o.__p[v] = value
|
||||
, get: () ->
|
||||
return o.__p[v]
|
||||
}
|
||||
for k, v of o.__p
|
||||
fn o, k
|
||||
Object.defineProperty o, "selected", {
|
||||
configurable: true,
|
||||
enumerable: false,
|
||||
get: () ->
|
||||
for k,v of o.__p
|
||||
return k if v
|
||||
}
|
||||
return o
|
@ -1,3 +1,22 @@
|
||||
# Copyright 2017-2018 Xuan Sang LE <xsang.le AT gmail DOT com>
|
||||
|
||||
# AnTOS Web desktop is is licensed under the GNU General Public
|
||||
# License v3.0, see the LICENCE file for more information
|
||||
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
|
||||
'use strict'
|
||||
#define the OS object
|
||||
self = this
|
||||
self.OS or=
|
||||
@ -15,7 +34,7 @@ self.OS or=
|
||||
courrier:
|
||||
observable: riot.observable()
|
||||
quota: 0
|
||||
listeners: new Object
|
||||
listeners: {}
|
||||
on: (e, f, a) ->
|
||||
_courrier.listeners[a.pid] = [] unless _courrier.listeners[a.pid]
|
||||
_courrier.listeners[a.pid].push { e: e, f: f }
|
||||
@ -33,7 +52,7 @@ self.OS or=
|
||||
return unless _courrier.listeners[app.pid] and _courrier.listeners[app.pid].length > 0
|
||||
_courrier.observable.off i.e, i.f for i in _courrier.listeners[app.pid]
|
||||
delete _courrier.listeners[app.pid]
|
||||
_courrier.listeners[app.pid] = []
|
||||
# _courrier.listeners[app.pid]
|
||||
getMID: () ->
|
||||
_courrier.quota += 1
|
||||
_courrier.quota
|
||||
@ -84,14 +103,17 @@ self.OS or=
|
||||
delete _PM.processes[app.name][i]
|
||||
_PM.processes[app.name].splice i, 1
|
||||
|
||||
killAll: (app) ->
|
||||
killAll: (app, force) ->
|
||||
return unless _PM.processes[app]
|
||||
tmp = []
|
||||
tmp.push a for a in _PM.processes[app]
|
||||
a.quit() for a in tmp
|
||||
a.quit(force) for a in _PM.processes[app]
|
||||
|
||||
cleanup: ->
|
||||
console.log "Clean up system"
|
||||
_PM.killAll a, true for a, v of _PM.processes
|
||||
_courrier.observable.off("*") if _courrier.observable
|
||||
$(window).off('keydown')
|
||||
($ "#workspace").off("mouseover")
|
||||
delete _courrier.observable
|
||||
($ "#wrapper").empty()
|
||||
_GUI.clearTheme()
|
||||
_courrier.observable = riot.observable()
|
||||
@ -123,7 +145,8 @@ self.OS or=
|
||||
exit: ->
|
||||
#do clean up first
|
||||
f() for n, f of _OS.cleanupHandlers
|
||||
_API.handler.setting () ->
|
||||
_API.handler.setting (r) ->
|
||||
_OS.cleanup()
|
||||
_API.handler.logout()
|
||||
onexit: (n, f) ->
|
||||
self.OS.cleanupHandlers[n] = f unless self.OS.cleanupHandlers[n]
|
@ -1,3 +1,21 @@
|
||||
# Copyright 2017-2018 Xuan Sang LE <xsang.le AT gmail DOT com>
|
||||
|
||||
# AnTOS Web desktop is is licensed under the GNU General Public
|
||||
# License v3.0, see the LICENCE file for more information
|
||||
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
|
||||
class DB
|
||||
constructor: (@table) ->
|
||||
|
||||
@ -5,7 +23,7 @@ class DB
|
||||
_API.handler.dbquery "save", { table: @table, data: d }, f
|
||||
delete: (c, f) ->
|
||||
rq = { table: @table }
|
||||
return ( _courrier.oserror "Unknown condition for delete command",
|
||||
return ( _courrier.oserror __("VDB Unknown condition for delete command"),
|
||||
(_API.throwe "OS.DB"), c ) unless c and c isnt ""
|
||||
if isNaN c
|
||||
rq.cond = c
|
||||
|
@ -1,3 +1,21 @@
|
||||
# Copyright 2017-2018 Xuan Sang LE <xsang.le AT gmail DOT com>
|
||||
|
||||
# AnTOS Web desktop is is licensed under the GNU General Public
|
||||
# License v3.0, see the LICENCE file for more information
|
||||
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
|
||||
self.OS.GUI =
|
||||
subwindows: new Object()
|
||||
dialog: undefined
|
||||
@ -9,19 +27,32 @@ self.OS.GUI =
|
||||
META: {}
|
||||
SYS_MENU: [
|
||||
{
|
||||
text: "Applications",
|
||||
child: [],
|
||||
dataid: "sys-apps"
|
||||
iconclass: "fa fa-adn",
|
||||
text: "",
|
||||
iconclass: "fa fa-eercast",
|
||||
dataid: "sys-menu-root",
|
||||
child: [
|
||||
{
|
||||
text: "__(Applications)",
|
||||
child: [],
|
||||
dataid: "sys-apps"
|
||||
iconclass: "fa fa-adn",
|
||||
onmenuselect: (d) ->
|
||||
_GUI.launch d.item.data.app
|
||||
}
|
||||
],
|
||||
onmenuselect: (d) ->
|
||||
_GUI.launch d.item.data.app
|
||||
return _OS.exit() if d.item.data.dataid is "sys-logout"
|
||||
return _GUI.toggleFullscreen() if d.item.data.dataid is "os-fullsize"
|
||||
_GUI.launch d.item.data.app unless d.item.data.dataid
|
||||
}
|
||||
]
|
||||
htmlToScheme: (html, app, parent) ->
|
||||
scheme = $.parseHTML html
|
||||
|
||||
$(app.scheme).remove() if app.scheme
|
||||
($ parent).append scheme
|
||||
riot.mount ($ scheme), { observable: app.observable }
|
||||
app.scheme = scheme[0]
|
||||
riot.mount ($ scheme), { observable: app.observable }
|
||||
app.main()
|
||||
app.show()
|
||||
loadScheme: (path, app, parent) ->
|
||||
@ -54,7 +85,7 @@ self.OS.GUI =
|
||||
return
|
||||
if not _GUI.subwindows[d]
|
||||
ex = _API.throwe "Dialog"
|
||||
return _courrier.oserror "Dialog #{d} not found", ex, null
|
||||
return _courrier.oserror __("Dialog {0} not found", d), ex, null
|
||||
_GUI.dialog = new _GUI.subwindows[d]()
|
||||
_GUI.dialog.parent = _GUI
|
||||
_GUI.dialog.handler = f
|
||||
@ -73,7 +104,7 @@ self.OS.GUI =
|
||||
return _PM.createProcess srv, _OS.APP[srv] if _OS.APP[srv]
|
||||
(e, s) ->
|
||||
_courrier.trigger "srvroutineready", srv
|
||||
_courrier.osfail "Cannot read service script: #{srv} ", e, s
|
||||
_courrier.osfail __("Cannot read service script: {0}", srv), e, s
|
||||
|
||||
appsByMime: (mime) ->
|
||||
metas = ( v for k, v of _OS.setting.system.packages when v and v.app )
|
||||
@ -84,11 +115,12 @@ self.OS.GUI =
|
||||
try
|
||||
arr.filter (m, i) ->
|
||||
if mime.match (new RegExp m, "g")
|
||||
return false if (apps.indexOf metas[idx]) >= 0
|
||||
apps.push metas[idx]
|
||||
return false
|
||||
return false
|
||||
catch e
|
||||
_courrier.osfail "Find app by mimes #{mime}", e, mime
|
||||
_courrier.osfail __("Error find app by mimes {0}", mime), e, mime
|
||||
|
||||
( f m, i if m ) for m, i in mimes
|
||||
return apps
|
||||
@ -101,24 +133,27 @@ self.OS.GUI =
|
||||
openWith: (it) ->
|
||||
return unless it
|
||||
return _GUI.launch it.app if it.type is "app" and it.app
|
||||
return _courrier.osinfo "Application#{it.text} is not executable" if it.type is "app"
|
||||
return _courrier.osinfo __("Application {0} is not executable", it.text) if it.type is "app"
|
||||
apps = _GUI.appsByMime ( if it.type is "dir" then "dir" else it.mime )
|
||||
return _courrier.osinfo "No application available to open #{it.filename}" if apps.length is 0
|
||||
return _courrier.osinfo __("No application available to open {0}", it.filename) if apps.length is 0
|
||||
return _GUI.launch apps[0].app, [it.path] if apps.length is 1
|
||||
list = ( { text: e.app, icon: e.icon, iconclass: e.iconclass } for e in apps )
|
||||
_GUI.openDialog "SelectionDialog", ( d ) ->
|
||||
_GUI.launch d.text, [it.path]
|
||||
, "Open width", list
|
||||
, __("Open with"), list
|
||||
|
||||
forceLaunch: (app, args) ->
|
||||
console.log "This method is used for developing only, please use the launch method instead"
|
||||
_PM.killAll app
|
||||
($ _OS.APP[app].style).remove() if _OS.APP[app] and _OS.APP[app].style
|
||||
_OS.APP[app] = undefined
|
||||
console.warn "This method is used for developing only, please use the launch method instead"
|
||||
_GUI.unloadApp app
|
||||
_GUI.launch app, args
|
||||
|
||||
unloadApp: (app) ->
|
||||
_PM.killAll app, true
|
||||
($ _OS.APP[app].style).remove() if _OS.APP[app] and _OS.APP[app].style
|
||||
delete _OS.APP[app]
|
||||
|
||||
loadApp: (app, ok, err) ->
|
||||
path = "os:///packages/#{app}"
|
||||
path = "os://packages/#{app}"
|
||||
path = _OS.setting.system.packages[app].path if _OS.setting.system.packages[app].path
|
||||
js = path + "/main.js"
|
||||
|
||||
@ -152,6 +187,7 @@ self.OS.GUI =
|
||||
# now launch it
|
||||
if _OS.APP[app]
|
||||
_PM.createProcess app, _OS.APP[app], args
|
||||
|
||||
dock: (app, meta) ->
|
||||
# dock an application to a dock
|
||||
# create a data object
|
||||
@ -161,16 +197,19 @@ self.OS.GUI =
|
||||
app: app
|
||||
onbtclick: () -> app.toggle()
|
||||
# TODO: this path is not good, need to create a blob of it
|
||||
data.icon = "#{_API.handler.get}/#{meta.path}/#{meta.icon}" if meta.icon
|
||||
data.icon = "#{meta.path}/#{meta.icon}" if meta.icon
|
||||
# TODO: add default app icon class in system setting
|
||||
# so that it can be themed
|
||||
data.iconclass = "fa fa-cogs" if (not meta.icon) and (not meta.iconclass)
|
||||
dock = $ "#sysdock"
|
||||
app.init()
|
||||
app.one "rendered", () ->
|
||||
dock.get(0).newapp data
|
||||
app.sysdock = dock.get(0)
|
||||
app.appmenu = ($ "[data-id = 'appmenu']", "#syspanel")[0]
|
||||
app.init()
|
||||
app.subscribe "systemlocalechange", (name) -> app.update()
|
||||
app.subscribe "appregistry", ( m ) ->
|
||||
app.applySetting m.data.m if (m.name is app.name)
|
||||
|
||||
toggleFullscreen: () ->
|
||||
el = ($ "body")[0]
|
||||
@ -191,6 +230,7 @@ self.OS.GUI =
|
||||
attachservice: (srv) ->
|
||||
($ "#syspanel")[0].attachservice srv
|
||||
srv.init()
|
||||
srv.subscribe "systemlocalechange", (name) -> srv.update()
|
||||
detachservice: (srv) ->
|
||||
($ "#syspanel")[0].detachservice srv
|
||||
bindContextMenu: (event) ->
|
||||
@ -210,10 +250,42 @@ self.OS.GUI =
|
||||
c = arr[1].toUpperCase()
|
||||
return unless _GUI.shortcut[fnk]
|
||||
_GUI.shortcut[fnk][c] = f
|
||||
|
||||
|
||||
wallpaper: (obj) ->
|
||||
if obj
|
||||
_OS.setting.appearance.wp = obj
|
||||
wp = _OS.setting.appearance.wp
|
||||
$("body").css("background-image", "url(#{_API.handler.get}/#{wp.url})" )
|
||||
.css("background-size", wp.size)
|
||||
.css("background-repeat", wp.repeat)
|
||||
|
||||
showTooltip: (el, text, e) ->
|
||||
el = el[0]
|
||||
label = ($ "#systooltip")[0]
|
||||
$("#workspace").on "mousemove", (ev) ->
|
||||
if $(ev.target).closest(el).length is 0
|
||||
$(label).hide()
|
||||
$("#workspace").off "mousemove"
|
||||
arr = text.split /:(.+)/
|
||||
tip = text
|
||||
tip = arr[1] if arr.length > 1
|
||||
offset = $(el).offset()
|
||||
w = $(el).width()
|
||||
h = $(el).height()
|
||||
label.set "text", tip
|
||||
$(label).show()
|
||||
switch arr[0]
|
||||
when "cr" # center right of the element
|
||||
left = offset.left + w + 5
|
||||
top = offset.top + h / 2 - $(label).height() / 2
|
||||
$(label).css "top", top + "px"
|
||||
.css "left", left + "px"
|
||||
else
|
||||
return unless e
|
||||
$(label).css "top", e.clientY + 5 + "px"
|
||||
.css "left", e.clientX + 5 + "px"
|
||||
|
||||
initDM: ->
|
||||
($ document).on 'webkitfullscreenchange mozfullscreenchange fullscreenchange MSFullscreenChange', ()->
|
||||
_GUI.fullscreen = not _GUI.fullscreen
|
||||
# check login first
|
||||
_API.resource "schemes/dm.html", (x) ->
|
||||
return null unless x
|
||||
@ -246,17 +318,23 @@ self.OS.GUI =
|
||||
event.preventDefault()
|
||||
# system menu and dock
|
||||
riot.mount ($ "#syspanel", $ "#wrapper")
|
||||
riot.mount ($ "#sysdock", $ "#wrapper"), { items: [] }
|
||||
|
||||
riot.mount ($ "#sysdock", $ "#workspace"), { items: [] }
|
||||
riot.mount ($ "#systooltip", $ "#wrapper")
|
||||
# context menu
|
||||
riot.mount ($ "#contextmenu")
|
||||
riot.mount ($ "#contextmenu", $ "#wrapper")
|
||||
($ "#workspace").contextmenu (e) -> _GUI.bindContextMenu e
|
||||
# tooltip
|
||||
($ "#workspace").mouseover (e) ->
|
||||
el = $(e.target).closest "[tooltip]"
|
||||
return unless el.length > 0
|
||||
_GUI.showTooltip el, ($(el).attr "tooltip"), e
|
||||
|
||||
# desktop default file manager
|
||||
desktop = $ "#desktop"
|
||||
fp = _OS.setting.desktop.path.asFileHandler()
|
||||
desktop[0].fetch = () ->
|
||||
fn = () ->
|
||||
fp = _OS.setting.desktop.path.asFileHandler()
|
||||
fp.read (d) ->
|
||||
return _courrier.osfail d.error, (_API.throwe "OS.VFS"), d.error if d.error
|
||||
items = []
|
||||
@ -305,8 +383,8 @@ self.OS.GUI =
|
||||
desktop[0].set "selected", -1 if e.target is desktop[0]
|
||||
($ "#sysdock").get(0).set "selectedApp", null
|
||||
menu = [
|
||||
{ text: "Open", dataid: "desktop-open" },
|
||||
{ text: "Refresh", dataid: "desktop-refresh" }
|
||||
{ text: __("Open"), dataid: "desktop-open" },
|
||||
{ text: __("Refresh"), dataid: "desktop-refresh" }
|
||||
]
|
||||
menu = menu.concat ( v for k, v of _OS.setting.desktop.menu)
|
||||
m.set "items", menu
|
||||
@ -331,40 +409,34 @@ self.OS.GUI =
|
||||
# mount it
|
||||
riot.mount desktop
|
||||
, (e, s) ->
|
||||
alert "System fall: Cannot init desktop manager"
|
||||
alert __("System fail: Cannot init desktop manager")
|
||||
console.log s, e
|
||||
|
||||
refreshDesktop: () ->
|
||||
($ "#desktop")[0].fetch()
|
||||
|
||||
refreshSystemMenu: () ->
|
||||
_GUI.SYS_MENU.length = 1
|
||||
_GUI.SYS_MENU[0].child.length = 0
|
||||
_GUI.SYS_MENU[0].child.push v for k, v of _OS.setting.system.packages when (v and v.app)
|
||||
_GUI.SYS_MENU.push v for k, v of _OS.setting.system.menu
|
||||
_GUI.SYS_MENU.push
|
||||
text: "Toggle Full screen",
|
||||
_GUI.SYS_MENU[0].child.length = 1
|
||||
_GUI.SYS_MENU[0].child[0].child.length = 0
|
||||
_GUI.SYS_MENU[0].child[0].child.push v for k, v of _OS.setting.system.packages when (v and v.app)
|
||||
_GUI.SYS_MENU[0].child.push v for k, v of _OS.setting.system.menu
|
||||
_GUI.SYS_MENU[0].child.push
|
||||
text: "__(Toggle Full screen)",
|
||||
dataid: "os-fullsize",
|
||||
iconclass: "fa fa-tv"
|
||||
_GUI.SYS_MENU.push
|
||||
text: "Log out",
|
||||
_GUI.SYS_MENU[0].child.push
|
||||
text: "__(Log out)",
|
||||
dataid: "sys-logout",
|
||||
iconclass: "fa fa-user-times"
|
||||
($ "[data-id = 'os_menu']", "#syspanel")[0].update()
|
||||
buildSystemMenu: () ->
|
||||
menu =
|
||||
text: ""
|
||||
iconclass: "fa fa-eercast"
|
||||
dataid: "sys-menu-root"
|
||||
child: _GUI.SYS_MENU
|
||||
menu.onmenuselect = (d) ->
|
||||
return _OS.exit() if d.item.data.dataid is "sys-logout"
|
||||
return _GUI.toggleFullscreen() if d.item.data.dataid is "os-fullsize"
|
||||
_GUI.launch d.item.data.app unless d.item.data.dataid
|
||||
menu = [menu]
|
||||
($ "[data-id = 'os_menu']", "#syspanel")[0].set "items", menu
|
||||
($ "[data-id = 'os_menu']", "#syspanel")[0].set "items", _GUI.SYS_MENU
|
||||
|
||||
#console.log menu
|
||||
|
||||
|
||||
mkdialog: (conf) ->
|
||||
return new _GUI.BasicDialog conf.name, conf.layout
|
||||
|
||||
login: () ->
|
||||
_OS.cleanup()
|
||||
_API.resource "schemes/login.html", (x) ->
|
||||
return null unless x
|
||||
scheme = $.parseHTML x
|
||||
@ -378,20 +450,22 @@ self.OS.GUI =
|
||||
($ "#txtpass").keyup (e) ->
|
||||
($ "#btlogin").click() if e.which is 13
|
||||
, (e, s) ->
|
||||
alert "System fall: Cannot init login screen"
|
||||
alert __("System fail: Cannot init login screen")
|
||||
|
||||
startAntOS: (conf) ->
|
||||
# clean up things
|
||||
_OS.cleanup()
|
||||
# get setting from conf
|
||||
_OS.systemSetting(conf)
|
||||
_OS.systemSetting conf
|
||||
#console.log _OS.setting
|
||||
# load theme
|
||||
_GUI.loadTheme _OS.setting.appearance.theme
|
||||
# initDM
|
||||
_GUI.initDM()
|
||||
_GUI.wallpaper()
|
||||
_courrier.observable.one "syspanelloaded", () ->
|
||||
# TODO load packages list then build system menu
|
||||
_courrier.observable.on "systemlocalechange", (name) ->
|
||||
($ "#syspanel")[0].update()
|
||||
|
||||
_API.packages.cache (ret) ->
|
||||
if ret.result
|
||||
_API.packages.fetch (r) ->
|
||||
@ -401,6 +475,7 @@ self.OS.GUI =
|
||||
v.filename = k
|
||||
v.type = "app"
|
||||
v.mime = "antos/app"
|
||||
v.icon = "#{v.path}/#{v.icon}" if v.icon
|
||||
v.iconclass = "fa fa-adn" unless v.iconclass or v.icon
|
||||
_OS.setting.system.packages = if r.result then r.result else
|
||||
_GUI.refreshSystemMenu()
|
||||
@ -409,4 +484,7 @@ self.OS.GUI =
|
||||
# TODO: get services list from user setting
|
||||
_GUI.pushServices (v for v in _OS.setting.system.startup.services)
|
||||
(_GUI.launch a) for a in _OS.setting.system.startup.apps
|
||||
#_GUI.launch "DummyApp"
|
||||
#_GUI.launch "DummyApp"
|
||||
# initDM
|
||||
_API.setLocale _OS.setting.system.locale, () ->
|
||||
_GUI.initDM()
|
@ -1,3 +1,20 @@
|
||||
# Copyright 2017-2018 Xuan Sang LE <xsang.le AT gmail DOT com>
|
||||
|
||||
# AnTOS Web desktop is is licensed under the GNU General Public
|
||||
# License v3.0, see the LICENCE file for more information
|
||||
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
self.OS.API.HOST = self.location.hostname+ (if self.location.port then":#{self.location.port}" else "")
|
||||
self.OS.API.REST = "#{self.location.protocol}//#{self.OS.API.HOST}/lua-api/os"
|
||||
|
||||
@ -10,36 +27,36 @@ self.OS.API.handler =
|
||||
scandir: (p, c ) ->
|
||||
path = "#{_REST}/fs/scandir"
|
||||
_API.post path, { path: p }, c, (e, s) ->
|
||||
_courrier.osfail "Fail to scan directory: #{p}", e, s
|
||||
_courrier.osfail __("Fail to scan directory: {0}", p), e, s
|
||||
mkdir: (p, c ) ->
|
||||
path = "#{_REST}/fs/mkdir"
|
||||
_API.post path, { path: p }, c, (e, s) ->
|
||||
_courrier.osfail "Fail to create directory: #{p}", e, s
|
||||
_courrier.osfail __("Fail to create directory: {0}", p), e, s
|
||||
sharefile: (p, pub , c) ->
|
||||
path = "#{_REST}/fs/publish"
|
||||
_API.post path, { path: p , publish: pub }, c, (e, s) ->
|
||||
_courrier.osfail "Fail to publish file: #{p}", e, s
|
||||
_courrier.osfail __("Fail to publish file: {0}", p), e, s
|
||||
|
||||
fileinfo: (p, c) ->
|
||||
path = "#{_REST}/fs/fileinfo"
|
||||
_API.post path, { path: p }, c, (e, s) ->
|
||||
_courrier.osfail "Fail to get file metadata: #{p}", e, s
|
||||
_courrier.osfail __("Fail to get file meta data: {0}", p), e, s
|
||||
|
||||
readfile: (p, c, t) ->
|
||||
path = "#{_REST}/fs/get/"
|
||||
_API.get path + p, c, (e, s) ->
|
||||
_courrier.osfail "Fail to read file: #{p}", e, s
|
||||
_courrier.osfail __("Fail to read file: {0}", p), e, s
|
||||
, t
|
||||
|
||||
move: (s, d, c) ->
|
||||
path = "#{_REST}/fs/move"
|
||||
_API.post path, { src: s, dest: d }, c, (e, s) ->
|
||||
_courrier.osfail "Fail to move file: #{s} -> #{d}", e, s
|
||||
_courrier.osfail __("Fail to move file: {0} -> {1}", s, d), e, s
|
||||
|
||||
delete: (p , c) ->
|
||||
path = "#{_REST}/fs/delete"
|
||||
_API.post path, { path: p }, c, (e, s) ->
|
||||
_courrier.osfail "Fail to delete: #{p}", e, s
|
||||
_courrier.osfail __("Fail to delete: {0}", p), e, s
|
||||
|
||||
fileblob: (p, c) ->
|
||||
path = "#{_REST}/fs/get/"
|
||||
@ -49,44 +66,46 @@ self.OS.API.handler =
|
||||
packages: (d, c) ->
|
||||
path = "#{_REST}/system/packages"
|
||||
_API.post path, d, c, (e, s) ->
|
||||
_courrier.osfail "Fail to #{d.command} package", e, s
|
||||
_courrier.osfail __("Fail to {0} package", d.command), e, s
|
||||
|
||||
upload: (d, c) ->
|
||||
path = "#{_REST}/fs/upload"
|
||||
_API.upload path, d, c, (e, s) ->
|
||||
_courrier.osfail "Fail to upload file to: #{d}", e, s
|
||||
_courrier.osfail __("Fail to upload file to: {0}", d), e, s
|
||||
|
||||
write: (p, d , c) ->
|
||||
path = "#{_REST}/fs/write"
|
||||
_API.post path, { path: p, data: d }, c, (e, s) ->
|
||||
_courrier.osfail "Fail to write to file: #{p}", e, s
|
||||
_courrier.osfail __("Fail to write to file: {0}", p), e, s
|
||||
|
||||
scanapp: (p, c ) ->
|
||||
path = "#{_REST}/system/application"
|
||||
auth: (c) ->
|
||||
p = "#{_REST}/system/auth"
|
||||
_API.post p, {}, c, () ->
|
||||
alert "Resource not found: #{p}"
|
||||
_API.post p, {}, c, (e, s) ->
|
||||
console.log e, s
|
||||
alert __("Resource not found: {0}", p)
|
||||
login: (d, c) ->
|
||||
p = "#{_REST}/system/login"
|
||||
_API.post p, d, c, () ->
|
||||
alert "Resource not found: #{p}"
|
||||
alert __("Resource not found: {0}", p)
|
||||
logout: () ->
|
||||
p = "#{_REST}/system/logout"
|
||||
_API.post p, {}, (d) ->
|
||||
_OS.boot()
|
||||
, () ->
|
||||
alert "Resource not found #{p}"
|
||||
alert __("Resource not found: {0}", p)
|
||||
setting: (f) ->
|
||||
p = "#{_REST}/system/settings"
|
||||
_API.post p, _OS.setting, (d) ->
|
||||
_courrier.oserror "Cannot save system setting", d.error if d.error
|
||||
f() if f
|
||||
_courrier.oserror __("Cannot save system setting"), d.error if d.error
|
||||
f(d) if f
|
||||
, (e, s) ->
|
||||
_courrier.osfail "Fail to make request: #{p}", e, s
|
||||
f() if f
|
||||
m = __("Fail to make request: {0}", p)
|
||||
_courrier.osfail m , e, s
|
||||
f({ error: m }) if f
|
||||
|
||||
dbquery: (cmd, d, c) ->
|
||||
path = "#{_REST}/db/#{cmd}"
|
||||
_API.post path, d, c, (e, s) ->
|
||||
_courrier.osfail "Fail to query data from database: #{path}", e, s
|
||||
_courrier.osfail __("Fail to query data from database: {0}", path), e, s
|
@ -1,3 +1,20 @@
|
||||
# Copyright 2017-2018 Xuan Sang LE <xsang.le AT gmail DOT com>
|
||||
|
||||
# AnTOS Web desktop is is licensed under the GNU General Public
|
||||
# License v3.0, see the LICENCE file for more information
|
||||
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
self.OS.API.handler =
|
||||
scandir: (p, c ) ->
|
||||
path = 'resources/jsons/scandir.json'
|
||||
|
217
src/core/languages/en_GB.json
Normal file
217
src/core/languages/en_GB.json
Normal file
@ -0,0 +1,217 @@
|
||||
{
|
||||
"About":"About",
|
||||
"About: {0}":"About: {0}",
|
||||
"Add category":"Add category",
|
||||
"Add repository":"Add repository",
|
||||
"Address":"Address",
|
||||
"Alive (ms)":"Alive (ms)",
|
||||
"Application installed":"Application installed",
|
||||
"Application {0} is not executable":"Application {0} is not executable",
|
||||
"Application":"Application",
|
||||
"Applications":"Applications",
|
||||
"April":"April",
|
||||
"August":"August",
|
||||
"Authentication":"Authentication",
|
||||
"Cancel":"Cancel",
|
||||
"Cannot Edit category":"Cannot Edit category",
|
||||
"Cannot add new category":"Cannot add new category",
|
||||
"Cannot create {0}":"Cannot create {0}",
|
||||
"Cannot delete all content of: {0} [{1}]":"Cannot delete all content of: {0} [{1}]",
|
||||
"Cannot delete the category: {0} [{1}]":"Cannot delete the category: {0} [{1}]",
|
||||
"Cannot delete the section: {0}":"Cannot delete the section: {0}",
|
||||
"Cannot delete: {0}":"Cannot delete: {0}",
|
||||
"Cannot down load the app {0}":"Cannot down load the app {0}",
|
||||
"Cannot export file for embedding to text":"Cannot export file for embedding to text",
|
||||
"Cannot fetch CV categories":"Cannot fetch CV categories",
|
||||
"Cannot fetch the entry content":"Cannot fetch the entry content",
|
||||
"Cannot fetch user data":"Cannot fetch user data",
|
||||
"Cannot install {0}":"Cannot install {0}",
|
||||
"Cannot load 3rd library at: {0}":"Cannot load 3rd library at: {0}",
|
||||
"Cannot move section":"Cannot move section",
|
||||
"Cannot read service script: {0}":"Cannot read service script: {0}",
|
||||
"Cannot render the PDF file":"Cannot render the PDF file",
|
||||
"Cannot save blog: {0}":"Cannot save blog: {0}",
|
||||
"Cannot save section: {0}":"Cannot save section: {0}",
|
||||
"Cannot save system setting":"Cannot save system setting",
|
||||
"Cannot save user data":"Cannot save user data",
|
||||
"Cannot share file: {0}":"Cannot share file: {0}",
|
||||
"Cannot uninstall package: {0}":"Cannot uninstall package: {0}",
|
||||
"Categories":"Categories",
|
||||
"Clear all":"Clear all",
|
||||
"Close tab":"Close tab",
|
||||
"Close without saving ?":"Close without saving ?",
|
||||
"Close":"Close",
|
||||
"Copy not yet implemented":"Copy not yet implemented",
|
||||
"Copy":"Copy",
|
||||
"Created: {0}":"Created: {0}",
|
||||
"Cut":"Cut",
|
||||
"December":"December",
|
||||
"Delete a post":"Delete a post",
|
||||
"Delete category":"Delete category",
|
||||
"Delete section":"Delete section",
|
||||
"Delete":"Delete",
|
||||
"Desktop":"Desktop",
|
||||
"Dialog {0} not found":"Dialog {0} not found",
|
||||
"Do you really want to delete this post ?":"Do you really want to delete this post ?",
|
||||
"Do you really want to delete: {0}?":"Do you really want to delete: {0}?",
|
||||
"Download":"Download",
|
||||
"Edit category":"Edit category",
|
||||
"Edit repository":"Edit repository",
|
||||
"Edit":"Edit",
|
||||
"Email":"Email",
|
||||
"Error find app by mimes {0}":"Error find app by mimes {0}",
|
||||
"Error reading package meta data: {0}":"Error reading package meta data: {0}",
|
||||
"Error saving file {0}":"Error saving file {0}",
|
||||
"Exit":"Exit",
|
||||
"Fail to create directory: {0}":"Fail to create directory: {0}",
|
||||
"Fail to create {0}: {1}":"Fail to create {0}: {1}",
|
||||
"Fail to delete {0}: {1}":"Fail to delete {0}: {1}",
|
||||
"Fail to delete: {0}":"Fail to delete: {0}",
|
||||
"Fail to fetch packages list from: {0}":"Fail to fetch packages list from: {0}",
|
||||
"Fail to get file meta data: {0}":"Fail to get file meta data: {0}",
|
||||
"Fail to make request: {0}":"Fail to make request: {0}",
|
||||
"Fail to move file: {0} -> {1}":"Fail to move file: {0} -> {1}",
|
||||
"Fail to paste: {0}":"Fail to paste: {0}",
|
||||
"Fail to publish file: {0}":"Fail to publish file: {0}",
|
||||
"Fail to query data from database: {0}":"Fail to query data from database: {0}",
|
||||
"Fail to read file: {0}":"Fail to read file: {0}",
|
||||
"Fail to rename to {0}: {1}":"Fail to rename to {0}: {1}",
|
||||
"Fail to scan directory: {0}":"Fail to scan directory: {0}",
|
||||
"Fail to upload file to: {0}":"Fail to upload file to: {0}",
|
||||
"Fail to upload to {0}: {1}":"Fail to upload to {0}: {1}",
|
||||
"Fail to write to file: {0}":"Fail to write to file: {0}",
|
||||
"Fail to {0} package":"Fail to {0} package",
|
||||
"February":"February",
|
||||
"File name":"File name",
|
||||
"File not found {0}":"File not found {0}",
|
||||
"File {0} copied":"File {0} copied",
|
||||
"File {0} cut":"File {0} cut",
|
||||
"File":"File",
|
||||
"Folder name":"Folder name",
|
||||
"Format : [name] url":"Format : [name] url",
|
||||
"Found {0} sections":"Found {0} sections",
|
||||
"Fri":"Fri",
|
||||
"From":"From",
|
||||
"Full name must be entered":"Full name must be entered",
|
||||
"Full name":"Full name",
|
||||
"Google Drive":"Google Drive",
|
||||
"Hidden files":"Hidden files",
|
||||
"Home":"Home",
|
||||
"Icon view":"Icon view",
|
||||
"Ignore all {0} unsaved files ?":"Ignore all {0} unsaved files ?",
|
||||
"Install":"Install",
|
||||
"Invalid package: Meta data file not found":"Invalid package: Meta data file not found",
|
||||
"January":"January",
|
||||
"July":"July",
|
||||
"June":"June",
|
||||
"Kill process":"Kill process",
|
||||
"Language file {0} not found":"Language file {0} not found",
|
||||
"Launch":"Launch",
|
||||
"List view":"List view",
|
||||
"Location":"Location",
|
||||
"Log out":"Log out",
|
||||
"Logout":"Logout",
|
||||
"March":"March",
|
||||
"May":"May",
|
||||
"Mime type {0} is not supported":"Mime type {0} is not supported",
|
||||
"Modify section entry":"Modify section entry",
|
||||
"Mon":"Mon",
|
||||
"Move to":"Move to",
|
||||
"Name":"Name",
|
||||
"Navigation bar":"Navigation bar",
|
||||
"New file":"New file",
|
||||
"New folder":"New folder",
|
||||
"New section entry for {0}":"New section entry for {0}",
|
||||
"New":"New",
|
||||
"No application available to open {0}":"No application available to open {0}",
|
||||
"No post found: {0}":"No post found: {0}",
|
||||
"No":"No",
|
||||
"November":"November",
|
||||
"OS":"OS",
|
||||
"October":"October",
|
||||
"Ok":"Ok",
|
||||
"Only {0} could be selected":"Only {0} could be selected",
|
||||
"Open file":"Open file",
|
||||
"Open with":"Open with",
|
||||
"Open":"Open",
|
||||
"Options":"Options",
|
||||
"Package uninstalled":"Package uninstalled",
|
||||
"Parent can not be the category itself":"Parent can not be the category itself",
|
||||
"Paste":"Paste",
|
||||
"Phone":"Phone",
|
||||
"Pid":"Pid",
|
||||
"Please enter category name":"Please enter category name",
|
||||
"Please enter tags":"Please enter tags",
|
||||
"Please insert a title in the text: beginning with heading":"Please insert a title in the text: beginning with heading",
|
||||
"Please select a category":"Please select a category",
|
||||
"Please select a date":"Please select a date",
|
||||
"Please select a file":"Please select a file",
|
||||
"Please select a parent category":"Please select a parent category",
|
||||
"Please select a section to edit":"Please select a section to edit",
|
||||
"Please select a section to move":"Please select a section to move",
|
||||
"Preview":"Preview",
|
||||
"Properties":"Properties",
|
||||
"Quit without saving ?":"Quit without saving ?",
|
||||
"Quit":"Quit",
|
||||
"Read more":"Read more",
|
||||
"Refresh":"Refresh",
|
||||
"Rename":"Rename",
|
||||
"Repositories":"Repositories",
|
||||
"Resource not found {0}":"Resource not found {0}",
|
||||
"Resource not found: {0}":"Resource not found: {0}",
|
||||
"Row {0}, col {1}, lines: {2}":"Row {0}, col {1}, lines: {2}",
|
||||
"Sat":"Sat",
|
||||
"Save as":"Save as",
|
||||
"Save":"Save",
|
||||
"Section list is empty, please add one":"Section list is empty, please add one",
|
||||
"Select image file":"Select image file",
|
||||
"Selected: {0} ({1} bytes)":"Selected: {0} ({1} bytes)",
|
||||
"September":"September",
|
||||
"Service":"Service",
|
||||
"Share file":"Share file",
|
||||
"Shared url: {0}":"Shared url: {0}",
|
||||
"Shared":"Shared",
|
||||
"Short biblio":"Short biblio",
|
||||
"Sidebar":"Sidebar",
|
||||
"Size":"Size",
|
||||
"Subtitle":"Subtitle",
|
||||
"Sun":"Sun",
|
||||
"System fail: Cannot init desktop manager":"System fail: Cannot init desktop manager",
|
||||
"System fail: Cannot init login screen":"System fail: Cannot init login screen",
|
||||
"Tags":"Tags",
|
||||
"This feature is not implemented yet":"This feature is not implemented yet",
|
||||
"Thu":"Thu",
|
||||
"Title or content must not be blank":"Title or content must not be blank",
|
||||
"Title":"Title",
|
||||
"Toggle Full screen":"Toggle Full screen",
|
||||
"Tree view":"Tree view",
|
||||
"Tue":"Tue",
|
||||
"Type":"Type",
|
||||
"Uninstall : {0}?":"Uninstall : {0}?",
|
||||
"Uninstall":"Uninstall",
|
||||
"Unknown API setting for {0}":"Unknown API setting for {0}",
|
||||
"Updated: {0}":"Updated: {0}",
|
||||
"Upload":"Upload",
|
||||
"Url":"Url",
|
||||
"User abort the authentication":"User abort the authentication",
|
||||
"User data updated":"User data updated",
|
||||
"VDB Unknown condition for delete command":"VDB Unknown condition for delete command",
|
||||
"VFS Cannot encode file: {0}":"VFS Cannot encode file: {0}",
|
||||
"VFS cannot create : {0}":"VFS cannot create : {0}",
|
||||
"VFS cannot delete : {0}":"VFS cannot delete : {0}",
|
||||
"VFS cannot download file : {0}":"VFS cannot download file : {0}",
|
||||
"VFS cannot get meta data for {0}":"VFS cannot get meta data for {0}",
|
||||
"VFS cannot init {0}: {1}":"VFS cannot init {0}: {1}",
|
||||
"VFS cannot move : {0}":"VFS cannot move : {0}",
|
||||
"VFS cannot read : {0}":"VFS cannot read : {0}",
|
||||
"VFS cannot save : {0}":"VFS cannot save : {0}",
|
||||
"VFS cannot write : {0}":"VFS cannot write : {0}",
|
||||
"VFS unknown action: {0}":"VFS unknown action: {0}",
|
||||
"VFS unknown handler: {0}":"VFS unknown handler: {0}",
|
||||
"View":"View",
|
||||
"Wed":"Wed",
|
||||
"Would you like to login to {0}?":"Would you like to login to {0}?",
|
||||
"Wrong format: it should be [name] url":"Wrong format: it should be [name] url",
|
||||
"Yes":"Yes",
|
||||
"{0} is not a directory":"{0} is not a directory"
|
||||
}
|
217
src/core/languages/en_GB.json.old
Normal file
217
src/core/languages/en_GB.json.old
Normal file
@ -0,0 +1,217 @@
|
||||
{
|
||||
"About":"About",
|
||||
"About: {0}":"About: {0}",
|
||||
"Add category":"Add category",
|
||||
"Add repository":"Add repository",
|
||||
"Address":"Address",
|
||||
"Alive (ms)":"Alive (ms)",
|
||||
"Application installed":"Application installed",
|
||||
"Application {0} is not executable":"Application {0} is not executable",
|
||||
"Application":"Application",
|
||||
"Applications":"Applications",
|
||||
"April":"April",
|
||||
"August":"August",
|
||||
"Authentication":"Authentication",
|
||||
"Cancel":"Cancel",
|
||||
"Cannot Edit category":"Cannot Edit category",
|
||||
"Cannot add new category":"Cannot add new category",
|
||||
"Cannot create {0}":"Cannot create {0}",
|
||||
"Cannot delete all content of: {0} [{1}]":"Cannot delete all content of: {0} [{1}]",
|
||||
"Cannot delete the category: {0} [{1}]":"Cannot delete the category: {0} [{1}]",
|
||||
"Cannot delete the section: {0}":"Cannot delete the section: {0}",
|
||||
"Cannot delete: {0}":"Cannot delete: {0}",
|
||||
"Cannot down load the app {0}":"Cannot down load the app {0}",
|
||||
"Cannot export file for embedding to text":"Cannot export file for embedding to text",
|
||||
"Cannot fetch CV categories":"Cannot fetch CV categories",
|
||||
"Cannot fetch the entry content":"Cannot fetch the entry content",
|
||||
"Cannot fetch user data":"Cannot fetch user data",
|
||||
"Cannot install {0}":"Cannot install {0}",
|
||||
"Cannot load 3rd library at: {0}":"Cannot load 3rd library at: {0}",
|
||||
"Cannot move section":"Cannot move section",
|
||||
"Cannot read service script: {0}":"Cannot read service script: {0}",
|
||||
"Cannot render the PDF file":"Cannot render the PDF file",
|
||||
"Cannot save blog: {0}":"Cannot save blog: {0}",
|
||||
"Cannot save section: {0}":"Cannot save section: {0}",
|
||||
"Cannot save system setting":"Cannot save system setting",
|
||||
"Cannot save user data":"Cannot save user data",
|
||||
"Cannot share file: {0}":"Cannot share file: {0}",
|
||||
"Cannot uninstall package: {0}":"Cannot uninstall package: {0}",
|
||||
"Categories":"Categories",
|
||||
"Clear all":"Clear all",
|
||||
"Close tab":"Close tab",
|
||||
"Close without saving ?":"Close without saving ?",
|
||||
"Close":"Close",
|
||||
"Copy not yet implemented":"Copy not yet implemented",
|
||||
"Copy":"Copy",
|
||||
"Created: {0}":"Created: {0}",
|
||||
"Cut":"Cut",
|
||||
"December":"December",
|
||||
"Delete a post":"Delete a post",
|
||||
"Delete category":"Delete category",
|
||||
"Delete section":"Delete section",
|
||||
"Delete":"Delete",
|
||||
"Desktop":"Desktop",
|
||||
"Dialog {0} not found":"Dialog {0} not found",
|
||||
"Do you really want to delete this post ?":"Do you really want to delete this post ?",
|
||||
"Do you really want to delete: {0}?":"Do you really want to delete: {0}?",
|
||||
"Download":"Download",
|
||||
"Edit category":"Edit category",
|
||||
"Edit repository":"Edit repository",
|
||||
"Edit":"Edit",
|
||||
"Email":"Email",
|
||||
"Error find app by mimes {0}":"Error find app by mimes {0}",
|
||||
"Error reading package meta data: {0}":"Error reading package meta data: {0}",
|
||||
"Error saving file {0}":"Error saving file {0}",
|
||||
"Exit":"Exit",
|
||||
"Fail to create directory: {0}":"Fail to create directory: {0}",
|
||||
"Fail to create {0}: {1}":"Fail to create {0}: {1}",
|
||||
"Fail to delete {0}: {1}":"Fail to delete {0}: {1}",
|
||||
"Fail to delete: {0}":"Fail to delete: {0}",
|
||||
"Fail to fetch packages list from: {0}":"Fail to fetch packages list from: {0}",
|
||||
"Fail to get file meta data: {0}":"Fail to get file meta data: {0}",
|
||||
"Fail to make request: {0}":"Fail to make request: {0}",
|
||||
"Fail to move file: {0} -> {1}":"Fail to move file: {0} -> {1}",
|
||||
"Fail to paste: {0}":"Fail to paste: {0}",
|
||||
"Fail to publish file: {0}":"Fail to publish file: {0}",
|
||||
"Fail to query data from database: {0}":"Fail to query data from database: {0}",
|
||||
"Fail to read file: {0}":"Fail to read file: {0}",
|
||||
"Fail to rename to {0}: {1}":"Fail to rename to {0}: {1}",
|
||||
"Fail to scan directory: {0}":"Fail to scan directory: {0}",
|
||||
"Fail to upload file to: {0}":"Fail to upload file to: {0}",
|
||||
"Fail to upload to {0}: {1}":"Fail to upload to {0}: {1}",
|
||||
"Fail to write to file: {0}":"Fail to write to file: {0}",
|
||||
"Fail to {0} package":"Fail to {0} package",
|
||||
"February":"February",
|
||||
"File name":"File name",
|
||||
"File not found {0}":"File not found {0}",
|
||||
"File {0} copied":"File {0} copied",
|
||||
"File {0} cut":"File {0} cut",
|
||||
"File":"File",
|
||||
"Folder name":"Folder name",
|
||||
"Format : [name] url":"Format : [name] url",
|
||||
"Found {0} sections":"Found {0} sections",
|
||||
"Fri":"Fri",
|
||||
"From":"From",
|
||||
"Full name must be entered":"Full name must be entered",
|
||||
"Full name":"Full name",
|
||||
"Google Drive":"Google Drive",
|
||||
"Hidden files":"Hidden files",
|
||||
"Home":"Home",
|
||||
"Icon view":"Icon view",
|
||||
"Ignore all {0} unsaved files ?":"Ignore all {0} unsaved files ?",
|
||||
"Install":"Install",
|
||||
"Invalid package: Meta data file not found":"Invalid package: Meta data file not found",
|
||||
"January":"January",
|
||||
"July":"July",
|
||||
"June":"June",
|
||||
"Kill process":"Kill process",
|
||||
"Language file {0} not found":"Language file {0} not found",
|
||||
"Launch":"Launch",
|
||||
"List view":"List view",
|
||||
"Location":"Location",
|
||||
"Log out":"Log out",
|
||||
"Logout":"Logout",
|
||||
"March":"March",
|
||||
"May":"May",
|
||||
"Mime type {0} is not supported":"Mime type {0} is not supported",
|
||||
"Modify section entry":"Modify section entry",
|
||||
"Mon":"Mon",
|
||||
"Move to":"Move to",
|
||||
"Name":"Name",
|
||||
"Navigation bar":"Navigation bar",
|
||||
"New file":"New file",
|
||||
"New folder":"New folder",
|
||||
"New section entry for {0}":"New section entry for {0}",
|
||||
"New":"New",
|
||||
"No application available to open {0}":"No application available to open {0}",
|
||||
"No post found: {0}":"No post found: {0}",
|
||||
"No":"No",
|
||||
"November":"November",
|
||||
"OS":"OS",
|
||||
"October":"October",
|
||||
"Ok":"Ok",
|
||||
"Only {0} could be selected":"Only {0} could be selected",
|
||||
"Open file":"Open file",
|
||||
"Open with":"Open with",
|
||||
"Open":"Open",
|
||||
"Options":"Options",
|
||||
"Package uninstalled":"Package uninstalled",
|
||||
"Parent can not be the category itself":"Parent can not be the category itself",
|
||||
"Paste":"Paste",
|
||||
"Phone":"Phone",
|
||||
"Pid":"Pid",
|
||||
"Please enter category name":"Please enter category name",
|
||||
"Please enter tags":"Please enter tags",
|
||||
"Please insert a title in the text: beginning with heading":"Please insert a title in the text: beginning with heading",
|
||||
"Please select a category":"Please select a category",
|
||||
"Please select a date":"Please select a date",
|
||||
"Please select a file":"Please select a file",
|
||||
"Please select a parent category":"Please select a parent category",
|
||||
"Please select a section to edit":"Please select a section to edit",
|
||||
"Please select a section to move":"Please select a section to move",
|
||||
"Preview":"Preview",
|
||||
"Properties":"Properties",
|
||||
"Quit without saving ?":"Quit without saving ?",
|
||||
"Quit":"Quit",
|
||||
"Read more":"Read more",
|
||||
"Refresh":"Refresh",
|
||||
"Rename":"Rename",
|
||||
"Repositories":"Repositories",
|
||||
"Resource not found {0}":"Resource not found {0}",
|
||||
"Resource not found: {0}":"Resource not found: {0}",
|
||||
"Row {0}, col {1}, lines: {2}":"Row {0}, col {1}, lines: {2}",
|
||||
"Sat":"Sat",
|
||||
"Save as":"Save as",
|
||||
"Save":"Save",
|
||||
"Section list is empty, please add one":"Section list is empty, please add one",
|
||||
"Select image file":"Select image file",
|
||||
"Selected: {0} ({1} bytes)":"Selected: {0} ({1} bytes)",
|
||||
"September":"September",
|
||||
"Service":"Service",
|
||||
"Share file":"Share file",
|
||||
"Shared url: {0}":"Shared url: {0}",
|
||||
"Shared":"Shared",
|
||||
"Short biblio":"Short biblio",
|
||||
"Sidebar":"Sidebar",
|
||||
"Size":"Size",
|
||||
"Subtitle":"Subtitle",
|
||||
"Sun":"Sun",
|
||||
"System fail: Cannot init desktop manager":"System fail: Cannot init desktop manager",
|
||||
"System fail: Cannot init login screen":"System fail: Cannot init login screen",
|
||||
"Tags":"Tags",
|
||||
"This feature is not implemented yet":"This feature is not implemented yet",
|
||||
"Thu":"Thu",
|
||||
"Title or content must not be blank":"Title or content must not be blank",
|
||||
"Title":"Title",
|
||||
"Toggle Full screen":"Toggle Full screen",
|
||||
"Tree view":"Tree view",
|
||||
"Tue":"Tue",
|
||||
"Type":"Type",
|
||||
"Uninstall : {0}?":"Uninstall : {0}?",
|
||||
"Uninstall":"Uninstall",
|
||||
"Unknown API setting for {0}":"Unknown API setting for {0}",
|
||||
"Updated: {0}":"Updated: {0}",
|
||||
"Upload":"Upload",
|
||||
"Url":"Url",
|
||||
"User abort the authentication":"User abort the authentication",
|
||||
"User data updated":"User data updated",
|
||||
"VDB Unknown condition for delete command":"VDB Unknown condition for delete command",
|
||||
"VFS Cannot encode file: {0}":"VFS Cannot encode file: {0}",
|
||||
"VFS cannot create : {0}":"VFS cannot create : {0}",
|
||||
"VFS cannot delete : {0}":"VFS cannot delete : {0}",
|
||||
"VFS cannot download file : {0}":"VFS cannot download file : {0}",
|
||||
"VFS cannot get meta data for {0}":"VFS cannot get meta data for {0}",
|
||||
"VFS cannot init {0}: {1}":"VFS cannot init {0}: {1}",
|
||||
"VFS cannot move : {0}":"VFS cannot move : {0}",
|
||||
"VFS cannot read : {0}":"VFS cannot read : {0}",
|
||||
"VFS cannot save : {0}":"VFS cannot save : {0}",
|
||||
"VFS cannot write : {0}":"VFS cannot write : {0}",
|
||||
"VFS unknown action: {0}":"VFS unknown action: {0}",
|
||||
"VFS unknown handler: {0}":"VFS unknown handler: {0}",
|
||||
"View":"View",
|
||||
"Wed":"Wed",
|
||||
"Would you like to login to {0}?":"Would you like to login to {0}?",
|
||||
"Wrong format: it should be [name] url":"Wrong format: it should be [name] url",
|
||||
"Yes":"Yes",
|
||||
"{0} is not a directory":"{0} is not a directory"
|
||||
}
|
307
src/core/languages/fr_FR.json
Normal file
307
src/core/languages/fr_FR.json
Normal file
@ -0,0 +1,307 @@
|
||||
{
|
||||
"About":"À propos de",
|
||||
"About: {0}":"À propos de: {0}",
|
||||
"Add category":"Ajouter une catégorie",
|
||||
"Add repository":"Ajouter un dépôt",
|
||||
"Address":"Adresse",
|
||||
"Alive (ms)":"Actif (ms)",
|
||||
"Application installed":"Application installée",
|
||||
"Application {0} is not executable":"L'application {0} n'est pas exécutable",
|
||||
"Application":"Application",
|
||||
"Applications":"Applications",
|
||||
"Authentication":"Authentification",
|
||||
"Cancel":"Annuler",
|
||||
"Cannot Edit category":"Impossible d'éditer la catégorie",
|
||||
"Cannot add new category":"Impossible d'ajouter une nouvelle catégorie",
|
||||
"Cannot create {0}":"Impossible de créer {0}",
|
||||
"Cannot delete all content of: {0} [{1}]":"Impossible de supprimer tout le contenu de: {0} [{1}]",
|
||||
"Cannot delete the category: {0} [{1}]":"Impossible de supprimer la catégorie: {0} [{1}]",
|
||||
"Cannot delete the section: {0}":"Impossible de supprimer la section: {0}",
|
||||
"Cannot delete: {0}":"Impossible de supprimer: {0}",
|
||||
"Cannot down load the app {0}":"Impossible de télécharger l'application {0}",
|
||||
"Cannot export file for embedding to text":"Impossible d'exporter le fichier pour l'intégrer au texte",
|
||||
"Cannot fetch CV categories":"Impossible d'extraire les catégories de CV",
|
||||
"Cannot fetch the entry content":"Impossible d'extraire le contenu",
|
||||
"Cannot fetch user data":"Impossible d'extraire les données utilisateur",
|
||||
"Cannot install {0}":"Impossible d'installer {0}",
|
||||
"Cannot load 3rd library at: {0}":"Impossible de charger la bibliothèque à: {0}",
|
||||
"Cannot move section":"Impossible de déplacer la section",
|
||||
"Cannot read service script: {0}":"Impossible de lire le script de service: {0}",
|
||||
"Cannot render the PDF file":"Impossible de rendre le fichier PDF",
|
||||
"Cannot save blog: {0}":"Impossible d'enregistrer le blog: {0}",
|
||||
"Cannot save section: {0}":"Impossible d'enregistrer la section: {0}",
|
||||
"Cannot save system setting":"Impossible d'enregistrer les paramètres du système",
|
||||
"Cannot save user data":"Impossible d'enregistrer les données utilisateur",
|
||||
"Cannot share file: {0}":"Impossible de partager le fichier: {0}",
|
||||
"Cannot uninstall package: {0}":"Impossible de désinstaller le package: {0}",
|
||||
"Categories":"Catégories",
|
||||
"Clear all":"Tout effacer",
|
||||
"Close tab":"Fermer l'onglet",
|
||||
"Close without saving ?":"Fermer sans enregistrer?",
|
||||
"Close":"Fermer",
|
||||
"Copy not yet implemented":"Copie non encore implémentée",
|
||||
"Copy":"Copier",
|
||||
"Created: {0}":"Créé: {0}",
|
||||
"Cut":"Couper",
|
||||
"Delete a post":"Supprimer le text",
|
||||
"Delete category":"Supprimer la catégorie",
|
||||
"Delete section":"Supprimer la section",
|
||||
"Delete":"Supprimer",
|
||||
"Desktop":"Bureau",
|
||||
"Dialog {0} not found":"La boîte de dialogue {0} n'a pas été trouvée",
|
||||
"Do you really want to delete this post ?":"Voulez-vous vraiment supprimer ce texte ?",
|
||||
"Do you really want to delete: {0}?":"Voulez-vous vraiment supprimer: {0}?",
|
||||
"Download":"Télécharger",
|
||||
"Edit category":"Modifier la catégorie",
|
||||
"Edit repository":"Modifier le dépôt",
|
||||
"Edit":"Modifier",
|
||||
"Email":"Email",
|
||||
"Error find app by mimes {0}":"Erreur lors de la recherche d'application par mimes {0}",
|
||||
"Error reading package meta data: {0}":"Erreur lors de la lecture des métadonnées du package: {0}",
|
||||
"Error saving file {0}":"Erreur lors de l'enregistrement du fichier {0}",
|
||||
"Exit":"Quitter",
|
||||
"Fail to create directory: {0}":"Impossible de créer le répertoire: {0}",
|
||||
"Fail to create {0}: {1}":"Échec de la création de {0}: {1}",
|
||||
"Fail to delete {0}: {1}":"Échec de la suppression de {0}: {1}",
|
||||
"Fail to delete: {0}":"Échec de la suppression: {0}",
|
||||
"Fail to fetch packages list from: {0}":"Impossible d'extraire la liste des paquets de: {0}",
|
||||
"Fail to get file meta data: {0}":"Échec d'obtention des métadonnées de fichier: {0}",
|
||||
"Fail to make request: {0}":"Echec de la demande: {0}",
|
||||
"Fail to move file: {0} -> {1}":"Échec du déplacement du fichier: {0} -> {1}",
|
||||
"Fail to paste: {0}":"Impossible de coller: {0}",
|
||||
"Fail to publish file: {0}":"Échec de la publication du fichier: {0}",
|
||||
"Fail to query data from database: {0}":"Impossible d'interroger les données de la base de données: {0}",
|
||||
"Fail to read file: {0}":"Impossible de lire le fichier: {0}",
|
||||
"Fail to rename to {0}: {1}":"Impossible de renommer en {0}: {1}",
|
||||
"Fail to scan directory: {0}":"Échec de l'analyse du répertoire: {0}",
|
||||
"Fail to upload file to: {0}":"Impossible de télécharger le fichier vers: {0}",
|
||||
"Fail to upload to {0}: {1}":"Impossible de télécharger vers {0}: {1}",
|
||||
"Fail to write to file: {0}":"Échec de l'écriture dans le fichier: {0}",
|
||||
"Fail to {0} package":"Échec du {0} paquet",
|
||||
"File name":"Nom de fichier",
|
||||
"File not found {0}":"Fichier introuvable {0}",
|
||||
"File {0} copied":"Fichier {0} copié",
|
||||
"File {0} cut":"Fichier {0} coupé",
|
||||
"File":"Fichier",
|
||||
"Folder name":"Nom de dossier",
|
||||
"Format : [name] url":"Format: [nom] url",
|
||||
"Found {0} sections":"{0} sections trouvées",
|
||||
"From":"De",
|
||||
"Full name must be entered":"Le nom complet doit être entré",
|
||||
"Full name":"Nom complet",
|
||||
"Google Drive":"Google Drive",
|
||||
"Hidden files":"Fichiers cachés",
|
||||
"Home":"Accueil",
|
||||
"Icon view":"Vue d'icône",
|
||||
"Ignore all {0} unsaved files ?":"Ignorer tous les {0} fichiers non enregistrés?",
|
||||
"Install":"Installer",
|
||||
"Invalid package: Meta data file not found":"Paquet invalide: Fichier de métadonnées non trouvé",
|
||||
"Kill process":"Tuer le processus",
|
||||
"Language file {0} not found":"Fichier de langue {0} introuvable",
|
||||
"Launch":"Lancer",
|
||||
"List view":"Vue de liste",
|
||||
"Location":"Localisation",
|
||||
"Log out":"Déconnecter",
|
||||
"Logout":"Déconnecter",
|
||||
"Mime type {0} is not supported":"Le type MIME {0} n'est pas supporté",
|
||||
"Modify section entry":"Modifier le texte",
|
||||
"Move to":"Déplacer vers",
|
||||
"Name":"Nom",
|
||||
"Navigation bar":"Barre de navigation",
|
||||
"New file":"Nouveau fichier",
|
||||
"New folder":"Nouveau dossier",
|
||||
"New section entry for {0}":"Nouvelle entrée de section pour {0}",
|
||||
"New":"Nouveau",
|
||||
"No application available to open {0}":"Aucune application disponible pour ouvrir {0}",
|
||||
"No post found: {0}":"Aucun texte trouvé: {0}",
|
||||
"No":"Non",
|
||||
"OS":"OS",
|
||||
"Ok":"Oui",
|
||||
"Only {0} could be selected":"Seul {0} peut être sélectionné",
|
||||
"Open file":"Ouvrir un fichier",
|
||||
"Open with":"Ouvrir avec",
|
||||
"Open":"Ouvrir",
|
||||
"Options":"Options",
|
||||
"Package uninstalled":"Package désinstallé",
|
||||
"Parent can not be the category itself":"Parent ne peut pas être la catégorie elle-même",
|
||||
"Paste":"Coller",
|
||||
"Phone":"Phone",
|
||||
"Pid":"Pid",
|
||||
"Please enter category name":"Veuillez entrer le nom de la catégorie",
|
||||
"Please enter tags":"Veuillez entrer les tags",
|
||||
"Please insert a title in the text: beginning with heading":"Veuillez insérer un titre dans le texte: en commençant par le heading",
|
||||
"Please select a category":"Veuillez sélectionner une catégorie",
|
||||
"Please select a date":"Veuillez sélectionner une date",
|
||||
"Please select a file":"Veuillez sélectionner un fichier",
|
||||
"Please select a parent category":"Veuillez sélectionner une catégorie parente",
|
||||
"Please select a section to edit":"Veuillez sélectionner une section à modifier",
|
||||
"Please select a section to move":"Veuillez sélectionner une section à déplacer",
|
||||
"Preview":"Aperçu",
|
||||
"Properties":"Propriétés",
|
||||
"Quit without saving ?":"Quitter sans sauvegarder ?",
|
||||
"Quit":"Quitter",
|
||||
"Read more":"Lire la suite",
|
||||
"Refresh":"Rafraîchir",
|
||||
"Rename":"Renommer",
|
||||
"Repositories":"Dépôts",
|
||||
"Resource not found {0}":"Ressource non trouvée {0}",
|
||||
"Resource not found: {0}":"Ressource non trouvée: {0}",
|
||||
"Row {0}, col {1}, lines: {2}":"Range {0}, col {1}, lignes: {2}",
|
||||
"Save as":"Enregistrer sous",
|
||||
"Save":"sauvegarder",
|
||||
"Section list is empty, please add one":"La liste des sections est vide, veuillez en ajouter une",
|
||||
"Select image file":"Sélectionnez le fichier image",
|
||||
"Service":"Service",
|
||||
"Share file":"Partagez le fichier",
|
||||
"Shared url: {0}":"URL partagée: {0}",
|
||||
"Shared":"partagé",
|
||||
"Short biblio":"Biblio court",
|
||||
"Sidebar":"Barre latérale",
|
||||
"Subtitle":"Sous-titre",
|
||||
"System fail: Cannot init desktop manager":"Échec du système: impossible de démarrer le gestionnaire de bureau",
|
||||
"System fail: Cannot init login screen":"Echec du système: Impossible de se connecter à l'écran de connexion",
|
||||
"Tags":"Tags",
|
||||
"This feature is not implemented yet":"Cette fonctionnalité n'est pas encore implémentée",
|
||||
"Title or content must not be blank":"Le titre ou le contenu ne doit pas être vide",
|
||||
"Title":"Titre",
|
||||
"Toggle Full screen":"Basculer en plein écran",
|
||||
"Tree view":"Vue de l'arbre",
|
||||
"Type":"Type",
|
||||
"Uninstall : {0}?":"Désinstaller: {0}?",
|
||||
"Uninstall":"Désinstaller",
|
||||
"Unknown API setting for {0}":"Paramètre d'API inconnu pour {0}",
|
||||
"Updated: {0}":"Actualisé: {0}",
|
||||
"Upload":"Télécharger",
|
||||
"Url":"Url",
|
||||
"User abort the authentication":"L'utilisateur annule l'authentification",
|
||||
"User data updated":"Données utilisateur mises à jour",
|
||||
"VDB Unknown condition for delete command":"VDB Condition inconnue pour la commande de suppression",
|
||||
"VFS Cannot encode file: {0}":"VFS Impossible de coder le fichier: {0}",
|
||||
"VFS cannot create : {0}":"VFS ne peut pas créer: {0}",
|
||||
"VFS cannot delete : {0}":"VFS ne peut pas supprimer: {0}",
|
||||
"VFS cannot download file : {0}":"VFS ne peut pas télécharger le fichier: {0}",
|
||||
"VFS cannot get meta data for {0}":"VFS ne peut pas obtenir de métadonnées pour {0}",
|
||||
"VFS cannot init {0}: {1}":"VFS ne peut pas init {0}: {1}",
|
||||
"VFS cannot move : {0}":"VFS ne peut pas déplacer: {0}",
|
||||
"VFS cannot read : {0}":"VFS ne peut pas lire: {0}",
|
||||
"VFS cannot save : {0}":"VFS ne peut pas enregistrer: {0}",
|
||||
"VFS cannot write : {0}":"VFS ne peut pas écrire: {0}",
|
||||
"VFS unknown action: {0}":"Action inconnue VFS: {0}",
|
||||
"VFS unknown handler: {0}":"Gestionnaire inconnu VFS: {0}",
|
||||
"View":"Vue",
|
||||
"Would you like to login to {0}?":"Voulez-vous vous connecter à {0}?",
|
||||
"Wrong format: it should be [name] url":"Mauvais format: il devrait être [nom] url",
|
||||
"Yes":"Oui",
|
||||
"{0} is not a directory":"{0} n'est pas un répertoire"
|
||||
|
||||
,
|
||||
"April":"Avril",
|
||||
"August":"août",
|
||||
"December":"Décembre",
|
||||
"February":"Février",
|
||||
"Fri":"Ven",
|
||||
"January":"Janvier",
|
||||
"July":"Juillet",
|
||||
"June":"Juin",
|
||||
"March":"Mars",
|
||||
"May":"Mai",
|
||||
"Mon":"Lun",
|
||||
"November":"Novembre",
|
||||
"October":"Octobre",
|
||||
"Sat":"Sam",
|
||||
"Selected: {0} ({1} bytes)":"Sélectionné: {0} ({1} octets)",
|
||||
"September":"Septembre",
|
||||
"Size":"Taille",
|
||||
"Sun":"Dim",
|
||||
"Thu":"Jeu",
|
||||
"Tue":"Mar",
|
||||
"Wed":"Mer"
|
||||
|
||||
,
|
||||
"Add application":"Ajouter une application",
|
||||
"Add mount point":"Ajouter un point de montage",
|
||||
"Add service":"Ajouter un service",
|
||||
"Appearance":"Apparence",
|
||||
"Cannot fetch system locales: {0}":"Impossible d'extraire les paramètres régionaux du système: {0}",
|
||||
"Cannot read wallpaper list from {0}":"Impossible de lire la liste des fonds d'écran à partir de {0}",
|
||||
"Cannot save system setting: {0}":"Impossible d'enregistrer le paramètre système: {0}",
|
||||
"Desktop path":"Chemin du bureau",
|
||||
"Edit mount point":"Modifier le point de montage",
|
||||
"Languages":"Langues",
|
||||
"Local packages path":"Chemin d'accès aux packages locaux",
|
||||
"Mount points":"Points de montage",
|
||||
"Path":"Chemin",
|
||||
"Please enter mount point name":"Veuillez entrer le nom du point de montage",
|
||||
"Please select a directory":"Veuillez sélectionner un répertoire",
|
||||
"Please select an entry":"Veuillez sélectionner une entrée",
|
||||
"Remove: {0}?":"Supprimer: {0}?",
|
||||
"Remove":"Supprimer",
|
||||
"Select a directory":"Sélectionnez un répertoire",
|
||||
"Startup applications":"Applications de démarrage",
|
||||
"Startup services":"Services de démarrage",
|
||||
"Startup":"Démarrage",
|
||||
"System locale":"Paramètres régionaux du système",
|
||||
"System setting saved":"Paramètre système enregistré",
|
||||
"Theme":"Thème",
|
||||
"VFS":"VFS",
|
||||
"Wallpaper":"Fond d'écran"
|
||||
|
||||
,
|
||||
"add {0} to zip":"add {0} to zip",
|
||||
"Add files to build target":"Add files to build target",
|
||||
"and unsaved project":"and unsaved project",
|
||||
"Build and Run":"Build and Run",
|
||||
"Build":"Build",
|
||||
"Build done":"Build done",
|
||||
"Build Options":"Build Options",
|
||||
"Build release":"Build release",
|
||||
"Cannot create file: {0}":"Cannot create file: {0}",
|
||||
"Cannot export: {0}":"Cannot export: {0}",
|
||||
"Cannot export to {0}: {1}":"Cannot export to {0}: {1}",
|
||||
"Cannot export to PNG in this browser: {0}":"Cannot export to PNG in this browser: {0}",
|
||||
"Cannot save project: {0}":"Cannot save project: {0}",
|
||||
"Cannot save the zip file {0} : {1}":"Cannot save the zip file {0} : {1}",
|
||||
"Coffees":"Coffees",
|
||||
"Compiled successful":"Compiled successful",
|
||||
"Copied {0} -> {1}":"Copied {0} -> {1}",
|
||||
"Copied files":"Copied files",
|
||||
"Created directory: {0}":"Created directory: {0}",
|
||||
"Created file: {0}":"Created file: {0}",
|
||||
"Css":"Css",
|
||||
"Error when create directory: {0}":"Error when create directory: {0}",
|
||||
"Export as":"Export as",
|
||||
"File exported":"File exported",
|
||||
"Generated {0}":"Generated {0}",
|
||||
"Graph editor":"Graph editor",
|
||||
"Hide":"Hide",
|
||||
"Ignore: {0} unsaved files {1}?":"Ignore: {0} unsaved files {1}?",
|
||||
"Ignore unsaved project ?":"Ignore unsaved project ?",
|
||||
"Installing...":"Installing...",
|
||||
"Javascripts":"Javascripts",
|
||||
"Metadata found...":"Metadata found...",
|
||||
"New Project at":"New Project at",
|
||||
"New project":"New project",
|
||||
"Opening {0}":"Opening {0}",
|
||||
"Open project":"Open project",
|
||||
"Open Project":"Open Project",
|
||||
"Output":"Output",
|
||||
"Please select {0} only":"Please select {0} only",
|
||||
"Please select a file/fofler":"Please select a file/fofler",
|
||||
"Preparing for release":"Preparing for release",
|
||||
"ProjectName":"ProjectName",
|
||||
"Project":"Project",
|
||||
"project saved":"project saved",
|
||||
"Render":"Render",
|
||||
"Running {0}...":"Running {0}...",
|
||||
"Select a file":"Select a file",
|
||||
"Show":"Show",
|
||||
"Syntax error: {0}":"Syntax error: {0}",
|
||||
"Uninstall: {0}?":"Uninstall: {0}?",
|
||||
"Unsaved project":"Unsaved project",
|
||||
"Update":"Update",
|
||||
"Verifying {0}":"Verifying {0}",
|
||||
"Version string is in invalid format: {0}":"Version string is in invalid format: {0}",
|
||||
"Welcome to AntOSDK":"Welcome to AntOSDK",
|
||||
"Your application version is older ({0} < {1})":"Your application version is older ({0} < {1})",
|
||||
"zip file generated in release folder":"zip file generated in release folder"
|
||||
}
|
248
src/core/languages/fr_FR.json.old
Normal file
248
src/core/languages/fr_FR.json.old
Normal file
@ -0,0 +1,248 @@
|
||||
{
|
||||
"About":"À propos de",
|
||||
"About: {0}":"À propos de: {0}",
|
||||
"Add category":"Ajouter une catégorie",
|
||||
"Add repository":"Ajouter un dépôt",
|
||||
"Address":"Adresse",
|
||||
"Alive (ms)":"Actif (ms)",
|
||||
"Application installed":"Application installée",
|
||||
"Application {0} is not executable":"L'application {0} n'est pas exécutable",
|
||||
"Application":"Application",
|
||||
"Applications":"Applications",
|
||||
"Authentication":"Authentification",
|
||||
"Cancel":"Annuler",
|
||||
"Cannot Edit category":"Impossible d'éditer la catégorie",
|
||||
"Cannot add new category":"Impossible d'ajouter une nouvelle catégorie",
|
||||
"Cannot create {0}":"Impossible de créer {0}",
|
||||
"Cannot delete all content of: {0} [{1}]":"Impossible de supprimer tout le contenu de: {0} [{1}]",
|
||||
"Cannot delete the category: {0} [{1}]":"Impossible de supprimer la catégorie: {0} [{1}]",
|
||||
"Cannot delete the section: {0}":"Impossible de supprimer la section: {0}",
|
||||
"Cannot delete: {0}":"Impossible de supprimer: {0}",
|
||||
"Cannot down load the app {0}":"Impossible de télécharger l'application {0}",
|
||||
"Cannot export file for embedding to text":"Impossible d'exporter le fichier pour l'intégrer au texte",
|
||||
"Cannot fetch CV categories":"Impossible d'extraire les catégories de CV",
|
||||
"Cannot fetch the entry content":"Impossible d'extraire le contenu",
|
||||
"Cannot fetch user data":"Impossible d'extraire les données utilisateur",
|
||||
"Cannot install {0}":"Impossible d'installer {0}",
|
||||
"Cannot load 3rd library at: {0}":"Impossible de charger la bibliothèque à: {0}",
|
||||
"Cannot move section":"Impossible de déplacer la section",
|
||||
"Cannot read service script: {0}":"Impossible de lire le script de service: {0}",
|
||||
"Cannot render the PDF file":"Impossible de rendre le fichier PDF",
|
||||
"Cannot save blog: {0}":"Impossible d'enregistrer le blog: {0}",
|
||||
"Cannot save section: {0}":"Impossible d'enregistrer la section: {0}",
|
||||
"Cannot save system setting":"Impossible d'enregistrer les paramètres du système",
|
||||
"Cannot save user data":"Impossible d'enregistrer les données utilisateur",
|
||||
"Cannot share file: {0}":"Impossible de partager le fichier: {0}",
|
||||
"Cannot uninstall package: {0}":"Impossible de désinstaller le package: {0}",
|
||||
"Categories":"Catégories",
|
||||
"Clear all":"Tout effacer",
|
||||
"Close tab":"Fermer l'onglet",
|
||||
"Close without saving ?":"Fermer sans enregistrer?",
|
||||
"Close":"Fermer",
|
||||
"Copy not yet implemented":"Copie non encore implémentée",
|
||||
"Copy":"Copier",
|
||||
"Created: {0}":"Créé: {0}",
|
||||
"Cut":"Couper",
|
||||
"Delete a post":"Supprimer le text",
|
||||
"Delete category":"Supprimer la catégorie",
|
||||
"Delete section":"Supprimer la section",
|
||||
"Delete":"Supprimer",
|
||||
"Desktop":"Bureau",
|
||||
"Dialog {0} not found":"La boîte de dialogue {0} n'a pas été trouvée",
|
||||
"Do you really want to delete this post ?":"Voulez-vous vraiment supprimer ce texte ?",
|
||||
"Do you really want to delete: {0}?":"Voulez-vous vraiment supprimer: {0}?",
|
||||
"Download":"Télécharger",
|
||||
"Edit category":"Modifier la catégorie",
|
||||
"Edit repository":"Modifier le dépôt",
|
||||
"Edit":"Modifier",
|
||||
"Email":"Email",
|
||||
"Error find app by mimes {0}":"Erreur lors de la recherche d'application par mimes {0}",
|
||||
"Error reading package meta data: {0}":"Erreur lors de la lecture des métadonnées du package: {0}",
|
||||
"Error saving file {0}":"Erreur lors de l'enregistrement du fichier {0}",
|
||||
"Exit":"Quitter",
|
||||
"Fail to create directory: {0}":"Impossible de créer le répertoire: {0}",
|
||||
"Fail to create {0}: {1}":"Échec de la création de {0}: {1}",
|
||||
"Fail to delete {0}: {1}":"Échec de la suppression de {0}: {1}",
|
||||
"Fail to delete: {0}":"Échec de la suppression: {0}",
|
||||
"Fail to fetch packages list from: {0}":"Impossible d'extraire la liste des paquets de: {0}",
|
||||
"Fail to get file meta data: {0}":"Échec d'obtention des métadonnées de fichier: {0}",
|
||||
"Fail to make request: {0}":"Echec de la demande: {0}",
|
||||
"Fail to move file: {0} -> {1}":"Échec du déplacement du fichier: {0} -> {1}",
|
||||
"Fail to paste: {0}":"Impossible de coller: {0}",
|
||||
"Fail to publish file: {0}":"Échec de la publication du fichier: {0}",
|
||||
"Fail to query data from database: {0}":"Impossible d'interroger les données de la base de données: {0}",
|
||||
"Fail to read file: {0}":"Impossible de lire le fichier: {0}",
|
||||
"Fail to rename to {0}: {1}":"Impossible de renommer en {0}: {1}",
|
||||
"Fail to scan directory: {0}":"Échec de l'analyse du répertoire: {0}",
|
||||
"Fail to upload file to: {0}":"Impossible de télécharger le fichier vers: {0}",
|
||||
"Fail to upload to {0}: {1}":"Impossible de télécharger vers {0}: {1}",
|
||||
"Fail to write to file: {0}":"Échec de l'écriture dans le fichier: {0}",
|
||||
"Fail to {0} package":"Échec du {0} paquet",
|
||||
"File name":"Nom de fichier",
|
||||
"File not found {0}":"Fichier introuvable {0}",
|
||||
"File {0} copied":"Fichier {0} copié",
|
||||
"File {0} cut":"Fichier {0} coupé",
|
||||
"File":"Fichier",
|
||||
"Folder name":"Nom de dossier",
|
||||
"Format : [name] url":"Format: [nom] url",
|
||||
"Found {0} sections":"{0} sections trouvées",
|
||||
"From":"De",
|
||||
"Full name must be entered":"Le nom complet doit être entré",
|
||||
"Full name":"Nom complet",
|
||||
"Google Drive":"Google Drive",
|
||||
"Hidden files":"Fichiers cachés",
|
||||
"Home":"Accueil",
|
||||
"Icon view":"Vue d'icône",
|
||||
"Ignore all {0} unsaved files ?":"Ignorer tous les {0} fichiers non enregistrés?",
|
||||
"Install":"Installer",
|
||||
"Invalid package: Meta data file not found":"Paquet invalide: Fichier de métadonnées non trouvé",
|
||||
"Kill process":"Tuer le processus",
|
||||
"Language file {0} not found":"Fichier de langue {0} introuvable",
|
||||
"Launch":"Lancer",
|
||||
"List view":"Vue de liste",
|
||||
"Location":"Localisation",
|
||||
"Log out":"Déconnecter",
|
||||
"Logout":"Déconnecter",
|
||||
"Mime type {0} is not supported":"Le type MIME {0} n'est pas supporté",
|
||||
"Modify section entry":"Modifier le texte",
|
||||
"Move to":"Déplacer vers",
|
||||
"Name":"Nom",
|
||||
"Navigation bar":"Barre de navigation",
|
||||
"New file":"Nouveau fichier",
|
||||
"New folder":"Nouveau dossier",
|
||||
"New section entry for {0}":"Nouvelle entrée de section pour {0}",
|
||||
"New":"Nouveau",
|
||||
"No application available to open {0}":"Aucune application disponible pour ouvrir {0}",
|
||||
"No post found: {0}":"Aucun texte trouvé: {0}",
|
||||
"No":"Non",
|
||||
"OS":"OS",
|
||||
"Ok":"Oui",
|
||||
"Only {0} could be selected":"Seul {0} peut être sélectionné",
|
||||
"Open file":"Ouvrir un fichier",
|
||||
"Open with":"Ouvrir avec",
|
||||
"Open":"Ouvrir",
|
||||
"Options":"Options",
|
||||
"Package uninstalled":"Package désinstallé",
|
||||
"Parent can not be the category itself":"Parent ne peut pas être la catégorie elle-même",
|
||||
"Paste":"Coller",
|
||||
"Phone":"Phone",
|
||||
"Pid":"Pid",
|
||||
"Please enter category name":"Veuillez entrer le nom de la catégorie",
|
||||
"Please enter tags":"Veuillez entrer les tags",
|
||||
"Please insert a title in the text: beginning with heading":"Veuillez insérer un titre dans le texte: en commençant par le heading",
|
||||
"Please select a category":"Veuillez sélectionner une catégorie",
|
||||
"Please select a date":"Veuillez sélectionner une date",
|
||||
"Please select a file":"Veuillez sélectionner un fichier",
|
||||
"Please select a parent category":"Veuillez sélectionner une catégorie parente",
|
||||
"Please select a section to edit":"Veuillez sélectionner une section à modifier",
|
||||
"Please select a section to move":"Veuillez sélectionner une section à déplacer",
|
||||
"Preview":"Aperçu",
|
||||
"Properties":"Propriétés",
|
||||
"Quit without saving ?":"Quitter sans sauvegarder ?",
|
||||
"Quit":"Quitter",
|
||||
"Read more":"Lire la suite",
|
||||
"Refresh":"Rafraîchir",
|
||||
"Rename":"Renommer",
|
||||
"Repositories":"Dépôts",
|
||||
"Resource not found {0}":"Ressource non trouvée {0}",
|
||||
"Resource not found: {0}":"Ressource non trouvée: {0}",
|
||||
"Row {0}, col {1}, lines: {2}":"Range {0}, col {1}, lignes: {2}",
|
||||
"Save as":"Enregistrer sous",
|
||||
"Save":"sauvegarder",
|
||||
"Section list is empty, please add one":"La liste des sections est vide, veuillez en ajouter une",
|
||||
"Select image file":"Sélectionnez le fichier image",
|
||||
"Service":"Service",
|
||||
"Share file":"Partagez le fichier",
|
||||
"Shared url: {0}":"URL partagée: {0}",
|
||||
"Shared":"partagé",
|
||||
"Short biblio":"Biblio court",
|
||||
"Sidebar":"Barre latérale",
|
||||
"Subtitle":"Sous-titre",
|
||||
"System fail: Cannot init desktop manager":"Échec du système: impossible de démarrer le gestionnaire de bureau",
|
||||
"System fail: Cannot init login screen":"Echec du système: Impossible de se connecter à l'écran de connexion",
|
||||
"Tags":"Tags",
|
||||
"This feature is not implemented yet":"Cette fonctionnalité n'est pas encore implémentée",
|
||||
"Title or content must not be blank":"Le titre ou le contenu ne doit pas être vide",
|
||||
"Title":"Titre",
|
||||
"Toggle Full screen":"Basculer en plein écran",
|
||||
"Tree view":"Vue de l'arbre",
|
||||
"Type":"Type",
|
||||
"Uninstall : {0}?":"Désinstaller: {0}?",
|
||||
"Uninstall":"Désinstaller",
|
||||
"Unknown API setting for {0}":"Paramètre d'API inconnu pour {0}",
|
||||
"Updated: {0}":"Actualisé: {0}",
|
||||
"Upload":"Télécharger",
|
||||
"Url":"Url",
|
||||
"User abort the authentication":"L'utilisateur annule l'authentification",
|
||||
"User data updated":"Données utilisateur mises à jour",
|
||||
"VDB Unknown condition for delete command":"VDB Condition inconnue pour la commande de suppression",
|
||||
"VFS Cannot encode file: {0}":"VFS Impossible de coder le fichier: {0}",
|
||||
"VFS cannot create : {0}":"VFS ne peut pas créer: {0}",
|
||||
"VFS cannot delete : {0}":"VFS ne peut pas supprimer: {0}",
|
||||
"VFS cannot download file : {0}":"VFS ne peut pas télécharger le fichier: {0}",
|
||||
"VFS cannot get meta data for {0}":"VFS ne peut pas obtenir de métadonnées pour {0}",
|
||||
"VFS cannot init {0}: {1}":"VFS ne peut pas init {0}: {1}",
|
||||
"VFS cannot move : {0}":"VFS ne peut pas déplacer: {0}",
|
||||
"VFS cannot read : {0}":"VFS ne peut pas lire: {0}",
|
||||
"VFS cannot save : {0}":"VFS ne peut pas enregistrer: {0}",
|
||||
"VFS cannot write : {0}":"VFS ne peut pas écrire: {0}",
|
||||
"VFS unknown action: {0}":"Action inconnue VFS: {0}",
|
||||
"VFS unknown handler: {0}":"Gestionnaire inconnu VFS: {0}",
|
||||
"View":"Vue",
|
||||
"Would you like to login to {0}?":"Voulez-vous vous connecter à {0}?",
|
||||
"Wrong format: it should be [name] url":"Mauvais format: il devrait être [nom] url",
|
||||
"Yes":"Oui",
|
||||
"{0} is not a directory":"{0} n'est pas un répertoire"
|
||||
|
||||
,
|
||||
"April":"Avril",
|
||||
"August":"août",
|
||||
"December":"Décembre",
|
||||
"February":"Février",
|
||||
"Fri":"Ven",
|
||||
"January":"Janvier",
|
||||
"July":"Juillet",
|
||||
"June":"Juin",
|
||||
"March":"Mars",
|
||||
"May":"Mai",
|
||||
"Mon":"Lun",
|
||||
"November":"Novembre",
|
||||
"October":"Octobre",
|
||||
"Sat":"Sam",
|
||||
"Selected: {0} ({1} bytes)":"Sélectionné: {0} ({1} octets)",
|
||||
"September":"Septembre",
|
||||
"Size":"Taille",
|
||||
"Sun":"Dim",
|
||||
"Thu":"Jeu",
|
||||
"Tue":"Mar",
|
||||
"Wed":"Mer"
|
||||
|
||||
,
|
||||
"Add application":"Ajouter une application",
|
||||
"Add mount point":"Ajouter un point de montage",
|
||||
"Add service":"Ajouter un service",
|
||||
"Appearance":"Apparence",
|
||||
"Cannot fetch system locales: {0}":"Impossible d'extraire les paramètres régionaux du système: {0}",
|
||||
"Cannot read wallpaper list from {0}":"Impossible de lire la liste des fonds d'écran à partir de {0}",
|
||||
"Cannot save system setting: {0}":"Impossible d'enregistrer le paramètre système: {0}",
|
||||
"Desktop path":"Chemin du bureau",
|
||||
"Edit mount point":"Modifier le point de montage",
|
||||
"Languages":"Langues",
|
||||
"Local packages path":"Chemin d'accès aux packages locaux",
|
||||
"Mount points":"Points de montage",
|
||||
"Path":"Chemin",
|
||||
"Please enter mount point name":"Veuillez entrer le nom du point de montage",
|
||||
"Please select a directory":"Veuillez sélectionner un répertoire",
|
||||
"Please select an entry":"Veuillez sélectionner une entrée",
|
||||
"Remove: {0}?":"Supprimer: {0}?",
|
||||
"Remove":"Supprimer",
|
||||
"Select a directory":"Sélectionnez un répertoire",
|
||||
"Startup applications":"Applications de démarrage",
|
||||
"Startup services":"Services de démarrage",
|
||||
"Startup":"Démarrage",
|
||||
"System locale":"Paramètres régionaux du système",
|
||||
"System setting saved":"Paramètre système enregistré",
|
||||
"Theme":"Thème",
|
||||
"VFS":"VFS",
|
||||
"Wallpaper":"Fond d'écran"
|
||||
}
|
67
src/core/languages/gen.sh
Executable file
67
src/core/languages/gen.sh
Executable file
@ -0,0 +1,67 @@
|
||||
#!/bin/bash
|
||||
# Copyright 2017-2018 Xuan Sang LE <xsang.le AT gmail DOT com>
|
||||
|
||||
# AnTOS Web desktop is is licensed under the GNU General Public
|
||||
# License v3.0, see the LICENCE file for more information
|
||||
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
|
||||
ord() {
|
||||
LC_CTYPE=C printf '%d' "'$1"
|
||||
}
|
||||
grep --include=\*.{coffee,tag} -roh "$1" -e '__("[^"]*"' | while read -r line ; do
|
||||
SUBSTRING=$(echo $line| cut -d'"' -f 2)
|
||||
if test -f "$2" && [ ! -z "$(grep -F "\"$SUBSTRING\":" "$2")" ]
|
||||
then
|
||||
echo "Ignore: $SUBSTRING"
|
||||
else
|
||||
echo -e "\t\"$SUBSTRING\":\"$SUBSTRING\"," >> "tmp.json"
|
||||
fi
|
||||
done
|
||||
grep --include=\*.{coffee,html,tag} -roh "$1" -e '\"__([^\"]*)\"' | while read -r line; do
|
||||
len=$(( ${#line} - 6 ))
|
||||
#echo $len
|
||||
#echo $line
|
||||
SUBSTRING=${line:4:len}
|
||||
#echo $SUBSTRING
|
||||
if test -f "$2" && [ ! -z "$(grep -F "\"$SUBSTRING\":" "$2")" ]
|
||||
then
|
||||
echo "Ignore: $SUBSTRING"
|
||||
else
|
||||
echo -e "\t\"$SUBSTRING\":\"$SUBSTRING\"," >> "tmp.json"
|
||||
fi
|
||||
done
|
||||
if test -f tmp.json
|
||||
then
|
||||
sort tmp.json > tmp1.json
|
||||
awk '!a[$0]++' "tmp1.json" > tmp.json
|
||||
sed '$ s/.$//' tmp.json > tmp1.json
|
||||
# remove duplicate entry
|
||||
if test -f $2
|
||||
then
|
||||
cp $2 "$2.old"
|
||||
sed '$ s/.$//' $2 > tmp.json
|
||||
cat tmp.json > $2
|
||||
echo "," >> $2
|
||||
cat tmp1.json >> $2
|
||||
echo "}" >> "$2"
|
||||
else
|
||||
echo "{"> "$2"
|
||||
cat tmp1.json >> "$2"
|
||||
echo "}" >> "$2"
|
||||
fi
|
||||
rm tmp.json tmp1.json
|
||||
else
|
||||
echo "Nothing change"
|
||||
fi
|
321
src/core/languages/vi_VN.json
Normal file
321
src/core/languages/vi_VN.json
Normal file
@ -0,0 +1,321 @@
|
||||
{
|
||||
"About":"Thông tin",
|
||||
"About: {0}":"Thông tin: {0}",
|
||||
"Add category":"Thêm danh mục",
|
||||
"Add repository":"Thêm kho ứng dụng",
|
||||
"Address":"Địa chỉ",
|
||||
"Alive (ms)":"Hoạt động (ms)",
|
||||
"Application installed":"Ứng dụng đã được cà đặt",
|
||||
"Application {0} is not executable":"Ứng dụng {0} không thực thi được",
|
||||
"Application":"Ứng dụng",
|
||||
"Applications":"Các ứng dụng",
|
||||
"Authentication":"Xác thực",
|
||||
"Cancel":"Huỷ",
|
||||
"Cannot Edit category":"Không thể sửa danh mục",
|
||||
"Cannot add new category":"Không thể tạo mới danh mục",
|
||||
"Cannot create {0}":"Không thể tạo {0}",
|
||||
"Cannot delete all content of: {0} [{1}]":"Không thể xoá hết nội dung của: {0} [{1}]",
|
||||
"Cannot delete the category: {0} [{1}]":"Không thể xoá danh mục: {0} [{1}]",
|
||||
"Cannot delete the section: {0}":"Không thể xoá mục: {0}",
|
||||
"Cannot delete: {0}":"Không thể xoá: {0}",
|
||||
"Cannot down load the app {0}":"Không thể tải xuống ứng dụng {0}",
|
||||
"Cannot export file for embedding to text":"Không thể xuất bản file để chèn vào text",
|
||||
"Cannot fetch CV categories":"Không thể lấy danh mục CV",
|
||||
"Cannot fetch the entry content":"Không thể truy vấn nội dung của mục",
|
||||
"Cannot fetch user data":"Không thể truy vấn thông tin người dùng",
|
||||
"Cannot install {0}":"Không thể cài đặt {0}",
|
||||
"Cannot load 3rd library at: {0}":"Không thể tải về thư viện bên thứ 3: {0}",
|
||||
"Cannot move section":"Không thể di chuyển mục",
|
||||
"Cannot read service script: {0}":"Không thể tải về script của dịch vụ: {0}",
|
||||
"Cannot render the PDF file":"Không thể hiển thị file PDF",
|
||||
"Cannot save blog: {0}":"Không thể lưu blog: {0}",
|
||||
"Cannot save section: {0}":"Không thể lưu mục: {0}",
|
||||
"Cannot save system setting":"Không thể lưu cài đặt hệ thống",
|
||||
"Cannot save user data":"Không thể lưu thông tin người dùng",
|
||||
"Cannot share file: {0}":"Không thể chia sẻ file: {0}",
|
||||
"Cannot uninstall package: {0}":"Không thể gỡ cài đặt ứng dụng: {0}",
|
||||
"Categories":"Các danh mục",
|
||||
"Clear all":"Xoá tất cả",
|
||||
"Close tab":"Đóng tab",
|
||||
"Close without saving ?":"Đóng không cần lưu ?",
|
||||
"Close":"Đóng",
|
||||
"Copy not yet implemented":"Chức năng copy chưa được cài đặt",
|
||||
"Copy":"Copy",
|
||||
"Created: {0}":"Tạo: {0}",
|
||||
"Cut":"Cắt",
|
||||
"Delete a post":"Xoá bài",
|
||||
"Delete category":"Xoá danh mục",
|
||||
"Delete section":"Xoá mục",
|
||||
"Delete":"Xoá",
|
||||
"Desktop":"Desktop",
|
||||
"Dialog {0} not found":"Không tìm thấy hộp thoại {0}",
|
||||
"Do you really want to delete this post ?":"Bạn muốn xoá bài này ?",
|
||||
"Do you really want to delete: {0}?":"Bạn muốn xoá: {0}?",
|
||||
"Download":"Tải về",
|
||||
"Edit category":"Sửa danh mục",
|
||||
"Edit repository":"Sửa kho ứng dụng",
|
||||
"Edit":"Sửa",
|
||||
"Email":"Email",
|
||||
"Error find app by mimes {0}":"Lỗi khi tìm app bằng mime {0}",
|
||||
"Error reading package meta data: {0}":"Lỗi khi đọc thông tin ứng dụng: {0}",
|
||||
"Error saving file {0}":"Lỗi khi lưu file {0}",
|
||||
"Exit":"Thoát",
|
||||
"Fail to create directory: {0}":"Lỗi khi tạo folder: {0}",
|
||||
"Fail to create {0}: {1}":"Lỗi khi tạo {0}: {1}",
|
||||
"Fail to delete {0}: {1}":"Lỗi khi xoá {0}: {1}",
|
||||
"Fail to delete: {0}":"Lỗi khi xoá: {0}",
|
||||
"Fail to fetch packages list from: {0}":"Lỗi khi tải về danh sách ứng dụng từ: {0}",
|
||||
"Fail to get file meta data: {0}":"Lỗi truy vấn thông tin file: {0}",
|
||||
"Fail to make request: {0}":"Lỗi truy vấn: {0}",
|
||||
"Fail to move file: {0} -> {1}":"Lỗi di chuyển file: {0} -> {1}",
|
||||
"Fail to paste: {0}":"Lỗi khi dán: {0}",
|
||||
"Fail to publish file: {0}":"Lỗi khi xuất bản file: {0}",
|
||||
"Fail to query data from database: {0}":"Lỗi truy vấn cơ sở dữ liệu: {0}",
|
||||
"Fail to read file: {0}":"Lỗi đọc file: {0}",
|
||||
"Fail to rename to {0}: {1}":"Lỗi khi đổi tên file {0}: {1}",
|
||||
"Fail to scan directory: {0}":"Lỗi khi quét thư mục: {0}",
|
||||
"Fail to upload file to: {0}":"Lỗi khi tải file lên: {0}",
|
||||
"Fail to upload to {0}: {1}":"Lỗi khi tải file lên {0}: {1}",
|
||||
"Fail to write to file: {0}":"Lỗi khi ghi file: {0}",
|
||||
"Fail to {0} package":"Lỗi {0} ứng dụng",
|
||||
"File name":"Tên file",
|
||||
"File not found {0}":"Không tìm thấy file {0}",
|
||||
"File {0} copied":"Đã copy file {0}",
|
||||
"File {0} cut":"Đã cắt file {0}",
|
||||
"File":"File",
|
||||
"Folder name":"Tên thư mục",
|
||||
"Format : [name] url":"Định dạng : [name] url",
|
||||
"Found {0} sections":"Tìm thấy {0} mục",
|
||||
"From":"Từ",
|
||||
"Full name must be entered":"Vui lòng điền họ và tên",
|
||||
"Full name":"Họ và tên",
|
||||
"Google Drive":"Google Drive",
|
||||
"Hidden files":"File ẩn",
|
||||
"Home":"Home",
|
||||
"Icon view":"Xêm theo icon",
|
||||
"Ignore all {0} unsaved files ?":"Bỏ qua {0} file chưa lưu ?",
|
||||
"Install":"Cài đặt",
|
||||
"Invalid package: Meta data file not found":"Ứng dụng không hợp lệ: không tìm thấy metadata",
|
||||
"Kill process":"Đóng process",
|
||||
"Language file {0} not found":"Không tìm thấy ngôn ngữ {0}",
|
||||
"Launch":"Khởi chạy",
|
||||
"List view":"Xem theo list",
|
||||
"Location":"Vị trí",
|
||||
"Log out":"Đăng xuất",
|
||||
"Logout":"Đăng xuất",
|
||||
"Mime type {0} is not supported":"Mime type {0} không được hổ trợ",
|
||||
"Modify section entry":"Sửa mục",
|
||||
"Move to":"Di chuyển vào",
|
||||
"Name":"Tên",
|
||||
"Navigation bar":"Thanh điều hướng",
|
||||
"New file":"File mới",
|
||||
"New folder":"Thư mục mới",
|
||||
"New section entry for {0}":"Thêm mới mục trong {0}",
|
||||
"New":"Tạo mới",
|
||||
"No application available to open {0}":"Không tìm thấy ứng dụng dể đọc {0}",
|
||||
"No post found: {0}":"Không tìm thấy bài: {0}",
|
||||
"No":"Không",
|
||||
"OS":"OS",
|
||||
"Ok":"Có",
|
||||
"Only {0} could be selected":"Chỉ file với mine {0} mới được chọn",
|
||||
"Open file":"Mở file",
|
||||
"Open with":"Mở với",
|
||||
"Open":"Mở",
|
||||
"Options":"Tuỳ chọn",
|
||||
"Package uninstalled":"Đã gỡ bỏ ứng dụng",
|
||||
"Parent can not be the category itself":"Danh mục cha không được trùng với danh mục hiện tại",
|
||||
"Paste":"Dán",
|
||||
"Phone":"Số điện thoại",
|
||||
"Pid":"Pid",
|
||||
"Please enter category name":"Vui lòng nhập tên danh mục",
|
||||
"Please enter tags":"Vui lòng nhập tags",
|
||||
"Please insert a title in the text: beginning with heading":"Vuil lòng nhập tiêu đề: bắt đầu bài bằng heading",
|
||||
"Please select a category":"Vui lòng chọn danh mục",
|
||||
"Please select a date":"Vui lòng chọn ngày",
|
||||
"Please select a file":"Vui lòng chọn file",
|
||||
"Please select a parent category":"Vui lòng chọn danh much cha",
|
||||
"Please select a section to edit":"Vui lòng chọn mục để sửa",
|
||||
"Please select a section to move":"Vuil lòng chọn mục để di chuyển",
|
||||
"Preview":"Preview",
|
||||
"Properties":"Thông tin",
|
||||
"Quit without saving ?":"Thoát mà không lưu ?",
|
||||
"Quit":"Thoát",
|
||||
"Read more":"Đọc thêm",
|
||||
"Refresh":"Làm mới",
|
||||
"Rename":"Đổi tên",
|
||||
"Repositories":"Các kho ứng dụng",
|
||||
"Resource not found {0}":"Không tìm thấy tài nguyên {0}",
|
||||
"Resource not found: {0}":"Không tìm thấy tài nguyên: {0}",
|
||||
"Row {0}, col {1}, lines: {2}":"Hàng {0}, cột {1}, dòng: {2}",
|
||||
"Save as":"Lưu như",
|
||||
"Save":"Lưu",
|
||||
"Section list is empty, please add one":"Danh sách mục rỗng, vui lòng tạo mới",
|
||||
"Select image file":"Chọn file ảnh",
|
||||
"Service":"Dịch vụ",
|
||||
"Share file":"Chia sẻ",
|
||||
"Shared url: {0}":"Liên kết chia sẻ: {0}",
|
||||
"Shared":"Đã chia sẻ",
|
||||
"Short biblio":"Tiểu sử ngắn",
|
||||
"Sidebar":"Sidebar",
|
||||
"Subtitle":"Tiêu đề con",
|
||||
"System fail: Cannot init desktop manager":"Lỗi hệ thống: không thể khởi chạy trình quản lý desktop",
|
||||
"System fail: Cannot init login screen":"Lỗi hệ thống: không thể khởi chạy màn hình đăng nhập",
|
||||
"Tags":"Tags",
|
||||
"This feature is not implemented yet":"Chức năng này chưa được cài đặt",
|
||||
"Title or content must not be blank":"Tiêu đề hoặc nội dụng không được để trống",
|
||||
"Title":"Tiêu đề",
|
||||
"Toggle Full screen":"Bật/tắt toàn màn hình",
|
||||
"Tree view":"Xem theo cây",
|
||||
"Type":"Loại",
|
||||
"Uninstall : {0}?":"Gỡ cài đặt : {0}?",
|
||||
"Uninstall":"Gỡ cài đặt",
|
||||
"Unknown API setting for {0}":"Không tìm thấy cài đặt API của {0}",
|
||||
"Updated: {0}":"Đã cập nhật: {0}",
|
||||
"Upload":"Tải lên",
|
||||
"Url":"Url",
|
||||
"User abort the authentication":"Người dùng huỷ xác thực",
|
||||
"User data updated":"Thông tin người dùng đã được cập nhật",
|
||||
"VDB Unknown condition for delete command":"VDB không rõ điều kiện cho lệnh xoá",
|
||||
"VFS Cannot encode file: {0}":"VFS Không thể mã hoá file: {0}",
|
||||
"VFS cannot create : {0}":"VFS không thể tạo : {0}",
|
||||
"VFS cannot delete : {0}":"VFS không thể xoá : {0}",
|
||||
"VFS cannot download file : {0}":"VFS không thể tải về : {0}",
|
||||
"VFS cannot get meta data for {0}":"VFS không thể truy vấn thông tin của {0}",
|
||||
"VFS cannot init {0}: {1}":"VFS không thể khởi động {0}: {1}",
|
||||
"VFS cannot move : {0}":"VFS không thể di chuyển : {0}",
|
||||
"VFS cannot read : {0}":"VFS không thể đọc : {0}",
|
||||
"VFS cannot save : {0}":"VFS không thể lưu : {0}",
|
||||
"VFS cannot write : {0}":"VFS không thể viết : {0}",
|
||||
"VFS unknown action: {0}":"VFS không rõ hành động : {0}",
|
||||
"VFS unknown handler: {0}":"VFS không rõ trình xữ lý: {0}",
|
||||
"View":"Xem",
|
||||
"Would you like to login to {0}?":"Bạn có muốn đăng nhập vào {0}?",
|
||||
"Wrong format: it should be [name] url":"Sai định dạng: định dạng hợp lệ [name] url",
|
||||
"Yes":"Có",
|
||||
"{0} is not a directory":"{0} không phải là thư mục"
|
||||
|
||||
,
|
||||
"April":"Tháng 4",
|
||||
"August":"Tháng 8",
|
||||
"December":"Tháng 12",
|
||||
"February":"Tháng hai",
|
||||
"Fri":"Sáu",
|
||||
"January":"Tháng một",
|
||||
"July":"Tháng 7",
|
||||
"June":"Tháng 6",
|
||||
"March":"Tháng 3",
|
||||
"May":"Tháng 5",
|
||||
"Mon":"Hai",
|
||||
"November":"Tháng 11",
|
||||
"October":"Tháng 10",
|
||||
"Sat":"Bảy",
|
||||
"Selected: {0} ({1} bytes)":"Đã chọn: {0} ({1} bytes)",
|
||||
"September":"Tháng 9",
|
||||
"Size":"Kích cỡ",
|
||||
"Sun":"CN",
|
||||
"Thu":"Năm",
|
||||
"Tue":"Ba",
|
||||
"Wed":"Tư"
|
||||
|
||||
,
|
||||
"Add":"Thêm",
|
||||
"Cannot read wallpaper list from {0}":"Không thể truy vấn danh sách wallpaper {0}",
|
||||
"Theme":"Chủ đề",
|
||||
"Wallpaper":"Hình nền"
|
||||
|
||||
,
|
||||
"Appearance":"Giao diện",
|
||||
"Cannot fetch system locales: {0}":"Không thể truy vấn danh sách ngôn ngữ: {0}",
|
||||
"Cannot save system setting: {0}":"Không thể lưu cài đặt hệ thống: {0}",
|
||||
"Desktop path":"Đường dẫn đến desktop",
|
||||
"Languages":"Ngôn ngữ",
|
||||
"Local packages path":"Đường dẫn đến ứng dụng riêng",
|
||||
"Mount points":"Điểm truy cập nhanh",
|
||||
"Path":"Đường dẫn",
|
||||
"Please enter mount point name":"Vui lòng nhập điểm truy cập",
|
||||
"Please select a directory":"Vui lòng chọn một thư mục",
|
||||
"Remove: {0}?":"xoá: {0}?",
|
||||
"Remove":"xoá",
|
||||
"Select a directory":"Chọn một thư mục",
|
||||
"System locale":"Ngôn ngữ",
|
||||
"System setting saved":"Đã lưu cài đặt hệ thống",
|
||||
"VFS":"VFS"
|
||||
|
||||
,
|
||||
"Add mount point":"Thêm điểm truy cập",
|
||||
"Edit mount point":"Sửa điểm truy cập"
|
||||
|
||||
,
|
||||
"Services":"Dịch vụ",
|
||||
"Startup":"Khởi chạy"
|
||||
|
||||
,
|
||||
"Add application":"Thêm ứng dụng",
|
||||
"Add service":"Thêm dịch vụ",
|
||||
"Please select an entry":"Vui lòng chọn 1 mục từ danh sách",
|
||||
"Startup applications":"Ứng dụng khởi chạy",
|
||||
"Startup services":"Dịch vụ khởi chạy"
|
||||
|
||||
,
|
||||
"Cannot export to PNG in this browser: {0}":"Cannot export to PNG in this browser: {0}",
|
||||
"Cannot export to {0}: {1}":"Cannot export to {0}: {1}",
|
||||
"Cannot export: {0}":"Cannot export: {0}",
|
||||
"Export as":"Export as",
|
||||
"File exported":"File exported",
|
||||
"Syntax error: {0}":"Syntax error: {0}"
|
||||
|
||||
,
|
||||
"Graph editor":"Graph editor",
|
||||
"Render":"Render"
|
||||
|
||||
,
|
||||
"add {0} to zip":"add {0} to zip",
|
||||
"Add files to build target":"Add files to build target",
|
||||
"and unsaved project":"and unsaved project",
|
||||
"Build and Run":"Build and Run",
|
||||
"Build":"Build",
|
||||
"Build done":"Build done",
|
||||
"Build Options":"Build Options",
|
||||
"Build release":"Build release",
|
||||
"Cannot create file: {0}":"Cannot create file: {0}",
|
||||
"Cannot save project: {0}":"Cannot save project: {0}",
|
||||
"Cannot save the zip file {0} : {1}":"Cannot save the zip file {0} : {1}",
|
||||
"Coffees":"Coffees",
|
||||
"Compiled successful":"Compiled successful",
|
||||
"Copied {0} -> {1}":"Copied {0} -> {1}",
|
||||
"Copied files":"Copied files",
|
||||
"Created directory: {0}":"Created directory: {0}",
|
||||
"Created file: {0}":"Created file: {0}",
|
||||
"Css":"Css",
|
||||
"Error when create directory: {0}":"Error when create directory: {0}",
|
||||
"Generated {0}":"Generated {0}",
|
||||
"Hide":"Hide",
|
||||
"Ignore: {0} unsaved files {1}?":"Ignore: {0} unsaved files {1}?",
|
||||
"Ignore unsaved project ?":"Ignore unsaved project ?",
|
||||
"Installing...":"Installing...",
|
||||
"Javascripts":"Javascripts",
|
||||
"Metadata found...":"Metadata found...",
|
||||
"New Project at":"New Project at",
|
||||
"New project":"New project",
|
||||
"Opening {0}":"Opening {0}",
|
||||
"Open project":"Open project",
|
||||
"Open Project":"Open Project",
|
||||
"Output":"Output",
|
||||
"Please select {0} only":"Please select {0} only",
|
||||
"Please select a file/fofler":"Please select a file/fofler",
|
||||
"Preparing for release":"Preparing for release",
|
||||
"ProjectName":"ProjectName",
|
||||
"Project":"Project",
|
||||
"project saved":"project saved",
|
||||
"Running {0}...":"Running {0}...",
|
||||
"Select a file":"Select a file",
|
||||
"Show":"Show",
|
||||
"Uninstall: {0}?":"Uninstall: {0}?",
|
||||
"Unsaved project":"Unsaved project",
|
||||
"Update":"Update",
|
||||
"Verifying {0}":"Verifying {0}",
|
||||
"Version string is in invalid format: {0}":"Version string is in invalid format: {0}",
|
||||
"Welcome to AntOSDK":"Welcome to AntOSDK",
|
||||
"Your application version is older ({0} < {1})":"Your application version is older ({0} < {1})",
|
||||
"zip file generated in release folder":"zip file generated in release folder"
|
||||
}
|
270
src/core/languages/vi_VN.json.old
Normal file
270
src/core/languages/vi_VN.json.old
Normal file
@ -0,0 +1,270 @@
|
||||
{
|
||||
"About":"Thông tin",
|
||||
"About: {0}":"Thông tin: {0}",
|
||||
"Add category":"Thêm danh mục",
|
||||
"Add repository":"Thêm kho ứng dụng",
|
||||
"Address":"Địa chỉ",
|
||||
"Alive (ms)":"Hoạt động (ms)",
|
||||
"Application installed":"Ứng dụng đã được cà đặt",
|
||||
"Application {0} is not executable":"Ứng dụng {0} không thực thi được",
|
||||
"Application":"Ứng dụng",
|
||||
"Applications":"Các ứng dụng",
|
||||
"Authentication":"Xác thực",
|
||||
"Cancel":"Huỷ",
|
||||
"Cannot Edit category":"Không thể sửa danh mục",
|
||||
"Cannot add new category":"Không thể tạo mới danh mục",
|
||||
"Cannot create {0}":"Không thể tạo {0}",
|
||||
"Cannot delete all content of: {0} [{1}]":"Không thể xoá hết nội dung của: {0} [{1}]",
|
||||
"Cannot delete the category: {0} [{1}]":"Không thể xoá danh mục: {0} [{1}]",
|
||||
"Cannot delete the section: {0}":"Không thể xoá mục: {0}",
|
||||
"Cannot delete: {0}":"Không thể xoá: {0}",
|
||||
"Cannot down load the app {0}":"Không thể tải xuống ứng dụng {0}",
|
||||
"Cannot export file for embedding to text":"Không thể xuất bản file để chèn vào text",
|
||||
"Cannot fetch CV categories":"Không thể lấy danh mục CV",
|
||||
"Cannot fetch the entry content":"Không thể truy vấn nội dung của mục",
|
||||
"Cannot fetch user data":"Không thể truy vấn thông tin người dùng",
|
||||
"Cannot install {0}":"Không thể cài đặt {0}",
|
||||
"Cannot load 3rd library at: {0}":"Không thể tải về thư viện bên thứ 3: {0}",
|
||||
"Cannot move section":"Không thể di chuyển mục",
|
||||
"Cannot read service script: {0}":"Không thể tải về script của dịch vụ: {0}",
|
||||
"Cannot render the PDF file":"Không thể hiển thị file PDF",
|
||||
"Cannot save blog: {0}":"Không thể lưu blog: {0}",
|
||||
"Cannot save section: {0}":"Không thể lưu mục: {0}",
|
||||
"Cannot save system setting":"Không thể lưu cài đặt hệ thống",
|
||||
"Cannot save user data":"Không thể lưu thông tin người dùng",
|
||||
"Cannot share file: {0}":"Không thể chia sẻ file: {0}",
|
||||
"Cannot uninstall package: {0}":"Không thể gỡ cài đặt ứng dụng: {0}",
|
||||
"Categories":"Các danh mục",
|
||||
"Clear all":"Xoá tất cả",
|
||||
"Close tab":"Đóng tab",
|
||||
"Close without saving ?":"Đóng không cần lưu ?",
|
||||
"Close":"Đóng",
|
||||
"Copy not yet implemented":"Chức năng copy chưa được cài đặt",
|
||||
"Copy":"Copy",
|
||||
"Created: {0}":"Tạo: {0}",
|
||||
"Cut":"Cắt",
|
||||
"Delete a post":"Xoá bài",
|
||||
"Delete category":"Xoá danh mục",
|
||||
"Delete section":"Xoá mục",
|
||||
"Delete":"Xoá",
|
||||
"Desktop":"Desktop",
|
||||
"Dialog {0} not found":"Không tìm thấy hộp thoại {0}",
|
||||
"Do you really want to delete this post ?":"Bạn muốn xoá bài này ?",
|
||||
"Do you really want to delete: {0}?":"Bạn muốn xoá: {0}?",
|
||||
"Download":"Tải về",
|
||||
"Edit category":"Sửa danh mục",
|
||||
"Edit repository":"Sửa kho ứng dụng",
|
||||
"Edit":"Sửa",
|
||||
"Email":"Email",
|
||||
"Error find app by mimes {0}":"Lỗi khi tìm app bằng mime {0}",
|
||||
"Error reading package meta data: {0}":"Lỗi khi đọc thông tin ứng dụng: {0}",
|
||||
"Error saving file {0}":"Lỗi khi lưu file {0}",
|
||||
"Exit":"Thoát",
|
||||
"Fail to create directory: {0}":"Lỗi khi tạo folder: {0}",
|
||||
"Fail to create {0}: {1}":"Lỗi khi tạo {0}: {1}",
|
||||
"Fail to delete {0}: {1}":"Lỗi khi xoá {0}: {1}",
|
||||
"Fail to delete: {0}":"Lỗi khi xoá: {0}",
|
||||
"Fail to fetch packages list from: {0}":"Lỗi khi tải về danh sách ứng dụng từ: {0}",
|
||||
"Fail to get file meta data: {0}":"Lỗi truy vấn thông tin file: {0}",
|
||||
"Fail to make request: {0}":"Lỗi truy vấn: {0}",
|
||||
"Fail to move file: {0} -> {1}":"Lỗi di chuyển file: {0} -> {1}",
|
||||
"Fail to paste: {0}":"Lỗi khi dán: {0}",
|
||||
"Fail to publish file: {0}":"Lỗi khi xuất bản file: {0}",
|
||||
"Fail to query data from database: {0}":"Lỗi truy vấn cơ sở dữ liệu: {0}",
|
||||
"Fail to read file: {0}":"Lỗi đọc file: {0}",
|
||||
"Fail to rename to {0}: {1}":"Lỗi khi đổi tên file {0}: {1}",
|
||||
"Fail to scan directory: {0}":"Lỗi khi quét thư mục: {0}",
|
||||
"Fail to upload file to: {0}":"Lỗi khi tải file lên: {0}",
|
||||
"Fail to upload to {0}: {1}":"Lỗi khi tải file lên {0}: {1}",
|
||||
"Fail to write to file: {0}":"Lỗi khi ghi file: {0}",
|
||||
"Fail to {0} package":"Lỗi {0} ứng dụng",
|
||||
"File name":"Tên file",
|
||||
"File not found {0}":"Không tìm thấy file {0}",
|
||||
"File {0} copied":"Đã copy file {0}",
|
||||
"File {0} cut":"Đã cắt file {0}",
|
||||
"File":"File",
|
||||
"Folder name":"Tên thư mục",
|
||||
"Format : [name] url":"Định dạng : [name] url",
|
||||
"Found {0} sections":"Tìm thấy {0} mục",
|
||||
"From":"Từ",
|
||||
"Full name must be entered":"Vui lòng điền họ và tên",
|
||||
"Full name":"Họ và tên",
|
||||
"Google Drive":"Google Drive",
|
||||
"Hidden files":"File ẩn",
|
||||
"Home":"Home",
|
||||
"Icon view":"Xêm theo icon",
|
||||
"Ignore all {0} unsaved files ?":"Bỏ qua {0} file chưa lưu ?",
|
||||
"Install":"Cài đặt",
|
||||
"Invalid package: Meta data file not found":"Ứng dụng không hợp lệ: không tìm thấy metadata",
|
||||
"Kill process":"Đóng process",
|
||||
"Language file {0} not found":"Không tìm thấy ngôn ngữ {0}",
|
||||
"Launch":"Khởi chạy",
|
||||
"List view":"Xem theo list",
|
||||
"Location":"Vị trí",
|
||||
"Log out":"Đăng xuất",
|
||||
"Logout":"Đăng xuất",
|
||||
"Mime type {0} is not supported":"Mime type {0} không được hổ trợ",
|
||||
"Modify section entry":"Sửa mục",
|
||||
"Move to":"Di chuyển vào",
|
||||
"Name":"Tên",
|
||||
"Navigation bar":"Thanh điều hướng",
|
||||
"New file":"File mới",
|
||||
"New folder":"Thư mục mới",
|
||||
"New section entry for {0}":"Thêm mới mục trong {0}",
|
||||
"New":"Tạo mới",
|
||||
"No application available to open {0}":"Không tìm thấy ứng dụng dể đọc {0}",
|
||||
"No post found: {0}":"Không tìm thấy bài: {0}",
|
||||
"No":"Không",
|
||||
"OS":"OS",
|
||||
"Ok":"Có",
|
||||
"Only {0} could be selected":"Chỉ file với mine {0} mới được chọn",
|
||||
"Open file":"Mở file",
|
||||
"Open with":"Mở với",
|
||||
"Open":"Mở",
|
||||
"Options":"Tuỳ chọn",
|
||||
"Package uninstalled":"Đã gỡ bỏ ứng dụng",
|
||||
"Parent can not be the category itself":"Danh mục cha không được trùng với danh mục hiện tại",
|
||||
"Paste":"Dán",
|
||||
"Phone":"Số điện thoại",
|
||||
"Pid":"Pid",
|
||||
"Please enter category name":"Vui lòng nhập tên danh mục",
|
||||
"Please enter tags":"Vui lòng nhập tags",
|
||||
"Please insert a title in the text: beginning with heading":"Vuil lòng nhập tiêu đề: bắt đầu bài bằng heading",
|
||||
"Please select a category":"Vui lòng chọn danh mục",
|
||||
"Please select a date":"Vui lòng chọn ngày",
|
||||
"Please select a file":"Vui lòng chọn file",
|
||||
"Please select a parent category":"Vui lòng chọn danh much cha",
|
||||
"Please select a section to edit":"Vui lòng chọn mục để sửa",
|
||||
"Please select a section to move":"Vuil lòng chọn mục để di chuyển",
|
||||
"Preview":"Preview",
|
||||
"Properties":"Thông tin",
|
||||
"Quit without saving ?":"Thoát mà không lưu ?",
|
||||
"Quit":"Thoát",
|
||||
"Read more":"Đọc thêm",
|
||||
"Refresh":"Làm mới",
|
||||
"Rename":"Đổi tên",
|
||||
"Repositories":"Các kho ứng dụng",
|
||||
"Resource not found {0}":"Không tìm thấy tài nguyên {0}",
|
||||
"Resource not found: {0}":"Không tìm thấy tài nguyên: {0}",
|
||||
"Row {0}, col {1}, lines: {2}":"Hàng {0}, cột {1}, dòng: {2}",
|
||||
"Save as":"Lưu như",
|
||||
"Save":"Lưu",
|
||||
"Section list is empty, please add one":"Danh sách mục rỗng, vui lòng tạo mới",
|
||||
"Select image file":"Chọn file ảnh",
|
||||
"Service":"Dịch vụ",
|
||||
"Share file":"Chia sẻ",
|
||||
"Shared url: {0}":"Liên kết chia sẻ: {0}",
|
||||
"Shared":"Đã chia sẻ",
|
||||
"Short biblio":"Tiểu sử ngắn",
|
||||
"Sidebar":"Sidebar",
|
||||
"Subtitle":"Tiêu đề con",
|
||||
"System fail: Cannot init desktop manager":"Lỗi hệ thống: không thể khởi chạy trình quản lý desktop",
|
||||
"System fail: Cannot init login screen":"Lỗi hệ thống: không thể khởi chạy màn hình đăng nhập",
|
||||
"Tags":"Tags",
|
||||
"This feature is not implemented yet":"Chức năng này chưa được cài đặt",
|
||||
"Title or content must not be blank":"Tiêu đề hoặc nội dụng không được để trống",
|
||||
"Title":"Tiêu đề",
|
||||
"Toggle Full screen":"Bật/tắt toàn màn hình",
|
||||
"Tree view":"Xem theo cây",
|
||||
"Type":"Loại",
|
||||
"Uninstall : {0}?":"Gỡ cài đặt : {0}?",
|
||||
"Uninstall":"Gỡ cài đặt",
|
||||
"Unknown API setting for {0}":"Không tìm thấy cài đặt API của {0}",
|
||||
"Updated: {0}":"Đã cập nhật: {0}",
|
||||
"Upload":"Tải lên",
|
||||
"Url":"Url",
|
||||
"User abort the authentication":"Người dùng huỷ xác thực",
|
||||
"User data updated":"Thông tin người dùng đã được cập nhật",
|
||||
"VDB Unknown condition for delete command":"VDB không rõ điều kiện cho lệnh xoá",
|
||||
"VFS Cannot encode file: {0}":"VFS Không thể mã hoá file: {0}",
|
||||
"VFS cannot create : {0}":"VFS không thể tạo : {0}",
|
||||
"VFS cannot delete : {0}":"VFS không thể xoá : {0}",
|
||||
"VFS cannot download file : {0}":"VFS không thể tải về : {0}",
|
||||
"VFS cannot get meta data for {0}":"VFS không thể truy vấn thông tin của {0}",
|
||||
"VFS cannot init {0}: {1}":"VFS không thể khởi động {0}: {1}",
|
||||
"VFS cannot move : {0}":"VFS không thể di chuyển : {0}",
|
||||
"VFS cannot read : {0}":"VFS không thể đọc : {0}",
|
||||
"VFS cannot save : {0}":"VFS không thể lưu : {0}",
|
||||
"VFS cannot write : {0}":"VFS không thể viết : {0}",
|
||||
"VFS unknown action: {0}":"VFS không rõ hành động : {0}",
|
||||
"VFS unknown handler: {0}":"VFS không rõ trình xữ lý: {0}",
|
||||
"View":"Xem",
|
||||
"Would you like to login to {0}?":"Bạn có muốn đăng nhập vào {0}?",
|
||||
"Wrong format: it should be [name] url":"Sai định dạng: định dạng hợp lệ [name] url",
|
||||
"Yes":"Có",
|
||||
"{0} is not a directory":"{0} không phải là thư mục"
|
||||
|
||||
,
|
||||
"April":"Tháng 4",
|
||||
"August":"Tháng 8",
|
||||
"December":"Tháng 12",
|
||||
"February":"Tháng hai",
|
||||
"Fri":"Sáu",
|
||||
"January":"Tháng một",
|
||||
"July":"Tháng 7",
|
||||
"June":"Tháng 6",
|
||||
"March":"Tháng 3",
|
||||
"May":"Tháng 5",
|
||||
"Mon":"Hai",
|
||||
"November":"Tháng 11",
|
||||
"October":"Tháng 10",
|
||||
"Sat":"Bảy",
|
||||
"Selected: {0} ({1} bytes)":"Đã chọn: {0} ({1} bytes)",
|
||||
"September":"Tháng 9",
|
||||
"Size":"Kích cỡ",
|
||||
"Sun":"CN",
|
||||
"Thu":"Năm",
|
||||
"Tue":"Ba",
|
||||
"Wed":"Tư"
|
||||
|
||||
,
|
||||
"Add":"Thêm",
|
||||
"Cannot read wallpaper list from {0}":"Không thể truy vấn danh sách wallpaper {0}",
|
||||
"Theme":"Chủ đề",
|
||||
"Wallpaper":"Hình nền"
|
||||
|
||||
,
|
||||
"Appearance":"Giao diện",
|
||||
"Cannot fetch system locales: {0}":"Không thể truy vấn danh sách ngôn ngữ: {0}",
|
||||
"Cannot save system setting: {0}":"Không thể lưu cài đặt hệ thống: {0}",
|
||||
"Desktop path":"Đường dẫn đến desktop",
|
||||
"Languages":"Ngôn ngữ",
|
||||
"Local packages path":"Đường dẫn đến ứng dụng riêng",
|
||||
"Mount points":"Điểm truy cập nhanh",
|
||||
"Path":"Đường dẫn",
|
||||
"Please enter mount point name":"Vui lòng nhập điểm truy cập",
|
||||
"Please select a directory":"Vui lòng chọn một thư mục",
|
||||
"Remove: {0}?":"xoá: {0}?",
|
||||
"Remove":"xoá",
|
||||
"Select a directory":"Chọn một thư mục",
|
||||
"System locale":"Ngôn ngữ",
|
||||
"System setting saved":"Đã lưu cài đặt hệ thống",
|
||||
"VFS":"VFS"
|
||||
|
||||
,
|
||||
"Add mount point":"Thêm điểm truy cập",
|
||||
"Edit mount point":"Sửa điểm truy cập"
|
||||
|
||||
,
|
||||
"Services":"Dịch vụ",
|
||||
"Startup":"Khởi chạy"
|
||||
|
||||
,
|
||||
"Add application":"Thêm ứng dụng",
|
||||
"Add service":"Thêm dịch vụ",
|
||||
"Please select an entry":"Vui lòng chọn 1 mục từ danh sách",
|
||||
"Startup applications":"Ứng dụng khởi chạy",
|
||||
"Startup services":"Dịch vụ khởi chạy"
|
||||
|
||||
,
|
||||
"Cannot export to PNG in this browser: {0}":"Cannot export to PNG in this browser: {0}",
|
||||
"Cannot export to {0}: {1}":"Cannot export to {0}: {1}",
|
||||
"Cannot export: {0}":"Cannot export: {0}",
|
||||
"Export as":"Export as",
|
||||
"File exported":"File exported",
|
||||
"Syntax error: {0}":"Syntax error: {0}"
|
||||
|
||||
,
|
||||
"Graph editor":"Graph editor",
|
||||
"Render":"Render"
|
||||
}
|
@ -7,3 +7,4 @@
|
||||
<!--div id = "workingenv"></div-->
|
||||
</div>
|
||||
<afx-menu id="contextmenu" data-id="contextmenu" context="true" style="display:none;"></afx-menu>
|
||||
<afx-label id="systooltip" data-id="systooltip" style="display:none;position:absolute;"></afx-label>
|
@ -4,9 +4,9 @@
|
||||
<afx-vbox>
|
||||
<afx-file-view data-id = "fileview" view='tree' status = false></afx-file-view>
|
||||
<input data-height = '26' type = "text" data-id = "filename" style="margin-left:5px; margin-right:5px;display:none;" />
|
||||
<div data-height = '30' style=' text-align:right;padding-top:3px;'>
|
||||
<afx-button data-id = "bt-ok" text = "Ok"></afx-button>
|
||||
<afx-button data-id = "bt-cancel" text = "Cancel"></afx-button>
|
||||
<div data-height = '30' style=' text-align:right;padding:3px;'>
|
||||
<afx-button data-id = "bt-ok" text = "__(Ok)"></afx-button>
|
||||
<afx-button data-id = "bt-cancel" text = "__(Cancel)"></afx-button>
|
||||
</div>
|
||||
</afx-vbox>
|
||||
</afx-hbox>
|
||||
|
@ -1,19 +1,42 @@
|
||||
# Copyright 2017-2018 Xuan Sang LE <xsang.le AT gmail DOT com>
|
||||
|
||||
# AnTOS Web desktop is is licensed under the GNU General Public
|
||||
# License v3.0, see the LICENCE file for more information
|
||||
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
self.OS.systemSetting = (conf) ->
|
||||
_OS.setting.desktop = conf.desktop if conf.desktop
|
||||
_OS.setting.applications = conf.applications if conf.applications
|
||||
_OS.setting.appearance = conf.appearance if conf.appearance
|
||||
_OS.setting.appearance.wp = {
|
||||
url: "os://resources/themes/system/wp/wp2.jpg",
|
||||
size: "cover",
|
||||
repeat: "repeat"
|
||||
} unless _OS.setting.appearance.wp
|
||||
_OS.setting.appearance.wps = [] unless _OS.setting.appearance.wps
|
||||
_OS.setting.user = conf.user
|
||||
_OS.setting.VFS = conf.VFS if conf.VFS
|
||||
_OS.setting.desktop.path = "home:///.desktop" unless _OS.setting.desktop.path
|
||||
_OS.setting.desktop.path = "home://.desktop" unless _OS.setting.desktop.path
|
||||
_OS.setting.desktop.menu = {} unless _OS.setting.desktop.menu
|
||||
_OS.setting.VFS.mountpoints = [
|
||||
#TODO: multi app try to write to this object, it neet to be cloned
|
||||
{ text: "Applications", path: 'app:///', iconclass: "fa fa-adn", type: "app" },
|
||||
{ text: "Home", path: 'home:///', iconclass: "fa fa-home", type: "fs" },
|
||||
{ text: "Desktop", path: _OS.setting.desktop.path , iconclass: "fa fa-desktop", type: "fs" },
|
||||
{ text: "OS", path: 'os:///', iconclass: "fa fa-inbox", type: "fs" },
|
||||
{ text: "Google Drive", path: 'gdv:///', iconclass: "fa fa-inbox", type: "fs" },
|
||||
{ text: "Shared", path: 'shared:///' , iconclass: "fa fa-share-square", type: "fs" }
|
||||
{ text: "__(Applications)", path: 'app://', iconclass: "fa fa-adn", type: "app" },
|
||||
{ text: "__(Home)", path: 'home://', iconclass: "fa fa-home", type: "fs" },
|
||||
{ text: "__(Desktop)", path: _OS.setting.desktop.path , iconclass: "fa fa-desktop", type: "fs" },
|
||||
{ text: "__(OS)", path: 'os://', iconclass: "fa fa-inbox", type: "fs" },
|
||||
{ text: "__(Google Drive)", path: 'gdv://', iconclass: "fa fa-inbox", type: "fs" },
|
||||
{ text: "__(Shared)", path: 'shared://' , iconclass: "fa fa-share-square", type: "fs" }
|
||||
] if not _OS.setting.VFS.mountpoints
|
||||
|
||||
_OS.setting.system = conf.system if conf.system
|
||||
@ -28,9 +51,10 @@
|
||||
} if not _OS.setting.system.startup
|
||||
|
||||
_OS.setting.system.pkgpaths = {
|
||||
user: "home:///.packages",
|
||||
system: "os:///packages"
|
||||
user: "home://.packages",
|
||||
system: "os://packages"
|
||||
} unless _OS.setting.system.pkgpaths
|
||||
_OS.setting.system.locale = "en_GB" unless _OS.setting.system.locale
|
||||
_OS.setting.system.menu = {} unless _OS.setting.system.menu
|
||||
_OS.setting.system.repositories = [] unless _OS.setting.system.repositories
|
||||
_OS.setting.appearance.theme = "antos" unless _OS.setting.appearance.theme
|
||||
@ -44,7 +68,7 @@
|
||||
} unless _OS.setting.VFS.gdrive
|
||||
|
||||
#search for app
|
||||
_API.onsearch "Applications", (t) ->
|
||||
_API.onsearch "__(Applications)", (t) ->
|
||||
ar = []
|
||||
term = new RegExp t, "i"
|
||||
for k, v of _OS.setting.system.packages when v.app
|
||||
|
@ -4,7 +4,7 @@
|
||||
<li class = "afx-window-close" onclick = {close}></li>
|
||||
<li if = {minimizable == true} class = "afx-window-minimize" onclick = {minimize}></li>
|
||||
<li if = {resizable == true} class = "afx-window-maximize" onclick={maximize}></li>
|
||||
<li ref = "dragger" class = "afx-window-title">{ apptitle }</li>
|
||||
<li ref = "dragger" class = "afx-window-title">{ apptitle?apptitle.__():apptitle }</li>
|
||||
</ul>
|
||||
<div class = "afx-clear"></div>
|
||||
<div ref = "content" class = "afx-window-content">
|
||||
@ -43,12 +43,18 @@
|
||||
self[i] = v[i]
|
||||
else
|
||||
self[k] = v
|
||||
if(k == "apptitle")
|
||||
self.root.observable.trigger("apptitlechange")
|
||||
self.update()
|
||||
}
|
||||
self.root.get = function(k)
|
||||
{
|
||||
return self[k]
|
||||
}
|
||||
self.root.update = function()
|
||||
{
|
||||
self.update()
|
||||
}
|
||||
minimize()
|
||||
{
|
||||
this.root.observable.trigger("hide")
|
@ -1,5 +1,5 @@
|
||||
<afx-apps-dock>
|
||||
<afx-button class = {selected: parent.selectedApp && app.pid == parent.selectedApp.pid} each={ items } icon = {icon} text = {text} onbtclick = {onbtclick}>
|
||||
<afx-button class = {selected: parent.selectedApp && it.app.pid == parent.selectedApp.pid} each={ it,i in items} iconclass = {it.iconclass} icon = {it.icon} appindex = {i} text = {it.text} onbtclick = {it.onbtclick} tooltip= {"cr:" + it.app.title()} >
|
||||
</afx-button>
|
||||
<script>
|
||||
this.items = opts.items || []
|
||||
@ -48,6 +48,10 @@
|
||||
self.update()
|
||||
}
|
||||
}
|
||||
self.root.update = function()
|
||||
{
|
||||
self.update()
|
||||
}
|
||||
self.root.get = function(k)
|
||||
{
|
||||
return self[k]
|
||||
@ -56,5 +60,23 @@
|
||||
window.OS.courrier.trigger("sysdockloaded")
|
||||
})
|
||||
|
||||
self.root.contextmenuHandler = function(e, m)
|
||||
{
|
||||
if(e.target == self.root) return;
|
||||
var appidx = $(e.target).parent().attr("appindex")
|
||||
var app = self.items[appidx].app
|
||||
m.set("items", [
|
||||
{ text: "__(Show)", dataid:"show" },
|
||||
{ text: "__(Hide)", dataid:"hide" },
|
||||
{ text: "__(Close)", dataid:"quit" }
|
||||
])
|
||||
m.set("onmenuselect", function(evt)
|
||||
{
|
||||
if(app[evt.item.data.dataid])
|
||||
app[evt.item.data.dataid]()
|
||||
})
|
||||
m.show(e)
|
||||
}
|
||||
|
||||
</script>
|
||||
</afx-apps-dock>
|
@ -1,9 +1,12 @@
|
||||
<afx-calendar-view>
|
||||
<div><i class ="prevmonth" onclick={prevmonth}></i>{text}<i onclick={nextmonth} class="nextmonth"></i></div>
|
||||
<div><i class ="prevmonth" onclick={prevmonth}></i>
|
||||
<afx-label text = {mtext}></afx-label>
|
||||
<afx-label text = {year}></afx-label>
|
||||
<i onclick={nextmonth} class="nextmonth"></i></div>
|
||||
<afx-grid-view data-id ={"grid_" + rid} style = "height:100%;" ref = "grid" header = {header}> </afx-grid-view>
|
||||
|
||||
<script >
|
||||
this.header = [{value:"Sun"},{value:"Mon"},{value:"Tue"},{value:"Wed"},{value:"Thu"},{value:"Fri"},{value:"Sat"}]
|
||||
this.header = [{value:"__(Sun)"},{value:"__(Mon)"},{value:"__(Tue)"},{value:"__(Wed)"},{value:"__(Thu)"},{value:"__(Fri)"},{value:"__(Sat)"}]
|
||||
this.root.observable = opts.observable
|
||||
var self = this
|
||||
this.day = 0
|
||||
@ -17,7 +20,7 @@
|
||||
return self[k]
|
||||
}
|
||||
|
||||
this.on("mount", function (e) {
|
||||
this.on("mount", function (e) {
|
||||
self.refs.grid.root.observable = self.root.observable
|
||||
calendar(null)
|
||||
self.root.observable.on("gridcellselect", function(d){
|
||||
@ -62,7 +65,7 @@
|
||||
self.year = date.getFullYear()
|
||||
|
||||
var now ={ d:(new Date()).getDate(), m:(new Date()).getMonth(), y:(new Date()).getFullYear()}
|
||||
months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
|
||||
months = ["__(January)", "__(February)", "__(March)", "__(April)", "__(May)", "__(June)", "__(July)", "__(August)", "__(September)", "__(October)", "__(November)", "__(December)"]
|
||||
|
||||
this_month = new Date(self.year, self.month, 1)
|
||||
next_month = new Date(self.year, self.month + 1, 1)
|
||||
@ -70,7 +73,7 @@
|
||||
// Find out when this month starts and ends.
|
||||
first_week_day = this_month.getDay()
|
||||
days_in_this_month = Math.round((next_month.getTime() - this_month.getTime()) / (1000 * 60 * 60 * 24))
|
||||
self.text = months[self.month] + ' ' + self.year
|
||||
self.mtext = months[self.month]
|
||||
var rows = []
|
||||
var row = []
|
||||
// Fill the first week of the month with the appropriate number of blanks.
|
@ -1,3 +0,0 @@
|
||||
<afx-dummy>
|
||||
<yield/>
|
||||
</afx-dummy>
|
10
src/core/tags/afx-dummy.tag
Normal file
10
src/core/tags/afx-dummy.tag
Normal file
@ -0,0 +1,10 @@
|
||||
<afx-dummy>
|
||||
<yield/>
|
||||
<script>
|
||||
var self = this
|
||||
self.root.update = function()
|
||||
{
|
||||
self.update()
|
||||
}
|
||||
</script>
|
||||
</afx-dummy>
|
@ -4,7 +4,7 @@
|
||||
<div class = "treecontainer" ref="treecontainer">
|
||||
<afx-tree-view ref = "treeview" observable = {root.observable}></afx-tree-view>
|
||||
</div>
|
||||
<div if = {status == true} class = "status" ref = "stbar"></div>
|
||||
<afx-label if = {status == true} class = "status" ref = "stbar"></afx-label>
|
||||
<script>
|
||||
var self = this
|
||||
self.root.observable = opts.observable || riot.observable()
|
||||
@ -20,7 +20,7 @@
|
||||
this.fetch = opts.fetch
|
||||
this.chdir = opts.chdir
|
||||
this.rid = $(self.root).attr("data-id") || Math.floor(Math.random() * 100000) + 1
|
||||
this.header = [{value:"File name"},{value: "Type", width:150}, {value: "Size", width:70}]
|
||||
this.header = [{value:"__(File name)"},{value: "__(Type)", width:150}, {value: "__(Size)", width:70}]
|
||||
|
||||
self.root.set = function(k,v)
|
||||
{
|
||||
@ -49,7 +49,7 @@
|
||||
var h = $(self.root).outerHeight()
|
||||
var w = $(self.root).width()
|
||||
if(self.refs.stbar)
|
||||
h -= ($(self.refs.stbar).height() + 10)
|
||||
h -= ($(self.refs.stbar.root).height() + 10)
|
||||
$(self.refs.listview.root).css("height", h + "px")
|
||||
$(self.refs.gridview.root).css("height", h + "px")
|
||||
$(self.refs.treecontainer).css("height", h + "px")
|
||||
@ -126,7 +126,8 @@
|
||||
f(getTreeData(d))
|
||||
})
|
||||
})
|
||||
$(self.refs.stbar).html("")
|
||||
if(self.refs.stbar)
|
||||
self.refs.stbar.root.set("text", "")
|
||||
switch (self.view) {
|
||||
case 'icon':
|
||||
$(self.refs.listview.root).show()
|
||||
@ -149,6 +150,7 @@
|
||||
}
|
||||
else
|
||||
refreshData()
|
||||
//console.log("update")
|
||||
//calibre_size()
|
||||
})
|
||||
self.on("mount", function(){
|
||||
@ -199,8 +201,8 @@
|
||||
self.selectedFile = e.data
|
||||
if(self.onfileselect)
|
||||
self.onfileselect(e.data)
|
||||
$(self.refs.stbar).empty()
|
||||
$(self.refs.stbar).append($("<span>").append("Selected: " + e.data.filename + " (" + e.data.size + " bytes)"))//.html()
|
||||
if(self.refs.stbar)
|
||||
self.refs.stbar.root.set("text", __("Selected: {0} ({1} bytes)", e.data.filename, e.data.size?e.data.size:"0"))//.html()
|
||||
})
|
||||
self.root.observable.on("filedbclick", function(e){
|
||||
if(e.id != self.rid ) return
|
||||
@ -216,6 +218,9 @@
|
||||
self.root.observable.on("calibrate", function(e){
|
||||
calibre_size()
|
||||
})
|
||||
/*self.root.observable.on("*", function(e){
|
||||
console.log(e)
|
||||
})*/
|
||||
})
|
||||
</script>
|
||||
</afx-file-view>
|
@ -6,6 +6,7 @@
|
||||
var self = this
|
||||
this.rid = $(self.root).attr("data-id") || Math.floor(Math.random() * 100000) + 1
|
||||
this.on('mount', function(){
|
||||
self.root.observable = (self.parent && self.parent.root && self.parent.root.observable) || opts.observable || riot.observable()
|
||||
$(self.refs.container)
|
||||
.css("display","flex")
|
||||
.css("flex-direction","row")
|
||||
@ -23,12 +24,26 @@
|
||||
})
|
||||
}
|
||||
})
|
||||
self.root.update = function()
|
||||
{
|
||||
self.update()
|
||||
}
|
||||
var calibrate_size = function()
|
||||
{
|
||||
var auto_width = []
|
||||
var csize, ocwidth = 0, avaiheight;
|
||||
avaiheight = $(self.root).height()
|
||||
avaiWidth = $(self.root).width()
|
||||
/*if(avaiheight == 0)
|
||||
{
|
||||
avaiheight = $(self.parent.root).height()
|
||||
$(self.root).css("height", avaiheight+"px")
|
||||
}
|
||||
if(avaiWidth == 0)
|
||||
{
|
||||
avaiWidth = $(self.parent.root).width()
|
||||
$(self.root).css("height", avaiWidth+"px")
|
||||
}*/
|
||||
$(self.refs.container).css("height",avaiheight + "px")
|
||||
$(self.refs.container)
|
||||
.children()
|
||||
@ -47,8 +62,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
$(this)
|
||||
.css("flex-grow","1")
|
||||
$(this).css("flex-grow","1")
|
||||
auto_width.push(this)
|
||||
}
|
||||
})
|
20
src/core/tags/afx-html.tag
Normal file
20
src/core/tags/afx-html.tag
Normal file
@ -0,0 +1,20 @@
|
||||
<afx-html ref = "container">
|
||||
<script>
|
||||
this.content = opts.content
|
||||
this.root.innerHTML = this.content
|
||||
this.updateContent = undefined
|
||||
var self = this
|
||||
this.root.set = function(k, v)
|
||||
{
|
||||
self[k] = v
|
||||
if(k == "content")
|
||||
self.root.innerHTML = v
|
||||
else if(k == "updateContent")
|
||||
self.update()
|
||||
}
|
||||
this.on("update", function(){
|
||||
if(self.updateContent)
|
||||
self.root.innerHTML = self.updateContent()
|
||||
})
|
||||
</script>
|
||||
</afx-html>
|
@ -1,8 +1,8 @@
|
||||
<afx-label>
|
||||
<span style = {color?"color:" + color:""} >
|
||||
<i if={iconclass} class = {iconclass} ></i>
|
||||
<i if={icon} class="icon-style" style = { "background: url("+icon+");background-size: 100% 100%;background-repeat: no-repeat;" }></i>
|
||||
{ text }
|
||||
<i if={icon} class="icon-style" style = { "background: url("+window.OS.API.handler.get+"/"+icon+");background-size: 100% 100%;background-repeat: no-repeat;" }></i>
|
||||
{ text?text.__():"" }
|
||||
</span>
|
||||
<script>
|
||||
this.iconclass = opts.iconclass
|
@ -1,16 +1,20 @@
|
||||
<afx-list-view class = {dropdown: opts.dropdown == "true"}>
|
||||
<div class = "list-container" ref = "container">
|
||||
<div if = {opts.dropdown == "true"} ref = "current" style = {opts.width?"min-width:" + opts.width + "px;":"min-width:150px;"} onclick = {show_list}>
|
||||
<afx-list-view class = {dropdown: opts.dropdown == "true"} style = "display:flex; flex-direction:column">
|
||||
<div class = "list-container" ref = "container" style="flex:1;">
|
||||
<div if = {opts.dropdown == "true"} ref = "current" onclick = {show_list}>
|
||||
<afx-label ref = "drlabel"></afx-label>
|
||||
</div>
|
||||
<ul ref = "mlist" >
|
||||
<li each={item,i in items } class={selected: parent._autoselect(item,i)} ondblclick = {parent._dbclick} onclick = {parent._select} oncontextmenu = {parent._select}>
|
||||
<afx-label class = {item.class} color = {item.color} iconclass = {item.iconclass} icon = {item.icon} text = {item.text}></afx-label>
|
||||
<i if = {item.closable} class = "closable" click = {parent._remove}></i>
|
||||
<ul if = {item.complex} class = "complex-content">
|
||||
<li each = {ctn,j in item.detail} class = {ctn.class}>{ctn.text.toString()}</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<ul ref = "mlist">
|
||||
<li each={item,i in items } class={selected: parent._autoselect(item,i)} ondblclick = {parent._dbclick} onclick = {parent._select} oncontextmenu = {parent._select}>
|
||||
<afx-label class = {item.class} color = {item.color} iconclass = {item.iconclass} icon = {item.icon} text = {item.text}></afx-label>
|
||||
<i if = {item.closable} class = "closable" click = {parent._remove}></i>
|
||||
<ul if = {item.complex} class = "complex-content">
|
||||
<li each = {ctn,j in item.detail} class = {ctn.class}>{ctn.text}</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div if = {opts.dropdown != "true" && buttons} class = "button_container">
|
||||
<afx-button each = {btn,i in buttons} text = {btn.text} icon = {btn.icon} iconclass = {btn.iconclass} onbtclick = {btn.onbtclick}></afx-button>
|
||||
</div>
|
||||
<script>
|
||||
this.items = opts.items || []
|
||||
@ -19,6 +23,7 @@
|
||||
self.onlistselect = opts.onlistselect
|
||||
self.onlistdbclick = opts.onlistdbclick
|
||||
self.onitemclose = opts.onitemclose
|
||||
self.buttons = opts.buttons
|
||||
var onclose = false
|
||||
this.rid = $(self.root).attr("data-id") || Math.floor(Math.random() * 100000) + 1
|
||||
self.root.set = function(k,v)
|
||||
@ -112,8 +117,23 @@
|
||||
}
|
||||
|
||||
this.on("mount", function(){
|
||||
self.root.observable = opts.observable || (self.parent && self.parent.root && self.parent.root.observable) || riot.observable()
|
||||
|
||||
if(opts.dropdown == "true")
|
||||
{
|
||||
var cl = function()
|
||||
{
|
||||
$(self.refs.container).css("width", $(self.root).width() + "px" )
|
||||
$(self.refs.current).css("width", $(self.root).width() + "px" )
|
||||
$(self.refs.mlist).css("width", $(self.root).width() + "px" )
|
||||
}
|
||||
cl()
|
||||
self.root.observable.on("calibrate", function(){
|
||||
cl()
|
||||
})
|
||||
self.root.observable.on("resize", function(){
|
||||
cl()
|
||||
})
|
||||
$(document).click(function(event) {
|
||||
if(!$(event.target).closest(self.refs.container).length) {
|
||||
$(self.refs.mlist).hide()
|
||||
@ -171,7 +191,8 @@
|
||||
if(opts.dropdown == "true")
|
||||
{
|
||||
$(self.refs.mlist).hide()
|
||||
$(self.refs.current).html(it.text)
|
||||
|
||||
self.refs.drlabel.root.set("*",it)
|
||||
}
|
||||
|
||||
if(self.onlistselect)
|
@ -9,6 +9,7 @@
|
||||
//self.parent = $(self.root).parent().parent()
|
||||
var tagname = $(self.parent.root).prop("tagName")
|
||||
self.resizable = $(self.root).prev().length == 1 ? $(self.root).prev()[0]: undefined
|
||||
//self.nextel = $(self.root).next().length == 1 ? $(self.root).next()[0]: undefined
|
||||
if(tagname == "AFX-HBOX")
|
||||
{
|
||||
self.dir = "hz"
|
||||
@ -32,7 +33,8 @@
|
||||
//$(self.root).css("cursor", "normal")
|
||||
self.dir = "none"
|
||||
}
|
||||
|
||||
if(!self.minsize)
|
||||
self.minsize = 10
|
||||
enable_dragging()
|
||||
})
|
||||
|
106
src/core/tags/afx-slider.tag
Normal file
106
src/core/tags/afx-slider.tag
Normal file
@ -0,0 +1,106 @@
|
||||
<afx-slider>
|
||||
<div class= "container" ref="container">
|
||||
<div class = "progress" ref ="prg"></div>
|
||||
<div if = {dragable} class = "dragpoint" ref = "point"></div>
|
||||
</div>
|
||||
<script>
|
||||
this.value = Number(opts.value) || 0
|
||||
this.max = Number(opts.max) || 100
|
||||
if(opts.dragable != undefined)
|
||||
this.dragable = eval(opts.dragable)
|
||||
else
|
||||
this.dragable = true
|
||||
this.onchanging = opts.onchanging
|
||||
this.onchange = opts.onchange
|
||||
//this.rid = $(self.root).attr("data-id") || Math.floor(Math.random() * 100000) + 1
|
||||
var self = this
|
||||
self.root.set = function(k,v)
|
||||
{
|
||||
if(k == "*")
|
||||
for(var i in v)
|
||||
self[i] = v[i]
|
||||
else
|
||||
self[k] = v
|
||||
/*if(k == "value")
|
||||
{
|
||||
if(self.onchange) self.onchange(self.value)
|
||||
if(self.onchanging) self.onchanging(self.value)
|
||||
}*/
|
||||
self.update()
|
||||
}
|
||||
self.root.get = function(k)
|
||||
{
|
||||
return self[k]
|
||||
}
|
||||
|
||||
var calibrate = function() {
|
||||
if(self.value > self.max) self.value = self.max
|
||||
$(self.refs.container).css("width", $(self.root).width() + "px")
|
||||
var w = $(self.refs.container).width()*self.value/ self.max
|
||||
$(self.refs.prg).css("width", w + "px").css("height", $(self.refs.container).height()+"px")
|
||||
if(self.dragable)
|
||||
{
|
||||
var ow = w - $(self.refs.point).width()/2
|
||||
var top = Math.floor(($(self.refs.prg).height() - $(self.refs.point).height())/2)
|
||||
$(self.refs.point).css("left", ow + "px").css("top", top + "px")
|
||||
}
|
||||
}
|
||||
self.on("update", function(){
|
||||
calibrate()
|
||||
})
|
||||
var enable_dragging = function()
|
||||
{
|
||||
$(self.refs.point)
|
||||
.css("user-select","none")
|
||||
.css("cursor","default")
|
||||
$(self.refs.point).on("mousedown", function(e){
|
||||
e.preventDefault()
|
||||
offset = $(self.refs.container).offset()
|
||||
$(window).on("mousemove", function(e){
|
||||
var left
|
||||
left = e.clientX - offset.left
|
||||
left = left < 0?0:left
|
||||
var maxw = $(self.refs.container).width();
|
||||
left = left > maxw?maxw : left
|
||||
self.value = left*self.max/maxw
|
||||
calibrate()
|
||||
if(self.onchanging) self.onchanging(self.value)
|
||||
})
|
||||
$(window).on("mouseup", function(e){
|
||||
if(self.onchange) self.onchange(self.value)
|
||||
$(window).unbind("mousemove", null)
|
||||
})
|
||||
})
|
||||
}
|
||||
self.on("mount", function(){
|
||||
self.root.observable = opts.observable || (self.parent && self.parent.root && self.parent.root.observable) || riot.observable()
|
||||
if(self.dragable)
|
||||
{
|
||||
$(self.refs.point).css("position", "absolute")
|
||||
$(self.refs.point).hide()
|
||||
$(self.root).mouseover(function(){
|
||||
$(self.refs.point).show()
|
||||
}).mouseout(function(){
|
||||
$(self.refs.point).hide()
|
||||
})
|
||||
enable_dragging()
|
||||
}
|
||||
$(self.refs.container).click( function(e){
|
||||
var offset = $(self.refs.container).offset()
|
||||
var left = e.clientX - offset.left
|
||||
var maxw = $(self.refs.container).width()
|
||||
self.value = left*self.max/maxw
|
||||
calibrate()
|
||||
if(self.onchange) self.onchange(self.value)
|
||||
if(self.onchanging) self.onchanging(self.value)
|
||||
})
|
||||
self.root.observable.on("calibrate",function(){
|
||||
calibrate()
|
||||
})
|
||||
self.root.observable.on("resize", function(){
|
||||
calibrate()
|
||||
})
|
||||
calibrate()
|
||||
})
|
||||
</script>
|
||||
</afx-slider>
|
@ -6,7 +6,7 @@
|
||||
else
|
||||
this.swon = false
|
||||
var self = this
|
||||
this.root.observable = opts.observable
|
||||
//this.root.observable = opts.observable
|
||||
if(opts.enable != undefined)
|
||||
this.enable = opts.enable
|
||||
else
|
||||
@ -31,20 +31,23 @@
|
||||
opts.swon = !self.swon
|
||||
self.update()
|
||||
}
|
||||
/*this.on("mount", function(){
|
||||
|
||||
})*/
|
||||
this.on("update", function(e){
|
||||
self.swon = opts.swon
|
||||
self.onchange = opts.onchange
|
||||
self.swon = typeof opts.swon == "function"?opts.swon():opts.swon
|
||||
})
|
||||
toggle(e)
|
||||
{
|
||||
if(!self.enable) return
|
||||
opts.swon = !self.swon
|
||||
self.swon = opts.swon
|
||||
var data = {
|
||||
id: self.rid,
|
||||
data: opts.swon
|
||||
}
|
||||
if(self.onchange)
|
||||
self.onchange(data)
|
||||
if(opts.onchange)
|
||||
opts.onchange(data)
|
||||
if(self.root.observable)
|
||||
self.root.observable.trigger("switch", data)
|
||||
|
@ -39,6 +39,10 @@
|
||||
{
|
||||
return self[k]
|
||||
}
|
||||
self.root.update = function()
|
||||
{
|
||||
self.update()
|
||||
}
|
||||
this.on('mount', function() {
|
||||
//console.log(self.refs.aOsmenu.root)
|
||||
$(self.refs.aOsmenu.root).css("z-index",1000000)
|
@ -1,13 +1,9 @@
|
||||
<afx-tab-container>
|
||||
<afx-tab-bar>
|
||||
<afx-list-view ref = "list" />
|
||||
<script>
|
||||
var self = this
|
||||
this.closable = opts.closable || false
|
||||
self.root.observable = opts.observable || riot.observable()
|
||||
self.ontabselect = opts.ontabselect
|
||||
get_observable(){
|
||||
return self.root.observable
|
||||
}
|
||||
|
||||
self.root.get = function (k) {
|
||||
return self.refs.list.root.get(k)
|
||||
@ -17,6 +13,7 @@
|
||||
self.update(true)
|
||||
}
|
||||
self.on("mount", function(){
|
||||
self.root.observable = opts.observable || (self.parent && self.parent.root && self.parent.root.observable) || riot.observable()
|
||||
self.refs.list.root.observable = self.root.observable
|
||||
/*self.root.observable.on("listselect", function(){
|
||||
console.log("list select")
|
||||
@ -71,4 +68,4 @@
|
||||
}
|
||||
|
||||
</script>
|
||||
</afx-tab-container>
|
||||
</afx-tab-bar>
|
91
src/core/tags/afx-tab-container.tag
Normal file
91
src/core/tags/afx-tab-container.tag
Normal file
@ -0,0 +1,91 @@
|
||||
<afx-tab-container>
|
||||
<afx-hbox ref = "mybox" if = {bar == "left"}>
|
||||
<afx-tab-bar data-ref="tabbar" ></afx-tab-bar>
|
||||
<div data-ref="container"></div>
|
||||
</afx-hbox>
|
||||
<afx-vbox ref = "mybox" if = { bar == "top"}>
|
||||
<afx-tab-bar data-ref="tabbar" ></afx-tab-bar>
|
||||
<div data-ref="container"></div>
|
||||
</afx-vbox>
|
||||
<script>
|
||||
this.bar = opts.bar || "top"
|
||||
this.barwidth = opts.barwidth
|
||||
this.barheight = opts.barheight
|
||||
var schemes = []
|
||||
var self = this
|
||||
var calibrate = function()
|
||||
{
|
||||
$(self.refs.mybox.root).css("width", $(self.root).width()+"px")
|
||||
$(self.refs.mybox.root).css("height", $(self.root).height()+"px")
|
||||
self.root.observable.trigger("calibrate")
|
||||
}
|
||||
self.on("mount", function () {
|
||||
self.tabbar = $("[data-ref='tabbar']", self.root)[0]
|
||||
self.container = $("[data-ref='container']", self.root)[0]
|
||||
if(self.barwidth)
|
||||
$(self.tabbar).attr("data-width", self.barwidth)
|
||||
if(self.barheight)
|
||||
$(self.tabbar).attr("data-height", self.barheight)
|
||||
self.root.observable = (self.parent && self.parent.root && self.parent.root.observable) || opts.observable || riot.observable()
|
||||
self.tabbar.set("ontabselect", function(e){
|
||||
$(self.container).children().each(function(el){
|
||||
$(this).hide()
|
||||
})
|
||||
$(e.data.scheme).show()
|
||||
e.data.handler.render()
|
||||
calibrate()
|
||||
})
|
||||
self.root.observable.on("resize", function(){
|
||||
calibrate()
|
||||
})
|
||||
})
|
||||
self.on("update", function(){
|
||||
$(self.container).children().each(function(e){
|
||||
if(this.update) this.update()
|
||||
})
|
||||
})
|
||||
var render = function(el)
|
||||
{
|
||||
var sch = $.parseHTML(el.scheme)
|
||||
$(self.container).append(sch)
|
||||
el.scheme = sch
|
||||
riot.mount(sch, {observable: self.root.observable})
|
||||
$(sch).hide()
|
||||
el.handler = el.handler(sch[0])
|
||||
//console.log(el.handler)
|
||||
//el.handler.render()
|
||||
self.root.observable.trigger("tabrendered")
|
||||
//self.root.observable.trigger("calibrate")
|
||||
}
|
||||
var addTab = function(el)
|
||||
{
|
||||
if(!el.f)
|
||||
el.f = (function(){})
|
||||
self.tabbar.push(el)
|
||||
if(el.url)
|
||||
{
|
||||
el.url.asFileHandler().read(function(d){
|
||||
el.scheme = d
|
||||
render(el)
|
||||
})
|
||||
}
|
||||
else
|
||||
{
|
||||
render(el)
|
||||
}
|
||||
}
|
||||
self.root.setTabs = function(arr)
|
||||
{
|
||||
if(arr.length <= 0)
|
||||
{
|
||||
self.tabbar.set("selected", 0)
|
||||
return
|
||||
}
|
||||
self.root.observable.one("tabrendered", function(){
|
||||
arr.splice(0,1)
|
||||
self.root.setTabs(arr)
|
||||
})
|
||||
addTab(arr[0])
|
||||
}
|
||||
</script>
|
||||
</afx-tab-container>
|
@ -1,5 +1,4 @@
|
||||
<afx-tree-view>
|
||||
|
||||
<div class={afx_tree_item_selected:treeroot.selectedItem && treeroot.selectedItem.treepath == data.treepath, afx_folder_item: isFolder(), afx_tree_item_odd: index%2 != 0 } onclick={select} ondblclick = {_dbclick} oncontextmenu = {select}>
|
||||
<ul style = "padding:0;margin:0;white-space: nowrap;">
|
||||
<li ref = "padding" ></li>
|
||||
@ -12,8 +11,6 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<ul if={ isFolder() } show={ isFolder() && open }>
|
||||
<li each={ child, i in data.nodes }>
|
||||
<afx-tree-view ontreeselect = {parent.ontreeselect} index = {i} fetch = {parent.fetch} ontreedbclick = {parent.ontreedbclick} data={child} indent={indent+1} observable = {parent.root.observable} path = {parent.data.treepath + ">" + i} treeroot= {parent.treeroot}></afx-tree-view>
|
@ -6,6 +6,7 @@
|
||||
var self = this
|
||||
this.rid = $(self.root).attr("data-id") || Math.floor(Math.random() * 100000) + 1
|
||||
this.on('mount', function(){
|
||||
self.root.observable = (self.parent && self.parent.root && self.parent.root.observable) || opts.observable || riot.observable()
|
||||
$(self.refs.container)
|
||||
.css("display","flex")
|
||||
.css("flex-direction","column")
|
||||
@ -25,13 +26,26 @@
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
self.root.update = function()
|
||||
{
|
||||
self.update()
|
||||
}
|
||||
var calibrate_size = function()
|
||||
{
|
||||
var auto_height = []
|
||||
var csize, ocheight = 0, avaiheight;
|
||||
avaiheight = $(self.root).height()
|
||||
avaiwidth = $(self.root).width()
|
||||
/*if(avaiheight == 0)
|
||||
{
|
||||
avaiheight = $(self.parent.root).height()
|
||||
$(self.root).css("height", avaiheight+"px")
|
||||
}
|
||||
if(avaiwidth == 0)
|
||||
{
|
||||
avaiwidth = $(self.parent.root).width()
|
||||
$(self.root).css("height", avaiwidth+"px")
|
||||
}*/
|
||||
$(self.refs.container).css("height",avaiheight + "px")
|
||||
$(self.refs.container)
|
||||
.children()
|
||||
@ -50,8 +64,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
$(this)
|
||||
.css("flex-grow","1")
|
||||
$(this).css("flex-grow","1")
|
||||
auto_height.push(this)
|
||||
}
|
||||
})
|
@ -1,8 +1,25 @@
|
||||
# Copyright 2017-2018 Xuan Sang LE <xsang.le AT gmail DOT com>
|
||||
|
||||
# AnTOS Web desktop is is licensed under the GNU General Public
|
||||
# License v3.0, see the LICENCE file for more information
|
||||
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
String.prototype.asFileHandler = () ->
|
||||
list = @split ":///"
|
||||
list = @split "://"
|
||||
handlers = _API.VFS.findHandlers list[0]
|
||||
if not handlers or handlers.length is 0
|
||||
_courrier.osfail "VFS unknown handler: #{@}", (_API.throwe "OS.VFS"), @
|
||||
_courrier.osfail __("VFS unknown handler: {0}", @), (_API.throwe "OS.VFS"), @
|
||||
return null
|
||||
return new handlers[0](@)
|
||||
|
||||
@ -25,7 +42,7 @@ class BaseFileHandler
|
||||
@ready = false
|
||||
return unless p
|
||||
@path = p.toString()
|
||||
list = @path.split ":///"
|
||||
list = @path.split "://"
|
||||
@protocol = list[0]
|
||||
return unless list.length > 1
|
||||
re = list[1].replace(/^\/+|\/+$/g, '')
|
||||
@ -33,7 +50,8 @@ class BaseFileHandler
|
||||
@genealogy = re.split("/")
|
||||
@basename = @genealogy[@genealogy.length - 1] unless @isRoot()
|
||||
@ext = @basename.split( "." ).pop() unless @basename.lastIndexOf(".") is 0 or @basename.indexOf( "." ) is -1
|
||||
|
||||
asFileHandler: () ->
|
||||
@
|
||||
isRoot: () -> (not @genealogy) or (@genealogy.size is 0)
|
||||
|
||||
child: (name) ->
|
||||
@ -50,11 +68,12 @@ class BaseFileHandler
|
||||
return -1 unless @path
|
||||
return @path.hash()
|
||||
|
||||
sendB64: (m, f) ->
|
||||
sendB64: (p, f) ->
|
||||
me = @
|
||||
m = if p is "object" then "text/plain" else p
|
||||
return f "" unless @cache
|
||||
if typeof @cache is "string"
|
||||
b64 = @cache.asBase64()
|
||||
if p is "object" or typeof @cache is "string"
|
||||
b64 = if p is "object" then (JSON.stringify @cache).asBase64() else @cache.asBase64()
|
||||
b64 = "data:#{m};base64,#{b64}"
|
||||
f(b64)
|
||||
else
|
||||
@ -63,10 +82,10 @@ class BaseFileHandler
|
||||
reader.onload = () ->
|
||||
f reader.result
|
||||
reader.onerror = (e) ->
|
||||
return _courrier.osfail "Cannot ecode file: #{me.path}", (_API.throwe "OS.VFS"), e
|
||||
return _courrier.osfail __("VFS Cannot encode file: {0}", me.path), (_API.throwe "OS.VFS"), e
|
||||
parent: () ->
|
||||
return @ if @isRoot()
|
||||
return (@protocol + ":///" + (@genealogy.slice 0 , @genealogy.length - 1).join "/")
|
||||
return (@protocol + "://" + (@genealogy.slice 0 , @genealogy.length - 1).join "/")
|
||||
|
||||
onready: (f, err) ->
|
||||
# read meta data
|
||||
@ -129,10 +148,11 @@ class BaseFileHandler
|
||||
|
||||
meta: (f) ->
|
||||
|
||||
getlink: () -> @path
|
||||
# for main action read, write, remove, execute
|
||||
# must be implemented by subclasses
|
||||
action: (n, p, f) ->
|
||||
return _courrier.osfail "VFS unknown action: #{n}", (_API.throwe "OS.VFS"), n
|
||||
return _courrier.osfail __("VFS unknown action: {0}", n), (_API.throwe "OS.VFS"), n
|
||||
|
||||
# now export the class
|
||||
self.OS.API.VFS.BaseFileHandler = BaseFileHandler
|
||||
@ -145,6 +165,9 @@ class RemoteFileHandler extends self.OS.API.VFS.BaseFileHandler
|
||||
meta: (f) ->
|
||||
_API.handler.fileinfo @path, f
|
||||
|
||||
getlink: () ->
|
||||
_API.handler.get + "/" + @path
|
||||
|
||||
action: (n, p, f) ->
|
||||
me = @
|
||||
switch n
|
||||
@ -154,9 +177,10 @@ class RemoteFileHandler extends self.OS.API.VFS.BaseFileHandler
|
||||
return _API.handler.fileblob @path, f if p is "binary"
|
||||
_API.handler.readfile @path, f, if p then p else "text"
|
||||
when "mk"
|
||||
return f { error: "#{@path} is not a directory" } if @info.type is "file"
|
||||
return f { error: __("{0} is not a directory", @path) } if @info.type is "file"
|
||||
_API.handler.mkdir "#{@path}/#{p}", f
|
||||
when "write"
|
||||
return _API.handler.write me.path, me.cache, f if p is "base64"
|
||||
@sendB64 p, (data) ->
|
||||
_API.handler.write me.path, data, f
|
||||
when "upload"
|
||||
@ -174,7 +198,7 @@ class RemoteFileHandler extends self.OS.API.VFS.BaseFileHandler
|
||||
when "move"
|
||||
_API.handler.move @path, p, f
|
||||
else
|
||||
return _courrier.osfail "VFS unknown action: #{n}", (_API.throwe "OS.VFS"), n
|
||||
return _courrier.osfail __("VFS unknown action: {0}", n), (_API.throwe "OS.VFS"), n
|
||||
|
||||
self.OS.API.VFS.register "^(home|desktop|os|Untitled)$", RemoteFileHandler
|
||||
|
||||
@ -217,7 +241,7 @@ class ApplicationHandler extends self.OS.API.VFS.BaseFileHandler
|
||||
when "move"
|
||||
return
|
||||
else
|
||||
return _courrier.osfail "VFS unknown action: #{n}", (_API.throwe "OS.VFS"), n
|
||||
return _courrier.osfail __("VFS unknown action: {0}", n), (_API.throwe "OS.VFS"), n
|
||||
|
||||
self.OS.API.VFS.register "^app$", ApplicationHandler
|
||||
|
||||
@ -267,10 +291,29 @@ class BufferFileHandler extends self.OS.API.VFS.BaseFileHandler
|
||||
when "move"
|
||||
return
|
||||
else
|
||||
return _courrier.osfail "VFS unknown action: #{n}", (_API.throwe "OS.VFS"), n
|
||||
return _courrier.osfail __("VFS unknown action: {0}", n), (_API.throwe "OS.VFS"), n
|
||||
|
||||
self.OS.API.VFS.register "^mem$", BufferFileHandler
|
||||
|
||||
class URLFileHandler extends self.OS.API.VFS.BaseFileHandler
|
||||
constructor: (path) ->
|
||||
super path
|
||||
@ready = true
|
||||
meta: (f) ->
|
||||
f { result: true }
|
||||
action: (n, p, f) ->
|
||||
me = @
|
||||
switch n
|
||||
when "read"
|
||||
_API.get @path, (d) ->
|
||||
f(d)
|
||||
, (e, s) ->
|
||||
_courrier.oserror __("VFS cannot read : {0}", me.path), e, s
|
||||
, if p then p else "text"
|
||||
else
|
||||
return _courrier.oserror __("VFS unknown action: {0}", n), (_API.throwe "OS.VFS"), n
|
||||
self.OS.API.VFS.register "^(http|https)$", URLFileHandler
|
||||
|
||||
class SharedFileHandler extends self.OS.API.VFS.BaseFileHandler
|
||||
constructor: (path) ->
|
||||
super path
|
||||
@ -309,6 +352,6 @@ class SharedFileHandler extends self.OS.API.VFS.BaseFileHandler
|
||||
when "move"
|
||||
return
|
||||
else
|
||||
return _courrier.osfail "VFS unknown action: #{n}", (_API.throwe "OS.VFS"), n
|
||||
return _courrier.osfail __("VFS unknown action: {0}", n), (_API.throwe "OS.VFS"), n
|
||||
|
||||
self.OS.API.VFS.register "^shared$", SharedFileHandler
|
@ -1,13 +1,31 @@
|
||||
|
||||
# Copyright 2017-2018 Xuan Sang LE <xsang.le AT gmail DOT com>
|
||||
|
||||
# AnTOS Web desktop is is licensed under the GNU General Public
|
||||
# License v3.0, see the LICENCE file for more information
|
||||
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
|
||||
# GoogleDrive File Handler
|
||||
G_CACHE = {"gdv:///":{ id: "root", mime: 'dir' } }
|
||||
G_CACHE = {"gdv://":{ id: "root", mime: 'dir' } }
|
||||
|
||||
class GoogleDriveHandler extends this.OS.API.VFS.BaseFileHandler
|
||||
constructor: (path) ->
|
||||
super path
|
||||
me = @
|
||||
@setting = _OS.setting.VFS.gdrive
|
||||
return _courrier.oserror "Unknown API setting for google drive VFS", (_API.throwe "OS.VFS"), null unless @setting
|
||||
return _courrier.oserror __("Unknown API setting for {0}", "GAPI"), (_API.throwe "OS.VFS"), null unless @setting
|
||||
@gid = 'root' if @isRoot()
|
||||
@cache = ""
|
||||
|
||||
@ -17,7 +35,7 @@ class GoogleDriveHandler extends this.OS.API.VFS.BaseFileHandler
|
||||
fn = (r) ->
|
||||
return f() if r
|
||||
# perform the login
|
||||
G_CACHE = {"gdv:///":{ id: "root", mime: 'dir' } }
|
||||
G_CACHE = {"gdv://":{ id: "root", mime: 'dir' } }
|
||||
gapi.auth2.getAuthInstance().signIn()
|
||||
|
||||
if _API.libready @setting.apilink
|
||||
@ -41,12 +59,13 @@ class GoogleDriveHandler extends this.OS.API.VFS.BaseFileHandler
|
||||
gapi.auth2.getAuthInstance().isSignedIn.listen (r) ->
|
||||
fn(r)
|
||||
_GUI.openDialog "YesNoDialog", (d) ->
|
||||
return _courrier.osinfo "User abort the authentification" unless d
|
||||
return _courrier.osinfo __("User abort the authentication") unless d
|
||||
fn(gapi.auth2.getAuthInstance().isSignedIn.get())
|
||||
, "Authentification", { text: "Would you like to login to Google Drive ?" }
|
||||
, __("Authentication")
|
||||
, { text: __("Would you like to login to {0}?", "Google Drive") }
|
||||
.catch (err) ->
|
||||
_API.loaded q, "FAIL"
|
||||
_courrier.oserror "VFS cannot init GAPI: #{err.error}", (_API.throwe "OS.VFS"), err
|
||||
_courrier.oserror __("VFS cannot init {0}: {1}", "GAPI",err.error), (_API.throwe "OS.VFS"), err
|
||||
|
||||
meta: (f) ->
|
||||
me = @
|
||||
@ -67,7 +86,7 @@ class GoogleDriveHandler extends this.OS.API.VFS.BaseFileHandler
|
||||
f(r)
|
||||
.catch (err) ->
|
||||
_API.loaded q, "FAIL"
|
||||
_courrier.oserror "VFS cannot get meta #{me.gid}", (_API.throwe "OS.VFS"), err
|
||||
_courrier.oserror __("VFS cannot get meta data for {0}", me.gid), (_API.throwe "OS.VFS"), err
|
||||
else
|
||||
#console.log "Find file in ", me.parent()
|
||||
fp = me.parent().asFileHandler()
|
||||
@ -89,7 +108,7 @@ class GoogleDriveHandler extends this.OS.API.VFS.BaseFileHandler
|
||||
f { result: r.result.files[0] }
|
||||
.catch (err) ->
|
||||
_API.loaded q1, "FAIL"
|
||||
_courrier.oserror "VFS cannot get meta #{me.path}", (_API.throwe "OS.VFS"), err
|
||||
_courrier.oserror __("VFS cannot get meta data for {0}", me.path), (_API.throwe "OS.VFS"), err
|
||||
|
||||
fields: () ->
|
||||
return "webContentLink, id, name,mimeType,description, kind, parents, properties, iconLink, createdTime, modifiedTime, owners, permissions, fullFileExtension, fileExtension, size"
|
||||
@ -111,7 +130,7 @@ class GoogleDriveHandler extends this.OS.API.VFS.BaseFileHandler
|
||||
_API.loading q, "GAPI"
|
||||
error = (e, s) ->
|
||||
_API.loaded q, "FAIL"
|
||||
_courrier.oserror "VFS cannot save : #{me.path}", e, s
|
||||
_courrier.oserror __("VFS cannot save : {0}", me.path), e, s
|
||||
xhr.onreadystatechange = () ->
|
||||
if ( xhr.readyState == 4 )
|
||||
if ( xhr.status == 200 )
|
||||
@ -121,10 +140,14 @@ class GoogleDriveHandler extends this.OS.API.VFS.BaseFileHandler
|
||||
error xhr, xhr.status
|
||||
xhr.onerror = () ->
|
||||
error xhr, xhr.status
|
||||
|
||||
return xhr.send me.cache.replace /^data:[^;]+;base64,/g, "" if m is "base64"
|
||||
@sendB64 m, (data) ->
|
||||
xhr.send data.replace /^data:[^;]+;base64,/g, ""
|
||||
|
||||
getlink: () ->
|
||||
return @info.webContentLink if @ready
|
||||
return undefined
|
||||
|
||||
action: (n, p, f) ->
|
||||
me = @
|
||||
q = _courrier.getMID()
|
||||
@ -154,7 +177,7 @@ class GoogleDriveHandler extends this.OS.API.VFS.BaseFileHandler
|
||||
f { result: r.result.files }
|
||||
.catch (err) ->
|
||||
_API.loaded q, "FAIL"
|
||||
_courrier.oserror "VFS cannot read #{me.path}", (_API.throwe "OS.VFS"), err
|
||||
_courrier.oserror __("VFS cannot read : {0}", me.path), (_API.throwe "OS.VFS"), err
|
||||
else
|
||||
gapi.client.drive.files.get {
|
||||
fileId: me.info.id,
|
||||
@ -163,13 +186,13 @@ class GoogleDriveHandler extends this.OS.API.VFS.BaseFileHandler
|
||||
.then (r) ->
|
||||
_API.loaded q, "OK"
|
||||
return f r.body unless p is "binary"
|
||||
f r.body.asUnit8Array()
|
||||
f r.body.asUint8Array()
|
||||
.catch (err) ->
|
||||
_API.loaded q, "FAIL"
|
||||
_courrier.oserror "VFS cannot get read #{me.path}", (_API.throwe "OS.VFS"), err
|
||||
_courrier.oserror __("VFS cannot read : {0}", me.path), (_API.throwe "OS.VFS"), err
|
||||
|
||||
when "mk"
|
||||
return f { error: "#{@path} is not a directory" } unless @isFolder()
|
||||
return f { error: __("{0} is not a directory", @path) } unless @isFolder()
|
||||
meta =
|
||||
name: p,
|
||||
parents: [@info.id],
|
||||
@ -182,12 +205,12 @@ class GoogleDriveHandler extends this.OS.API.VFS.BaseFileHandler
|
||||
.then (r) ->
|
||||
_API.loaded q, "OK"
|
||||
#console.log r
|
||||
return _courrier.oserror "VFS cannot create : #{p}", (_API.throwe "OS.VFS"), r unless r and r.result
|
||||
return _courrier.oserror __("VFS cannot create : {0}", p), (_API.throwe "OS.VFS"), r unless r and r.result
|
||||
G_CACHE[me.child p] = { id: r.result.id, mime: "dir" }
|
||||
f r
|
||||
.catch (err) ->
|
||||
_API.loaded q, "FAIL"
|
||||
_courrier.oserror "VFS cannot create #{p}", (_API.throwe "OS.VFS"), err
|
||||
_courrier.oserror __("VFS cannot create : {0}", p), (_API.throwe "OS.VFS"), err
|
||||
|
||||
return
|
||||
|
||||
@ -211,12 +234,12 @@ class GoogleDriveHandler extends this.OS.API.VFS.BaseFileHandler
|
||||
}
|
||||
.then (r) ->
|
||||
_API.loaded q, "OK"
|
||||
return _courrier.oserror "VFS cannot write : #{me.path}", (_API.throwe "OS.VFS"), r unless r and r.result
|
||||
return _courrier.oserror __("VFS cannot write : {0}", me.path), (_API.throwe "OS.VFS"), r unless r and r.result
|
||||
G_CACHE[me.path] = { id: r.result.id, mime: p }
|
||||
me.save r.result.id, p, f
|
||||
.catch (err) ->
|
||||
_API.loaded q, "FAIL"
|
||||
_courrier.oserror "VFS cannot write #{me.path}", (_API.throwe "OS.VFS"), err
|
||||
_courrier.oserror __("VFS cannot write : {0}", me.path), (_API.throwe "OS.VFS"), err
|
||||
|
||||
when "upload"
|
||||
return unless @isFolder()
|
||||
@ -244,12 +267,12 @@ class GoogleDriveHandler extends this.OS.API.VFS.BaseFileHandler
|
||||
.then (r) ->
|
||||
#console.log r
|
||||
_API.loaded q, "OK"
|
||||
return _courrier.oserror "VFS cannot delete : #{me.path}", (_API.throwe "OS.VFS"), r unless r
|
||||
return _courrier.oserror __("VFS cannot delete : {0}", me.path), (_API.throwe "OS.VFS"), r unless r
|
||||
G_CACHE[me.path] = null
|
||||
f { result: true }
|
||||
.catch (err) ->
|
||||
_API.loaded q, "FAIL"
|
||||
_courrier.oserror "VFS cannot delete #{me.path}", (_API.throwe "OS.VFS"), err
|
||||
_courrier.oserror __("VFS cannot delete : {0}", me.path), (_API.throwe "OS.VFS"), err
|
||||
|
||||
when "publish"
|
||||
_API.loaded q, "OK"
|
||||
@ -262,7 +285,7 @@ class GoogleDriveHandler extends this.OS.API.VFS.BaseFileHandler
|
||||
}
|
||||
.then (r) ->
|
||||
_API.loaded q, "OK"
|
||||
return _courrier.oserror "VFS cannot get file : #{me.path}", (_API.throwe "OS.VFS"), r unless r.body
|
||||
return _courrier.oserror __("VFS cannot download file : {0}", me.path), (_API.throwe "OS.VFS"), r unless r.body
|
||||
bytes = []
|
||||
for i in [0..(r.body.length - 1)]
|
||||
bytes.push r.body.charCodeAt i
|
||||
@ -271,7 +294,7 @@ class GoogleDriveHandler extends this.OS.API.VFS.BaseFileHandler
|
||||
_API.saveblob me.basename, blob
|
||||
.catch (err) ->
|
||||
_API.loaded q, "FAIL"
|
||||
_courrier.oserror "VFS cannot fetch #{me.path}", (_API.throwe "OS.VFS"), err
|
||||
_courrier.oserror __("VFS cannot download file : {0}", me.path), (_API.throwe "OS.VFS"), err
|
||||
|
||||
when "move"
|
||||
dest = p.asFileHandler().parent().asFileHandler()
|
||||
@ -285,16 +308,16 @@ class GoogleDriveHandler extends this.OS.API.VFS.BaseFileHandler
|
||||
}
|
||||
.then (r) ->
|
||||
_API.loaded q, "OK"
|
||||
return _courrier.oserror "VFS cannot move : #{me.path}", (_API.throwe "OS.VFS"), r unless r
|
||||
return _courrier.oserror __("VFS cannot move : {0}", me.path), (_API.throwe "OS.VFS"), r unless r
|
||||
f r
|
||||
.catch (err) ->
|
||||
_API.loaded q, "FAIL"
|
||||
_courrier.oserror "VFS cannot move #{me.gid}", (_API.throwe "OS.VFS"), err
|
||||
_courrier.oserror __("VFS cannot move : {0}", me.gid), (_API.throwe "OS.VFS"), err
|
||||
, (err) ->
|
||||
_API.loaded q, "FAIL"
|
||||
else
|
||||
_API.loaded q, "FAIL"
|
||||
return _courrier.osfail "VFS unknown action: #{n}", (_API.throwe "OS.VFS"), n
|
||||
return _courrier.osfail __("VFS unknown action: {0}", n), (_API.throwe "OS.VFS"), n
|
||||
|
||||
|
||||
self.OS.API.VFS.register "^gdv$", GoogleDriveHandler
|
||||
@ -315,7 +338,7 @@ self.OS.API.onsearch "Google Drive", (t) ->
|
||||
return arr
|
||||
|
||||
self.OS.onexit "cleanUpGoogleDrive", () ->
|
||||
G_CACHE = { "gdv:///": { id: "root", mime: 'dir' } }
|
||||
G_CACHE = { "gdv://": { id: "root", mime: 'dir' } }
|
||||
return unless _OS.setting.VFS.gdrive and _API.libready _OS.setting.VFS.gdrive.apilink
|
||||
auth2 = gapi.auth2.getAuthInstance()
|
||||
return unless auth2
|
||||
|
@ -1,9 +1,29 @@
|
||||
<!--
|
||||
# Copyright 2017-2018 Xuan Sang LE <xsang.le AT gmail DOT com>
|
||||
|
||||
# AnTOS Web desktop is is licensed under the GNU General Public
|
||||
# License v3.0, see the LICENCE file for more information
|
||||
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>AntOS webOS</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href="resources/themes/system/font-awesome.css" rel="stylesheet">
|
||||
<link id="ostheme" rel="stylesheet" href="">
|
||||
<!--link href="theme/antos/style.css" rel="stylesheet"-->
|
||||
<script src="scripts/jquery-3.2.1.min.js"></script>
|
||||
|
3
src/libs/showdown.min.js
vendored
Normal file
3
src/libs/showdown.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -1,3 +1,20 @@
|
||||
# Copyright 2017-2018 Xuan Sang LE <xsang.le AT gmail DOT com>
|
||||
|
||||
# AnTOS Web desktop is is licensed under the GNU General Public
|
||||
# License v3.0, see the LICENCE file for more information
|
||||
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
_PM = this.OS.PM
|
||||
_APP = this.OS.APP
|
||||
class ActivityMonitor extends this.OS.GUI.BaseApplication
|
||||
@ -12,9 +29,9 @@ class ActivityMonitor extends this.OS.GUI.BaseApplication
|
||||
item = me.grid.get "selected"
|
||||
return unless item
|
||||
app = _PM.appByPid item[0].value
|
||||
app.quit() if app
|
||||
app.quit(true) if app
|
||||
|
||||
header = [{width:50,value:"Pid"},{value:"Name"}, {value:"Type", width:80},{width:75,value:"Alive (ms)"}]
|
||||
header = [{width:50,value: "__(Pid)"},{value:"__(Name)"}, {value:"__(Type)", width:80},{width:75,value: "__(Alive (ms))"}]
|
||||
@gdata =
|
||||
processes:{}
|
||||
alive:[]
|
||||
@ -36,7 +53,7 @@ class ActivityMonitor extends this.OS.GUI.BaseApplication
|
||||
{icon:if _APP[a.name].type == 1 then _APP[a.name].meta.icon else a.icon,
|
||||
iconclass:if _APP[a.name].type == 1 then _APP[a.name].meta.iconclass else a.iconclass,
|
||||
value:a.name},
|
||||
{value: if _APP[a.name].type == 1 then "Application" else "Service"}
|
||||
{value: if _APP[a.name].type == 1 then "__(Application)" else "__(Service)"}
|
||||
{value: now - a.birth}
|
||||
]
|
||||
me.gdata.alive.push a.pid
|
||||
|
@ -6,7 +6,7 @@
|
||||
"author": "Xuan Sang LE",
|
||||
"email": "xsang.le@gmail.com"
|
||||
},
|
||||
"version":"0.1a",
|
||||
"version":"0.0.1-a",
|
||||
"category":"System",
|
||||
"iconclass":"fa fa-heartbeat",
|
||||
"mimes":["none"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
<afx-app-window data-id = "am-window" apptitle="" width="400" height="300">
|
||||
<afx-vbox>
|
||||
<afx-grid-view data-id = "mygrid"></afx-grid-view>
|
||||
<afx-button data-height="30" data-id = "btkill" text = "Kill process" iconclass="fa fa-times"></afx-button>
|
||||
<afx-button data-height="30" data-id = "btkill" text = "__(Kill process)" iconclass="fa fa-times"></afx-button>
|
||||
</afx-vbox>
|
||||
</afx-app-window>
|
11
src/packages/AntOSDK/Makefile
Normal file
11
src/packages/AntOSDK/Makefile
Normal file
@ -0,0 +1,11 @@
|
||||
coffee_files = main.coffee dialog.coffee
|
||||
|
||||
jsfiles = coffeescript.js
|
||||
|
||||
cssfiles = main.css
|
||||
|
||||
copyfiles = scheme.html welcome.html package.json
|
||||
|
||||
|
||||
PKG_NAME=AntOSDK
|
||||
include ../pkg.mk
|
8
src/packages/AntOSDK/coffeescript.js
Normal file
8
src/packages/AntOSDK/coffeescript.js
Normal file
File diff suppressed because one or more lines are too long
109
src/packages/AntOSDK/dialog.coffee
Normal file
109
src/packages/AntOSDK/dialog.coffee
Normal file
@ -0,0 +1,109 @@
|
||||
class BuildDialog extends this.OS.GUI.BasicDialog
|
||||
constructor: () ->
|
||||
super "BuildDialog", {
|
||||
tags: [
|
||||
{ tag: "afx-label", att: 'text="__(Coffees)" data-height="23" class="header"' },
|
||||
{ tag: "afx-list-view" }
|
||||
{ tag: "afx-label", att: 'text="__(Javascripts)" data-height="23" class="header"' },
|
||||
{ tag: "afx-list-view" }
|
||||
{ tag: "afx-label", att: 'text="__(Css)" data-height="23" class="header"' },
|
||||
{ tag: "afx-list-view" }
|
||||
{ tag: "afx-label", att: 'text="__(Copied files)" data-height="23" class="header"' },
|
||||
{ tag: "afx-list-view" }
|
||||
{ tag: "div", att: ' data-height="5"' }
|
||||
],
|
||||
width: 350,
|
||||
height: 450,
|
||||
resizable: true,
|
||||
buttons: [
|
||||
{
|
||||
label: "__(Save)", onclick: (d) ->
|
||||
data =
|
||||
coffees: (v.text for v in (d.find "content1").get "items")
|
||||
javascripts: (v.text for v in (d.find "content3").get "items")
|
||||
css: (v.text for v in (d.find "content5").get "items")
|
||||
copies: (v.text for v in (d.find "content7").get "items")
|
||||
d.handler data if d.handler
|
||||
d.quit()
|
||||
},
|
||||
{ label: "__(Cancel)", onclick: (d) -> d.quit() }
|
||||
],
|
||||
filldata: (d) ->
|
||||
lv = d.find "content1"
|
||||
lv.set "items", ({ text: v } for v in d.parent.prjfile.cache.coffees)
|
||||
lv.set "buttons", [
|
||||
{
|
||||
text: "+",
|
||||
onbtclick: (e) ->
|
||||
d.selectFile ["text/coffeescript"], (f) ->
|
||||
lv.push { text: f }, true if f
|
||||
},
|
||||
{
|
||||
text: "-",
|
||||
onbtclick: (e) ->
|
||||
sel = lv.get "selected"
|
||||
return unless sel
|
||||
lv.remove sel, true
|
||||
}
|
||||
]
|
||||
|
||||
lv1 = d.find "content3"
|
||||
lv1.set "items", ({ text: v } for v in d.parent.prjfile.cache.javascripts)
|
||||
lv1.set "buttons", [
|
||||
{
|
||||
text: "+",
|
||||
onbtclick: (e) ->
|
||||
d.selectFile ["application/javascript"], (f) ->
|
||||
lv1.push { text: f }, true if f
|
||||
},
|
||||
{
|
||||
text: "-",
|
||||
onbtclick: (e) ->
|
||||
sel = lv1.get "selected"
|
||||
return unless sel
|
||||
lv1.remove sel, true
|
||||
}
|
||||
]
|
||||
|
||||
lv2 = d.find "content5"
|
||||
lv2.set "items", ({ text: v } for v in d.parent.prjfile.cache.css)
|
||||
lv2.set "buttons", [
|
||||
{
|
||||
text: "+",
|
||||
onbtclick: (e) ->
|
||||
d.selectFile ["text/css"], (f) ->
|
||||
lv2.push { text: f }, true if f
|
||||
},
|
||||
{
|
||||
text: "-",
|
||||
onbtclick: (e) ->
|
||||
sel = lv2.get "selected"
|
||||
return unless sel
|
||||
lv2.remove sel, true
|
||||
}
|
||||
]
|
||||
|
||||
lv3 = d.find "content7"
|
||||
lv3.set "items", ({ text: v } for v in d.parent.prjfile.cache.copies)
|
||||
lv3.set "buttons", [
|
||||
{
|
||||
text: "+",
|
||||
onbtclick: (e) ->
|
||||
d.selectFile [".*"], (f) ->
|
||||
lv3.push { text: f }, true if f
|
||||
},
|
||||
{
|
||||
text: "-",
|
||||
onbtclick: (e) ->
|
||||
sel = lv3.get "selected"
|
||||
return unless sel
|
||||
lv3.remove sel, true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
selectFile: (mimes, f) ->
|
||||
me = @
|
||||
@openDialog "FileDiaLog", (d, n, p) ->
|
||||
f p.replace me.parent.prjfile.cache.root + "/", ""
|
||||
, "__(Select a file)", { mimes: mimes, type: "file", root: @parent.prjfile.cache.root }
|
745
src/packages/AntOSDK/main.coffee
Normal file
745
src/packages/AntOSDK/main.coffee
Normal file
@ -0,0 +1,745 @@
|
||||
# Copyright 2017-2018 Xuan Sang LE <xsang.le AT gmail DOT com>
|
||||
|
||||
# AnTOS Web desktop is is licensed under the GNU General Public
|
||||
# License v3.0, see the LICENCE file for more information
|
||||
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
|
||||
class AntOSDK extends this.OS.GUI.BaseApplication
|
||||
constructor: ( args ) ->
|
||||
super "AntOSDK", args
|
||||
@prjfile = if @args and @args.length > 0 then @args[0].asFileHandler() else null
|
||||
loadScheme: () ->
|
||||
path = "#{@meta().path}/" + if @prjfile then "scheme.html" else "welcome.html"
|
||||
@render path
|
||||
main: () ->
|
||||
me = @
|
||||
@scheme.set "apptitle", "AntOSDK"
|
||||
@output = @find "output"
|
||||
if not @prjfile
|
||||
(@find "btnnewprj").set "onbtclick", () ->
|
||||
me.newProject (path) ->
|
||||
me.prjfile = "#{path}/project.apj".asFileHandler()
|
||||
me.init()
|
||||
(@find "btnopenprj").set "onbtclick", () ->
|
||||
me.actionProject "#{me.name}-Open"
|
||||
return
|
||||
@initWorkspace()
|
||||
|
||||
initWorkspace: () ->
|
||||
me = @
|
||||
@dirty = true
|
||||
@fileview = @find "fileview"
|
||||
div = @find "datarea"
|
||||
@currfile = "Untitled".asFileHandler()
|
||||
ace.require "ace/ext/language_tools"
|
||||
|
||||
@prjfile.dirty = false
|
||||
@.editor = ace.edit div
|
||||
@.editor.setOptions {
|
||||
enableBasicAutocompletion: true,
|
||||
enableSnippets: true,
|
||||
enableLiveAutocompletion: true,
|
||||
fontSize: "13px"
|
||||
}
|
||||
@.editor.completers.push { getCompletions: ( editor, session, pos, prefix, callback ) -> }
|
||||
@.editor.getSession().setUseWrapMode true
|
||||
|
||||
@fileview.contextmenuHandler = (e, m) ->
|
||||
m.set "items", me.contextMenu()
|
||||
m.set "onmenuselect", (evt) ->
|
||||
me.contextAction evt
|
||||
m.show e
|
||||
|
||||
@mlist = @find "modelist"
|
||||
@modes = ace.require "ace/ext/modelist"
|
||||
ldata = []
|
||||
f = (m, i) ->
|
||||
ldata.push {
|
||||
text: m.name,
|
||||
mode: m.mode,
|
||||
selected: if m.mode is 'ace/mode/text' then true else false
|
||||
}
|
||||
m.idx = i
|
||||
f(m, i) for m, i in @modes.modes
|
||||
@mlist.set "items", ldata
|
||||
@mlist.set "onlistselect", (e) ->
|
||||
me.editor.session.setMode e.data.mode
|
||||
|
||||
themelist = @find "themelist"
|
||||
themes = ace.require "ace/ext/themelist"
|
||||
ldata = []
|
||||
ldata.push {
|
||||
text: m.caption,
|
||||
mode: m.theme,
|
||||
selected: if m.theme is "ace/theme/monokai" then true else false
|
||||
} for k, m of themes.themesByName
|
||||
themelist.set "onlistselect", (e) ->
|
||||
me.editor.setTheme e.data.mode
|
||||
themelist.set "items", ldata
|
||||
|
||||
statbar = @find "editorstat"
|
||||
#status
|
||||
stup = (e) ->
|
||||
c = me.editor.session.selection.getCursor()
|
||||
l = me.editor.session.getLength()
|
||||
statbar.set "text", __("Row {0}, col {1}, lines: {2}", c.row, c.column, l)
|
||||
stup(0)
|
||||
@.editor.getSession().selection.on "changeCursor", (e) -> stup(e)
|
||||
@editormux = false
|
||||
@editor.on "input", () ->
|
||||
if me.editormux
|
||||
me.editormux = false
|
||||
return false
|
||||
if not me.currfile.dirty
|
||||
me.currfile.dirty = true
|
||||
me.currfile.text += "*"
|
||||
me.tabarea.update()
|
||||
|
||||
@on "resize", () -> me.editor.resize()
|
||||
@on "vboxchange", () -> me.editor.resize()
|
||||
@on "focus", () -> me.editor.focus()
|
||||
|
||||
@fileview.set "fetch", (e, f) ->
|
||||
return unless e.child
|
||||
return if e.child.filename is "[..]"
|
||||
e.child.path.asFileHandler().read (d) ->
|
||||
return me.error __("Resource not found {0}", e.child.path) if d.error
|
||||
f d.result
|
||||
@fileview.set "onfileopen", (e) ->
|
||||
return if e.type is "dir"
|
||||
me.open e.path.asFileHandler()
|
||||
@subscribe "VFS", (d) ->
|
||||
p = (me.fileview.get "path").asFileHandler()
|
||||
me.chdir p.path if d.data.file.hash() is p.hash() or d.data.file.parent().hash() is p.hash()
|
||||
|
||||
@tabarea = @find "tabarea"
|
||||
@tabarea.set "ontabselect", (e) ->
|
||||
me.selecteTab e.idx
|
||||
@tabarea.set "onitemclose", (e) ->
|
||||
it = e.item.item
|
||||
return false unless it
|
||||
return me.closeTab it unless it.dirty
|
||||
me.openDialog "YesNoDialog", (d) ->
|
||||
return me.closeTab it if d
|
||||
me.editor.focus()
|
||||
, __("Close tab"), { text: __("Close without saving ?") }
|
||||
return false
|
||||
(@find "log-clear").set "onbtclick", (e) ->
|
||||
($ me.output).empty()
|
||||
#@tabarea.set "closable", true
|
||||
@bindKey "ALT-N", () -> me.actionFile "#{me.name}-New"
|
||||
@bindKey "ALT-O", () -> me.actionFile "#{me.name}-Open"
|
||||
@bindKey "CTRL-S", () -> me.actionFile "#{me.name}-Save"
|
||||
@bindKey "ALT-W", () -> me.actionFile "#{me.name}-Saveas"
|
||||
@bindKey "CTRL-R", () -> me.bnR()
|
||||
@bindKey "ALT-C", () -> me.actionBuild "#{me.name}-Build"
|
||||
@bindKey "ALT-P", () -> me.buildAndRelease()
|
||||
@bindKey "ALT-Y", () ->
|
||||
me.actionBuild "#{me.name}-Options"
|
||||
@openProject @prjfile if @prjfile
|
||||
@trigger "calibrate"
|
||||
|
||||
newProject: (f) ->
|
||||
me = @
|
||||
@openDialog "FileDiaLog", (d, n, p) ->
|
||||
rpath = "#{d}/#{n}"
|
||||
# create folder
|
||||
# create javascripts dir
|
||||
# create css dir
|
||||
# create coffees dir
|
||||
# create asset dir
|
||||
dirs = [
|
||||
rpath,
|
||||
"#{rpath}/build",
|
||||
"#{rpath}/build/release",
|
||||
"#{rpath}/build/debug",
|
||||
"#{rpath}/javascripts",
|
||||
"#{rpath}/css",
|
||||
"#{rpath}/coffees",
|
||||
"#{rpath}/assets"
|
||||
]
|
||||
fn = (list, f1) ->
|
||||
return f1() if list.length is 0
|
||||
dir = (list.splice 0, 1)[0].asFileHandler()
|
||||
name = dir.basename
|
||||
dir = dir.parent().asFileHandler()
|
||||
dir.mk name, (r) ->
|
||||
return me.error __("Error when create directory: {0}", r.error) if r.error
|
||||
me.log "INFO", __("Created directory: {0}", dir.path + "/" + name)
|
||||
#console.log "created", dir.path + "/" + name
|
||||
fn list, f1
|
||||
|
||||
fn dirs, () ->
|
||||
# create package.json
|
||||
# create README.md
|
||||
# create project.apj
|
||||
# create coffees/main.coffee
|
||||
# create shemes/scheme.html
|
||||
files = [
|
||||
{
|
||||
path: "#{rpath}/package.json",
|
||||
content: """
|
||||
{
|
||||
"app":"#{n}",
|
||||
"name":"#{n}",
|
||||
"description":"",
|
||||
"info":{
|
||||
"author": "",
|
||||
"email": ""
|
||||
},
|
||||
"version":"0.0.1-a",
|
||||
"category":"Other",
|
||||
"iconclass":"fa fa-adn",
|
||||
"mimes":["none"]
|
||||
}"""
|
||||
},
|
||||
{
|
||||
path: "#{rpath}/README.md",
|
||||
content: """
|
||||
# #{n}
|
||||
This is an example project, generated by AntOS Development Kit
|
||||
|
||||
## Howto
|
||||
|
||||
1. Open the project.apj file with AntOSDK (simply double Click on it)
|
||||
2. Modify the UI in *assets/scheme.html*
|
||||
3. Modify application code in *coffees/main.coffee*
|
||||
4. Modify CSS style in *css/main.css*
|
||||
5. Other files need to be copied: put in to assets
|
||||
|
||||
## Set up build target
|
||||
|
||||
Click **Menu> Build > Build Option** or simply hit **ALT-Y**
|
||||
|
||||
In the build options dialog, add or remove files that need to be
|
||||
included into the build
|
||||
|
||||
Click **Save**
|
||||
|
||||
## Build application
|
||||
* To build: **Menu > Build > Build** or **ALT-C**
|
||||
* To build and run: **Menu > Build > Build and Run** or **CTRL-R**
|
||||
* To release: **Menu > Build > Build release** or **ALT-P**
|
||||
"""
|
||||
},
|
||||
{
|
||||
path: "#{rpath}/project.apj",
|
||||
content: """
|
||||
{
|
||||
"name": "#{n}",
|
||||
"root": "#{d}/#{n}",
|
||||
"css": [],
|
||||
"javascripts": [],
|
||||
"coffees": ["coffees/main.coffee"],
|
||||
"copies": ["assets/scheme.html", "package.json", "README.md"]
|
||||
}
|
||||
"""
|
||||
},
|
||||
{
|
||||
path: "#{rpath}/coffees/main.coffee",
|
||||
content: """
|
||||
class #{n} extends this.OS.GUI.BaseApplication
|
||||
constructor: ( args ) ->
|
||||
super "#{n}", args
|
||||
|
||||
main: () ->
|
||||
|
||||
this.OS.register "#{n}", #{n}
|
||||
"""
|
||||
},
|
||||
{
|
||||
path: "#{rpath}/assets/scheme.html",
|
||||
content: """
|
||||
<afx-app-window apptitle="" width="600" height="500" data-id="#{n}">
|
||||
<afx-hbox ></afx-hbox>
|
||||
</afx-app-window>
|
||||
"""
|
||||
}
|
||||
]
|
||||
fn1 = (list, f2) ->
|
||||
return f2(rpath) if list.length is 0
|
||||
entry = (list.splice 0, 1)[0]
|
||||
file = entry.path.asFileHandler()
|
||||
file.cache = entry.content
|
||||
file.write "text/plain", (res) ->
|
||||
return me.error __("Cannot create file: {0}", res.error) if res.error
|
||||
me.log "INFO", __("Created file: {0}", file.path)
|
||||
fn1 list, f2
|
||||
fn1 files, f
|
||||
, "__(New Project at)", { file: { basename: __("ProjectName") } }
|
||||
|
||||
openProject: (file) ->
|
||||
me = @
|
||||
me.prjfile = file
|
||||
if(me.tabarea)
|
||||
file.read (d) ->
|
||||
me.log "INFO", __("Opening {0}", me.prjfile.path)
|
||||
me.tabarea.set "selected", -1
|
||||
me.tabarea.set "items", []
|
||||
me.currfile = "#{d.root}/README.md".asFileHandler()
|
||||
me.currfile.dirty = false
|
||||
me.chdir d.root if d.root
|
||||
me.prjfile.cache = d
|
||||
me.log "INFO", __("Opening {0}", me.currfile.path)
|
||||
me.open me.currfile
|
||||
,"json"
|
||||
else
|
||||
me.init()
|
||||
|
||||
open: (file) ->
|
||||
#find table
|
||||
i = @findTabByFile file
|
||||
return @tabarea.set "selected", i if i isnt -1
|
||||
return @newtab file if file.path.toString() is "Untitled"
|
||||
me = @
|
||||
file.read (d) ->
|
||||
file.cache = d or ""
|
||||
me.newtab file
|
||||
|
||||
contextMenu: () ->
|
||||
[
|
||||
{ text: __("New file"), dataid: "#{@name}-mkf" },
|
||||
{ text: __("New folder"), dataid: "#{@name}-mkd" },
|
||||
{ text: __("Delete"), dataid: "#{@name}-rm" }
|
||||
{ text: __("Refresh"), dataid: "#{@name}-refresh" }
|
||||
]
|
||||
|
||||
contextAction: (e) ->
|
||||
me = @
|
||||
file = @fileview.get "selectedFile"
|
||||
dir = if file then file.path.asFileHandler() else (@fileview.get "path").asFileHandler()
|
||||
dir = dir.parent().asFileHandler() if file and file.type isnt "dir"
|
||||
switch e.item.data.dataid
|
||||
|
||||
when "#{@name}-mkd"
|
||||
@openDialog "PromptDialog",
|
||||
(d) ->
|
||||
dir.mk d, (r) ->
|
||||
me.error __("Fail to create {0}: {1}", d, r.error) if r.error
|
||||
, "__(New folder)"
|
||||
|
||||
when "#{@name}-mkf"
|
||||
@openDialog "PromptDialog",
|
||||
(d) ->
|
||||
fp = "#{dir.path}/#{d}".asFileHandler()
|
||||
fp.write "", (r) ->
|
||||
me.error __("Fail to create {0}: {1}", d, r.error) if r.error
|
||||
, "__(New file)"
|
||||
when "#{@name}-rm"
|
||||
return unless file
|
||||
@openDialog "YesNoDialog",
|
||||
(d) ->
|
||||
return unless d
|
||||
file.path.asFileHandler()
|
||||
.remove (r) ->
|
||||
me.error __("Fail to delete {0}: {1}", file.filename, r.error) if r.error
|
||||
, "__(Delete)" ,
|
||||
{ iconclass: "fa fa-question-circle", text: __("Do you really want to delete: {0}?", file.filename) }
|
||||
when "#{@name}-refresh"
|
||||
@.chdir ( @fileview.get "path" )
|
||||
|
||||
save: (file) ->
|
||||
me = @
|
||||
file.write "text/plain", (d) ->
|
||||
return me.error __("Error saving file {0}", file.basename) if d.error
|
||||
me.dirty = true
|
||||
file.dirty = false
|
||||
file.text = file.basename
|
||||
me.tabarea.update()
|
||||
|
||||
findTabByFile: (file) ->
|
||||
lst = @tabarea.get "items"
|
||||
its = ( i for d, i in lst when d.hash() is file.hash() )
|
||||
return -1 if its.length is 0
|
||||
return its[0]
|
||||
|
||||
closeTab: (it) ->
|
||||
@tabarea.remove it, false
|
||||
cnt = @tabarea.get "count"
|
||||
if cnt is 0
|
||||
@open "Untitled".asFileHandler()
|
||||
return false
|
||||
@tabarea.set "selected", cnt - 1
|
||||
return false
|
||||
|
||||
newtab: (file) ->
|
||||
file.text = if file.basename then file.basename else file.path
|
||||
file.cache = "" unless file.cache
|
||||
file.um = new ace.UndoManager()
|
||||
@currfile.selected = false
|
||||
file.selected = true
|
||||
#console.log cnt
|
||||
@tabarea.push file, true
|
||||
#@currfile = @file
|
||||
#TODO: fix problem : @tabarea.set "selected", cnt
|
||||
|
||||
selecteTab: (i) ->
|
||||
#return if i is @tabarea.get "selidx"
|
||||
file = (@tabarea.get "items")[i]
|
||||
return unless file
|
||||
@fileview.set "preventUpdate", true
|
||||
@scheme.set "apptitle", file.text.toString()
|
||||
#return if file is @currfile
|
||||
if @currfile isnt file
|
||||
@currfile.cache = @editor.getValue()
|
||||
@currfile.cursor = @editor.selection.getCursor()
|
||||
@currfile = file
|
||||
m = "ace/mode/text"
|
||||
m = (@modes.getModeForPath file.path) if file.path.toString() isnt "Untitled"
|
||||
@mlist.set "selected", m.idx
|
||||
|
||||
@editormux = true
|
||||
@editor.setValue file.cache, -1
|
||||
@editor.session.setMode m.mode
|
||||
@editor.session.setUndoManager file.um
|
||||
if file.cursor
|
||||
@editor.renderer.scrollCursorIntoView { row: file.cursor.row, column: file.cursor.column }, 0.5
|
||||
@editor.selection.moveTo file.cursor.row, file.cursor.column
|
||||
@editor.focus()
|
||||
|
||||
chdir: (pth) ->
|
||||
#console.log "called", @_api.throwe("FCK")
|
||||
return unless pth
|
||||
me = @
|
||||
dir = pth.asFileHandler()
|
||||
dir.read (d) ->
|
||||
if(d.error)
|
||||
return me.error __("Resource not found {0}", p)
|
||||
if not dir.isRoot()
|
||||
p = dir.parent().asFileHandler()
|
||||
p.filename = "[..]"
|
||||
p.type = "dir"
|
||||
#p.size = 0
|
||||
d.result.unshift p
|
||||
($ me.navinput).val dir.path
|
||||
me.fileview.set "path", pth
|
||||
me.fileview.set "data", d.result
|
||||
|
||||
menu: () ->
|
||||
me = @
|
||||
menu = [
|
||||
{
|
||||
text: "__(Project)",
|
||||
child: [
|
||||
{ text: "__(New)", dataid: "#{@name}-New", },
|
||||
{ text: "__(Open)", dataid: "#{@name}-Open" },
|
||||
{ text: "__(Save)", dataid: "#{@name}-Save" }
|
||||
],
|
||||
onmenuselect: (e) -> me.actionProject e.item.data.dataid
|
||||
},
|
||||
{
|
||||
text: "__(File)",
|
||||
child: [
|
||||
{ text: "__(New)", dataid: "#{@name}-New", shortcut: "A-N" },
|
||||
{ text: "__(Open)", dataid: "#{@name}-Open", shortcut: "A-O" },
|
||||
{ text: "__(Save)", dataid: "#{@name}-Save", shortcut: "C-S" },
|
||||
{ text: "__(Save as)", dataid: "#{@name}-Saveas", shortcut: "A-W" }
|
||||
],
|
||||
onmenuselect: (e) -> me.actionFile e.item.data.dataid
|
||||
},
|
||||
{
|
||||
text: "__(Build)",
|
||||
child: [
|
||||
{ text: "__(Build and Run)", dataid: "#{@name}-Run", shortcut: "C-R" },
|
||||
{ text: "__(Build release)", dataid: "#{@name}-Release", shortcut: "A-P" },
|
||||
{ text: "__(Build)", dataid: "#{@name}-Build", shortcut: "A-C" },
|
||||
{ text: "__(Build Options)", dataid: "#{@name}-Options", shortcut: "A-Y" }
|
||||
],
|
||||
onmenuselect: (e) -> me.actionBuild e.item.data.dataid
|
||||
}
|
||||
]
|
||||
menu
|
||||
|
||||
actionFile: (e) ->
|
||||
me = @
|
||||
return unless @prjfile
|
||||
saveas = () ->
|
||||
me.openDialog "FileDiaLog", (d, n) ->
|
||||
file = "#{d}/#{n}".asFileHandler()
|
||||
file.cache = me.currfile.cache
|
||||
file.dirty = me.currfile.dirty
|
||||
file.um = me.currfile.um
|
||||
file.cursor = me.currfile.cursor
|
||||
file.selected = me.currfile.selected
|
||||
file.text = me.currfile.text
|
||||
me.tabarea.replaceItem me.currfile, file, false
|
||||
me.currfile = file
|
||||
me.save me.currfile
|
||||
, "__(Save as)", { file: me.currfile }
|
||||
switch e
|
||||
when "#{@name}-Open"
|
||||
@openDialog "FileDiaLog", ( d, f ) ->
|
||||
me.open "#{d}/#{f}".asFileHandler()
|
||||
, "__(Open file)"
|
||||
when "#{@name}-Save"
|
||||
@currfile.cache = @editor.getValue()
|
||||
return @save @currfile if @currfile.basename
|
||||
saveas()
|
||||
when "#{@name}-Saveas"
|
||||
@currfile.cache = @editor.getValue()
|
||||
saveas()
|
||||
when "#{@name}-New"
|
||||
@open "Untitled".asFileHandler()
|
||||
|
||||
actionProject: (e) ->
|
||||
me = @
|
||||
switch e
|
||||
when "#{@name}-Open"
|
||||
fn = () ->
|
||||
me.openDialog "FileDiaLog", (d, f, p) ->
|
||||
me.prjfile = "#{d}/#{f}".asFileHandler()
|
||||
me.log "clean"
|
||||
me.openProject me.prjfile
|
||||
, "__(Open Project)", { mimes: me.meta().mimes }
|
||||
return fn() unless @isDirty()
|
||||
@ask "__(Unsaved project)", "__(Ignore unsaved project ?)", () ->
|
||||
fn()
|
||||
when "#{@name}-New"
|
||||
fn = () ->
|
||||
me.log "clean"
|
||||
me.newProject (p) ->
|
||||
me.openProject "#{p}/project.apj".asFileHandler()
|
||||
return fn() unless @isDirty()
|
||||
@ask "__(Unsaved project)", "__(Ignore unsaved project ?)", () ->
|
||||
fn()
|
||||
when "#{@name}-Save"
|
||||
return unless @prjfile
|
||||
@prjfile.write "object", (r) ->
|
||||
return me.error __("Cannot save project: {0}", r.error) if r.error
|
||||
me.notify __("project saved")
|
||||
me.prjfile.dirty = false
|
||||
|
||||
|
||||
actionBuild: (e) ->
|
||||
me = @
|
||||
return unless @prjfile
|
||||
switch e
|
||||
when "#{@name}-Run" then me.bnR()
|
||||
when "#{@name}-Build"
|
||||
me.build().then(() ->).catch (ex) ->
|
||||
me.log "ERROR", ex.toString()
|
||||
when "#{@name}-Release"
|
||||
me.buildAndRelease()
|
||||
when "#{@name}-Options"
|
||||
me.openDialog new BuildDialog(), (d) ->
|
||||
me.prjfile.cache[k] = v for k, v of d
|
||||
me.prjfile.dirty = true
|
||||
me.dirty = true
|
||||
, "__(Add files to build target)"
|
||||
|
||||
isDirty: () ->
|
||||
return false unless @tabarea
|
||||
dirties = ( v for v in @tabarea.get "items" when v.dirty )
|
||||
return true if dirties.length > 0 or @prjfile.dirty
|
||||
return false
|
||||
|
||||
cleanup: (evt) ->
|
||||
return unless @currfile
|
||||
return unless @isDirty()
|
||||
me = @
|
||||
evt.preventDefault()
|
||||
dirties = ( v for v in @tabarea.get "items" when v.dirty )
|
||||
m = __("Ignore: {0} unsaved files {1}?", dirties.length, if @prjfile.dirty then "__(and unsaved project)" else "")
|
||||
@ask "__(Quit)", m, () ->
|
||||
v.dirty = false for v in dirties
|
||||
me.prjfile.dirty = false
|
||||
me.quit()
|
||||
|
||||
log: (t, m) ->
|
||||
return $(@output).empty() if t is "clean"
|
||||
p = ($ "<p>").attr("class", t.toLowerCase())[0]
|
||||
$(p).html "#{t}: #{m.__()}"
|
||||
($ @output).append p
|
||||
($ @output).scrollTop @output.scrollHeight
|
||||
|
||||
verify: () ->
|
||||
me = @
|
||||
return new Promise (r, e) ->
|
||||
return e me._api.throwe "Project not found" unless me.prjfile.cache
|
||||
# perform the verification on each coffee file
|
||||
list = ("#{me.prjfile.cache.root}/#{v}" for v in me.prjfile.cache.coffees)
|
||||
return r() if list.length is 0
|
||||
fn = (l) ->
|
||||
return r() if l.length is 0
|
||||
f = (l.splice 0, 1)[0].asFileHandler()
|
||||
me.log "INFO", __("Verifying {0}", f.path)
|
||||
f.read (d) ->
|
||||
try
|
||||
CoffeeScript.nodes d
|
||||
fn l
|
||||
catch ex
|
||||
e ex
|
||||
return fn list
|
||||
|
||||
cat: (files, t) ->
|
||||
me = @
|
||||
return new Promise (r, e) ->
|
||||
fn = (l) ->
|
||||
return r(t) if l.length is 0
|
||||
f = (l.splice 0, 1)[0].asFileHandler()
|
||||
f.read (d) ->
|
||||
t = t + "\n" + d
|
||||
fn l
|
||||
|
||||
return fn files
|
||||
|
||||
copy: (files, to) ->
|
||||
me = @
|
||||
return new Promise (r, e) ->
|
||||
fn = (l) ->
|
||||
return r() if l.length is 0
|
||||
f = (l.splice 0, 1)[0].asFileHandler()
|
||||
tof = "#{to}/#{f.basename}".asFileHandler()
|
||||
f.read (d) ->
|
||||
tof.cache = new Blob [d], { type: f.info.mime }
|
||||
tof.write f.info.mime, (res) ->
|
||||
me.log "INFO", __("Copied {0} -> {1}", f.path, to)
|
||||
return e res.error if res.error
|
||||
fn(l)
|
||||
, "binary"
|
||||
|
||||
return fn files
|
||||
|
||||
compile: () ->
|
||||
me = @
|
||||
list = ("#{me.prjfile.cache.root}/#{v}" for v in me.prjfile.cache.coffees)
|
||||
t = ""
|
||||
@verify().then () ->
|
||||
me.cat(list, t)
|
||||
.then (code) ->
|
||||
return new Promise (r, e) ->
|
||||
try
|
||||
jsrc = CoffeeScript.compile code
|
||||
me.log "SUCCESS", __("Compiled successful")
|
||||
r jsrc
|
||||
catch ex
|
||||
e ex
|
||||
|
||||
build: () ->
|
||||
me = @
|
||||
@log "clean"
|
||||
@compile().then (r) ->
|
||||
# cat to the javascript
|
||||
list = ("#{me.prjfile.cache.root}/#{v}" for v in me.prjfile.cache.javascripts)
|
||||
me.cat(list, r).then (jsrc) ->
|
||||
return new Promise (r, e) ->
|
||||
r jsrc
|
||||
.then (jsrc) ->
|
||||
# write javascript src to file
|
||||
return new Promise (r, e) ->
|
||||
fp = "#{me.prjfile.cache.root}/build/debug/main.js".asFileHandler()
|
||||
fp.cache = jsrc
|
||||
fp.write "text/plain", (res) ->
|
||||
return e res.error if res.error
|
||||
me.log "SUCCESS", __("Generated {0}", fp.path)
|
||||
r()
|
||||
.then () ->
|
||||
# cat the css file
|
||||
csslist = ("#{me.prjfile.cache.root}/#{v}" for v in me.prjfile.cache.css)
|
||||
csstxt = ""
|
||||
me.cat(csslist, csstxt).then (txt) ->
|
||||
return new Promise (r, e) ->
|
||||
return r() if txt is ""
|
||||
fp = "#{me.prjfile.cache.root}/build/debug/main.css".asFileHandler()
|
||||
fp.cache = txt
|
||||
fp.write "text/plain", (d) ->
|
||||
return e d.error if d.error
|
||||
me.log "SUCCESS", __("Generated {0}", fp.path)
|
||||
r()
|
||||
.then () ->
|
||||
# copy the remain files
|
||||
copylist = ("#{me.prjfile.cache.root}/#{v}" for v in me.prjfile.cache.copies)
|
||||
me.copy copylist, "#{me.prjfile.cache.root}/build/debug"
|
||||
.then () ->
|
||||
me.log "SUCCESS", __("Build done")
|
||||
me.dirty = false
|
||||
return new Promise (r, e) -> r()
|
||||
|
||||
run: () ->
|
||||
me = @
|
||||
fp = "#{me.prjfile.cache.root}/build/debug/package.json".asFileHandler()
|
||||
fp.read (v) ->
|
||||
me.log "INFO", __("Metadata found...")
|
||||
v.text = v.name
|
||||
v.path = "#{me.prjfile.cache.root}/build/debug"
|
||||
v.filename = me.prjfile.cache.name
|
||||
v.type = "app"
|
||||
v.mime = "antos/app"
|
||||
v.icon = "#{v.path}/#{v.icon}" if v.icon
|
||||
v.iconclass = "fa fa-adn" unless v.iconclass or v.icon
|
||||
me.log "INFO", __("Installing...")
|
||||
me.systemsetting.system.packages[me.prjfile.cache.name] = v
|
||||
# todo: auto matic refresh menu
|
||||
me._gui.refreshSystemMenu()
|
||||
#me._gui.buildSystemMenu()
|
||||
me.log "INFO", __("Running {0}...", me.prjfile.cache.name)
|
||||
me._gui.forceLaunch me.prjfile.cache.name
|
||||
, "json"
|
||||
|
||||
bnR: () ->
|
||||
@log "clean"
|
||||
return @run() unless @dirty
|
||||
me = @
|
||||
@build().then () ->
|
||||
me.run()
|
||||
.catch (ex) ->
|
||||
me.log "ERROR", ex.toString()
|
||||
|
||||
release: () ->
|
||||
me = @
|
||||
@log "INFO", __("Preparing for release")
|
||||
new Promise (r, e) ->
|
||||
me._api.require "jszip.min", () ->
|
||||
fp = "#{me.prjfile.cache.root}/build/debug".asFileHandler()
|
||||
fp.read (d) ->
|
||||
return e d.error if d.error
|
||||
r d.result
|
||||
.then (files) ->
|
||||
return new Promise (r, e) ->
|
||||
zip = new JSZip()
|
||||
fn = (list) ->
|
||||
return r zip if list.length is 0
|
||||
f = (list.splice 0, 1)[0].path.asFileHandler()
|
||||
return fn list if f.type is "dir"
|
||||
f.read (d) ->
|
||||
zip.file f.basename, d, { binary: true }
|
||||
me.log "INFO", __("add {0} to zip", f.basename)
|
||||
fn list
|
||||
, "binary"
|
||||
fn files
|
||||
.then (zip) ->
|
||||
zip.generateAsync({type:"base64"}).then (data) ->
|
||||
f = "#{me.prjfile.cache.root}/build/release/#{me.prjfile.cache.name}.zip".asFileHandler()
|
||||
f.cache = 'data:application/zip;base64,' + data
|
||||
f.write "base64", (r) ->
|
||||
return me.log "ERROR", __("Cannot save the zip file {0} : {1}", f.path, r.error) if r.error
|
||||
me.log "SUCCESS", __("zip file generated in release folder")
|
||||
|
||||
buildAndRelease: () ->
|
||||
@log "clean"
|
||||
return @release() unless @dirty
|
||||
me = @
|
||||
@build().then () ->
|
||||
me.release()
|
||||
.catch (ex) ->
|
||||
me.log "ERROR", ex.toString()
|
||||
AntOSDK.singleton = false
|
||||
AntOSDK.dependencies = [
|
||||
"ace/ace",
|
||||
"ace/ext-language_tools",
|
||||
"ace/ext-modelist",
|
||||
"ace/ext-themelist"
|
||||
]
|
||||
this.OS.register "AntOSDK", AntOSDK
|
121
src/packages/AntOSDK/main.css
Normal file
121
src/packages/AntOSDK/main.css
Normal file
@ -0,0 +1,121 @@
|
||||
afx-app-window[data-id="antOSDK"] afx-list-view {
|
||||
margin: 2px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
afx-app-window[data-id="antOSDK"] afx-list-view div.list-container{
|
||||
z-index: 10;
|
||||
}
|
||||
afx-app-window[data-id="antOSDK"] afx-resizer{
|
||||
z-index: 11;
|
||||
background-color: transparent;
|
||||
border-right: 1px solid #a6a6a6;
|
||||
}
|
||||
afx-app-window[data-id="antOSDK"] afx-resizer[data-id="botrz"]
|
||||
{
|
||||
z-index: 9;
|
||||
border-top: 1px solid #a6a6a6;
|
||||
background-color: #2f3129;
|
||||
border-right: 0;
|
||||
}
|
||||
|
||||
afx-app-window[data-id="antOSDK"] div.welcome-cnt {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
afx-app-window[data-id="antOSDK"] div.welcome-cnt afx-label.wmsg {
|
||||
font-weight: bold;
|
||||
color: #a6A6A6;
|
||||
font-size: 20px;
|
||||
}
|
||||
afx-app-window[data-id="antOSDK"] div.welcome-cnt p{
|
||||
text-align: center;
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
afx-app-window[data-id="antOSDK"] afx-label[data-id="editorstat"]{
|
||||
padding-right:5px;
|
||||
text-align: right;
|
||||
display: inline-block;
|
||||
}
|
||||
afx-app-window[data-id="antOSDK"] .afx-window-content {
|
||||
background-color: #f6F6F6;
|
||||
}
|
||||
afx-app-window[data-id="antOSDK"] div[data-id= "output"] {
|
||||
background-color: #2f3129;
|
||||
padding: 10px;
|
||||
padding-left: 40px;
|
||||
color:white;
|
||||
overflow: auto;
|
||||
}
|
||||
afx-app-window[data-id="antOSDK"] div[data-id= "output"] p{
|
||||
margin:0;
|
||||
padding:0;
|
||||
font-family: "HermitLight";
|
||||
text-align: left;
|
||||
}
|
||||
afx-app-window[data-id="antOSDK"] div[data-id= "output"] p.error{
|
||||
color: red;
|
||||
}
|
||||
afx-app-window[data-id="antOSDK"] div[data-id= "output"] p.warning{
|
||||
color: orange;
|
||||
}
|
||||
afx-app-window[data-id="antOSDK"] div[data-id= "output"] p.success {
|
||||
color: green;
|
||||
}
|
||||
afx-app-window[data-id="antOSDK"] afx-label.outputheader {
|
||||
background-color: #2f3129;
|
||||
font-weight: bold;
|
||||
padding-left: 10px;
|
||||
color:white;
|
||||
}
|
||||
|
||||
afx-app-window[data-id="antOSDK"] afx-hbox[data-id="bottom-vbox"] {
|
||||
background-color:#2f3129;
|
||||
}
|
||||
afx-app-window[data-id="antOSDK"] afx-hbox[data-id="bottom-vbox"] afx-button button{
|
||||
background-color:#2f3129;
|
||||
color:white;
|
||||
border:0;
|
||||
border-radius: 0;
|
||||
}
|
||||
afx-app-window[data-id="antOSDK"] afx-hbox[data-id="bottom-vbox"] afx-list-view > div.list-container > div {
|
||||
background-color: #3c3c3c;
|
||||
color:white;
|
||||
border:0;
|
||||
border-radius: 0;
|
||||
}
|
||||
afx-app-window[data-id="antOSDK"] afx-hbox[data-id="bottom-vbox"] afx-list-view > div.list-container > div::before{
|
||||
color: white;
|
||||
}
|
||||
|
||||
afx-tab-bar[data-id="tabarea"] afx-list-view > div.list-container > ul > li {
|
||||
background-color: #dfdfdf;
|
||||
color:#272822;
|
||||
border: 0;
|
||||
border-top: 1px solid #a6a6a6;
|
||||
border-right: 1px solid #a6a6a6;
|
||||
border-radius: 0;
|
||||
}
|
||||
afx-tab-bar[data-id="tabarea"] afx-list-view{
|
||||
padding:0;
|
||||
margin: 0;
|
||||
border-left: 0;
|
||||
border-bottom: 1px solid #a6a6a6;
|
||||
}
|
||||
/*afx-tab-bar[data-id="tabarea"] afx-list-view i.closable:before{
|
||||
color: white;
|
||||
}*/
|
||||
afx-tab-bar[data-id="tabarea"] afx-list-view > div.list-container > ul > li.selected {
|
||||
background-color: #f6F6F6;
|
||||
border-radius: 0;
|
||||
}
|
||||
afx-app-window[data-id="BuildDialog"] afx-label.header {
|
||||
font-weight: bold;
|
||||
margin: 0;
|
||||
}
|
||||
afx-app-window[data-id="BuildDialog"] afx-list-view {
|
||||
border: 1px solid #a6A6A6;
|
||||
}
|
15
src/packages/AntOSDK/package.json
Normal file
15
src/packages/AntOSDK/package.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"app":"AntOSDK",
|
||||
"name":"AntOS development kit",
|
||||
"description":"Development tool for building AntOS application",
|
||||
"info":{
|
||||
"author": "Xuan Sang LE",
|
||||
"email": "xsang.le@gmail.com"
|
||||
},
|
||||
"version":"0.0.2-a",
|
||||
"category":"System",
|
||||
"iconclass":"fa fa-cubes",
|
||||
"mimes":[
|
||||
"text/antos-project"
|
||||
]
|
||||
}
|
19
src/packages/AntOSDK/scheme.html
Normal file
19
src/packages/AntOSDK/scheme.html
Normal file
@ -0,0 +1,19 @@
|
||||
<afx-app-window apptitle="" width="600" height="500" data-id="antOSDK">
|
||||
<afx-hbox >
|
||||
<afx-file-view data-width = "155" min-width="155" data-id = "fileview" view='tree' status = false></afx-file-view>
|
||||
<afx-resizer data-width = "3" ></afx-resizer>
|
||||
<afx-vbox>
|
||||
<afx-tab-bar data-id="tabarea" data-height="23" closable = true></afx-tab-bar>
|
||||
<div data-id="datarea" data-height="80%"></div>
|
||||
<afx-resizer data-height="3" data-id="botrz"></afx-resizer>
|
||||
<afx-hbox data-height="30" data-id="bottom-vbox">
|
||||
<afx-label class="outputheader" iconclass= "fa fa-wpforms" text = "__(Output)"></afx-label>
|
||||
<afx-list-view data-width="160" data-id = "themelist" dropdown = "true" width="135"></afx-list-view>
|
||||
<afx-list-view data-width="125" data-id = "modelist" dropdown = "true" width="100"></afx-list-view>
|
||||
<afx-button data-id = "log-clear" data-width="25" iconclass="fa fa-trash"></afx-button>
|
||||
</afx-hbox>
|
||||
<div data-id= "output" ></div>
|
||||
<afx-label data-id="editorstat" data-height="20"></afx-label>
|
||||
</afx-vbox>
|
||||
</afx-hbox>
|
||||
</afx-app-window>
|
15
src/packages/AntOSDK/welcome.html
Normal file
15
src/packages/AntOSDK/welcome.html
Normal file
@ -0,0 +1,15 @@
|
||||
<afx-app-window apptitle="" width="600" height="500" data-id="antOSDK">
|
||||
<afx-vbox>
|
||||
<afx-hbox >
|
||||
<div class = "welcome-cnt">
|
||||
<afx-label text="__(Welcome to AntOSDK)" class="wmsg"></afx-label>
|
||||
<p>
|
||||
<afx-button data-id="btnnewprj" iconclass= "fa fa-plus-circle" text = "__(New project)"></afx-button>
|
||||
<afx-button data-id="btnopenprj" iconclass = "fa fa-folder-open" text = "__(Open project)"></afx-button>
|
||||
</p>
|
||||
</div>
|
||||
</afx-hbox>
|
||||
<div data-id= "output" ></div>
|
||||
</afx-vbox>
|
||||
|
||||
</afx-app-window>
|
@ -1,10 +1,10 @@
|
||||
coffee_files = dialogs.coffee main.coffee
|
||||
|
||||
jsfiles =
|
||||
jsfiles = katex/katex.js katex/auto-render.js
|
||||
|
||||
cssfiles = main.css
|
||||
cssfiles = main.css katex/katex.css
|
||||
|
||||
copyfiles = scheme.html cvsection.html package.json
|
||||
copyfiles = scheme.html cvsection.html package.json katex/fonts
|
||||
|
||||
|
||||
PKG_NAME=Blogger
|
||||
|
@ -2,30 +2,30 @@
|
||||
<afx-vbox >
|
||||
<div data-height="5"></div>
|
||||
<afx-hbox data-height = "30" >
|
||||
<afx-label data-width= "70" text = "Title:"></afx-label>
|
||||
<afx-label data-width= "70" text = "__(Title)"></afx-label>
|
||||
<input type = "text" name="title" input-class = "user-input"/>
|
||||
</afx-hbox>
|
||||
<afx-hbox data-height = "30" >
|
||||
<afx-label text = "Subtitle:" data-width= "70"></afx-label>
|
||||
<afx-label text = "__(Subtitle)" data-width= "70"></afx-label>
|
||||
<input type = "text" name="subtitle" input-class = "user-input"/>
|
||||
</afx-hbox>
|
||||
<afx-hbox data-height = "30" >
|
||||
<afx-label text = "Location:" data-width= "70"></afx-label>
|
||||
<afx-label text = "__(Location)" data-width= "70"></afx-label>
|
||||
<input type = "text" name="location" input-class = "user-input"/>
|
||||
</afx-hbox>
|
||||
<afx-hbox data-height = "30" >
|
||||
<afx-label text = "From:" data-width= "70"></afx-label>
|
||||
<afx-label text = "__(From)" data-width= "70"></afx-label>
|
||||
<input type = "text" name="start" input-class = "user-input"/>
|
||||
<afx-label text = "To:" style="text-align:center;" data-width= "70"></afx-label>
|
||||
<input type = "text" name="end" input-class = "user-input"/>
|
||||
</afx-hbox>
|
||||
<afx-label data-height = "30" text = "Content:" style = "margin-left:5px;"/>
|
||||
<afx-label data-height = "30" text = "Content" style = "margin-left:5px;"/>
|
||||
<div data-id="editor-container">
|
||||
<textarea name="content" data-id = "contentarea" />
|
||||
</div>
|
||||
<afx-hbox data-height = "35">
|
||||
<div></div>
|
||||
<afx-button iconclass = "fa fa-save" data-id = "bt-cv-sec-save" data-width="60" text = "Save"/>
|
||||
<afx-button iconclass = "fa fa-save" data-id = "bt-cv-sec-save" data-width="60" text = "__(Save)"/>
|
||||
</afx-hbox>
|
||||
</afx-vbox>
|
||||
</afx-app-window>
|
@ -1,10 +1,27 @@
|
||||
# Copyright 2017-2018 Xuan Sang LE <xsang.le AT gmail DOT com>
|
||||
|
||||
# AnTOS Web desktop is is licensed under the GNU General Public
|
||||
# License v3.0, see the LICENCE file for more information
|
||||
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
class BloggerCategoryDialog extends this.OS.GUI.BasicDialog
|
||||
constructor: () ->
|
||||
super "BloggerCategoryDialog", {
|
||||
tags: [
|
||||
{ tag: "afx-label", att: "data-height = '20', text = 'Pick a parent:'" },
|
||||
{ tag: "afx-label", att: "data-height = '20', text = 'Pick a parent'" },
|
||||
{ tag: "afx-tree-view" },
|
||||
{ tag: "afx-label", att: "data-height = '20', text = 'Category name:'" },
|
||||
{ tag: "afx-label", att: "data-height = '20', text = 'Category name'" },
|
||||
{ tag: "input", att: "type = 'text' data-height = '20'" }
|
||||
],
|
||||
width: 200,
|
||||
@ -15,10 +32,10 @@ class BloggerCategoryDialog extends this.OS.GUI.BasicDialog
|
||||
label: "0k",
|
||||
onclick: (d) ->
|
||||
sel = (d.find "content1").get "selectedItem"
|
||||
return d.notify "Please select a parent category" unless sel
|
||||
return d.notify __("Please select a parent category") unless sel
|
||||
val = (d.find "content3").value
|
||||
return d.notify "Please enter category name" if val is "" and not d.data.selonly
|
||||
return d.notify "Parent can not be the category itself" if d.data.cat and d.data.cat.id is sel.id
|
||||
return d.notify __("Please enter category name") if val is "" and not d.data.selonly
|
||||
return d.notify __("Parent can not be the category itself") if d.data.cat and d.data.cat.id is sel.id
|
||||
d.handler { p: sel, value: val } if d.handler
|
||||
d.quit()
|
||||
},
|
||||
@ -43,9 +60,6 @@ class BloggerCategoryDialog extends this.OS.GUI.BasicDialog
|
||||
(d.find "bt0").trigger() if e.which is 13
|
||||
}
|
||||
|
||||
|
||||
this.OS.register "BloggerCategoryDialog", BloggerCategoryDialog
|
||||
|
||||
# This dialog is use for cv section editing
|
||||
|
||||
class BloggerCVSectionDiaglog extends this.OS.GUI.BaseDialog
|
||||
@ -66,7 +80,7 @@ class BloggerCVSectionDiaglog extends this.OS.GUI.BaseDialog
|
||||
($ (@select '[class="CodeMirror cm-s-paper CodeMirror-wrap"]')[0]).css "min-height", "50px"
|
||||
@on "vboxchange", () ->
|
||||
me.resizeContent()
|
||||
console.log "resize content"
|
||||
|
||||
inputs = me.select "[input-class='user-input']"
|
||||
(($ v).val me.data[v.name] for v in inputs ) if me.data
|
||||
@editor.value me.data.content if me.data and me.data.content
|
||||
@ -75,7 +89,7 @@ class BloggerCVSectionDiaglog extends this.OS.GUI.BaseDialog
|
||||
console.log inputs
|
||||
data[v.name] = ($ v).val() for v in inputs
|
||||
data.content = me.editor.value()
|
||||
return me.notify "Title or content must not be blank" if data.title is "" and data.content is ""
|
||||
return me.notify __("Title or content must not be blank") if data.title is "" and data.content is ""
|
||||
#return me.notify "Content must not be blank" if data.content is ""
|
||||
data.id = me.data.id if me.data and me.data.id
|
||||
me.handler data if me.handler
|
||||
@ -85,5 +99,4 @@ class BloggerCVSectionDiaglog extends this.OS.GUI.BaseDialog
|
||||
container = @find "editor-container"
|
||||
children = ($ container).children()
|
||||
cheight = ($ container).height() - 30
|
||||
($ children[1]).css("height", cheight + "px")
|
||||
this.OS.register "BloggerCVSectionDiaglog", BloggerCVSectionDiaglog
|
||||
($ children[1]).css("height", cheight + "px")
|
790
src/packages/Blogger/katex/auto-render.js
Normal file
790
src/packages/Blogger/katex/auto-render.js
Normal file
@ -0,0 +1,790 @@
|
||||
(function webpackUniversalModuleDefinition(root, factory) {
|
||||
if(typeof exports === 'object' && typeof module === 'object')
|
||||
module.exports = factory(require("katex"));
|
||||
else if(typeof define === 'function' && define.amd)
|
||||
define(["katex"], factory);
|
||||
else if(typeof exports === 'object')
|
||||
exports["renderMathInElement"] = factory(require("katex"));
|
||||
else
|
||||
root["renderMathInElement"] = factory(root["katex"]);
|
||||
})(this, function(__WEBPACK_EXTERNAL_MODULE_38__) {
|
||||
return /******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId]) {
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ i: moduleId,
|
||||
/******/ l: false,
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.l = true;
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = modules;
|
||||
/******/
|
||||
/******/ // expose the module cache
|
||||
/******/ __webpack_require__.c = installedModules;
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||
/******/ Object.defineProperty(exports, name, {
|
||||
/******/ configurable: false,
|
||||
/******/ enumerable: true,
|
||||
/******/ get: getter
|
||||
/******/ });
|
||||
/******/ }
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = function(module) {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ function getDefault() { return module['default']; } :
|
||||
/******/ function getModuleExports() { return module; };
|
||||
/******/ __webpack_require__.d(getter, 'a', getter);
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Object.prototype.hasOwnProperty.call
|
||||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||
/******/
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "";
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 9);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
||||
var global = module.exports = typeof window != 'undefined' && window.Math == Math
|
||||
? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
|
||||
if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
|
||||
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = function(it){
|
||||
return typeof it === 'object' ? it !== null : typeof it === 'function';
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 2 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// Thank's IE8 for his funny defineProperty
|
||||
module.exports = !__webpack_require__(3)(function(){
|
||||
return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
|
||||
});
|
||||
|
||||
/***/ }),
|
||||
/* 3 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = function(exec){
|
||||
try {
|
||||
return !!exec();
|
||||
} catch(e){
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 4 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
var core = module.exports = {version: '2.4.0'};
|
||||
if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
|
||||
|
||||
/***/ }),
|
||||
/* 5 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// to indexed object, toObject with fallback for non-array-like ES3 strings
|
||||
var IObject = __webpack_require__(6)
|
||||
, defined = __webpack_require__(7);
|
||||
module.exports = function(it){
|
||||
return IObject(defined(it));
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 6 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
||||
var cof = __webpack_require__(27);
|
||||
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){
|
||||
return cof(it) == 'String' ? it.split('') : Object(it);
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 7 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// 7.2.1 RequireObjectCoercible(argument)
|
||||
module.exports = function(it){
|
||||
if(it == undefined)throw TypeError("Can't call method on " + it);
|
||||
return it;
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 8 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// 7.1.4 ToInteger
|
||||
var ceil = Math.ceil
|
||||
, floor = Math.floor;
|
||||
module.exports = function(it){
|
||||
return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 9 */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_assign__ = __webpack_require__(10);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_assign___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_assign__);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_katex__ = __webpack_require__(38);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_katex___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_katex__);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__splitAtDelimiters__ = __webpack_require__(39);
|
||||
|
||||
/* eslint no-console:0 */
|
||||
|
||||
|
||||
|
||||
|
||||
var splitWithDelimiters = function splitWithDelimiters(text, delimiters) {
|
||||
var data = [{ type: "text", data: text }];
|
||||
for (var i = 0; i < delimiters.length; i++) {
|
||||
var delimiter = delimiters[i];
|
||||
data = Object(__WEBPACK_IMPORTED_MODULE_2__splitAtDelimiters__["a" /* default */])(data, delimiter.left, delimiter.right, delimiter.display || false);
|
||||
}
|
||||
return data;
|
||||
};
|
||||
|
||||
/* Note: optionsCopy is mutated by this method. If it is ever exposed in the
|
||||
* API, we should copy it before mutating.
|
||||
*/
|
||||
var renderMathInText = function renderMathInText(text, optionsCopy) {
|
||||
var data = splitWithDelimiters(text, optionsCopy.delimiters);
|
||||
var fragment = document.createDocumentFragment();
|
||||
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
if (data[i].type === "text") {
|
||||
fragment.appendChild(document.createTextNode(data[i].data));
|
||||
} else {
|
||||
var span = document.createElement("span");
|
||||
var math = data[i].data;
|
||||
// Override any display mode defined in the settings with that
|
||||
// defined by the text itself
|
||||
optionsCopy.displayMode = data[i].display;
|
||||
try {
|
||||
__WEBPACK_IMPORTED_MODULE_1_katex___default.a.render(math, span, optionsCopy);
|
||||
} catch (e) {
|
||||
if (!(e instanceof __WEBPACK_IMPORTED_MODULE_1_katex___default.a.ParseError)) {
|
||||
throw e;
|
||||
}
|
||||
optionsCopy.errorCallback("KaTeX auto-render: Failed to parse `" + data[i].data + "` with ", e);
|
||||
fragment.appendChild(document.createTextNode(data[i].rawData));
|
||||
continue;
|
||||
}
|
||||
fragment.appendChild(span);
|
||||
}
|
||||
}
|
||||
|
||||
return fragment;
|
||||
};
|
||||
|
||||
var renderElem = function renderElem(elem, optionsCopy) {
|
||||
for (var i = 0; i < elem.childNodes.length; i++) {
|
||||
var childNode = elem.childNodes[i];
|
||||
if (childNode.nodeType === 3) {
|
||||
// Text node
|
||||
var frag = renderMathInText(childNode.textContent, optionsCopy);
|
||||
i += frag.childNodes.length - 1;
|
||||
elem.replaceChild(frag, childNode);
|
||||
} else if (childNode.nodeType === 1) {
|
||||
// Element node
|
||||
var shouldRender = optionsCopy.ignoredTags.indexOf(childNode.nodeName.toLowerCase()) === -1;
|
||||
|
||||
if (shouldRender) {
|
||||
renderElem(childNode, optionsCopy);
|
||||
}
|
||||
}
|
||||
// Otherwise, it's something else, and ignore it.
|
||||
}
|
||||
};
|
||||
|
||||
var defaultAutoRenderOptions = {
|
||||
delimiters: [{ left: "$$", right: "$$", display: true }, { left: "\\[", right: "\\]", display: true }, { left: "\\(", right: "\\)", display: false }],
|
||||
|
||||
ignoredTags: ["script", "noscript", "style", "textarea", "pre", "code"],
|
||||
|
||||
errorCallback: function errorCallback(msg, err) {
|
||||
console.error(msg, err);
|
||||
}
|
||||
};
|
||||
|
||||
var renderMathInElement = function renderMathInElement(elem, options) {
|
||||
if (!elem) {
|
||||
throw new Error("No element provided to render");
|
||||
}
|
||||
|
||||
var optionsCopy = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_assign___default()({}, defaultAutoRenderOptions, options);
|
||||
renderElem(elem, optionsCopy);
|
||||
};
|
||||
|
||||
/* harmony default export */ __webpack_exports__["default"] = (renderMathInElement);
|
||||
|
||||
/***/ }),
|
||||
/* 10 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
module.exports = { "default": __webpack_require__(11), __esModule: true };
|
||||
|
||||
/***/ }),
|
||||
/* 11 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
__webpack_require__(12);
|
||||
module.exports = __webpack_require__(4).Object.assign;
|
||||
|
||||
/***/ }),
|
||||
/* 12 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// 19.1.3.1 Object.assign(target, source)
|
||||
var $export = __webpack_require__(13);
|
||||
|
||||
$export($export.S + $export.F, 'Object', {assign: __webpack_require__(23)});
|
||||
|
||||
/***/ }),
|
||||
/* 13 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var global = __webpack_require__(0)
|
||||
, core = __webpack_require__(4)
|
||||
, ctx = __webpack_require__(14)
|
||||
, hide = __webpack_require__(16)
|
||||
, PROTOTYPE = 'prototype';
|
||||
|
||||
var $export = function(type, name, source){
|
||||
var IS_FORCED = type & $export.F
|
||||
, IS_GLOBAL = type & $export.G
|
||||
, IS_STATIC = type & $export.S
|
||||
, IS_PROTO = type & $export.P
|
||||
, IS_BIND = type & $export.B
|
||||
, IS_WRAP = type & $export.W
|
||||
, exports = IS_GLOBAL ? core : core[name] || (core[name] = {})
|
||||
, expProto = exports[PROTOTYPE]
|
||||
, target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]
|
||||
, key, own, out;
|
||||
if(IS_GLOBAL)source = name;
|
||||
for(key in source){
|
||||
// contains in native
|
||||
own = !IS_FORCED && target && target[key] !== undefined;
|
||||
if(own && key in exports)continue;
|
||||
// export native or passed
|
||||
out = own ? target[key] : source[key];
|
||||
// prevent global pollution for namespaces
|
||||
exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
|
||||
// bind timers to global for call from export context
|
||||
: IS_BIND && own ? ctx(out, global)
|
||||
// wrap global constructors for prevent change them in library
|
||||
: IS_WRAP && target[key] == out ? (function(C){
|
||||
var F = function(a, b, c){
|
||||
if(this instanceof C){
|
||||
switch(arguments.length){
|
||||
case 0: return new C;
|
||||
case 1: return new C(a);
|
||||
case 2: return new C(a, b);
|
||||
} return new C(a, b, c);
|
||||
} return C.apply(this, arguments);
|
||||
};
|
||||
F[PROTOTYPE] = C[PROTOTYPE];
|
||||
return F;
|
||||
// make static versions for prototype methods
|
||||
})(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
|
||||
// export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
|
||||
if(IS_PROTO){
|
||||
(exports.virtual || (exports.virtual = {}))[key] = out;
|
||||
// export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
|
||||
if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out);
|
||||
}
|
||||
}
|
||||
};
|
||||
// type bitmap
|
||||
$export.F = 1; // forced
|
||||
$export.G = 2; // global
|
||||
$export.S = 4; // static
|
||||
$export.P = 8; // proto
|
||||
$export.B = 16; // bind
|
||||
$export.W = 32; // wrap
|
||||
$export.U = 64; // safe
|
||||
$export.R = 128; // real proto method for `library`
|
||||
module.exports = $export;
|
||||
|
||||
/***/ }),
|
||||
/* 14 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// optional / simple context binding
|
||||
var aFunction = __webpack_require__(15);
|
||||
module.exports = function(fn, that, length){
|
||||
aFunction(fn);
|
||||
if(that === undefined)return fn;
|
||||
switch(length){
|
||||
case 1: return function(a){
|
||||
return fn.call(that, a);
|
||||
};
|
||||
case 2: return function(a, b){
|
||||
return fn.call(that, a, b);
|
||||
};
|
||||
case 3: return function(a, b, c){
|
||||
return fn.call(that, a, b, c);
|
||||
};
|
||||
}
|
||||
return function(/* ...args */){
|
||||
return fn.apply(that, arguments);
|
||||
};
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 15 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = function(it){
|
||||
if(typeof it != 'function')throw TypeError(it + ' is not a function!');
|
||||
return it;
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 16 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var dP = __webpack_require__(17)
|
||||
, createDesc = __webpack_require__(22);
|
||||
module.exports = __webpack_require__(2) ? function(object, key, value){
|
||||
return dP.f(object, key, createDesc(1, value));
|
||||
} : function(object, key, value){
|
||||
object[key] = value;
|
||||
return object;
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 17 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var anObject = __webpack_require__(18)
|
||||
, IE8_DOM_DEFINE = __webpack_require__(19)
|
||||
, toPrimitive = __webpack_require__(21)
|
||||
, dP = Object.defineProperty;
|
||||
|
||||
exports.f = __webpack_require__(2) ? Object.defineProperty : function defineProperty(O, P, Attributes){
|
||||
anObject(O);
|
||||
P = toPrimitive(P, true);
|
||||
anObject(Attributes);
|
||||
if(IE8_DOM_DEFINE)try {
|
||||
return dP(O, P, Attributes);
|
||||
} catch(e){ /* empty */ }
|
||||
if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');
|
||||
if('value' in Attributes)O[P] = Attributes.value;
|
||||
return O;
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 18 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var isObject = __webpack_require__(1);
|
||||
module.exports = function(it){
|
||||
if(!isObject(it))throw TypeError(it + ' is not an object!');
|
||||
return it;
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 19 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
module.exports = !__webpack_require__(2) && !__webpack_require__(3)(function(){
|
||||
return Object.defineProperty(__webpack_require__(20)('div'), 'a', {get: function(){ return 7; }}).a != 7;
|
||||
});
|
||||
|
||||
/***/ }),
|
||||
/* 20 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var isObject = __webpack_require__(1)
|
||||
, document = __webpack_require__(0).document
|
||||
// in old IE typeof document.createElement is 'object'
|
||||
, is = isObject(document) && isObject(document.createElement);
|
||||
module.exports = function(it){
|
||||
return is ? document.createElement(it) : {};
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 21 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// 7.1.1 ToPrimitive(input [, PreferredType])
|
||||
var isObject = __webpack_require__(1);
|
||||
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
|
||||
// and the second argument - flag - preferred type is a string
|
||||
module.exports = function(it, S){
|
||||
if(!isObject(it))return it;
|
||||
var fn, val;
|
||||
if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
|
||||
if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;
|
||||
if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
|
||||
throw TypeError("Can't convert object to primitive value");
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 22 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = function(bitmap, value){
|
||||
return {
|
||||
enumerable : !(bitmap & 1),
|
||||
configurable: !(bitmap & 2),
|
||||
writable : !(bitmap & 4),
|
||||
value : value
|
||||
};
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 23 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
// 19.1.2.1 Object.assign(target, source, ...)
|
||||
var getKeys = __webpack_require__(24)
|
||||
, gOPS = __webpack_require__(35)
|
||||
, pIE = __webpack_require__(36)
|
||||
, toObject = __webpack_require__(37)
|
||||
, IObject = __webpack_require__(6)
|
||||
, $assign = Object.assign;
|
||||
|
||||
// should work with symbols and should have deterministic property order (V8 bug)
|
||||
module.exports = !$assign || __webpack_require__(3)(function(){
|
||||
var A = {}
|
||||
, B = {}
|
||||
, S = Symbol()
|
||||
, K = 'abcdefghijklmnopqrst';
|
||||
A[S] = 7;
|
||||
K.split('').forEach(function(k){ B[k] = k; });
|
||||
return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
|
||||
}) ? function assign(target, source){ // eslint-disable-line no-unused-vars
|
||||
var T = toObject(target)
|
||||
, aLen = arguments.length
|
||||
, index = 1
|
||||
, getSymbols = gOPS.f
|
||||
, isEnum = pIE.f;
|
||||
while(aLen > index){
|
||||
var S = IObject(arguments[index++])
|
||||
, keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S)
|
||||
, length = keys.length
|
||||
, j = 0
|
||||
, key;
|
||||
while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key];
|
||||
} return T;
|
||||
} : $assign;
|
||||
|
||||
/***/ }),
|
||||
/* 24 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
|
||||
var $keys = __webpack_require__(25)
|
||||
, enumBugKeys = __webpack_require__(34);
|
||||
|
||||
module.exports = Object.keys || function keys(O){
|
||||
return $keys(O, enumBugKeys);
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 25 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var has = __webpack_require__(26)
|
||||
, toIObject = __webpack_require__(5)
|
||||
, arrayIndexOf = __webpack_require__(28)(false)
|
||||
, IE_PROTO = __webpack_require__(31)('IE_PROTO');
|
||||
|
||||
module.exports = function(object, names){
|
||||
var O = toIObject(object)
|
||||
, i = 0
|
||||
, result = []
|
||||
, key;
|
||||
for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key);
|
||||
// Don't enum bug & hidden keys
|
||||
while(names.length > i)if(has(O, key = names[i++])){
|
||||
~arrayIndexOf(result, key) || result.push(key);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 26 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
var hasOwnProperty = {}.hasOwnProperty;
|
||||
module.exports = function(it, key){
|
||||
return hasOwnProperty.call(it, key);
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 27 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
var toString = {}.toString;
|
||||
|
||||
module.exports = function(it){
|
||||
return toString.call(it).slice(8, -1);
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 28 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// false -> Array#indexOf
|
||||
// true -> Array#includes
|
||||
var toIObject = __webpack_require__(5)
|
||||
, toLength = __webpack_require__(29)
|
||||
, toIndex = __webpack_require__(30);
|
||||
module.exports = function(IS_INCLUDES){
|
||||
return function($this, el, fromIndex){
|
||||
var O = toIObject($this)
|
||||
, length = toLength(O.length)
|
||||
, index = toIndex(fromIndex, length)
|
||||
, value;
|
||||
// Array#includes uses SameValueZero equality algorithm
|
||||
if(IS_INCLUDES && el != el)while(length > index){
|
||||
value = O[index++];
|
||||
if(value != value)return true;
|
||||
// Array#toIndex ignores holes, Array#includes - not
|
||||
} else for(;length > index; index++)if(IS_INCLUDES || index in O){
|
||||
if(O[index] === el)return IS_INCLUDES || index || 0;
|
||||
} return !IS_INCLUDES && -1;
|
||||
};
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 29 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// 7.1.15 ToLength
|
||||
var toInteger = __webpack_require__(8)
|
||||
, min = Math.min;
|
||||
module.exports = function(it){
|
||||
return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 30 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var toInteger = __webpack_require__(8)
|
||||
, max = Math.max
|
||||
, min = Math.min;
|
||||
module.exports = function(index, length){
|
||||
index = toInteger(index);
|
||||
return index < 0 ? max(index + length, 0) : min(index, length);
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 31 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var shared = __webpack_require__(32)('keys')
|
||||
, uid = __webpack_require__(33);
|
||||
module.exports = function(key){
|
||||
return shared[key] || (shared[key] = uid(key));
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 32 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var global = __webpack_require__(0)
|
||||
, SHARED = '__core-js_shared__'
|
||||
, store = global[SHARED] || (global[SHARED] = {});
|
||||
module.exports = function(key){
|
||||
return store[key] || (store[key] = {});
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 33 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
var id = 0
|
||||
, px = Math.random();
|
||||
module.exports = function(key){
|
||||
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 34 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// IE 8- don't enum bug keys
|
||||
module.exports = (
|
||||
'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
|
||||
).split(',');
|
||||
|
||||
/***/ }),
|
||||
/* 35 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
exports.f = Object.getOwnPropertySymbols;
|
||||
|
||||
/***/ }),
|
||||
/* 36 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
exports.f = {}.propertyIsEnumerable;
|
||||
|
||||
/***/ }),
|
||||
/* 37 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// 7.1.13 ToObject(argument)
|
||||
var defined = __webpack_require__(7);
|
||||
module.exports = function(it){
|
||||
return Object(defined(it));
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
/* 38 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = __WEBPACK_EXTERNAL_MODULE_38__;
|
||||
|
||||
/***/ }),
|
||||
/* 39 */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
/* eslint no-constant-condition:0 */
|
||||
var findEndOfMath = function findEndOfMath(delimiter, text, startIndex) {
|
||||
// Adapted from
|
||||
// https://github.com/Khan/perseus/blob/master/src/perseus-markdown.jsx
|
||||
var index = startIndex;
|
||||
var braceLevel = 0;
|
||||
|
||||
var delimLength = delimiter.length;
|
||||
|
||||
while (index < text.length) {
|
||||
var character = text[index];
|
||||
|
||||
if (braceLevel <= 0 && text.slice(index, index + delimLength) === delimiter) {
|
||||
return index;
|
||||
} else if (character === "\\") {
|
||||
index++;
|
||||
} else if (character === "{") {
|
||||
braceLevel++;
|
||||
} else if (character === "}") {
|
||||
braceLevel--;
|
||||
}
|
||||
|
||||
index++;
|
||||
}
|
||||
|
||||
return -1;
|
||||
};
|
||||
|
||||
var splitAtDelimiters = function splitAtDelimiters(startData, leftDelim, rightDelim, display) {
|
||||
var finalData = [];
|
||||
|
||||
for (var i = 0; i < startData.length; i++) {
|
||||
if (startData[i].type === "text") {
|
||||
var text = startData[i].data;
|
||||
|
||||
var lookingForLeft = true;
|
||||
var currIndex = 0;
|
||||
var nextIndex = void 0;
|
||||
|
||||
nextIndex = text.indexOf(leftDelim);
|
||||
if (nextIndex !== -1) {
|
||||
currIndex = nextIndex;
|
||||
finalData.push({
|
||||
type: "text",
|
||||
data: text.slice(0, currIndex)
|
||||
});
|
||||
lookingForLeft = false;
|
||||
}
|
||||
|
||||
while (true) {
|
||||
if (lookingForLeft) {
|
||||
nextIndex = text.indexOf(leftDelim, currIndex);
|
||||
if (nextIndex === -1) {
|
||||
break;
|
||||
}
|
||||
|
||||
finalData.push({
|
||||
type: "text",
|
||||
data: text.slice(currIndex, nextIndex)
|
||||
});
|
||||
|
||||
currIndex = nextIndex;
|
||||
} else {
|
||||
nextIndex = findEndOfMath(rightDelim, text, currIndex + leftDelim.length);
|
||||
if (nextIndex === -1) {
|
||||
break;
|
||||
}
|
||||
|
||||
finalData.push({
|
||||
type: "math",
|
||||
data: text.slice(currIndex + leftDelim.length, nextIndex),
|
||||
rawData: text.slice(currIndex, nextIndex + rightDelim.length),
|
||||
display: display
|
||||
});
|
||||
|
||||
currIndex = nextIndex + rightDelim.length;
|
||||
}
|
||||
|
||||
lookingForLeft = !lookingForLeft;
|
||||
}
|
||||
|
||||
finalData.push({
|
||||
type: "text",
|
||||
data: text.slice(currIndex)
|
||||
});
|
||||
} else {
|
||||
finalData.push(startData[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return finalData;
|
||||
};
|
||||
|
||||
/* harmony default export */ __webpack_exports__["a"] = (splitAtDelimiters);
|
||||
|
||||
/***/ })
|
||||
/******/ ])["default"];
|
||||
});
|
BIN
src/packages/Blogger/katex/fonts/KaTeX_AMS-Regular.ttf
Normal file
BIN
src/packages/Blogger/katex/fonts/KaTeX_AMS-Regular.ttf
Normal file
Binary file not shown.
BIN
src/packages/Blogger/katex/fonts/KaTeX_AMS-Regular.woff
Normal file
BIN
src/packages/Blogger/katex/fonts/KaTeX_AMS-Regular.woff
Normal file
Binary file not shown.
BIN
src/packages/Blogger/katex/fonts/KaTeX_AMS-Regular.woff2
Normal file
BIN
src/packages/Blogger/katex/fonts/KaTeX_AMS-Regular.woff2
Normal file
Binary file not shown.
BIN
src/packages/Blogger/katex/fonts/KaTeX_Caligraphic-Bold.ttf
Normal file
BIN
src/packages/Blogger/katex/fonts/KaTeX_Caligraphic-Bold.ttf
Normal file
Binary file not shown.
BIN
src/packages/Blogger/katex/fonts/KaTeX_Caligraphic-Bold.woff
Normal file
BIN
src/packages/Blogger/katex/fonts/KaTeX_Caligraphic-Bold.woff
Normal file
Binary file not shown.
BIN
src/packages/Blogger/katex/fonts/KaTeX_Caligraphic-Bold.woff2
Normal file
BIN
src/packages/Blogger/katex/fonts/KaTeX_Caligraphic-Bold.woff2
Normal file
Binary file not shown.
BIN
src/packages/Blogger/katex/fonts/KaTeX_Caligraphic-Regular.ttf
Normal file
BIN
src/packages/Blogger/katex/fonts/KaTeX_Caligraphic-Regular.ttf
Normal file
Binary file not shown.
BIN
src/packages/Blogger/katex/fonts/KaTeX_Caligraphic-Regular.woff
Normal file
BIN
src/packages/Blogger/katex/fonts/KaTeX_Caligraphic-Regular.woff
Normal file
Binary file not shown.
BIN
src/packages/Blogger/katex/fonts/KaTeX_Caligraphic-Regular.woff2
Normal file
BIN
src/packages/Blogger/katex/fonts/KaTeX_Caligraphic-Regular.woff2
Normal file
Binary file not shown.
BIN
src/packages/Blogger/katex/fonts/KaTeX_Fraktur-Bold.ttf
Normal file
BIN
src/packages/Blogger/katex/fonts/KaTeX_Fraktur-Bold.ttf
Normal file
Binary file not shown.
BIN
src/packages/Blogger/katex/fonts/KaTeX_Fraktur-Bold.woff
Normal file
BIN
src/packages/Blogger/katex/fonts/KaTeX_Fraktur-Bold.woff
Normal file
Binary file not shown.
BIN
src/packages/Blogger/katex/fonts/KaTeX_Fraktur-Bold.woff2
Normal file
BIN
src/packages/Blogger/katex/fonts/KaTeX_Fraktur-Bold.woff2
Normal file
Binary file not shown.
BIN
src/packages/Blogger/katex/fonts/KaTeX_Fraktur-Regular.ttf
Normal file
BIN
src/packages/Blogger/katex/fonts/KaTeX_Fraktur-Regular.ttf
Normal file
Binary file not shown.
BIN
src/packages/Blogger/katex/fonts/KaTeX_Fraktur-Regular.woff
Normal file
BIN
src/packages/Blogger/katex/fonts/KaTeX_Fraktur-Regular.woff
Normal file
Binary file not shown.
BIN
src/packages/Blogger/katex/fonts/KaTeX_Fraktur-Regular.woff2
Normal file
BIN
src/packages/Blogger/katex/fonts/KaTeX_Fraktur-Regular.woff2
Normal file
Binary file not shown.
BIN
src/packages/Blogger/katex/fonts/KaTeX_Main-Bold.ttf
Normal file
BIN
src/packages/Blogger/katex/fonts/KaTeX_Main-Bold.ttf
Normal file
Binary file not shown.
BIN
src/packages/Blogger/katex/fonts/KaTeX_Main-Bold.woff
Normal file
BIN
src/packages/Blogger/katex/fonts/KaTeX_Main-Bold.woff
Normal file
Binary file not shown.
BIN
src/packages/Blogger/katex/fonts/KaTeX_Main-Bold.woff2
Normal file
BIN
src/packages/Blogger/katex/fonts/KaTeX_Main-Bold.woff2
Normal file
Binary file not shown.
BIN
src/packages/Blogger/katex/fonts/KaTeX_Main-BoldItalic.ttf
Normal file
BIN
src/packages/Blogger/katex/fonts/KaTeX_Main-BoldItalic.ttf
Normal file
Binary file not shown.
BIN
src/packages/Blogger/katex/fonts/KaTeX_Main-BoldItalic.woff
Normal file
BIN
src/packages/Blogger/katex/fonts/KaTeX_Main-BoldItalic.woff
Normal file
Binary file not shown.
BIN
src/packages/Blogger/katex/fonts/KaTeX_Main-BoldItalic.woff2
Normal file
BIN
src/packages/Blogger/katex/fonts/KaTeX_Main-BoldItalic.woff2
Normal file
Binary file not shown.
BIN
src/packages/Blogger/katex/fonts/KaTeX_Main-Italic.ttf
Normal file
BIN
src/packages/Blogger/katex/fonts/KaTeX_Main-Italic.ttf
Normal file
Binary file not shown.
BIN
src/packages/Blogger/katex/fonts/KaTeX_Main-Italic.woff
Normal file
BIN
src/packages/Blogger/katex/fonts/KaTeX_Main-Italic.woff
Normal file
Binary file not shown.
BIN
src/packages/Blogger/katex/fonts/KaTeX_Main-Italic.woff2
Normal file
BIN
src/packages/Blogger/katex/fonts/KaTeX_Main-Italic.woff2
Normal file
Binary file not shown.
BIN
src/packages/Blogger/katex/fonts/KaTeX_Main-Regular.ttf
Normal file
BIN
src/packages/Blogger/katex/fonts/KaTeX_Main-Regular.ttf
Normal file
Binary file not shown.
BIN
src/packages/Blogger/katex/fonts/KaTeX_Main-Regular.woff
Normal file
BIN
src/packages/Blogger/katex/fonts/KaTeX_Main-Regular.woff
Normal file
Binary file not shown.
BIN
src/packages/Blogger/katex/fonts/KaTeX_Main-Regular.woff2
Normal file
BIN
src/packages/Blogger/katex/fonts/KaTeX_Main-Regular.woff2
Normal file
Binary file not shown.
BIN
src/packages/Blogger/katex/fonts/KaTeX_Math-Italic.ttf
Normal file
BIN
src/packages/Blogger/katex/fonts/KaTeX_Math-Italic.ttf
Normal file
Binary file not shown.
BIN
src/packages/Blogger/katex/fonts/KaTeX_Math-Italic.woff
Normal file
BIN
src/packages/Blogger/katex/fonts/KaTeX_Math-Italic.woff
Normal file
Binary file not shown.
BIN
src/packages/Blogger/katex/fonts/KaTeX_Math-Italic.woff2
Normal file
BIN
src/packages/Blogger/katex/fonts/KaTeX_Math-Italic.woff2
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user