Squashed commit of the following:
commitd6f48a8338
Author: Rene Vergara <rene@vergara.network> Date: Thu May 19 15:15:09 2022 -0500 Bump version commitc40c742b81
Author: Rene Vergara <rene@vergara.network> Date: Thu May 19 15:13:41 2022 -0500 Remove legacy backend and update license commitb8ea3e79cf
Author: Rene Vergara <rene@vergara.network> Date: Wed May 18 16:07:26 2022 -0500 Integrate the settings component commit79e73ec89d
Author: Rene Vergara <rene@vergara.network> Date: Wed May 18 15:51:39 2022 -0500 Integrate with new backend commit68d03b6602
Author: Rene Vergara <rene@vergara.network> Date: Tue Apr 19 15:36:30 2022 -0500 Fix #2 commitd4be174b2d
Author: Rene Vergara <rene@vergara.network> Date: Mon Apr 11 09:31:08 2022 -0500 Add MIT license commit6dddceff55
Author: Rene Vergara <rene@vergara.network> Date: Sun Apr 10 09:41:16 2022 -0500 Update README commit8e98bff2ae
Author: Rene Vergara <rene@vergara.network> Date: Fri Apr 8 18:23:13 2022 -0500 Implement receipt QR code commit934e28446c
Author: Rene Vergara <rene@vergara.network> Date: Fri Mar 25 18:57:02 2022 -0500 Begin receipt component commit4f0253e6b2
Author: Rene Vergara <rene@vergara.network> Date: Mon Mar 7 14:53:10 2022 -0600 Enable zats on display commit42dbd88e28
Author: Rene Vergara <rene@vergara.network> Date: Mon Mar 7 13:46:00 2022 -0600 Enable front end setting for zats commit29a90b8614
Author: Rene Vergara <rene@vergara.network> Date: Mon Mar 7 13:45:45 2022 -0600 Fix bug for payment read commit8130856d8f
Author: Rene Vergara <rene@vergara.network> Date: Mon Mar 7 11:14:29 2022 -0600 Add zats setting parameter to backend commit43c34958f1
Author: Rene Vergara <rene@vergara.network> Date: Tue Feb 8 13:38:29 2022 -0600 Improve biz form arrangement commit0ca495a811
Author: Rene Vergara <rene@vergara.network> Date: Wed Feb 2 12:30:05 2022 -0600 Update app version commit770852640c
Author: Rene Vergara <rene@vergara.network> Date: Wed Feb 2 12:26:58 2022 -0600 Fix bug of detecting payment commita42f04cd4a
Author: Rene Vergara <rene@vergara.network> Date: Wed Feb 2 12:26:21 2022 -0600 Fix bug when deleting the last item commita22dc1aac3
Author: Rene Vergara <rene@vergara.network> Date: Wed Feb 2 10:36:29 2022 -0600 Update app version commitf33a920d29
Author: Rene Vergara <rene@vergara.network> Date: Tue Feb 1 12:56:02 2022 -0600 Refactor the confirm dialog to re-use commit372c7eacf5
Author: Rene Vergara <rene@vergara.network> Date: Tue Feb 1 12:04:16 2022 -0600 Enable logout commitba631ebf24
Author: Rene Vergara <rene@vergara.network> Date: Mon Jan 31 15:32:46 2022 -0600 Fix bug on order saving commitd61a1169fd
Author: Rene Vergara <rene@vergara.network> Date: Fri Jan 28 15:38:27 2022 -0600 Update title look of Cancel component commit5c36be8fc7
Author: Rene Vergara <rene@vergara.network> Date: Fri Jan 28 15:37:41 2022 -0600 Update look of Terms of Use commit5e5089af43
Author: Rene Vergara <rene@vergara.network> Date: Fri Jan 28 14:03:35 2022 -0600 Add business contact name commit031c4f8a87
Author: Rene Vergara <rene@vergara.network> Date: Fri Jan 28 14:03:05 2022 -0600 Add Terms of Use commit8a165eefb6
Author: Rene Vergara <rene@vergara.network> Date: Tue Jan 25 16:41:23 2022 -0600 Look and feel improvements for wide screens commitaaed144151
Author: Rene Vergara <rene@vergara.network> Date: Tue Jan 25 15:54:31 2022 -0600 Update font commit323ffcc50b
Author: Rene Vergara <rene@vergara.network> Date: Tue Jan 25 15:20:01 2022 -0600 Implement payment checks in API commitd8380ec33f
Author: Rene Vergara <rene@vergara.network> Date: Sat Jan 22 07:50:39 2022 -0600 Update modules commitf5a14bf7d7
Author: Rene Vergara <rene@vergara.network> Date: Sat Jan 22 07:49:22 2022 -0600 Implement biz info form commit5f80b1d912
Author: Rene Vergara <rene@vergara.network> Date: Wed Jan 19 14:50:00 2022 -0600 Implement Country search commit881bb1baf1
Author: Rene Vergara <rene@vergara.network> Date: Wed Jan 19 10:26:25 2022 -0600 Add country field commitea8febe368
Author: Rene Vergara <rene@vergara.network> Date: Tue Jan 18 16:40:50 2022 -0600 Create component for business info commit0044f25edb
Author: Rene Vergara <rene@vergara.network> Date: Tue Jan 18 16:40:36 2022 -0600 Modify login routing commit36242cffb9
Author: Rene Vergara <rene@vergara.network> Date: Tue Jan 18 16:40:20 2022 -0600 Add website field to owner commit57d06873f5
Author: Rene Vergara <rene@vergara.network> Date: Mon Jan 17 14:49:21 2022 -0600 Change auth guard to check for payment commitc40ac0fd44
Author: Rene Vergara <rene@vergara.network> Date: Mon Jan 17 14:49:08 2022 -0600 Add new fields for Owner commitc9f84f1a28
Author: Rene Vergara <rene@vergara.network> Date: Mon Jan 17 13:39:26 2022 -0600 Update API server to process logins and pays commit57781690a0
Author: Rene Vergara <rene@vergara.network> Date: Mon Jan 17 12:14:33 2022 -0600 Add payment schema commit18f1667a00
Author: Rene Vergara <rene@vergara.network> Date: Sat Jan 15 07:59:25 2022 -0600 Add new font and update login commit1134f1760c
Author: Rene Vergara <rene@vergara.network> Date: Sat Jan 15 07:58:56 2022 -0600 Allow for memo amount in scan component commitf6a41f3893
Merge:47f2903
55dc475
Author: Rene Vergara <rene@vergara.network> Date: Fri Jan 14 16:17:41 2022 -0600 Merge branch 'master' into dev commit47f2903d98
Author: Rene Vergara <rene@vergara.network> Date: Fri Jan 14 16:11:50 2022 -0600 Change look of login commitcfd3d0852f
Author: Rene Vergara <rene@vergara.network> Date: Fri Jan 14 15:47:31 2022 -0600 Add copyright and CoinGecko attribution commit55dc475a6a
Author: Rene Vergara <rene@vergara.network> Date: Tue Nov 23 14:44:46 2021 -0600 Correct item create form commit2596c36289
Author: Rene Vergara <rene@vergara.network> Date: Mon Nov 22 14:37:45 2021 -0600 Implement flexible currency commit078916f92d
Author: Rene Vergara <rene@vergara.network> Date: Thu Nov 18 16:49:34 2021 -0600 Change stepper to not editable commitc1c60a4e20
Author: Rene Vergara <rene@vergara.network> Date: Thu Nov 18 16:40:19 2021 -0600 Improved wording for login commit2f610c8f7f
Author: Rene Vergara <rene@vergara.network> Date: Thu Nov 18 16:38:25 2021 -0600 Implement stepper for login commite5ff05d814
Author: Rene Vergara <rene@vergara.network> Date: Thu Nov 18 09:57:22 2021 -0600 Enhance UI look and feel commit2265ab6512
Merge:b48f10f
fb46c62
Author: Rene Vergara <rene@vergara.network> Date: Wed Nov 17 16:07:26 2021 -0600 Merge branch 'master' into dev commitb48f10fe03
Author: Rene Vergara <rene@vergara.network> Date: Wed Nov 17 16:03:46 2021 -0600 Enhance login screen commited46fd9b23
Author: Rene Vergara <rene@vergara.network> Date: Wed Nov 17 14:23:24 2021 -0600 upgrade Angular commit0871a73cc2
Author: Rene Vergara <rene@vergara.network> Date: Wed Nov 17 14:14:34 2021 -0600 Add new logo files commitfb46c626ec
Author: Rene Vergara <rene@vergara.network> Date: Sat Nov 13 07:05:54 2021 -0600 Correct wallet link commit8e3c773d1e
Author: Rene Vergara <rene@vergara.network> Date: Sat Nov 13 06:51:20 2021 -0600 Adjust look of scan component commit5c043b1e0e
Author: Rene Vergara <rene@vergara.network> Date: Sat Nov 13 06:34:28 2021 -0600 Reduced required confirmations to 6 commit01dcdaecd0
Author: Rene Vergara <rene@vergara.network> Date: Sat Nov 13 06:33:51 2021 -0600 Ensure all txs are logged to DB Not just the ones with the proper memo commit1336cc2009
Author: Rene Vergara <rene@vergara.network> Date: Fri Nov 12 11:16:21 2021 -0600 Add link for wallets on the same device commitf3e8bf22e3
Author: Rene Vergara <rene@vergara.network> Date: Thu Nov 11 13:52:07 2021 -0600 Fix some issues tracking unconfirmed txs commit997276638f
Author: Rene Vergara <rene@vergara.network> Date: Thu Nov 11 09:24:43 2021 -0600 update gitignore commit7145a437b4
Author: Rene Vergara <rene@vergara.network> Date: Thu Nov 11 09:18:38 2021 -0600 Adjust visuals for small screens commitb66650d34d
Author: Rene Vergara <rene@vergara.network> Date: Wed Nov 10 09:25:26 2021 -0600 Implement session length selector commit648324ba5f
Author: Rene Vergara <rene@vergara.network> Date: Tue Nov 9 15:00:01 2021 -0600 Implement monitoring of unconfirmed logins commitd05292b365
Author: Rene Vergara <rene@vergara.network> Date: Tue Nov 9 12:39:16 2021 -0600 Add API authentication commitdacb8dbafb
Author: Rene Vergara <rene@vergara.network> Date: Mon Nov 8 14:37:26 2021 -0600 Parametrize backend url commitf33666bd0e
Author: Rene Vergara <rene@vergara.network> Date: Mon Nov 8 13:09:16 2021 -0600 Implement backend https commit0a4dda4d73
Author: Rene Vergara <rene@vergara.network> Date: Sat Nov 6 07:14:27 2021 -0500 Adjust session expiration commit99bec8f739
Author: Rene Vergara <rene@vergara.network> Date: Fri Nov 5 16:32:01 2021 -0500 Implement list of orders Also corrects font in css files commitb88fe7fc20
Author: Rene Vergara <rene@vergara.network> Date: Fri Nov 5 09:53:50 2021 -0500 Implement link alternative to QR code commit172f4da6b1
Author: Rene Vergara <rene@vergara.network> Date: Fri Nov 5 09:53:29 2021 -0500 Update main view to 'shop' commit4c5d4c311f
Author: Rene Vergara <rene@vergara.network> Date: Fri Nov 5 09:30:35 2021 -0500 Add totals and price to order storage commit7e5210723e
Author: Rene Vergara <rene@vergara.network> Date: Fri Nov 5 08:21:19 2021 -0500 Add ZEC price to order commit971fd7ca41
Author: Rene Vergara <rene@vergara.network> Date: Thu Nov 4 13:10:56 2021 -0500 Implement MongoDB authentication commitfa5221b128
Author: Rene Vergara <rene@vergara.network> Date: Thu Nov 4 07:49:09 2021 -0500 Enhance blockchain scan commit01520adbc3
Author: Rene Vergara <rene@vergara.network> Date: Tue Nov 2 16:13:24 2021 -0500 Implement database price feed commit0f5a731d08
Author: Rene Vergara <rene@vergara.network> Date: Tue Nov 2 10:35:22 2021 -0500 Implement order closing commit33326febaf
Author: Rene Vergara <rene@vergara.network> Date: Thu Oct 28 15:34:48 2021 -0500 Implement settings dialog commit251fa5d327
Author: Rene Vergara <rene@vergara.network> Date: Thu Oct 28 13:22:54 2021 -0500 Implement checkout commitdce8da391e
Author: Rene Vergara <rene@vergara.network> Date: Wed Oct 27 15:21:55 2021 -0500 Implement order creation and cancellation commitaf8ee5dc90
Author: Rene Vergara <rene@vergara.network> Date: Wed Oct 27 07:59:43 2021 -0500 Implement order creation commit064044c011
Author: Rene Vergara <rene@vergara.network> Date: Tue Oct 26 15:07:51 2021 -0500 Implement add-to-order dialog commit8b3dfb2984
Author: Rene Vergara <rene@vergara.network> Date: Tue Oct 26 15:07:10 2021 -0500 Fix bug in adding item commit35fcdaae54
Author: Rene Vergara <rene@vergara.network> Date: Tue Oct 26 13:34:52 2021 -0500 Implement item delete commit61d68714d2
Author: Rene Vergara <rene@vergara.network> Date: Tue Oct 26 12:58:39 2021 -0500 Implements custom theme commita7062e7b11
Author: Rene Vergara <rene@vergara.network> Date: Tue Oct 26 10:09:34 2021 -0500 Implements item edit commit172ebb0171
Author: Rene Vergara <rene@vergara.network> Date: Mon Oct 25 15:01:06 2021 -0500 Implemented basic order service Implemented adding the component to the viewer and the search in database. Fixed bug in search of item list commiteea8e06d48
Author: Rene Vergara <rene@vergara.network> Date: Mon Oct 25 12:49:50 2021 -0500 Add order mongoose schema commitcd1a0208df
Author: Rene Vergara <rene@vergara.network> Date: Fri Oct 22 17:20:36 2021 -0500 Implement create item Adds Zcash price feed from CoinGecko commit22c89b9d4f
Author: Rene Vergara <rene@vergara.network> Date: Thu Oct 21 16:23:33 2021 -0500 Implements item list commit85b775ae15
Author: Rene Vergara <rene@vergara.network> Date: Thu Oct 21 14:29:19 2021 -0500 Add item model commit62658f7be9
Author: Rene Vergara <rene@vergara.network> Date: Thu Oct 21 14:29:04 2021 -0500 Fix header commit7e6cd11962
Author: Rene Vergara <rene@vergara.network> Date: Thu Oct 21 11:22:48 2021 -0500 Fix header commit4214dac887
Author: Rene Vergara <rene@vergara.network> Date: Thu Oct 21 10:23:58 2021 -0500 Implement resolver for node address Fixes services. commit30a83414ad
Author: Rene Vergara <rene@vergara.network> Date: Wed Oct 20 15:51:14 2021 -0500 Update of code base commit6059c04b75
Author: Rene Vergara <rene@vergara.network> Date: Fri Oct 15 14:14:49 2021 -0500 Implements Zcash login commit9926a1a4fe
Author: Rene Vergara <rene@vergara.network> Date: Fri Oct 1 15:10:14 2021 -0500 initial commit
This commit is contained in:
parent
ac269d589e
commit
9ed75745ea
18 changed files with 263 additions and 104 deletions
7
COPYING
Normal file
7
COPYING
Normal file
|
@ -0,0 +1,7 @@
|
|||
Copyright (c) 2022 Vergara Technologies LLC
|
||||
|
||||
This package ("Original Work") is licensed under the terms of the Bootstrap
|
||||
Open Source License, version 1.0, or at your option, any later version
|
||||
("BOSL"). See the file ./LICENSE for the terms of the Bootstrap Open Source
|
||||
Licence, version 1.0.
|
||||
|
192
LICENSE
192
LICENSE
|
@ -1,20 +1,178 @@
|
|||
The MIT License (MIT)
|
||||
Copyright © 2022 Vergara Technologies LLC
|
||||
Copyright (c) 2022 Vergara Technologies
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the “Software”), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
=======================================================
|
||||
Bootstrap Open Source Licence ("BOSL") v. 1.0
|
||||
=======================================================
|
||||
This Bootstrap Open Source Licence (the "License") applies to any original work
|
||||
of authorship (the "Original Work") whose owner (the "Licensor") has placed the
|
||||
following licensing notice adjacent to the copyright notice for the Original
|
||||
Work:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
*Licensed under the Bootstrap Open Source Licence version 1.0*
|
||||
|
||||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
1. **Grant of Copyright License.** Licensor grants You a worldwide,
|
||||
royalty-free, non-exclusive, sublicensable license, for the duration of the
|
||||
copyright in the Original Work, to do the following:
|
||||
|
||||
a. to reproduce the Original Work in copies, either alone or as part of
|
||||
a collective work;
|
||||
|
||||
b. to translate, adapt, alter, transform, modify, or arrange the
|
||||
Original Work, thereby creating derivative works ("Derivative Works")
|
||||
based upon the Original Work;
|
||||
|
||||
c. to distribute or communicate copies of the Original Work and
|
||||
Derivative Works to the public, provided that prior to any such
|
||||
distribution or communication You first place a machine-readable copy
|
||||
of the Source Code of the Original Work and such Derivative Works that
|
||||
You intend to distribute or communicate in an information repository
|
||||
reasonably calculated to permit inexpensive and convenient access
|
||||
thereto by the public (“Information Repository”) for as long as You
|
||||
continue to distribute or communicate said copies, accompanied by an
|
||||
irrevocable offer to license said copies to the public free of charge
|
||||
under this License, said offer valid starting no later than 12 months
|
||||
after You first distribute or communicate said copies;
|
||||
|
||||
d. to perform the Original Work publicly; and
|
||||
|
||||
e. to display the Original Work publicly.
|
||||
|
||||
2. **Grant of Patent License.** Licensor grants You a worldwide, royalty-free,
|
||||
non-exclusive, sublicensable license, under patent claims owned or controlled
|
||||
by the Licensor that are embodied in the Original Work as furnished by the
|
||||
Licensor, for the duration of the patents, to make, use, sell, offer for sale,
|
||||
have made, and import the Original Work and Derivative Works.
|
||||
|
||||
3. **Grant of Source Code License.** The "Source Code" for a work means the
|
||||
preferred form of the work for making modifications to it and all available
|
||||
documentation describing how to modify the work. Licensor agrees to provide a
|
||||
machine-readable copy of the Source Code of the Original Work along with each
|
||||
copy of the Original Work that Licensor distributes. Licensor reserves the
|
||||
right to satisfy this obligation by placing a machine-readable copy of said
|
||||
Source Code in an Information Repository for as long as Licensor continues to
|
||||
distribute the Original Work.
|
||||
|
||||
4. **Exclusions From License Grant.** Neither the names of Licensor, nor the
|
||||
names of any contributors to the Original Work, nor any of their trademarks or
|
||||
service marks, may be used to endorse or promote products derived from this
|
||||
Original Work without express prior permission of the Licensor. Except as
|
||||
expressly stated herein, nothing in this License grants any license to
|
||||
Licensor's trademarks, copyrights, patents, trade secrets or any other
|
||||
intellectual property. No patent license is granted to make, use, sell, offer
|
||||
for sale, have made, or import embodiments of any patent claims other than the
|
||||
licensed claims defined in Section 2. No license is granted to the trademarks
|
||||
of Licensor even if such marks are included in the Original Work. Nothing in
|
||||
this License shall be interpreted to prohibit Licensor from licensing under
|
||||
terms different from this License any Original Work that Licensor otherwise
|
||||
would have a right to license.
|
||||
|
||||
5. **External Deployment.** The term "External Deployment" means the use,
|
||||
distribution, or communication of the Original Work or Derivative Works in any
|
||||
way such that the Original Work or Derivative Works may be used by anyone other
|
||||
than You, whether those works are distributed or communicated to those persons
|
||||
or made available as an application intended for use over a network. As an
|
||||
express condition for the grants of license hereunder, You must treat any
|
||||
External Deployment by You of the Original Work or a Derivative Work as a
|
||||
distribution under section 1(c).
|
||||
|
||||
6. **Attribution Rights.** You must retain, in the Source Code of any
|
||||
Derivative Works that You create, all copyright, patent, or trademark notices
|
||||
from the Source Code of the Original Work, as well as any notices of licensing
|
||||
and any descriptive text identified therein as an "Attribution Notice." You
|
||||
must cause the Source Code for any Derivative Works that You create to carry a
|
||||
prominent Attribution Notice reasonably calculated to inform recipients that
|
||||
You have modified the Original Work.
|
||||
|
||||
7. **Warranty of Provenance and Disclaimer of Warranty.** Licensor warrants
|
||||
that the copyright in and to the Original Work and the patent rights granted
|
||||
herein by Licensor are owned by the Licensor or are sublicensed to You under
|
||||
the terms of this License with the permission of the contributor(s) of those
|
||||
copyrights and patent rights. Except as expressly stated in the immediately
|
||||
preceding sentence, the Original Work is provided under this License on an "AS
|
||||
IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without
|
||||
limitation, the warranties of non-infringement, merchantability or fitness for
|
||||
a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS
|
||||
WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this
|
||||
License. No license to the Original Work is granted by this License except
|
||||
under this disclaimer.
|
||||
|
||||
8. **Limitation of Liability.** Under no circumstances and under no legal
|
||||
theory, whether in tort (including negligence), contract, or otherwise, shall
|
||||
the Licensor be liable to anyone for any indirect, special, incidental, or
|
||||
consequential damages of any character arising as a result of this License or
|
||||
the use of the Original Work including, without limitation, damages for loss of
|
||||
goodwill, work stoppage, computer failure or malfunction, or any and all other
|
||||
commercial damages or losses. This limitation of liability shall not apply to
|
||||
the extent applicable law prohibits such limitation.
|
||||
|
||||
9. **Acceptance and Termination.** If, at any time, You expressly assented to
|
||||
this License, that assent indicates your clear and irrevocable acceptance of
|
||||
this License and all of its terms and conditions. If You distribute or
|
||||
communicate copies of the Original Work or a Derivative Work, You must make a
|
||||
reasonable effort under the circumstances to obtain the express assent of
|
||||
recipients to the terms of this License. This License conditions your rights to
|
||||
undertake the activities listed in Section 1, including your right to create
|
||||
Derivative Works based upon the Original Work, and doing so without honoring
|
||||
these terms and conditions is prohibited by copyright law and international
|
||||
treaty. Nothing in this License is intended to affect copyright exceptions and
|
||||
limitations (including 'fair use' or 'fair dealing'). This License shall
|
||||
terminate immediately and You may no longer exercise any of the rights granted
|
||||
to You by this License upon your failure to honor the conditions in Section
|
||||
1(c).
|
||||
|
||||
10. **Termination for Patent Action.** This License shall terminate
|
||||
automatically and You may no longer exercise any of the rights granted to You
|
||||
by this License as of the date You commence an action, including a cross-claim
|
||||
or counterclaim, against Licensor or any licensee alleging that the Original
|
||||
Work infringes a patent. This termination provision shall not apply for an
|
||||
action alleging patent infringement by combinations of the Original Work with
|
||||
other software or hardware.
|
||||
|
||||
11. **Jurisdiction, Venue and Governing Law.** Any action or suit relating to
|
||||
this License may be brought only in the courts of a jurisdiction wherein the
|
||||
Licensor resides or in which Licensor conducts its primary business, and under
|
||||
the laws of that jurisdiction excluding its conflict-of-law provisions. The
|
||||
application of the United Nations Convention on Contracts for the International
|
||||
Sale of Goods is expressly excluded. Any use of the Original Work outside the
|
||||
scope of this License or after its termination shall be subject to the
|
||||
requirements and penalties of copyright or patent law in the appropriate
|
||||
jurisdiction. This section shall survive the termination of this License.
|
||||
|
||||
12. **Attorneys' Fees.** In any action to enforce the terms of this License or
|
||||
seeking damages relating thereto, the prevailing party shall be entitled to
|
||||
recover its costs and expenses, including, without limitation, reasonable
|
||||
attorneys' fees and costs incurred in connection with such action, including
|
||||
any appeal of such action. This section shall survive the termination of this
|
||||
License.
|
||||
|
||||
13. **Miscellaneous.** If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent necessary to
|
||||
make it enforceable.
|
||||
|
||||
14. **Definition of "You" in This License.** "You" throughout this License,
|
||||
whether in upper or lower case, means an individual or a legal entity
|
||||
exercising rights under, and complying with all of the terms of, this License.
|
||||
For legal entities, "You" includes any entity that controls, is controlled by,
|
||||
or is under common control with you. For purposes of this definition, "control"
|
||||
means (i) the power, direct or indirect, to cause the direction or management
|
||||
of such entity, whether by contract or otherwise, or (ii) ownership of fifty
|
||||
percent (50%) or more of the outstanding shares, or (iii) beneficial ownership
|
||||
of such entity.
|
||||
|
||||
15. **Right to Use.** You may use the Original Work in all ways not otherwise
|
||||
restricted or conditioned by this License or by law, and Licensor promises not
|
||||
to interfere with or be responsible for such uses by You.
|
||||
|
||||
16. **Modification of This License.** This License is Copyright © 2007 Zooko
|
||||
Wilcox-O'Hearn. Permission is granted to copy, distribute, or communicate this
|
||||
License without modification. Nothing in this License permits You to modify
|
||||
this License as applied to the Original Work or to Derivative Works. However,
|
||||
You may modify the text of this License and copy, distribute or communicate
|
||||
your modified version (the "Modified License") and apply it to other original
|
||||
works of authorship subject to the following conditions: (i) You may not
|
||||
indicate in any way that your Modified License is the "Bootstrap Open Source
|
||||
Licence" or "BOSL" and you may not use those names in the name of your Modified
|
||||
License; and (ii) You must replace the notice specified in the first paragraph
|
||||
above with the notice "Licensed under <insert your license name here>" or with
|
||||
a notice of your own that is not confusingly similar to the notice in this
|
||||
License.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "zgo",
|
||||
"version": "1.0.3",
|
||||
"version": "1.1.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
|
|
|
@ -63,7 +63,9 @@ export class BusinessComponent implements OnInit {
|
|||
country: '',
|
||||
email: '',
|
||||
website: '',
|
||||
zats: false
|
||||
zats: false,
|
||||
invoices: false,
|
||||
expiration: new Date(Date.now()).toISOString()
|
||||
}
|
||||
public countriesUpdate: Observable<Country[]>;
|
||||
public ownerUpdate: Observable<Owner>;
|
||||
|
@ -147,6 +149,7 @@ export class BusinessComponent implements OnInit {
|
|||
|
||||
save() {
|
||||
this.owner = {
|
||||
_id: '',
|
||||
address: '',
|
||||
currency: 'usd',
|
||||
tax: false,
|
||||
|
@ -165,7 +168,9 @@ export class BusinessComponent implements OnInit {
|
|||
country: this.bizForm.get('country')!.value,
|
||||
email: this.bizForm.get('email')!.value,
|
||||
website: this.bizForm.get('website')!.value,
|
||||
zats: false
|
||||
zats: false,
|
||||
invoices: false,
|
||||
expiration: new Date(Date.now()).toISOString()
|
||||
};
|
||||
this.userService.addOwner(this.owner);
|
||||
this.stepper!.next();
|
||||
|
|
|
@ -4,6 +4,7 @@ import {HttpClient, HttpParams, HttpHeaders} from '@angular/common/http';
|
|||
import {UserService} from './user.service';
|
||||
import { Owner } from './owner.model';
|
||||
|
||||
var Buffer = require('buffer/').Buffer;
|
||||
//import {User} from './user.model';
|
||||
|
||||
@Injectable({providedIn: 'root'})
|
||||
|
@ -42,11 +43,14 @@ export class FullnodeService{
|
|||
paid: false,
|
||||
website: '',
|
||||
country: '',
|
||||
zats: false
|
||||
zats: false,
|
||||
invoices: false,
|
||||
expiration: new Date(Date.now()).toISOString()
|
||||
};
|
||||
|
||||
constructor(private http: HttpClient, public userService: UserService){
|
||||
this.reqHeaders = new HttpHeaders().set('Authorization', this.apiKey);
|
||||
var auth = 'Basic ' + Buffer.from('user:superSecret').toString('base64');
|
||||
this.reqHeaders = new HttpHeaders().set('Authorization', auth);
|
||||
this.ownerUpdate = userService.ownerUpdate;
|
||||
this.getAddr();
|
||||
this.getHeight();
|
||||
|
|
|
@ -37,7 +37,9 @@ export class HeaderComponent implements OnInit, OnDestroy {
|
|||
paid: false,
|
||||
website: '',
|
||||
country: '',
|
||||
zats: false
|
||||
zats: false,
|
||||
invoices: false,
|
||||
expiration: new Date(Date.now()).toISOString()
|
||||
};
|
||||
private session: string | null = '';
|
||||
public heightUpdate: Observable<number>;
|
||||
|
|
|
@ -2,6 +2,6 @@ export interface Item {
|
|||
_id?: any;
|
||||
name: string;
|
||||
description: string;
|
||||
user: string;
|
||||
owner: string;
|
||||
cost: number;
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ export class ItemCreateComponent implements OnInit {
|
|||
){
|
||||
if (data._id === '') {
|
||||
this.form = fb.group({
|
||||
id: [null],
|
||||
id: [''],
|
||||
name: [null, Validators.required],
|
||||
description: [null, Validators.required],
|
||||
cost: new FormControl('', {
|
||||
|
@ -49,6 +49,7 @@ export class ItemCreateComponent implements OnInit {
|
|||
}
|
||||
|
||||
save() {
|
||||
console.log(this.form.value);
|
||||
this.dialogRef.close(this.form.value);
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,9 @@ export class ItemListComponent implements OnInit{
|
|||
paid: false,
|
||||
website: '',
|
||||
country: '',
|
||||
zats: false
|
||||
zats: false,
|
||||
invoices: false,
|
||||
expiration: new Date(Date.now()).toISOString()
|
||||
};
|
||||
public price: number = 1;
|
||||
public ownerUpdate: Observable<Owner>;
|
||||
|
@ -87,7 +89,7 @@ export class ItemListComponent implements OnInit{
|
|||
|
||||
dialogRef.afterClosed().subscribe((val) => {
|
||||
if(val != null) {
|
||||
var item:Item = {name: val.name, description: val.description, cost: val.cost, user: this.owner.address};
|
||||
var item:Item = {_id: '', name: val.name, description: val.description, cost: val.cost, owner: this.owner.address};
|
||||
this.itemService.addItem(item);
|
||||
}
|
||||
this.itemService.getItems(this.owner.address);
|
||||
|
@ -98,9 +100,9 @@ export class ItemListComponent implements OnInit{
|
|||
}
|
||||
|
||||
edit(id: string) {
|
||||
//console.log('Edit:', id);
|
||||
console.log('Edit:', id);
|
||||
const item = this.items.find(element => element._id == id);
|
||||
//console.log(item);
|
||||
console.log(item);
|
||||
const dialogConfig = new MatDialogConfig();
|
||||
|
||||
dialogConfig.disableClose = true;
|
||||
|
@ -115,7 +117,7 @@ export class ItemListComponent implements OnInit{
|
|||
name: val.name,
|
||||
description: val.description,
|
||||
cost: val.cost,
|
||||
user: this.owner.address
|
||||
owner: this.owner.address
|
||||
};
|
||||
//console.log('Edit:', editItem);
|
||||
this.itemService.addItem(editItem).subscribe((response) => {
|
||||
|
|
|
@ -3,5 +3,5 @@ export interface Item {
|
|||
name: string;
|
||||
description: string;
|
||||
cost: number;
|
||||
user: string;
|
||||
owner: string;
|
||||
}
|
||||
|
|
|
@ -3,6 +3,8 @@ import { Injectable } from '@angular/core';
|
|||
import { Subject, BehaviorSubject, Observable } from 'rxjs';
|
||||
import { HttpClient, HttpParams, HttpHeaders } from '@angular/common/http';
|
||||
|
||||
var Buffer = require('buffer/').Buffer;
|
||||
|
||||
@Injectable({providedIn: 'root'})
|
||||
|
||||
export class ItemService{
|
||||
|
@ -15,13 +17,14 @@ export class ItemService{
|
|||
private reqHeaders: HttpHeaders;
|
||||
|
||||
constructor(private http: HttpClient){
|
||||
this.reqHeaders = new HttpHeaders().set('Authorization', this.apiKey);
|
||||
var auth = 'Basic ' + Buffer.from('user:superSecret').toString('base64');
|
||||
this.reqHeaders = new HttpHeaders().set('Authorization', auth);
|
||||
}
|
||||
|
||||
getItems(addr: string){
|
||||
this.address = addr;
|
||||
const params = new HttpParams().append('address', addr);
|
||||
let obs = this.http.get<{message: string, items: any}>(this.beUrl+'api/getitems', { headers:this.reqHeaders, params: params, observe: 'response'});
|
||||
let obs = this.http.get<{message: string, items: any}>(this.beUrl+'api/items', { headers:this.reqHeaders, params: params, observe: 'response'});
|
||||
|
||||
obs.subscribe((ItemDataResponse) => {
|
||||
if (ItemDataResponse.status == 200 ) {
|
||||
|
@ -39,7 +42,7 @@ export class ItemService{
|
|||
|
||||
addItem(item: Item) {
|
||||
//const params = new HttpParams().append('item', JSON.stringify(item));
|
||||
let obs = this.http.post<{message: string}>(this.beUrl+'api/item', { item: item }, { headers: this.reqHeaders });
|
||||
let obs = this.http.post<{message: string}>(this.beUrl+'api/item', { payload: item }, { headers: this.reqHeaders });
|
||||
|
||||
obs.subscribe((ItemResponse) => {
|
||||
console.log('Item added');
|
||||
|
|
|
@ -35,7 +35,6 @@ export class LoginComponent implements OnInit, AfterViewInit {
|
|||
address: '',
|
||||
session: '',
|
||||
blocktime: 0,
|
||||
expired: false,
|
||||
pin: '',
|
||||
validated: false
|
||||
};
|
||||
|
@ -58,7 +57,9 @@ export class LoginComponent implements OnInit, AfterViewInit {
|
|||
paid: false,
|
||||
website: '',
|
||||
country: '',
|
||||
zats: false
|
||||
zats: false,
|
||||
invoices: false,
|
||||
expiration: new Date(Date.now()).toISOString()
|
||||
};
|
||||
private FullnodeSub: Subscription = new Subscription();
|
||||
private UserSub: Subscription = new Subscription();
|
||||
|
@ -152,12 +153,7 @@ export class LoginComponent implements OnInit, AfterViewInit {
|
|||
}
|
||||
|
||||
loginCheck(){
|
||||
var today = new Date().getTime() / 1000;
|
||||
this.userService.findUser();
|
||||
this.userService.findPending();
|
||||
this.txsUpdate.subscribe((txs) => {
|
||||
this.txs = txs;
|
||||
});
|
||||
this.userUpdate.subscribe((user) => {
|
||||
if (user.blocktime > 0) {
|
||||
if(this.myStepper!.selectedIndex === 1){
|
||||
|
@ -173,12 +169,6 @@ export class LoginComponent implements OnInit, AfterViewInit {
|
|||
}
|
||||
}
|
||||
});
|
||||
if (this.txs.length > 0) {
|
||||
this.barMode = 'determinate';
|
||||
this.barValue = (this.txs[0].confirmations / 2) * 100;
|
||||
this.confirmedMemo = true;
|
||||
this.barMessage = 'Login memo found, awaiting confirmations';
|
||||
}
|
||||
}
|
||||
|
||||
login(stepper: MatStepper) {
|
||||
|
|
|
@ -8,6 +8,8 @@ import { User } from '../user.model';
|
|||
import { Owner } from '../owner.model';
|
||||
import { LineItem} from '../items/lineitem.model';
|
||||
|
||||
var Buffer = require('buffer/').Buffer;
|
||||
|
||||
@Injectable({providedIn: 'root'})
|
||||
|
||||
export class OrderService {
|
||||
|
@ -18,7 +20,6 @@ export class OrderService {
|
|||
address: '',
|
||||
session: '',
|
||||
blocktime: 0,
|
||||
expired: false,
|
||||
pin: '',
|
||||
validated: false
|
||||
},
|
||||
|
@ -42,7 +43,9 @@ export class OrderService {
|
|||
paid: false,
|
||||
website: '',
|
||||
country: '',
|
||||
zats: false
|
||||
zats: false,
|
||||
invoices: false,
|
||||
expiration: new Date(Date.now()).toISOString()
|
||||
},
|
||||
order: {
|
||||
address: '',
|
||||
|
@ -78,7 +81,8 @@ export class OrderService {
|
|||
public fullnodeService: FullnodeService,
|
||||
public userService: UserService
|
||||
) {
|
||||
this.reqHeaders = new HttpHeaders().set('Authorization', this.apiKey);
|
||||
var auth = 'Basic ' + Buffer.from('user:superSecret').toString('base64');
|
||||
this.reqHeaders = new HttpHeaders().set('Authorization', auth);
|
||||
this.userUpdate = userService.userUpdate;
|
||||
this.ownerUpdate = userService.ownerUpdate;
|
||||
this.userUpdate.subscribe((user) => {
|
||||
|
@ -132,7 +136,8 @@ export class OrderService {
|
|||
|
||||
addToOrder(lineItem: LineItem) {
|
||||
if(this.dataStore.order._id != null) {
|
||||
let obs = this.http.post<{message: string}>(this.beUrl+'api/lineitem', { order_id: this.dataStore.order._id, line: lineItem }, { headers: this.reqHeaders });
|
||||
this.dataStore.order.lines.push(lineItem);
|
||||
let obs = this.http.post(this.beUrl+'api/order', { payload: this.dataStore.order }, { headers: this.reqHeaders });
|
||||
obs.subscribe((orderData) => {
|
||||
this.getOrder();
|
||||
});
|
||||
|
@ -143,21 +148,21 @@ export class OrderService {
|
|||
|
||||
createOrder(lineItem: LineItem) {
|
||||
var order:Order = {
|
||||
_id: '',
|
||||
address: this.dataStore.user.address,
|
||||
session: this.dataStore.user.session,
|
||||
currency: this.dataStore.owner.currency,
|
||||
timestamp: new Date(Date.now()).toISOString(),
|
||||
closed: false,
|
||||
totalZec: 0,
|
||||
price: 0,
|
||||
total: 0,
|
||||
lines: []
|
||||
lines: [lineItem]
|
||||
};
|
||||
let obs = this.http.post<{message: string, order: Order}>(this.beUrl+'api/order', {order: order}, { headers: this.reqHeaders });
|
||||
let obs = this.http.post<{message: string, order: Order}>(this.beUrl+'api/order', {payload: order}, { headers: this.reqHeaders });
|
||||
obs.subscribe((orderData) => {
|
||||
console.log('Create order', orderData);
|
||||
this.dataStore.order = orderData.order;
|
||||
this._orderUpdated.next(Object.assign({}, this.dataStore).order);
|
||||
this.addToOrder(lineItem);
|
||||
console.log('Created order');
|
||||
this.getOrder()
|
||||
});
|
||||
|
||||
return obs;
|
||||
|
@ -197,7 +202,7 @@ export class OrderService {
|
|||
this.dataStore.order.price = price;
|
||||
});
|
||||
this.dataStore.order.closed = true;
|
||||
let obs = this.http.post<{message: string, order: Order}>(this.beUrl+'api/order', {order: this.dataStore.order}, { headers: this.reqHeaders });
|
||||
let obs = this.http.post(this.beUrl+'api/order', {payload: this.dataStore.order}, { headers: this.reqHeaders });
|
||||
obs.subscribe((orderData) => {
|
||||
console.log('Closed order', orderData);
|
||||
this.dataStore.order = {
|
||||
|
|
|
@ -19,4 +19,6 @@ export interface Owner {
|
|||
website: string;
|
||||
country: string;
|
||||
zats: boolean;
|
||||
invoices: boolean;
|
||||
expiration: string;
|
||||
}
|
||||
|
|
|
@ -5,6 +5,8 @@ import { Order } from './order/order.model';
|
|||
import { Owner } from './owner.model';
|
||||
import { UserService } from './user.service';
|
||||
|
||||
var Buffer = require('buffer/').Buffer;
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
|
@ -31,7 +33,9 @@ export class ReceiptService {
|
|||
paid: false,
|
||||
website: '',
|
||||
country: '',
|
||||
zats: false
|
||||
zats: false,
|
||||
invoices: false,
|
||||
expiration: new Date(Date.now()).toISOString()
|
||||
},
|
||||
order: {
|
||||
address: '',
|
||||
|
@ -63,13 +67,14 @@ export class ReceiptService {
|
|||
private http: HttpClient,
|
||||
public userService: UserService
|
||||
) {
|
||||
this.reqHeaders = new HttpHeaders().set('Authorization', this.apiKey);
|
||||
var auth = 'Basic ' + Buffer.from('user:superSecret').toString('base64');
|
||||
this.reqHeaders = new HttpHeaders().set('Authorization', auth);
|
||||
this.ownerUpdate = userService.ownerUpdate;
|
||||
}
|
||||
|
||||
getOrderById(id:string) {
|
||||
const params = new HttpParams().append('id', id);
|
||||
let obs = this.http.get<{message: string, order: any}>(this.beUrl+'api/receipt', { headers:this.reqHeaders, params:params, observe: 'response'});
|
||||
//const params = new HttpParams().append('id', id);
|
||||
let obs = this.http.get<{message: string, order: any}>(this.beUrl+'api/order/'+id, { headers:this.reqHeaders, observe: 'response'});
|
||||
|
||||
obs.subscribe((OrderDataResponse) => {
|
||||
if (OrderDataResponse.status == 200) {
|
||||
|
|
|
@ -3,7 +3,6 @@ export interface User {
|
|||
address: string;
|
||||
session: string;
|
||||
blocktime: number;
|
||||
expired: boolean;
|
||||
pin: string;
|
||||
validated: boolean;
|
||||
}
|
||||
|
|
|
@ -6,6 +6,8 @@ import {Owner} from './owner.model';
|
|||
import { Country } from './country.model';
|
||||
import {Tx} from './tx.model';
|
||||
|
||||
var Buffer = require('buffer/').Buffer;
|
||||
|
||||
@Injectable({providedIn: 'root'})
|
||||
|
||||
export class UserService{
|
||||
|
@ -15,7 +17,6 @@ export class UserService{
|
|||
address: '',
|
||||
session: '',
|
||||
blocktime: 0,
|
||||
expired: false,
|
||||
pin: '',
|
||||
validated: false
|
||||
},
|
||||
|
@ -38,7 +39,9 @@ export class UserService{
|
|||
paid: false,
|
||||
website: '',
|
||||
country: '',
|
||||
zats: false
|
||||
zats: false,
|
||||
invoices: false,
|
||||
expiration: new Date(Date.now()).toISOString()
|
||||
},
|
||||
txs : [],
|
||||
countries: []
|
||||
|
@ -64,12 +67,12 @@ export class UserService{
|
|||
private apiKey = 'YourApiKey';
|
||||
|
||||
constructor(private http: HttpClient){
|
||||
this.reqHeaders = new HttpHeaders().set('Authorization', this.apiKey);
|
||||
var auth = 'Basic ' + Buffer.from('user:superSecret').toString('base64');
|
||||
this.reqHeaders = new HttpHeaders().set('Authorization', auth);
|
||||
//console.log('US:', this.reqHeaders);
|
||||
this.session = localStorage.getItem('s4z_token');
|
||||
if (this.session != null) {
|
||||
this.findUser();
|
||||
this.findPending();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -88,12 +91,12 @@ export class UserService{
|
|||
this.session = localStorage.getItem('s4z_token');
|
||||
if (this.session != null) {
|
||||
const params = new HttpParams().append('session', this.session!);
|
||||
let obs = this.http.get<{message: string, user: any}>(this.beUrl+'api/getuser', { headers: this.reqHeaders, params: params, observe: 'response'});
|
||||
let obs = this.http.get<{message: string, user: any}>(this.beUrl+'api/user', { headers: this.reqHeaders, params: params, observe: 'response'});
|
||||
|
||||
obs.subscribe((UserDataResponse) => {
|
||||
console.log(UserDataResponse.status);
|
||||
if (UserDataResponse.status == 200){
|
||||
this.dataStore.user = UserDataResponse.body!.user[0];
|
||||
this.dataStore.user = UserDataResponse.body!.user;
|
||||
console.log(`US: Found user, returning it`);
|
||||
this._uZaddrUpdated.next(Object.assign({},this.dataStore).user.address);
|
||||
this._userUpdated.next(Object.assign({}, this.dataStore).user);
|
||||
|
@ -103,7 +106,6 @@ export class UserService{
|
|||
address: '',
|
||||
session: '',
|
||||
blocktime: 0,
|
||||
expired: false,
|
||||
pin: '',
|
||||
validated: false
|
||||
};
|
||||
|
@ -120,32 +122,6 @@ export class UserService{
|
|||
}
|
||||
}
|
||||
|
||||
findPending() {
|
||||
this.session = localStorage.getItem('s4z_token');
|
||||
if (this.session != null) {
|
||||
const params = new HttpParams().append('session', this.session!);
|
||||
let obs = this.http.get<{message: string, txs: any}>(this.beUrl+'api/pending', { headers: this.reqHeaders, params: params, observe: 'response'});
|
||||
|
||||
obs.subscribe((TxDataResponse) => {
|
||||
//console.log('US Tx', TxDataResponse);
|
||||
if (TxDataResponse.status == 200){
|
||||
this.dataStore.txs = TxDataResponse.body!.txs;
|
||||
console.log(`US: Pending logins found`);
|
||||
this._txsUpdated.next(Object.assign({},this.dataStore).txs);
|
||||
} else {
|
||||
console.log('US: Did not find pending txs');
|
||||
this.dataStore.txs = [];
|
||||
this._txsUpdated.next(Object.assign({},this.dataStore).txs);
|
||||
}
|
||||
});
|
||||
|
||||
return obs;
|
||||
} else {
|
||||
console.log('No session loaded');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
validateUser(){
|
||||
var validatedUser: User = this.dataStore.user;
|
||||
validatedUser.validated = true;
|
||||
|
@ -157,10 +133,9 @@ export class UserService{
|
|||
|
||||
addOwner(owner: Owner) {
|
||||
owner.address = this.dataStore.user.address;
|
||||
let obs = this.http.post<{message: string}>(this.beUrl+'api/addowner', {owner: owner}, {headers: this.reqHeaders});
|
||||
let obs = this.http.post(this.beUrl+'api/owner', {payload: owner}, {headers: this.reqHeaders});
|
||||
|
||||
obs.subscribe((responseData) => {
|
||||
console.log(responseData.message);
|
||||
this.getOwner(this.dataStore.user.address);
|
||||
});
|
||||
|
||||
|
@ -180,12 +155,12 @@ export class UserService{
|
|||
getOwner(address: string) {
|
||||
console.log('getOwner', address);
|
||||
const ownParams = new HttpParams().append('address', address);
|
||||
let obs = this.http.get<{message:string, owner: any}>(this.beUrl+'api/getowner', { headers: this.reqHeaders, params: ownParams, observe: 'response'});
|
||||
let obs = this.http.get<{message:string, owner: any}>(this.beUrl+'api/owner', { headers: this.reqHeaders, params: ownParams, observe: 'response'});
|
||||
|
||||
obs.subscribe((OwnerDataResponse) => {
|
||||
console.log('api/getowner', OwnerDataResponse.status);
|
||||
if (OwnerDataResponse.status == 200) {
|
||||
this.dataStore.owner = OwnerDataResponse.body!.owner[0];
|
||||
this.dataStore.owner = OwnerDataResponse.body!.owner;
|
||||
//console.log('getOwner object', this.dataStore.owner);
|
||||
this._ownerUpdated.next(Object.assign({},this.dataStore).owner);
|
||||
this._paidUpdated.next(Object.assign({}, this.dataStore).owner.paid);
|
||||
|
|
|
@ -24,7 +24,6 @@ export class ViewerComponent implements OnInit {
|
|||
address: '',
|
||||
session: '',
|
||||
blocktime: 0,
|
||||
expired: false,
|
||||
pin: '',
|
||||
validated: false
|
||||
};
|
||||
|
@ -48,7 +47,9 @@ export class ViewerComponent implements OnInit {
|
|||
paid: false,
|
||||
website: '',
|
||||
country: '',
|
||||
zats: false
|
||||
zats: false,
|
||||
invoices: false,
|
||||
expiration: new Date(Date.now()).toISOString()
|
||||
};
|
||||
public addrUpdate: Observable<string>;
|
||||
public ownerUpdate: Observable<Owner>;
|
||||
|
@ -109,7 +110,7 @@ export class ViewerComponent implements OnInit {
|
|||
dialogRef.afterClosed().subscribe((val) => {
|
||||
if (val != null) {
|
||||
//console.log('Saving settings', val);
|
||||
this.userService.updateOwner(val);
|
||||
this.userService.addOwner(val);
|
||||
this.fullnodeService.getPrice(val.currency);
|
||||
this.loginCheck();
|
||||
}
|
||||
|
@ -123,7 +124,7 @@ export class ViewerComponent implements OnInit {
|
|||
this.userUpdate.subscribe((user) => {
|
||||
this.user = user;
|
||||
//console.log('Viewer loginCheck', this.user);
|
||||
if (!this.owner.paid || !this.user.validated || this.user.expired) {
|
||||
if (!this.owner.paid || !this.user.validated) {
|
||||
console.log('Log in expired!');
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue