diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000000000000000000000000000000000..d9f5985b38a1a7bed21654eb1178b3412c73106f --- /dev/null +++ b/.editorconfig @@ -0,0 +1,30 @@ +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 4 + +[{*.mod, *.dtd, *.ent, *.elt}] +indent_style = space +indent_size = 2 + +[{*.jhm, *.rng, *.wsdl, *.fxml, *.xslt, *.jrxml, *.ant, *.xul, *.xsl, *.xsd, *.tld, *.jnlp, *.xml}] +indent_style = space +indent_size = 2 + +[*.json] +indent_style = space +indent_size = 2 + +[*.java] +indent_style = space +indent_size = 2 + +[{*.kts, *.kt}] +indent_style = space +indent_size = 2 + +[{*.yml, *.yaml}] +indent_style = space +indent_size = 2 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..49ca4c228ed79f9d56056083a5bfcf559e1cd597 --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +*.iml +.gradle +/local.properties +/signing.properties +/.idea/* +!/.idea/copyright/ +.DS_Store +/captures +build/ +/reports/ +/persistence/schemas/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..b6f90900dbaca626aa115d98fed3cdd4b2bd4750 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,80 @@ +image: "k8r.eu/justjanne/android-sdk:f918b1cd" + +cache: + key: "$CI_PROJECT_NAME" + paths: + - ".gradle/caches" + +before_script: + - "export GRADLE_USER_HOME=$(pwd)/.gradle" + - "chmod +x ./gradlew" + + - "echo $SIGNING_KEYSTORE | base64 -d > /root/signing.keystore" + - "echo $SIGNING_PROPERTIES | base64 -d > signing.properties" + +stages: + - "build" + - "deploy" + +test: + stage: "build" + script: + - "./gradlew assembleRelease -x lintRelease -x lintVitalRelease" + - "cp app/build/outputs/apk/release/*.apk ." + - "./gradlew check -x connectedCheck --stacktrace" + artifacts: + paths: + - "*.apk" + - "*/build/test-results/**/TEST-*.xml" + - "*/build/reports/*.xml" + reports: + junit: + - "*/build/test-results/**/TEST-*.xml" + - "*/build/reports/*.xml" + rules: + - if: "$CI_COMMIT_BRANCH == 'main'" + when: on_success + +version: + stage: "build" + script: + - "export VERSION_NAME=$(git describe --abbrev=0 --tags HEAD)" + - "export VERSION_CODE=$(git rev-list --count $VERSION_NAME)" + - "echo \"{\\\"name\\\":\\\"$VERSION_NAME\\\",\\\"code\\\":$VERSION_CODE}\" > version.json" + artifacts: + paths: + - "version.json" + rules: + - if: "$CI_COMMIT_BRANCH == 'main'" + when: on_success + +deploy-local: + stage: "deploy" + image: "k8r.eu/justjanne/docker-s3cmd:latest" + cache: { } + dependencies: + - "test" + - "version" + script: + - "echo $S3_CONFIG | base64 -d > $HOME/.s3cfg" + - "export VERSION=$(ls *.apk)" + - "s3cmd put $VERSION s3://releases/quasseldroid-ng/$VERSION" + - "s3cmd put version.json s3://releases/quasseldroid-ng/version.json" + - "s3cmd cp s3://releases/quasseldroid-ng/$VERSION s3://releases/quasseldroid-ng/Quasseldroid-latest.apk" + rules: + - if: "$CI_COMMIT_BRANCH == 'main' && $S3_CONFIG != ''" + when: on_success + +deploy-beta: + stage: "deploy" + image: "k8r.eu/justjanne/docker-fastlane:latest" + cache: { } + dependencies: + - "test" + script: + - "echo $FASTLANE_CONFIG | base64 -d > $HOME/key.json" + - "export VERSION=$(ls *.apk)" + - "fastlane supply --apk $VERSION --track beta --json_key $HOME/key.json --package_name com.iskrembilen.quasseldroid --skip_upload_metadata=true --skip_upload_images=true --skip_upload_screenshots=true" + rules: + - if: "$CI_COMMIT_BRANCH == 'main' && $FASTLANE_CONFIG != ''" + when: on_success diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000000000000000000000000000000000000..d910a742fb84ecfa68f4c8dfc03fc4685cc17a5d --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,619 @@ +### GNU GENERAL PUBLIC LICENSE + +Version 3, 29 June 2007 + +Copyright (C) 2007 Free Software Foundation, Inc. +<https://fsf.org/> + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + +### 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 \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..1d086e37971caee0ed28869bcdf031d26a656044 --- /dev/null +++ b/README.md @@ -0,0 +1,69 @@ +# [Quasseldroid] + +[](https://github.com/justjanne/Quasseldroid-ng/releases) + +Quassel is a distributed, decentralized IRC client, written using C++ and Qt. Quasseldroid is a +pure-java client for the Quassel core, allowing you to connect to your Quassel core using your +Android™ phone. + +[](https://i.k8r.eu/2G2ToA.png) + +## Build Requirements + +Quasseldroid requires you to have the latest version of gradle installed, and a recent version of +the Android SDK installed (and configured via the environment variable ANDROID_HOME) + +## Building + +The build process uses gradle, `./gradlew assemble` builds all versions. + +Unit tests are supported, and can be run with `./gradlew check` + +To sign your releases, [generate a keypair] and create a file named `signing.properties` with the +following content to let gradle automatically sign your builds. + +``` +storeFile=/path/to/your/keystore/here.keystore +storePassword=passwordofyourkeystorehere +keyAlias=nameofyourkeyhere +keyPassword=passwordofyourkeyhere +``` + +## Authors + +* **Janne Mareike Koschinski** (justJanne) + Rewrite, UI, Annotation Processors, Backend + +## Acknowledgements + +This project was inspired by and is based on [Quasseldroid Legacy] as well as [Quassel]. + +Authors of legacy Quasseldroid: + +* **Frederik M. J. Vestre** (freqmod) + Initial qdatastream deserialization attempts +* **Martin "Java Sucks" Sandsmark** (sandsmark) + Legacy protocol implementation, (de)serializers, project (de)moralizer +* **Magnus Fjell** (magnuf) + Legacy UI +* **Ken Børge Viktil** (Kenji) + Legacy UI + +## License + +> This program is free software: you can redistribute it and/or modify it +> under the terms of the GNU General Public License version 3 as published +> by the Free Software Foundation. + +> 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/>>. + +[Quasseldroid]: https://quasseldroid.info/ +[generate a keypair]: http://developer.android.com/tools/publishing/app-signing.html +[Quasseldroid Legacy]: https://github.com/sandsmark/quasseldroid +[Quassel]: https://quassel-irc.org/ diff --git a/app/build.gradle.kts b/app/build.gradle.kts new file mode 100644 index 0000000000000000000000000000000000000000..ea33625d614d10af42bf1473442a0adc9ccad7c4 --- /dev/null +++ b/app/build.gradle.kts @@ -0,0 +1,83 @@ +/* + * Quasseldroid - Quassel client for Android + * + * Copyright (c) 2019 Janne Mareike Koschinski + * Copyright (c) 2019 The Quassel Project + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 3 as published + * by the Free Software Foundation. + * + * 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/>. + */ + +plugins { + id("justjanne.android.signing") + id("justjanne.android.app") +} + +android { + defaultConfig { + vectorDrawables.useSupportLibrary = true + testInstrumentationRunner = "de.kuschku.quasseldroid.util.TestRunner" + } + + buildTypes { + getByName("release") { + isMinifyEnabled = true + isShrinkResources = true + + multiDexEnabled = false + + proguardFiles( + getDefaultProguardFile("proguard-android.txt"), + "proguard-rules.pro" + ) + } + + getByName("debug") { + applicationIdSuffix = ".debug" + + multiDexEnabled = true + } + } + + buildFeatures { + compose = true + } + + composeOptions { + kotlinCompilerExtensionVersion = libs.versions.androidx.compose.get() + } +} + +dependencies { + implementation(libs.androidx.appcompat) + implementation(libs.androidx.appcompat.resources) + + implementation(libs.androidx.activity) + implementation(libs.androidx.activity.compose) + + implementation(libs.androidx.compose.animation) + implementation(libs.androidx.compose.compiler) + implementation(libs.androidx.compose.foundation) + implementation(libs.androidx.compose.material) + implementation(libs.androidx.compose.runtime) + implementation(libs.androidx.compose.ui) + + implementation(libs.androidx.navigation.compose) + + implementation(libs.libquassel.client) + + implementation(libs.compose.htmltext) + + debugImplementation(libs.androidx.compose.ui.tooling) + implementation(libs.androidx.compose.ui.preview) + testImplementation(libs.androidx.compose.ui.test) +} diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro new file mode 100644 index 0000000000000000000000000000000000000000..88a5604d10dcde1641b3ddb52a41426c6621794a --- /dev/null +++ b/app/proguard-rules.pro @@ -0,0 +1,62 @@ +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in /usr/lib/android-sdk/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the proguardFiles +# directive in build.gradle.kts. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile + +# The project is GPL anyway, obfuscation is useless. +-dontobfuscate + +# Keep our invokers +-keep class * implements de.kuschku.libquassel.quassel.syncables.interfaces.invokers.Invoker { + static ** INSTANCE; +} +-keep class * implements de.kuschku.libquassel.quassel.syncables.interfaces.invokers.InvokerRegistry { + static ** INSTANCE; +} + +# remove unnecessary warnings +# Android HTTP Libs +-dontnote android.net.http.** +-dontnote org.apache.http.** +# Kotlin stuff +-dontnote kotlin.** +# Gson +-dontnote com.google.gson.** +# Dagger +-dontwarn com.google.errorprone.annotations.* +# Retrofit +-dontwarn retrofit2.** +# Annotation used by Retrofit on Java 8 VMs +-dontwarn javax.annotation.Nullable +-dontwarn javax.annotation.ParametersAreNonnullByDefault +-dontwarn javax.annotation.concurrent.GuardedBy +# Retain generic type information for use by reflection by converters and adapters. +-keepattributes Signature +# Retain declared checked exceptions for use by a Proxy instance. +-keepattributes Exceptions +# Okio +-dontwarn okio.** +-dontwarn org.conscrypt.** +# OkHttp3 +-dontwarn okhttp3.** diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000000000000000000000000000000000000..9500fe193331b416a8e88152cad684e03d99ab08 --- /dev/null +++ b/app/src/main/AndroidManifest.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="de.justjanne.quasseldroid"> + + <uses-permission android:name="android.permission.INTERNET" /> + <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> + <uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> + + <application + android:allowBackup="true" + android:icon="@mipmap/ic_launcher" + android:supportsRtl="true"> + <activity + android:name=".MainActivity" + android:exported="true" + android:launchMode="singleTask" + android:windowSoftInputMode="adjustResize" + android:theme="@style/Theme.AppCompat.DayNight.NoActionBar"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <action android:name="android.intent.action.VIEW" /> + + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + <intent-filter> + <action android:name="android.intent.action.SEND" /> + + <category android:name="android.intent.category.DEFAULT" /> + + <data android:mimeType="text/plain" /> + </intent-filter> + <intent-filter> + <action android:name="android.intent.action.VIEW" /> + + <category android:name="android.intent.category.DEFAULT" /> + <category android:name="android.intent.category.BROWSABLE" /> + + <data android:scheme="irc" /> + <data android:scheme="ircs" /> + </intent-filter> + </activity> + + <service + android:name=".service.QuasselService" + android:exported="false" /> + </application> + +</manifest> diff --git a/app/src/main/java/de/justjanne/quasseldroid/MainActivity.kt b/app/src/main/java/de/justjanne/quasseldroid/MainActivity.kt new file mode 100644 index 0000000000000000000000000000000000000000..ecb4779579a1f7856609e437a03cf10c51af51b2 --- /dev/null +++ b/app/src/main/java/de/justjanne/quasseldroid/MainActivity.kt @@ -0,0 +1,46 @@ +package de.justjanne.quasseldroid + +import android.os.Bundle +import androidx.activity.ComponentActivity +import androidx.activity.compose.setContent +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.material.Surface +import androidx.compose.ui.Modifier +import de.justjanne.quasseldroid.service.QuasselBackend +import de.justjanne.quasseldroid.ui.theme.QuasseldroidTheme + +class MainActivity : ComponentActivity() { + private val backend = QuasselBackend() + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + backend.onCreate(this) + setContent { + QuasseldroidTheme { + Surface(modifier = Modifier.fillMaxSize()) { + QuasseldroidRouter(backend = backend) + } + } + } + } + + override fun onStart() { + super.onStart() + backend.onStart(this) + } + + override fun onResume() { + super.onResume() + backend.onResume(this) + } + + override fun onStop() { + super.onStop() + backend.onStop(this) + } + + override fun onDestroy() { + super.onDestroy() + backend.onDestroy(this) + } +} diff --git a/app/src/main/java/de/justjanne/quasseldroid/QuasseldroidRouter.kt b/app/src/main/java/de/justjanne/quasseldroid/QuasseldroidRouter.kt new file mode 100644 index 0000000000000000000000000000000000000000..424550bc32c7e9f6f55783574acb867a08219297 --- /dev/null +++ b/app/src/main/java/de/justjanne/quasseldroid/QuasseldroidRouter.kt @@ -0,0 +1,21 @@ +package de.justjanne.quasseldroid + +import androidx.compose.runtime.Composable +import androidx.navigation.compose.NavHost +import androidx.navigation.compose.composable +import androidx.navigation.compose.rememberNavController +import de.justjanne.quasseldroid.service.QuasselBackend +import de.justjanne.quasseldroid.ui.CoreInfoRoute +import de.justjanne.quasseldroid.ui.HomeView +import de.justjanne.quasseldroid.ui.LoginRoute + +@Composable +fun QuasseldroidRouter(backend: QuasselBackend) { + val navController = rememberNavController() + + NavHost(navController = navController, startDestination = "login") { + composable("login") { LoginRoute(backend, navController) } + composable("home") { HomeView(backend, navController) } + composable("coreInfo") { CoreInfoRoute(backend, navController) } + } +} diff --git a/app/src/main/java/de/justjanne/quasseldroid/sample/SampleConnectedClientProvider.kt b/app/src/main/java/de/justjanne/quasseldroid/sample/SampleConnectedClientProvider.kt new file mode 100644 index 0000000000000000000000000000000000000000..7856d5cd22979e96254912fca7db06990bed8606 --- /dev/null +++ b/app/src/main/java/de/justjanne/quasseldroid/sample/SampleConnectedClientProvider.kt @@ -0,0 +1,31 @@ +package de.justjanne.quasseldroid.sample + +import androidx.compose.ui.tooling.preview.PreviewParameterProvider +import de.justjanne.libquassel.protocol.features.FeatureSet +import de.justjanne.libquassel.protocol.models.ConnectedClient +import org.threeten.bp.Instant + +class SampleConnectedClientProvider : PreviewParameterProvider<ConnectedClient> { + override val values = sequenceOf( + ConnectedClient( + id = 5, + remoteAddress = "192.168.178.1", + location = "Kiel, Germany", + version = "Quasseldroid 1.5.3-gafff49c2", + versionDate = Instant.ofEpochSecond(1645656060L), + connectedSince = Instant.ofEpochSecond(1645656060L), + secure = true, + features = FeatureSet.all() + ), + ConnectedClient( + id = 2, + remoteAddress = "2a01:c22:bd32:4000:c7f:2640:7fcd:ae9c", + location = "Kiel, Germany", + version = "Quasseldroid 1.5.3-gafff49c2", + versionDate = Instant.ofEpochSecond(1645656060L), + connectedSince = Instant.ofEpochSecond(1645656060L), + secure = false, + features = FeatureSet.all() + ) + ) +} diff --git a/app/src/main/java/de/justjanne/quasseldroid/sample/SampleCoreInfoProvider.kt b/app/src/main/java/de/justjanne/quasseldroid/sample/SampleCoreInfoProvider.kt new file mode 100644 index 0000000000000000000000000000000000000000..14ff76de85b8082fc002bdf5328c275aa8a62f48 --- /dev/null +++ b/app/src/main/java/de/justjanne/quasseldroid/sample/SampleCoreInfoProvider.kt @@ -0,0 +1,40 @@ +package de.justjanne.quasseldroid.sample + +import androidx.compose.ui.tooling.preview.PreviewParameterProvider +import de.justjanne.libquassel.protocol.features.FeatureSet +import de.justjanne.libquassel.protocol.models.ConnectedClient +import de.justjanne.libquassel.protocol.syncables.state.CoreInfoState +import org.threeten.bp.Instant + +class SampleCoreInfoProvider : PreviewParameterProvider<CoreInfoState> { + override val values = sequenceOf( + CoreInfoState( + version = "v0.14.0 (git-<a href=\"https://github.com/quassel/quassel/commit/da9c1c9fcf25f9dbd9acb96e6c8d1ff148e55986\">da9c1c9f</a>)", + versionDate = Instant.ofEpochSecond(1645656060L), + startTime = Instant.ofEpochSecond(1645656060L), + connectedClientCount = 2, + connectedClients = listOf( + ConnectedClient( + id = 5, + remoteAddress = "192.168.178.1", + location = "Kiel, Germany", + version = "Quasseldroid <a href=\"https://git.kuschku.de/justJanne/QuasselDroid-ng/-/commit/afff49c2ae4be7717fa75f8c466d4f84b13641b5\">1.5.3-gafff49c2</a>", + versionDate = Instant.ofEpochSecond(1645656060L), + connectedSince = Instant.ofEpochSecond(1645656060L), + secure = true, + features = FeatureSet.all() + ), + ConnectedClient( + id = 2, + remoteAddress = "2a01:c22:bd32:4000:c7f:2640:7fcd:ae9c", + location = "Kiel, Germany", + version = "Quasseldroid <a href=\"https://git.kuschku.de/justJanne/QuasselDroid-ng/-/commit/afff49c2ae4be7717fa75f8c466d4f84b13641b5\">1.5.3-gafff49c2</a>", + versionDate = Instant.ofEpochSecond(1645656060L), + connectedSince = Instant.ofEpochSecond(1645656060L), + secure = false, + features = FeatureSet.all() + ) + ) + ) + ) +} diff --git a/app/src/main/java/de/justjanne/quasseldroid/service/ConnectionData.kt b/app/src/main/java/de/justjanne/quasseldroid/service/ConnectionData.kt new file mode 100644 index 0000000000000000000000000000000000000000..6b0d3344a003e1bc5881603ec65aa606ff053d61 --- /dev/null +++ b/app/src/main/java/de/justjanne/quasseldroid/service/ConnectionData.kt @@ -0,0 +1,9 @@ +package de.justjanne.quasseldroid.service + +import java.net.InetSocketAddress + +data class ConnectionData( + val address: InetSocketAddress, + val username: String, + val password: String +) diff --git a/app/src/main/java/de/justjanne/quasseldroid/service/QuasselBackend.kt b/app/src/main/java/de/justjanne/quasseldroid/service/QuasselBackend.kt new file mode 100644 index 0000000000000000000000000000000000000000..5d8ebb5b0c6caba48b744e146e101da168777f08 --- /dev/null +++ b/app/src/main/java/de/justjanne/quasseldroid/service/QuasselBackend.kt @@ -0,0 +1,102 @@ +package de.justjanne.quasseldroid.service + +import android.content.ComponentName +import android.content.Context +import android.content.ServiceConnection +import android.os.IBinder +import android.util.Log +import de.justjanne.libquassel.client.session.ClientSession +import de.justjanne.libquassel.protocol.util.StateHolder +import de.justjanne.libquassel.protocol.util.flatMap +import de.justjanne.quasseldroid.BuildConfig +import de.justjanne.quasseldroid.service.QuasselService.Companion.quasselService +import de.justjanne.quasseldroid.util.lifecycle.DefaultContextualLifecycleObserver +import de.justjanne.quasseldroid.util.lifecycle.LifecycleStatus +import kotlinx.coroutines.flow.MutableStateFlow + +class QuasselBackend : DefaultContextualLifecycleObserver(), ServiceConnection, + StateHolder<ClientSession?> { + private var connectionData: ConnectionData? = null + + override fun flow() = state.flatMap() + override fun state() = state.value?.state() + private val state = MutableStateFlow<QuasselBinder?>(null) + + override fun onCreate(owner: Context) { + super.onCreate(owner) + connectionData?.let { (address, username, password) -> + Log.d("QuasselBackend", "Starting Quassel Service") + owner.startService(owner.quasselService(address, Pair(username, password))) + } + } + + override fun onStart(owner: Context) { + super.onStart(owner) + connectionData?.let { (address, username, password) -> + Log.d("QuasselBackend", "Binding Quassel Service") + owner.bindService(owner.quasselService(address, Pair(username, password)), this, 0) + } + } + + override fun onStop(owner: Context) { + super.onStop(owner) + Log.d("QuasselBackend", "Unbinding Quassel Service") + owner.unbindService(this) + } + + fun login(context: Context, connectionData: ConnectionData): Boolean { + this.connectionData = connectionData + when (status) { + LifecycleStatus.CREATED -> { + val (address, username, password) = connectionData + Log.d("QuasselBackend", "Starting Quassel Service") + context.startService( + context.quasselService(address, Pair(username, password)) + ) + return true + } + LifecycleStatus.STARTED, LifecycleStatus.RESUMED -> { + val (address, username, password) = connectionData + Log.d("QuasselBackend", "Binding Quassel Service") + context.startService( + context.quasselService(address, Pair(username, password)) + ) + context.bindService( + context.quasselService(address, Pair(username, password)), + this, + 0 + ) + return true + } + else -> { + Log.w("QuasselBackend", "Trying to log in but status is $status") + return false + } + } + } + + fun disconnect(context: Context) { + context.stopService(context.quasselService()) + } + + override fun onServiceConnected(name: ComponentName?, service: IBinder?) { + if (name == quasselService && service is QuasselBinder) { + Log.d("QuasselBackend", "Quassel Service bound") + state.value = service + } else { + Log.w("QuasselBackend", "Unknown Service bound: $name") + } + } + + override fun onServiceDisconnected(name: ComponentName?) { + Log.d("QuasselBackend", "Service unbound: $name") + state.value = null + } + + companion object { + private val quasselService = ComponentName( + BuildConfig.APPLICATION_ID, + QuasselService::class.java.canonicalName!! + ) + } +} diff --git a/app/src/main/java/de/justjanne/quasseldroid/service/QuasselBinder.kt b/app/src/main/java/de/justjanne/quasseldroid/service/QuasselBinder.kt new file mode 100644 index 0000000000000000000000000000000000000000..db890aef00a95a7a0c526d37815565a7208cea01 --- /dev/null +++ b/app/src/main/java/de/justjanne/quasseldroid/service/QuasselBinder.kt @@ -0,0 +1,15 @@ +package de.justjanne.quasseldroid.service + +import android.os.Binder +import de.justjanne.libquassel.client.session.ClientSession +import de.justjanne.libquassel.protocol.util.StateHolder +import kotlinx.coroutines.flow.StateFlow + +class QuasselBinder( + private val state: StateFlow<ClientSession?> +) : Binder(), StateHolder<ClientSession?> { + constructor(runner: QuasselRunner) : this(runner.flow()) + + override fun flow() = state + override fun state() = state.value +} diff --git a/app/src/main/java/de/justjanne/quasseldroid/service/QuasselRunner.kt b/app/src/main/java/de/justjanne/quasseldroid/service/QuasselRunner.kt new file mode 100644 index 0000000000000000000000000000000000000000..e8d8ca7c540af6ea5f22a1bab74d2810c0331c60 --- /dev/null +++ b/app/src/main/java/de/justjanne/quasseldroid/service/QuasselRunner.kt @@ -0,0 +1,75 @@ +package de.justjanne.quasseldroid.service + +import android.util.Log +import de.justjanne.libquassel.client.session.ClientSession +import de.justjanne.libquassel.protocol.connection.ProtocolFeature +import de.justjanne.libquassel.protocol.connection.ProtocolMeta +import de.justjanne.libquassel.protocol.connection.ProtocolVersion +import de.justjanne.libquassel.protocol.features.FeatureSet +import de.justjanne.libquassel.protocol.io.CoroutineChannel +import de.justjanne.libquassel.protocol.util.StateHolder +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.runBlocking +import kotlinx.coroutines.withTimeout +import java.io.Closeable +import java.net.InetSocketAddress +import javax.net.ssl.SSLContext + +class QuasselRunner( + private val address: InetSocketAddress, + private val auth: Pair<String, String> +) : Thread("Quassel Runner"), Closeable, StateHolder<ClientSession?> { + private val channel = CoroutineChannel() + + override fun state(): ClientSession? = state.value + override fun flow(): StateFlow<ClientSession?> = state + + private val state = MutableStateFlow<ClientSession?>(null) + + init { + start() + } + + override fun run() { + runBlocking(Dispatchers.IO) { + Log.d("QuasselRunner", "Resolving URL") + val address = InetSocketAddress(address.hostString, address.port) + Log.d("QuasselRunner", "Connecting") + channel.connect(address) + Log.d("QuasselRunner", "Handshake") + val session = ClientSession( + channel, + ProtocolFeature.all, + listOf( + ProtocolMeta( + ProtocolVersion.Datastream, + 0x0000u + ) + ), + SSLContext.getDefault() + ).also { state.value = it } + session.handshakeHandler.init( + "Quasseltest v0.1", + "2022-02-24", + FeatureSet.all() + ) + val (username, password) = auth + Log.d("QuasselRunner", "Authenticating") + session.handshakeHandler.login(username, password) + Log.d("QuasselRunner", "Waiting for init") + session.baseInitHandler.waitForInitDone() + Log.d("QuasselRunner", "Init Done") + } + } + + override fun close() { + Log.d("QuasselRunner", "Stopping Quassel Runner") + runBlocking(Dispatchers.IO) { + withTimeout(2000L) { + channel.close() + } + } + } +} diff --git a/app/src/main/java/de/justjanne/quasseldroid/service/QuasselService.kt b/app/src/main/java/de/justjanne/quasseldroid/service/QuasselService.kt new file mode 100644 index 0000000000000000000000000000000000000000..7d21c9148c1338d5fb0ce8fdd2232a9018784150 --- /dev/null +++ b/app/src/main/java/de/justjanne/quasseldroid/service/QuasselService.kt @@ -0,0 +1,72 @@ +package de.justjanne.quasseldroid.service + +import android.app.Service +import android.content.Context +import android.content.Intent +import android.os.IBinder +import android.util.Log +import java.net.InetSocketAddress + +class QuasselService : Service() { + private var runner: QuasselRunner? = null + + private fun newRunner(intent: Intent): QuasselRunner { + Log.w("QuasselService", "Creating new quassel runner") + val address = InetSocketAddress.createUnresolved( + requireNotNull(intent.getStringExtra("host")) { + "Required argument 'host' missing" + }, + intent.getIntExtra("port", 4242), + ) + val auth = Pair( + requireNotNull(intent.getStringExtra("username")) { + "Required argument 'username' missing" + }, + requireNotNull(intent.getStringExtra("password")) { + "Required argument 'password' missing" + }, + ) + return QuasselRunner(address, auth) + } + + override fun onCreate() { + Log.d("QuasselService", "Service created") + } + + override fun onDestroy() { + runner?.close() + super.onDestroy() + } + + override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int { + Log.d("QuasselService", "Start Command received") + super.onStartCommand(intent, flags, startId) + if (intent != null && this.runner == null) { + this.runner = newRunner(intent) + } else if (this.runner == null) { + Log.e("QuasselService", "Could not start runner, intent missing") + } + return START_STICKY + } + + override fun onBind(intent: Intent): IBinder { + Log.d("QuasselService", "Binding") + return QuasselBinder(this.runner ?: newRunner(intent).also { runner = it }) + } + + companion object { + fun Context.quasselService( + address: InetSocketAddress, + auth: Pair<String, String> + ) = quasselService().apply { + putExtra("host", address.hostString) + putExtra("port", address.port) + + val (username, password) = auth + putExtra("username", username) + putExtra("password", password) + } + + fun Context.quasselService() = Intent(applicationContext, QuasselService::class.java) + } +} diff --git a/app/src/main/java/de/justjanne/quasseldroid/ui/ConnectedClientCard.kt b/app/src/main/java/de/justjanne/quasseldroid/ui/ConnectedClientCard.kt new file mode 100644 index 0000000000000000000000000000000000000000..314956f18bc1301450ad9fc64e1f4b5d7674ea07 --- /dev/null +++ b/app/src/main/java/de/justjanne/quasseldroid/ui/ConnectedClientCard.kt @@ -0,0 +1,66 @@ +package de.justjanne.quasseldroid.ui + +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.width +import androidx.compose.material.Card +import androidx.compose.material.Icon +import androidx.compose.material.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.PreviewParameter +import androidx.compose.ui.unit.dp +import de.charlex.compose.HtmlText +import de.justjanne.libquassel.protocol.models.ConnectedClient +import de.justjanne.quasseldroid.R +import de.justjanne.quasseldroid.sample.SampleConnectedClientProvider +import de.justjanne.quasseldroid.ui.theme.Insecure +import de.justjanne.quasseldroid.ui.theme.Secure +import de.justjanne.quasseldroid.ui.theme.Typography +import org.threeten.bp.ZoneId +import org.threeten.bp.format.DateTimeFormatter +import org.threeten.bp.format.FormatStyle + +private val formatter = DateTimeFormatter.ofLocalizedDateTime(FormatStyle.MEDIUM) + +@Preview(name = "Connected Client") +@Composable +fun ConnectedClientCard( + @PreviewParameter(SampleConnectedClientProvider::class) + client: ConnectedClient, + modifier: Modifier = Modifier +) { + val secureResource = painterResource( + if (client.secure) R.drawable.ic_lock + else R.drawable.ic_no_encryption + ) + + val tint = if (client.secure) Secure else Insecure + + Card(modifier = modifier) { + Row(modifier = Modifier.padding(16.dp)) { + Column(modifier = Modifier.weight(1.0f)) { + HtmlText( + text = client.version, + style = Typography.body1 + ) + Text( + client.remoteAddress, + style = Typography.body2 + ) + Text( + client.connectedSince + .atZone(ZoneId.systemDefault()) + .format(formatter), + style = Typography.body2 + ) + } + Spacer(modifier = Modifier.width(16.dp)) + Icon(secureResource, tint = tint, contentDescription = "") + } + } +} diff --git a/app/src/main/java/de/justjanne/quasseldroid/ui/CoreInfoRoute.kt b/app/src/main/java/de/justjanne/quasseldroid/ui/CoreInfoRoute.kt new file mode 100644 index 0000000000000000000000000000000000000000..c509d7c7d97f58bc3e009b914040d2ae701c6539 --- /dev/null +++ b/app/src/main/java/de/justjanne/quasseldroid/ui/CoreInfoRoute.kt @@ -0,0 +1,36 @@ +package de.justjanne.quasseldroid.ui + +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.padding +import androidx.compose.material.Button +import androidx.compose.material.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.dp +import androidx.navigation.NavController +import de.justjanne.libquassel.protocol.util.flatMap +import de.justjanne.quasseldroid.service.QuasselBackend +import de.justjanne.quasseldroid.util.mapNullable +import de.justjanne.quasseldroid.util.rememberFlow + +@Composable +fun CoreInfoRoute(backend: QuasselBackend, navController: NavController) { + val coreInfo = rememberFlow(null) { + backend.flow() + .flatMap() + .mapNullable { it.coreInfo } + .flatMap() + } + + Column(Modifier.padding(16.dp)) { + Button(onClick = { navController.navigate("home") }) { + Text("Back") + } + + if (coreInfo == null) { + Text("No data available") + } else { + CoreInfoView(coreInfo) + } + } +} diff --git a/app/src/main/java/de/justjanne/quasseldroid/ui/CoreInfoView.kt b/app/src/main/java/de/justjanne/quasseldroid/ui/CoreInfoView.kt new file mode 100644 index 0000000000000000000000000000000000000000..90b99fc45f1bab33dfae89f54ee5bd6419781864 --- /dev/null +++ b/app/src/main/java/de/justjanne/quasseldroid/ui/CoreInfoView.kt @@ -0,0 +1,60 @@ +package de.justjanne.quasseldroid.ui + +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.items +import androidx.compose.material.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.PreviewParameter +import androidx.compose.ui.unit.dp +import de.charlex.compose.HtmlText +import de.justjanne.libquassel.protocol.models.ConnectedClient +import de.justjanne.libquassel.protocol.syncables.state.CoreInfoState +import de.justjanne.quasseldroid.sample.SampleCoreInfoProvider +import de.justjanne.quasseldroid.ui.theme.Typography +import org.threeten.bp.ZoneId +import org.threeten.bp.format.DateTimeFormatter +import org.threeten.bp.format.FormatStyle + +private val formatter = DateTimeFormatter.ofLocalizedDateTime(FormatStyle.MEDIUM) + +@Preview(name = "Core Info", showBackground = true) +@Composable +fun CoreInfoView( + @PreviewParameter(SampleCoreInfoProvider::class) + coreInfo: CoreInfoState +) { + Column(modifier = Modifier.padding(8.dp)) { + Column(modifier = Modifier.padding(8.dp)) { + HtmlText( + text = coreInfo.version, + style = Typography.body1 + ) + Text( + text = coreInfo.versionDate + ?.atZone(ZoneId.systemDefault()) + ?.format(formatter) + ?: "Unknown", + style = Typography.body2 + ) + Text( + coreInfo.startTime + .atZone(ZoneId.systemDefault()) + .format(formatter), + style = Typography.body2 + ) + } + + LazyColumn { + items(coreInfo.connectedClients, key = ConnectedClient::id) { + ConnectedClientCard( + it, + modifier = Modifier.padding(8.dp) + ) + } + } + } +} diff --git a/app/src/main/java/de/justjanne/quasseldroid/ui/HomeView.kt b/app/src/main/java/de/justjanne/quasseldroid/ui/HomeView.kt new file mode 100644 index 0000000000000000000000000000000000000000..e139fb4901cc9462226ea3db62926055b7c1686e --- /dev/null +++ b/app/src/main/java/de/justjanne/quasseldroid/ui/HomeView.kt @@ -0,0 +1,66 @@ +package de.justjanne.quasseldroid.ui + +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.items +import androidx.compose.material.Button +import androidx.compose.material.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.ui.platform.LocalContext +import androidx.navigation.NavController +import de.justjanne.libquassel.protocol.models.ids.BufferId +import de.justjanne.libquassel.protocol.syncables.state.BufferViewConfigState +import de.justjanne.libquassel.protocol.util.combineLatest +import de.justjanne.libquassel.protocol.util.flatMap +import de.justjanne.quasseldroid.service.QuasselBackend +import de.justjanne.quasseldroid.util.mapNullable +import de.justjanne.quasseldroid.util.rememberFlow + +@Composable +fun HomeView(backend: QuasselBackend, navController: NavController) { + val session = rememberFlow(null) { backend.flow() } + + val bufferViewConfigs: List<BufferViewConfigState> = rememberFlow(emptyList()) { + backend.flow() + .flatMap() + .mapNullable { it.bufferViewManager } + .flatMap() + .mapNullable { it.bufferViewConfigs() } + .combineLatest() + } + + val initStatus = rememberFlow(null) { + backend.flow() + .mapNullable { it.baseInitHandler } + .flatMap() + } + + val context = LocalContext.current + Column { + Text("Side: ${session?.side}") + if (initStatus != null) { + val done = initStatus.total - initStatus.waiting.size + Text("Init: ${initStatus.started} $done/ ${initStatus.total}") + } + Button(onClick = { navController.navigate("coreInfo") }) { + Text("Core Info") + } + Button(onClick = { + backend.disconnect(context) + navController.navigate("login") + }) { + Text("Disconnect") + } + Text("BufferViewConfigs: ${bufferViewConfigs.size}") + LazyColumn { + items(bufferViewConfigs, key = BufferViewConfigState::bufferViewId) { + Row { + Text("${it.bufferViewId}: ${it.bufferViewName}") + } + } + } + } +} diff --git a/app/src/main/java/de/justjanne/quasseldroid/ui/LoginView.kt b/app/src/main/java/de/justjanne/quasseldroid/ui/LoginView.kt new file mode 100644 index 0000000000000000000000000000000000000000..bd1388dcfcb8eb1b0e1997fdd4cb8dbed371756b --- /dev/null +++ b/app/src/main/java/de/justjanne/quasseldroid/ui/LoginView.kt @@ -0,0 +1,129 @@ +package de.justjanne.quasseldroid.ui + +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.text.KeyboardActions +import androidx.compose.foundation.text.KeyboardOptions +import androidx.compose.foundation.verticalScroll +import androidx.compose.material.Button +import androidx.compose.material.OutlinedTextField +import androidx.compose.material.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.ui.Modifier +import androidx.compose.ui.focus.FocusDirection +import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.platform.LocalFocusManager +import androidx.compose.ui.text.input.ImeAction +import androidx.compose.ui.text.input.TextFieldValue +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import androidx.navigation.NavController +import de.justjanne.quasseldroid.service.ConnectionData +import de.justjanne.quasseldroid.service.QuasselBackend +import de.justjanne.quasseldroid.util.TextFieldValueSaver +import java.net.InetSocketAddress + +@Composable +fun LoginRoute(backend: QuasselBackend, navController: NavController) { + val context = LocalContext.current + LoginView(onLogin = { + if (backend.login(context, it)) { + navController.navigate("home") + } + }) +} + +@Preview(name = "Login", showBackground = true) +@Composable +fun LoginView(onLogin: (ConnectionData) -> Unit = {}) { + val (host, setHost) = rememberSaveable(stateSaver = TextFieldValueSaver) { + mutableStateOf(TextFieldValue()) + } + val (port, setPort) = rememberSaveable(stateSaver = TextFieldValueSaver) { + mutableStateOf(TextFieldValue("4242")) + } + val (username, setUsername) = rememberSaveable(stateSaver = TextFieldValueSaver) { + mutableStateOf(TextFieldValue()) + } + val (password, setPassword) = rememberSaveable(stateSaver = TextFieldValueSaver) { + mutableStateOf(TextFieldValue()) + } + + val focusManager = LocalFocusManager.current + Column( + modifier = Modifier + .fillMaxWidth() + .verticalScroll(rememberScrollState()) + ) { + OutlinedTextField( + host, + setHost, + singleLine = true, + modifier = Modifier + .padding(16.dp) + .fillMaxWidth(), + label = { Text("Hostname") }, + keyboardOptions = KeyboardOptions.Default.copy(imeAction = ImeAction.Next), + keyboardActions = KeyboardActions(onNext = { + focusManager.moveFocus(FocusDirection.Down) + }), + ) + OutlinedTextField( + port, + setPort, + singleLine = true, + modifier = Modifier + .padding(16.dp) + .fillMaxWidth(), + label = { Text("Port") }, + keyboardOptions = KeyboardOptions.Default.copy(imeAction = ImeAction.Next), + keyboardActions = KeyboardActions(onNext = { + focusManager.moveFocus(FocusDirection.Down) + }), + ) + OutlinedTextField( + username, + setUsername, + singleLine = true, + modifier = Modifier + .padding(16.dp) + .fillMaxWidth(), + label = { Text("Username") }, + keyboardOptions = KeyboardOptions.Default.copy(imeAction = ImeAction.Next), + keyboardActions = KeyboardActions(onNext = { + focusManager.moveFocus(FocusDirection.Down) + }), + ) + PasswordTextField( + password, + setPassword, + singleLine = true, + modifier = Modifier + .padding(16.dp) + .fillMaxWidth(), + label = { Text("Password") }, + keyboardOptions = KeyboardOptions.Default.copy(imeAction = ImeAction.Next), + keyboardActions = KeyboardActions(onNext = { + focusManager.moveFocus(FocusDirection.Down) + }), + ) + Button( + modifier = Modifier.padding(16.dp), + onClick = { + onLogin( + ConnectionData( + InetSocketAddress.createUnresolved(host.text, port.text.toIntOrNull() ?: 4242), + username.text, + password.text + ) + ) + } + ) { + Text("Login") + } + } +} diff --git a/app/src/main/java/de/justjanne/quasseldroid/ui/PasswordTextField.kt b/app/src/main/java/de/justjanne/quasseldroid/ui/PasswordTextField.kt new file mode 100644 index 0000000000000000000000000000000000000000..a4741b39b654f8aaa378c9d90035c4e25ef5552a --- /dev/null +++ b/app/src/main/java/de/justjanne/quasseldroid/ui/PasswordTextField.kt @@ -0,0 +1,140 @@ +package de.justjanne.quasseldroid.ui + +import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.foundation.text.KeyboardActions +import androidx.compose.foundation.text.KeyboardOptions +import androidx.compose.material.Icon +import androidx.compose.material.IconButton +import androidx.compose.material.LocalTextStyle +import androidx.compose.material.MaterialTheme +import androidx.compose.material.OutlinedTextField +import androidx.compose.material.TextFieldColors +import androidx.compose.material.TextFieldDefaults +import androidx.compose.runtime.Composable +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Shape +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.text.input.KeyboardType +import androidx.compose.ui.text.input.PasswordVisualTransformation +import androidx.compose.ui.text.input.TextFieldValue +import androidx.compose.ui.text.input.VisualTransformation +import de.justjanne.quasseldroid.R + +@Composable +fun PasswordTextField( + value: TextFieldValue, + onValueChange: (TextFieldValue) -> Unit, + modifier: Modifier = Modifier, + enabled: Boolean = true, + readOnly: Boolean = false, + textStyle: TextStyle = LocalTextStyle.current, + label: @Composable (() -> Unit)? = null, + placeholder: @Composable (() -> Unit)? = null, + leadingIcon: @Composable (() -> Unit)? = null, + trailingIcon: @Composable (() -> Unit)? = null, + isError: Boolean = false, + keyboardOptions: KeyboardOptions = KeyboardOptions.Default.copy( + keyboardType = KeyboardType.Password + ), + keyboardActions: KeyboardActions = KeyboardActions(), + singleLine: Boolean = false, + maxLines: Int = Int.MAX_VALUE, + interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, + shape: Shape = MaterialTheme.shapes.small, + colors: TextFieldColors = TextFieldDefaults.outlinedTextFieldColors() +) { + val (showPassword, setShowPassword) = remember { mutableStateOf(false) } + val painter = painterResource( + if (showPassword) R.drawable.ic_eye_off + else R.drawable.ic_eye + ) + + OutlinedTextField( + value, + onValueChange, + modifier, + enabled, + readOnly, + textStyle, + label, + placeholder, + leadingIcon, + { + IconButton(onClick = { setShowPassword(!showPassword) }) { + Icon(painter = painter, contentDescription = "") + } + trailingIcon?.invoke() + }, + isError, + if (showPassword) VisualTransformation.None + else PasswordVisualTransformation(), + keyboardOptions, + keyboardActions, + singleLine, + maxLines, + interactionSource, + shape, + colors + ) +} + +@Composable +fun PasswordTextField( + value: String, + onValueChange: (String) -> Unit, + modifier: Modifier = Modifier, + enabled: Boolean = true, + readOnly: Boolean = false, + textStyle: TextStyle = LocalTextStyle.current, + label: @Composable (() -> Unit)? = null, + placeholder: @Composable (() -> Unit)? = null, + leadingIcon: @Composable (() -> Unit)? = null, + trailingIcon: @Composable (() -> Unit)? = null, + isError: Boolean = false, + keyboardOptions: KeyboardOptions = KeyboardOptions.Default.copy( + keyboardType = KeyboardType.Password + ), + keyboardActions: KeyboardActions = KeyboardActions(), + singleLine: Boolean = false, + maxLines: Int = Int.MAX_VALUE, + interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, + shape: Shape = MaterialTheme.shapes.small, + colors: TextFieldColors = TextFieldDefaults.outlinedTextFieldColors() +) { + val (showPassword, setShowPassword) = remember { mutableStateOf(false) } + val painter = painterResource( + if (showPassword) R.drawable.ic_eye_off + else R.drawable.ic_eye + ) + + OutlinedTextField( + value, + onValueChange, + modifier, + enabled, + readOnly, + textStyle, + label, + placeholder, + leadingIcon, + { + IconButton(onClick = { setShowPassword(!showPassword) }) { + Icon(painter = painter, contentDescription = "") + } + trailingIcon?.invoke() + }, + isError, + if (showPassword) VisualTransformation.None + else PasswordVisualTransformation(), + keyboardOptions, + keyboardActions, + singleLine, + maxLines, + interactionSource, + shape, + colors + ) +} diff --git a/app/src/main/java/de/justjanne/quasseldroid/ui/theme/Color.kt b/app/src/main/java/de/justjanne/quasseldroid/ui/theme/Color.kt new file mode 100644 index 0000000000000000000000000000000000000000..269987abf40db3ffbc7e391015ca0c53b2a841bf --- /dev/null +++ b/app/src/main/java/de/justjanne/quasseldroid/ui/theme/Color.kt @@ -0,0 +1,11 @@ +package de.justjanne.quasseldroid.ui.theme + +import androidx.compose.ui.graphics.Color + +val Primary = Color(0xFF0a70c0) +val PrimaryDark = Color(0xFF105a94) +val Accent = Color(0xFFffaf3b) + +val Secure = Color(0xFF4CAF50) +val PartiallySecure = Color(0xFFFFC107) +val Insecure = Color(0xFFD32F2F) diff --git a/app/src/main/java/de/justjanne/quasseldroid/ui/theme/Shape.kt b/app/src/main/java/de/justjanne/quasseldroid/ui/theme/Shape.kt new file mode 100644 index 0000000000000000000000000000000000000000..de0a1ac2cb9afad3c17c0b65b65af2766520cae6 --- /dev/null +++ b/app/src/main/java/de/justjanne/quasseldroid/ui/theme/Shape.kt @@ -0,0 +1,11 @@ +package de.justjanne.quasseldroid.ui.theme + +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material.Shapes +import androidx.compose.ui.unit.dp + +val Shapes = Shapes( + small = RoundedCornerShape(4.dp), + medium = RoundedCornerShape(4.dp), + large = RoundedCornerShape(0.dp) +) diff --git a/app/src/main/java/de/justjanne/quasseldroid/ui/theme/Theme.kt b/app/src/main/java/de/justjanne/quasseldroid/ui/theme/Theme.kt new file mode 100644 index 0000000000000000000000000000000000000000..b12c3825b2f5be26fbdcf09f28d208e0913e424b --- /dev/null +++ b/app/src/main/java/de/justjanne/quasseldroid/ui/theme/Theme.kt @@ -0,0 +1,44 @@ +package de.justjanne.quasseldroid.ui.theme + +import androidx.compose.foundation.isSystemInDarkTheme +import androidx.compose.material.MaterialTheme +import androidx.compose.material.darkColors +import androidx.compose.material.lightColors +import androidx.compose.runtime.Composable + +private val DarkColorPalette = darkColors( + primary = Primary, + primaryVariant = PrimaryDark, + secondary = Accent +) + +private val LightColorPalette = lightColors( + primary = Primary, + primaryVariant = PrimaryDark, + secondary = Accent + + /* Other default colors to override + background = Color.White, + surface = Color.White, + onPrimary = Color.White, + onSecondary = Color.Black, + onBackground = Color.Black, + onSurface = Color.Black, + */ +) + +@Composable +fun QuasseldroidTheme(darkTheme: Boolean = isSystemInDarkTheme(), content: @Composable () -> Unit) { + val colors = if (darkTheme) { + DarkColorPalette + } else { + LightColorPalette + } + + MaterialTheme( + colors = colors, + typography = Typography, + shapes = Shapes, + content = content + ) +} diff --git a/app/src/main/java/de/justjanne/quasseldroid/ui/theme/Type.kt b/app/src/main/java/de/justjanne/quasseldroid/ui/theme/Type.kt new file mode 100644 index 0000000000000000000000000000000000000000..31b45a06741c6e2d5a7697d0f804a03aa8df690b --- /dev/null +++ b/app/src/main/java/de/justjanne/quasseldroid/ui/theme/Type.kt @@ -0,0 +1,28 @@ +package de.justjanne.quasseldroid.ui.theme + +import androidx.compose.material.Typography +import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.text.font.FontFamily +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.unit.sp + +// Set of Material typography styles to start with +val Typography = Typography( + body1 = TextStyle( + fontFamily = FontFamily.Default, + fontWeight = FontWeight.Normal, + fontSize = 16.sp + ) + /* Other default text styles to override + button = TextStyle( + fontFamily = FontFamily.Default, + fontWeight = FontWeight.W500, + fontSize = 14.sp + ), + caption = TextStyle( + fontFamily = FontFamily.Default, + fontWeight = FontWeight.Normal, + fontSize = 12.sp + ) + */ +) diff --git a/app/src/main/java/de/justjanne/quasseldroid/util/FlowExtensions.kt b/app/src/main/java/de/justjanne/quasseldroid/util/FlowExtensions.kt new file mode 100644 index 0000000000000000000000000000000000000000..2dae17ec6cc6c41b68eaf19cb3c6500456dc68b7 --- /dev/null +++ b/app/src/main/java/de/justjanne/quasseldroid/util/FlowExtensions.kt @@ -0,0 +1,25 @@ +package de.justjanne.quasseldroid.util + +import androidx.compose.runtime.Composable +import androidx.compose.runtime.DisallowComposableCalls +import androidx.compose.runtime.collectAsState +import androidx.compose.runtime.remember +import kotlinx.coroutines.flow.Flow +import kotlinx.coroutines.flow.emitAll +import kotlinx.coroutines.flow.transform + +inline fun <T, R> Flow<T?>.mapNullable(crossinline transform: suspend (value: T) -> R): Flow<R?> = + transform { value -> + emit(value?.let { transform(it) }) + } + +inline fun <T, R> Flow<T?>.flatMapLatestNullable(crossinline transform: suspend (value: T) -> Flow<R>): Flow<R?> = + transform { value -> + if (value == null) emit(null) + else emitAll(transform(value)) + } + +@Composable +inline fun <T> rememberFlow(initial: T, calculation: @DisallowComposableCalls () -> Flow<T>): T { + return remember(calculation).collectAsState(initial).value +} diff --git a/app/src/main/java/de/justjanne/quasseldroid/util/TextFieldValueSaver.kt b/app/src/main/java/de/justjanne/quasseldroid/util/TextFieldValueSaver.kt new file mode 100644 index 0000000000000000000000000000000000000000..31df4795c1dc552df254de815e6559e256981e86 --- /dev/null +++ b/app/src/main/java/de/justjanne/quasseldroid/util/TextFieldValueSaver.kt @@ -0,0 +1,10 @@ +package de.justjanne.quasseldroid.util + +import androidx.compose.runtime.saveable.Saver +import androidx.compose.runtime.saveable.SaverScope +import androidx.compose.ui.text.input.TextFieldValue + +object TextFieldValueSaver : Saver<TextFieldValue, String> { + override fun restore(value: String) = TextFieldValue(value) + override fun SaverScope.save(value: TextFieldValue) = value.text +} diff --git a/app/src/main/java/de/justjanne/quasseldroid/util/lifecycle/ContextualLifecycleObserver.kt b/app/src/main/java/de/justjanne/quasseldroid/util/lifecycle/ContextualLifecycleObserver.kt new file mode 100644 index 0000000000000000000000000000000000000000..cdf2b9e43f504a1ee09a2a4287971e167091b9b9 --- /dev/null +++ b/app/src/main/java/de/justjanne/quasseldroid/util/lifecycle/ContextualLifecycleObserver.kt @@ -0,0 +1,12 @@ +package de.justjanne.quasseldroid.util.lifecycle + +import android.content.Context + +interface ContextualLifecycleObserver { + fun onCreate(owner: Context) = Unit + fun onStart(owner: Context) = Unit + fun onResume(owner: Context) = Unit + fun onPause(owner: Context) = Unit + fun onStop(owner: Context) = Unit + fun onDestroy(owner: Context) = Unit +} diff --git a/app/src/main/java/de/justjanne/quasseldroid/util/lifecycle/DefaultContextualLifecycleObserver.kt b/app/src/main/java/de/justjanne/quasseldroid/util/lifecycle/DefaultContextualLifecycleObserver.kt new file mode 100644 index 0000000000000000000000000000000000000000..f6d44679d15803b6dd142fc6ed28ba9be0d30024 --- /dev/null +++ b/app/src/main/java/de/justjanne/quasseldroid/util/lifecycle/DefaultContextualLifecycleObserver.kt @@ -0,0 +1,53 @@ +package de.justjanne.quasseldroid.util.lifecycle + +import android.content.Context +import androidx.annotation.CallSuper +import java.util.concurrent.atomic.AtomicReference + +abstract class DefaultContextualLifecycleObserver : ContextualLifecycleObserver { + private var statusInternal = AtomicReference(LifecycleStatus.DESTROYED) + protected val status: LifecycleStatus + get() = statusInternal.get() + + @CallSuper + override fun onCreate(owner: Context) { + require(statusInternal.compareAndSet(LifecycleStatus.DESTROYED, LifecycleStatus.CREATED)) { + "Unexpected lifecycle status: onCreate called, but status is not DESTROYED" + } + } + + @CallSuper + override fun onStart(owner: Context) { + require(statusInternal.compareAndSet(LifecycleStatus.CREATED, LifecycleStatus.STARTED)) { + "Unexpected lifecycle status: onStart called, but status is not CREATED" + } + } + + @CallSuper + override fun onResume(owner: Context) { + require(statusInternal.compareAndSet(LifecycleStatus.STARTED, LifecycleStatus.RESUMED)) { + "Unexpected lifecycle status: onResume called, but status is not STARTED" + } + } + + @CallSuper + override fun onPause(owner: Context) { + require(statusInternal.compareAndSet(LifecycleStatus.RESUMED, LifecycleStatus.STARTED)) { + "Unexpected lifecycle status: onPause called, but status is not RESUMED" + } + } + + @CallSuper + override fun onStop(owner: Context) { + require(statusInternal.compareAndSet(LifecycleStatus.STARTED, LifecycleStatus.CREATED)) { + "Unexpected lifecycle status: onStop called, but status is not RESUMED" + } + } + + @CallSuper + override fun onDestroy(owner: Context) { + require(statusInternal.compareAndSet(LifecycleStatus.CREATED, LifecycleStatus.DESTROYED)) { + "Unexpected lifecycle status: onDestroy called, but status is not RESUMED" + } + } +} diff --git a/app/src/main/java/de/justjanne/quasseldroid/util/lifecycle/LifecycleStatus.kt b/app/src/main/java/de/justjanne/quasseldroid/util/lifecycle/LifecycleStatus.kt new file mode 100644 index 0000000000000000000000000000000000000000..7db6223c5ef7b7f34bf714a9d95358ddadbb556d --- /dev/null +++ b/app/src/main/java/de/justjanne/quasseldroid/util/lifecycle/LifecycleStatus.kt @@ -0,0 +1,8 @@ +package de.justjanne.quasseldroid.util.lifecycle + +enum class LifecycleStatus { + DESTROYED, + CREATED, + STARTED, + RESUMED +} diff --git a/app/src/main/res/drawable-nodpi/profile_picture.png b/app/src/main/res/drawable-nodpi/profile_picture.png new file mode 100644 index 0000000000000000000000000000000000000000..eab3c658a8c63f2ee5d0995a685d3901fa351c70 Binary files /dev/null and b/app/src/main/res/drawable-nodpi/profile_picture.png differ diff --git a/app/src/main/res/drawable-v26/ic_launcher_background.xml b/app/src/main/res/drawable-v26/ic_launcher_background.xml new file mode 100644 index 0000000000000000000000000000000000000000..70329d40c2b982a25258abcfcf5609c4c3ac749e --- /dev/null +++ b/app/src/main/res/drawable-v26/ic_launcher_background.xml @@ -0,0 +1,27 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle"> + <gradient + android:angle="270" + android:endColor="@color/colorIconDark" + android:startColor="@color/colorIconLight" + android:type="linear" /> +</shape> diff --git a/app/src/main/res/drawable-v26/ic_shortcut_channel.xml b/app/src/main/res/drawable-v26/ic_shortcut_channel.xml new file mode 100644 index 0000000000000000000000000000000000000000..2261398cc8f0abd02e56c8dcde7aca3a63ac52b6 --- /dev/null +++ b/app/src/main/res/drawable-v26/ic_shortcut_channel.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@color/colorPrimaryDark" /> + <foreground android:drawable="@drawable/ic_shortcut_channel_foreground" /> +</adaptive-icon> diff --git a/app/src/main/res/drawable-v26/ic_shortcut_query.xml b/app/src/main/res/drawable-v26/ic_shortcut_query.xml new file mode 100644 index 0000000000000000000000000000000000000000..af383a0284a07e6c05ab7231070d0243e83faa36 --- /dev/null +++ b/app/src/main/res/drawable-v26/ic_shortcut_query.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@color/colorPrimaryDark" /> + <foreground android:drawable="@drawable/ic_shortcut_query_foreground" /> +</adaptive-icon> diff --git a/app/src/main/res/drawable/ic_account.xml b/app/src/main/res/drawable/ic_account.xml new file mode 100644 index 0000000000000000000000000000000000000000..e5584881aae6bc397b185dcc6ad54e1d0c79e651 --- /dev/null +++ b/app/src/main/res/drawable/ic_account.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M12,4A4,4 0 0,1 16,8A4,4 0 0,1 12,12A4,4 0 0,1 8,8A4,4 0 0,1 12,4M12,14C16.42,14 20,15.79 20,18V20H4V18C4,15.79 7.58,14 12,14Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_account_card.xml b/app/src/main/res/drawable/ic_account_card.xml new file mode 100644 index 0000000000000000000000000000000000000000..a64101ca997426fb413b0730c6a854a25b8a20c5 --- /dev/null +++ b/app/src/main/res/drawable/ic_account_card.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M2,3H22C23.05,3 24,3.95 24,5V19C24,20.05 23.05,21 22,21H2C0.95,21 0,20.05 0,19V5C0,3.95 0.95,3 2,3M14,6V7H22V6H14M14,8V9H21.5L22,9V8H14M14,10V11H21V10H14M8,13.91C6,13.91 2,15 2,17V18H14V17C14,15 10,13.91 8,13.91M8,6A3,3 0 0,0 5,9A3,3 0 0,0 8,12A3,3 0 0,0 11,9A3,3 0 0,0 8,6Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_account_minus.xml b/app/src/main/res/drawable/ic_account_minus.xml new file mode 100644 index 0000000000000000000000000000000000000000..82a3d7e5b647469ae3f8d1e1a624f35a8bbe0349 --- /dev/null +++ b/app/src/main/res/drawable/ic_account_minus.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M15,14C12.33,14 7,15.33 7,18V20H23V18C23,15.33 17.67,14 15,14M1,10V12H9V10M15,12A4,4 0 0,0 19,8A4,4 0 0,0 15,4A4,4 0 0,0 11,8A4,4 0 0,0 15,12Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_account_multiple.xml b/app/src/main/res/drawable/ic_account_multiple.xml new file mode 100644 index 0000000000000000000000000000000000000000..d57eda3aed3332ddeb6c91c6cb4dc4ac284b553e --- /dev/null +++ b/app/src/main/res/drawable/ic_account_multiple.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M16,13C15.71,13 15.38,13 15.03,13.05C16.19,13.89 17,15 17,16.5V19H23V16.5C23,14.17 18.33,13 16,13M8,13C5.67,13 1,14.17 1,16.5V19H15V16.5C15,14.17 10.33,13 8,13M8,11A3,3 0 0,0 11,8A3,3 0 0,0 8,5A3,3 0 0,0 5,8A3,3 0 0,0 8,11M16,11A3,3 0 0,0 19,8A3,3 0 0,0 16,5A3,3 0 0,0 13,8A3,3 0 0,0 16,11Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_account_plus.xml b/app/src/main/res/drawable/ic_account_plus.xml new file mode 100644 index 0000000000000000000000000000000000000000..61308fe964a6e4f0ce6914d5c179e0d516f8f071 --- /dev/null +++ b/app/src/main/res/drawable/ic_account_plus.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M15,14C12.33,14 7,15.33 7,18V20H23V18C23,15.33 17.67,14 15,14M6,10V7H4V10H1V12H4V15H6V12H9V10M15,12A4,4 0 0,0 19,8A4,4 0 0,0 15,4A4,4 0 0,0 11,8A4,4 0 0,0 15,12Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_add.xml b/app/src/main/res/drawable/ic_add.xml new file mode 100644 index 0000000000000000000000000000000000000000..a061141b48f486e50da9bf9fda1fc10b87e10d3e --- /dev/null +++ b/app/src/main/res/drawable/ic_add.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#fff" + android:pathData="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_alert.xml b/app/src/main/res/drawable/ic_alert.xml new file mode 100644 index 0000000000000000000000000000000000000000..2ee2859623d0d782dbbf70db9c31e464003894cf --- /dev/null +++ b/app/src/main/res/drawable/ic_alert.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_arrow_right.xml b/app/src/main/res/drawable/ic_arrow_right.xml new file mode 100644 index 0000000000000000000000000000000000000000..cec2a5ce1558706e2b6fd89897500a9eec59f17a --- /dev/null +++ b/app/src/main/res/drawable/ic_arrow_right.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_bell.xml b/app/src/main/res/drawable/ic_bell.xml new file mode 100644 index 0000000000000000000000000000000000000000..2bac5f160145537505d9ce7b30707abd14e99a8f --- /dev/null +++ b/app/src/main/res/drawable/ic_bell.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M12,22A2,2 0 0,0 14,20H10A2,2 0 0,0 12,22M18,16V11C18,7.93 16.36,5.36 13.5,4.68V4A1.5,1.5 0 0,0 12,2.5A1.5,1.5 0 0,0 10.5,4V4.68C7.63,5.36 6,7.92 6,11V16L4,18V19H20V18L18,16Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_channel.xml b/app/src/main/res/drawable/ic_channel.xml new file mode 100644 index 0000000000000000000000000000000000000000..090ce1c9bb6bee2e085614f033bf29802d13ad88 --- /dev/null +++ b/app/src/main/res/drawable/ic_channel.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M5.41,21L6.12,17H2.12L2.47,15H6.47L7.53,9H3.53L3.88,7H7.88L8.59,3H10.59L9.88,7H15.88L16.59,3H18.59L17.88,7H21.88L21.53,9H17.53L16.47,15H20.47L20.12,17H16.12L15.41,21H13.41L14.12,17H8.12L7.41,21H5.41M9.53,9L8.47,15H14.47L15.53,9H9.53Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_check.xml b/app/src/main/res/drawable/ic_check.xml new file mode 100644 index 0000000000000000000000000000000000000000..aa25f4b5da4f8beef2520fb790d29f193992e97c --- /dev/null +++ b/app/src/main/res/drawable/ic_check.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_chevron_down.xml b/app/src/main/res/drawable/ic_chevron_down.xml new file mode 100644 index 0000000000000000000000000000000000000000..671af433d6acac65a331fbeb6cf5de667138dcd5 --- /dev/null +++ b/app/src/main/res/drawable/ic_chevron_down.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_chevron_up.xml b/app/src/main/res/drawable/ic_chevron_up.xml new file mode 100644 index 0000000000000000000000000000000000000000..9f1157df2fb8f3d7a32ef68308a303dc3e283e12 --- /dev/null +++ b/app/src/main/res/drawable/ic_chevron_up.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_clock.xml b/app/src/main/res/drawable/ic_clock.xml new file mode 100644 index 0000000000000000000000000000000000000000..798394b7d246b00bfd96f3704a2c0383be572f1a --- /dev/null +++ b/app/src/main/res/drawable/ic_clock.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22C6.47,22 2,17.5 2,12A10,10 0 0,1 12,2M12.5,7V12.25L17,14.92L16.25,16.15L11,13V7H12.5Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_close.xml b/app/src/main/res/drawable/ic_close.xml new file mode 100644 index 0000000000000000000000000000000000000000..ebccb731f12de13742defe635feba94d885a369a --- /dev/null +++ b/app/src/main/res/drawable/ic_close.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_copy.xml b/app/src/main/res/drawable/ic_copy.xml new file mode 100644 index 0000000000000000000000000000000000000000..65e6c2c5890fd5e22d3893fc397f42c8e2d12640 --- /dev/null +++ b/app/src/main/res/drawable/ic_copy.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_debug.xml b/app/src/main/res/drawable/ic_debug.xml new file mode 100644 index 0000000000000000000000000000000000000000..d35945533aeffff7d55576744ba8197093be16f9 --- /dev/null +++ b/app/src/main/res/drawable/ic_debug.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M14,12H10V10H14M14,16H10V14H14M20,8H17.19C16.74,7.22 16.12,6.55 15.37,6.04L17,4.41L15.59,3L13.42,5.17C12.96,5.06 12.5,5 12,5C11.5,5 11.04,5.06 10.59,5.17L8.41,3L7,4.41L8.62,6.04C7.88,6.55 7.26,7.22 6.81,8H4V10H6.09C6.04,10.33 6,10.66 6,11V12H4V14H6V15C6,15.34 6.04,15.67 6.09,16H4V18H6.81C7.85,19.79 9.78,21 12,21C14.22,21 16.15,19.79 17.19,18H20V16H17.91C17.96,15.67 18,15.34 18,15V14H20V12H18V11C18,10.66 17.96,10.33 17.91,10H20V8Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_delete.xml b/app/src/main/res/drawable/ic_delete.xml new file mode 100644 index 0000000000000000000000000000000000000000..edcca949a9312a284c7a3a39b6862b82dbc64369 --- /dev/null +++ b/app/src/main/res/drawable/ic_delete.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_disconnected.xml b/app/src/main/res/drawable/ic_disconnected.xml new file mode 100644 index 0000000000000000000000000000000000000000..6e979f185d3b7902bbcdcfc96bc33eda1c1fff2d --- /dev/null +++ b/app/src/main/res/drawable/ic_disconnected.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M19,17H21V9H19M19,21H21V19H19M1,21H17V7H21V1" /> +</vector> diff --git a/app/src/main/res/drawable/ic_domain.xml b/app/src/main/res/drawable/ic_domain.xml new file mode 100644 index 0000000000000000000000000000000000000000..728a9553584aae100172d3a742b9de0327f50d16 --- /dev/null +++ b/app/src/main/res/drawable/ic_domain.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M18,15H16V17H18M18,11H16V13H18M20,19H12V17H14V15H12V13H14V11H12V9H20M10,7H8V5H10M10,11H8V9H10M10,15H8V13H10M10,19H8V17H10M6,7H4V5H6M6,11H4V9H6M6,15H4V13H6M6,19H4V17H6M12,7V3H2V21H22V7H12Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_drawer_toggle.xml b/app/src/main/res/drawable/ic_drawer_toggle.xml new file mode 100644 index 0000000000000000000000000000000000000000..081693c69cf08fcac1abd576076cb5ff32447477 --- /dev/null +++ b/app/src/main/res/drawable/ic_drawer_toggle.xml @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData=" + M20,6 a-1,1 0 0,0 1,1 a-1,1 0 0,0 -1,1 l -16,0 a-1,1 0 0,0 -1,-1 a-1,1 0 0,0 1,-1Z + M20,11 a-1,1 0 0,0 1,1 a-1,1 0 0,0 -1,1 l -16,0 a-1,1 0 0,0 -1,-1 a-1,1 0 0,0 1,-1Z + M20,16 a-1,1 0 0,0 1,1 a-1,1 0 0,0 -1,1 l -16,0 a-1,1 0 0,0 -1,-1 a-1,1 0 0,0 1,-1Z" /> + <path + android:fillColor="#f00" + android:pathData="M16,17 16,23 A1,1 0 0,0 17,24 L 23,24 A1,1 0 0,0 24,23 L 24,17 A1,1 0 0,0 23,16 L 17,16 A1,1 0 0,0 16,17" /> +</vector> diff --git a/app/src/main/res/drawable/ic_eye.xml b/app/src/main/res/drawable/ic_eye.xml new file mode 100644 index 0000000000000000000000000000000000000000..d9816f6e1abcc0130c1bdf6e76a0921aee9e5cd6 --- /dev/null +++ b/app/src/main/res/drawable/ic_eye.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_eye_off.xml b/app/src/main/res/drawable/ic_eye_off.xml new file mode 100644 index 0000000000000000000000000000000000000000..0cbcd1249fe3b6186a4f8cd609d0c399364ae47d --- /dev/null +++ b/app/src/main/res/drawable/ic_eye_off.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.2 16.38,18.66L16.81,19.08L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_filter.xml b/app/src/main/res/drawable/ic_filter.xml new file mode 100644 index 0000000000000000000000000000000000000000..fd5f993a26e27b56d45798e53530bd02959d23aa --- /dev/null +++ b/app/src/main/res/drawable/ic_filter.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M3,2H21V2H21V4H20.92L14,10.92V22.91L10,18.91V10.91L3.09,4H3V2Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_fingerprint.xml b/app/src/main/res/drawable/ic_fingerprint.xml new file mode 100644 index 0000000000000000000000000000000000000000..0458596a266fb9cc70d3d49215ea6df3f323cbc3 --- /dev/null +++ b/app/src/main/res/drawable/ic_fingerprint.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24" + tools:ignore="VectorPath"> + <path + android:fillColor="#000" + android:pathData="M17.81,4.47C17.73,4.47 17.65,4.45 17.58,4.41C15.66,3.42 14,3 12,3C10.03,3 8.15,3.47 6.44,4.41C6.2,4.54 5.9,4.45 5.76,4.21C5.63,3.97 5.72,3.66 5.96,3.53C7.82,2.5 9.86,2 12,2C14.14,2 16,2.47 18.04,3.5C18.29,3.65 18.38,3.95 18.25,4.19C18.16,4.37 18,4.47 17.81,4.47M3.5,9.72C3.4,9.72 3.3,9.69 3.21,9.63C3,9.47 2.93,9.16 3.09,8.93C4.08,7.53 5.34,6.43 6.84,5.66C10,4.04 14,4.03 17.15,5.65C18.65,6.42 19.91,7.5 20.9,8.9C21.06,9.12 21,9.44 20.78,9.6C20.55,9.76 20.24,9.71 20.08,9.5C19.18,8.22 18.04,7.23 16.69,6.54C13.82,5.07 10.15,5.07 7.29,6.55C5.93,7.25 4.79,8.25 3.89,9.5C3.81,9.65 3.66,9.72 3.5,9.72M9.75,21.79C9.62,21.79 9.5,21.74 9.4,21.64C8.53,20.77 8.06,20.21 7.39,19C6.7,17.77 6.34,16.27 6.34,14.66C6.34,11.69 8.88,9.27 12,9.27C15.12,9.27 17.66,11.69 17.66,14.66A0.5,0.5 0 0,1 17.16,15.16A0.5,0.5 0 0,1 16.66,14.66C16.66,12.24 14.57,10.27 12,10.27C9.43,10.27 7.34,12.24 7.34,14.66C7.34,16.1 7.66,17.43 8.27,18.5C8.91,19.66 9.35,20.15 10.12,20.93C10.31,21.13 10.31,21.44 10.12,21.64C10,21.74 9.88,21.79 9.75,21.79M16.92,19.94C15.73,19.94 14.68,19.64 13.82,19.05C12.33,18.04 11.44,16.4 11.44,14.66A0.5,0.5 0 0,1 11.94,14.16A0.5,0.5 0 0,1 12.44,14.66C12.44,16.07 13.16,17.4 14.38,18.22C15.09,18.7 15.92,18.93 16.92,18.93C17.16,18.93 17.56,18.9 17.96,18.83C18.23,18.78 18.5,18.96 18.54,19.24C18.59,19.5 18.41,19.77 18.13,19.82C17.56,19.93 17.06,19.94 16.92,19.94M14.91,22C14.87,22 14.82,22 14.78,22C13.19,21.54 12.15,20.95 11.06,19.88C9.66,18.5 8.89,16.64 8.89,14.66C8.89,13.04 10.27,11.72 11.97,11.72C13.67,11.72 15.05,13.04 15.05,14.66C15.05,15.73 16,16.6 17.13,16.6C18.28,16.6 19.21,15.73 19.21,14.66C19.21,10.89 15.96,7.83 11.96,7.83C9.12,7.83 6.5,9.41 5.35,11.86C4.96,12.67 4.76,13.62 4.76,14.66C4.76,15.44 4.83,16.67 5.43,18.27C5.53,18.53 5.4,18.82 5.14,18.91C4.88,19 4.59,18.87 4.5,18.62C4,17.31 3.77,16 3.77,14.66C3.77,13.46 4,12.37 4.45,11.42C5.78,8.63 8.73,6.82 11.96,6.82C16.5,6.82 20.21,10.33 20.21,14.65C20.21,16.27 18.83,17.59 17.13,17.59C15.43,17.59 14.05,16.27 14.05,14.65C14.05,13.58 13.12,12.71 11.97,12.71C10.82,12.71 9.89,13.58 9.89,14.65C9.89,16.36 10.55,17.96 11.76,19.16C12.71,20.1 13.62,20.62 15.03,21C15.3,21.08 15.45,21.36 15.38,21.62C15.33,21.85 15.12,22 14.91,22Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_format_background.xml b/app/src/main/res/drawable/ic_format_background.xml new file mode 100644 index 0000000000000000000000000000000000000000..3bc32ac5a83f85c81d9a5ac34d54048dadf414cb --- /dev/null +++ b/app/src/main/res/drawable/ic_format_background.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M19,11.5C19,11.5 17,13.67 17,15A2,2 0 0,0 19,17A2,2 0 0,0 21,15C21,13.67 19,11.5 19,11.5M5.21,10L10,5.21L14.79,10M16.56,8.94L7.62,0L6.21,1.41L8.59,3.79L3.44,8.94C2.85,9.5 2.85,10.47 3.44,11.06L8.94,16.56C9.23,16.85 9.62,17 10,17C10.38,17 10.77,16.85 11.06,16.56L16.56,11.06C17.15,10.47 17.15,9.5 16.56,8.94Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_format_bold.xml b/app/src/main/res/drawable/ic_format_bold.xml new file mode 100644 index 0000000000000000000000000000000000000000..722cd36ed759181a6fa45cf0326004b08fd293db --- /dev/null +++ b/app/src/main/res/drawable/ic_format_bold.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M13.5,15.5H10V12.5H13.5A1.5,1.5 0 0,1 15,14A1.5,1.5 0 0,1 13.5,15.5M10,6.5H13A1.5,1.5 0 0,1 14.5,8A1.5,1.5 0 0,1 13,9.5H10M15.6,10.79C16.57,10.11 17.25,9 17.25,8C17.25,5.74 15.5,4 13.25,4H7V18H14.04C16.14,18 17.75,16.3 17.75,14.21C17.75,12.69 16.89,11.39 15.6,10.79Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_format_clear.xml b/app/src/main/res/drawable/ic_format_clear.xml new file mode 100644 index 0000000000000000000000000000000000000000..2de0b97ca46290446c202976b7d6a3739fbf024b --- /dev/null +++ b/app/src/main/res/drawable/ic_format_clear.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M6,5V5.18L8.82,8H11.22L10.5,9.68L12.6,11.78L14.21,8H20V5H6M3.27,5L2,6.27L8.97,13.24L6.5,19H9.5L11.07,15.34L16.73,21L18,19.73L3.55,5.27L3.27,5Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_format_foreground.xml b/app/src/main/res/drawable/ic_format_foreground.xml new file mode 100644 index 0000000000000000000000000000000000000000..82a5717d1370247472efd38d3bf0b7d0ef25fe24 --- /dev/null +++ b/app/src/main/res/drawable/ic_format_foreground.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M9.62,12L12,5.67L14.37,12M11,3L5.5,17H7.75L8.87,14H15.12L16.25,17H18.5L13,3H11Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_format_italic.xml b/app/src/main/res/drawable/ic_format_italic.xml new file mode 100644 index 0000000000000000000000000000000000000000..2e3d9705d8aaab9e8e6b426febb528c630e2928b --- /dev/null +++ b/app/src/main/res/drawable/ic_format_italic.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M10,4V7H12.21L8.79,15H6V18H14V15H11.79L15.21,7H18V4H10Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_format_monospace.xml b/app/src/main/res/drawable/ic_format_monospace.xml new file mode 100644 index 0000000000000000000000000000000000000000..c94b1887a4991c98e101b1ee422d8c1b67f9bc1b --- /dev/null +++ b/app/src/main/res/drawable/ic_format_monospace.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M14.6,16.6L19.2,12L14.6,7.4L16,6L22,12L16,18L14.6,16.6M9.4,16.6L4.8,12L9.4,7.4L8,6L2,12L8,18L9.4,16.6Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_format_strikethrough.xml b/app/src/main/res/drawable/ic_format_strikethrough.xml new file mode 100644 index 0000000000000000000000000000000000000000..33c12f8267b9e7549a62e361a018f292fa8279b4 --- /dev/null +++ b/app/src/main/res/drawable/ic_format_strikethrough.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M23,12V14H18.61C19.61,16.14 19.56,22 12.38,22C4.05,22.05 4.37,15.5 4.37,15.5L8.34,15.55C8.37,18.92 11.5,18.92 12.12,18.88C12.76,18.83 15.15,18.84 15.34,16.5C15.42,15.41 14.32,14.58 13.12,14H1V12H23M19.41,7.89L15.43,7.86C15.43,7.86 15.6,5.09 12.15,5.08C8.7,5.06 9,7.28 9,7.56C9.04,7.84 9.34,9.22 12,9.88H5.71C5.71,9.88 2.22,3.15 10.74,2C19.45,0.8 19.43,7.91 19.41,7.89Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_format_underline.xml b/app/src/main/res/drawable/ic_format_underline.xml new file mode 100644 index 0000000000000000000000000000000000000000..963f2c45b83afce6362942f11bc1fbb2dae350d1 --- /dev/null +++ b/app/src/main/res/drawable/ic_format_underline.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M5,21H19V19H5V21M12,17A6,6 0 0,0 18,11V3H15.5V11A3.5,3.5 0 0,1 12,14.5A3.5,3.5 0 0,1 8.5,11V3H6V11A6,6 0 0,0 12,17Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_forward.xml b/app/src/main/res/drawable/ic_forward.xml new file mode 100644 index 0000000000000000000000000000000000000000..9b3ad4ee11963aa8c50b0d653dbd6ce761fd10c6 --- /dev/null +++ b/app/src/main/res/drawable/ic_forward.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:drawable="@drawable/ic_arrow_right" android:state_checked="false" /> + <item android:drawable="@drawable/ic_check" android:state_checked="true" /> +</selector> diff --git a/app/src/main/res/drawable/ic_help.xml b/app/src/main/res/drawable/ic_help.xml new file mode 100644 index 0000000000000000000000000000000000000000..acfe3459cbe2a8c564118cfc84a8cd664d99bc73 --- /dev/null +++ b/app/src/main/res/drawable/ic_help.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M15.07,11.25L14.17,12.17C13.45,12.89 13,13.5 13,15H11V14.5C11,13.39 11.45,12.39 12.17,11.67L13.41,10.41C13.78,10.05 14,9.55 14,9C14,7.89 13.1,7 12,7A2,2 0 0,0 10,9H8A4,4 0 0,1 12,5A4,4 0 0,1 16,9C16,9.88 15.64,10.67 15.07,11.25M13,19H11V17H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_history.xml b/app/src/main/res/drawable/ic_history.xml new file mode 100644 index 0000000000000000000000000000000000000000..0a637d61ecb3a4c90137bf7ad07fb33307d69050 --- /dev/null +++ b/app/src/main/res/drawable/ic_history.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M11,7V12.11L15.71,14.9L16.5,13.62L12.5,11.25V7M12.5,2C8.97,2 5.91,3.92 4.27,6.77L2,4.5V11H8.5L5.75,8.25C6.96,5.73 9.5,4 12.5,4A7.5,7.5 0 0,1 20,11.5A7.5,7.5 0 0,1 12.5,19C9.23,19 6.47,16.91 5.44,14H3.34C4.44,18.03 8.11,21 12.5,21C17.74,21 22,16.75 22,11.5A9.5,9.5 0 0,0 12.5,2Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_info.xml b/app/src/main/res/drawable/ic_info.xml new file mode 100644 index 0000000000000000000000000000000000000000..e3d92efad5897bd3878cc6b9b77b1a1f6beabcc2 --- /dev/null +++ b/app/src/main/res/drawable/ic_info.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_key_variant.xml b/app/src/main/res/drawable/ic_key_variant.xml new file mode 100644 index 0000000000000000000000000000000000000000..0fc71d186644ec943fd97ab7099efe9eecfaf0c9 --- /dev/null +++ b/app/src/main/res/drawable/ic_key_variant.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M22,18V22H18V19H15V16H12L9.74,13.74C9.19,13.91 8.61,14 8,14A6,6 0 0,1 2,8A6,6 0 0,1 8,2A6,6 0 0,1 14,8C14,8.61 13.91,9.19 13.74,9.74L22,18M7,5A2,2 0 0,0 5,7A2,2 0 0,0 7,9A2,2 0 0,0 9,7A2,2 0 0,0 7,5Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_link.xml b/app/src/main/res/drawable/ic_link.xml new file mode 100644 index 0000000000000000000000000000000000000000..8286226cdbff92e7f6390e7f22c64a37f6758539 --- /dev/null +++ b/app/src/main/res/drawable/ic_link.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M3.9,12C3.9,10.29 5.29,8.9 7,8.9H11V7H7A5,5 0 0,0 2,12A5,5 0 0,0 7,17H11V15.1H7C5.29,15.1 3.9,13.71 3.9,12M8,13H16V11H8V13M17,7H13V8.9H17C18.71,8.9 20.1,10.29 20.1,12C20.1,13.71 18.71,15.1 17,15.1H13V17H17A5,5 0 0,0 22,12A5,5 0 0,0 17,7Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_list_bulleted.xml b/app/src/main/res/drawable/ic_list_bulleted.xml new file mode 100644 index 0000000000000000000000000000000000000000..9436e676bbf4ec364ce269fce7f11c000a81fedd --- /dev/null +++ b/app/src/main/res/drawable/ic_list_bulleted.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M7,5H21V7H7V5M7,13V11H21V13H7M4,4.5A1.5,1.5 0 0,1 5.5,6A1.5,1.5 0 0,1 4,7.5A1.5,1.5 0 0,1 2.5,6A1.5,1.5 0 0,1 4,4.5M4,10.5A1.5,1.5 0 0,1 5.5,12A1.5,1.5 0 0,1 4,13.5A1.5,1.5 0 0,1 2.5,12A1.5,1.5 0 0,1 4,10.5M7,19V17H21V19H7M4,16.5A1.5,1.5 0 0,1 5.5,18A1.5,1.5 0 0,1 4,19.5A1.5,1.5 0 0,1 2.5,18A1.5,1.5 0 0,1 4,16.5Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_lock.xml b/app/src/main/res/drawable/ic_lock.xml new file mode 100644 index 0000000000000000000000000000000000000000..e9ec82f183608c8ddd4e2a8031577950cc96900c --- /dev/null +++ b/app/src/main/res/drawable/ic_lock.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M12,17A2,2 0 0,0 14,15C14,13.89 13.1,13 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V10C4,8.89 4.9,8 6,8H7V6A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,3A3,3 0 0,0 9,6V8H15V6A3,3 0 0,0 12,3Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_lock_open.xml b/app/src/main/res/drawable/ic_lock_open.xml new file mode 100644 index 0000000000000000000000000000000000000000..ee938fc9d84eb5a2fc37bb22cd07a7bd4ea5ae80 --- /dev/null +++ b/app/src/main/res/drawable/ic_lock_open.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M18,20V10H6V20H18M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V10A2,2 0 0,1 6,8H15V6A3,3 0 0,0 12,3A3,3 0 0,0 9,6H7A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,17A2,2 0 0,1 10,15A2,2 0 0,1 12,13A2,2 0 0,1 14,15A2,2 0 0,1 12,17Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_message_bulleted.xml b/app/src/main/res/drawable/ic_message_bulleted.xml new file mode 100644 index 0000000000000000000000000000000000000000..ce2ad4d973af0e3502811d413aff2f06c33d45d0 --- /dev/null +++ b/app/src/main/res/drawable/ic_message_bulleted.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M20,2H4A2,2 0 0,0 2,4V22L6,18H20A2,2 0 0,0 22,16V4A2,2 0 0,0 20,2M8,14H6V12H8V14M8,11H6V9H8V11M8,8H6V6H8V8M15,14H10V12H15V14M18,11H10V9H18V11M18,8H10V6H18V8Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_modify.xml b/app/src/main/res/drawable/ic_modify.xml new file mode 100644 index 0000000000000000000000000000000000000000..fb269e881d0472b8fd3ecc82973cb87acbbcc7f5 --- /dev/null +++ b/app/src/main/res/drawable/ic_modify.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_no_encryption.xml b/app/src/main/res/drawable/ic_no_encryption.xml new file mode 100644 index 0000000000000000000000000000000000000000..f606c55be019ae086b47b32ae785f8e584f91e24 --- /dev/null +++ b/app/src/main/res/drawable/ic_no_encryption.xml @@ -0,0 +1,10 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:tint="?attr/colorControlNormal" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M21,21.78L4.22,5 3,6.22l2.04,2.04C4.42,8.6 4,9.25 4,10v10c0,1.1 0.9,2 2,2h12c0.23,0 0.45,-0.05 0.66,-0.12L19.78,23 21,21.78zM8.9,6c0,-1.71 1.39,-3.1 3.1,-3.1s3.1,1.39 3.1,3.1v2H9.66L20,18.34V10c0,-1.1 -0.9,-2 -2,-2h-1V6c0,-2.76 -2.24,-5 -5,-5 -2.56,0 -4.64,1.93 -4.94,4.4L8.9,7.24V6z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_pencil.xml b/app/src/main/res/drawable/ic_pencil.xml new file mode 100644 index 0000000000000000000000000000000000000000..fb269e881d0472b8fd3ecc82973cb87acbbcc7f5 --- /dev/null +++ b/app/src/main/res/drawable/ic_pencil.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_reorder.xml b/app/src/main/res/drawable/ic_reorder.xml new file mode 100644 index 0000000000000000000000000000000000000000..77d6409f5b7b9a1e0a65b1108e14ce57225c3f91 --- /dev/null +++ b/app/src/main/res/drawable/ic_reorder.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M3,15H21V13H3V15M3,19H21V17H3V19M3,11H21V9H3V11M3,5V7H21V5H3Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_save.xml b/app/src/main/res/drawable/ic_save.xml new file mode 100644 index 0000000000000000000000000000000000000000..e86827cfa066a2fbc3477248651fc49e804e4cff --- /dev/null +++ b/app/src/main/res/drawable/ic_save.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M15,9H5V5H15M12,19A3,3 0 0,1 9,16A3,3 0 0,1 12,13A3,3 0 0,1 15,16A3,3 0 0,1 12,19M17,3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V7L17,3Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_scroll_down.xml b/app/src/main/res/drawable/ic_scroll_down.xml new file mode 100644 index 0000000000000000000000000000000000000000..2d06f07dd69b0e0383dc4c51f71e5d0a2880da47 --- /dev/null +++ b/app/src/main/res/drawable/ic_scroll_down.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M16.59,5.59L18,7L12,13L6,7L7.41,5.59L12,10.17L16.59,5.59M16.59,11.59L18,13L12,19L6,13L7.41,11.59L12,16.17L16.59,11.59Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_search.xml b/app/src/main/res/drawable/ic_search.xml new file mode 100644 index 0000000000000000000000000000000000000000..7abf594a74527f38eefc7e48a61310f8e66caf11 --- /dev/null +++ b/app/src/main/res/drawable/ic_search.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_send.xml b/app/src/main/res/drawable/ic_send.xml new file mode 100644 index 0000000000000000000000000000000000000000..0e6c810f9fb789e242601a0eb973f1a69ea635d9 --- /dev/null +++ b/app/src/main/res/drawable/ic_send.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M2,21L23,12L2,3V10L17,12L2,14V21Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_server.xml b/app/src/main/res/drawable/ic_server.xml new file mode 100644 index 0000000000000000000000000000000000000000..d0fbc8b50646e351b4894eda11fc05598a778d7b --- /dev/null +++ b/app/src/main/res/drawable/ic_server.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M13,18H14A1,1 0 0,1 15,19H22V21H15A1,1 0 0,1 14,22H10A1,1 0 0,1 9,21H2V19H9A1,1 0 0,1 10,18H11V16H4A1,1 0 0,1 3,15V11A1,1 0 0,1 4,10H20A1,1 0 0,1 21,11V15A1,1 0 0,1 20,16H13V18M4,2H20A1,1 0 0,1 21,3V7A1,1 0 0,1 20,8H4A1,1 0 0,1 3,7V3A1,1 0 0,1 4,2M9,6H10V4H9V6M9,14H10V12H9V14M5,4V6H7V4H5M5,12V14H7V12H5Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_server_network.xml b/app/src/main/res/drawable/ic_server_network.xml new file mode 100644 index 0000000000000000000000000000000000000000..d0fbc8b50646e351b4894eda11fc05598a778d7b --- /dev/null +++ b/app/src/main/res/drawable/ic_server_network.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M13,18H14A1,1 0 0,1 15,19H22V21H15A1,1 0 0,1 14,22H10A1,1 0 0,1 9,21H2V19H9A1,1 0 0,1 10,18H11V16H4A1,1 0 0,1 3,15V11A1,1 0 0,1 4,10H20A1,1 0 0,1 21,11V15A1,1 0 0,1 20,16H13V18M4,2H20A1,1 0 0,1 21,3V7A1,1 0 0,1 20,8H4A1,1 0 0,1 3,7V3A1,1 0 0,1 4,2M9,6H10V4H9V6M9,14H10V12H9V14M5,4V6H7V4H5M5,12V14H7V12H5Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_settings.xml b/app/src/main/res/drawable/ic_settings.xml new file mode 100644 index 0000000000000000000000000000000000000000..22f0c1b30aa69e6444f4cc730189c1b94664c784 --- /dev/null +++ b/app/src/main/res/drawable/ic_settings.xml @@ -0,0 +1,30 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24" + tools:ignore="VectorPath"> + <path + android:fillColor="#000" + android:pathData="M12,15.5A3.5,3.5 0 0,1 8.5,12A3.5,3.5 0 0,1 12,8.5A3.5,3.5 0 0,1 15.5,12A3.5,3.5 0 0,1 12,15.5M19.43,12.97C19.47,12.65 19.5,12.33 19.5,12C19.5,11.67 19.47,11.34 19.43,11L21.54,9.37C21.73,9.22 21.78,8.95 21.66,8.73L19.66,5.27C19.54,5.05 19.27,4.96 19.05,5.05L16.56,6.05C16.04,5.66 15.5,5.32 14.87,5.07L14.5,2.42C14.46,2.18 14.25,2 14,2H10C9.75,2 9.54,2.18 9.5,2.42L9.13,5.07C8.5,5.32 7.96,5.66 7.44,6.05L4.95,5.05C4.73,4.96 4.46,5.05 4.34,5.27L2.34,8.73C2.21,8.95 2.27,9.22 2.46,9.37L4.57,11C4.53,11.34 4.5,11.67 4.5,12C4.5,12.33 4.53,12.65 4.57,12.97L2.46,14.63C2.27,14.78 2.21,15.05 2.34,15.27L4.34,18.73C4.46,18.95 4.73,19.03 4.95,18.95L7.44,17.94C7.96,18.34 8.5,18.68 9.13,18.93L9.5,21.58C9.54,21.82 9.75,22 10,22H14C14.25,22 14.46,21.82 14.5,21.58L14.87,18.93C15.5,18.67 16.04,18.34 16.56,17.94L19.05,18.95C19.27,19.03 19.54,18.95 19.66,18.73L21.66,15.27C21.78,15.05 21.73,14.78 21.54,14.63L19.43,12.97Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_share.xml b/app/src/main/res/drawable/ic_share.xml new file mode 100644 index 0000000000000000000000000000000000000000..922d620f9f779e50c3c1da46593c40edb52589b5 --- /dev/null +++ b/app/src/main/res/drawable/ic_share.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M18,16.08C17.24,16.08 16.56,16.38 16.04,16.85L8.91,12.7C8.96,12.47 9,12.24 9,12C9,11.76 8.96,11.53 8.91,11.3L15.96,7.19C16.5,7.69 17.21,8 18,8A3,3 0 0,0 21,5A3,3 0 0,0 18,2A3,3 0 0,0 15,5C15,5.24 15.04,5.47 15.09,5.7L8.04,9.81C7.5,9.31 6.79,9 6,9A3,3 0 0,0 3,12A3,3 0 0,0 6,15C6.79,15 7.5,14.69 8.04,14.19L15.16,18.34C15.11,18.55 15.08,18.77 15.08,19C15.08,20.61 16.39,21.91 18,21.91C19.61,21.91 20.92,20.61 20.92,19A2.92,2.92 0 0,0 18,16.08Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_share_alternative.xml b/app/src/main/res/drawable/ic_share_alternative.xml new file mode 100644 index 0000000000000000000000000000000000000000..b850899bf518cbd124808d354b582d48675174cf --- /dev/null +++ b/app/src/main/res/drawable/ic_share_alternative.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M21,11L14,4V8C7,9 4,14 3,19C5.5,15.5 9,13.9 14,13.9V18L21,11Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_shortcut_channel_foreground.xml b/app/src/main/res/drawable/ic_shortcut_channel_foreground.xml new file mode 100644 index 0000000000000000000000000000000000000000..d8a97e096422feffcb38a954d0fef16dc304466e --- /dev/null +++ b/app/src/main/res/drawable/ic_shortcut_channel_foreground.xml @@ -0,0 +1,34 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="108dp" + android:height="108dp" + android:viewportWidth="108" + android:viewportHeight="108"> + <path + android:fillColor="#8affffff" + android:pathData="m47.116,47.211 0.885,-6.39a1.875,1.875 0 0 1 3.714,0.51l-0.81,5.859 8.337, + -0.045 0.879,-6.327a1.876,1.876 0 0 1 3.717,0.513l-0.804,5.796 4.827,-0.024a1.876,1.876 0 1 1 + 0.018,3.75l-5.367,0.027-0.993,7.164 5.136,-0.027a1.875,1.875 0 0 1 0.021,3.747l-5.676,0.03-0.915 + ,6.588a1.875,1.875 0 0 1-3.714,-0.516l0.84,-6.054-8.34,0.045-0.906,6.525a1.875,1.875 0 0 1-3.714 + ,-0.516l0.831,-5.991-4.254,0.021a1.875,1.875 0 0 1-0.018,-3.747l4.794,-0.024 1.512,-10.914-0.519 + ,3.75-4.563,0.024a1.875,1.875 0 0 1-0.018,-3.747zm3.267,3.732-0.993,7.164 8.337,-0.045 0.993, + -7.161z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_shortcut_query_foreground.xml b/app/src/main/res/drawable/ic_shortcut_query_foreground.xml new file mode 100644 index 0000000000000000000000000000000000000000..a70ea4ac314db8d9e9bac9ba5974dfa5d3540ebf --- /dev/null +++ b/app/src/main/res/drawable/ic_shortcut_query_foreground.xml @@ -0,0 +1,29 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="108dp" + android:height="108dp" + android:viewportWidth="108" + android:viewportHeight="108"> + <path + android:fillColor="#8affffff" + android:pathData="m 54,40 a 7,7 0 0 1 7,7 7,7 0 0 1 -7,7 7,7 0 0 1 -7,-7 7,7 0 0 1 7,-7 m 0,17 c + 7.735,0 14,3.1325 14,7 l 0,3.5 -28,0 0,-3.5 c 0,-3.8675 6.265,-7 14,-7 z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_sort.xml b/app/src/main/res/drawable/ic_sort.xml new file mode 100644 index 0000000000000000000000000000000000000000..af8a17cdcde0e274415e868df6f3ecd1ed41098c --- /dev/null +++ b/app/src/main/res/drawable/ic_sort.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M3,13H15V11H3M3,6V8H21V6M3,18H9V16H3V18Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_status.xml b/app/src/main/res/drawable/ic_status.xml new file mode 100644 index 0000000000000000000000000000000000000000..3bcd93482143b110c15976d9fec3de3dcc31a8f0 --- /dev/null +++ b/app/src/main/res/drawable/ic_status.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M12,12m-10,0a10,10 0,1 1,20 0a10,10 0,1 1,-20 0" /> +</vector> diff --git a/app/src/main/res/drawable/ic_status_channel.xml b/app/src/main/res/drawable/ic_status_channel.xml new file mode 100644 index 0000000000000000000000000000000000000000..dadfe489967381b6c49e9b3fd44b785aaa663eaf --- /dev/null +++ b/app/src/main/res/drawable/ic_status_channel.xml @@ -0,0 +1,34 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="20" + android:viewportHeight="20"> + <path + android:fillColor="#000" + android:pathData="M0,10a10,10 0 1,0 20,0 10,10 0 1,0-20,0 + M7.7,7.7l0.295,-2.13a0.625,0.625 0 0 1 1.238,0.17l-0.27,1.953 2.779,-0.015 0.293,-2.109a + 0.625,0.625 0 0 1 1.239,0.171l-0.268,1.932 1.609,0a0.625,0.625 0 1 1 0,1.25l-1.789,0-0.331,2.388 + 1.712,0a0.625,0.625 0 0 1 0,1.249l-1.892,0.01-0.305,2.196a0.625,0.625 0 0 1-1.238,-0.172l0.28, + -2.018-2.78,0.015-0.302,2.175a0.625,0.625 0 0 1-1.238,-0.172l0.277,-1.997-1.418,0a0.625,0.625 0 + 0 1 0,-1.249l1.598,0 0.504,-3.638-0.173,1.25-1.521,0a0.625,0.625 0 0 1 0,-1.25z + M7.7,7.7m1.089,1.25-0.331,2.388 2.779,-0.015 0.331,-2.387z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_status_channel_offline.xml b/app/src/main/res/drawable/ic_status_channel_offline.xml new file mode 100644 index 0000000000000000000000000000000000000000..1951f1ab05b6a10c9aaedb7373014cdeb933e352 --- /dev/null +++ b/app/src/main/res/drawable/ic_status_channel_offline.xml @@ -0,0 +1,35 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="20" + android:viewportHeight="20"> + <path + android:fillColor="#000" + android:pathData="M0,10a10,10 0 1,0 20,0 10,10 0 1,0-20,0 + m1.5,0a8.5,8.5 0 0,1 17,0a8.5,8.5 0 0,1-17,0 + M7.7,7.7l0.295,-2.13a0.625,0.625 0 0 1 1.238,0.17l-0.27,1.953 2.779,-0.015 0.293,-2.109a + 0.625,0.625 0 0 1 1.239,0.171l-0.268,1.932 1.609,0a0.625,0.625 0 1 1 0,1.25l-1.789,0-0.331,2.388 + 1.712,0a0.625,0.625 0 0 1 0,1.249l-1.892,0.01-0.305,2.196a0.625,0.625 0 0 1-1.238,-0.172l0.28, + -2.018-2.78,0.015-0.302,2.175a0.625,0.625 0 0 1-1.238,-0.172l0.277,-1.997-1.418,0a0.625,0.625 0 + 0 1 0,-1.249l1.598,0 0.504,-3.638-0.173,1.25-1.521,0a0.625,0.625 0 0 1 0,-1.25z + M7.7,7.7m1.089,1.25-0.331,2.388 2.779,-0.015 0.331,-2.387z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_status_offline.xml b/app/src/main/res/drawable/ic_status_offline.xml new file mode 100644 index 0000000000000000000000000000000000000000..0092e97b116010c0b4f5371f19ed41dd3346d6c4 --- /dev/null +++ b/app/src/main/res/drawable/ic_status_offline.xml @@ -0,0 +1,29 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="20" + android:viewportHeight="20"> + <path + android:fillColor="#000" + android:pathData="M0,10a10,10 0 1,0 20,0 10,10 0 1,0-20,0 + m1.5,0a8.5,8.5 0 0,1 17,0a8.5,8.5 0 0,1-17,0" /> +</vector> diff --git a/app/src/main/res/drawable/ic_tab.xml b/app/src/main/res/drawable/ic_tab.xml new file mode 100644 index 0000000000000000000000000000000000000000..cbed5d9551f95f894d56da158c9a3712619af473 --- /dev/null +++ b/app/src/main/res/drawable/ic_tab.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M20,18H22V6H20M11.59,7.41L15.17,11H1V13H15.17L11.59,16.58L13,18L19,12L13,6L11.59,7.41Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_tag_text.xml b/app/src/main/res/drawable/ic_tag_text.xml new file mode 100644 index 0000000000000000000000000000000000000000..b4864d45966533041893a58a4eb35f8bc07bcfc8 --- /dev/null +++ b/app/src/main/res/drawable/ic_tag_text.xml @@ -0,0 +1,28 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#000" + android:pathData="M5.5,7A1.5,1.5 0 0,0 7,5.5A1.5,1.5 0 0,0 5.5,4A1.5,1.5 0 0,0 4,5.5A1.5,1.5 0 0,0 5.5,7M21.41,11.58C21.77,11.94 22,12.44 22,13C22,13.55 21.78,14.05 21.41,14.41L14.41,21.41C14.05,21.77 13.55,22 13,22C12.45,22 11.95,21.77 11.58,21.41L2.59,12.41C2.22,12.05 2,11.55 2,11V4C2,2.89 2.89,2 4,2H11C11.55,2 12.05,2.22 12.41,2.58L21.41,11.58M13,20L20,13L11.5,4.5L4.5,11.5L13,20M10.09,8.91L11.5,7.5L17,13L15.59,14.41L10.09,8.91M7.59,11.41L9,10L13,14L11.59,15.41L7.59,11.41Z" /> +</vector> diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_legacy.png b/app/src/main/res/mipmap-hdpi/ic_launcher_legacy.png new file mode 100644 index 0000000000000000000000000000000000000000..8d5a414da51e9443df573dec0d93cf2731d2b028 Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher_legacy.png differ diff --git a/app/src/main/res/mipmap-hdpi/ic_logo.png b/app/src/main/res/mipmap-hdpi/ic_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..0804110bfef5d9db1f711b3e7da021f061508bbe Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_logo.png differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_legacy.png b/app/src/main/res/mipmap-mdpi/ic_launcher_legacy.png new file mode 100644 index 0000000000000000000000000000000000000000..7317e659227c70c50880bc68d3bbece921a5b5c9 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher_legacy.png differ diff --git a/app/src/main/res/mipmap-mdpi/ic_logo.png b/app/src/main/res/mipmap-mdpi/ic_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..9c1150ee74015b8bc0c73bd10dce7ab729878933 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_logo.png differ diff --git a/app/src/main/res/mipmap-nodpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-nodpi/ic_launcher_foreground.png new file mode 100644 index 0000000000000000000000000000000000000000..c01a33781617789788086c3269383c094230bae9 Binary files /dev/null and b/app/src/main/res/mipmap-nodpi/ic_launcher_foreground.png differ diff --git a/app/src/main/res/mipmap-nodpi/ic_launcher_recents.png b/app/src/main/res/mipmap-nodpi/ic_launcher_recents.png new file mode 100644 index 0000000000000000000000000000000000000000..8719a83a8bfcc74daef1a5ffe7156367c3d155ca Binary files /dev/null and b/app/src/main/res/mipmap-nodpi/ic_launcher_recents.png differ diff --git a/app/src/main/res/mipmap-v26/ic_launcher.xml b/app/src/main/res/mipmap-v26/ic_launcher.xml new file mode 100644 index 0000000000000000000000000000000000000000..102979fec863ecb7857a936ed4a4a75992eb13b3 --- /dev/null +++ b/app/src/main/res/mipmap-v26/ic_launcher.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@drawable/ic_launcher_background" /> + <foreground android:drawable="@mipmap/ic_launcher_foreground" /> +</adaptive-icon> diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_legacy.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_legacy.png new file mode 100644 index 0000000000000000000000000000000000000000..4aaad0b9549b64ff4fe9d0a61c4f19d4bae2f3ec Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher_legacy.png differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_logo.png b/app/src/main/res/mipmap-xhdpi/ic_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..1009ed2db17c4b8092048dca461aab1c38c44913 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_logo.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_legacy.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_legacy.png new file mode 100644 index 0000000000000000000000000000000000000000..c1196016eea2aaad13c67cbd6fe87a18cda0ad20 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_legacy.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_logo.png b/app/src/main/res/mipmap-xxhdpi/ic_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..c19d713c35f9f1ed05c8a6cdf7765374f5db7fc3 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_logo.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_legacy.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_legacy.png new file mode 100644 index 0000000000000000000000000000000000000000..71f99b9a56e9e3e5d2b5266220642b5f101dbbc5 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_legacy.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_logo.png b/app/src/main/res/mipmap-xxxhdpi/ic_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..bb3dd1d3a0afb3bebae8076a7f58d1cb39baf2de Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_logo.png differ diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml new file mode 100644 index 0000000000000000000000000000000000000000..d6db0182e195cae938b8f830a3321e68df1603e7 --- /dev/null +++ b/app/src/main/res/values/colors.xml @@ -0,0 +1,153 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2020 Janne Mareike Koschinski + Copyright (c) 2020 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<resources> + <color name="colorPrimary">#0a70c0</color> + <color name="colorPrimaryDark">#105a94</color> + <color name="colorAccent">#ffaf3b</color> + + <color name="colorIconLight">#0291e7</color> + <color name="colorIconDark">#124e99</color> + + <color name="colorFillLight">#757575</color> + <color name="colorFillDark">#ffffff</color> + + <color name="colorOfflineLight">#757575</color> + <color name="colorOfflineDark">#B3B3B3</color> + + <color name="colorAwayLight">#959595</color> + <color name="colorAwayDark">#939393</color> + + <color name="ripple_dark">#33ffffff</color> + <color name="ripple_light">#1f000000</color> + + <!-- mirc colors --> + <color name="mircColor00">#ffffff</color> + <color name="mircColor01">#000000</color> + <color name="mircColor02">#000080</color> + <color name="mircColor03">#008000</color> + <color name="mircColor04">#ff0000</color> + <color name="mircColor05">#800000</color> + <color name="mircColor06">#800080</color> + <color name="mircColor07">#ffa500</color> + <color name="mircColor08">#ffff00</color> + <color name="mircColor09">#00ff00</color> + <color name="mircColor10">#008080</color> + <color name="mircColor11">#00ffff</color> + <color name="mircColor12">#4169e1</color> + <color name="mircColor13">#ff00ff</color> + <color name="mircColor14">#808080</color> + <color name="mircColor15">#c0c0c0</color> + + <color name="mircColor16">#470000</color> + <color name="mircColor28">#740000</color> + <color name="mircColor40">#b50000</color> + <color name="mircColor52">#ff0000</color> + <color name="mircColor64">#ff5959</color> + <color name="mircColor76">#ff9c9c</color> + + <color name="mircColor17">#472100</color> + <color name="mircColor29">#743a00</color> + <color name="mircColor41">#b56300</color> + <color name="mircColor53">#ff8c00</color> + <color name="mircColor65">#ffb459</color> + <color name="mircColor77">#ffd39c</color> + + <color name="mircColor18">#474700</color> + <color name="mircColor30">#747400</color> + <color name="mircColor42">#b5b500</color> + <color name="mircColor54">#ffff00</color> + <color name="mircColor66">#ffff71</color> + <color name="mircColor78">#ffff9c</color> + + <color name="mircColor19">#324700</color> + <color name="mircColor31">#517400</color> + <color name="mircColor43">#7db500</color> + <color name="mircColor55">#b2ff00</color> + <color name="mircColor67">#cfff60</color> + <color name="mircColor79">#e2ff9c</color> + + <color name="mircColor20">#004700</color> + <color name="mircColor32">#007400</color> + <color name="mircColor44">#00b500</color> + <color name="mircColor56">#00ff00</color> + <color name="mircColor68">#6fff6f</color> + <color name="mircColor80">#9cff9c</color> + + <color name="mircColor21">#00472c</color> + <color name="mircColor33">#007449</color> + <color name="mircColor45">#00b571</color> + <color name="mircColor57">#00ffa0</color> + <color name="mircColor69">#65ffc9</color> + <color name="mircColor81">#9cffdb</color> + + <color name="mircColor22">#004747</color> + <color name="mircColor34">#007474</color> + <color name="mircColor46">#00b5b5</color> + <color name="mircColor58">#00ffff</color> + <color name="mircColor70">#6dffff</color> + <color name="mircColor82">#9cffff</color> + + <color name="mircColor23">#002747</color> + <color name="mircColor35">#004074</color> + <color name="mircColor47">#0063b5</color> + <color name="mircColor59">#008cff</color> + <color name="mircColor71">#59b4ff</color> + <color name="mircColor83">#9cd3ff</color> + + <color name="mircColor24">#000047</color> + <color name="mircColor36">#000074</color> + <color name="mircColor48">#0000b5</color> + <color name="mircColor60">#0000ff</color> + <color name="mircColor72">#5959ff</color> + <color name="mircColor84">#9c9cff</color> + + <color name="mircColor25">#2e0047</color> + <color name="mircColor37">#4b0074</color> + <color name="mircColor49">#7500b5</color> + <color name="mircColor61">#a500ff</color> + <color name="mircColor73">#c459ff</color> + <color name="mircColor85">#dc9cff</color> + + <color name="mircColor26">#470047</color> + <color name="mircColor38">#740074</color> + <color name="mircColor50">#b500b5</color> + <color name="mircColor62">#ff00ff</color> + <color name="mircColor74">#ff66ff</color> + <color name="mircColor86">#ff9cff</color> + + <color name="mircColor27">#47002a</color> + <color name="mircColor39">#740045</color> + <color name="mircColor51">#b5006b</color> + <color name="mircColor63">#ff0098</color> + <color name="mircColor75">#ff59bc</color> + <color name="mircColor87">#ff94d3</color> + + <color name="mircColor88">#000000</color> + <color name="mircColor89">#131313</color> + <color name="mircColor90">#282828</color> + <color name="mircColor91">#363636</color> + <color name="mircColor92">#4d4d4d</color> + <color name="mircColor93">#656565</color> + <color name="mircColor94">#818181</color> + <color name="mircColor95">#9f9f9f</color> + <color name="mircColor96">#bcbcbc</color> + <color name="mircColor97">#e2e2e2</color> + <color name="mircColor98">#ffffff</color> +</resources> diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000000000000000000000000000000000000..a1699feb9b10e33b9d1689560273847d3a7e5c91 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,20 @@ +/* + * Quasseldroid - Quassel client for Android + * + * Copyright (c) 2021 Janne Mareike Koschinski + * Copyright (c) 2021 The Quassel Project + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 3 as published + * by the Free Software Foundation. + * + * 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/>. + */ + +group = "com.iskrembilen" diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000000000000000000000000000000000000..661a00443f508d287fef299c83fa08d6f29c4180 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,34 @@ +# Quasseldroid - Quassel client for Android +# +# Copyright (c) 2019 Janne Mareike Koschinski +# Copyright (c) 2019 The Quassel Project +# +# This program is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 3 as published +# by the Free Software Foundation. +# +# 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/>. +# Project-wide Gradle settings. +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +org.gradle.jvmargs=-Xmx2048m +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +#org.gradle.parallel=true +# Enable gradle build cache +#org.gradle.caching=true +# Enable AndroidX +android.useAndroidX=true +android.enableJetifier=true diff --git a/gradle/convention/build.gradle.kts b/gradle/convention/build.gradle.kts new file mode 100644 index 0000000000000000000000000000000000000000..a1449bfdab762306eecd897b09d60f47bdd97027 --- /dev/null +++ b/gradle/convention/build.gradle.kts @@ -0,0 +1,21 @@ +plugins { + `kotlin-dsl` +} + +repositories { + gradlePluginPortal() + mavenCentral() + google() +} + +dependencies { + implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10") + implementation("com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:1.6.10-1.0.4") + implementation("com.android.tools.build:gradle:7.1.2") +} + +configure<JavaPluginExtension> { + toolchain { + languageVersion.set(JavaLanguageVersion.of(8)) + } +} diff --git a/gradle/convention/gradle/wrapper/gradle-wrapper.jar b/gradle/convention/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..7454180f2ae8848c63b8b4dea2cb829da983f2fa Binary files /dev/null and b/gradle/convention/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/convention/gradle/wrapper/gradle-wrapper.properties b/gradle/convention/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000000000000000000000000000000000000..aa520627104195ad680a007476109668c21ab7e8 --- /dev/null +++ b/gradle/convention/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +distributionSha256Szm=8cc27038d5dbd815759851ba53e70cf62e481b87494cc97cfd97982ada5ba634 +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradle/convention/settings.gradle.kts b/gradle/convention/settings.gradle.kts new file mode 100644 index 0000000000000000000000000000000000000000..6ef6296c7c9204e61d1ea637baeef34642ce7f9a --- /dev/null +++ b/gradle/convention/settings.gradle.kts @@ -0,0 +1 @@ +rootProject.name = "convention" diff --git a/gradle/convention/src/main/kotlin/justjanne.android.app.gradle.kts b/gradle/convention/src/main/kotlin/justjanne.android.app.gradle.kts new file mode 100644 index 0000000000000000000000000000000000000000..d69dd7f7b6e4220250d8c7b06c3579f5867bb86d --- /dev/null +++ b/gradle/convention/src/main/kotlin/justjanne.android.app.gradle.kts @@ -0,0 +1,94 @@ +import java.io.ByteArrayOutputStream +import java.util.* + +plugins { + id("com.android.application") + id("justjanne.kotlin.android") +} + +android { + compileSdk = 31 + + defaultConfig { + minSdk = 21 + targetSdk = 31 + + applicationId = "${rootProject.group}.${rootProject.name.toLowerCase(Locale.ROOT)}" + versionCode = cmd("git", "rev-list", "--count", "HEAD")?.toIntOrNull() ?: 1 + versionName = cmd("git", "describe", "--always", "--tags", "HEAD") ?: "1.0.0" + + buildConfigField("String", "GIT_HEAD", "\"${cmd("git", "rev-parse", "HEAD") ?: ""}\"") + buildConfigField("String", "FANCY_VERSION_NAME", "\"${fancyVersionName() ?: ""}\"") + buildConfigField("long", "GIT_COMMIT_DATE", "${cmd("git", "show", "-s", "--format=%ct") ?: 0}L") + + signingConfig = signingConfigs.findByName("default") + + setProperty("archivesBaseName", "${rootProject.name}-$versionName") + + // Disable test runner analytics + testInstrumentationRunnerArguments["disableAnalytics"] = "true" + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + + testOptions { + unitTests.isIncludeAndroidResources = true + } + + lint { + warningsAsErrors = true + lintConfig = file("../lint.xml") + } +} + +fun Project.fancyVersionName(): String? { + val commit = cmd("git", "rev-parse", "HEAD") + val name = cmd("git", "describe", "--always", "--tags", "HEAD") + + return if (commit != null && name != null) "<a href=\\\"https://git.kuschku.de/justJanne/QuasselDroid-ng/commit/$commit\\\">$name</a>" + else name +} + +fun Project.cmd(vararg command: String) = try { + val stdOut = ByteArrayOutputStream() + exec { + commandLine(*command) + standardOutput = stdOut + } + stdOut.toString(Charsets.UTF_8.name()).trim() +} catch (e: Throwable) { + e.printStackTrace() + null +} + +fun Project.properties(fileName: String): Properties? { + val file = file(fileName) + if (!file.exists()) + return null + val props = Properties() + props.load(file.inputStream()) + return props +} + +data class SigningData( + val storeFile: String, + val storePassword: String, + val keyAlias: String, + val keyPassword: String +) { + companion object { + fun of(properties: Properties?): SigningData? { + if (properties == null) return null + + val storeFile = properties.getProperty("storeFile") ?: return null + val storePassword = properties.getProperty("storePassword") ?: return null + val keyAlias = properties.getProperty("keyAlias") ?: return null + val keyPassword = properties.getProperty("keyPassword") ?: return null + + return SigningData(storeFile, storePassword, keyAlias, keyPassword) + } + } +} diff --git a/gradle/convention/src/main/kotlin/justjanne.android.library.gradle.kts b/gradle/convention/src/main/kotlin/justjanne.android.library.gradle.kts new file mode 100644 index 0000000000000000000000000000000000000000..56e1dd501364ae29abf050edc789ba9e1b3925d4 --- /dev/null +++ b/gradle/convention/src/main/kotlin/justjanne.android.library.gradle.kts @@ -0,0 +1,23 @@ +plugins { + id("com.android.library") + id("justjanne.kotlin.android") +} + +android { + compileSdk = 31 + + defaultConfig { + minSdk = 21 + targetSdk = 31 + + consumerProguardFiles("proguard-rules.pro") + + // Disable test runner analytics + testInstrumentationRunnerArguments["disableAnalytics"] = "true" + } + + lint { + warningsAsErrors = true + lintConfig = file("../lint.xml") + } +} diff --git a/gradle/convention/src/main/kotlin/justjanne.android.signing.gradle.kts b/gradle/convention/src/main/kotlin/justjanne.android.signing.gradle.kts new file mode 100644 index 0000000000000000000000000000000000000000..deb2731f98dcd43ab4733b59561ac04b5b289d98 --- /dev/null +++ b/gradle/convention/src/main/kotlin/justjanne.android.signing.gradle.kts @@ -0,0 +1,51 @@ +import java.util.* + +plugins { + id("com.android.application") +} + +android { + signingConfigs { + SigningData.of(project.rootProject.properties("signing.properties"))?.let { + create("default") { + storeFile = file(it.storeFile) + storePassword = it.storePassword + keyAlias = it.keyAlias + keyPassword = it.keyPassword + } + } + } + + defaultConfig { + signingConfig = signingConfigs.findByName("default") + } +} + +fun Project.properties(fileName: String): Properties? { + val file = file(fileName) + if (!file.exists()) + return null + val props = Properties() + props.load(file.inputStream()) + return props +} + +data class SigningData( + val storeFile: String, + val storePassword: String, + val keyAlias: String, + val keyPassword: String +) { + companion object { + fun of(properties: Properties?): SigningData? { + if (properties == null) return null + + val storeFile = properties.getProperty("storeFile") ?: return null + val storePassword = properties.getProperty("storePassword") ?: return null + val keyAlias = properties.getProperty("keyAlias") ?: return null + val keyPassword = properties.getProperty("keyPassword") ?: return null + + return SigningData(storeFile, storePassword, keyAlias, keyPassword) + } + } +} diff --git a/gradle/convention/src/main/kotlin/justjanne.java.gradle.kts b/gradle/convention/src/main/kotlin/justjanne.java.gradle.kts new file mode 100644 index 0000000000000000000000000000000000000000..ca33bb8d73f0a3cf8acd17992d5893f926de85ed --- /dev/null +++ b/gradle/convention/src/main/kotlin/justjanne.java.gradle.kts @@ -0,0 +1,10 @@ +plugins { + java + id("justjanne.repositories") +} + +configure<JavaPluginExtension> { + toolchain { + languageVersion.set(JavaLanguageVersion.of(8)) + } +} diff --git a/gradle/convention/src/main/kotlin/justjanne.kotlin.android.gradle.kts b/gradle/convention/src/main/kotlin/justjanne.kotlin.android.gradle.kts new file mode 100644 index 0000000000000000000000000000000000000000..fc84b973d233756575149499bfcf9c589c712729 --- /dev/null +++ b/gradle/convention/src/main/kotlin/justjanne.kotlin.android.gradle.kts @@ -0,0 +1,23 @@ +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + +plugins { + id("justjanne.repositories") + id("com.google.devtools.ksp") + kotlin("android") + kotlin("kapt") +} + +dependencies { + "implementation"("org.jetbrains.kotlin:kotlin-stdlib:1.6.10") +} + +tasks.withType<KotlinCompile> { + kotlinOptions { + freeCompilerArgs = listOf( + "-opt-in=kotlin.ExperimentalUnsignedTypes", + "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi", + "-opt-in=androidx.compose.ui.ExperimentalComposeUiApi", + ) + jvmTarget = "1.8" + } +} diff --git a/gradle/convention/src/main/kotlin/justjanne.kotlin.gradle.kts b/gradle/convention/src/main/kotlin/justjanne.kotlin.gradle.kts new file mode 100644 index 0000000000000000000000000000000000000000..39b8cf9c07cfaec8bb2085d7055cce183abe7266 --- /dev/null +++ b/gradle/convention/src/main/kotlin/justjanne.kotlin.gradle.kts @@ -0,0 +1,24 @@ +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + +plugins { + id("justjanne.java") + id("justjanne.repositories") + id("com.google.devtools.ksp") + kotlin("jvm") + kotlin("kapt") +} + +dependencies { + implementation("org.jetbrains.kotlin:kotlin-stdlib:1.6.10") +} + +tasks.withType<KotlinCompile> { + kotlinOptions { + freeCompilerArgs = listOf( + "-opt-in=kotlin.ExperimentalUnsignedTypes", + "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi", + "-opt-in=androidx.compose.ui.ExperimentalComposeUiApi", + ) + jvmTarget = "1.8" + } +} diff --git a/gradle/convention/src/main/kotlin/justjanne.repositories.gradle.kts b/gradle/convention/src/main/kotlin/justjanne.repositories.gradle.kts new file mode 100644 index 0000000000000000000000000000000000000000..01861dc9958065116e74f74d50c65d4022cd8624 --- /dev/null +++ b/gradle/convention/src/main/kotlin/justjanne.repositories.gradle.kts @@ -0,0 +1,5 @@ +repositories { + mavenCentral() + google() + maven(url = "https://jitpack.io") +} diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 0000000000000000000000000000000000000000..fdcd6bae8a0f3e64a481b7984b916c8d1b6650ea --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,30 @@ +[versions] +libquassel = "0.8.1" +androidx-activity = "1.4.0" +androidx-appcompat = "1.4.1" +androidx-compose = "1.1.1" +androidx-navigation = "2.4.1" + +[libraries] +libquassel-protocol = { module = "de.justjanne.libquassel:libquassel-protocol", version.ref = "libquassel" } +libquassel-client = { module = "de.justjanne.libquassel:libquassel-client", version.ref = "libquassel" } + +androidx-activity = { module = "androidx.activity:activity-ktx", version.ref = "androidx-activity" } +androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activity" } + +androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx-appcompat" } +androidx-appcompat-resources = { module = "androidx.appcompat:appcompat-resources", version.ref = "androidx-appcompat" } + +androidx-compose-animation = { module = "androidx.compose.animation:animation", version.ref = "androidx-compose" } +androidx-compose-compiler = { module = "androidx.compose.compiler:compiler", version.ref = "androidx-compose" } +androidx-compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "androidx-compose" } +androidx-compose-material = { module = "androidx.compose.material:material", version.ref = "androidx-compose" } +androidx-compose-runtime = { module = "androidx.compose.runtime:runtime", version.ref = "androidx-compose" } +androidx-compose-ui = { module = "androidx.compose.ui:ui", version.ref = "androidx-compose" } +androidx-compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "androidx-compose" } +androidx-compose-ui-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "androidx-compose" } +androidx-compose-ui-test = { module = "androidx.compose.ui:ui-test", version.ref = "androidx-compose" } + +androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "androidx-navigation" } + +compose-htmltext = { module = "de.charlex.compose:html-text", version = "1.1.0" } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..7454180f2ae8848c63b8b4dea2cb829da983f2fa Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000000000000000000000000000000000000..aa520627104195ad680a007476109668c21ab7e8 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +distributionSha256Szm=8cc27038d5dbd815759851ba53e70cf62e481b87494cc97cfd97982ada5ba634 +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100755 index 0000000000000000000000000000000000000000..4f906e0c811fc9e230eb44819f509cd0627f2600 --- /dev/null +++ b/gradlew @@ -0,0 +1,185 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# 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 +# +# https://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. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=`expr $i + 1` + done + case $i in + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=`save "$@"` + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000000000000000000000000000000000000..107acd32c4e687021ef32db511e8a206129b88ec --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/lint.xml b/lint.xml new file mode 100644 index 0000000000000000000000000000000000000000..eab67bd5e6f29d10e42082945d8a9195c76e4777 --- /dev/null +++ b/lint.xml @@ -0,0 +1,53 @@ +<!-- + Quasseldroid - Quassel client for Android + + Copyright (c) 2019 Janne Mareike Koschinski + Copyright (c) 2019 The Quassel Project + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation. + + 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/>. + --> + +<lint> + <issue id="NewerVersionAvailable" severity="error" /> + + <!-- Because of course paging and room have incompatible versions --> + <issue id="GradleCompatible" severity="ignore" /> + + <!-- Because these are entirely broken --> + <issue id="ResourceType" severity="ignore" /> + <issue id="UnusedResources" severity="ignore" /> + <issue id="ObsoleteLintCustomCheck" severity="ignore" /> + <issue id="UnusedAttribute" severity="informational" /> + + <!-- Because this doesn’t work when using splash themes --> + <issue id="Overdraw" severity="ignore" /> + + <!-- Can’t request a translation without a release, can’t release without translation --> + <issue id="MissingTranslation" severity="informational" /> + <!-- Because we don’t use app bundles and never will use them --> + <issue id="AppBundleLocaleChanges" severity="informational" /> + <!-- Because this tries to apply english orthography to other locales --> + <issue id="Typos" severity="ignore" /> + + <!-- Because Autofill isn’t a priority at the moment --> + <issue id="Autofill" severity="informational" /> + + <!-- We’re not using AGP 5 yet, and once we are, we’ll use compose anyway --> + <issue id="NonConstantResourceId" severity="informational" /> + + <!-- It’s only used for testing --> + <issue id="TrustAllX509TrustManager" severity="informational" /> + + <!-- TODO for the future --> + <issue id="DataExtractionRules" severity="informational" /> +</lint> diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 0000000000000000000000000000000000000000..81fea8fd302e6991295ef6c8d8949b02642f6fc4 --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,33 @@ +/* + * Quasseldroid - Quassel client for Android + * + * Copyright (c) 2019 Janne Mareike Koschinski + * Copyright (c) 2019 The Quassel Project + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 3 as published + * by the Free Software Foundation. + * + * 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/>. + */ +enableFeaturePreview("VERSION_CATALOGS") + +rootProject.name = "Quasseldroid" + +includeBuild("gradle/convention") + +include(":app") + +pluginManagement { + repositories { + gradlePluginPortal() + google() + mavenCentral() + } +}