diff --git a/package.json b/package.json index 9be0b23ac..9fc29467e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "iSunFA", - "version": "0.8.0+9", + "version": "0.8.0+10", "private": false, "scripts": { "dev": "next dev", diff --git a/src/components/login_confirm_modal/information_statement.tsx b/src/components/login_confirm_modal/information_statement.tsx index 362bf1113..c3976d668 100644 --- a/src/components/login_confirm_modal/information_statement.tsx +++ b/src/components/login_confirm_modal/information_statement.tsx @@ -1,128 +1,86 @@ import React from 'react'; +import { useTranslation } from 'react-i18next'; const InformationStatement: React.FC = () => { + const { t } = useTranslation('common'); return ( -
-

Dear User,

-

- Thank you for choosing to use our accounting software. During your use - of this software, we may collect and process some of your personal - information. This statement aims to inform you about the information we - collect, how it is used, and how we protect your privacy. -

+
+

{t('INFO_COLLECTION.DEAR_USER')}

+

{t('INFO_COLLECTION.THANK_YOU')}

-

1. Types of Information Collected

-

- During your use of the accounting software, we may collect the following - information: -

-
); }; diff --git a/src/components/login_confirm_modal/term_n_privacy.tsx b/src/components/login_confirm_modal/term_n_privacy.tsx index 60cfad5b0..7146b7c57 100644 --- a/src/components/login_confirm_modal/term_n_privacy.tsx +++ b/src/components/login_confirm_modal/term_n_privacy.tsx @@ -1,112 +1,58 @@ import React from 'react'; +import { useTranslation } from 'react-i18next'; const TermsOfServiceAndPrivacyPolicy: React.FC = () => { + const { t } = useTranslation('common'); return (
-

Dear User,

-

- Welcome to our accounting software. To ensure you fully understand our - services and how we protect your personal information, please carefully - read the following Terms of Service and Privacy Policy. -

- -

I. Terms of Service

- -

Service Content

-

- Our accounting software includes features such as bookkeeping, report - generation, invoice management, and financial analysis. We reserve the - right to update or modify the service content at any time and will - notify you of such changes through appropriate means. -

- -

Eligibility

-

- You must be at least 18 years old or meet the legal age requirements of - your country, and have full legal capacity to use our services. You - agree to use our services in accordance with relevant laws and - regulations and not engage in any illegal or improper activities. -

- -

Account Management

-

- You need to provide accurate and complete registration information and - are responsible for maintaining the security of your account. If you - discover any unauthorized account use or security vulnerabilities, - please notify us immediately. -

- -

Service Fees

-

- Some features or services may require payment. Specific fees and payment - methods will be detailed on relevant pages or documents. Payments are - non-refundable once confirmed, unless otherwise required by law. -

- -

Limitation of Liability

-

- We are not liable for any indirect, incidental, special, or - consequential damages arising from the use of our services. We are not - responsible for any third-party services or links provided. -

- -

Termination of Service

-

- We reserve the right to terminate or suspend the service at any time for - any reason without liability. You may cancel the use of our services at - any time, but fees paid are non-refundable. -

- -

II. Privacy Policy

- -

Information Collection

-

- We collect various types of information related to your use of the - accounting software, including but not limited to personal - identification information, Usage data, and technical information. For - more details, please refer to the `"`Information Collection Statement.`"` -

- -

Use of Information

-

- The collected information will be used to provide, maintain, and improve - our services, ensure security, and conduct data analysis. We will not - use your information for any other purposes without your consent. -

- -

Information Protection

-

- We take reasonable technical and organizational measures to protect your - information, including data encryption, access control, and regular - security audits. For details, please refer to the `"`Information - Collection Statement.`"` -

- -

Information Sharing

-

- We will not sell, rent, or trade your personal information to third - parties without your consent, except in specific situations such as - legal requirements, service provider cooperation, or business transfers. - For more details, please refer to the `"`Information Collection - Statement.`"` -

- -

Your Rights

-

- You have the right to access, correct, or delete your personal - information at any time. If needed, please contact us via - support@isunfa.com or +123-456-7890. -

- -

Changes to the Privacy Policy

-

- We may update the Privacy Policy from time to time. When significant - changes are made, we will notify you through appropriate means and - publish the changes in the updated policy. -

- -

Thank you for your trust and support in our accounting software!

-

iSunFA August 6, 2024

+

{t('TOS_N_PP.DEAR_USER')}

+

{t('TOS_N_PP.WELCOME')}

+ +

{t('TOS_N_PP.TERMS_OF_SERVICE')}

+ +

{t('TOS_N_PP.SERVICE_CONTENT_TITLE')}

+

{t('TOS_N_PP.SERVICE_CONTENT')}

+ +

{t('TOS_N_PP.ELIGIBILITY_TITLE')}

+

{t('TOS_N_PP.ELIGIBILITY')}

+ +

{t('TOS_N_PP.ACCOUNT_MANAGEMENT_TITLE')}

+

{t('TOS_N_PP.ACCOUNT_MANAGEMENT')}

+ +

{t('TOS_N_PP.SERVICE_FEES_TITLE')}

+

{t('TOS_N_PP.SERVICE_FEES')}

+ +

{t('TOS_N_PP.LIABILITY_TITLE')}

+

{t('TOS_N_PP.LIABILITY')}

+ +

{t('TOS_N_PP.TERMINATION_TITLE')}

+

{t('TOS_N_PP.TERMINATION')}

+ +

{t('TOS_N_PP.PRIVACY_POLICY')}

+ +

{t('TOS_N_PP.INFO_COLLECTION_TITLE')}

+

{t('TOS_N_PP.INFO_COLLECTION')}

+ +

{t('TOS_N_PP.USE_OF_INFO_TITLE')}

+

{t('TOS_N_PP.USE_OF_INFO')}

+ +

{t('TOS_N_PP.PROTECTION_TITLE')}

+

{t('TOS_N_PP.PROTECTION')}

+ +

{t('TOS_N_PP.SHARING_TITLE')}

+

{t('TOS_N_PP.SHARING')}

+ +

{t('TOS_N_PP.YOUR_RIGHTS_TITLE')}

+

{t('TOS_N_PP.YOUR_RIGHTS')}

+

{t('TOS_N_PP.EMAIL')}

+

{t('TOS_N_PP.PHONE')}

+

{t('TOS_N_PP.RESPONSE_TIME')}

+ +

{t('TOS_N_PP.CHANGES_TITLE')}

+

{t('TOS_N_PP.CHANGES')}

+ +

{t('TOS_N_PP.THANK_YOU')}

+

{t('TOS_N_PP.SIGN_OFF')}

); }; diff --git a/src/components/login_page_body/login_page_body.beta.tsx b/src/components/login_page_body/login_page_body.beta.tsx index 7c0be4cc0..963155f2f 100644 --- a/src/components/login_page_body/login_page_body.beta.tsx +++ b/src/components/login_page_body/login_page_body.beta.tsx @@ -48,7 +48,8 @@ const Loader = () => { ); }; -const isJwtExpired = (expires: string) => { +const isJwtExpired = (expires: string | undefined) => { + if (!expires) return true; const now = new Date(); const expirationDate = new Date(expires); return now > expirationDate; @@ -92,11 +93,15 @@ const LoginPageBody = () => { } }; - const handleUserAuthenticated = async () => { + const handleUserAuthenticated = async (force?: boolean) => { + // Deprecate: (20240816-Tzuhan) dev + // eslint-disable-next-line no-console + console.log('user:', user); + setSelectedProvider(user.provider); if (user?.hasReadAgreement) { agreeWithInfomationConfirmModalVisibilityHandler(false); router.push(ISUNFA_ROUTE.SELECT_COMPANY); - } else if (!isAgreeWithInfomationConfirmModalVisible && !hasShowModal) { + } else if ((!isAgreeWithInfomationConfirmModalVisible && !hasShowModal) || force) { agreeWithInfomationConfirmModalVisibilityHandler(true); setHasShowModal(true); } @@ -106,7 +111,7 @@ const LoginPageBody = () => { // Deprecate: (20240816-Tzuhan) dev // eslint-disable-next-line no-console console.log( - 'userAgreeWithInfomationANDTOSNPrivacyPolicy', + 'useEffect userAgreeWithInfomationANDTOSNPrivacyPolicy', userAgreeWithInfomationANDTOSNPrivacyPolicy ); if (userAgreeWithInfomationANDTOSNPrivacyPolicy) handleUserAgree(user.id); @@ -131,16 +136,30 @@ const LoginPageBody = () => { } if (status === 'authenticated') { + // Deprecate: (20240816-Tzuhan) dev + // eslint-disable-next-line no-console + console.log(`useEffect: status === 'authenticated'`); handleUserAuthenticated(); } }, [status]); const authenticateUser = async (provider: Provider) => { try { + // Deprecate: (20240816-Tzuhan) dev + // eslint-disable-next-line no-console + console.log( + `(selectedProvider === provider: ${selectedProvider === provider}) provider: ${provider}, selectedProvider: ${selectedProvider}, status: ${status}` + ); if (selectedProvider === provider && status === 'authenticated') { const session = await getSession(); + // Deprecate: (20240816-Tzuhan) dev + // eslint-disable-next-line no-console + console.log( + `!isJwtExpired(session.expires): ${!isJwtExpired(session?.expires)}, session:`, + session + ); if (session && !isJwtExpired(session.expires)) { - handleUserAuthenticated(); + handleUserAuthenticated(true); return; } } @@ -178,11 +197,13 @@ const LoginPageBody = () => {
authenticateUser(Provider.GOOGLE)} provider="Google" /> + {/* Info: (20240813 - Tzuhan) Apple login is not provided in the beta version authenticateUser(Provider.APPLE)} provider="Apple" disabled /> + */}
)} diff --git a/src/locales/cn/common.json b/src/locales/cn/common.json index 890acfa91..6f68a3a97 100644 --- a/src/locales/cn/common.json +++ b/src/locales/cn/common.json @@ -859,5 +859,75 @@ "TITLE": "iSunFA", "DESCRIPTION": "融合区块链会计与人工智能审计的先进会计解决方案", "KEYWORDS": "iSunFA, 区块链, AI, 法务, 会计, 审计" + }, + "INFO_COLLECTION": { + "DEAR_USER": "亲爱的用户,", + "THANK_YOU": "感谢您选择使用我们的会计软件。在您使用本软件期间,我们可能会收集并处理您的某些个人信息。本声明旨在告知您我们收集的信息、其用途以及我们如何保护您的隐私。", + "TYPES_OF_INFO": "1. 收集的信息类型", + "COLLECT_INFO": "在您使用会计软件期间,我们可能会收集以下信息:", + "PERSONAL_INFO": "个人身份信息:包括但不限于您的姓名、电子邮件地址、电话号码、公司名称等。", + "USAGE_DATA": "使用数据:如您在软件内的操作记录、使用时长、访问频率等。", + "TECH_INFO": "技术信息:如IP地址、设备信息、操作系统、浏览器类型等。", + "USE_OF_INFO": "2. 信息的使用", + "USE_OF_INFO_DESC": "我们收集的信息将主要用于以下目的:", + "SERVICES": "提供和维护服务:确保会计软件的正常运行并提升用户体验。", + "PERSONALIZED_SERVICES": "个性化服务:根据您的需求和偏好提供定制功能和建议。", + "SUPPORT": "客户支持:解答您的疑问、处理您的请求和投诉。", + "SECURITY": "安全保障:检测和防止潜在的安全威胁,保护您的数据安全。", + "ANALYSIS": "数据分析:进行统计分析以改进我们的产品和服务。", + "PROTECTION_OF_INFO": "3. 信息的保护", + "PROTECTION_DESC": "我们承诺采取合理的技术和组织措施,保护您的个人信息免受未经授权的访问、披露、更改或破坏。这些措施包括但不限于:", + "ENCRYPTION": "数据加密:加密敏感数据。", + "ACCESS_CONTROL": "访问控制:限制员工和第三方的数据访问权限。", + "AUDITS": "定期审核:定期审查我们的安全措施和政策。", + "SHARING_OF_INFO": "4. 信息的共享", + "SHARING_DESC": "我们不会在未经您同意的情况下向任何第三方出售、出租或交易您的个人信息。然而,在以下情况下,我们可能会分享您的信息:", + "LEGAL": "法律要求:在法律要求或政府部门要求时。", + "PROVIDERS": "服务提供商:与与我们合作的第三方服务提供商共享,但前提是他们仅按照我们的指示使用您的信息并遵守适当的保密和安全措施。", + "BUSINESS_TRANSFERS": "业务转让:在公司合并、收购或资产出售时,我们可能会转让您的信息。", + "YOUR_RIGHTS": "5. 您的权利", + "RIGHTS_DESC": "您有权随时访问、修改或删除您的个人信息。如您希望行使这些权利或有任何问题,请通过以下方式联系我们:", + "EMAIL": "电子邮件:support@isunfa.com", + "PHONE": "电话:+123-456-7890", + "RESPONSE_TIME": "我们将努力在合理的时间范围内回应您的请求。", + "CHANGES": "6. 声明的变更", + "CHANGES_DESC": "我们可能会不时更新本声明以反映我们信息处理实践的变更。当我们对本声明进行重大变更时,将通过软件内通知或电子邮件通知您。", + "THANK_YOU_END": "感谢您对我们会计软件的信任和支持!", + "SIGN_OFF": "iSunFA 2024年8月6日" + }, + "TOS_N_PP": { + "DEAR_USER": "亲爱的用户,", + "WELCOME": "欢迎使用我们的会计软件。为了确保您充分了解我们的服务以及我们如何保护您的个人信息,请仔细阅读以下服务条款和隐私政策。", + "TERMS_OF_SERVICE": "I. 服务条款", + "SERVICE_CONTENT_TITLE": "服务内容", + "SERVICE_CONTENT": "我们的会计软件包括记账、报表生成、发票管理和财务分析等功能。我们保留随时更新或修改服务内容的权利,并将通过适当的方式通知您这些变更。", + "ELIGIBILITY_TITLE": "资格", + "ELIGIBILITY": "您必须年满18岁或符合您所在国家的法定年龄要求,并且具有完全的法律行为能力使用我们的服务。您同意依照相关法律法规使用我们的服务,不从事任何非法或不当的活动。", + "ACCOUNT_MANAGEMENT_TITLE": "账户管理", + "ACCOUNT_MANAGEMENT": "您需要提供准确且完整的注册信息,并对您的账户安全负责。如果您发现任何未经授权的账户使用或安全漏洞,请立即通知我们。", + "SERVICE_FEES_TITLE": "服务费用", + "SERVICE_FEES": "某些功能或服务可能需要付费。具体费用及支付方式将在相关页面或文件中详细说明。除非法律另有规定,支付一经确认,概不退款。", + "LIABILITY_TITLE": "责任限制", + "LIABILITY": "我们对因使用我们的服务而产生的任何间接、附带、特殊或后果性损害概不负责。我们不对任何第三方服务或提供的链接负责。", + "TERMINATION_TITLE": "服务终止", + "TERMINATION": "我们保留随时出于任何原因终止或暂停服务的权利,且不承担任何责任。您可以随时取消使用我们的服务,但已支付的费用不予退还。", + "PRIVACY_POLICY": "II. 隐私政策", + "INFO_COLLECTION_TITLE": "信息收集", + "INFO_COLLECTION": "我们收集与您使用会计软件相关的各种信息,包括但不限于个人身份信息、使用数据和技术信息。详细信息请参考《信息收集声明》。", + "USE_OF_INFO_TITLE": "信息的使用", + "USE_OF_INFO": "收集的信息将用于提供、维护和改进我们的服务,确保安全和进行数据分析。未经您的同意,我们不会将您的信息用于其他用途。", + "PROTECTION_TITLE": "信息的保护", + "PROTECTION": "我们采取合理的技术和组织措施保护您的信息,包括数据加密、访问控制和定期安全审核。详细内容请参考《信息收集声明》。", + "SHARING_TITLE": "信息的共享", + "SHARING": "我们不会在未经您同意的情况下将您的个人信息出售、出租或交易给第三方,除非在法律要求、服务提供商合作或业务转让等特定情况下。详细内容请参考《信息收集声明》。", + "YOUR_RIGHTS_TITLE": "您的权利", + "YOUR_RIGHTS": "您有权随时访问、修改或删除您的个人信息。如有需要,请通过 support@isunfa.com 或 +123-456-7890 联系我们。", + "EMAIL": "电子邮件:support@isunfa.com", + "PHONE": "电话:+123-456-7890", + "RESPONSE_TIME": "我们将努力在合理的时间范围内回应您的请求。", + "CHANGES_TITLE": "隐私政策的变更", + "CHANGES": "我们可能会不时更新隐私政策。当有重大变更时,我们将通过适当的方式通知您,并在更新的政策中发布变更。", + "THANK_YOU": "感谢您对我们会计软件的信任和支持!", + "SIGN_OFF": "iSunFA 2024年8月6日" } } diff --git a/src/locales/en/common.json b/src/locales/en/common.json index de540b0c0..a4bd60036 100644 --- a/src/locales/en/common.json +++ b/src/locales/en/common.json @@ -859,5 +859,75 @@ "TITLE": "iSunFA", "DESCRIPTION": "Comprehensive accounting solution that enhances efficiency and accuracy through blockchain and AI integration.", "KEYWORDS": "iSunFA, Blockchain, AI, Forensic, Accounting, Auditing" + }, + "INFO_COLLECTION": { + "DEAR_USER": "Dear User,", + "THANK_YOU": "Thank you for choosing to use our accounting software. During your use of this software, we may collect and process some of your personal information. This statement aims to inform you about the information we collect, how it is used, and how we protect your privacy.", + "TYPES_OF_INFO": "1. Types of Information Collected", + "COLLECT_INFO": "During your use of the accounting software, we may collect the following information:", + "PERSONAL_INFO": "Personal Identification Information: Including but not limited to your name, email address, phone number, company name, etc.", + "USAGE_DATA": "Usage Data: Such as your operation records within the software, usage duration, access frequency, etc.", + "TECH_INFO": "Technical Information: Such as IP address, device information, operating system, browser type, etc.", + "USE_OF_INFO": "2. Use of Information", + "USE_OF_INFO_DESC": "The information we collect will primarily be used for the following purposes:", + "SERVICES": "Providing and Maintaining Services: Ensuring the normal operation of the accounting software and improving the user experience.", + "PERSONALIZED_SERVICES": "Personalized Services: Providing customized features and recommendations based on your needs and preferences.", + "SUPPORT": "Customer Support: Addressing your questions, handling your requests and complaints.", + "SECURITY": "Security Assurance: Detecting and preventing potential security threats, protecting your data security.", + "ANALYSIS": "Data Analysis: Conducting statistical analysis to improve our products and services.", + "PROTECTION_OF_INFO": "3. Protection of Information", + "PROTECTION_DESC": "We commit to taking reasonable technical and organizational measures to protect your personal information from unauthorized access, disclosure, alteration, or destruction. These measures include but are not limited to:", + "ENCRYPTION": "Data Encryption: Encrypting sensitive data.", + "ACCESS_CONTROL": "Access Control: Restricting data access rights to employees and third parties.", + "AUDITS": "Regular Audits: Regularly reviewing our security measures and policies.", + "SHARING_OF_INFO": "4. Sharing of Information", + "SHARING_DESC": "We will not sell, rent, or trade your personal information to any third party without your consent. However, we may share your information in the following circumstances:", + "LEGAL": "Legal Requirements: When required by law or requested by government authorities.", + "PROVIDERS": "Service Providers: With third-party service providers who work with us, provided they only use your information to perform our instructions and comply with appropriate confidentiality and security measures.", + "BUSINESS_TRANSFERS": "Business Transfers: In the event of a company merger, acquisition, or asset sale, we may transfer your information.", + "YOUR_RIGHTS": "5. Your Rights", + "RIGHTS_DESC": "You have the right to access, correct, or delete your personal information at any time. If you wish to exercise these rights or have any questions, please contact us via:", + "EMAIL": "Email: support@isunfa.com", + "PHONE": "Phone: +123-456-7890", + "RESPONSE_TIME": "We will strive to respond to your request within a reasonable time frame.", + "CHANGES": "6. Changes to the Statement", + "CHANGES_DESC": "We may update this statement from time to time to reflect changes in our information handling practices. When we make significant changes to this statement, we will notify you through in-software notifications or via email.", + "THANK_YOU_END": "Thank you for your trust and support in our accounting software!", + "SIGN_OFF": "iSunFA August 6, 2024" + }, + "TOS_N_PP": { + "DEAR_USER": "Dear User,", + "WELCOME": "Welcome to our accounting software. To ensure you fully understand our services and how we protect your personal information, please carefully read the following Terms of Service and Privacy Policy.", + "TERMS_OF_SERVICE": "I. Terms of Service", + "SERVICE_CONTENT_TITLE": "Service Content", + "SERVICE_CONTENT": "Our accounting software includes features such as bookkeeping, report generation, invoice management, and financial analysis. We reserve the right to update or modify the service content at any time and will notify you of such changes through appropriate means.", + "ELIGIBILITY_TITLE": "Eligibility", + "ELIGIBILITY": "You must be at least 18 years old or meet the legal age requirements of your country, and have full legal capacity to use our services. You agree to use our services in accordance with relevant laws and regulations and not engage in any illegal or improper activities.", + "ACCOUNT_MANAGEMENT_TITLE": "Account Management", + "ACCOUNT_MANAGEMENT": "You need to provide accurate and complete registration information and are responsible for maintaining the security of your account. If you discover any unauthorized account use or security vulnerabilities, please notify us immediately.", + "SERVICE_FEES_TITLE": "Service Fees", + "SERVICE_FEES": "Some features or services may require payment. Specific fees and payment methods will be detailed on relevant pages or documents. Payments are non-refundable once confirmed, unless otherwise required by law.", + "LIABILITY_TITLE": "Limitation of Liability", + "LIABILITY": "We are not liable for any indirect, incidental, special, or consequential damages arising from the use of our services. We are not responsible for any third-party services or links provided.", + "TERMINATION_TITLE": "Termination of Service", + "TERMINATION": "We reserve the right to terminate or suspend the service at any time for any reason without liability. You may cancel the use of our services at any time, but fees paid are non-refundable.", + "PRIVACY_POLICY": "II. Privacy Policy", + "INFO_COLLECTION_TITLE": "Information Collection", + "INFO_COLLECTION": "We collect various types of information related to your use of the accounting software, including but not limited to personal identification information, usage data, and technical information. For more details, please refer to the \"Information Collection Statement.\"", + "USE_OF_INFO_TITLE": "Use of Information", + "USE_OF_INFO": "The collected information will be used to provide, maintain, and improve our services, ensure security, and conduct data analysis. We will not use your information for any other purposes without your consent.", + "PROTECTION_TITLE": "Information Protection", + "PROTECTION": "We take reasonable technical and organizational measures to protect your information, including data encryption, access control, and regular security audits. For details, please refer to the \"Information Collection Statement.\"", + "SHARING_TITLE": "Information Sharing", + "SHARING": "We will not sell, rent, or trade your personal information to third parties without your consent, except in specific situations such as legal requirements, service provider cooperation, or business transfers. For more details, please refer to the \"Information Collection Statement.\"", + "YOUR_RIGHTS_TITLE": "Your Rights", + "YOUR_RIGHTS": "You have the right to access, correct, or delete your personal information at any time. If needed, please contact us via support@isunfa.com or +123-456-7890.", + "EMAIL": "Email: support@isunfa.com", + "PHONE": "Phone: +123-456-7890", + "RESPONSE_TIME": "We will strive to respond to your request within a reasonable time frame.", + "CHANGES_TITLE": "Changes to the Privacy Policy", + "CHANGES": "We may update the Privacy Policy from time to time. When significant changes are made, we will notify you through appropriate means and publish the changes in the updated policy.", + "THANK_YOU": "Thank you for your trust and support in our accounting software!", + "SIGN_OFF": "iSunFA August 6, 2024" } } diff --git a/src/locales/tw/common.json b/src/locales/tw/common.json index be509bcf4..6ef3dc98f 100644 --- a/src/locales/tw/common.json +++ b/src/locales/tw/common.json @@ -859,5 +859,75 @@ "TITLE": "iSunFA", "DESCRIPTION": "融合區塊鏈會計與人工智能審計的先進會計解決方案", "KEYWORDS": "iSunFA, 區塊鏈, AI, 法務, 會計, 審計" + }, + "INFO_COLLECTION": { + "DEAR_USER": "親愛的用戶,", + "THANK_YOU": "感謝您選擇使用我們的會計軟體。在您使用本軟體期間,我們可能會收集並處理您的一些個人資訊。本聲明旨在告知您我們收集的資訊、其用途以及我們如何保護您的隱私。", + "TYPES_OF_INFO": "1. 收集的資訊類型", + "COLLECT_INFO": "在您使用會計軟體期間,我們可能會收集以下資訊:", + "PERSONAL_INFO": "個人身份資訊:包括但不限於您的姓名、電子郵件地址、電話號碼、公司名稱等。", + "USAGE_DATA": "使用數據:如您在軟體內的操作記錄、使用時長、訪問頻率等。", + "TECH_INFO": "技術資訊:如IP地址、設備資訊、操作系統、瀏覽器類型等。", + "USE_OF_INFO": "2. 資訊的使用", + "USE_OF_INFO_DESC": "我們收集的資訊將主要用於以下目的:", + "SERVICES": "提供和維護服務:確保會計軟體的正常運行並提升用戶體驗。", + "PERSONALIZED_SERVICES": "個性化服務:根據您的需求和偏好提供定制功能和建議。", + "SUPPORT": "客戶支援:解答您的疑問、處理您的請求和投訴。", + "SECURITY": "安全保障:檢測和防止潛在的安全威脅,保護您的數據安全。", + "ANALYSIS": "數據分析:進行統計分析以改進我們的產品和服務。", + "PROTECTION_OF_INFO": "3. 資訊的保護", + "PROTECTION_DESC": "我們承諾採取合理的技術和組織措施,保護您的個人資訊免受未經授權的訪問、披露、更改或破壞。這些措施包括但不限於:", + "ENCRYPTION": "數據加密:加密敏感數據。", + "ACCESS_CONTROL": "訪問控制:限制員工和第三方的數據訪問權限。", + "AUDITS": "定期審核:定期審查我們的安全措施和政策。", + "SHARING_OF_INFO": "4. 資訊的共享", + "SHARING_DESC": "我們不會在未經您同意的情況下向任何第三方出售、出租或交易您的個人資訊。然而,在以下情況下,我們可能會分享您的資訊:", + "LEGAL": "法律要求:在法律要求或政府部門要求時。", + "PROVIDERS": "服務提供商:與與我們合作的第三方服務提供商共享,但前提是他們僅按照我們的指示使用您的資訊並遵守適當的保密和安全措施。", + "BUSINESS_TRANSFERS": "業務轉讓:在公司合併、收購或資產出售時,我們可能會轉讓您的資訊。", + "YOUR_RIGHTS": "5. 您的權利", + "RIGHTS_DESC": "您有權隨時訪問、修改或刪除您的個人資訊。如您希望行使這些權利或有任何問題,請通過以下方式聯繫我們:", + "EMAIL": "電子郵件:support@isunfa.com", + "PHONE": "電話:+123-456-7890", + "RESPONSE_TIME": "我們將努力在合理的時間範圍內回應您的請求。", + "CHANGES": "6. 聲明的變更", + "CHANGES_DESC": "我們可能會不時更新本聲明以反映我們資訊處理實踐的變更。當我們對本聲明進行重大變更時,將通過軟體內通知或電子郵件通知您。", + "THANK_YOU_END": "感謝您對我們會計軟體的信任和支持!", + "SIGN_OFF": "iSunFA 2024年8月6日" + }, + "TOS_N_PP": { + "DEAR_USER": "親愛的用戶,", + "WELCOME": "歡迎使用我們的會計軟體。為了確保您充分了解我們的服務以及我們如何保護您的個人資訊,請仔細閱讀以下服務條款和隱私政策。", + "TERMS_OF_SERVICE": "I. 服務條款", + "SERVICE_CONTENT_TITLE": "服務內容", + "SERVICE_CONTENT": "我們的會計軟體包括記帳、報表生成、發票管理和財務分析等功能。我們保留隨時更新或修改服務內容的權利,並將通過適當的方式通知您這些變更。", + "ELIGIBILITY_TITLE": "資格", + "ELIGIBILITY": "您必須年滿18歲或符合您所在國家的法定年齡要求,並且具有完全的法律行為能力使用我們的服務。您同意依照相關法律法規使用我們的服務,不從事任何非法或不正當的活動。", + "ACCOUNT_MANAGEMENT_TITLE": "賬戶管理", + "ACCOUNT_MANAGEMENT": "您需要提供準確且完整的註冊信息,並對您的賬戶安全負責。如果您發現任何未經授權的賬戶使用或安全漏洞,請立即通知我們。", + "SERVICE_FEES_TITLE": "服務費用", + "SERVICE_FEES": "某些功能或服務可能需要付費。具體費用及支付方式將在相關頁面或文件中詳細說明。除非法律另有規定,支付一經確認,概不退款。", + "LIABILITY_TITLE": "責任限制", + "LIABILITY": "我們對因使用我們的服務而產生的任何間接、附帶、特殊或後果性損害概不負責。我們不對任何第三方服務或提供的鏈接負責。", + "TERMINATION_TITLE": "服務終止", + "TERMINATION": "我們保留隨時出於任何原因終止或暫停服務的權利,且不承擔任何責任。您可以隨時取消使用我們的服務,但已支付的費用不予退還。", + "PRIVACY_POLICY": "II. 隱私政策", + "INFO_COLLECTION_TITLE": "資訊收集", + "INFO_COLLECTION": "我們收集與您使用會計軟體相關的各種信息,包括但不限於個人身份信息、使用數據和技術信息。詳細信息請參考《信息收集聲明》。", + "USE_OF_INFO_TITLE": "資訊的使用", + "USE_OF_INFO": "收集的信息將用於提供、維護和改進我們的服務,確保安全和進行數據分析。未經您的同意,我們不會將您的信息用於其他用途。", + "PROTECTION_TITLE": "資訊的保護", + "PROTECTION": "我們採取合理的技術和組織措施保護您的信息,包括數據加密、訪問控制和定期安全審核。詳細內容請參考《信息收集聲明》。", + "SHARING_TITLE": "資訊的共享", + "SHARING": "我們不會在未經您同意的情況下將您的個人信息出售、出租或交易給第三方,除非在法律要求、服務提供商合作或業務轉讓等特定情況下。詳細內容請參考《信息收集聲明》。", + "YOUR_RIGHTS_TITLE": "您的權利", + "YOUR_RIGHTS": "您有權隨時訪問、修改或刪除您的個人信息。如有需要,請通過 support@isunfa.com 或 +123-456-7890 聯繫我們。", + "EMAIL": "電子郵件:support@isunfa.com", + "PHONE": "電話:+123-456-7890", + "RESPONSE_TIME": "我們將努力在合理的時間範圍內回應您的請求。", + "CHANGES_TITLE": "隱私政策的變更", + "CHANGES": "我們可能會不時更新隱私政策。當有重大變更時,我們將通過適當的方式通知您,並在更新的政策中發布變更。", + "THANK_YOU": "感謝您對我們會計軟體的信任和支持!", + "SIGN_OFF": "iSunFA 2024年8月6日" } } diff --git a/src/pages/api/auth/[...nextauth].ts b/src/pages/api/auth/[...nextauth].ts index a7161c70b..2e782da35 100644 --- a/src/pages/api/auth/[...nextauth].ts +++ b/src/pages/api/auth/[...nextauth].ts @@ -71,6 +71,7 @@ export default NextAuth({ clientId: process.env.GOOGLE_CLIENT_ID as string, clientSecret: process.env.GOOGLE_CLIENT_SECRET as string, }), + // Info: (20240813 - Tzuhan) Apple login is not provided in the beta version // AppleProvider({ // clientId: process.env.APPLE_CLIENT_ID as string, // clientSecret: generateAppleClientSecret(), diff --git a/src/pages/users/login-beta.tsx b/src/pages/users/login-beta.tsx index bebf8f3a5..038853e0c 100644 --- a/src/pages/users/login-beta.tsx +++ b/src/pages/users/login-beta.tsx @@ -4,22 +4,21 @@ import { serverSideTranslations } from 'next-i18next/serverSideTranslations'; import NavBar from '@/components/nav_bar/nav_bar'; import LoginPageBody from '@/components/login_page_body/login_page_body.beta'; import { GetServerSideProps } from 'next'; -// import { useUserCtx } from '@/contexts/user_context'; -// import { SkeletonList } from '@/components/skeleton/skeleton'; -// import { DEFAULT_SKELETON_COUNT_FOR_PAGE } from '@/constants/display'; +import { useUserCtx } from '@/contexts/user_context'; +import { SkeletonList } from '@/components/skeleton/skeleton'; +import { DEFAULT_SKELETON_COUNT_FOR_PAGE } from '@/constants/display'; import { useTranslation } from 'next-i18next'; import { ISUNFA_ROUTE } from '@/constants/url'; const LoginPage = () => { const { t } = useTranslation('common'); - // const { isAuthLoading } = useUserCtx(); + const { isAuthLoading } = useUserCtx(); - const displayedBody = ( - // isAuthLoading ? ( - //
- // - //
- // ) : + const displayedBody = isAuthLoading ? ( +
+ +
+ ) : (
@@ -55,10 +54,10 @@ const LoginPage = () => { export const getServerSideProps: GetServerSideProps = async ({ locale, query }) => { try { - // const session = await getSession({ req }); const { invitation = '', action = '' } = query; - // 如果没有 session,重定向到登录页面 + // Info: (20240815 - Tzuhan) Deprecate: 如果没有 session,重定向到登录页面 + // const session = await getSession({ req }); // if (!session) { // return { // props: {