Commit graph

62 commits

Author SHA1 Message Date
Yawata
97293b44fd Merge branch 'master' of https://github.com/moreoronce/LobeChat-Android 2024-12-30 09:16:35 +08:00
Yawata
3d49ae565d feat: Add support for IP address:port access
Update regex to support IP address format
Improve URL handling logic for IP addresses
Update error message to reflect supported formats
fix: Allow cleartext HTTP traffic

Add android:usesCleartextTraffic="true" to AndroidManifest.xml
Fix err_cleartext_not_permitted error
perf: Optimize regex performance

Precompile regex patterns as constants
Use precompiled URL_PATTERN and IP_PATTERN for matching
Reduce CPU overhead on each button click
2024-12-30 09:13:26 +08:00
Yawata
cca53c7807
Update README.md 2024-10-07 18:32:45 +08:00
Yawata
12e696486e
Add files via upload
Add image
2024-10-07 18:29:00 +08:00
moreoronce
789d2eea0d Merge branch 'master' of https://github.com/moreoronce/LobeChat-Android 2024-10-07 17:45:26 +08:00
moreoronce
90cacdc914 Add back navigation support in WebViewActivity
- Fixed the implemented onBackPressed method to enable back navigation within the WebView.
2024-10-07 17:44:41 +08:00
Yawata
3974bdfd27
Update README.md 2024-10-07 14:54:26 +08:00
Yawata
2b203c56b4
Update README.md 2024-10-07 14:54:02 +08:00
Yawata
1a9a24236c
Update README.md 2024-10-07 14:48:51 +08:00
Yawata
57b14cc413
Update README.md 2024-10-07 14:38:11 +08:00
moreoronce
e835b5a1e4 Enhance WebViewActivity Functionality and Performance
- Integrated SwipeRefreshLayout for improved refreshing capabilities.
- Added FloatingActionButton for manual WebView refresh.
- Implemented drag-to-move functionality for the refresh button.
- Optimized code with enhanced logging and error handling.
- Ensured proper WebView initialization with upgraded settings.
2024-10-07 13:54:55 +08:00
moreoronce
236bb140f8 Add Functionality and Fix Issues in WebViewActivity
- Implemented draggable FloatingActionButton with click functionality.
- Resolved touch conflict between touch and click events on FloatingActionButton.
- Improved WebView reload logic and ensured UI components are not obstructed.
- Updated XML layouts for better constraint alignment and visual consistency.
- Enhanced logging for user actions on the refresh button.

