feat ContextMenu: Rename and Delete

This commit is contained in:
Mahdi Dibaiee 2015-09-03 15:02:46 +04:30
parent ee6f5d6ffb
commit 79ae4c1a47
94 changed files with 4211 additions and 2216 deletions

View File

@ -4,12 +4,14 @@ module.exports = function(grunt) {
grunt.initConfig({
browserify: {
dev: {
files: {
'build/main.js': ['src/js/**/*', '!src/js/libs/**']
},
files: [{
dest: 'build/main.js',
src: ['src/js/**/*', '!src/js/libs/**']
}],
options: {
alias: {
store: './src/js/store.js'
store: './src/js/store.js',
utils: './src/js/utils.js'
},
transform: [['babelify', {
optional: ['es7.asyncFunctions', 'asyncToGenerator',
@ -38,26 +40,32 @@ module.exports = function(grunt) {
src: '**/*.js',
expose: 'api',
cwd: __dirname + '/src/js/api'
},
{
src: '**/*.js',
expose: 'libs',
cwd: __dirname + '/src/js/libs'
}
]
]
]
}
}
},
mochify: {
options: {
reporter: 'land'
},
prod: {
files: {
'build/main.js': 'src/js/**/*'
},
options: {
transform: ['babelify', 'uglifyify']
}
tests: {
src: 'test/**/*.js',
options: '<%= browserify.dev.options %>'
}
},
less: {
dev: {
files: [{
src: 'less/main.less',
dest: 'style.css'
src: 'src/less/main.less',
dest: 'build/style.css'
}]
},
prod: {
@ -65,8 +73,8 @@ module.exports = function(grunt) {
plugins: require('less-plugin-clean-css')()
},
files: [{
src: 'less/main.less',
dest: 'style.css'
src: 'src/less/main.less',
dest: 'build/style.css'
}]
}
},
@ -81,6 +89,14 @@ module.exports = function(grunt) {
}]
}
},
mochaTest: {
tests: {
src: ['tests/**/*.js'],
options: {
reporter: 'landing'
}
}
},
watch: {
styles: {
files: ['src/less/**/*.less'],
@ -100,4 +116,5 @@ module.exports = function(grunt) {
grunt.registerTask('default', ['browserify:dev', 'less:dev', 'copy']);
grunt.registerTask('production', ['browserify:prod', 'less:prod', 'copy']);
grunt.registerTask('test', 'mochaTest');
};

674
LICENSE Normal file
View File

@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
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.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
{one line to give the program's name and a brief idea of what it does.}
Copyright (C) {year} {name of author}
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <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:
Hawk Copyright (C) 2015 Mahdi Dibaiee
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>.

32
build/img/ Share.svg Normal file
View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="30px" height="33px" viewBox="0 0 30 33" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.3.3 (12072) - http://www.bohemiancoding.com/sketch -->
<title>Share</title>
<desc>Created with Sketch.</desc>
<defs>
<filter x="-50%" y="-50%" width="200%" height="200%" filterUnits="objectBoundingBox" id="filter-1">
<feOffset dx="0" dy="0" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.14 0" in="shadowBlurOuter1" type="matrix" result="shadowMatrixOuter1"></feColorMatrix>
<feMerge>
<feMergeNode in="shadowMatrixOuter1"></feMergeNode>
<feMergeNode in="SourceGraphic"></feMergeNode>
</feMerge>
</filter>
</defs>
<g id="Components" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="Toolbar" sketch:type="MSArtboardGroup" transform="translate(-257.000000, -9.000000)">
<g sketch:type="MSLayerGroup">
<rect id="Box" stroke="#CDCDCD" fill="#F0F0F0" filter="url(#filter-1)" sketch:type="MSShapeGroup" x="0" y="0" width="360" height="50"></rect>
<g id="Buttons" transform="translate(26.000000, 10.000000)" sketch:type="MSShapeGroup">
<g id="Share" transform="translate(234.000000, 1.000000)">
<rect id="Rectangle-19" stroke="#63B0CD" stroke-width="4" x="1" y="5" width="22" height="22" rx="3"></rect>
<g id="Arrow" transform="translate(3.970456, 0.882233)" stroke="#F0F0F0" stroke-width="2.5" fill="#63B0CD">
<path d="M20.2530929,5.25326679 C20.3438814,5.03976384 20.3987852,4.80672423 20.4099227,4.56134515 C20.432031,4.07426178 20.2779908,3.61997718 20.0040956,3.26013822 L20.0040956,3.26013822 C19.9211454,3.11025176 19.8084527,2.97343991 19.666954,2.85885655 L16.8349944,0.565580823 C16.2473288,0.0896986089 15.3888974,0.175692837 14.9102322,0.766795217 C14.5280707,1.23872535 14.51148,1.88774371 14.8254507,2.37170039 C8.0442336,2.34435705 5.13629361,3.46855439 3.00866682,7.10849311 C2.68821987,7.65671298 2.40532468,8.22634036 2.15810417,8.81484569 C0.984261485,11.6091635 0.691790704,14.485364 0.877899405,16.9746675 C0.895731743,17.2131846 0.914705989,17.391546 0.929731873,17.5029256 C1.07740823,18.5975788 2.08451526,19.3652551 3.17916839,19.2175787 C4.27382152,19.0699024 5.04149788,18.0627954 4.89382152,16.9681422 C4.88912564,16.933334 4.87851724,16.833613 4.86676693,16.6764463 C4.72372596,14.7631968 4.95552945,12.4836072 5.84592458,10.3640328 C6.02652213,9.93412255 6.23155977,9.52126628 6.46199346,9.1270409 C7.68123763,7.04116095 9.53426863,6.32342019 14.9076101,6.36745059 C14.6234537,6.83929221 14.6426924,7.45589796 15.0015672,7.91523679 C15.4698434,8.514603 16.3266432,8.61556582 16.9225246,8.15001227 L19.4222418,6.19701916 C19.5803173,6.10431474 19.7247752,5.9904338 19.8515556,5.85908383 C20.0438195,5.69160959 20.1787056,5.48100042 20.2530929,5.25326679 Z" id="Shape-Copy"></path>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

14
build/img/Directory.svg Normal file
View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="36px" height="32px" viewBox="0 0 36 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.3.3 (12072) - http://www.bohemiancoding.com/sketch -->
<title>Directory</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Components" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="Directory" sketch:type="MSArtboardGroup" transform="translate(-14.000000, -14.000000)" fill="#5EBEC2">
<g sketch:type="MSLayerGroup" transform="translate(14.000000, 14.000000)" id="Rectangle-26">
<path d="M31.5861302,4.8857172 L31.5861302,4.01206383 C31.5861302,1.79308927 29.7957552,0.00332028593 27.5872158,0.00332028593 L4.63272197,0.00332028593 C2.43172245,0.00332028593 0.633807607,1.7980959 0.633807607,4.01206383 L0.633807607,22.5765087 L2.99385717,8.43023526 C3.32044476,6.47265038 5.37422383,4.88571429 7.58945402,4.88571429 L31.5809386,4.88571429 C31.5826695,4.88571429 31.5844001,4.88571526 31.5861302,4.8857172 L31.5861302,4.8857172 Z M0.633839725,29.5203448 C0.634442717,29.6731046 0.643531019,29.8238105 0.660655651,29.9720175 L0.660655651,29.7103842 C0.660655651,29.6569617 0.661490198,29.6037345 0.663146965,29.5507151 C0.653298862,29.5406529 0.643529589,29.5305292 0.633839725,29.5203448 L0.633839725,29.5203448 Z M8.58945402,5.88571429 L32.5809386,5.88571429 C34.7924291,5.88571429 36.320372,7.47308677 35.9938572,9.43023526 L32.8913391,28.0269076 C32.5647516,29.9844925 30.5109725,31.5714286 28.2957423,31.5714286 L4.3042577,31.5714286 C2.09276724,31.5714286 0.564824355,29.9840561 0.891339142,28.0269076 L3.99385717,9.43023526 C4.32044476,7.47265038 6.37422383,5.88571429 8.58945402,5.88571429 Z" sketch:type="MSShapeGroup"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

14
build/img/File.svg Normal file
View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="30px" height="36px" viewBox="0 0 30 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.3.3 (12072) - http://www.bohemiancoding.com/sketch -->
<title>File</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Components" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="File" sketch:type="MSArtboardGroup" transform="translate(-17.000000, -16.000000)" fill="#5EBEC2">
<g sketch:type="MSLayerGroup" transform="translate(17.000000, 16.000000)" id="Rectangle-28">
<path d="M0,3.99017859 C0,1.7864638 1.78679466,0 3.9992748,0 L26.0007252,0 C28.2094637,0 30,1.7852456 30,3.99017859 L30,32.0098214 C30,34.2135362 28.2132053,36 26.0007252,36 L3.9992748,36 C1.79053632,36 0,34.2147544 0,32.0098214 L0,3.99017859 L0,3.99017859 Z M6.36363636,9.9 C6.36363636,9.40294373 6.75685482,9 7.26797379,9 L22.7320262,9 C23.231478,9 23.6363636,9.39947834 23.6363636,9.9 C23.6363636,10.3970563 23.2431452,10.8 22.7320262,10.8 L7.26797379,10.8 C6.76852202,10.8 6.36363636,10.4005217 6.36363636,9.9 L6.36363636,9.9 Z M6.36363636,15.93 C6.36363636,15.4329437 6.75685482,15.03 7.26797379,15.03 L22.7320262,15.03 C23.231478,15.03 23.6363636,15.4294783 23.6363636,15.93 C23.6363636,16.4270563 23.2431452,16.83 22.7320262,16.83 L7.26797379,16.83 C6.76852202,16.83 6.36363636,16.4305217 6.36363636,15.93 L6.36363636,15.93 Z M6.36363636,21.6 C6.36363636,21.1029437 6.75685482,20.7 7.26797379,20.7 L22.7320262,20.7 C23.231478,20.7 23.6363636,21.0994783 23.6363636,21.6 C23.6363636,22.0970563 23.2431452,22.5 22.7320262,22.5 L7.26797379,22.5 C6.76852202,22.5 6.36363636,22.1005217 6.36363636,21.6 L6.36363636,21.6 Z M6.36363636,27 C6.36363636,26.5029437 6.75685482,26.1 7.26797379,26.1 L22.7320262,26.1 C23.231478,26.1 23.6363636,26.4994783 23.6363636,27 C23.6363636,27.4970563 23.2431452,27.9 22.7320262,27.9 L7.26797379,27.9 C6.76852202,27.9 6.36363636,27.5005217 6.36363636,27 L6.36363636,27 Z" sketch:type="MSShapeGroup"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

27
build/img/More.svg Normal file
View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="6px" height="24px" viewBox="0 0 6 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.3.3 (12072) - http://www.bohemiancoding.com/sketch -->
<title>More</title>
<desc>Created with Sketch.</desc>
<defs>
<filter x="-50%" y="-50%" width="200%" height="200%" filterUnits="objectBoundingBox" id="filter-1">
<feOffset dx="0" dy="0" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.14 0" in="shadowBlurOuter1" type="matrix" result="shadowMatrixOuter1"></feColorMatrix>
<feMerge>
<feMergeNode in="shadowMatrixOuter1"></feMergeNode>
<feMergeNode in="SourceGraphic"></feMergeNode>
</feMerge>
</filter>
</defs>
<g id="Components" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="Toolbar" sketch:type="MSArtboardGroup" transform="translate(-336.000000, -14.000000)">
<g sketch:type="MSLayerGroup">
<rect id="Box" stroke="#CDCDCD" fill="#F0F0F0" filter="url(#filter-1)" sketch:type="MSShapeGroup" x="0" y="0" width="360" height="50"></rect>
<g id="Buttons" transform="translate(26.000000, 10.000000)" fill="#63B0CD" sketch:type="MSShapeGroup">
<path d="M313,10 C314.656854,10 316,8.65685425 316,7 C316,5.34314575 314.656854,4 313,4 C311.343146,4 310,5.34314575 310,7 C310,8.65685425 311.343146,10 313,10 Z M313,19 C314.656854,19 316,17.6568542 316,16 C316,14.3431458 314.656854,13 313,13 C311.343146,13 310,14.3431458 310,16 C310,17.6568542 311.343146,19 313,19 Z M313,28 C314.656854,28 316,26.6568542 316,25 C316,23.3431458 314.656854,22 313,22 C311.343146,22 310,23.3431458 310,25 C310,26.6568542 311.343146,28 313,28 Z" id="More"></path>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

16
build/img/Plus.svg Normal file
View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.3.3 (12072) - http://www.bohemiancoding.com/sketch -->
<title>Plus</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Components" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="Toolbar" sketch:type="MSArtboardGroup" transform="translate(-26.000000, -14.000000)" fill="#63B0CD">
<g sketch:type="MSLayerGroup" id="Buttons">
<g transform="translate(26.000000, 10.000000)" sketch:type="MSShapeGroup">
<path d="M15,13.5 L15,6.50050165 C15,5.12537944 13.8807119,4 12.5,4 C11.1096621,4 10,5.11951272 10,6.50050165 L10,13.5 L2.50050165,13.5 C1.12537944,13.5 0,14.6192881 0,16 C0,17.3903379 1.11951272,18.5 2.50050165,18.5 L10,18.5 L10,25.4994984 C10,26.8746206 11.1192881,28 12.5,28 C13.8903379,28 15,26.8804873 15,25.4994984 L15,18.5 L21.4994984,18.5 C22.8746206,18.5 24,17.3807119 24,16 C24,14.6096621 22.8804873,13.5 21.4994984,13.5 L15,13.5 Z" id="Plus"></path>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

20
build/img/Refresh.svg Normal file
View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="26px" height="28px" viewBox="0 0 26 28" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.3.3 (12072) - http://www.bohemiancoding.com/sketch -->
<title>Refresh</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Components" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="Toolbar" sketch:type="MSArtboardGroup" transform="translate(-180.000000, -11.000000)">
<g sketch:type="MSLayerGroup" id="Buttons">
<g transform="translate(26.000000, 10.000000)" sketch:type="MSShapeGroup">
<g id="Refresh" transform="translate(155.000000, 0.000000)">
<path d="M10.5474605,1.30277122 C11.1919885,0.780842749 12.1334814,0.875157759 12.6584622,1.52345507 L12.6584622,1.52345507 C13.1798083,2.16726386 13.0808307,3.1115672 12.4354217,3.6342091 L9.32944225,6.14938166 C8.68491427,6.67131013 7.74342133,6.57699512 7.21844052,5.92869781 L7.21844052,5.92869781 C6.69709444,5.28488901 6.79607209,4.34058567 7.44148108,3.81794378 L10.5474605,1.30277122 L10.5474605,1.30277122 Z" id="Rectangle-14" fill="#63B0CD"></path>
<path d="M9.26782395,4.9280266 C8.54245587,4.5259485 7.63164396,4.78231919 7.22721443,5.51192937 L7.22721443,5.51192937 C6.82558499,6.23648806 7.0870355,7.14925802 7.81339509,7.55188572 L11.3089429,9.48949949 C12.0343109,9.89157758 12.9451229,9.63520689 13.3495524,8.90559671 L13.3495524,8.90559671 C13.7511818,8.18103802 13.4897313,7.26826806 12.7633717,6.86564036 L9.26782395,4.9280266 L9.26782395,4.9280266 Z" id="Rectangle-14-Copy" fill="#63B0CD"></path>
<path d="M2.19892823,20.9938955 C4.95698056,26.406878 11.580913,28.5591241 16.9938955,25.8010718 C22.406878,23.0430194 24.5591241,16.419087 21.8010718,11.0061045 C19.0430194,5.59312203 12.419087,3.44087591 7.0061045,6.19892823 C1.59312203,8.95698056 -0.559124091,15.580913 2.19892823,20.9938955 L2.19892823,20.9938955 Z" id="Oval-13" stroke="#63B0CD" stroke-width="4" stroke-linecap="round" stroke-dasharray="50,6"></path>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

22
build/img/Share.svg Normal file
View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="25px" height="27px" viewBox="0 0 25 27" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.3.3 (12072) - http://www.bohemiancoding.com/sketch -->
<title>Share</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Components" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="Toolbar" sketch:type="MSArtboardGroup" transform="translate(-260.000000, -12.000000)">
<g sketch:type="MSLayerGroup" id="Buttons">
<g transform="translate(26.000000, 10.000000)" sketch:type="MSShapeGroup">
<g id="Share" transform="translate(234.000000, 3.000000)">
<path d="M2.25,6.24976556 L2.25,6.24976556 L2.25,21.7502344 C2.25,22.8576463 3.14314782,23.75 4.24976556,23.75 L19.7502344,23.75 C20.8576463,23.75 21.75,22.8568522 21.75,21.7502344 L21.75,6.24976556 C21.75,5.14235373 20.8568522,4.25 19.7502344,4.25 L4.24976556,4.25 C3.14235373,4.25 2.25,5.14314782 2.25,6.24976556 L2.25,6.24976556 Z M0.25,6.24976556 C0.25,4.04075604 2.0356077,2.25 4.24976556,2.25 L19.7502344,2.25 C21.959244,2.25 23.75,4.0356077 23.75,6.24976556 L23.75,21.7502344 C23.75,23.959244 21.9643923,25.75 19.7502344,25.75 L4.24976556,25.75 C2.04075604,25.75 0.25,23.9643923 0.25,21.7502344 L0.25,6.24976556 L0.25,6.24976556 Z" id="Shape" fill="#63B0CD"></path>
<rect id="Rectangle-19" stroke="#63B0CD" x="1" y="3" width="22" height="22" rx="4"></rect>
<g id="Arrow" transform="translate(2.970456, 0.882233)" stroke="#F0F0F0" stroke-width="1.5" fill="#63B0CD">
<path d="M20.2530929,5.25326679 C20.3438814,5.03976384 20.3987852,4.80672423 20.4099227,4.56134515 C20.432031,4.07426178 20.2779908,3.61997718 20.0040956,3.26013822 L20.0040956,3.26013822 C19.9211454,3.11025176 19.8084527,2.97343991 19.666954,2.85885655 L16.8349944,0.565580823 C16.2473288,0.0896986089 15.3888974,0.175692837 14.9102322,0.766795217 C14.5280707,1.23872535 14.51148,1.88774371 14.8254507,2.37170039 C8.0442336,2.34435705 5.13629361,3.46855439 3.00866682,7.10849311 C2.68821987,7.65671298 2.40532468,8.22634036 2.15810417,8.81484569 C0.984261485,11.6091635 0.691790704,14.485364 0.877899405,16.9746675 C0.895731743,17.2131846 0.914705989,17.391546 0.929731873,17.5029256 C1.07740823,18.5975788 2.08451526,19.3652551 3.17916839,19.2175787 C4.27382152,19.0699024 5.04149788,18.0627954 4.89382152,16.9681422 C4.88912564,16.933334 4.87851724,16.833613 4.86676693,16.6764463 C4.72372596,14.7631968 4.95552945,12.4836072 5.84592458,10.3640328 C6.02652213,9.93412255 6.23155977,9.52126628 6.46199346,9.1270409 C7.68123763,7.04116095 9.53426863,6.32342019 14.9076101,6.36745059 C14.6234537,6.83929221 14.6426924,7.45589796 15.0015672,7.91523679 C15.4698434,8.514603 16.3266432,8.61556582 16.9225246,8.15001227 L19.4222418,6.19701916 C19.5803173,6.10431474 19.7247752,5.9904338 19.8515556,5.85908383 C20.0438195,5.69160959 20.1787056,5.48100042 20.2530929,5.25326679 Z" id="Shape-Copy"></path>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

16
build/img/View.svg Normal file
View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.3.3 (12072) - http://www.bohemiancoding.com/sketch -->
<title>View</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Components" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="Toolbar" sketch:type="MSArtboardGroup" transform="translate(-100.000000, -14.000000)" fill="#63B0CD">
<g sketch:type="MSLayerGroup" id="Buttons">
<g transform="translate(26.000000, 10.000000)" sketch:type="MSShapeGroup">
<path d="M77,10 C78.6568542,10 80,8.65685425 80,7 C80,5.34314575 78.6568542,4 77,4 C75.3431458,4 74,5.34314575 74,7 C74,8.65685425 75.3431458,10 77,10 Z M77,19 C78.6568542,19 80,17.6568542 80,16 C80,14.3431458 78.6568542,13 77,13 C75.3431458,13 74,14.3431458 74,16 C74,17.6568542 75.3431458,19 77,19 Z M86,19 C87.6568542,19 89,17.6568542 89,16 C89,14.3431458 87.6568542,13 86,13 C84.3431458,13 83,14.3431458 83,16 C83,17.6568542 84.3431458,19 86,19 Z M86,28 C87.6568542,28 89,26.6568542 89,25 C89,23.3431458 87.6568542,22 86,22 C84.3431458,22 83,23.3431458 83,25 C83,26.6568542 84.3431458,28 86,28 Z M77,28 C78.6568542,28 80,26.6568542 80,25 C80,23.3431458 78.6568542,22 77,22 C75.3431458,22 74,23.3431458 74,25 C74,26.6568542 75.3431458,28 77,28 Z M86,10 C87.6568542,10 89,8.65685425 89,7 C89,5.34314575 87.6568542,4 86,4 C84.3431458,4 83,5.34314575 83,7 C83,8.65685425 84.3431458,10 86,10 Z M95,19 C96.6568542,19 98,17.6568542 98,16 C98,14.3431458 96.6568542,13 95,13 C93.3431458,13 92,14.3431458 92,16 C92,17.6568542 93.3431458,19 95,19 Z M95,28 C96.6568542,28 98,26.6568542 98,25 C98,23.3431458 96.6568542,22 95,22 C93.3431458,22 92,23.3431458 92,25 C92,26.6568542 93.3431458,28 95,28 Z M95,10 C96.6568542,10 98,8.65685425 98,7 C98,5.34314575 96.6568542,4 95,4 C93.3431458,4 92,5.34314575 92,7 C92,8.65685425 93.3431458,10 95,10 Z" id="View"></path>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 46 KiB

View File

@ -4,8 +4,11 @@
<meta charset="UTF-8">
<title>Hawk</title>
<meta name="viewport" content="width=device-width">
<link rel='stylesheet' href='style.css' />
</head>
<body>
<div id='wrapper'></div>
<script src='main.js'></script>

File diff suppressed because it is too large Load Diff

View File

@ -15,10 +15,10 @@
},
"type": "privileged",
"permissions": {
"device-storage:sdcard": {"access": "readwrite"},
"device-storage:videos": {"access": "readwrite"},
"device-storage:pictures": {"access": "readwrite"},
"device-storage:music": {"access": "readwrite"},
"device-storage:sdcard": {"access": "readwrite"},
"device-storage:apps": {"access": "readwrite"},
"webapps-manage": {}
},

340
build/style.css Normal file
View File

@ -0,0 +1,340 @@
.icon {
display: block;
}
.icon-directory {
display: block;
background: url(/img/Directory.svg) no-repeat;
width: 36px;
height: 32px;
}
.icon-file {
display: block;
background: url(/img/File.svg) no-repeat;
width: 30px;
height: 36px;
}
.icon-plus {
display: block;
background: url(/img/Plus.svg) no-repeat;
width: 24px;
height: 24px;
}
.icon-view {
display: block;
background: url(/img/View.svg) no-repeat;
width: 24px;
height: 24px;
}
.icon-refresh {
display: block;
background: url(/img/Refresh.svg) no-repeat;
width: 26px;
height: 28px;
}
.icon-share {
display: block;
background: url(/img/Share.svg) no-repeat;
width: 25px;
height: 27px;
}
.icon-more {
display: block;
background: url(/img/More.svg) no-repeat;
width: 6px;
height: 24px;
}
.regular-medium {
font-weight: normal;
}
.regular-medium {
font-size: 1.8rem;
}
.light-medium,
.light-big,
.light-small {
font-weight: 200;
}
.light-medium {
font-size: 1.6rem;
}
.light-big {
font-size: 1.8rem;
}
.light-small {
font-size: 1.3rem;
}
.thin-small {
font-weight: 100;
}
.thin-small {
font-size: 1.4rem;
}
.shadow-bottom {
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.shadow {
box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
}
button {
border: none;
background: none;
}
.btn {
padding: 6px 3rem;
border: 1px solid #f0f0f0;
border-radius: 4px;
font-weight: 200;
font-size: 1.6rem;
background: #f8f8f8;
color: #39393a;
}
.btn.success {
background: #b8e986;
}
input {
border: 1px solid #f0f0f0;
background: #f8f8f8;
border-radius: 4px;
height: 32px;
box-sizing: border-box;
padding: 5px 1rem;
font-weight: 200;
font-size: 1.6rem;
}
.file,
.directory {
display: flex;
flex-flow: row;
align-items: center;
padding: 1.4rem;
width: 100%;
font-weight: 200;
font-size: 1.8rem;
box-sizing: border-box;
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.file i,
.directory i {
margin-right: 1.4rem;
}
.directory i {
display: block;
background: url(/img/Directory.svg) no-repeat;
width: 36px;
height: 32px;
}
.file i {
display: block;
background: url(/img/File.svg) no-repeat;
width: 30px;
height: 36px;
}
header {
display: flex;
flex: 1;
flex-flow: row;
align-items: center;
width: 100%;
height: 5rem;
background: #39393a;
color: white;
box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
}
header h1 {
margin-left: -3rem;
}
header button {
background: none;
border: none;
width: 8rem;
height: 2rem;
}
header button::before {
content: '';
display: block;
width: 2rem;
height: 4px;
margin-top: -9px;
border-radius: 4px;
background: #9b9b93;
box-shadow: 0 7px 0 #9b9b93, 0 14px 0 #9b9b93;
}
.menu {
width: 24.5rem;
position: fixed;
left: 0;
top: 0;
background: white;
border-radius: 4px;
pointer-events: none;
opacity: 0;
transition: opacity 0.5s ease;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.menu.active {
opacity: 1;
pointer-events: all;
}
.menu ul {
list-style: none;
padding: 0 15px;
}
.menu li {
margin: 0;
padding: 1.3rem 8px;
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.menu li:last-of-type {
border-bottom: none;
}
nav {
display: flex;
flex-flow: column;
position: fixed;
left: -70vw;
top: 0;
width: 70vw;
height: 100vh;
background: #39393a;
color: white;
box-shadow: 1px 0 5px rgba(0, 0, 0, 0.2);
z-index: 6;
transition: left 0.5s ease;
}
nav.active {
left: 0;
}
nav.active i {
pointer-events: all;
opacity: 0.99;
}
nav p {
margin-left: 1.6rem;
font-weight: normal;
font-size: 1.8rem;
}
nav ul {
list-style: none;
padding-left: 0;
}
nav li {
font-weight: 200;
font-size: 1.6rem;
padding: 1rem 0 1rem 3rem;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
nav li:first-of-type {
padding-top: 0;
}
nav li:last-of-type {
padding-bottom: 0;
border-bottom: none;
}
nav i {
display: block;
position: fixed;
left: 0;
top: 0;
pointer-events: none;
width: 100vw;
height: 100vh;
background: rgba(0, 0, 0, 0.55);
opacity: 0;
z-index: -1;
transition: opacity 0.5s ease;
}
.toolbar {
display: flex;
flex-flow: row;
align-items: center;
justify-content: space-around;
align-self: flex-end;
width: 100vw;
height: 5rem;
box-sizing: border-box;
background: #f8f8f8;
}
.breadcrumb {
display: flex;
flex: 1;
align-items: center;
width: 100vw;
height: 3.5rem;
padding: 8px;
box-sizing: border-box;
font-weight: 200;
font-size: 1.6rem;
background: #f8f8f8;
border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}
.breadcrumb i {
margin: 0 2px;
}
.breadcrumb span.history {
color: #9b9b93;
}
.file-list {
height: calc(100vh - 13.5rem);
overflow-x: hidden;
overflow-y: auto;
}
.dialog {
display: flex;
flex-flow: column;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 335px;
height: auto;
padding: 1.5rem 1.7rem;
background: white;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
z-index: 3;
transition: opacity 0.5s ease;
opacity: 0;
pointer-events: none;
}
.dialog.active {
opacity: 1;
pointer-events: all;
}
.dialog p:first-of-type {
margin: 0 0 2.5rem;
}
.dialog p {
margin: 0 0 2rem;
}
.dialog input {
margin-bottom: 2rem;
}
.dialog .foot {
display: flex;
justify-content: space-between;
}
.dialog .foot button {
flex: 1;
margin: 0 8px;
}
.dialog .foot button:first-of-type {
margin-left: 0;
}
.dialog .foot button:last-of-type {
margin-right: 0;
}
html,
body {
margin: 0;
font-family: Fira Sans;
font-weight: regular;
box-sizing: border-box;
}
html {
font-size: 10px;
min-height: 100vh;
}
body {
font-size: 1.6rem;
display: flex;
flex-flow: column;
}

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="36px" height="32px" viewBox="0 0 36 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.3.3 (12072) - http://www.bohemiancoding.com/sketch -->
<title>Directory</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Components" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="Directory" sketch:type="MSArtboardGroup" transform="translate(-14.000000, -14.000000)" fill="#5EBEC2">
<g sketch:type="MSLayerGroup" transform="translate(14.000000, 14.000000)" id="Rectangle-26">
<path d="M31.5861302,4.8857172 L31.5861302,4.01206383 C31.5861302,1.79308927 29.7957552,0.00332028593 27.5872158,0.00332028593 L4.63272197,0.00332028593 C2.43172245,0.00332028593 0.633807607,1.7980959 0.633807607,4.01206383 L0.633807607,22.5765087 L2.99385717,8.43023526 C3.32044476,6.47265038 5.37422383,4.88571429 7.58945402,4.88571429 L31.5809386,4.88571429 C31.5826695,4.88571429 31.5844001,4.88571526 31.5861302,4.8857172 L31.5861302,4.8857172 Z M0.633839725,29.5203448 C0.634442717,29.6731046 0.643531019,29.8238105 0.660655651,29.9720175 L0.660655651,29.7103842 C0.660655651,29.6569617 0.661490198,29.6037345 0.663146965,29.5507151 C0.653298862,29.5406529 0.643529589,29.5305292 0.633839725,29.5203448 L0.633839725,29.5203448 Z M8.58945402,5.88571429 L32.5809386,5.88571429 C34.7924291,5.88571429 36.320372,7.47308677 35.9938572,9.43023526 L32.8913391,28.0269076 C32.5647516,29.9844925 30.5109725,31.5714286 28.2957423,31.5714286 L4.3042577,31.5714286 C2.09276724,31.5714286 0.564824355,29.9840561 0.891339142,28.0269076 L3.99385717,9.43023526 C4.32044476,7.47265038 6.37422383,5.88571429 8.58945402,5.88571429 Z" sketch:type="MSShapeGroup"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

14
design/assets/File.svg Normal file
View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="30px" height="36px" viewBox="0 0 30 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.3.3 (12072) - http://www.bohemiancoding.com/sketch -->
<title>File</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Components" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="File" sketch:type="MSArtboardGroup" transform="translate(-17.000000, -16.000000)" fill="#5EBEC2">
<g sketch:type="MSLayerGroup" transform="translate(17.000000, 16.000000)" id="Rectangle-28">
<path d="M0,3.99017859 C0,1.7864638 1.78679466,0 3.9992748,0 L26.0007252,0 C28.2094637,0 30,1.7852456 30,3.99017859 L30,32.0098214 C30,34.2135362 28.2132053,36 26.0007252,36 L3.9992748,36 C1.79053632,36 0,34.2147544 0,32.0098214 L0,3.99017859 L0,3.99017859 Z M6.36363636,9.9 C6.36363636,9.40294373 6.75685482,9 7.26797379,9 L22.7320262,9 C23.231478,9 23.6363636,9.39947834 23.6363636,9.9 C23.6363636,10.3970563 23.2431452,10.8 22.7320262,10.8 L7.26797379,10.8 C6.76852202,10.8 6.36363636,10.4005217 6.36363636,9.9 L6.36363636,9.9 Z M6.36363636,15.93 C6.36363636,15.4329437 6.75685482,15.03 7.26797379,15.03 L22.7320262,15.03 C23.231478,15.03 23.6363636,15.4294783 23.6363636,15.93 C23.6363636,16.4270563 23.2431452,16.83 22.7320262,16.83 L7.26797379,16.83 C6.76852202,16.83 6.36363636,16.4305217 6.36363636,15.93 L6.36363636,15.93 Z M6.36363636,21.6 C6.36363636,21.1029437 6.75685482,20.7 7.26797379,20.7 L22.7320262,20.7 C23.231478,20.7 23.6363636,21.0994783 23.6363636,21.6 C23.6363636,22.0970563 23.2431452,22.5 22.7320262,22.5 L7.26797379,22.5 C6.76852202,22.5 6.36363636,22.1005217 6.36363636,21.6 L6.36363636,21.6 Z M6.36363636,27 C6.36363636,26.5029437 6.75685482,26.1 7.26797379,26.1 L22.7320262,26.1 C23.231478,26.1 23.6363636,26.4994783 23.6363636,27 C23.6363636,27.4970563 23.2431452,27.9 22.7320262,27.9 L7.26797379,27.9 C6.76852202,27.9 6.36363636,27.5005217 6.36363636,27 L6.36363636,27 Z" sketch:type="MSShapeGroup"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

27
design/assets/More.svg Normal file
View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="6px" height="24px" viewBox="0 0 6 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.3.3 (12072) - http://www.bohemiancoding.com/sketch -->
<title>More</title>
<desc>Created with Sketch.</desc>
<defs>
<filter x="-50%" y="-50%" width="200%" height="200%" filterUnits="objectBoundingBox" id="filter-1">
<feOffset dx="0" dy="0" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.14 0" in="shadowBlurOuter1" type="matrix" result="shadowMatrixOuter1"></feColorMatrix>
<feMerge>
<feMergeNode in="shadowMatrixOuter1"></feMergeNode>
<feMergeNode in="SourceGraphic"></feMergeNode>
</feMerge>
</filter>
</defs>
<g id="Components" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="Toolbar" sketch:type="MSArtboardGroup" transform="translate(-336.000000, -14.000000)">
<g sketch:type="MSLayerGroup">
<rect id="Box" stroke="#CDCDCD" fill="#F0F0F0" filter="url(#filter-1)" sketch:type="MSShapeGroup" x="0" y="0" width="360" height="50"></rect>
<g id="Buttons" transform="translate(26.000000, 10.000000)" fill="#63B0CD" sketch:type="MSShapeGroup">
<path d="M313,10 C314.656854,10 316,8.65685425 316,7 C316,5.34314575 314.656854,4 313,4 C311.343146,4 310,5.34314575 310,7 C310,8.65685425 311.343146,10 313,10 Z M313,19 C314.656854,19 316,17.6568542 316,16 C316,14.3431458 314.656854,13 313,13 C311.343146,13 310,14.3431458 310,16 C310,17.6568542 311.343146,19 313,19 Z M313,28 C314.656854,28 316,26.6568542 316,25 C316,23.3431458 314.656854,22 313,22 C311.343146,22 310,23.3431458 310,25 C310,26.6568542 311.343146,28 313,28 Z" id="More"></path>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

27
design/assets/Plus.svg Normal file
View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.3.3 (12072) - http://www.bohemiancoding.com/sketch -->
<title>Plus</title>
<desc>Created with Sketch.</desc>
<defs>
<filter x="-50%" y="-50%" width="200%" height="200%" filterUnits="objectBoundingBox" id="filter-1">
<feOffset dx="0" dy="0" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.14 0" in="shadowBlurOuter1" type="matrix" result="shadowMatrixOuter1"></feColorMatrix>
<feMerge>
<feMergeNode in="shadowMatrixOuter1"></feMergeNode>
<feMergeNode in="SourceGraphic"></feMergeNode>
</feMerge>
</filter>
</defs>
<g id="Components" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="Toolbar" sketch:type="MSArtboardGroup" transform="translate(-26.000000, -14.000000)">
<g sketch:type="MSLayerGroup">
<rect id="Box" stroke="#CDCDCD" fill="#F0F0F0" filter="url(#filter-1)" sketch:type="MSShapeGroup" x="0" y="0" width="360" height="50"></rect>
<g id="Buttons" transform="translate(26.000000, 10.000000)" fill="#63B0CD" sketch:type="MSShapeGroup">
<path d="M15,13.5 L15,6.50050165 C15,5.12537944 13.8807119,4 12.5,4 C11.1096621,4 10,5.11951272 10,6.50050165 L10,13.5 L2.50050165,13.5 C1.12537944,13.5 0,14.6192881 0,16 C0,17.3903379 1.11951272,18.5 2.50050165,18.5 L10,18.5 L10,25.4994984 C10,26.8746206 11.1192881,28 12.5,28 C13.8903379,28 15,26.8804873 15,25.4994984 L15,18.5 L21.4994984,18.5 C22.8746206,18.5 24,17.3807119 24,16 C24,14.6096621 22.8804873,13.5 21.4994984,13.5 L15,13.5 Z" id="Plus"></path>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

31
design/assets/Refresh.svg Normal file
View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="26px" height="28px" viewBox="0 0 26 28" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.3.3 (12072) - http://www.bohemiancoding.com/sketch -->
<title>Refresh</title>
<desc>Created with Sketch.</desc>
<defs>
<filter x="-50%" y="-50%" width="200%" height="200%" filterUnits="objectBoundingBox" id="filter-1">
<feOffset dx="0" dy="0" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.14 0" in="shadowBlurOuter1" type="matrix" result="shadowMatrixOuter1"></feColorMatrix>
<feMerge>
<feMergeNode in="shadowMatrixOuter1"></feMergeNode>
<feMergeNode in="SourceGraphic"></feMergeNode>
</feMerge>
</filter>
</defs>
<g id="Components" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="Toolbar" sketch:type="MSArtboardGroup" transform="translate(-180.000000, -11.000000)">
<g sketch:type="MSLayerGroup">
<rect id="Box" stroke="#CDCDCD" fill="#F0F0F0" filter="url(#filter-1)" sketch:type="MSShapeGroup" x="0" y="0" width="360" height="50"></rect>
<g id="Buttons" transform="translate(26.000000, 10.000000)" sketch:type="MSShapeGroup">
<g id="Refresh" transform="translate(155.000000, 0.000000)">
<path d="M10.5474605,1.30277122 C11.1919885,0.780842749 12.1334814,0.875157759 12.6584622,1.52345507 L12.6584622,1.52345507 C13.1798083,2.16726386 13.0808307,3.1115672 12.4354217,3.6342091 L9.32944225,6.14938166 C8.68491427,6.67131013 7.74342133,6.57699512 7.21844052,5.92869781 L7.21844052,5.92869781 C6.69709444,5.28488901 6.79607209,4.34058567 7.44148108,3.81794378 L10.5474605,1.30277122 L10.5474605,1.30277122 Z" id="Rectangle-14" fill="#63B0CD"></path>
<path d="M9.26782395,4.9280266 C8.54245587,4.5259485 7.63164396,4.78231919 7.22721443,5.51192937 L7.22721443,5.51192937 C6.82558499,6.23648806 7.0870355,7.14925802 7.81339509,7.55188572 L11.3089429,9.48949949 C12.0343109,9.89157758 12.9451229,9.63520689 13.3495524,8.90559671 L13.3495524,8.90559671 C13.7511818,8.18103802 13.4897313,7.26826806 12.7633717,6.86564036 L9.26782395,4.9280266 L9.26782395,4.9280266 Z" id="Rectangle-14-Copy" fill="#63B0CD"></path>
<path d="M2.19892823,20.9938955 C4.95698056,26.406878 11.580913,28.5591241 16.9938955,25.8010718 C22.406878,23.0430194 24.5591241,16.419087 21.8010718,11.0061045 C19.0430194,5.59312203 12.419087,3.44087591 7.0061045,6.19892823 C1.59312203,8.95698056 -0.559124091,15.580913 2.19892823,20.9938955 L2.19892823,20.9938955 Z" id="Oval-13" stroke="#63B0CD" stroke-width="4" stroke-linecap="round" stroke-dasharray="50,6"></path>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

40
design/assets/Share.svg Normal file
View File

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="25px" height="25px" viewBox="0 0 25 25" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.3.3 (12072) - http://www.bohemiancoding.com/sketch -->
<title>Share</title>
<desc>Created with Sketch.</desc>
<defs>
<filter x="-50%" y="-50%" width="200%" height="200%" filterUnits="objectBoundingBox" id="filter-1">
<feOffset dx="0" dy="0" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.14 0" in="shadowBlurOuter1" type="matrix" result="shadowMatrixOuter1"></feColorMatrix>
<feMerge>
<feMergeNode in="shadowMatrixOuter1"></feMergeNode>
<feMergeNode in="SourceGraphic"></feMergeNode>
</feMerge>
</filter>
</defs>
<g id="Components" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="Toolbar" sketch:type="MSArtboardGroup" transform="translate(-260.000000, -14.000000)">
<g sketch:type="MSLayerGroup">
<rect id="Box" stroke="#CDCDCD" fill="#F0F0F0" filter="url(#filter-1)" sketch:type="MSShapeGroup" x="0" y="0" width="360" height="50"></rect>
<g id="Buttons" transform="translate(26.000000, 10.000000)" sketch:type="MSShapeGroup">
<g id="Share" transform="translate(234.000000, 3.000000)">
<rect id="Rectangle-16-Copy-3" stroke="#63B0CD" x="0.25" y="2.25" width="23.5" height="23.5" rx="4"></rect>
<rect id="Rectangle-16-Copy-4" stroke="#63B0CD" stroke-width="2" x="0.25" y="2.25" width="23.5" height="23.5" rx="4"></rect>
<g id="Arrow-Copy" transform="translate(3.970456, 1.794010)">
<path d="M16.4464007,0.565580823 C15.8587351,0.0896986089 15.0003038,0.175692837 14.5216385,0.766795217 L14.5216385,0.766795217 C14.0462873,1.35380507 14.1365328,2.21479885 14.7250017,2.69133155 L17.5569614,4.98460728 C18.1446269,5.4604895 19.0030583,5.37449527 19.4817235,4.78339289 L19.4817235,4.78339289 C19.9570747,4.19638303 19.8668292,3.33538925 19.2783604,2.85885655 L16.4464007,0.565580823 L16.4464007,0.565580823 Z" id="Rectangle-14-Copy-3" fill="#F0F0F0"></path>
<path d="M17.8233203,3.7510408 C18.4192017,3.28548725 19.2760014,3.38645007 19.7442777,3.98581629 L19.7442777,3.98581629 C20.2093117,4.58103276 20.1040536,5.4403204 19.5073577,5.90651033 L16.6358061,8.15001227 C16.0399247,8.61556582 15.183125,8.514603 14.7148488,7.91523679 L14.7148488,7.91523679 C14.2498147,7.32002031 14.3550729,6.46073267 14.9517688,5.99454274 L17.8233203,3.7510408 L17.8233203,3.7510408 Z" id="Rectangle-14-Copy-2" fill="#F0F0F0"></path>
<path d="M0.904641558,19.4099998 C0.904641558,19.4099998 0.306664788,12.8190133 2.56325912,7.07847426 C4.48673229,2.18536051 7.7523107,1.65650733 15.0028897,2.14586395" id="Path-8" stroke="#F0F0F0" stroke-width="4" stroke-linecap="round"></path>
</g>
<g id="Arrow" transform="translate(4.970456, 0.882233)">
<path d="M14.8349944,0.565580823 C14.2473288,0.0896986089 13.3888974,0.175692837 12.9102322,0.766795217 L12.9102322,0.766795217 C12.434881,1.35380507 12.5251265,2.21479885 13.1135954,2.69133155 L15.945555,4.98460728 C16.5332206,5.4604895 17.3916519,5.37449527 17.8703172,4.78339289 L17.8703172,4.78339289 C18.3456684,4.19638303 18.2554229,3.33538925 17.666954,2.85885655 L14.8349944,0.565580823 L14.8349944,0.565580823 Z" id="Rectangle-14-Copy-3" fill="#63B0CD"></path>
<path d="M16.1100388,3.7510408 C16.7059201,3.28548725 17.5627199,3.38645007 18.0309961,3.98581629 L18.0309961,3.98581629 C18.4960302,4.58103276 18.390772,5.4403204 17.7940761,5.90651033 L14.9225246,8.15001227 C14.3266432,8.61556582 13.4698434,8.514603 13.0015672,7.91523679 L13.0015672,7.91523679 C12.5365331,7.32002031 12.6417913,6.46073267 13.2384872,5.99454274 L16.1100388,3.7510408 L16.1100388,3.7510408 Z" id="Rectangle-14-Copy-2" fill="#63B0CD"></path>
<path d="M0.911776696,17.2355339 C0.911776696,17.2355339 0.254336053,12.3622456 2.73533014,8.117767 C4.85007689,4.49986342 8.44039022,4.10883637 16.4119797,4.47066018" id="Path-8" stroke="#63B0CD" stroke-width="4" stroke-linecap="round"></path>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.7 KiB

27
design/assets/View.svg Normal file
View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.3.3 (12072) - http://www.bohemiancoding.com/sketch -->
<title>View</title>
<desc>Created with Sketch.</desc>
<defs>
<filter x="-50%" y="-50%" width="200%" height="200%" filterUnits="objectBoundingBox" id="filter-1">
<feOffset dx="0" dy="0" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.14 0" in="shadowBlurOuter1" type="matrix" result="shadowMatrixOuter1"></feColorMatrix>
<feMerge>
<feMergeNode in="shadowMatrixOuter1"></feMergeNode>
<feMergeNode in="SourceGraphic"></feMergeNode>
</feMerge>
</filter>
</defs>
<g id="Components" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="Toolbar" sketch:type="MSArtboardGroup" transform="translate(-100.000000, -14.000000)">
<g sketch:type="MSLayerGroup">
<rect id="Box" stroke="#CDCDCD" fill="#F0F0F0" filter="url(#filter-1)" sketch:type="MSShapeGroup" x="0" y="0" width="360" height="50"></rect>
<g id="Buttons" transform="translate(26.000000, 10.000000)" fill="#63B0CD" sketch:type="MSShapeGroup">
<path d="M77,10 C78.6568542,10 80,8.65685425 80,7 C80,5.34314575 78.6568542,4 77,4 C75.3431458,4 74,5.34314575 74,7 C74,8.65685425 75.3431458,10 77,10 Z M77,19 C78.6568542,19 80,17.6568542 80,16 C80,14.3431458 78.6568542,13 77,13 C75.3431458,13 74,14.3431458 74,16 C74,17.6568542 75.3431458,19 77,19 Z M86,19 C87.6568542,19 89,17.6568542 89,16 C89,14.3431458 87.6568542,13 86,13 C84.3431458,13 83,14.3431458 83,16 C83,17.6568542 84.3431458,19 86,19 Z M86,28 C87.6568542,28 89,26.6568542 89,25 C89,23.3431458 87.6568542,22 86,22 C84.3431458,22 83,23.3431458 83,25 C83,26.6568542 84.3431458,28 86,28 Z M77,28 C78.6568542,28 80,26.6568542 80,25 C80,23.3431458 78.6568542,22 77,22 C75.3431458,22 74,23.3431458 74,25 C74,26.6568542 75.3431458,28 77,28 Z M86,10 C87.6568542,10 89,8.65685425 89,7 C89,5.34314575 87.6568542,4 86,4 C84.3431458,4 83,5.34314575 83,7 C83,8.65685425 84.3431458,10 86,10 Z M95,19 C96.6568542,19 98,17.6568542 98,16 C98,14.3431458 96.6568542,13 95,13 C93.3431458,13 92,14.3431458 92,16 C92,17.6568542 93.3431458,19 95,19 Z M95,28 C96.6568542,28 98,26.6568542 98,25 C98,23.3431458 96.6568542,22 95,22 C93.3431458,22 92,23.3431458 92,25 C92,26.6568542 93.3431458,28 95,28 Z M95,10 C96.6568542,10 98,8.65685425 98,7 C98,5.34314575 96.6568542,4 95,4 C93.3431458,4 92,5.34314575 92,7 C92,8.65685425 93.3431458,10 95,10 Z" id="View"></path>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

View File

@ -4,7 +4,10 @@
"description": "",
"main": "index.js",
"scripts": {
"test": "grunt test"
"phantom": "mochify --transform babelify",
"wd": "mochify --transform babelify --wd",
"cover": "mochify --transform babelify --cover",
"test": "npm run phantom && npm run wd && npm run cover"
},
"repository": {
"type": "git",

32
src/img/ Share.svg Normal file
View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="30px" height="33px" viewBox="0 0 30 33" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.3.3 (12072) - http://www.bohemiancoding.com/sketch -->
<title>Share</title>
<desc>Created with Sketch.</desc>
<defs>
<filter x="-50%" y="-50%" width="200%" height="200%" filterUnits="objectBoundingBox" id="filter-1">
<feOffset dx="0" dy="0" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.14 0" in="shadowBlurOuter1" type="matrix" result="shadowMatrixOuter1"></feColorMatrix>
<feMerge>
<feMergeNode in="shadowMatrixOuter1"></feMergeNode>
<feMergeNode in="SourceGraphic"></feMergeNode>
</feMerge>
</filter>
</defs>
<g id="Components" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="Toolbar" sketch:type="MSArtboardGroup" transform="translate(-257.000000, -9.000000)">
<g sketch:type="MSLayerGroup">
<rect id="Box" stroke="#CDCDCD" fill="#F0F0F0" filter="url(#filter-1)" sketch:type="MSShapeGroup" x="0" y="0" width="360" height="50"></rect>
<g id="Buttons" transform="translate(26.000000, 10.000000)" sketch:type="MSShapeGroup">
<g id="Share" transform="translate(234.000000, 1.000000)">
<rect id="Rectangle-19" stroke="#63B0CD" stroke-width="4" x="1" y="5" width="22" height="22" rx="3"></rect>
<g id="Arrow" transform="translate(3.970456, 0.882233)" stroke="#F0F0F0" stroke-width="2.5" fill="#63B0CD">
<path d="M20.2530929,5.25326679 C20.3438814,5.03976384 20.3987852,4.80672423 20.4099227,4.56134515 C20.432031,4.07426178 20.2779908,3.61997718 20.0040956,3.26013822 L20.0040956,3.26013822 C19.9211454,3.11025176 19.8084527,2.97343991 19.666954,2.85885655 L16.8349944,0.565580823 C16.2473288,0.0896986089 15.3888974,0.175692837 14.9102322,0.766795217 C14.5280707,1.23872535 14.51148,1.88774371 14.8254507,2.37170039 C8.0442336,2.34435705 5.13629361,3.46855439 3.00866682,7.10849311 C2.68821987,7.65671298 2.40532468,8.22634036 2.15810417,8.81484569 C0.984261485,11.6091635 0.691790704,14.485364 0.877899405,16.9746675 C0.895731743,17.2131846 0.914705989,17.391546 0.929731873,17.5029256 C1.07740823,18.5975788 2.08451526,19.3652551 3.17916839,19.2175787 C4.27382152,19.0699024 5.04149788,18.0627954 4.89382152,16.9681422 C4.88912564,16.933334 4.87851724,16.833613 4.86676693,16.6764463 C4.72372596,14.7631968 4.95552945,12.4836072 5.84592458,10.3640328 C6.02652213,9.93412255 6.23155977,9.52126628 6.46199346,9.1270409 C7.68123763,7.04116095 9.53426863,6.32342019 14.9076101,6.36745059 C14.6234537,6.83929221 14.6426924,7.45589796 15.0015672,7.91523679 C15.4698434,8.514603 16.3266432,8.61556582 16.9225246,8.15001227 L19.4222418,6.19701916 C19.5803173,6.10431474 19.7247752,5.9904338 19.8515556,5.85908383 C20.0438195,5.69160959 20.1787056,5.48100042 20.2530929,5.25326679 Z" id="Shape-Copy"></path>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

14
src/img/Directory.svg Normal file
View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="36px" height="32px" viewBox="0 0 36 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.3.3 (12072) - http://www.bohemiancoding.com/sketch -->
<title>Directory</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Components" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="Directory" sketch:type="MSArtboardGroup" transform="translate(-14.000000, -14.000000)" fill="#5EBEC2">
<g sketch:type="MSLayerGroup" transform="translate(14.000000, 14.000000)" id="Rectangle-26">
<path d="M31.5861302,4.8857172 L31.5861302,4.01206383 C31.5861302,1.79308927 29.7957552,0.00332028593 27.5872158,0.00332028593 L4.63272197,0.00332028593 C2.43172245,0.00332028593 0.633807607,1.7980959 0.633807607,4.01206383 L0.633807607,22.5765087 L2.99385717,8.43023526 C3.32044476,6.47265038 5.37422383,4.88571429 7.58945402,4.88571429 L31.5809386,4.88571429 C31.5826695,4.88571429 31.5844001,4.88571526 31.5861302,4.8857172 L31.5861302,4.8857172 Z M0.633839725,29.5203448 C0.634442717,29.6731046 0.643531019,29.8238105 0.660655651,29.9720175 L0.660655651,29.7103842 C0.660655651,29.6569617 0.661490198,29.6037345 0.663146965,29.5507151 C0.653298862,29.5406529 0.643529589,29.5305292 0.633839725,29.5203448 L0.633839725,29.5203448 Z M8.58945402,5.88571429 L32.5809386,5.88571429 C34.7924291,5.88571429 36.320372,7.47308677 35.9938572,9.43023526 L32.8913391,28.0269076 C32.5647516,29.9844925 30.5109725,31.5714286 28.2957423,31.5714286 L4.3042577,31.5714286 C2.09276724,31.5714286 0.564824355,29.9840561 0.891339142,28.0269076 L3.99385717,9.43023526 C4.32044476,7.47265038 6.37422383,5.88571429 8.58945402,5.88571429 Z" sketch:type="MSShapeGroup"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

14
src/img/File.svg Normal file
View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="30px" height="36px" viewBox="0 0 30 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.3.3 (12072) - http://www.bohemiancoding.com/sketch -->
<title>File</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Components" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="File" sketch:type="MSArtboardGroup" transform="translate(-17.000000, -16.000000)" fill="#5EBEC2">
<g sketch:type="MSLayerGroup" transform="translate(17.000000, 16.000000)" id="Rectangle-28">
<path d="M0,3.99017859 C0,1.7864638 1.78679466,0 3.9992748,0 L26.0007252,0 C28.2094637,0 30,1.7852456 30,3.99017859 L30,32.0098214 C30,34.2135362 28.2132053,36 26.0007252,36 L3.9992748,36 C1.79053632,36 0,34.2147544 0,32.0098214 L0,3.99017859 L0,3.99017859 Z M6.36363636,9.9 C6.36363636,9.40294373 6.75685482,9 7.26797379,9 L22.7320262,9 C23.231478,9 23.6363636,9.39947834 23.6363636,9.9 C23.6363636,10.3970563 23.2431452,10.8 22.7320262,10.8 L7.26797379,10.8 C6.76852202,10.8 6.36363636,10.4005217 6.36363636,9.9 L6.36363636,9.9 Z M6.36363636,15.93 C6.36363636,15.4329437 6.75685482,15.03 7.26797379,15.03 L22.7320262,15.03 C23.231478,15.03 23.6363636,15.4294783 23.6363636,15.93 C23.6363636,16.4270563 23.2431452,16.83 22.7320262,16.83 L7.26797379,16.83 C6.76852202,16.83 6.36363636,16.4305217 6.36363636,15.93 L6.36363636,15.93 Z M6.36363636,21.6 C6.36363636,21.1029437 6.75685482,20.7 7.26797379,20.7 L22.7320262,20.7 C23.231478,20.7 23.6363636,21.0994783 23.6363636,21.6 C23.6363636,22.0970563 23.2431452,22.5 22.7320262,22.5 L7.26797379,22.5 C6.76852202,22.5 6.36363636,22.1005217 6.36363636,21.6 L6.36363636,21.6 Z M6.36363636,27 C6.36363636,26.5029437 6.75685482,26.1 7.26797379,26.1 L22.7320262,26.1 C23.231478,26.1 23.6363636,26.4994783 23.6363636,27 C23.6363636,27.4970563 23.2431452,27.9 22.7320262,27.9 L7.26797379,27.9 C6.76852202,27.9 6.36363636,27.5005217 6.36363636,27 L6.36363636,27 Z" sketch:type="MSShapeGroup"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

27
src/img/More.svg Normal file
View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="6px" height="24px" viewBox="0 0 6 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.3.3 (12072) - http://www.bohemiancoding.com/sketch -->
<title>More</title>
<desc>Created with Sketch.</desc>
<defs>
<filter x="-50%" y="-50%" width="200%" height="200%" filterUnits="objectBoundingBox" id="filter-1">
<feOffset dx="0" dy="0" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.14 0" in="shadowBlurOuter1" type="matrix" result="shadowMatrixOuter1"></feColorMatrix>
<feMerge>
<feMergeNode in="shadowMatrixOuter1"></feMergeNode>
<feMergeNode in="SourceGraphic"></feMergeNode>
</feMerge>
</filter>
</defs>
<g id="Components" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="Toolbar" sketch:type="MSArtboardGroup" transform="translate(-336.000000, -14.000000)">
<g sketch:type="MSLayerGroup">
<rect id="Box" stroke="#CDCDCD" fill="#F0F0F0" filter="url(#filter-1)" sketch:type="MSShapeGroup" x="0" y="0" width="360" height="50"></rect>
<g id="Buttons" transform="translate(26.000000, 10.000000)" fill="#63B0CD" sketch:type="MSShapeGroup">
<path d="M313,10 C314.656854,10 316,8.65685425 316,7 C316,5.34314575 314.656854,4 313,4 C311.343146,4 310,5.34314575 310,7 C310,8.65685425 311.343146,10 313,10 Z M313,19 C314.656854,19 316,17.6568542 316,16 C316,14.3431458 314.656854,13 313,13 C311.343146,13 310,14.3431458 310,16 C310,17.6568542 311.343146,19 313,19 Z M313,28 C314.656854,28 316,26.6568542 316,25 C316,23.3431458 314.656854,22 313,22 C311.343146,22 310,23.3431458 310,25 C310,26.6568542 311.343146,28 313,28 Z" id="More"></path>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

16
src/img/Plus.svg Normal file
View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.3.3 (12072) - http://www.bohemiancoding.com/sketch -->
<title>Plus</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Components" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="Toolbar" sketch:type="MSArtboardGroup" transform="translate(-26.000000, -14.000000)" fill="#63B0CD">
<g sketch:type="MSLayerGroup" id="Buttons">
<g transform="translate(26.000000, 10.000000)" sketch:type="MSShapeGroup">
<path d="M15,13.5 L15,6.50050165 C15,5.12537944 13.8807119,4 12.5,4 C11.1096621,4 10,5.11951272 10,6.50050165 L10,13.5 L2.50050165,13.5 C1.12537944,13.5 0,14.6192881 0,16 C0,17.3903379 1.11951272,18.5 2.50050165,18.5 L10,18.5 L10,25.4994984 C10,26.8746206 11.1192881,28 12.5,28 C13.8903379,28 15,26.8804873 15,25.4994984 L15,18.5 L21.4994984,18.5 C22.8746206,18.5 24,17.3807119 24,16 C24,14.6096621 22.8804873,13.5 21.4994984,13.5 L15,13.5 Z" id="Plus"></path>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

20
src/img/Refresh.svg Normal file
View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="26px" height="28px" viewBox="0 0 26 28" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.3.3 (12072) - http://www.bohemiancoding.com/sketch -->
<title>Refresh</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Components" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="Toolbar" sketch:type="MSArtboardGroup" transform="translate(-180.000000, -11.000000)">
<g sketch:type="MSLayerGroup" id="Buttons">
<g transform="translate(26.000000, 10.000000)" sketch:type="MSShapeGroup">
<g id="Refresh" transform="translate(155.000000, 0.000000)">
<path d="M10.5474605,1.30277122 C11.1919885,0.780842749 12.1334814,0.875157759 12.6584622,1.52345507 L12.6584622,1.52345507 C13.1798083,2.16726386 13.0808307,3.1115672 12.4354217,3.6342091 L9.32944225,6.14938166 C8.68491427,6.67131013 7.74342133,6.57699512 7.21844052,5.92869781 L7.21844052,5.92869781 C6.69709444,5.28488901 6.79607209,4.34058567 7.44148108,3.81794378 L10.5474605,1.30277122 L10.5474605,1.30277122 Z" id="Rectangle-14" fill="#63B0CD"></path>
<path d="M9.26782395,4.9280266 C8.54245587,4.5259485 7.63164396,4.78231919 7.22721443,5.51192937 L7.22721443,5.51192937 C6.82558499,6.23648806 7.0870355,7.14925802 7.81339509,7.55188572 L11.3089429,9.48949949 C12.0343109,9.89157758 12.9451229,9.63520689 13.3495524,8.90559671 L13.3495524,8.90559671 C13.7511818,8.18103802 13.4897313,7.26826806 12.7633717,6.86564036 L9.26782395,4.9280266 L9.26782395,4.9280266 Z" id="Rectangle-14-Copy" fill="#63B0CD"></path>
<path d="M2.19892823,20.9938955 C4.95698056,26.406878 11.580913,28.5591241 16.9938955,25.8010718 C22.406878,23.0430194 24.5591241,16.419087 21.8010718,11.0061045 C19.0430194,5.59312203 12.419087,3.44087591 7.0061045,6.19892823 C1.59312203,8.95698056 -0.559124091,15.580913 2.19892823,20.9938955 L2.19892823,20.9938955 Z" id="Oval-13" stroke="#63B0CD" stroke-width="4" stroke-linecap="round" stroke-dasharray="50,6"></path>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

22
src/img/Share.svg Normal file
View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="25px" height="27px" viewBox="0 0 25 27" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.3.3 (12072) - http://www.bohemiancoding.com/sketch -->
<title>Share</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Components" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="Toolbar" sketch:type="MSArtboardGroup" transform="translate(-260.000000, -12.000000)">
<g sketch:type="MSLayerGroup" id="Buttons">
<g transform="translate(26.000000, 10.000000)" sketch:type="MSShapeGroup">
<g id="Share" transform="translate(234.000000, 3.000000)">
<path d="M2.25,6.24976556 L2.25,6.24976556 L2.25,21.7502344 C2.25,22.8576463 3.14314782,23.75 4.24976556,23.75 L19.7502344,23.75 C20.8576463,23.75 21.75,22.8568522 21.75,21.7502344 L21.75,6.24976556 C21.75,5.14235373 20.8568522,4.25 19.7502344,4.25 L4.24976556,4.25 C3.14235373,4.25 2.25,5.14314782 2.25,6.24976556 L2.25,6.24976556 Z M0.25,6.24976556 C0.25,4.04075604 2.0356077,2.25 4.24976556,2.25 L19.7502344,2.25 C21.959244,2.25 23.75,4.0356077 23.75,6.24976556 L23.75,21.7502344 C23.75,23.959244 21.9643923,25.75 19.7502344,25.75 L4.24976556,25.75 C2.04075604,25.75 0.25,23.9643923 0.25,21.7502344 L0.25,6.24976556 L0.25,6.24976556 Z" id="Shape" fill="#63B0CD"></path>
<rect id="Rectangle-19" stroke="#63B0CD" x="1" y="3" width="22" height="22" rx="4"></rect>
<g id="Arrow" transform="translate(2.970456, 0.882233)" stroke="#F0F0F0" stroke-width="1.5" fill="#63B0CD">
<path d="M20.2530929,5.25326679 C20.3438814,5.03976384 20.3987852,4.80672423 20.4099227,4.56134515 C20.432031,4.07426178 20.2779908,3.61997718 20.0040956,3.26013822 L20.0040956,3.26013822 C19.9211454,3.11025176 19.8084527,2.97343991 19.666954,2.85885655 L16.8349944,0.565580823 C16.2473288,0.0896986089 15.3888974,0.175692837 14.9102322,0.766795217 C14.5280707,1.23872535 14.51148,1.88774371 14.8254507,2.37170039 C8.0442336,2.34435705 5.13629361,3.46855439 3.00866682,7.10849311 C2.68821987,7.65671298 2.40532468,8.22634036 2.15810417,8.81484569 C0.984261485,11.6091635 0.691790704,14.485364 0.877899405,16.9746675 C0.895731743,17.2131846 0.914705989,17.391546 0.929731873,17.5029256 C1.07740823,18.5975788 2.08451526,19.3652551 3.17916839,19.2175787 C4.27382152,19.0699024 5.04149788,18.0627954 4.89382152,16.9681422 C4.88912564,16.933334 4.87851724,16.833613 4.86676693,16.6764463 C4.72372596,14.7631968 4.95552945,12.4836072 5.84592458,10.3640328 C6.02652213,9.93412255 6.23155977,9.52126628 6.46199346,9.1270409 C7.68123763,7.04116095 9.53426863,6.32342019 14.9076101,6.36745059 C14.6234537,6.83929221 14.6426924,7.45589796 15.0015672,7.91523679 C15.4698434,8.514603 16.3266432,8.61556582 16.9225246,8.15001227 L19.4222418,6.19701916 C19.5803173,6.10431474 19.7247752,5.9904338 19.8515556,5.85908383 C20.0438195,5.69160959 20.1787056,5.48100042 20.2530929,5.25326679 Z" id="Shape-Copy"></path>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

16
src/img/View.svg Normal file
View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.3.3 (12072) - http://www.bohemiancoding.com/sketch -->
<title>View</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Components" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="Toolbar" sketch:type="MSArtboardGroup" transform="translate(-100.000000, -14.000000)" fill="#63B0CD">
<g sketch:type="MSLayerGroup" id="Buttons">
<g transform="translate(26.000000, 10.000000)" sketch:type="MSShapeGroup">
<path d="M77,10 C78.6568542,10 80,8.65685425 80,7 C80,5.34314575 78.6568542,4 77,4 C75.3431458,4 74,5.34314575 74,7 C74,8.65685425 75.3431458,10 77,10 Z M77,19 C78.6568542,19 80,17.6568542 80,16 C80,14.3431458 78.6568542,13 77,13 C75.3431458,13 74,14.3431458 74,16 C74,17.6568542 75.3431458,19 77,19 Z M86,19 C87.6568542,19 89,17.6568542 89,16 C89,14.3431458 87.6568542,13 86,13 C84.3431458,13 83,14.3431458 83,16 C83,17.6568542 84.3431458,19 86,19 Z M86,28 C87.6568542,28 89,26.6568542 89,25 C89,23.3431458 87.6568542,22 86,22 C84.3431458,22 83,23.3431458 83,25 C83,26.6568542 84.3431458,28 86,28 Z M77,28 C78.6568542,28 80,26.6568542 80,25 C80,23.3431458 78.6568542,22 77,22 C75.3431458,22 74,23.3431458 74,25 C74,26.6568542 75.3431458,28 77,28 Z M86,10 C87.6568542,10 89,8.65685425 89,7 C89,5.34314575 87.6568542,4 86,4 C84.3431458,4 83,5.34314575 83,7 C83,8.65685425 84.3431458,10 86,10 Z M95,19 C96.6568542,19 98,17.6568542 98,16 C98,14.3431458 96.6568542,13 95,13 C93.3431458,13 92,14.3431458 92,16 C92,17.6568542 93.3431458,19 95,19 Z M95,28 C96.6568542,28 98,26.6568542 98,25 C98,23.3431458 96.6568542,22 95,22 C93.3431458,22 92,23.3431458 92,25 C92,26.6568542 93.3431458,28 95,28 Z M95,10 C96.6568542,10 98,8.65685425 98,7 C98,5.34314575 96.6568542,4 95,4 C93.3431458,4 92,5.34314575 92,7 C92,8.65685425 93.3431458,10 95,10 Z" id="View"></path>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -4,8 +4,11 @@
<meta charset="UTF-8">
<title>Hawk</title>
<meta name="viewport" content="width=device-width">
<link rel='stylesheet' href='style.css' />
</head>
<body>
<div id='wrapper'></div>
<script src='main.js'></script>

View File

@ -1,6 +1,7 @@
import { CHANGE_DIRECTORY } from 'actions/types';
export default function changedir(dir) {
if (dir === 'sdcard') dir = '';
return {
type: CHANGE_DIRECTORY,
dir

32
src/js/actions/dialog.js Normal file
View File

@ -0,0 +1,32 @@
import { DIALOG } from 'actions/types';
export function show(id) {
return {
type: DIALOG,
active: true,
id
}
}
export function hide(id) {
return {
type: DIALOG,
active: false,
id
}
}
export function toggle(id) {
return {
type: DIALOG,
active: 'toggle',
id
}
}
export function hideAll() {
return {
type: DIALOG,
active: false
}
}

35
src/js/actions/file.js Normal file
View File

@ -0,0 +1,35 @@
import { CREATE_FILE, SHARE_FILE, RENAME_FILE, ACTIVE_FILE, DELETE_FILE } from 'actions/types';
export function create(path, name) {
return {
type: CREATE_FILE,
path, name
}
}
export function share() {
return {
type: SHARE_FILE
}
}
export function rename(file, name) {
return {
type: RENAME_FILE,
file, name
}
}
export function active(file) {
return {
type: ACTIVE_FILE,
file
}
}
export function deleteFile(file) {
return {
type: DELETE_FILE,
file
}
}

View File

@ -0,0 +1,29 @@
import { LIST_FILES, FILES_VIEW, REFRESH } from 'actions/types';
import store from 'store';
export function refresh() {
return {
type: REFRESH
}
}
export function toggle(state) {
return {
type: FILES_VIEW,
view: 'toggle'
}
}
export function details(state) {
return {
type: FILES_VIEW,
view: 'details'
}
}
export function list(state) {
return {
type: FILES_VIEW,
view: 'list'
}
}

32
src/js/actions/menu.js Normal file
View File

@ -0,0 +1,32 @@
import { MENU } from 'actions/types';
export function show(id, x, y) {
return {
type: MENU,
active: true,
id, x, y
}
}
export function hide(id) {
return {
type: MENU,
active: false,
id
}
}
export function toggle(id, x, y) {
return {
type: MENU,
active: 'toggle',
id, x, y
}
}
export function hideAll() {
return {
type: MENU,
active: false
}
}

View File

@ -0,0 +1,22 @@
import { NAVIGATION, TOGGLE } from 'actions/types';
export function show() {
return {
type: NAVIGATION,
active: true
}
}
export function hide() {
return {
type: NAVIGATION,
active: false
}
}
export function toggle() {
return {
type: NAVIGATION,
active: TOGGLE
}
}

View File

@ -1,9 +1,26 @@
const TYPES = {
CHANGE_DIRECTORY: Symbol(),
LIST_FILES: Symbol(),
SORT: Symbol(),
SEARCH: Symbol(),
REFRESH: Symbol()
CHANGE_DIRECTORY: Symbol('CHANGE_DIRECTORY'),
LIST_FILES: Symbol('LIST_FILES'),
FILES_VIEW: Symbol('FILES_VIEW'),
NAVIGATION: Symbol('NAVIGATION'),
TOGGLE: Symbol('TOGGLE'),
REFRESH: Symbol('REFRESH'),
SORT: Symbol('SORT'),
NEW_FILE: Symbol('NEW_FILE'),
CREATE_FILE: Symbol('CREATE_FILE'),
SHARE_FILE: Symbol('SHARE_FILE'),
RENAME_FILE: Symbol('RENAME_FILE'),
ACTIVE_FILE: Symbol('ACTIVE_FILE'),
DELETE_FILE: Symbol('DELETE_FILE'),
MENU: Symbol('MENU'),
DIALOG: Symbol('DEBUG'),
SEARCH: Symbol('SEARCH')
};
export default TYPES;

View File

@ -1,13 +1,86 @@
export async function directory(dir = '/') {
let storage = navigator.getDeviceStorage('sdcard');
let root = await storage.getRoot();
import { type } from 'utils';
if (dir === '/' || !dir) return root;
let SD_CACHE;
export function sdcard() {
if (SD_CACHE) return SD_CACHE;
return await root.get(dir);
SD_CACHE = navigator.getDeviceStorage('sdcard');
return SD_CACHE;
}
let ROOT_CACHE;
export async function root() {
if (ROOT_CACHE) return ROOT_CACHE;
ROOT_CACHE = await sdcard().getRoot();
return ROOT_CACHE;
}
export async function getFile(dir = '/') {
let parent = await root();
if (dir === '/' || !dir) return root();
return await parent.get(dir);
}
export async function children(dir) {
let parent = await directory(dir);
let parent = await getFile(dir);
return await parent.getFilesAndDirectories();
}
export async function readFile(path) {
let file = await getFile(path);
return new Promise((resolve, reject) => {
let reader = new FileReader();
reader.onload = () => {
resolve(reader.result);
};
reader.onerror = reject;
reader.onabort = reject;
reader.readAsArrayBuffer(file);
});
}
export async function createFile(...args) {
let parent = await root();
return await parent.createFile(...args);
}
export async function createDirectory(...args) {
let parent = await root();
return await parent.createDirectory(...args);
}
export async function rename(file, newName) {
console.log(file);
let path = (file.path || '').slice(1); // remove starting slash
let oldPath = (path + file.name);
let newPath = path + newName;
let target = await getFile(oldPath);
if (type(target) === 'Directory') {
await createDirectory(newPath);
let childs = await target.getFilesAndDirectories();
for (let child of childs) {
await rename(child, newPath + '/' + child.name);
}
target.delete();
return;
} else {
let content = await readFile(fullpath);
let blob = new Blob([content], {type: target.type});
sdcard().delete(fullpath);
sdcard().addNamed(blob, path + newName);
}
}

View File

@ -0,0 +1,53 @@
import React, { Component } from 'react';
import { connect } from 'react-redux';
import changedir from 'actions/changedir';
import { bind } from 'store';
@connect(props)
export default class Breadcrumb extends Component {
render() {
let directories = this.props.cwd.split('/');
directories.unshift('sdcard');
let els = directories.map((dir, index, arr) => {
let path = arr.slice(1, index + 1).join('/');
let slash = index > 0 ? '/' : '';
return (
<span key={index} onClick={bind(changedir(path))}>
<i>{slash}</i>{dir}
</span>
);
});
let lastDirectories = this.props.lwd.split('/');
if (lastDirectories.length > directories.length - 1) {
lastDirectories.splice(0, directories.length - 1);
let history = lastDirectories.map((dir, index, arr) => {
let current = directories.slice(1).concat(arr.slice(0, index + 1));
let path = current.join('/');
return (
<span key={directories.length + index} className='history' onClick={bind(changedir(path))}>
<i>/</i>{dir}
</span>
)
});
els = els.concat(history);
}
return (
<div className='breadcrumb'>
{els}
</div>
);
}
}
function props(state) {
return {
lwd: state.get('lwd'), // last working directory
cwd: state.get('cwd')
}
}

View File

@ -0,0 +1,28 @@
import React, { Component } from 'react';
export default class Dialog extends Component {
render() {
let conditionalInput = this.props.input ? <input ref='input' /> : '';
let buttons = this.props.buttons.map((button, i) => {
return <button className={button.className + ' btn'} key={i}
onClick={button.action.bind(this)}>
{button.text}
</button>;
});
let className = this.props.active ? 'dialog active' : 'dialog';
return (
<div className={className}>
<p className='regular-medium'>{this.props.title}</p>
<p className='light-medium'>{this.props.description}</p>
{conditionalInput}
<div className='foot'>
{buttons}
</div>
</div>
)
}
}

View File

@ -0,0 +1,39 @@
import React, { Component } from 'react';
import changedir from 'actions/changedir';
import { show } from 'actions/menu';
import { active } from 'actions/file';
import { MENU_WIDTH } from './menu';
import store from 'store';
const MENU_TOP_SPACE = 20;
export default class Directory extends Component {
render() {
return (
<div className='directory' ref='container'
onClick={this.peek.bind(this)}
onContextMenu={this.contextMenu.bind(this)}>
<i></i>
<p>{this.props.name}</p>
</div>
);
}
peek() {
let file = store.getState().get('files')[this.props.index];
store.dispatch(changedir(file.path.slice(1) + file.name));
}
contextMenu(e) {
e.preventDefault();
let rect = React.findDOMNode(this.refs.container).getBoundingClientRect();
let {x, y, width, height} = rect;
let left = x + width / 2 - MENU_WIDTH / 2,
top = y + height / 2 + MENU_TOP_SPACE;
store.dispatch(show('directoryMenu', left, top));
store.dispatch(active(this.props.index));
}
}

View File

@ -1,6 +1,7 @@
import React, { Component } from 'react';
import { connect } from 'react-redux';
import File from './file';
import Directory from './directory';
@connect(props)
export default class FileList extends Component {
@ -9,14 +10,18 @@ export default class FileList extends Component {
}
render() {
let { cwd, files } = this.props;
let { files } = this.props;
let els = files.map((file, index) => {
return <File key={index} index={index} name={file.name} />;
if (fileType(file) === 'File') {
return <File key={index} index={index} name={file.name} />;
} else {
return <Directory key={index} index={index} name={file.name} />
}
});
return (
<div><strong>cwd: {cwd}</strong>
<div className='file-list'>
{els}
</div>
);
@ -25,7 +30,6 @@ export default class FileList extends Component {
function props(state) {
return {
cwd: state.get('cwd'),
files: state.get('files')
}
}
@ -36,3 +40,7 @@ async function getFiles(dir) {
return await root.getFilesAndDirectories();
}
function fileType(file) {
return Object.prototype.toString.call(file).slice(8, -1);
}

View File

@ -1,20 +1,35 @@
import React, { Component } from 'react';
import { show } from 'actions/menu';
import { active } from 'actions/file';
import { MENU_WIDTH } from './menu';
import store from 'store';
import changedir from 'actions/changedir';
const MENU_TOP_SPACE = 20;
export default class File extends Component {
constructor() {
super();
}
render() {
return (
<div onClick={this.peekInside.bind(this)}>
<p>{this.props.index}. {this.props.name}</p>
<div className='file' ref='container'
onContextMenu={this.contextMenu.bind(this)}>
<i></i>
<p>{this.props.name}</p>
</div>
);
}
peekInside() {
let file = store.getState().get('files')[this.props.index];
contextMenu(e) {
e.preventDefault();
console.log(file);
store.dispatch(changedir(file.path.slice(1) + file.name));
let rect = React.findDOMNode(this.refs.container).getBoundingClientRect();
let {x, y, width, height} = rect;
let left = x + width / 2 - MENU_WIDTH / 2,
top = y + height / 2 + MENU_TOP_SPACE;
store.dispatch(show('fileMenu', left, top));
store.dispatch(active(this.props.index));
}
}

View File

@ -0,0 +1,18 @@
import React, { Component } from 'react';
import { toggle } from 'actions/navigation';
import store from 'store';
export default class Header extends Component {
render() {
return (
<header>
<button className='drawer' onClick={this.toggleNavigation.bind(this)}></button>
<h1 className='regular-medium'>Hawk</h1>
</header>
);
}
toggleNavigation() {
store.dispatch(toggle());
}
}

21
src/js/components/menu.js Normal file
View File

@ -0,0 +1,21 @@
import React, { Component } from 'react';
export const MENU_WIDTH = 245;
export default class Menu extends Component {
render() {
let { items, active, style } = this.props;
items = items || [];
let els = items.map((item, index) => {
return <li key={index} onClick={item.action.bind(this)}>{item.name}</li>
});
let className = 'menu ' + (active ? 'active' : '');
return (
<div className={className} style={style}>
<ul>{els}</ul>
</div>
);
}
}

View File

@ -0,0 +1,43 @@
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { hide } from 'actions/navigation';
@connect(props)
export default class Navigation extends Component {
render() {
return (
<nav className={this.props.active ? 'active' : ''}>
<i onClick={this.hide.bind(this)} />
<p>Filter</p>
<ul>
<li>Picture</li>
<li>Video</li>
<li>Audio</li>
</ul>
<p>Tools</p>
<ul>
<li>FTP Browser</li>
</ul>
<p>Preferences</p>
<ul>
<li>Show Hidden Files <input type='checkbox' /></li>
<li>Show Directories First <input type='checkbox' /></li>
<li>Advanced Preferences</li>
</ul>
</nav>
);
}
hide() {
this.props.dispatch(hide());
}
}
function props(store) {
return {
active: store.get('navigation')
}
}

View File

@ -1,18 +1,46 @@
import React, { Component } from 'react'
import FileList from 'components/file-list';
import Navigation from 'components/navigation';
import Header from 'components/header';
import Breadcrumb from 'components/breadcrumb';
import Toolbar from 'components/toolbar';
import Menu from 'components/menu';
import Dialog from 'components/dialog';
import { connect } from 'react-redux';
import { hideAll } from 'actions/menu';
import changedir from 'actions/changedir';
import store from 'store';
window.store = store;
window.changedir = changedir;
let FileMenu = connect(state => state.get('fileMenu'))(Menu);
let DirectoryMenu = connect(state => state.get('directoryMenu'))(Menu);
let RenameDialog = connect(state => state.get('renameDialog'))(Dialog);
export default class Root extends Component {
render() {
return (
<div>
Hawk!
<div onTouchStart={this.touchStart.bind(this)}>
<Header />
<Breadcrumb />
<Navigation />
<FileList />
<Toolbar />
<FileMenu />
<DirectoryMenu />
<RenameDialog />
</div>
);
}
touchStart(e) {
if (!e.target.closest('.menu')) {
store.dispatch(hideAll());
}
}
}

View File

@ -0,0 +1,26 @@
import React, { Component } from 'react';
import { create, share } from 'actions/file';
import { toggle as toggleView, refresh } from 'actions/files-view';
import { bind } from 'store';
export default class Toolbar extends Component {
render() {
return (
<div className='toolbar'>
<button className='icon-plus' onClick={this.newFile} />
<button className='icon-view' onClick={bind(toggleView())} />
<button className='icon-refresh' onClick={bind(refresh())} />
<button className='icon-share' onClick={bind(share())} />
<button className='icon-more' onClick={this.showMore} />
</div>
);
}
showMore() {
}
newFile() {
}
}

48
src/js/dialogs.js Normal file
View File

@ -0,0 +1,48 @@
import React from 'react';
import { hide, hideAll } from 'actions/dialog';
import { rename, deleteFile } from 'actions/file';
import store, { bind } from 'store';
export default {
renameDialog: {
title: 'Rename',
description: 'Enter your desired new name',
input: true,
buttons: [
{
text: 'Cancel',
action: bind(hideAll())
},
{
text: 'Rename',
action() {
let input = React.findDOMNode(this.refs.input);
let activeFile = store.getState().get('activeFile');
this.props.dispatch(rename(activeFile, input.value))
this.props.dispatch(hideAll());
},
className: 'success'
}
]
},
deleteDialog: {
title: 'Delete',
description: 'Are you sure you want to remove @activeFile.name?',
buttons: [
{
text: 'No',
action: bind(hideAll())
},
{
text: 'Yes',
action() {
let activeFile = store.getState().get('activeFile');
this.props.dispatch(deleteFile(activeFile));
this.props.dispatch(hideAll());
},
className: 'success'
}
]
}
}

27
src/js/menus.js Normal file
View File

@ -0,0 +1,27 @@
import { hideAll } from 'actions/menu';
import { show } from 'actions/dialog';
import store from 'store';
const entryMenu = {
items: [
{
name: 'Rename',
action() {
store.dispatch(hideAll());
store.dispatch(show('renameDialog'));
}
},
{
name: 'Delete',
action() {
store.dispatch(hideAll());
store.dispatch(show('deleteDialog'))
}
}
]
};
export default {
fileMenu: Object.assign({}, entryMenu),
directoryMenu: Object.assign({}, entryMenu)
}

View File

@ -0,0 +1,9 @@
import { ACTIVE_FILE } from 'actions/types';
export default function(state = -1, action) {
if (action.type === ACTIVE_FILE) {
return action.file;
}
return state;
}

View File

@ -1,10 +1,23 @@
import Immutable from 'immutable';
import cwd from './cwd';
import lwd from './lwd';
import files from './files';
import navigation from './navigation';
import activeFile from './active-file';
import menu from './menu';
import dialog from './dialog';
export default function(state = new Immutable.Map(), action) {
console.log('action', action);
return new Immutable.Map({
lwd: lwd(state, action), // last working directory
cwd: cwd(state.get('cwd'), action),
files: files(state.get('files'), action)
files: files(state.get('files'), action),
activeFile: activeFile(state.get('activeFile'), action),
navigation: navigation(state.get('navigation'), action),
fileMenu: menu(state, action, 'fileMenu'),
directoryMenu: menu(state, action, 'directoryMenu'),
renameDialog: dialog(state, action, 'renameDialog'),
deleteDialog: dialog(state, action, 'deleteDialog')
});
}

View File

@ -1,16 +1,22 @@
import { CHANGE_DIRECTORY } from 'actions/types';
import { CHANGE_DIRECTORY, REFRESH } from 'actions/types';
import listFiles from 'actions/list-files';
import { children } from 'api/files';
import store from 'store';
export default function(state = '/', action) {
switch (action.type) {
case CHANGE_DIRECTORY:
children(action.dir).then(files => {
store.dispatch(listFiles(files));
});
return action.dir;
default:
return state;
export default function(state = '', action) {
if (action.type === CHANGE_DIRECTORY) {
children(action.dir).then(files => {
store.dispatch(listFiles(files));
});
return action.dir;
}
if (action.type === REFRESH) {
children(state).then(files => {
store.dispatch(listFiles(files));
});
return state;
}
return state;
}

22
src/js/reducers/dialog.js Normal file
View File

@ -0,0 +1,22 @@
import { DIALOG } from 'actions/types';
import Immutable from 'immutable';
export default function(state = new Immutable.Map({}), action, id) {
if (action.type === DIALOG) {
// action applied to all dialogs
if (!action.id) {
return Object.assign({}, state.get(id), {active: action.active});
}
if (action.id !== id) return state.get(id);
let target = state.get(action.id);
let active = action.active === 'toggle' ? !target.get('active') : action.active;
let style = Object.assign({}, state.style, {left: action.x, top: action.y});
return Object.assign({}, target, { style, active });
} else {
return state.get(id);
}
}

View File

@ -1,10 +1,29 @@
import { LIST_FILES } from 'actions/types';
import { LIST_FILES, RENAME_FILE, DELETE_FILE } from 'actions/types';
import { refresh } from 'actions/files-view';
import { rename, sdcard } from 'api/files';
export default function(state = [], action) {
switch (action.type) {
case LIST_FILES:
return action.files;
default:
return state;
if (action.type === LIST_FILES) {
return action.files;
}
if (action.type === RENAME_FILE) {
let file = state[action.file];
rename(file, action.name).then(refresh);
return state;
}
if (action.type === DELETE_FILE) {
let file = state[action.file];
sdcard().delete((file.path || '') + '/' + file.name);
let copy = state.slice(0);
copy.splice(action.file, 1);
return copy;
}
return state;
}

8
src/js/reducers/lwd.js Normal file
View File

@ -0,0 +1,8 @@
import { CHANGE_DIRECTORY } from 'actions/types';
export default function(state = '', action) {
if (action.type === CHANGE_DIRECTORY) {
return state.get('cwd');
}
return state.get('lwd');
}

22
src/js/reducers/menu.js Normal file
View File

@ -0,0 +1,22 @@
import { MENU } from 'actions/types';
import Immutable from 'immutable';
export default function(state = new Immutable.Map({}), action, id) {
if (action.type === MENU) {
// action applied to all menus
if (!action.id) {
return Object.assign({}, state.get(id), {active: action.active});
}
if (action.id !== id) return state.get(id);
let target = state.get(action.id);
let active = action.active === 'toggle' ? !target.get('active') : action.active;
let style = Object.assign({}, state.style, {left: action.x, top: action.y});
return Object.assign({}, target, { style, active });
} else {
return state.get(id);
}
}

View File

@ -0,0 +1,9 @@
import { NAVIGATION, TOGGLE } from 'actions/types';
export default function(state = false, action) {
if (action.type === NAVIGATION) {
return action.active === TOGGLE ? !state : action.active;
}
return state;
}

View File

@ -2,13 +2,19 @@ import { createStore } from 'redux';
import reducers from 'reducers/all';
import changedir from 'actions/changedir';
import Immutable from 'immutable';
import menus from './menus';
import dialogs from './dialogs';
const DEFAULT = new Immutable.Map({
dir: '/',
const DEFAULT = new Immutable.Map(Object.assign({
dir: '',
files: []
});
}, dialogs, menus));
let store = createStore(reducers, DEFAULT);
store.dispatch(changedir(DEFAULT.dir));
store.dispatch(changedir(DEFAULT.get('dir')));
export function bind(action) {
return () => store.dispatch(action);
}
export default store;

3
src/js/utils.js Normal file
View File

@ -0,0 +1,3 @@
export function type(obj) {
return Object.prototype.toString.call(obj).slice(8, -1);
}

View File

@ -0,0 +1,8 @@
@import 'entries';
@import 'header';
@import 'menu';
@import 'navigation';
@import 'toolbar';
@import 'breadcrumb';
@import 'file-list';
@import 'dialog';

View File

@ -0,0 +1,26 @@
.breadcrumb {
display: flex;
flex: 1;
align-items: center;
width: 100vw;
height: 3.5rem;
padding: 8px;
box-sizing: border-box;
.light-medium;
background: @light-gray;
border-bottom: 1px solid @dark-transparent;
i {
margin: 0 2px;
}
span.history {
color: @overlay;
}
}

View File

@ -0,0 +1,62 @@
.dialog {
display: flex;
flex-flow: column;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 335px;
height: auto;
padding: 1.5rem 1.7rem;
background: white;
.shadow-bottom;
z-index: 3;
transition: opacity 0.5s ease;
opacity: 0;
pointer-events: none;
&.active {
opacity: 1;
pointer-events: all;
}
p:first-of-type {
margin: 0 0 2.5rem;
}
p {
margin: 0 0 2rem;
}
input {
margin-bottom: 2rem;
}
.foot {
display: flex;
justify-content: space-between;
button {
flex: 1;
margin: 0 8px;
&:first-of-type {
margin-left: 0;
}
&:last-of-type {
margin-right: 0;
}
}
}
}

View File

@ -0,0 +1,26 @@
.file, .directory {
display: flex;
flex-flow: row;
align-items: center;
padding: 1.4rem;
width: 100%;
.light-big;
box-sizing: border-box;
border-bottom: 1px solid @dark-separator;
i {
margin-right: 1.4rem;
}
}
.directory i {
.icon-directory;
}
.file i {
.icon-file;
}

View File

@ -0,0 +1,6 @@
.file-list {
height: ~'calc(100vh - 13.5rem)';
overflow-x: hidden;
overflow-y: auto;
}

View File

@ -0,0 +1,44 @@
header {
display: flex;
flex: 1;
flex-flow: row;
align-items: center;
width: 100%;
height: 5rem;
background: @dark;
color: white;
.shadow;
h1 {
margin-left: -3rem;
}
button {
background: none;
border: none;
width: 8rem;
height: 2rem;
&::before {
content: '';
display: block;
width: 2rem;
height: 4px;
margin-top: -9px;
border-radius: 4px;
background: @overlay;
box-shadow: 0 7px 0 @overlay,
0 14px 0 @overlay;
}
}
}

View File

@ -0,0 +1,43 @@
.menu {
width: 24.5rem;
position: fixed;
left: 0;
top: 0;
background: white;
border-radius: @radius;
pointer-events: none;
opacity: 0;
transition: opacity 0.5s ease;
.shadow-bottom;
&.active {
opacity: 1;
pointer-events: all;
}
ul {
list-style: none;
padding: 0 15px;
}
li {
margin: 0;
padding: 1.3rem 8px;
border-bottom: 1px solid @dark-separator;
&:last-of-type {
border-bottom: none;
}
}
}

View File

@ -0,0 +1,77 @@
nav {
display: flex;
flex-flow: column;
position: fixed;
left: -70vw;
top: 0;
width: 70vw;
height: 100vh;
background: @dark;
color: white;
box-shadow: 1px 0 5px @dark-transparent;
z-index: 6;
transition: left 0.5s ease;
&.active {
left: 0;
i {
pointer-events: all;
opacity: 0.99;
}
}
p {
margin-left: 1.6rem;
.regular-medium;
}
ul {
list-style: none;
padding-left: 0;
}
li {
.light-medium;
padding: 1rem 0 1rem 3rem;
border-bottom: 1px solid @bright-separator;
&:first-of-type {
padding-top: 0;
}
&:last-of-type {
padding-bottom: 0;
border-bottom: none;
}
}
i {
display: block;
position: fixed;
left: 0;
top: 0;
pointer-events: none;
width: 100vw;
height: 100vh;
background: rgba(0, 0, 0, 0.55);
opacity: 0;
z-index: -1;
transition: opacity 0.5s ease;
}
}

View File

@ -0,0 +1,14 @@
.toolbar {
display: flex;
flex-flow: row;
align-items: center;
justify-content: space-around;
align-self: flex-end;
width: 100vw;
height: 5rem;
box-sizing: border-box;
background: @light-gray;
}

52
src/less/icons.less Normal file
View File

@ -0,0 +1,52 @@
.icon {
display: block;
}
.icon-directory {
.icon;
background: url(/img/Directory.svg) no-repeat;
width: 36px;
height: 32px;
}
.icon-file {
.icon;
background: url(/img/File.svg) no-repeat;
width: 30px;
height: 36px;
}
.icon-plus {
.icon;
background: url(/img/Plus.svg) no-repeat;
width: 24px;
height: 24px;
}
.icon-view {
.icon;
background: url(/img/View.svg) no-repeat;
width: 24px;
height: 24px;
}
.icon-refresh {
.icon;
background: url(/img/Refresh.svg) no-repeat;
width: 26px;
height: 28px;
}
.icon-share {
.icon;
background: url(/img/Share.svg) no-repeat;
width: 25px;
height: 27px;
}
.icon-more {
.icon;
background: url(/img/More.svg) no-repeat;
width: 6px;
height: 24px;
}

View File

@ -0,0 +1,27 @@
@import 'variables';
@import 'icons';
@import 'styles/all';
@import 'components/all';
html, body {
margin: 0;
font-family: Fira Sans;
font-weight: regular;
box-sizing: border-box;
}
html {
font-size: 10px;
min-height: 100vh;
}
body {
font-size: 1.6rem;
display: flex;
flex-flow: column;
}

4
src/less/styles/all.less Normal file
View File

@ -0,0 +1,4 @@
@import 'texts';
@import 'shadows';
@import 'buttons';
@import 'forms';

View File

@ -0,0 +1,21 @@
button {
border: none;
background: none;
}
.btn {
padding: 6px 3rem;
border: 1px solid @gray;
border-radius: @radius;
.light-medium;
background: @light-gray;
color: @dark;
&.success {
background: @success;
}
}

View File

@ -0,0 +1,15 @@
input {
border: 1px solid @gray;
background: @light-gray;
border-radius: 4px;
height: 32px;
box-sizing: border-box;
padding: 5px 1rem;
.light-medium;
}

View File

@ -0,0 +1,7 @@
.shadow-bottom {
box-shadow: 0 1px 2px @dark-transparent;
}
.shadow {
box-shadow: 0 0 4px @dark-transparent;
}

View File

@ -0,0 +1,31 @@
.regular-medium {
font-weight: normal;
}
.regular-medium {
font-size: 1.8rem;
}
.light-medium, .light-big, .light-small {
font-weight: @light;
}
.light-medium {
font-size: 1.6rem;
}
.light-big {
font-size: 1.8rem;
}
.light-small {
font-size: 1.3rem;
}
.thin-small {
font-weight: @thin;
}
.thin-small {
font-size: 1.4rem;
}

View File

@ -1 +1,23 @@
@
@dark: #39393A;
@green: #5EBEC2;
@overlay: #9B9B93;
@light-gray: #F8F8F8;
@gray: #F0F0F0;
@background: #FAFAFA;
@blue: #63B0CD;
@success: #B8E986;
@bright-separator: rgba(255, 255, 255, 0.1);
@dark-separator: rgba(0, 0, 0, 0.1);
@dark-transparent: rgba(0, 0, 0, 0.2);
@bright-transparent: rgba(0, 0, 0, 0.2);
// Font Weights
@regular: normal;
@light: 200;
@thin: 100;
@radius: 4px;

View File

@ -15,10 +15,10 @@
},
"type": "privileged",
"permissions": {
"device-storage:sdcard": {"access": "readwrite"},
"device-storage:videos": {"access": "readwrite"},
"device-storage:pictures": {"access": "readwrite"},
"device-storage:music": {"access": "readwrite"},
"device-storage:sdcard": {"access": "readwrite"},
"device-storage:apps": {"access": "readwrite"},
"webapps-manage": {}
},

View File

@ -1,202 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2014 Mozilla Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -1,68 +0,0 @@
# Privileged empty app
This is a privileged empty app template that provides you with a barebones structure for you to build your app.
This is part of the [mortar](https://github.com/mozilla/mortar/) template collection for building [Open Web Apps](https://developer.mozilla.org/Apps).
## Obtaining
There are a few ways to get this template:
If you use [Git](http://www.git-scm.com/):
````bash
git clone https://github.com/mozilla/mortar-privileged-empty-app.git
````
Or download the latest version in this [ZIP file](https://github.com/mozilla/mortar-privileged-empty-app/archive/master.zip).
## Usage
Import the app into the [App Manager](https://developer.mozilla.org/Firefox_OS/Using_the_App_Manager). Then you can run it in the simulator, or in a Firefox OS device.
## Code walkthrough
The `manifest.webapp` file contains metadata about the app, such as its name, description, icon and required permissions for running under Firefox OS.
Moving over to `index.html`, this is the starting point for the app when it's launched, and also where the layout is defined and the JavaScript files with the functionality and logic are loaded.
The appearance is defined in `css/app.css`. There are just some very basic rules.
We define the app's behaviour in `js/app.js`. Right now we're just basically displaying a "Hello world" message.
Finally we are also including `js/libs/l10n.js`, which contains [L10n](https://developer.mozilla.org/en-US/docs/Web/API/L10n_API), a library for translating the strings in the app. Using this library, users can run the app in their own language, as long as you provide the translations for those languages. We're currently including a translation to Spanish as an example, but feel free to contribute with more translations in `data/locales.ini`, looking at `data/es.properties` and `data/en-US.properties` to see the syntax in action. The way it works, it will automatically translate the HTML elements that contain a `data-l10n-id` attribute with the translation identifier.
For any dynamically shown content, you need to use the `navigator.webL10n.get` function, but since that is slightly tedious to write each time, we're aliasing it to just `translate`:
```javascript
var translate = navigator.mozL10n.get;
```
## Getting help
If you find something that doesn't quite work as you'd expect, we'd appreciate if you [filed a bug](https://github.com/mozilla/mortar-privileged-empty-app/issues)!
We need your help in order to help you. Therefore:
1. Tell us which version of the template are you using. Where did you get the code from?
* Specify the environment where the bug occurs i.e. which version of the Simulator or Firefox OS device. An example would be `1.2 simulator` or `Boot2Gecko 1.4.0.0`.
* Describe the problem in detail. What were you doing? What happened? What did you expect to happen?
* Probably also provide a test case so we can see what is happening and try to reproduce the error.
Ultimately it all boils down to the fact that if we can't reproduce it, we can't help you or fix it either.
## Contributing
Contributions are always welcome! If you want to collaborate, whether that is with a new feature or fixing a bug, we recommend you...
1. Have a look at the [issue tracker](https://github.com/mozilla/mortar-privileged-empty-app/issues) first--to make sure there isn't anyone working on that already.
* If it's a new issue/feature, or no one is working on it already, fork the project in GitHub (you'll need an account if you don't have it yet).
* Create the bug to let us know you want to work on this. That way we are aware of and can keep an eye on it, or maybe tell you that it is not a bug but an intended feature, and save you the hassle of working on something that is not needed.
* Clone your fork to your computer (i.e. get the code onto your computer)
* Make a new branch, and switch to that new branch
* Do the changes you deem necessary
* Push the branch to GitHub
* Send a pull request
To make your changes as easy to merge back onto the project as possible, you should only work on one feature per branch. That makes code review simpler and faster!

View File

@ -1,18 +0,0 @@
html, body {
margin: 0;
padding: 0.5rem;
}
body {
font-size: 1rem;
background: #fff;
}
h1 {
margin: 0 0 1rem 0;
}
p {
font-size: inherit;
}

View File

@ -1,106 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:sketch="http://www.bohemiancoding.com/sketch/ns"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="128px"
height="128px"
viewBox="0 0 128 128"
version="1.1"
id="svg2"
inkscape:version="0.48.2 r9819"
sodipodi:docname="icon.svg">
<metadata
id="metadata14">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1142"
inkscape:window-height="849"
id="namedview12"
showgrid="false"
inkscape:zoom="1.84375"
inkscape:cx="-32.542373"
inkscape:cy="64"
inkscape:window-x="672"
inkscape:window-y="146"
inkscape:window-maximized="0"
inkscape:current-layer="Page-1" />
<!-- Generator: Sketch 3.0.2 (7799) - http://www.bohemiancoding.com/sketch -->
<title
id="title4">empty</title>
<description
id="description6">Created with Sketch.</description>
<defs
id="defs8">
<linearGradient
id="linearGradient3761">
<stop
style="stop-color:#4e748b;stop-opacity:1;"
offset="0"
id="stop3763" />
<stop
style="stop-color:#393e3f;stop-opacity:1;"
offset="1"
id="stop3765" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3761"
id="linearGradient3767"
x1="129.66949"
y1="65.8983"
x2="129.66949"
y2="188.59828"
gradientUnits="userSpaceOnUse" />
</defs>
<path
sodipodi:type="arc"
style="fill:url(#linearGradient3767);fill-opacity:1;fill-rule:evenodd;stroke:none"
id="path2991"
sodipodi:cx="129.35593"
sodipodi:cy="128.27118"
sodipodi:rx="63.18644"
sodipodi:ry="63.18644"
d="m 192.54237,128.27118 a 63.18644,63.18644 0 1 1 -126.372883,0 63.18644,63.18644 0 1 1 126.372883,0 z"
transform="translate(-65.355927,-64.271179)" />
<g
id="Page-1"
sketch:type="MSPage"
transform="matrix(0.9,0,0,0.9,6.4,6.4)"
style="fill:none;stroke:none">
<circle
id="empty"
sketch:type="MSShapeGroup"
cx="64"
cy="64"
r="58"
sodipodi:cx="64"
sodipodi:cy="64"
sodipodi:rx="58"
sodipodi:ry="58"
style="stroke:#bcc6c5;stroke-width:11;stroke-linecap:round;stroke-dasharray:20, 20;fill:none;fill-opacity:1"
d="M 122,64 C 122,96.032515 96.032515,122 64,122 31.967485,122 6,96.032515 6,64 6,31.967485 31.967485,6 64,6 c 32.032515,0 58,25.967485 58,58 z" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 804 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -1,48 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Privileged app</title>
<meta name="description" content="A privileged app stub">
<!--
viewport allows you to control how mobile browsers will render your content.
width=device-width tells mobile browsers to render your content across the
full width of the screen, without being zoomed out (by default it would render
it at a desktop width, then shrink it to fit.)
Read more about it here:
https://developer.mozilla.org/Mozilla/Mobile/Viewport_meta_tag
-->
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="css/app.css">
<!--
Inline JavaScript code is not allowed for privileged and certified apps,
due to Content Security Policy restrictions.
You can read more about it here: https://developer.mozilla.org/Apps/CSP
Plus keeping your JavaScript separated from your HTML is always a good practice!
We're also using the 'defer' attribute. This allows us to tell the browser that
it should not wait for this file to load before continuing to load the rest of
resources in the page. Then, once everything has been loaded, it will parse and
execute the deferred files.
Read about defer: https://developer.mozilla.org/Web/HTML/Element/script#attr-defer
-->
<script type="text/javascript" src="js/app.js" defer></script>
<!--
The following two lines are for loading the localisations library
and the localisation data-so people can use the app in their
own language (as long as you provide translations).
-->
<link rel="prefetch" type="application/l10n" href="data/locales.ini" />
<script type="text/javascript" src="js/libs/l10n.js" defer></script>
</head>
<body>
<section>
<h1 data-l10n-id="app_title">Privileged empty app</h1>
<p data-l10n-id="app_description">This app is empty. Fill it with your own stuff!</p>
<p id="message"></p>
</section>
</body>
</html>

View File

@ -1,29 +0,0 @@
// DOMContentLoaded is fired once the document has been loaded and parsed,
// but without waiting for other external resources to load (css/images/etc)
// That makes the app more responsive and perceived as faster.
// https://developer.mozilla.org/Web/Reference/Events/DOMContentLoaded
window.addEventListener('DOMContentLoaded', function() {
// We'll ask the browser to use strict code to help us catch errors earlier.
// https://developer.mozilla.org/Web/JavaScript/Reference/Functions_and_function_scope/Strict_mode
'use strict';
var translate = navigator.mozL10n.get;
// We want to wait until the localisations library has loaded all the strings.
// So we'll tell it to let us know once it's ready.
navigator.mozL10n.once(start);
// ---
function start() {
var message = document.getElementById('message');
// We're using textContent because inserting content from external sources into your page using innerHTML can be dangerous.
// https://developer.mozilla.org/Web/API/Element.innerHTML#Security_considerations
message.textContent = translate('message');
}
});

File diff suppressed because it is too large Load Diff

View File

@ -1,29 +0,0 @@
{
"version": "0.1.0",
"name": "Hawk",
"description": "A template with the bare minimum structure",
"launch_path": "/index.html",
"icons": {
"16": "/img/icons/icon16x16.png",
"48": "/img/icons/icon48x48.png",
"60": "/img/icons/icon60x60.png",
"128": "/img/icons/icon128x128.png"
},
"developer": {
"name": "Your name",
"url": "http://example.com"
},
"type": "privileged",
"permissions": {},
"installs_allowed_from": [
"*"
],
"locales": {
"es": {
"name": "Aplicación vacía privilegiada",
"description": "Una plantilla con la mínima estructura",
"permissions": {}
}
},
"default_locale": "en"
}