From 794f56feabc86a2907005e1a43e8713b934b9303 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 29 Apr 2023 23:32:09 -0700 Subject: wip --- src/routes/+page.svelte | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src') diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 3a5a54f3..510607eb 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -23,6 +23,8 @@ let faq; let about; + let log = console.log; + const howItWorksSteps = [ { image: 'hand', stepID: 'step1' }, { image: 'bolt', stepID: 'step2' }, @@ -31,6 +33,27 @@ const faqIDs = ['cost', 'compatibility', 'safety']; + let scan = async () => { + log('User clicked scan button'); + + try { + const ndef = new NDEFReader(); + await ndef.scan(); + log('> Scan started'); + + ndef.addEventListener('readingerror', () => { + log('Argh! Cannot read data from the NFC tag. Try another one?'); + }); + + ndef.addEventListener('reading', ({ message, serialNumber }) => { + log(`> Serial Number: ${serialNumber}`); + log(`> Records: (${message.records.length})`); + }); + } catch (error) { + log('Argh! ' + error); + } + }; + onMount(async () => { close(); @@ -49,6 +72,7 @@
+ Date: Tue, 2 May 2023 14:09:36 -0700 Subject: greek translation --- src/locales/el.json | 400 +++++++++++++++++++++++++--------------------------- src/locales/en.json | 10 +- 2 files changed, 197 insertions(+), 213 deletions(-) (limited to 'src') diff --git a/src/locales/el.json b/src/locales/el.json index 28f7db2b..7d43b786 100644 --- a/src/locales/el.json +++ b/src/locales/el.json @@ -1,283 +1,275 @@ { "404": { "404": "404", - "pageNotFound": "Page not found." + "pageNotFound": "Η σελίδα δεν βρέθηκε." }, "about": { - "header": "About", - "p1": "Coinos is an open source bitcoin payment app. Development started in Vancouver in September 2012 as a way to provide local merchants with a convenient way to accept bitcoin payments.", - "p2": "You can download the source code to run an instance and connect it to your own bitcoin and lightning nodes. We'll help you get started being a benevolent custodian and payments provider for your community.", - "p3": "Account transfers amongst users on our server are done off-chain so they're completely free, instant, and unlimited.", + "header": "Σχετικά με", "team": { - "header": "The Team", + "header": "Η Oμάδα", "adam": { "name": "Adam Soltys", - "position": "Chief Technical Officer", - "bio": "Adam is a web developer and bitcoin enthusiast who believes sound money is key to increasing global prosperity. He lives in North Vancouver with his wife Chelsea and two children." + "position": "Επικεφαλής Τεχνικός Διευθυντής", + "bio": "Ο Adam είναι προγραμματιστής ιστού και λάτρης του bitcoin που πιστεύει ότι το ισχυρό νόμισμα είναι το κλειδί για την αύξηση της παγκόσμιας ευημερίας. Ζει στο Βόρειο Vancouver με τη σύζυγό του Chelsea και τα δύο παιδιά του." }, "cole": { "name": "Cole", - "position": "Certified Bitcoin Professional", - "bio": "Cole is a driven individual with a passion for freedom. He came across bitcoin in 2016 and studied it in depth. Now he wants to introduce the lightning network to as many users as possible." + "position": "Πιστοποιημένος Eπαγγελματίας Bitcoin", + "bio": "Ο Cole είναι ένα άτομο με πάθος για ελευθερία. Ήρθε σε επαφή με το bitcoin το 2016 και το μελέτησε σε βάθος. Τώρα θέλει να εισαγάγει το δίκτυο lightning σε όσο το δυνατόν περισσότερους χρήστες." } }, "locations": { - "header": "Locations", - "description": "Here are some businesses that are accepting bitcoin with Coinos. We hope that yours will be next!" + "header": "Τοποθεσίες", + "description": "Ακολουθούν ορισμένες επιχειρήσεις που δέχονται bitcoin με Coinos. Ελπίζουμε ότι η δική σας θα είναι η επόμενη!" } }, "error": { - "header": "Error", - "message": "Please try again or contact support.", - "signIn": "Please sign in to continue." + "header": "Σφάλμα", + "message": "Παρακαλώ δοκιμάστε ξανά ή επικοινωνήστε με την υποστήριξη.", + "signIn": "Συνδεθείτε για να συνεχίσετε." }, "faq": { - "header": "FAQ", + "header": "Συχνές ερωτήσεις", "cost": { - "question": "What does it cost?", - "answer": "It's free to register an account and receive payments. We charge a 0.1% conversion fee if you withdraw regular bitcoin to lightning or vice versa." + "question": "Πόσο κοστίζει", + "answer": "Η εγγραφή λογαριασμού και η λήψη πληρωμών είναι δωρεάν. Χρεώνουμε ένα τέλος μετατροπής 0,1% εάν κάνετε ανάληψη κανονικού bitcoin σε Lightning ή το αντίστροφο." }, "compatibility": { - "question": "Do I need any special device or software?", - "answer": "No. Coinos is web based, so as long as you have an internet connection and a web browser, it works anywhere. Retail merchants might use it on a phone or a tablet." + "question": "Χρειάζομαι κάποια ειδική συσκευή ή λογισμικό;", + "answer": "Όχι. Το Coinos βασίζεται στον ιστό, επομένως, εφόσον έχετε σύνδεση στο Διαδίκτυο και πρόγραμμα περιήγησης ιστού, λειτουργεί οπουδήποτε. Οι έμποροι λιανικής ενδέχεται να το χρησιμοποιήσουν σε τηλέφωνο ή tablet." }, "safety": { - "question": "When do my funds settle?", - "answer": "Lightning payments are settled instantly. You can withdraw your balance to another wallet or exchange immediately once funds are received." + "question": "Πότε διακανονίζονται τα χρήματά μου;", + "answer": "Οι πληρωμές Lightning διακανονίζονται άμεσα. Μπορείτε να κάνετε ανάληψη του υπολοίπου σας σε άλλο πορτοφόλι ή να το ανταλλάξετε αμέσως μόλις λάβετε χρήματα." } }, "footer": { - "company": "Company", - "followUs": "Follow Us", + "company": "Εταιρία", + "followUs": "Ακολουθησε μας", "github": "GitHub", "linktree": "Linktree", - "jobs": "Jobs", - "support": "Support", + "jobs": "Linktree", + "support": "Υποστήριξη", "telegram": "Telegram", "twitter": "Twitter", - "documentation": "Documentation" + "documentation": "Τεκμηρίωση" }, "howItWorks": { - "header": "How it works", + "header": "Πως δουλεύει", "step1": { - "header": "1. Create your account", - "description": "A username and password is all you need to get started." + "header": "1. Δημιουργήστε τον λογαριασμό σας", + "description": "Ένα όνομα χρήστη και κωδικός πρόσβασης είναι όλα όσα χρειάζεστε για να ξεκινήσετε." }, "step2": { - "header": "2. Ask for payments", - "description": "The same as you normally would, but with bitcoin." + "header": "2. Ζητήστε πληρωμές", + "description": "Ότι θα κάνατε συνήθως, αλλά με το bitcoin." }, "step3": { - "header": "3. That's all!", - "description": "Spend your coin immediately or save it and watch it grow, the choice is yours." + "header": "3. Αυτό είναι όλο!", + "description": "Ξοδέψτε το νόμισμά σας αμέσως ή αποθηκεύστε το και δείτε το να αυξάνεται, η επιλογή είναι δική σας." } }, "invoice": { - "addTip": "Add a tip", - "addTipq": "Add a tip?", - "done": "Done", - "paymentSuccessful": "Payment received!", - "invoice": "Invoice", - "total": "Total", - "tip": "Tip" + "addTip": "Προσθήκη φιλοδωρήματος", + "addTipq": "Προσθήκη φιλοδωρήματος;", + "done": "Εγινε", + "paymentSuccessful": "Η πληρωμή ελήφθη!", + "invoice": "Τιμολόγιο", + "total": "Σύνολο", + "tip": "Φιλοδώρημα" }, "jobs": { - "header": "Jobs", - "subheader": "Current Openings", - "pitch1": "Coinos is actively looking for developers to join our growing team (full-time or part-time, remote working OK).", - "pitch2": "Excited about working on open source bitcoin? Then take a look at our repositories on", + "header": "Δουλειές", + "subheader": "Τρέχουσες θέσεις εργασίας", + "pitch1": "«Η Coinos αναζητά ενεργά προγραμματιστές για να ενταχθούν στην αναπτυσσόμενη ομάδα μας (πλήρους ή μερικής απασχόλησης, απομακρυσμένη εργασία αποδεκτή) ", + "pitch2": "Είστε ενθουσιασμενοι που εργάζεστε σε bitcoin ανοιχτού κώδικα; Τότε ρίξτε μια ματιά στα αποθετήρια μας στο", "github": "GitHub", - "pitch3": "If you think you can make an impact, we'd love to hear from you. Send us your resume to" + "pitch3": "Αν πιστεύετε ότι μπορείτε να ασκήσετε επιρροή, θα θέλαμε να σας ακούσουμε. Στείλτε μας το βιογραφικό σας στ" }, "landing": { - "header_before_icon": "The", - "header_with_icon": "easiest", - "header_after_icon": "way to get started with bitcoin.", - "subheader": "A simple but powerful web wallet for everyone. No software or hardware required.", + "header_before_icon": "Ο", + "header_with_icon": "πιο εύκολος", + "header_after_icon": "τρόπος για να ξεκινήσετε με το bitcoin ", + "subheader": "Ένα απλό αλλά ισχυρό πορτοφόλι ιστού για όλους. Δεν απαιτείται software ή hardware", "info1": { - "title": "Instant payments via Lightning", - "description": "We make it easy for merchants to receive retail payments. No waiting for bank settlements or worrying about chargebacks. Instant settlement, in seconds. Say goodbye to 3% credit card processing fees." + "title": "Άμεσες πληρωμές μέσω Lightning", + "description": "Διευκολύνουμε τους εμπόρους να λαμβάνουν πληρωμές λιανικής. Χωρίς αναμονή για τραπεζικούς διακανονισμούς ή ανησυχία για αντιστροφές χρεώσεων " }, "info2": { - "title": "Simple to use", - "description1": "Just enter an amount in your local currency, share the QR code and you’re done.", - "description2": "We do all the heavy lifting so you can focus on your business.", - "description3": "You always have the option of taking custody of your funds by withdrawing instantly at any time." + "title": "Απλό στη χρήση", + "description1": "Απλώς πληκτρολογήστε ένα ποσό στο τοπικό σας νόμισμα, μοιραστείτε τον κωδικό QR και τελειώσατε.", + "description2": "Αναλαμβάνουμε τη δύσκολη δουλειά, ώστε να μπορείτε να επικεντρωθείτε στην επιχείρησή σας.", + "description3": "Έχετε πάντα τη δυνατότητα να αναλάβετε τη διαχείριση των χρημάτων σας, κάνοντας ανάληψη άμεσα και ανά πάσα στιγμή " }, "info3": { - "title": "Brand it your way!", - "description": "Customize your profile page look and feel, or keep it on default - it's totally up to you." + "title": "Φτιάξτε το με τον δικό σας τρόπο!", + "description": "Προσαρμόστε την εμφάνιση και την αίσθηση της σελίδας του προφίλ σας ή διατηρήστε την ως προεπιλογή - εξαρτάται αποκλειστικά από εσάς " } }, "login": { - "optional": "Optional", + "optional": "Προαιρετικό", "token": "2FA Token", - "username": "Username", - "password": "Password", - "email": "Email", - "passwordRecommendation": "We recommend a long, random password generated with a password manager.", - "forgotUserOrPassword": "Forgot Username or Password?", - "haveAccount": "Already have an account?", - "noAccount": "Don't have an account?", - "register": "Register", - "signIn": "Sign In", - "failed": "Login failed" + "username": "Όνομα χρήστη", + "password": "Κωδικός πρόσβασης", + "email": "Διεύθυνση Ηλεκτρονικού Ταχυδρομείου", + "passwordRecommendation": "Συνιστούμε ένα μεγάλο, τυχαίο κωδικό πρόσβασης που δημιουργείται με έναν διαχειριστή κωδικών πρόσβασης ", + "forgotUserOrPassword": "Ξεχάσατε το όνομα χρήστη ή τον κωδικό πρόσβασης;", + "haveAccount": "Εχετε ήδη λογαριασμό;", + "noAccount": "Δεν έχετε λογαριασμό;", + "register": "Έγγραφη", + "signIn": "Σύνδεση", + "failed": "Η σύνδεση απέτυχ" }, "nav": { - "profile": "Profile", - "startInSeconds": "Start in Seconds", - "account": "Account", - "signIn": "Sign In", - "signOut": "Sign Out", - "dashboard": "Dashboard", - "settings": "Settings", - "support": "Support" + "profile": "Προφίλ", + "startInSeconds": "Ξεκινήστε σε δευτερόλεπτα", + "account": "Λογαριασμός", + "signIn": "Σύνδεση", + "signOut": "Αποσύνδεση", + "dashboard": "Πίνακας Ελέγχου", + "settings": "Ρυθμίσεις", + "support": "Υποστήριξ" }, - "newSiteHeader": "Join us at our launch party in Vancouver on October 26! Looking for the old coinos? Visit classic.coinos.io", "news": { - "header": "News", - "subheader": "Latest Updates", - "update1": "" + "header": "Νέα", + "subheader": "Τελευταίες ενημερώσεις" }, "user": { "bitcoin": "Bitcoin", "lightning": "Lightning", - "invoice": "Invoice", - "unfollow": "Unfollow", - "following": "Following", - "follow": "Follow", - "followers": "Followers", - "remove": "Remove", - "noNotes": "No notes yet", - "message": "Message", - "messages": "Messages", - "feed": "Feed", - "notes": "Notes", - "pay": "Pay", - "scanToPayBTC": "Scan to pay with bitcoin", - "this": "This", - "lightningAddress": "lightning address", - "likeAnEmail": "is like an email for bitcoin. You can publish it on your website or business cards and use it multiple times.", + "invoice": "Τιμολόγιο", + "unfollow": "Κατάργηση παρακολούθησης", + "following": "Ακολουθείτε", + "follow": "Ακολουθήστε", + "followers": "Ακόλουθοι", + "remove": "Αφαίρεση", + "noNotes": "Δεν υπάρχουν σημειώσεις ακόμα", + "message": "Μήνυμα", + "messages": "Μηνύματα", + "feed": "Ροή", + "notes": "Σημειώσεις", + "pay": "Πληρωμή", + "scanToPayBTC": "Σάρωση για πληρωμή με bitcoin", + "this": "Αυτό", + "lightningAddress": "διεύθυνση lightning", + "likeAnEmail": "Είναι σαν ένα μήνυμα ηλεκρτονικού ταχυδρομείου για το bitcoin. Μπορείτε να το δημοσιεύσετε στον ιστότοπο ή τις επαγγελματικές σας κάρτες και να το χρησιμοποιήσετε πολλές φορές ", "dashboard": { - "go": "Go", - "dashboard": "Dashboard", - "accountBalance": "Account Balance", - "bitcoinPrice": "bitcoin Price:", - "conversionFeeWarning": "You will be charged a 1% withdrawal fee on the amount.", - "dataFromBinance": "Data from Binance.", - "fetchingRate": "fetching rate...", - "optionalNote": "Note (Optional)", - "send": "Send", - "receive": "Receive", - "withdraw": "Send", - "deposit": "Deposit", - "voucher": "Voucher" + "go": "Πηγαίνετε", + "dashboard": "Πίνακας Ελέγχου", + "accountBalance": "Υπόλοιπο Λογαριασμού", + "bitcoinPrice": "Τιμή bitcoin:", + "conversionFeeWarning": "Θα χρεωθείτε με χρέωση ανάληψης 1% επί του ποσού ", + "send": "Αποστολή", + "receive": "Λήψη", + "withdraw": "Αποστολή", + "deposit": "Κατάθεση", + "voucher": "Κουπόν" }, "receive": { - "lessThan1BTCWarning": "Please enter an amount less than 1 bitcoin.", - "showQR": "Show QR" + "lessThan1BTCWarning": "Παρακαλώ εισάγετε ένα ποσό μικρότερο από 1 bitcoin ", + "showQR": "Εμφάνιση Q" }, "send": { - "contacts": "Contacts", - "scan": "Scan", - "paste": "Paste", - "next": "Next", - "placeholder": "Paste a bitcoin address, lightning invoice or coinos username" + "contacts": "Επαφές", + "scan": "Σάρωση", + "paste": "Επικόλληση", + "next": "Επόμενο", + "placeholder": "Επικολλήστε μια διεύθυνση bitcoin, ένα τιμολόγιο lighting ή ένα όνομα χρήστη coino" }, "settings": { - "saveSettings": "Save Settings", - "bannerImage": "Banner Image", - "profileImage": "Profile Image", - "oneTimeCode": "Enter one-time code", - "accountId": "Account Secret", - "header": "Settings", - "ACCOUNT": "ACCOUNT", - "POINT_OF_SALE": "PREFERENCES", - "SECURITY": "SECURITY", - "locale": "Language", - "username": "Username", - "email": "Email", - "newPassword": "Change Password", - "about": "About", - "aboutPlaceholder": "A little something about you or your business address and hours", - "emailNotifications": "Email Notifications", - "emailNotificationsDescription": "Get notified via email when a change occurs on your account or when people send you payments.", - "smsNotifications": "SMS Notifications", - "smsNotificationsDescription": "Coinos will send you text notifications when this is enabled.", - "theme": "Color Theme", - "tipPrompt": "Prompt for tips", - "tipPromptDescription": "Ask people if they want to add a tip before paying their invoices", - "displayName": "Display name", - "themeDescription": "Select from the default color themes.", - "localCurrency": "Currency", - "btcUnit": "Display bitcoin in:", + "saveSettings": "Αποθήκευση ρυθμίσεων", + "bannerImage": "Εικόνα Banner", + "profileImage": "Εικόνα Προφίλ", + "oneTimeCode": "Εισαγάγετε κωδικό μίας χρήσης", + "accountId": "Μυστικός λογαριασμός", + "header": "Ρυθμίσεις", + "ACCOUNT": "ΛΟΓΑΡΙΑΣΜΟΣ", + "POINT_OF_SALE": "ΠΡΟΤΙΜΗΣΕΙΣ", + "SECURITY": "ΑΣΦΑΛΕΙΑ", + "locale": "Γλώσσα", + "username": "Όνομα χρήστη", + "email": "Ηλεκτρονικό Ταχυδρομεί", + "newPassword": "Αλλαγή κωδικού", + "about": "Σχετικά με", + "aboutPlaceholder": "Λίγα πράγματα για εσάς ή τη διεύθυνση και τις ώρες της επιχείρησής σας", + "emailNotifications": "Ειδοποιήσεις ηλεκτρονικού ταχυδρομείου", + "emailNotificationsDescription": "Λάβετε ειδοποιήσεις μέσω ηλεκτρονικού ταχυδρομείου όταν συμβαίνει μια αλλαγή στο λογαριασμό σας ή όταν οι άνθρωποι σας στέλνουν πληρωμές ", + "smsNotifications": "Ειδοποιήσεις SMS", + "smsNotificationsDescription": "Το Coinos θα σας στείλει ειδοποιήσεις κειμένου όταν αυτές είναι ενεργοποιημένες ", + "theme": "Χρωματικό θέμα", + "tipPrompt": "Προτροπή για φιλοδώρημα", + "tipPromptDescription": "Ρωτήστε τους ανθρώπους εάν θέλουν να προσθέσουν ένα φιλοδώρημα πριν πληρώσουν τα τιμολόγιά τους", + "displayName": "Εμφανιζόμενο όνομα", + "themeDescription": "Επιλέξτε από τα προεπιλεγμένα χρωματικά θέματα.", + "localCurrency": "Νόμισμα", + "btcUnit": "Εμφάνιση bitcoin σε:", "bitcoin": "bitcoin", - "minutes": "minutes", - "hour": "hour", - "hours": "hours", + "minutes": "λεπτά", + "hour": "ώρα", + "hours": "ώρες", "satoshis": "Satoshis", - "securityPIN": "Security PIN", - "securityPINDescription": "Set a security pin that will be used to unlock your settings and to send outgoing payments.", - "setPIN": "Set PIN", - "autoLock": "Auto-Lock Timer", - "autoLockDescription": "Your account will go into a secure mode, requiring you to re-enter your credentials after a specified time:", - "twofa": "2-Factor Authentication", - "twofaDescription": "Add an extra level of security to your device by enabling 2-factor authentication.", - "twofaSetup": "Set up 2FA", - "twofaDisable": "Disable 2FA", - "select": "Select", - "verifyPIN": "Verify PIN", - "enablePIN": "Enable PIN", - "disablePIN": "Disable PIN" + "securityPIN": "PIN Ασφαλείας", + "securityPINDescription": "Ορίστε μια καρφίτσα ασφαλείας που θα χρησιμοποιείται για το ξεκλείδωμα των ρυθμίσεών σας και για την αποστολή εξερχόμενων πληρωμών ", + "setPIN": "Ορισμός PIN", + "autoLock": "Αυτόματο κλείδωμα χρονοδιακόπτη", + "autoLockDescription": "Ο λογαριασμός σας θα μεταβεί σε ασφαλή λειτουργία, απαιτώντας από εσάς να εισαγάγετε ξανά τα διαπιστευτήριά σας μετά από μια καθορισμένη ώρα:", + "twofa": "Έλεγχος ταυτότητας 2 παραγόντων", + "twofaDescription": "Προσθέστε ένα επιπλέον επίπεδο ασφάλειας στη συσκευή σας ενεργοποιώντας τον έλεγχο ταυτότητας 2 παραγόντων ", + "twofaSetup": "Ρύθμιση 2FA", + "twofaDisable": "Απενεργοποίηση 2FA", + "select": "Επιλογή", + "verifyPIN": "Επαλήθευση PIN", + "enablePIN": "Ενεργοποίηση PIN", + "disablePIN": "Απενεργοποίηση PI" }, "support": { - "header": "Support", - "email": "Email", - "accountName": "Account Name", - "message": "Message", - "send": "Send" + "header": "Υποστήριξη", + "email": "Ηλεκτρονικό Ταχυδρομείο", + "accountName": "Ονομα λογαριασμού", + "message": "Μήνυμα", + "send": "Αποστολ" } }, "payments": { - "amount": "Amount", - "date": "Date", - "id": "Transaction ID", - "details": "Transaction Details", - "header": "Payments", - "preimage": "Proof of payment", - "type": "Type", - "time": "Time", - "sent": "Sent", - "received": "Received", - "empty": "No transactions yet.", - "send": "Send", - "next": "Next", - "sendersChoice": "Sender's choice", - "sendTo": "Send to", - "to": "to", - "pay": "Pay", - "requesting": "is requesting", - "sentInvoiceTo": "Sent invoice to", - "sentRequestTo": "Request sent!", - "pleasePay": "Please pay", - "day": "Day", - "week": "Week", - "month": "Month", - "all": "All", - "export": "Export", - "invoice": "Invoice", - "readyToPay": "is ready to pay", - "describeOrder": "Use this field to describe your order", - "requestAnInvoice": "Request Invoice", - "submit": "Submit", - "isRequesting": "is requesting", - "invoiceFrom": "Invoice from", - "awaiting": "Awaiting", - "tapAnywhere": "Tap anywhere to continue", - "from": "from", - "redeem": "Redeem", - "redeemed": "Redeemed", - "redeemedBy": "Redeemed by", - "sendMessage": "Write a message..." + "amount": "Ποσό", + "date": "Ημερομηνία", + "id": "Ταυτότητα συναλλαγής", + "details": "Λεπτομέρειες Συναλλαγής", + "header": "Πληρωμές", + "preimage": "Απόδειξη πληρωμής", + "type": "Τύπος", + "time": "Χρόνος", + "sent": "Απεστάλει", + "received": "Παραλήφθηκε", + "empty": "Αποστολή", + "send": "Επόμενο", + "next": "Επιλογή αποστολέα", + "sendersChoice": "Αποστολή σε", + "sendTo": "προς", + "to": "προς", + "pay": "Πληρωμή", + "requesting": "απαιτείται", + "sentInvoiceTo": "Εστάλει τιμολόγιο σε", + "sentRequestTo": "Αίτημα εστάλει!", + "pleasePay": "Παρακαλώ πληρώστε", + "day": "Ημέρα", + "week": "Εβδομάδ", + "month": "Μήνας", + "all": "Ολα", + "export": "Εξαγωγή", + "invoice": "Τιμολόγιο", + "readyToPay": "είναι έτοιμο για πληρωμή", + "describeOrder": "Χρησιμοποιήστε αυτό το πεδίο για να περιγράψετε την παραγγελία σας", + "requestAnInvoice": "Αίτημα Τιμολογίου", + "submit": "Υποβολή", + "isRequesting": "απαιτείται", + "invoiceFrom": "Τιμολόγιο από", + "awaiting": "Αναμονή", + "tapAnywhere": "Πατήστε οπουδήποτε για να συνεχίσετε", + "from": "από", + "redeem": "Εξαργύρωση", + "redeemed": "Εξαργυρώθηκε", + "redeemedBy": "Εξαργυρώθηκε από", + "sendMessage": "Γράψτε ένα μήνυμα..." } } diff --git a/src/locales/en.json b/src/locales/en.json index 28f7db2b..734ca583 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -5,9 +5,6 @@ }, "about": { "header": "About", - "p1": "Coinos is an open source bitcoin payment app. Development started in Vancouver in September 2012 as a way to provide local merchants with a convenient way to accept bitcoin payments.", - "p2": "You can download the source code to run an instance and connect it to your own bitcoin and lightning nodes. We'll help you get started being a benevolent custodian and payments provider for your community.", - "p3": "Account transfers amongst users on our server are done off-chain so they're completely free, instant, and unlimited.", "team": { "header": "The Team", "adam": { @@ -133,11 +130,9 @@ "settings": "Settings", "support": "Support" }, - "newSiteHeader": "Join us at our launch party in Vancouver on October 26! Looking for the old coinos? Visit classic.coinos.io", "news": { "header": "News", - "subheader": "Latest Updates", - "update1": "" + "subheader": "Latest Updates" }, "user": { "bitcoin": "Bitcoin", @@ -162,11 +157,8 @@ "go": "Go", "dashboard": "Dashboard", "accountBalance": "Account Balance", - "bitcoinPrice": "bitcoin Price:", "conversionFeeWarning": "You will be charged a 1% withdrawal fee on the amount.", - "dataFromBinance": "Data from Binance.", "fetchingRate": "fetching rate...", - "optionalNote": "Note (Optional)", "send": "Send", "receive": "Receive", "withdraw": "Send", -- cgit v1.2.3 From 505386adbad6a07285cfcd7e64a1b3e609c1c5e8 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 2 May 2023 14:09:51 -0700 Subject: nfc wip --- src/lib/utils.js | 6 ++++-- src/routes/(app)/+layout.server.js | 1 + src/routes/(app)/+layout.svelte | 18 +++++++++++++++++- .../(app)/[username]/card/[serial]/+page.server.js | 3 +++ .../(app)/[username]/card/[serial]/+page.svelte | 9 +++++++++ src/routes/(app)/locations/+server.js | 12 ++++++------ src/routes/+layout.js | 8 -------- src/routes/+layout.server.js | 8 ++++++++ src/routes/+layout.svelte | 4 ++-- src/routes/+page.svelte | 22 ---------------------- src/service-worker.js | 7 ------- 11 files changed, 50 insertions(+), 48 deletions(-) create mode 100644 src/routes/(app)/[username]/card/[serial]/+page.server.js create mode 100644 src/routes/(app)/[username]/card/[serial]/+page.svelte delete mode 100644 src/routes/+layout.js create mode 100644 src/routes/+layout.server.js delete mode 100644 src/service-worker.js (limited to 'src') diff --git a/src/lib/utils.js b/src/lib/utils.js index 5eef79fc..be26ee45 100644 --- a/src/lib/utils.js +++ b/src/lib/utils.js @@ -25,8 +25,9 @@ export let g = (url, fetch, headers) => } }); -export let get = (url, headers = {}) => - fetch(base + url, { headers }) +export let get = (url, headers = {}) => { + console.log("GETTING", browser, base, url); + return fetch(base + url, { headers }) .then(async (r) => { if (r.ok) return r.text(); throw new Error(await r.text()); @@ -38,6 +39,7 @@ export let get = (url, headers = {}) => return body; } }); +} export let post = (url, body, headers) => { headers = { ...headers, 'content-type': 'application/json', accept: 'application/json' }; diff --git a/src/routes/(app)/+layout.server.js b/src/routes/(app)/+layout.server.js index e80e1e64..5200f572 100644 --- a/src/routes/(app)/+layout.server.js +++ b/src/routes/(app)/+layout.server.js @@ -34,6 +34,7 @@ export async function load({ cookies, request, url, params }) { throw redirect(307, `/${user.username}/generate`); try { + console.log("FETCH RATE"); rate = await get('/rate'); rates = await get('/rates'); } catch (e) { diff --git a/src/routes/(app)/+layout.svelte b/src/routes/(app)/+layout.svelte index 891de9ac..a0c981c1 100644 --- a/src/routes/(app)/+layout.svelte +++ b/src/routes/(app)/+layout.svelte @@ -21,7 +21,7 @@ ({ rate, user, subject, token, rates } = data); }; - onMount(() => { + onMount(async () => { let localStorageLocale = localStorage.getItem(localeLocalStorageKey); if (localStorageLocale) locale.set(localStorageLocale); @@ -30,8 +30,24 @@ }); if (browser) { + let log = console.log; checkSocket(); expirePin(); + + try { + const ndef = new NDEFReader(); + await ndef.scan(); + + ndef.addEventListener('readingerror', (e) => { + console.log('nfc error', e); + }); + + ndef.addEventListener('reading', ({ message, serialNumber }) => { + goto(`/${user.username}/card/${serialNumber.replace(/:/g, '-')}`); + }); + } catch (error) { + log('Argh! ' + error); + } } }); diff --git a/src/routes/(app)/[username]/card/[serial]/+page.server.js b/src/routes/(app)/[username]/card/[serial]/+page.server.js new file mode 100644 index 00000000..49d7504c --- /dev/null +++ b/src/routes/(app)/[username]/card/[serial]/+page.server.js @@ -0,0 +1,3 @@ +export let load = async ({ params }) => { + return params; +} diff --git a/src/routes/(app)/[username]/card/[serial]/+page.svelte b/src/routes/(app)/[username]/card/[serial]/+page.svelte new file mode 100644 index 00000000..e40554f2 --- /dev/null +++ b/src/routes/(app)/[username]/card/[serial]/+page.svelte @@ -0,0 +1,9 @@ + + +Card {serial} + +Balance {balance} diff --git a/src/routes/(app)/locations/+server.js b/src/routes/(app)/locations/+server.js index dd9e984b..ba5affa3 100644 --- a/src/routes/(app)/locations/+server.js +++ b/src/routes/(app)/locations/+server.js @@ -4,12 +4,12 @@ import { json } from '@sveltejs/kit'; export async function GET({ fetch, setHeaders }) { let locations = []; - try { - ({ locations } = await get('/locations')); - setHeaders({ 'cache-control': 'public, max-age=600' }); - } catch (e) { - console.log('failed to fetch locations'); - } + // try { + // ({ locations } = await get('/locations')); + // setHeaders({ 'cache-control': 'public, max-age=600' }); + // } catch (e) { + // console.log('failed to fetch locations'); + // } return json({ locations }); } diff --git a/src/routes/+layout.js b/src/routes/+layout.js deleted file mode 100644 index add74f87..00000000 --- a/src/routes/+layout.js +++ /dev/null @@ -1,8 +0,0 @@ -import { loadTranslations, locale } from '$lib/translations'; -export const load = async ({ url }) => { - const { pathname } = url; - const defaultLocale = 'en'; // get from cookie, user session, ... - const initLocale = locale.get() || defaultLocale; // set default if no locale already set - await loadTranslations(initLocale, pathname); // keep this just before the `return` - return {}; -}; diff --git a/src/routes/+layout.server.js b/src/routes/+layout.server.js new file mode 100644 index 00000000..53be7741 --- /dev/null +++ b/src/routes/+layout.server.js @@ -0,0 +1,8 @@ +import { loadTranslations, locale } from '$lib/translations'; +export const load = async ({ url }) => { + const { host, pathname } = url; + const defaultLocale = 'en'; // get from cookie, user session, ... + const initLocale = locale.get() || defaultLocale; // set default if no locale already set + await loadTranslations(initLocale, pathname); // keep this just before the `return` + return { host, pathname }; +}; diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index e1c3ff1e..6dc84349 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,8 +1,8 @@ diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 510607eb..3331b69b 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -33,27 +33,6 @@ const faqIDs = ['cost', 'compatibility', 'safety']; - let scan = async () => { - log('User clicked scan button'); - - try { - const ndef = new NDEFReader(); - await ndef.scan(); - log('> Scan started'); - - ndef.addEventListener('readingerror', () => { - log('Argh! Cannot read data from the NFC tag. Try another one?'); - }); - - ndef.addEventListener('reading', ({ message, serialNumber }) => { - log(`> Serial Number: ${serialNumber}`); - log(`> Records: (${message.records.length})`); - }); - } catch (error) { - log('Argh! ' + error); - } - }; - onMount(async () => { close(); @@ -72,7 +51,6 @@
- Date: Wed, 3 May 2023 10:15:06 -0700 Subject: redirect send to user urls --- src/routes/(app)/send/[...text]/+page.server.js | 2 +- src/routes/(app)/send/pot/[name]/[...amount]/+page.server.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/routes/(app)/send/[...text]/+page.server.js b/src/routes/(app)/send/[...text]/+page.server.js index 513fa11e..ff014315 100644 --- a/src/routes/(app)/send/[...text]/+page.server.js +++ b/src/routes/(app)/send/[...text]/+page.server.js @@ -62,7 +62,7 @@ let parse = async (t, host) => { // user try { - user = await get(`/users/${t}`); + user = await get(`/users/${t.split('/')[0]}`); if (user.anon) user = null; } catch (e) {} diff --git a/src/routes/(app)/send/pot/[name]/[...amount]/+page.server.js b/src/routes/(app)/send/pot/[name]/[...amount]/+page.server.js index 6c11811c..3f819696 100644 --- a/src/routes/(app)/send/pot/[name]/[...amount]/+page.server.js +++ b/src/routes/(app)/send/pot/[name]/[...amount]/+page.server.js @@ -1,5 +1,5 @@ import { fail, redirect } from '@sveltejs/kit'; -import { auth, post } from '$lib/utils'; +import { auth, fd, post } from '$lib/utils'; export const actions = { default: async ({ cookies, request }) => { -- cgit v1.2.3 From c167348afa3e754655ba46f91646ecc91309174b Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 3 May 2023 13:06:52 -0700 Subject: nfc wip --- src/lib/utils.js | 1 - .../(app)/[username]/card/[serial]/+page.server.js | 21 ++++++-- .../(app)/[username]/card/[serial]/+page.svelte | 38 ++++++++++++--- src/routes/(app)/pot/[name]/+page.svelte | 54 +++++++++++++++------ static/icons/nfc.svg | 1 + static/images/moneypot.jpg | Bin 0 -> 34030 bytes 6 files changed, 91 insertions(+), 24 deletions(-) create mode 100644 static/icons/nfc.svg create mode 100644 static/images/moneypot.jpg (limited to 'src') diff --git a/src/lib/utils.js b/src/lib/utils.js index be26ee45..a91ef639 100644 --- a/src/lib/utils.js +++ b/src/lib/utils.js @@ -26,7 +26,6 @@ export let g = (url, fetch, headers) => }); export let get = (url, headers = {}) => { - console.log("GETTING", browser, base, url); return fetch(base + url, { headers }) .then(async (r) => { if (r.ok) return r.text(); diff --git a/src/routes/(app)/[username]/card/[serial]/+page.server.js b/src/routes/(app)/[username]/card/[serial]/+page.server.js index 49d7504c..72ce96d5 100644 --- a/src/routes/(app)/[username]/card/[serial]/+page.server.js +++ b/src/routes/(app)/[username]/card/[serial]/+page.server.js @@ -1,3 +1,18 @@ -export let load = async ({ params }) => { - return params; -} +import { auth, get } from '$lib/utils'; +import { redirect } from "@sveltejs/kit" + +export let load = async ({ cookies, params }) => { + let { serial } = params; + let pot; + try { + pot = await get(`/pot/${serial}`, auth(cookies)); + } catch (e) { + console.log(e); + } + + console.log('POT', pot); + + if (pot) throw redirect(307, `/pot/${serial}`); + + return params; +}; diff --git a/src/routes/(app)/[username]/card/[serial]/+page.svelte b/src/routes/(app)/[username]/card/[serial]/+page.svelte index e40554f2..aee3be28 100644 --- a/src/routes/(app)/[username]/card/[serial]/+page.svelte +++ b/src/routes/(app)/[username]/card/[serial]/+page.svelte @@ -1,9 +1,35 @@ -Card {serial} - -Balance {balance} +
+
+

Card {serial}

+
+ +
diff --git a/src/routes/(app)/pot/[name]/+page.svelte b/src/routes/(app)/pot/[name]/+page.svelte index 7b3d890b..653166c7 100644 --- a/src/routes/(app)/pot/[name]/+page.svelte +++ b/src/routes/(app)/pot/[name]/+page.svelte @@ -20,6 +20,9 @@ $: amountFiat = parseFloat(((amount * rate) / sats).toFixed(2)); $loginRedirect = $page.url.pathname; + + let show; + let toggle = () => (show = !show);
@@ -31,12 +34,15 @@
-
+
-

Public Pot

+ +

Money Pot

Anyone who knows the URL to this pot can add or take out funds

- {name} + {#if show} + {name} + {/if}

@@ -47,17 +53,37 @@

-
- - - - - - + +
+ +
{#each payments as p} diff --git a/static/icons/nfc.svg b/static/icons/nfc.svg new file mode 100644 index 00000000..3fa2de48 --- /dev/null +++ b/static/icons/nfc.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/images/moneypot.jpg b/static/images/moneypot.jpg new file mode 100644 index 00000000..2084a99a Binary files /dev/null and b/static/images/moneypot.jpg differ -- cgit v1.2.3 From 43208081323a56f4603c6d94a0764be764516ec0 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 5 May 2023 08:12:23 -0700 Subject: nfc wip --- src/lib/store.js | 1 + src/routes/(app)/+layout.svelte | 10 +-- .../(app)/[username]/(profile)/+layout.svelte | 12 +-- src/routes/(app)/[username]/(profile)/+page.svelte | 65 +++++++-------- .../(app)/[username]/card/[serial]/+page.server.js | 2 - .../(app)/[username]/invoice/[hash]/+page.svelte | 39 ++++++++- .../[username]/invoice/[hash]/paid/+page.svelte | 2 +- .../[username]/payments/[...page]/+page.svelte | 6 +- src/routes/(app)/pot/[name]/+page.svelte | 91 +++++++++++++-------- .../(app)/pot/[name]/withdraw/+page.server.js | 2 +- src/routes/(app)/pot/[name]/withdraw/+page.svelte | 5 +- src/routes/(app)/pot/[name]/withdraw/+server.js | 6 ++ src/routes/(app)/send/invoice/[id]/+page.svelte | 19 +++++ src/routes/(app)/withdraw/+server.js | 1 + static/icons/nfc.svg | 14 +++- static/images/moneypot.png | Bin 0 -> 278763 bytes 16 files changed, 188 insertions(+), 87 deletions(-) create mode 100644 src/routes/(app)/pot/[name]/withdraw/+server.js create mode 100644 static/images/moneypot.png (limited to 'src') diff --git a/src/lib/store.js b/src/lib/store.js index 4e88c90c..923bda52 100644 --- a/src/lib/store.js +++ b/src/lib/store.js @@ -52,3 +52,4 @@ export const request = writable(); export const requestRedirect = writable(); export const token = persistSession('token'); export const user = writable(); +export const ndef = writable(); diff --git a/src/routes/(app)/+layout.svelte b/src/routes/(app)/+layout.svelte index a0c981c1..cd8919e4 100644 --- a/src/routes/(app)/+layout.svelte +++ b/src/routes/(app)/+layout.svelte @@ -2,7 +2,7 @@ import { SvelteToast } from '@zerodevx/svelte-toast'; import { onDestroy, onMount } from 'svelte'; import { close, connect, send } from '$lib/socket'; - import { last, invoice, request, passwordPrompt, pin } from '$lib/store'; + import { last, invoice, request, ndef, passwordPrompt, pin } from '$lib/store'; import { page } from '$app/stores'; import { browser } from '$app/environment'; import { goto } from '$app/navigation'; @@ -35,14 +35,14 @@ expirePin(); try { - const ndef = new NDEFReader(); - await ndef.scan(); + $ndef = new NDEFReader(); + await $ndef.scan(); - ndef.addEventListener('readingerror', (e) => { + $ndef.addEventListener('readingerror', (e) => { console.log('nfc error', e); }); - ndef.addEventListener('reading', ({ message, serialNumber }) => { + $ndef.addEventListener('reading', ({ message, serialNumber }) => { goto(`/${user.username}/card/${serialNumber.replace(/:/g, '-')}`); }); } catch (error) { diff --git a/src/routes/(app)/[username]/(profile)/+layout.svelte b/src/routes/(app)/[username]/(profile)/+layout.svelte index df9b9ad8..fe12a124 100644 --- a/src/routes/(app)/[username]/(profile)/+layout.svelte +++ b/src/routes/(app)/[username]/(profile)/+layout.svelte @@ -46,18 +46,20 @@ let toggleBio = () => (hideBio = false); -
+