Ensures a smoother user experience and UI operation.
2024-10-07 13:29:12 +08:00
moreoronce
b82febf82a Refactor and Optimize Layouts and Resources
- Updated activity_main.xml for better layout alignment and consistent use of Material Design components.
- Added ids to LinearLayouts for easier reference and manipulation.
- Enhanced styles in styles.xml to unify the UI appearance across the app.
- Adjusted themes in themes.xml to incorporate the latest Material Components.
- Revised colors.xml and strings.xml to include new color schemes and text resources.
- Updated backup_rules.xml and various drawable resources for consistency and clarity.
2024-10-07 09:00:14 +08:00
moreoronce
e1314869dc - Delete unused resources 2024-10-06 22:06:55 +08:00
moreoronce
ef91e5c177 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	README.md
2024-10-06 22:06:04 +08:00
moreoronce
56b312ef82 - Update Colors.xml 2024-10-06 22:04:54 +08:00
moreoronce
80fccdd2d6 - Remove unused import and code 2024-10-06 22:04:54 +08:00
moreoronce
aea98ecf6f Add Spinner for URL selection and adjust layout
- Change Logo And aligned the logo with LobeHub SVG for better visual consistency.
- Adjusted the input field style to match the LobeChat design guidelines.
- Ensured proper padding, margins, and constraints for responsiveness across different screen sizes.
2024-10-06 22:04:54 +08:00
moreoronce
45f1e9636d feat: Add one-time LobeChat validation logic for WebViewActivity
- Introduced a boolean flag `isLobeChatVerified` to ensure LobeChat validation is executed only once for the initial page load.
- Modified `onPageFinished` in `WebViewClient` to check if the header contains "lobechat" text.
- Added logic to redirect the user back to `MainActivity` if the LobeChat validation fails.
- Prevent further validation checks on subsequent page loads once verified.
- This update ensures that unnecessary validation does not disrupt user activities, especially during interactions with third-party services like login.
2024-10-06 22:04:54 +08:00
moreoronce
8e4740c15d update 2024-10-06 22:04:54 +08:00
moreoronce
c2fd9c30ca feat: Implement back button handling using OnBackPressedDispatcher
- Replaced deprecated onBackPressed() method with OnBackPressedDispatcher for better handling of back navigation in WebView.
- Updated WebViewActivity to inject JavaScript to prevent PWA installation prompts.
- Improved file chooser functionality with ActivityResultLauncher.
- Enhanced user experience with Snackbar for error messages.
2024-10-06 22:04:53 +08:00
moreoronce
87a9abc1f2 update 2024-10-06 22:04:53 +08:00
Yawata
d4bab879d6 Update README.md 2024-10-06 22:04:53 +08:00
Yawata
9a6b5f4592 Update README.md 2024-10-06 22:04:53 +08:00
Yawata
93082da769
Update README.md 2024-10-06 22:03:01 +08:00
Yawata
59cf6491ab
Update README.md 2024-10-06 22:01:32 +08:00
moreoronce
3825a2d674 - Update Colors.xml 2024-10-06 21:40:40 +08:00
moreoronce
4b00652423 - Remove unused import and code 2024-10-06 21:21:11 +08:00
moreoronce
aba43616da Add Spinner for URL selection and adjust layout
- Change Logo And aligned the logo with LobeHub SVG for better visual consistency.
- Adjusted the input field style to match the LobeChat design guidelines.
- Ensured proper padding, margins, and constraints for responsiveness across different screen sizes.
2024-10-06 20:57:31 +08:00
moreoronce
5f63e48590 feat: Add one-time LobeChat validation logic for WebViewActivity
- Introduced a boolean flag `isLobeChatVerified` to ensure LobeChat validation is executed only once for the initial page load.
- Modified `onPageFinished` in `WebViewClient` to check if the header contains "lobechat" text.
- Added logic to redirect the user back to `MainActivity` if the LobeChat validation fails.
- Prevent further validation checks on subsequent page loads once verified.
- This update ensures that unnecessary validation does not disrupt user activities, especially during interactions with third-party services like login.
2024-10-06 12:05:34 +08:00
moreoronce
83999fe7de update 2024-10-05 21:57:37 +08:00
moreoronce
eddb5ed553 feat: Implement back button handling using OnBackPressedDispatcher
- Replaced deprecated onBackPressed() method with OnBackPressedDispatcher for better handling of back navigation in WebView.
- Updated WebViewActivity to inject JavaScript to prevent PWA installation prompts.
- Improved file chooser functionality with ActivityResultLauncher.
- Enhanced user experience with Snackbar for error messages.
2024-10-05 21:49:43 +08:00
moreoronce
8fe640ef2b update 2024-10-05 21:18:51 +08:00
moreoronce
af172900b2 Merge branch 'master' of https://github.com/moreoronce/lobe-chat-android 2024-10-05 21:17:45 +08:00
Yawata
cb90e63e35
Update README.md 2024-10-05 20:59:27 +08:00
Yawata
2054cd1fa3
Update README.md 2024-10-05 20:30:41 +08:00
moreoronce
7ff38f6c76 feat: Add URL validation and prompt feature
- Update Dependence
2024-10-05 20:11:26 +08:00
moreoronce
e0bd5602ab feat: Add URL validation and prompt feature
- Implemented regular expression validation for the input URL in WebViewActivity.
- Display a prompt saying "Please enter a valid website address" if the URL format is incorrect.
- Maintained existing functionality to ensure that only valid URLs can be loaded.
- Split the WebView functionality from MainActivity into a separate page
2024-10-05 19:57:47 +08:00
moreoronce
c4f50c2c14 feat: Update storage permission handling for image access
- Implemented request for READ_EXTERNAL_STORAGE permission to allow users to select images.
- Optimized permission request logic to avoid unnecessary prompts if permission has already been granted.
- Added user-friendly dialogs to guide users to app settings when permissions are denied.
- Enhanced error handling and logging for WebView to improve debugging and user experience.
- Loaded last entered URL from SharedPreferences for better usability.
- Updated UI interactions to hide input elements when loading web content.
- Remove unnecessary permission granted.

This update improves the overall user experience by streamlining the permission process and enhancing image selection functionality.
2024-10-05 19:06:53 +08:00
Yawata
1e2bcee52c
Update android.yml 2024-10-05 17:20:09 +08:00
Yawata
4442e3a94a
Update android.yml 2024-10-05 17:13:52 +08:00
Yawata
47583d2250
Update android.yml 2024-10-05 16:59:10 +08:00
Yawata
419859f767
Update android.yml 2024-10-05 16:52:46 +08:00
Yawata
56b0b830d5
Create README.md 2024-10-05 16:44:10 +08:00
Yawata
98782c5ac4
Update android.yml 2024-10-05 16:42:17 +08:00
Yawata
2dbebba802
Update android.yml 2024-10-05 16:41:41 +08:00
moreoronce
a2c84cc7f4 update 2024-10-05 16:39:59 +08:00
Yawata
f5f4fc28ef
Update android.yml 2024-10-05 16:38:41 +08:00
moreoronce
02ae76fc72 Merge remote-tracking branch 'origin/master' 2024-10-05 16:30:45 +08:00
moreoronce
f54f9eed62 update 2024-10-05 16:30:20 +08:00