完成 IM Web Android 端产品页面开发
This commit is contained in:
@@ -252,7 +252,7 @@ class TinodeWeb extends React.Component {
|
||||
errorAction: undefined,
|
||||
errorActionText: null,
|
||||
|
||||
sidePanelSelected: 'login',
|
||||
sidePanelSelected: 'tenant',
|
||||
sidePanelTitle: null,
|
||||
sidePanelAvatar: null,
|
||||
myTrustedBadges: [],
|
||||
@@ -576,6 +576,44 @@ class TinodeWeb extends React.Component {
|
||||
// Left-side panel selector.
|
||||
if (['acc_general','archive','blocked','contacts','cred','crop','edit','general',
|
||||
'newtpk','notif','register','reset','security','settings','support','wallpapers',
|
||||
'tenant','login','enterprise-register','enterprise-feedback','identity-check',
|
||||
'realname','realname-verified','realname-reminder','independent-password',
|
||||
'messages-home','messages-offline','messages-menu','message-actions','system-messages',
|
||||
'chat-inbound-request','chat-inbound-message','chat-outbound-request','chat-status',
|
||||
'chat-friend','chat-media','chat-blocked','chat-deleted','chat-standard',
|
||||
'chat-attachments','chat-mixed','chat-contact-card',
|
||||
'compose-keyboard','mentions-select','mentions-complete','mentions-message',
|
||||
'emoji-panel','emoji-message','voice-ready','voice-hold','voice-recording',
|
||||
'media-uploading','media-gallery','media-retry','upload-file','file-message',
|
||||
'message-multiselect','favorite-success','forward-select','forward-multiple',
|
||||
'forward-individual','forward-bundle',
|
||||
'address-book','friend-requests','add-friend','my-friend-qr','friend-search-result',
|
||||
'friend-verification','friend-profile','group-member-profile','friend-settings',
|
||||
'friend-settings-blocked','friend-delete-confirm','block-list','block-confirm','clear-chat-confirm',
|
||||
'group-list','group-empty','group-invite','group-events','group-join-requests',
|
||||
'group-new-request','group-announcement','group-summary','group-announcement-detail',
|
||||
'group-settings','group-profile','group-avatar','group-nickname','group-description',
|
||||
'group-role-message','group-qr','group-governance','group-admins','group-admin-add',
|
||||
'group-admin-success','group-admin-partial','group-admin-removed','group-mute-add',
|
||||
'group-muted','group-owner-select','group-owner-confirm','group-files','group-file-upload',
|
||||
'favorites','favorites-mixed','favorites-files','favorites-text','favorites-voice',
|
||||
'favorites-links','favorites-select','favorite-share','file-download','file-downloading',
|
||||
'file-downloaded','history-search','history-files','history-links','history-images','history-videos',
|
||||
'call-history','call-incoming','audio-call-ringing','audio-call-active','audio-call-muted',
|
||||
'audio-call-speaker','video-call-ringing','video-call-camera-off','video-call-active',
|
||||
'video-call-peer-camera-off','call-minimized',
|
||||
'workbench','organization-directory','meeting-organizer','meeting-attendee',
|
||||
'daily-report-editor','daily-report-mine','daily-report-team','daily-report-detail',
|
||||
'monthly-report-editor','monthly-report-list','monthly-report-detail',
|
||||
'executive-mailbox','executive-mailbox-notice',
|
||||
'personal-center','personal-profile','profile-nickname','profile-birth-date',
|
||||
'profile-signature','personal-qrcode','android-settings','cache-clear-confirm',
|
||||
'app-version','app-update-available','privacy-settings','friend-discovery-settings',
|
||||
'youth-mode-off','youth-mode-confirm','youth-mode-on','youth-mode-disable',
|
||||
'notification-permission','permission-settings-reminder','camera-permission-info',
|
||||
'microphone-permission-info',
|
||||
'fraud-risk-warning','fraud-risk-confirmation','abuse-report-reasons',
|
||||
'abuse-report-details','user-feedback',
|
||||
''].includes(hash.path[0])) {
|
||||
newState.sidePanelSelected = hash.path[0];
|
||||
} else {
|
||||
@@ -2120,6 +2158,51 @@ class TinodeWeb extends React.Component {
|
||||
|
||||
render() {
|
||||
const colorSchema = this.state.colorSchema !== 'auto' ? this.state.colorSchema : this.state.systemColorSchema;
|
||||
const activeProductView = this.state.sidePanelSelected || (this.state.myUserId ? 'messages-home' : 'tenant');
|
||||
const chapterOneViews = ['tenant', 'login', 'enterprise-register', 'enterprise-feedback', 'register',
|
||||
'reset', 'identity-check', 'realname', 'realname-verified', 'realname-reminder', 'independent-password'];
|
||||
const chapterOneActive = chapterOneViews.includes(activeProductView);
|
||||
const chapterTwoFullPage = ['messages-offline', 'messages-menu', 'message-actions', 'system-messages'].includes(activeProductView) ||
|
||||
(!this.state.myUserId && activeProductView === 'messages-home');
|
||||
const chapterThreeActive = ['chat-inbound-request', 'chat-inbound-message', 'chat-outbound-request',
|
||||
'chat-status', 'chat-friend', 'chat-media', 'chat-blocked', 'chat-deleted', 'chat-standard',
|
||||
'chat-attachments', 'chat-mixed', 'chat-contact-card'].includes(activeProductView);
|
||||
const chapterFourActive = ['compose-keyboard', 'mentions-select', 'mentions-complete', 'mentions-message',
|
||||
'emoji-panel', 'emoji-message', 'voice-ready', 'voice-hold', 'voice-recording',
|
||||
'media-uploading', 'media-gallery', 'media-retry', 'upload-file', 'file-message',
|
||||
'message-multiselect', 'favorite-success', 'forward-select', 'forward-multiple',
|
||||
'forward-individual', 'forward-bundle'].includes(activeProductView);
|
||||
const chapterFiveActive = ['address-book', 'friend-requests', 'add-friend', 'my-friend-qr',
|
||||
'friend-search-result', 'friend-verification', 'friend-profile', 'group-member-profile',
|
||||
'friend-settings', 'friend-settings-blocked', 'friend-delete-confirm', 'block-list',
|
||||
'block-confirm', 'clear-chat-confirm'].includes(activeProductView);
|
||||
const chapterSixActive = ['group-list', 'group-empty', 'group-invite', 'group-events',
|
||||
'group-join-requests', 'group-new-request', 'group-announcement', 'group-summary',
|
||||
'group-announcement-detail', 'group-settings', 'group-profile', 'group-avatar',
|
||||
'group-nickname', 'group-description', 'group-role-message', 'group-qr', 'group-governance',
|
||||
'group-admins', 'group-admin-add', 'group-admin-success', 'group-admin-partial',
|
||||
'group-admin-removed', 'group-mute-add', 'group-muted', 'group-owner-select',
|
||||
'group-owner-confirm', 'group-files', 'group-file-upload'].includes(activeProductView);
|
||||
const chapterSevenActive = ['favorites', 'favorites-mixed', 'favorites-files', 'favorites-text',
|
||||
'favorites-voice', 'favorites-links', 'favorites-select', 'favorite-share', 'file-download',
|
||||
'file-downloading', 'file-downloaded', 'history-search', 'history-files', 'history-links',
|
||||
'history-images', 'history-videos'].includes(activeProductView);
|
||||
const callExperienceActive = ['call-history', 'call-incoming', 'audio-call-ringing',
|
||||
'audio-call-active', 'audio-call-muted', 'audio-call-speaker', 'video-call-ringing',
|
||||
'video-call-camera-off', 'video-call-active', 'video-call-peer-camera-off',
|
||||
'call-minimized'].includes(activeProductView);
|
||||
const workplaceCollaborationActive = ['workbench', 'organization-directory', 'meeting-organizer',
|
||||
'meeting-attendee', 'daily-report-editor', 'daily-report-mine', 'daily-report-team',
|
||||
'daily-report-detail', 'monthly-report-editor', 'monthly-report-list',
|
||||
'monthly-report-detail', 'executive-mailbox', 'executive-mailbox-notice'].includes(activeProductView);
|
||||
const personalSettingsActive = ['personal-center', 'personal-profile', 'profile-nickname',
|
||||
'profile-birth-date', 'profile-signature', 'personal-qrcode', 'android-settings',
|
||||
'cache-clear-confirm', 'app-version', 'app-update-available', 'privacy-settings',
|
||||
'friend-discovery-settings', 'youth-mode-off', 'youth-mode-confirm', 'youth-mode-on',
|
||||
'youth-mode-disable', 'notification-permission', 'permission-settings-reminder',
|
||||
'camera-permission-info', 'microphone-permission-info'].includes(activeProductView);
|
||||
const securitySupportActive = ['fraud-risk-warning', 'fraud-risk-confirmation',
|
||||
'abuse-report-reasons', 'abuse-report-details', 'user-feedback'].includes(activeProductView);
|
||||
return (
|
||||
<div id="app-container" ref={this.selfRef}>
|
||||
{this.state.contextMenuVisible ?
|
||||
@@ -2268,7 +2351,7 @@ class TinodeWeb extends React.Component {
|
||||
showContextMenu={this.handleShowContextMenu} />
|
||||
: null}
|
||||
|
||||
{!this.state.displayMobile || (this.state.mobilePanel == 'topic-view' && !this.state.infoPanel) ?
|
||||
{!chapterOneActive && !chapterTwoFullPage && !chapterThreeActive && !chapterFourActive && !chapterFiveActive && !chapterSixActive && !chapterSevenActive && !callExperienceActive && !workplaceCollaborationActive && !personalSettingsActive && !securitySupportActive && (!this.state.displayMobile || (this.state.mobilePanel == 'topic-view' && !this.state.infoPanel)) ?
|
||||
<Suspense fallback={<div><FormattedMessage id="loading_note" defaultMessage="Loading..."
|
||||
description="Message shown when component is loading"/></div>}>
|
||||
<MessagesView
|
||||
|
||||
Reference in New Issue
Block a user