From 33154d42d240792d787a50fa1f02fcf608373701 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 24 Apr 2024 19:27:55 +0400 Subject: [PATCH 1/2] new page with new router path, with all languages --- src/i18n/cn.js | 15 ++++++++++++--- src/i18n/en.js | 16 ++++++++++++---- src/i18n/ru.js | 16 ++++++++++++---- src/i18n/uz.js | 16 ++++++++++++---- src/layouts/MainLayout.vue | 7 +++++++ src/pages/ContactsPage.vue | 20 ++++++++++---------- src/pages/send/SendPage.vue | 35 +++++++++++++++++++++++++++++++++++ src/router/routes.ts | 3 ++- 8 files changed, 102 insertions(+), 26 deletions(-) create mode 100644 src/pages/send/SendPage.vue diff --git a/src/i18n/cn.js b/src/i18n/cn.js index 1bffdd6..2022b5e 100644 --- a/src/i18n/cn.js +++ b/src/i18n/cn.js @@ -17,7 +17,9 @@ export default { contacts: '联系方式', contactsDesc: '查看联系人', topUsers: '与会者排名', - topUsersDesc: '在第一批中找到自己!' + topUsersDesc: '在第一批中找到自己!', + send: '翻譯', + sendDesc: '將您的第一個發送至 Yat!' }, sign: { t1: '嗨! 欢迎来到Yat,价值交换系统。 我已经为你想出了一个独特的助记符短语--把它当作你的数字签名,这是识别你自己所必需的。 我没有存储它,因此无法恢复。 现在只有你知道它,所以在纸上仔细写下来,或者至少通过点击它并将其放在某个地方来复制它。', @@ -57,7 +59,8 @@ export default { }, titles: { topUsersTitle: '与会者排名', - contacts: '联系方式' + contacts: '联系方式', + send: '翻譯' }, transactionMessage: { @@ -66,6 +69,11 @@ export default { import: '出口/进口', dowloadJson: 'Скачать JSON-файл', uploadJson: 'JSON-файл', + placeholder: { + p1: '搜尋', + p2: '和', + p3: '資訊' + }, aboutPlatform: { bannerTexts: { banner1: '我们为什么可靠 ...' @@ -89,7 +97,8 @@ export default { scanQr: { NotAllowedError: { headerErr: '摄像头的使用未经授权!', - textErr: '根据隐私和数据保护政策,浏览器设置必须允许访问!请检查这一点。然后刷新页面,在第二次请求中允许访问设备摄像头。' + textErr: + '根据隐私和数据保护政策,浏览器设置必须允许访问!请检查这一点。然后刷新页面,在第二次请求中允许访问设备摄像头。' }, NotFoundError: '', NotSupportedError: '', diff --git a/src/i18n/en.js b/src/i18n/en.js index 9908d41..f9c52b0 100644 --- a/src/i18n/en.js +++ b/src/i18n/en.js @@ -17,7 +17,9 @@ export default { contacts: 'Contacts', contactsDesc: 'View contacts', topUsers: 'Ranking of participants', - topUsersDesc: 'Find yourself among the first ones!' + topUsersDesc: 'Find yourself among the first ones!', + send: 'Transfer', + sendDesc: 'Send your first to Yat!' }, sign: { t1: 'Hi! Welcome to Yat, the value exchange system. I have already come up with a unique mnemonic phrase for you - consider it your digital signature, necessary to identify yourself. I do not have it stored and therefore cannot be restored. Now only you know it, so write it down carefully on paper or at least copy it by clicking on it and put it somewhere.', @@ -57,7 +59,8 @@ export default { }, titles: { topUsersTitle: 'Ranking of participants', - contacts: 'Contacts' + contacts: 'Contacts', + send: 'Transfer' }, transactionMessage: { successfull: 'Transaction completed' @@ -65,7 +68,11 @@ export default { import: 'Export/Import', dowloadJson: 'Download JSON-file', uploadJson: 'JSON-file', - placeholder: 'Find ', + placeholder: { + p1: 'Find', + p2: 'Sum', + p3: 'Message' + }, aboutPlatform: { bannerTexts: { banner1: "Why we're reliable..." @@ -89,7 +96,8 @@ export default { scanQr: { NotAllowedError: { headerErr: 'Access to the camera was not authorized!', - textErr: 'In accordance with the privacy and data protection policy, access in the browser settings must be allowed! Please check this. Then refresh the page and allow access to the device camera in a second request.' + textErr: + 'In accordance with the privacy and data protection policy, access in the browser settings must be allowed! Please check this. Then refresh the page and allow access to the device camera in a second request.' }, NotFoundError: '', NotSupportedError: '', diff --git a/src/i18n/ru.js b/src/i18n/ru.js index b730beb..add82df 100644 --- a/src/i18n/ru.js +++ b/src/i18n/ru.js @@ -17,7 +17,9 @@ export default { contacts: 'Контакты', contactsDesc: 'Смотреть контакты', topUsers: 'Рейтинг участников', - topUsersDesc: 'Окажись в числе первых!' + topUsersDesc: 'Окажись в числе первых!', + send: 'Перевод', + sendDesc: 'Отправь свой первый Ятѣ!' }, sign: { t1: 'Привет! Добро пожаловать в Ятѣ, систему обмена ценностями. Я уже придумал тебе уникальную мнемоническую фразу - считай её своей цифровой подписью, необходимой для удостоверения себя. Она у меня не хранится и потому не подлежит восстановлению. Теперь её знаешь только ты, поэтому аккуратно запиши на бумаге или хотябы скопируй, кликнув на неё, и вставь куда-нибудь.', @@ -57,7 +59,8 @@ export default { }, titles: { topUsersTitle: 'Рейтинг участников', - contacts: 'Контакты' + contacts: 'Контакты', + send: 'Перевод' }, transactionMessage: { successfull: 'Транзакция выполнена' @@ -65,7 +68,11 @@ export default { import: 'Экспорт/импорт', dowloadJson: 'Скачать JSON-файл', uploadJson: 'JSON-файл', - placeholder: 'Поиск', + placeholder: { + p1: 'Поиск', + p2: 'Сумма', + p3: 'Сообщение' + }, aboutPlatform: { bannerTexts: { banner1: 'Почему c нами надежно...' @@ -89,7 +96,8 @@ export default { scanQr: { NotAllowedError: { headerErr: 'Доступ к камере не был разрешен!', - textErr: 'В соответствии с политикой конфиденциальности и защиты данных, доступ в настройках браузера должен быть разрешен! Пожалуйста, проверьте это. Затем обновите страницу и разрешите доступ к камере устройства при повторном запросе.' + textErr: + 'В соответствии с политикой конфиденциальности и защиты данных, доступ в настройках браузера должен быть разрешен! Пожалуйста, проверьте это. Затем обновите страницу и разрешите доступ к камере устройства при повторном запросе.' }, NotFoundError: '', NotSupportedError: '', diff --git a/src/i18n/uz.js b/src/i18n/uz.js index 0143fe7..6dcc2dc 100644 --- a/src/i18n/uz.js +++ b/src/i18n/uz.js @@ -17,7 +17,9 @@ export default { contacts: 'Kontaktlar', contactsDesc: "Kontaktlarni ko'rish", topUsers: 'Ishtirokchilar reytingi', - topUsersDesc: "Birinchilardan bo'ling!" + topUsersDesc: "Birinchilardan bo'ling!", + send: 'Tarjima', + sendDesc: 'Yat-ga birinchi xabaringizni yuboring' }, sign: { t1: "Salom! Ятѣ, qiymat almashish tizimiga xush kelibsiz. Men sizga allaqachon noyob mnemonik iborani o'ylab topdim-uni o'zingizni tasdiqlash uchun zarur bo'lgan raqamli imzoingiz deb hisoblang. U menda saqlanmaydi va shuning uchun uni tiklash mumkin emas. Endi siz uni faqat bilasiz, shuning uchun uni qog'ozga ehtiyotkorlik bilan yozing yoki hech bo'lmaganda uni bosib nusxa ko'chiring va biron joyga qo'ying.", @@ -57,7 +59,8 @@ export default { }, titles: { topUsersTitle: 'Ishtirokchilar reytingi', - contacts: 'Kontaktlar' + contacts: 'Kontaktlar', + send: 'Tarjima' }, userTxHistory: { @@ -71,7 +74,11 @@ export default { import: 'Eksport/import', dowloadJson: 'JSON faylini yuklab oling', uploadJson: 'JSON-fayl', - placeholder: 'Qidiruv', + placeholder: { + p1: 'Qidirmoq', + p2: 'so`m', + p3: 'Xabar' + }, aboutPlatform: { bannerTexts: { banner1: 'Nima uchun biz bilan ishonchli...' @@ -95,7 +102,8 @@ export default { scanQr: { NotAllowedError: { headerErr: 'Kameraga kirishga ruxsat berilmagan!', - textErr: "Maxfiylik va ma'lumotlarni himoya qilish siyosatiga muvofiq, brauzer sozlamalarida kirishga ruxsat berilishi kerak! Iltimos, tekshiring. Keyin sahifani yangilang va yana so'ralganda qurilma kamerasiga kirishga ruxsat bering." + textErr: + "Maxfiylik va ma'lumotlarni himoya qilish siyosatiga muvofiq, brauzer sozlamalarida kirishga ruxsat berilishi kerak! Iltimos, tekshiring. Keyin sahifani yangilang va yana so'ralganda qurilma kamerasiga kirishga ruxsat bering." }, NotFoundError: '', NotSupportedError: '', diff --git a/src/layouts/MainLayout.vue b/src/layouts/MainLayout.vue index a6afdb0..f21be8b 100644 --- a/src/layouts/MainLayout.vue +++ b/src/layouts/MainLayout.vue @@ -150,6 +150,13 @@ const clear = () => { {{ $t('menu.topUsersDesc') }} + + + + {{ $t('menu.send') }} + {{ $t('menu.sendDesc') }} + + diff --git a/src/pages/ContactsPage.vue b/src/pages/ContactsPage.vue index 3ea629c..9b0ebdb 100644 --- a/src/pages/ContactsPage.vue +++ b/src/pages/ContactsPage.vue @@ -29,7 +29,7 @@ - @@ -70,15 +70,15 @@ const contacts = ref([]) const url = ref('') const isEdit = ref([]) -async function update (value) { +async function update(value) { contacts.value = await db.findContact(value) } -async function edit (index) { +async function edit(index) { isEdit.value[index] = !isEdit.value[index] } -async function save (index) { +async function save(index) { const edited = contacts.value[index] await db.changeContact(JSON.parse(JSON.stringify(edited))) // await getContacts() @@ -89,7 +89,7 @@ async function save (index) { edit() } -async function getUrl () { +async function getUrl() { const exportContacts = await db.getContacts() const data = JSON.stringify(exportContacts) @@ -97,7 +97,7 @@ async function getUrl () { return URL.createObjectURL(file) } -async function plus () { +async function plus() { const name = prompt() const addr = prompt() if (name && addr) { @@ -118,7 +118,7 @@ async function plus () { } } -async function rm (id) { +async function rm(id) { await db.deleteContact(id) await getContacts() url.value = await getUrl() @@ -129,13 +129,13 @@ async function rm (id) { }) } -async function getContacts () { +async function getContacts() { contacts.value = await db.getContacts() isEdit.value.length = contacts.value.length isEdit.value.fill(false) } -async function exportContacts () { +async function exportContacts() { const a = document.createElement('a') a.href = url.value a.download = 'contacts.json' @@ -148,7 +148,7 @@ async function exportContacts () { }, 0) } -function handleFileUpload (event) { +function handleFileUpload(event) { const file = event.target.files[0] const reader = new FileReader() diff --git a/src/pages/send/SendPage.vue b/src/pages/send/SendPage.vue new file mode 100644 index 0000000..8f5866b --- /dev/null +++ b/src/pages/send/SendPage.vue @@ -0,0 +1,35 @@ + + + + + diff --git a/src/router/routes.ts b/src/router/routes.ts index eb79dfd..d75b99e 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -21,7 +21,8 @@ const routes: RouteRecordRaw[] = [ { path: 'ask', component: () => import('src/pages/landing/AskPage.vue') }, { path: 'earn', component: () => import('src/pages/landing/EarnPage.vue') }, { path: 'spend', component: () => import('src/pages/landing/SpendPage.vue') }, - { path: 'topUsers', component: () => import('src/pages/topUsers/TopUsersPage.vue') } + { path: 'topUsers', component: () => import('src/pages/topUsers/TopUsersPage.vue') }, + { path: 'send', component: () => import('src/pages/send/SendPage.vue') } ] }, From 67817e934bb0737d46f627fc3710aa4463981a6e Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 26 Apr 2024 18:42:21 +0400 Subject: [PATCH 2/2] bug fix on contactspage and some features on sendpage --- src/i18n/cn.js | 3 ++- src/i18n/en.js | 3 ++- src/i18n/ru.js | 3 ++- src/i18n/uz.js | 3 ++- src/pages/ContactsPage.vue | 18 +++++++++--------- src/pages/send/SendPage.vue | 8 ++++---- 6 files changed, 21 insertions(+), 17 deletions(-) diff --git a/src/i18n/cn.js b/src/i18n/cn.js index 2022b5e..dfe0c79 100644 --- a/src/i18n/cn.js +++ b/src/i18n/cn.js @@ -72,7 +72,8 @@ export default { placeholder: { p1: '搜尋', p2: '和', - p3: '資訊' + p3: '資訊', + p4: '給誰' }, aboutPlatform: { bannerTexts: { diff --git a/src/i18n/en.js b/src/i18n/en.js index f9c52b0..30a1a99 100644 --- a/src/i18n/en.js +++ b/src/i18n/en.js @@ -71,7 +71,8 @@ export default { placeholder: { p1: 'Find', p2: 'Sum', - p3: 'Message' + p3: 'Message', + p4: 'To whom' }, aboutPlatform: { bannerTexts: { diff --git a/src/i18n/ru.js b/src/i18n/ru.js index add82df..cbf3088 100644 --- a/src/i18n/ru.js +++ b/src/i18n/ru.js @@ -71,7 +71,8 @@ export default { placeholder: { p1: 'Поиск', p2: 'Сумма', - p3: 'Сообщение' + p3: 'Сообщение', + p4: 'Кому' }, aboutPlatform: { bannerTexts: { diff --git a/src/i18n/uz.js b/src/i18n/uz.js index 6dcc2dc..f1d4148 100644 --- a/src/i18n/uz.js +++ b/src/i18n/uz.js @@ -77,7 +77,8 @@ export default { placeholder: { p1: 'Qidirmoq', p2: 'so`m', - p3: 'Xabar' + p3: 'Xabar', + p4: 'Kimga' }, aboutPlatform: { bannerTexts: { diff --git a/src/pages/ContactsPage.vue b/src/pages/ContactsPage.vue index 9b0ebdb..4694396 100644 --- a/src/pages/ContactsPage.vue +++ b/src/pages/ContactsPage.vue @@ -70,15 +70,15 @@ const contacts = ref([]) const url = ref('') const isEdit = ref([]) -async function update(value) { +async function update (value) { contacts.value = await db.findContact(value) } -async function edit(index) { +async function edit (index) { isEdit.value[index] = !isEdit.value[index] } -async function save(index) { +async function save (index) { const edited = contacts.value[index] await db.changeContact(JSON.parse(JSON.stringify(edited))) // await getContacts() @@ -89,7 +89,7 @@ async function save(index) { edit() } -async function getUrl() { +async function getUrl () { const exportContacts = await db.getContacts() const data = JSON.stringify(exportContacts) @@ -97,7 +97,7 @@ async function getUrl() { return URL.createObjectURL(file) } -async function plus() { +async function plus () { const name = prompt() const addr = prompt() if (name && addr) { @@ -118,7 +118,7 @@ async function plus() { } } -async function rm(id) { +async function rm (id) { await db.deleteContact(id) await getContacts() url.value = await getUrl() @@ -129,13 +129,13 @@ async function rm(id) { }) } -async function getContacts() { +async function getContacts () { contacts.value = await db.getContacts() isEdit.value.length = contacts.value.length isEdit.value.fill(false) } -async function exportContacts() { +async function exportContacts () { const a = document.createElement('a') a.href = url.value a.download = 'contacts.json' @@ -148,7 +148,7 @@ async function exportContacts() { }, 0) } -function handleFileUpload(event) { +function handleFileUpload (event) { const file = event.target.files[0] const reader = new FileReader() diff --git a/src/pages/send/SendPage.vue b/src/pages/send/SendPage.vue index 8f5866b..59feb5b 100644 --- a/src/pages/send/SendPage.vue +++ b/src/pages/send/SendPage.vue @@ -1,16 +1,17 @@ -