diff --git a/img/channel.png b/img/channel.png deleted file mode 100644 index 343fc3b0..00000000 Binary files a/img/channel.png and /dev/null differ diff --git a/src/config.js b/src/config.js index 32b63496..b82ccbd4 100644 --- a/src/config.js +++ b/src/config.js @@ -157,3 +157,6 @@ export const DEFAULT_TEXT_SIZE = 10; // MIME type for the legacy Drafty form-response data. export const DRAFTY_FR_MIME_TYPE_LEGACY = 'application/json'; // Remove in 2026. + +// Path to wallpaper images. +export const WALLPAPER_DEFAULTS = {type: 'patt', index: 0, path:'img/bkg/'}; diff --git a/src/i18n.min/en.json b/src/i18n.min/en.json index 702e4091..a47d0724 100644 --- a/src/i18n.min/en.json +++ b/src/i18n.min/en.json @@ -1 +1 @@ -{"action_block_contact":"Block Contact","action_cancel":"cancel","action_clear_messages":"Clear Messages","action_delete_messages":"Clear Messages for All","action_leave_chat":"Leave Conversation","action_report_chat":"Report Conversation","archived_contacts":"Archived contacts ({count})","badge_danger":"Untrustworthy","badge_owner":"owner","badge_staff":"Staff-managed","badge_verified":"Verified/official","badge_you":"you","block_contact_warning":"Are you sure you want to block this contact?","blocked_contacts_link":"Blocked contacts ({count})","button_add_members":"Add members","button_cancel":"Cancel","button_confirm":"Confirm","button_create":"Create","button_delete_account":"Delete account","button_edit":"Edit","button_logout":"Logout","button_ok":"OK","button_reset":"Reset","button_send_request":"Send request","button_sign_in":"Sign in","button_sign_up":"Sign up","button_subscribe":"Subscribe","button_update":"Update","cannot_initiate_file_upload":"Cannot initiate file upload.","channel":"channel","channel_prompt":"This is a channel","chat_invitation":"You are invited to start a new chat. What would you like to do?","chat_invitation_accept":"Accept","chat_invitation_block":"Block","chat_invitation_ignore":"Ignore","clear_messages_warning":"Are you sure you want to clear all messages? It cannot be undone.","code_doesnot_match":"Code does not match","contacts_not_found":"You have no chats
¯∖_(ツ)_/¯","contacts_not_found_short":"No contacts match ''{query}''","credential_email_prompt":"Your registration email","delete_account":"Delete account","delete_account_warning":"Are you sure you want to delete your account? It cannot be undone.","delete_messages_warning":"Are you sure you want to delete all messages for everyone? It cannot be undone.","download_action":"download","drafty_attachment":"Attachment","drafty_form":"Form:","drafty_image":"Picture","email_dative":"email","email_prompt":"Email, e.g. jdoe@example.com","enable_peers_messaging":"Enable","enter_confirmation_code_prompt":"Confirmation code","error_invalid_id":"Invalid ID","file_attachment_too_large":"The file size {size} exceeds the {limit} limit.","forgot_password_link":"Forgot password?","full_name_prompt":"Full name, e.g. John Doe","granted_permissions":"Granted","group_has_no_members":"No members","group_user_id_prompt":"Group or User ID","image_caption_prompt":"Image caption","invalid_content":"invalid content","invalid_security_token":"Invalid security token","label_client":"Client:","label_content_type":"Content type:","label_default_access_mode":"Default access mode:","label_file_name":"File name:","label_group_members":"Group members:","label_incognito_mode":"Incognito mode:","label_message_sound":"Message sound:","label_muting_topic":"Muted:","label_other_user":"Other","label_password":"Password","label_permissions":"Permissions:","label_private":"Private comment","label_push_notifications":"Notification alerts:","label_push_notifications_disabled":"Notification alerts (requires HTTPS):","label_reset_password":"Send a password reset email:","label_sdk":"SDK:","label_server":"Server:","label_server_address":"Server address:","label_server_to_use":"Server to use:","label_size":"Size:","label_topic_name":"Name","label_user_contacts":"Contacts","label_user_id":"ID:","label_wire_transport":"Wire transport:","label_you":"You:","label_your_name":"Your name","label_your_permissions":"Your permissions:","last_seen_timestamp":"Last seen","leave_chat_warning":"Are you sure you want to leave this conversation?","link_contact_us":"Contact Us","link_privacy_policy":"Privacy Policy","link_terms_of_service":"Terms of Service","login_prompt":"Login","menu_item_archive_topic":"Archive","menu_item_block":"Block","menu_item_clear_messages":"Clear messages","menu_item_clear_messages_for_all":"Clear for All","menu_item_delete":"Delete","menu_item_delete_for_all":"Delete for All","menu_item_delete_topic":"Delete","menu_item_edit_permissions":"Edit permissions","menu_item_info":"Info","menu_item_member_delete":"Remove","menu_item_mute":"Mute","menu_item_reply":"Reply","menu_item_restore_topic":"Restore","menu_item_send_retry":"Retry","menu_item_unblock":"Unblock","menu_item_unmute":"Unmute","message_sending":"sending...","message_sending_failed":"failed","messages_not_readable":"no access to messages","messaging_disabled_prompt":"Messaging disabled","more_online_members":"+{overflow} more","new_message_prompt":"New message","new_password_placeholder":"Enter new password","no_connection":"No connection","no_contacts":"You have no contacts :-(","numeric_confirmation_code_prompt":"Numbers only","online_now":"online now","password_prompt":"Password","password_unchanged_prompt":"Unchanged","peers_messaging_disabled":"Peer's messaging is disabled.","permission_admin":"Approve ({val})","permission_delete":"Delete ({val})","permission_join":"Join ({val})","permission_owner":"Owner ({val})","permission_pres":"Get notified ({val})","permission_read":"Read ({val})","permission_share":"Share ({val})","permission_write":"Write ({val})","phone_dative":"phone","private_editing_placeholder":"Visible to you only","push_init_failed":"Failed to initialize push notifications","reconnect_countdown":"Disconnected. Reconnecting in {seconds}…","reconnect_now":"Try now","reload_update":"Reload","report_chat_warning":"Are you sure you want to block and report this conversation?","requested_permissions":"Requested","save_attachment":"save","search_for_contacts":"Use search to find contacts","search_no_results":"Search returned no results","search_placeholder":"List like email:alice@example.com, tel:17025550003...","sidepanel_title_acc_notifications":"Notifications","sidepanel_title_acc_support":"Support","sidepanel_title_account_settings":"Account Settings","sidepanel_title_archive":"Archived Chats","sidepanel_title_blocked":"Blocked Chats","sidepanel_title_cred":"Confirm Credentials","sidepanel_title_login":"Sign In","sidepanel_title_newtpk":"Start New Chat","sidepanel_title_register":"Create Account","sidepanel_title_reset":"Reset Password","sidepanel_title_settings":"Settings","stay_logged_in":"Stay logged in","tabtitle_find_user":"find","tabtitle_group_by_id":"by id","tabtitle_new_group":"new group","tags_editor_no_tags":"Add some tags","tags_not_found":"No tags defined. Add some.","title_all_contacts":"All Contacts","title_group_members":"Group Members","title_manage_tags":"Manage","title_not_found":"Not found","title_permissions":"Permissions","title_tag_manager":"Tags (search & discovery)","topic_block_warning":"Are you sure you want to block this conversation?","topic_delete_warning":"Are you sure you want to delete this conversation?","topic_name_editing_placeholder":"Freeform name of the group","unnamed_topic":"Unnamed","update_available":"Update available.","upload_finishing":"finishing...","user_not_found":"Not found","description_editing_placeholder":"Optional description","label_description":"Description","button_security":"Security","panel_title_crop":"Drag to Adjust","panel_title_general":"General","panel_title_members":"Members","panel_title_security":"Security","panel_title_info":"Info","permissions_anonymous":"Anonymous","permissions_authenticated":"Authenticated","topic_delete":"Delete Conversation","permissions_user":"User's Permissions","password_reset_email_sent":"An email with security code has been sent.","label_unarchive_topic":"Archived:","menu_item_forward":"Forward","forward_to":"Forward to","forward_to_search_placeholder":"Search contacts","label_new_password":"New password","drafty_unknown":"Unsupported","calls_incoming":"Incoming call","calls_outgoing":"Outgoing call","calls_you_label":"You","menu_item_video_call":"Video call","already_in_call":"You already in an ongoing call!","call_cancelled":"cancelled","call_missed":"missed","call_declined":"declined","call_disconnected":"disconnected","label_use_secure_connection":"Use secure connection","cred_confirmed_successfully":"Confirmed successfully","menu_item_edit":"Edit","editing_message":"Editing","message_edited_marker":", edited","icon_title_add_image":"Add image","icon_title_attach_file":"Attach file","icon_title_delete":"Delete","icon_title_pause":"Pause","icon_title_play":"Play","icon_title_record_voice":"Record voice message","icon_title_resume":"Resume","icon_title_send":"Send message","drag_file":"Drag file here","drafty_video":"Video recording","call_in_progress":"in progress","menu_item_audio_call":"Call","unrecognized_video_format":"Format of this video is not recognized","loading_note":"Loading...","password_i_have_code":"I have code","label_reset_password_tel":"Send a password reset SMS:","mobile_phone_number":"Mobile phone number","password_reset_sms_sent":"A text message with security code has been sent.","mobile_number_required":"Mobile phone number required","current_email":"Current email","current_phone":"Current phone number","new_email":"New email","new_phone_number":"New phone number","change_email":"Change email","change_phone":"Change phone number","call_busy":"busy","failed_to_init_audio":"Failed to initialize audio recording","pin_message":"Pin","unpin_message":"Unpin","password_reset_success":"Password reset successfully","scan_qr_code":"Scan QR Code","self_topic_comment":"Notes, messages, links, files saved for posterity","self_topic_name":"Saved messages","message_not_found":"message not found","message_deleted":"message deleted","alias_editing_placeholder":"Alias (optional)","label_alias":"Alias:","alias_already_taken":"(already taken)","alias_invalid":"(invalid)","label_alias_edit":"Alias","select_country":"Select country","text_copied":"Copied to clipboard","color_schema_dark":"Dark","color_schema_light":"Light","color_schema_system":"System default","label_color_schema":"Theme:","label_text_size":"Text size:","incognito_mode_description":"Hide your online status and typing indicators.","send_command":"Send on {key}","send_command_explained":"Press Enter for new line","send_plain":"Send on Enter","send_plain_explained":"Press Shift + Enter for new line","sidepanel_title_acc_general":"General","label_keyboard":"Keyboard:","pin_chat":"Pin","unpin_chat":"Unpin","subscriber_count":"{count, plural, one {{count, number} subscriber} other {{count, number} subscribers}}","label_member_count":"Members:","label_subscriber_count":"Subscribers:","member_count":"{count, plural, one {{count, number} member} other {{count, number} members}}"} \ No newline at end of file +{"action_block_contact":"Block Contact","action_cancel":"cancel","action_clear_messages":"Clear Messages","action_delete_messages":"Clear Messages for All","action_leave_chat":"Leave Conversation","action_report_chat":"Report Conversation","archived_contacts":"Archived contacts ({count})","badge_danger":"Untrustworthy","badge_owner":"owner","badge_staff":"Staff-managed","badge_verified":"Verified/official","badge_you":"you","block_contact_warning":"Are you sure you want to block this contact?","blocked_contacts_link":"Blocked contacts ({count})","button_add_members":"Add members","button_cancel":"Cancel","button_confirm":"Confirm","button_create":"Create","button_delete_account":"Delete account","button_edit":"Edit","button_logout":"Logout","button_ok":"OK","button_reset":"Reset","button_send_request":"Send request","button_sign_in":"Sign in","button_sign_up":"Sign up","button_subscribe":"Subscribe","button_update":"Update","cannot_initiate_file_upload":"Cannot initiate file upload.","channel":"channel","channel_prompt":"This is a channel","chat_invitation":"You are invited to start a new chat. What would you like to do?","chat_invitation_accept":"Accept","chat_invitation_block":"Block","chat_invitation_ignore":"Ignore","clear_messages_warning":"Are you sure you want to clear all messages? It cannot be undone.","code_doesnot_match":"Code does not match","contacts_not_found":"You have no chats
¯∖_(ツ)_/¯","contacts_not_found_short":"No contacts match ''{query}''","credential_email_prompt":"Your registration email","delete_account":"Delete account","delete_account_warning":"Are you sure you want to delete your account? It cannot be undone.","delete_messages_warning":"Are you sure you want to delete all messages for everyone? It cannot be undone.","download_action":"download","drafty_attachment":"Attachment","drafty_form":"Form:","drafty_image":"Picture","email_dative":"email","email_prompt":"Email, e.g. jdoe@example.com","enable_peers_messaging":"Enable","enter_confirmation_code_prompt":"Confirmation code","error_invalid_id":"Invalid ID","file_attachment_too_large":"The file size {size} exceeds the {limit} limit.","forgot_password_link":"Forgot password?","full_name_prompt":"Full name, e.g. John Doe","granted_permissions":"Granted","group_has_no_members":"No members","group_user_id_prompt":"Group or User ID","image_caption_prompt":"Image caption","invalid_content":"invalid content","invalid_security_token":"Invalid security token","label_client":"Client:","label_content_type":"Content type:","label_default_access_mode":"Default access mode:","label_file_name":"File name:","label_group_members":"Group members:","label_incognito_mode":"Incognito mode:","label_message_sound":"Message sound:","label_muting_topic":"Muted:","label_other_user":"Other","label_password":"Password","label_permissions":"Permissions:","label_private":"Private comment","label_push_notifications":"Notification alerts:","label_push_notifications_disabled":"Notification alerts (requires HTTPS):","label_reset_password":"Send a password reset email:","label_sdk":"SDK:","label_server":"Server:","label_server_address":"Server address:","label_server_to_use":"Server to use:","label_size":"Size:","label_topic_name":"Name","label_user_contacts":"Contacts","label_user_id":"ID:","label_wire_transport":"Wire transport:","label_you":"You:","label_your_name":"Your name","label_your_permissions":"Your permissions:","last_seen_timestamp":"Last seen","leave_chat_warning":"Are you sure you want to leave this conversation?","link_contact_us":"Contact Us","link_privacy_policy":"Privacy Policy","link_terms_of_service":"Terms of Service","login_prompt":"Login","menu_item_archive_topic":"Archive","menu_item_block":"Block","menu_item_clear_messages":"Clear messages","menu_item_clear_messages_for_all":"Clear for All","menu_item_delete":"Delete","menu_item_delete_for_all":"Delete for All","menu_item_delete_topic":"Delete","menu_item_edit_permissions":"Edit permissions","menu_item_info":"Info","menu_item_member_delete":"Remove","menu_item_mute":"Mute","menu_item_reply":"Reply","menu_item_restore_topic":"Restore","menu_item_send_retry":"Retry","menu_item_unblock":"Unblock","menu_item_unmute":"Unmute","message_sending":"sending...","message_sending_failed":"failed","messages_not_readable":"no access to messages","messaging_disabled_prompt":"Messaging disabled","more_online_members":"+{overflow} more","new_message_prompt":"New message","new_password_placeholder":"Enter new password","no_connection":"No connection","no_contacts":"You have no contacts :-(","numeric_confirmation_code_prompt":"Numbers only","online_now":"online now","password_prompt":"Password","password_unchanged_prompt":"Unchanged","peers_messaging_disabled":"Peer's messaging is disabled.","permission_admin":"Approve ({val})","permission_delete":"Delete ({val})","permission_join":"Join ({val})","permission_owner":"Owner ({val})","permission_pres":"Get notified ({val})","permission_read":"Read ({val})","permission_share":"Share ({val})","permission_write":"Write ({val})","phone_dative":"phone","private_editing_placeholder":"Visible to you only","push_init_failed":"Failed to initialize push notifications","reconnect_countdown":"Disconnected. Reconnecting in {seconds}…","reconnect_now":"Try now","reload_update":"Reload","report_chat_warning":"Are you sure you want to block and report this conversation?","requested_permissions":"Requested","save_attachment":"save","search_for_contacts":"Use search to find contacts","search_no_results":"Search returned no results","search_placeholder":"List like email:alice@example.com, tel:17025550003...","sidepanel_title_acc_notifications":"Notifications","sidepanel_title_acc_support":"Support","sidepanel_title_account_settings":"Account Settings","sidepanel_title_archive":"Archived Chats","sidepanel_title_blocked":"Blocked Chats","sidepanel_title_cred":"Confirm Credentials","sidepanel_title_login":"Sign In","sidepanel_title_newtpk":"Start New Chat","sidepanel_title_register":"Create Account","sidepanel_title_reset":"Reset Password","sidepanel_title_settings":"Settings","stay_logged_in":"Stay logged in","tabtitle_find_user":"find","tabtitle_group_by_id":"by id","tabtitle_new_group":"new group","tags_editor_no_tags":"Add some tags","tags_not_found":"No tags defined. Add some.","title_all_contacts":"All Contacts","title_group_members":"Group Members","title_manage_tags":"Manage","title_not_found":"Not found","title_permissions":"Permissions","title_tag_manager":"Tags (search & discovery)","topic_block_warning":"Are you sure you want to block this conversation?","topic_delete_warning":"Are you sure you want to delete this conversation?","topic_name_editing_placeholder":"Freeform name of the group","unnamed_topic":"Unnamed","update_available":"Update available.","upload_finishing":"finishing...","user_not_found":"Not found","description_editing_placeholder":"Optional description","label_description":"Description","button_security":"Security","panel_title_crop":"Drag to Adjust","panel_title_general":"General","panel_title_members":"Members","panel_title_security":"Security","panel_title_info":"Info","permissions_anonymous":"Anonymous","permissions_authenticated":"Authenticated","topic_delete":"Delete Conversation","permissions_user":"User's Permissions","password_reset_email_sent":"An email with security code has been sent.","label_unarchive_topic":"Archived:","menu_item_forward":"Forward","forward_to":"Forward to","forward_to_search_placeholder":"Search contacts","label_new_password":"New password","drafty_unknown":"Unsupported","calls_incoming":"Incoming call","calls_outgoing":"Outgoing call","calls_you_label":"You","menu_item_video_call":"Video call","already_in_call":"You already in an ongoing call!","call_cancelled":"cancelled","call_missed":"missed","call_declined":"declined","call_disconnected":"disconnected","label_use_secure_connection":"Use secure connection","cred_confirmed_successfully":"Confirmed successfully","menu_item_edit":"Edit","editing_message":"Editing","message_edited_marker":", edited","icon_title_add_image":"Add image","icon_title_attach_file":"Attach file","icon_title_delete":"Delete","icon_title_pause":"Pause","icon_title_play":"Play","icon_title_record_voice":"Record voice message","icon_title_resume":"Resume","icon_title_send":"Send message","drag_file":"Drag file here","drafty_video":"Video recording","call_in_progress":"in progress","menu_item_audio_call":"Call","unrecognized_video_format":"Format of this video is not recognized","loading_note":"Loading...","password_i_have_code":"I have code","label_reset_password_tel":"Send a password reset SMS:","mobile_phone_number":"Mobile phone number","password_reset_sms_sent":"A text message with security code has been sent.","mobile_number_required":"Mobile phone number required","current_email":"Current email","current_phone":"Current phone number","new_email":"New email","new_phone_number":"New phone number","change_email":"Change email","change_phone":"Change phone number","call_busy":"busy","failed_to_init_audio":"Failed to initialize audio recording","pin_message":"Pin","unpin_message":"Unpin","password_reset_success":"Password reset successfully","scan_qr_code":"Scan QR Code","self_topic_comment":"Notes, messages, links, files saved for posterity","self_topic_name":"Saved messages","message_not_found":"message not found","message_deleted":"message deleted","alias_editing_placeholder":"Alias (optional)","label_alias":"Alias:","alias_already_taken":"(already taken)","alias_invalid":"(invalid)","label_alias_edit":"Alias","select_country":"Select country","text_copied":"Copied to clipboard","color_schema_dark":"Dark","color_schema_light":"Light","color_schema_system":"System default","label_color_schema":"Theme:","label_text_size":"Text size:","incognito_mode_description":"Hide your online status and typing indicators.","send_command":"Send on {key}","send_command_explained":"Press Enter for new line","send_plain":"Send on Enter","send_plain_explained":"Press Shift + Enter for new line","sidepanel_title_acc_general":"General","label_keyboard":"Keyboard:","pin_chat":"Pin","unpin_chat":"Unpin","subscriber_count":"{count, plural, one {{count, number} subscriber} other {{count, number} subscribers}}","label_member_count":"Members:","label_subscriber_count":"Subscribers:","member_count":"{count, plural, one {{count, number} member} other {{count, number} members}}","tabtitle_image":"image","tabtitle_pattern":"pattern","button_restore":"Restore default","wallpapers":"Wallpapers","label_blur_wallpaper":"Blur:"} \ No newline at end of file diff --git a/src/i18n/ar.json b/src/i18n/ar.json index f4002358..6b211ec2 100644 --- a/src/i18n/ar.json +++ b/src/i18n/ar.json @@ -1864,5 +1864,54 @@ "description": "Count of group topic members", "missing": false, "obsolete": false + }, + "label_wallpapers": { + "translation": "", + "defaultMessage": "Wallpapers:", + "description": "Label for selecting wallpapers in Settings", + "missing": true, + "obsolete": true + }, + "tabtitle_image": { + "translation": "", + "defaultMessage": "image", + "description": "Tab title Image", + "missing": true, + "obsolete": false + }, + "tabtitle_pattern": { + "translation": "", + "defaultMessage": "pattern", + "description": "Tab title Pattern", + "missing": true, + "obsolete": false + }, + "sidepanel_title_wallpapers": { + "translation": "", + "defaultMessage": "Wallpapers", + "description": "Sidepanel title for WallpapersView.", + "missing": true, + "obsolete": true + }, + "button_restore": { + "translation": "", + "defaultMessage": "Restore default", + "description": "Reset setting to default", + "missing": true, + "obsolete": false + }, + "wallpapers": { + "translation": "", + "defaultMessage": "Wallpapers", + "description": "Link or title for working with wallpapers.", + "missing": true, + "obsolete": false + }, + "label_blur_wallpaper": { + "translation": "", + "defaultMessage": "Blur:", + "description": "Label adjusting blur amount", + "missing": true, + "obsolete": false } } diff --git a/src/i18n/de.json b/src/i18n/de.json index 1a2dc58e..e7aad22b 100644 --- a/src/i18n/de.json +++ b/src/i18n/de.json @@ -1864,5 +1864,54 @@ "description": "Count of group topic members", "missing": false, "obsolete": false + }, + "label_wallpapers": { + "translation": "", + "defaultMessage": "Wallpapers:", + "description": "Label for selecting wallpapers in Settings", + "missing": true, + "obsolete": true + }, + "tabtitle_image": { + "translation": "", + "defaultMessage": "image", + "description": "Tab title Image", + "missing": true, + "obsolete": false + }, + "tabtitle_pattern": { + "translation": "", + "defaultMessage": "pattern", + "description": "Tab title Pattern", + "missing": true, + "obsolete": false + }, + "sidepanel_title_wallpapers": { + "translation": "", + "defaultMessage": "Wallpapers", + "description": "Sidepanel title for WallpapersView.", + "missing": true, + "obsolete": true + }, + "button_restore": { + "translation": "", + "defaultMessage": "Restore default", + "description": "Reset setting to default", + "missing": true, + "obsolete": false + }, + "wallpapers": { + "translation": "", + "defaultMessage": "Wallpapers", + "description": "Link or title for working with wallpapers.", + "missing": true, + "obsolete": false + }, + "label_blur_wallpaper": { + "translation": "", + "defaultMessage": "Blur:", + "description": "Label adjusting blur amount", + "missing": true, + "obsolete": false } } diff --git a/src/i18n/en.json b/src/i18n/en.json index aff7f5bd..0c005348 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -1864,5 +1864,47 @@ "description": "Count of group topic members", "missing": false, "obsolete": false + }, + "label_wallpapers": { + "translation": "Wallpapers", + "defaultMessage": "Wallpapers", + "description": "Label for selecting wallpapers in Settings", + "missing": false, + "obsolete": true + }, + "tabtitle_image": { + "translation": "image", + "defaultMessage": "image", + "description": "Tab title Image", + "missing": false, + "obsolete": false + }, + "tabtitle_pattern": { + "translation": "pattern", + "defaultMessage": "pattern", + "description": "Tab title Pattern", + "missing": false, + "obsolete": false + }, + "button_restore": { + "translation": "Restore default", + "defaultMessage": "Restore default", + "description": "Reset setting to default", + "missing": false, + "obsolete": false + }, + "wallpapers": { + "translation": "Wallpapers", + "defaultMessage": "Wallpapers", + "description": "Link or title for working with wallpapers.", + "missing": false, + "obsolete": false + }, + "label_blur_wallpaper": { + "translation": "Blur:", + "defaultMessage": "Blur:", + "description": "Label adjusting blur amount", + "missing": false, + "obsolete": false } } diff --git a/src/i18n/es.json b/src/i18n/es.json index 60e89b8a..b3108f8b 100644 --- a/src/i18n/es.json +++ b/src/i18n/es.json @@ -1864,5 +1864,54 @@ "description": "Count of group topic members", "missing": false, "obsolete": false + }, + "label_wallpapers": { + "translation": "", + "defaultMessage": "Wallpapers:", + "description": "Label for selecting wallpapers in Settings", + "missing": true, + "obsolete": true + }, + "tabtitle_image": { + "translation": "", + "defaultMessage": "image", + "description": "Tab title Image", + "missing": true, + "obsolete": false + }, + "tabtitle_pattern": { + "translation": "", + "defaultMessage": "pattern", + "description": "Tab title Pattern", + "missing": true, + "obsolete": false + }, + "sidepanel_title_wallpapers": { + "translation": "", + "defaultMessage": "Wallpapers", + "description": "Sidepanel title for WallpapersView.", + "missing": true, + "obsolete": true + }, + "button_restore": { + "translation": "", + "defaultMessage": "Restore default", + "description": "Reset setting to default", + "missing": true, + "obsolete": false + }, + "wallpapers": { + "translation": "", + "defaultMessage": "Wallpapers", + "description": "Link or title for working with wallpapers.", + "missing": true, + "obsolete": false + }, + "label_blur_wallpaper": { + "translation": "", + "defaultMessage": "Blur:", + "description": "Label adjusting blur amount", + "missing": true, + "obsolete": false } } diff --git a/src/i18n/ex/base-en.json b/src/i18n/ex/base-en.json index e7c861ac..bdce60fb 100644 --- a/src/i18n/ex/base-en.json +++ b/src/i18n/ex/base-en.json @@ -107,6 +107,10 @@ "defaultMessage": "Reset", "description": "Button [Reset]" }, + "button_restore": { + "defaultMessage": "Restore default", + "description": "Reset setting to default" + }, "button_security": { "defaultMessage": "Security", "description": "Navigaton button for security panel." @@ -406,6 +410,10 @@ "defaultMessage": "Alias", "description": "Label for editing user or topic alias" }, + "label_blur_wallpaper": { + "defaultMessage": "Blur:", + "description": "Label adjusting blur amount" + }, "label_client": { "defaultMessage": "Client:", "description": "Label for a client version" @@ -980,10 +988,18 @@ "defaultMessage": "by id", "description": "Tab title Find topic by ID" }, + "tabtitle_image": { + "defaultMessage": "image", + "description": "Tab title Image" + }, "tabtitle_new_group": { "defaultMessage": "new group", "description": "Tab title New Group" }, + "tabtitle_pattern": { + "defaultMessage": "pattern", + "description": "Tab title Pattern" + }, "tags_editor_no_tags": { "defaultMessage": "Add some tags", "description": "Tag editor prompt when no tags are found." @@ -1063,5 +1079,9 @@ "user_not_found": { "defaultMessage": "Not found", "description": "In place of a user's full name when the user is not found." + }, + "wallpapers": { + "defaultMessage": "Wallpapers", + "description": "Link or title for working with wallpapers." } } diff --git a/src/i18n/fr.json b/src/i18n/fr.json index 1b651ef4..e60f7d16 100644 --- a/src/i18n/fr.json +++ b/src/i18n/fr.json @@ -1864,5 +1864,54 @@ "description": "Count of group topic members", "missing": false, "obsolete": false + }, + "label_wallpapers": { + "translation": "", + "defaultMessage": "Wallpapers:", + "description": "Label for selecting wallpapers in Settings", + "missing": true, + "obsolete": true + }, + "tabtitle_image": { + "translation": "", + "defaultMessage": "image", + "description": "Tab title Image", + "missing": true, + "obsolete": false + }, + "tabtitle_pattern": { + "translation": "", + "defaultMessage": "pattern", + "description": "Tab title Pattern", + "missing": true, + "obsolete": false + }, + "sidepanel_title_wallpapers": { + "translation": "", + "defaultMessage": "Wallpapers", + "description": "Sidepanel title for WallpapersView.", + "missing": true, + "obsolete": true + }, + "button_restore": { + "translation": "", + "defaultMessage": "Restore default", + "description": "Reset setting to default", + "missing": true, + "obsolete": false + }, + "wallpapers": { + "translation": "", + "defaultMessage": "Wallpapers", + "description": "Link or title for working with wallpapers.", + "missing": true, + "obsolete": false + }, + "label_blur_wallpaper": { + "translation": "", + "defaultMessage": "Blur:", + "description": "Label adjusting blur amount", + "missing": true, + "obsolete": false } } diff --git a/src/i18n/it.json b/src/i18n/it.json index e41e0239..953f69e0 100644 --- a/src/i18n/it.json +++ b/src/i18n/it.json @@ -1864,5 +1864,54 @@ "description": "Count of group topic members", "missing": false, "obsolete": false + }, + "label_wallpapers": { + "translation": "", + "defaultMessage": "Wallpapers:", + "description": "Label for selecting wallpapers in Settings", + "missing": true, + "obsolete": true + }, + "tabtitle_image": { + "translation": "", + "defaultMessage": "image", + "description": "Tab title Image", + "missing": true, + "obsolete": false + }, + "tabtitle_pattern": { + "translation": "", + "defaultMessage": "pattern", + "description": "Tab title Pattern", + "missing": true, + "obsolete": false + }, + "sidepanel_title_wallpapers": { + "translation": "", + "defaultMessage": "Wallpapers", + "description": "Sidepanel title for WallpapersView.", + "missing": true, + "obsolete": true + }, + "button_restore": { + "translation": "", + "defaultMessage": "Restore default", + "description": "Reset setting to default", + "missing": true, + "obsolete": false + }, + "wallpapers": { + "translation": "", + "defaultMessage": "Wallpapers", + "description": "Link or title for working with wallpapers.", + "missing": true, + "obsolete": false + }, + "label_blur_wallpaper": { + "translation": "", + "defaultMessage": "Blur:", + "description": "Label adjusting blur amount", + "missing": true, + "obsolete": false } } diff --git a/src/i18n/ko.json b/src/i18n/ko.json index aec8ef40..32699295 100644 --- a/src/i18n/ko.json +++ b/src/i18n/ko.json @@ -1864,5 +1864,54 @@ "description": "Count of group topic members", "missing": false, "obsolete": false + }, + "label_wallpapers": { + "translation": "", + "defaultMessage": "Wallpapers:", + "description": "Label for selecting wallpapers in Settings", + "missing": true, + "obsolete": true + }, + "tabtitle_image": { + "translation": "", + "defaultMessage": "image", + "description": "Tab title Image", + "missing": true, + "obsolete": false + }, + "tabtitle_pattern": { + "translation": "", + "defaultMessage": "pattern", + "description": "Tab title Pattern", + "missing": true, + "obsolete": false + }, + "sidepanel_title_wallpapers": { + "translation": "", + "defaultMessage": "Wallpapers", + "description": "Sidepanel title for WallpapersView.", + "missing": true, + "obsolete": true + }, + "button_restore": { + "translation": "", + "defaultMessage": "Restore default", + "description": "Reset setting to default", + "missing": true, + "obsolete": false + }, + "wallpapers": { + "translation": "", + "defaultMessage": "Wallpapers", + "description": "Link or title for working with wallpapers.", + "missing": true, + "obsolete": false + }, + "label_blur_wallpaper": { + "translation": "", + "defaultMessage": "Blur:", + "description": "Label adjusting blur amount", + "missing": true, + "obsolete": false } } diff --git a/src/i18n/ro.json b/src/i18n/ro.json index 17a15f2f..7e7e0b8d 100644 --- a/src/i18n/ro.json +++ b/src/i18n/ro.json @@ -1864,5 +1864,54 @@ "description": "Count of group topic members", "missing": false, "obsolete": false + }, + "label_wallpapers": { + "translation": "", + "defaultMessage": "Wallpapers:", + "description": "Label for selecting wallpapers in Settings", + "missing": true, + "obsolete": true + }, + "tabtitle_image": { + "translation": "", + "defaultMessage": "image", + "description": "Tab title Image", + "missing": true, + "obsolete": false + }, + "tabtitle_pattern": { + "translation": "", + "defaultMessage": "pattern", + "description": "Tab title Pattern", + "missing": true, + "obsolete": false + }, + "sidepanel_title_wallpapers": { + "translation": "", + "defaultMessage": "Wallpapers", + "description": "Sidepanel title for WallpapersView.", + "missing": true, + "obsolete": true + }, + "button_restore": { + "translation": "", + "defaultMessage": "Restore default", + "description": "Reset setting to default", + "missing": true, + "obsolete": false + }, + "wallpapers": { + "translation": "", + "defaultMessage": "Wallpapers", + "description": "Link or title for working with wallpapers.", + "missing": true, + "obsolete": false + }, + "label_blur_wallpaper": { + "translation": "", + "defaultMessage": "Blur:", + "description": "Label adjusting blur amount", + "missing": true, + "obsolete": false } } diff --git a/src/i18n/ru.json b/src/i18n/ru.json index 8c0a3b6e..9ac1764b 100644 --- a/src/i18n/ru.json +++ b/src/i18n/ru.json @@ -1864,5 +1864,54 @@ "description": "Count of group topic members", "missing": false, "obsolete": false + }, + "label_wallpapers": { + "translation": "", + "defaultMessage": "Wallpapers:", + "description": "Label for selecting wallpapers in Settings", + "missing": true, + "obsolete": true + }, + "tabtitle_image": { + "translation": "", + "defaultMessage": "image", + "description": "Tab title Image", + "missing": true, + "obsolete": false + }, + "tabtitle_pattern": { + "translation": "", + "defaultMessage": "pattern", + "description": "Tab title Pattern", + "missing": true, + "obsolete": false + }, + "sidepanel_title_wallpapers": { + "translation": "", + "defaultMessage": "Wallpapers", + "description": "Sidepanel title for WallpapersView.", + "missing": true, + "obsolete": true + }, + "button_restore": { + "translation": "", + "defaultMessage": "Restore default", + "description": "Reset setting to default", + "missing": true, + "obsolete": false + }, + "wallpapers": { + "translation": "", + "defaultMessage": "Wallpapers", + "description": "Link or title for working with wallpapers.", + "missing": true, + "obsolete": false + }, + "label_blur_wallpaper": { + "translation": "", + "defaultMessage": "Blur:", + "description": "Label adjusting blur amount", + "missing": true, + "obsolete": false } } diff --git a/src/i18n/th.json b/src/i18n/th.json index f3166316..f21604b2 100644 --- a/src/i18n/th.json +++ b/src/i18n/th.json @@ -1864,5 +1864,54 @@ "description": "Count of group topic members", "missing": false, "obsolete": false + }, + "label_wallpapers": { + "translation": "", + "defaultMessage": "Wallpapers:", + "description": "Label for selecting wallpapers in Settings", + "missing": true, + "obsolete": true + }, + "tabtitle_image": { + "translation": "", + "defaultMessage": "image", + "description": "Tab title Image", + "missing": true, + "obsolete": false + }, + "tabtitle_pattern": { + "translation": "", + "defaultMessage": "pattern", + "description": "Tab title Pattern", + "missing": true, + "obsolete": false + }, + "sidepanel_title_wallpapers": { + "translation": "", + "defaultMessage": "Wallpapers", + "description": "Sidepanel title for WallpapersView.", + "missing": true, + "obsolete": true + }, + "button_restore": { + "translation": "", + "defaultMessage": "Restore default", + "description": "Reset setting to default", + "missing": true, + "obsolete": false + }, + "wallpapers": { + "translation": "", + "defaultMessage": "Wallpapers", + "description": "Link or title for working with wallpapers.", + "missing": true, + "obsolete": false + }, + "label_blur_wallpaper": { + "translation": "", + "defaultMessage": "Blur:", + "description": "Label adjusting blur amount", + "missing": true, + "obsolete": false } } diff --git a/src/i18n/uk.json b/src/i18n/uk.json index fe8a924c..c9c405c9 100644 --- a/src/i18n/uk.json +++ b/src/i18n/uk.json @@ -1864,5 +1864,54 @@ "description": "Count of group topic members", "missing": false, "obsolete": false + }, + "label_wallpapers": { + "translation": "", + "defaultMessage": "Wallpapers:", + "description": "Label for selecting wallpapers in Settings", + "missing": true, + "obsolete": true + }, + "tabtitle_image": { + "translation": "", + "defaultMessage": "image", + "description": "Tab title Image", + "missing": true, + "obsolete": false + }, + "tabtitle_pattern": { + "translation": "", + "defaultMessage": "pattern", + "description": "Tab title Pattern", + "missing": true, + "obsolete": false + }, + "sidepanel_title_wallpapers": { + "translation": "", + "defaultMessage": "Wallpapers", + "description": "Sidepanel title for WallpapersView.", + "missing": true, + "obsolete": true + }, + "button_restore": { + "translation": "", + "defaultMessage": "Restore default", + "description": "Reset setting to default", + "missing": true, + "obsolete": false + }, + "wallpapers": { + "translation": "", + "defaultMessage": "Wallpapers", + "description": "Link or title for working with wallpapers.", + "missing": true, + "obsolete": false + }, + "label_blur_wallpaper": { + "translation": "", + "defaultMessage": "Blur:", + "description": "Label adjusting blur amount", + "missing": true, + "obsolete": false } } diff --git a/src/i18n/zh-TW.json b/src/i18n/zh-TW.json index ef15282b..144a2458 100644 --- a/src/i18n/zh-TW.json +++ b/src/i18n/zh-TW.json @@ -1864,5 +1864,54 @@ "description": "Count of group topic members", "missing": false, "obsolete": false + }, + "label_wallpapers": { + "translation": "", + "defaultMessage": "Wallpapers:", + "description": "Label for selecting wallpapers in Settings", + "missing": true, + "obsolete": true + }, + "tabtitle_image": { + "translation": "", + "defaultMessage": "image", + "description": "Tab title Image", + "missing": true, + "obsolete": false + }, + "tabtitle_pattern": { + "translation": "", + "defaultMessage": "pattern", + "description": "Tab title Pattern", + "missing": true, + "obsolete": false + }, + "sidepanel_title_wallpapers": { + "translation": "", + "defaultMessage": "Wallpapers", + "description": "Sidepanel title for WallpapersView.", + "missing": true, + "obsolete": true + }, + "button_restore": { + "translation": "", + "defaultMessage": "Restore default", + "description": "Reset setting to default", + "missing": true, + "obsolete": false + }, + "wallpapers": { + "translation": "", + "defaultMessage": "Wallpapers", + "description": "Link or title for working with wallpapers.", + "missing": true, + "obsolete": false + }, + "label_blur_wallpaper": { + "translation": "", + "defaultMessage": "Blur:", + "description": "Label adjusting blur amount", + "missing": true, + "obsolete": false } } diff --git a/src/i18n/zh.json b/src/i18n/zh.json index baf4f3bc..41ba2948 100644 --- a/src/i18n/zh.json +++ b/src/i18n/zh.json @@ -1864,5 +1864,54 @@ "description": "Count of group topic members", "missing": false, "obsolete": false + }, + "label_wallpapers": { + "translation": "", + "defaultMessage": "Wallpapers:", + "description": "Label for selecting wallpapers in Settings", + "missing": true, + "obsolete": true + }, + "tabtitle_image": { + "translation": "", + "defaultMessage": "image", + "description": "Tab title Image", + "missing": true, + "obsolete": false + }, + "tabtitle_pattern": { + "translation": "", + "defaultMessage": "pattern", + "description": "Tab title Pattern", + "missing": true, + "obsolete": false + }, + "sidepanel_title_wallpapers": { + "translation": "", + "defaultMessage": "Wallpapers", + "description": "Sidepanel title for WallpapersView.", + "missing": true, + "obsolete": true + }, + "button_restore": { + "translation": "", + "defaultMessage": "Restore default", + "description": "Reset setting to default", + "missing": true, + "obsolete": false + }, + "wallpapers": { + "translation": "", + "defaultMessage": "Wallpapers", + "description": "Link or title for working with wallpapers.", + "missing": true, + "obsolete": false + }, + "label_blur_wallpaper": { + "translation": "", + "defaultMessage": "Blur:", + "description": "Label adjusting blur amount", + "missing": true, + "obsolete": false } } diff --git a/src/index.js b/src/index.js index 2515a204..068fdf24 100644 --- a/src/index.js +++ b/src/index.js @@ -29,6 +29,7 @@ const messageLoader = { 'en': _ => import('./i18n.min/en.json'), 'es': _ => import('./i18n.min/es.json'), 'fr': _ => import('./i18n.min/fr.json'), + 'it': _ => import('./i18n.min/it.json'), 'ko': _ => import('./i18n.min/ko.json'), 'ro': _ => import('./i18n.min/ro.json'), 'ru': _ => import('./i18n.min/ru.json'), diff --git a/src/lib/utils.js b/src/lib/utils.js index 15abe422..681743d6 100644 --- a/src/lib/utils.js +++ b/src/lib/utils.js @@ -1,6 +1,7 @@ // Odds and ends import { Tinode } from 'tinode-sdk'; +import { WALLPAPER_DEFAULTS } from '../config.js'; // Make shortcut icon appear with a green dot + show unread count in title. export function updateFavicon(count) { @@ -248,3 +249,8 @@ export function cancelablePromise(promise) { }; }; +export function defaultWallpaper() { + const wallpaperIndex = require('../../img/bkg/index.json'); + const wp = wallpaperIndex[WALLPAPER_DEFAULTS.type][WALLPAPER_DEFAULTS.index]; + return {name: `../${WALLPAPER_DEFAULTS.path}${wp.name}`, size: wp.size}; +} diff --git a/src/views/acc-general-view.jsx b/src/views/acc-general-view.jsx index 4641cc93..0dade8c1 100644 --- a/src/views/acc-general-view.jsx +++ b/src/views/acc-general-view.jsx @@ -39,51 +39,61 @@ export default class AccGeneralView extends React.PureComponent { render() { return (
-
- -
-
- +
+
+ +
+
+
    +
  • +   + +
  • +
  • +   + +
  • +
  • +   + +
  • +
+
-
- +
+ + wallpaper  + +
+
+
+ +
diff --git a/src/views/info-view.jsx b/src/views/info-view.jsx index 7bec5ee8..13b91428 100644 --- a/src/views/info-view.jsx +++ b/src/views/info-view.jsx @@ -601,8 +601,8 @@ class InfoView extends React.Component {
-
{this.state.fullName} - {this.state.channel ? channel : null}
+
{this.state.fullName}  + {this.state.channel ? podcasts : null}
{this.state.private ?
diff --git a/src/views/new-topic-view.jsx b/src/views/new-topic-view.jsx index f4fcb98d..6b9678d1 100644 --- a/src/views/new-topic-view.jsx +++ b/src/views/new-topic-view.jsx @@ -107,19 +107,19 @@ class NewTopicView extends React.Component { return (
}> + + : + (view === 'contacts' || view == 'archive' || view == 'blocked') ? { this.handleOnline(false); } window.addEventListener('offline', this.handleOnlineOff); window.addEventListener('hashchange', this.handleHashRoute); + window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', this.handleColorSchemeChange); + + // Window/tab visible or invisible for pausing timers. + document.addEventListener('visibilitychange', this.handleVisibilityEvent); document.documentElement.style.colorScheme = this.state.colorSchema; document.documentElement.style.setProperty('--message-text-size', `${this.state.textSize}pt`); + const settings = LocalStorageUtil.getObject('settings') || {}; + if (!settings.wallpaper) { + const wallpaper = defaultWallpaper(); + settings.wallpaper = wallpaper.name || ''; + settings.wallpaperSize = wallpaper.size || 0; + settings.wallpaperBlur = 0; + } + this.applyWallpaperSettings(settings.wallpaper, settings.wallpaperSize, settings.wallpaperBlur); + // Process background notifications from the service worker. if (typeof BroadcastChannel == 'function') { const serviceWorkerChannel = new BroadcastChannel('tinode-sw'); @@ -323,9 +339,6 @@ class TinodeWeb extends React.Component { this.lastWakeUpCheck = now; }, WAKE_UP_TICK); - // Window/tab visible or invisible for pausing timers. - document.addEventListener('visibilitychange', this.handleVisibilityEvent); - this.setState({ viewportWidth: document.documentElement.clientWidth, viewportHeight: document.documentElement.clientHeight @@ -385,6 +398,7 @@ class TinodeWeb extends React.Component { window.removeEventListener('hashchange', this.handleHashRoute); window.removeEventListener('online', this.handleOnlineOn); window.removeEventListener('offline', this.handleOnlineOff); + window.matchMedia('(prefers-color-scheme: dark)').removeEventListener('change', this.handleColorSchemeChange); document.removeEventListener('visibilitychange', this.handleVisibilityEvent); clearInterval(this.wakeUpTicker); @@ -526,8 +540,9 @@ class TinodeWeb extends React.Component { if (hash.path && hash.path.length > 0) { // Left-side panel selector. - if (['register','settings','edit','notif','acc_general','security','support','general','crop', - 'cred','reset','newtpk','archive','blocked','contacts',''].includes(hash.path[0])) { + if (['acc_general','archive','blocked','contacts','cred','crop','edit','general', + 'newtpk','notif','register','reset','security','settings','support','wallpapers', + ''].includes(hash.path[0])) { newState.sidePanelSelected = hash.path[0]; } else { console.warn("Unknown sidepanel view", hash.path[0]); @@ -1235,12 +1250,40 @@ class TinodeWeb extends React.Component { }); } + // Manual change of color scheme. handleChangeColorSchema(scheme) { this.setState({colorSchema: scheme}); LocalStorageUtil.updateObject('settings', {colorSchema: scheme}); document.documentElement.style.colorScheme = scheme; } + // System color scheme has changed. + handleColorSchemeChange(event) { + console.log("Color scheme change:", event.matches ? 'dark' : 'not dark'); + // this.setState({colorSchema: event.matches ? 'dark' : 'light'}); + // document.documentElement.style.setProperty('--wallpaper-invert', '0'); + } + + handleSelectWallpapers() { + this.handleError(); + HashNavigation.navigateTo(HashNavigation.setUrlSidePanel(window.location.hash, 'wallpapers')); + } + + applyWallpaperSettings(wallpaper, size, blur) { + console.log("Applying wallpaper settings:", wallpaper, size, blur); + document.documentElement.style.setProperty('--wallpaper-url', `url('${wallpaper}')`); + document.documentElement.style.setProperty('--wallpaper-repeat', size ? 'repeat' : 'no-repeat'); + document.documentElement.style.setProperty('--wallpaper-blur', size ? '0px' : `${blur}px`); + document.documentElement.style.setProperty('--wallpaper-size', size ? `${size}px` : 'cover'); + document.documentElement.style.setProperty('--wallpaper-position', size ? 'unset' : 'center'); + } + + handleWallpaperSelected(wallpaper, size, blur) { + this.handleError(); + LocalStorageUtil.updateObject('settings', {wallpaper: wallpaper, wallpaperSize: size, wallpaperBlur: blur}); + this.applyWallpaperSettings(wallpaper, size, blur); + } + handleChangeTextSize(size) { this.setState({textSize: size | 0}); LocalStorageUtil.updateObject('settings', {textSize: size}); @@ -1370,6 +1413,8 @@ class TinodeWeb extends React.Component { path = 'general'; } else if ('blocked' == parsed.path[0]) { path = 'security'; + } else if ('wallpapers' == parsed.path[0]) { + path = 'acc_general'; } else if (this.state.myUserId) { path = 'contacts'; } @@ -2134,6 +2179,8 @@ class TinodeWeb extends React.Component { onChangeColorSchema={this.handleChangeColorSchema} onTextSizeChanged={this.handleChangeTextSize} onSendOnEnterChanged={this.handleSendOnEnter} + onSelectWallpapers={this.handleSelectWallpapers} + onWallpaperSelected={this.handleWallpaperSelected} onCredAdd={this.handleCredAdd} onCredDelete={this.handleCredDelete} onCredConfirm={this.handleCredConfirm} @@ -2177,6 +2224,8 @@ class TinodeWeb extends React.Component { applicationVisible={this.state.applicationVisible} colorSchema={this.state.colorSchema} sendOnEnter={this.state.sendOnEnter} + wallpaper={this.state.wallpaper} + forwardMessage={this.state.forwardMessage} onCancelForwardMessage={this.handleHideForwardDialog} diff --git a/src/views/wallpapers.jsx b/src/views/wallpapers.jsx new file mode 100644 index 00000000..880812fc --- /dev/null +++ b/src/views/wallpapers.jsx @@ -0,0 +1,120 @@ +// Edit account parameters. +import React from 'react'; +import { FormattedMessage } from 'react-intl'; +import HashNavigation from '../lib/navigation.js'; +import { WALLPAPER_DEFAULTS } from '../config.js'; +import imageIndex from '../../img/bkg/index.json'; + +export default class WallpapersView extends React.PureComponent { + constructor(props) { + super(props); + + this.state = { + tab: WALLPAPER_DEFAULTS.type, // 'patt' | 'img' + wallpaper: imageIndex[WALLPAPER_DEFAULTS.type][WALLPAPER_DEFAULTS.index].name, + blur: 0, + }; + + this.blurValues = [0, 1, 2, 4, 8, 16]; + + this.handleTabClick = this.handleTabClick.bind(this); + this.handleWallpaperSelected = this.handleWallpaperSelected.bind(this); + this.handleBlurChanged = this.handleBlurChanged.bind(this); + } + + handleTabClick(e) { + e.preventDefault(); + HashNavigation.navigateTo(HashNavigation.addUrlParam(window.location.hash, 'tab', e.currentTarget.dataset.id)); + this.setState({tab: e.currentTarget.dataset.id}); + } + + handleWallpaperSelected(e) { + let index, type, blur + if (!e) { + // Restore default. + type = WALLPAPER_DEFAULTS.type; + index = WALLPAPER_DEFAULTS.index; + blur = 0; + } else { + e.preventDefault(); + type = this.state.tab; + index = e.currentTarget.dataset.id; + blur = this.state.blur; + } + const fname = imageIndex[type][index].name; + const size = type == 'patt' ? imageIndex[type][index].size : 0; + this.setState({tab: type, wallpaper: fname, blur: 0}); + this.props.onWallpaperSelected(`../${WALLPAPER_DEFAULTS.path}${fname}`, size, this.blurValues[blur]); + } + + handleBlurChanged(e) { + e.preventDefault(); + const blur = e.currentTarget.value; + this.setState({blur: blur}); + // Path relative to CSS file. + this.props.onWallpaperSelected(`../${WALLPAPER_DEFAULTS.path}${this.state.wallpaper}`, 0, this.blurValues[blur]); + } + + render() { + return ( +
+ + +
+ {this.state.tab === 'patt' ? +
+ {imageIndex.patt.map((img, idx) => { + const selected = this.state.wallpaper === img.name ? ' selected' : ''; + return
+ {img.name} +
+ })} +
: + <> +
+
+ +
+
+ +
+
+
+ {imageIndex.img.map((img, idx) => { + const selected = this.state.wallpaper === img.name ? ' selected' : ''; + return
+ {img.name} +
+ })} +
+ + }
+
+ ); + } +} diff --git a/src/widgets/contact.jsx b/src/widgets/contact.jsx index c5627c69..3fb5c8d1 100644 --- a/src/widgets/contact.jsx +++ b/src/widgets/contact.jsx @@ -136,7 +136,7 @@ class Contact extends React.Component {
{title} {this.props.isGroup ? group : null} - {this.props.isChannel ? channel : null} + {this.props.isChannel ? podcasts : null} {!self ? : null} {!this.props.deleted ? : null}
diff --git a/src/widgets/letter-tile.jsx b/src/widgets/letter-tile.jsx index 408a6149..8865694b 100644 --- a/src/widgets/letter-tile.jsx +++ b/src/widgets/letter-tile.jsx @@ -31,7 +31,7 @@ export default class LetterTile extends React.PureComponent { // If avatar image is invalid, show a placeholder. const className = 'avatar' + (this.props.deleted ? ' deleted' : ''); avatar = avatar{e.target.onerror = null; e.target.src="../img/broken_image.png"}} />; + onError={e=>{e.target.onerror = null; e.target.src="img/broken_image.png"}} />; } else { avatar = null; } diff --git a/umd/197.prod.js b/umd/197.prod.js new file mode 100644 index 00000000..600efefa --- /dev/null +++ b/umd/197.prod.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktinode_webapp=self.webpackChunktinode_webapp||[]).push([[197],{7197:function(e){e.exports=JSON.parse('{"action_block_contact":"Bloccare contatto","action_cancel":"cancella","action_clear_messages":"Cancella messaggi","action_delete_messages":"Cancella messaggi per tutti","action_leave_chat":"Lascia la conversazione","action_report_chat":"Report conversazione","archived_contacts":"Contatti archiviati ({count})","badge_danger":"Sospetto","badge_owner":"propietario","badge_staff":"Amministrazione","badge_verified":"Verificato","badge_you":"tu","block_contact_warning":"Sei sicuro di bloccare questo contatto?","blocked_contacts_link":"Contatti bloccati ({count})","button_add_members":"Aggiungi membri","button_cancel":"Cancella","button_confirm":"Conferma","button_create":"Crea","button_delete_account":"Elimina account","button_edit":"Editare","button_logout":"Fine sessione","button_ok":"OK","button_reset":"Reset","button_send_request":"Invia richiesta","button_sign_in":"Entrare","button_sign_up":"Registrazione","button_subscribe":"Sottoscrivi","button_update":"Aggiorna","cannot_initiate_file_upload":"Non è possibile iniziare il caricamento dell\'archivio.","channel":"canale","channel_prompt":"Questo è un canale","chat_invitation":"Sei invitato a partecipare ad una nuova chat. Vuoi farlo?","chat_invitation_accept":"Accettare","chat_invitation_block":"Bloccare","chat_invitation_ignore":"Ignorare","clear_messages_warning":"Sei sicuro di voler cancellare tutti i messaggi? Questa azione è irreversibile.","code_doesnot_match":"Il codice non conicide","contacts_not_found":"Non hai chats
¯∖_(ツ)_/¯","contacts_not_found_short":"Nessun contatto coincide con \'\'{query}\'\'","credential_email_prompt":"La tua mail di registrazione","delete_account":"Elimina l\'account","delete_account_warning":"Sei sicuro di voler cancellare il tuo account? Questa azione è irreversibile.","delete_messages_warning":"Sei sicuro di voler cancellare tutti i messaggi per tutti? Questa azione è irreversibile.","download_action":"Scarica","drafty_attachment":"Allegato","drafty_form":"Form:","drafty_image":"Immagine","email_dative":"posta elettronica","email_prompt":"Posta elettronica, per es. mario@example.com","enable_peers_messaging":"Abilitare","enter_confirmation_code_prompt":"Inserire il codice di conferma {method}:","error_invalid_id":"ID non valido","file_attachment_too_large":"La grandezza del file {size} eccede il limite di {limit}.","forgot_password_link":"Hai dimenticato la password?","full_name_prompt":"Nome completo, per es. Mario Rossi","granted_permissions":"Garantito","group_has_no_members":"Non hai membri","group_user_id_prompt":"ID del gruppo o dell\'utente","image_caption_prompt":"Aggiungi un\'immagine","invalid_content":"contenuto non valido","invalid_security_token":"Token di sicurezza invalido","label_client":"Cliente:","label_content_type":"Tipo di contenuto:","label_default_access_mode":"Modalità di accesso predefinito:","label_file_name":"Nome del file:","label_group_members":"Membri del gruppo:","label_incognito_mode":"Modalità incognito:","label_message_sound":"Suono del messaggio:","label_muting_topic":"Silenziato:","label_other_user":"Altri","label_password":"Password","label_permissions":"Permessi:","label_private":"Commento privato","label_push_notifications":"Allarmi di notifica:","label_push_notifications_disabled":"Allarmi di notifica (richiede HTTPS):","label_reset_password":"Invia una mail per il reset della password:","label_sdk":"SDK:","label_server":"Server:","label_server_address":"Indirizzo del server:","label_server_to_use":"Server da usare:","label_size":"Grandezza:","label_topic_name":"Nome dell\'argomento","label_user_contacts":"Contatti","label_user_id":"ID:","label_wire_transport":"Tipo di Trasporto:","label_you":"Tu:","label_your_name":"Il tuo nome","label_your_permissions":"I tuoi permessi:","last_seen_timestamp":"Ultimo visto","leave_chat_warning":"Sei sicuro di voler lasciare questa conversazione?","link_contact_us":"Contattaci","link_privacy_policy":"Política della privacy","link_terms_of_service":"Termini d\'uso del servizio","login_prompt":"Nome dell\'utente","menu_item_archive_topic":"Archivia","menu_item_block":"Bloccare","menu_item_clear_messages":"Cancella i messaggi","menu_item_clear_messages_for_all":"Cancella per tutti","menu_item_delete":"Elimina","menu_item_delete_for_all":"Elimina per tutti","menu_item_delete_topic":"Eliminare","menu_item_edit_permissions":"Modifica permessi","menu_item_info":"Informazioni","menu_item_member_delete":"Eliminare","menu_item_mute":"Silenziare","menu_item_restore_topic":"Ripristinare","menu_item_send_retry":"Riprova","menu_item_unblock":"Sblocca","menu_item_unmute":"Riattiva le notifiche","message_sending":"invio...","message_sending_failed":"non è possibile inviare il messaggio","messages_not_readable":"nessun accesso ai messaggi","messaging_disabled_prompt":"L\'invio dei messaggi è disabilitato","more_online_members":"+{overflow} e oltre","new_message_prompt":"Nuovo messaggio","new_password_placeholder":"Inserire nuova password","no_connection":"Nessuna connessione","no_contacts":"Non ci sono contatti :-(","numeric_confirmation_code_prompt":"Solo numeri","online_now":"in linea","password_prompt":"Password","password_unchanged_prompt":"Non è cambiata","peers_messaging_disabled":"I messaggi punto punto sono disabilitati.","permission_admin":"Approvare ({val})","permission_delete":"Eliminare ({val})","permission_join":"Unisci ({val})","permission_owner":"Propietario ({val})","permission_pres":"Notifica arrivata ({val})","permission_read":"Leggi ({val})","permission_share":"Condividi ({val})","permission_write":"Scrivi ({val})","phone_dative":"telefono","private_editing_placeholder":"Visibile solo a te","push_init_failed":"Non è possibile inizializzare le notifiche push","reconnect_countdown":"Disconnesso. Riconnessione in {seconds}…","reconnect_now":"Riprovare","reload_update":"Ricaricare","report_chat_warning":"Sei sicuro di bloccare e denunciare questa conversazione?","requested_permissions":"Sollecito","save_attachment":"salva","search_for_contacts":"Usa la ricerca per trovare i contatti","search_no_results":"La ricerca non ha trovato nessun risultato","search_placeholder":"Elenca come: email:mario@example.com, tel:17025550003...","sidepanel_title_acc_notifications":"Notifiche","sidepanel_title_acc_support":"Supporto","sidepanel_title_account_settings":"Impostazioni dell\'account","sidepanel_title_archive":"Chats archiviate","sidepanel_title_blocked":"Chats bloccate","sidepanel_title_cred":"Conferma le credenziali","sidepanel_title_login":"Entra","sidepanel_title_newtpk":"Comincia una Nuova Chat","sidepanel_title_register":"Creare Account","sidepanel_title_reset":"Resetta la Password","sidepanel_title_settings":"Impostazioni","stay_logged_in":"Rimani loggato","tabtitle_find_user":"cerca","tabtitle_group_by_id":"per ID","tabtitle_new_group":"nuovo gruppo","tags_editor_no_tags":"Aggiungi alcune etichette","tags_not_found":"Non ci sono etichette definite. Aggiungine alcune.","title_all_contacts":"Tutti i contatti","title_group_members":"Membri del gruppo","title_manage_tags":"Gestisci","title_not_found":"Non trovato","title_permissions":"Permessi","title_tag_manager":"Etichette (trova e scopri)","topic_block_warning":"Sei sicuro di voler bloccare questa conversazione?","topic_delete_warning":"Sei sicuro di voler eliminare questa conversazione?","topic_name_editing_placeholder":"Nome del gruppo","unnamed_topic":"Senza nome","update_available":"Aggiornamento disponibile.","upload_finishing":"sto terminando...","user_not_found":"Non trovato","description_editing_placeholder":"Descrizione (opzionale)","label_description":"Descrizione","button_security":"Sicurezza","panel_title_crop":"Trascina per aggiustare","panel_title_general":"Generale","panel_title_members":"Membri","panel_title_security":"Sicurezza","panel_title_info":"Informazione","permissions_anonymous":"Anonimo","permissions_authenticated":"Autenticato","topic_delete":"Elimina la conversazione","permissions_user":"Permessi dell\'utente","password_reset_email_sent":"Una mail con il codice di sicurezza è stata inviata.","label_unarchive_topic":"Archiviato:","menu_item_reply":"Replica","menu_item_forward":"Reinvia","forward_to":"Reinvia a","forward_to_search_placeholder":"Cerca i contatti","label_new_password":"Nuova password","drafty_unknown":"Non supportato","calls_incoming":"Chiamata in arrivo","calls_outgoing":"Chiamata in uscita","calls_you_label":"Tu","menu_item_video_call":"Videochiamata","already_in_call":"Sei già in una chiamata in uscita!","call_cancelled":"cancellata","call_missed":"persa","call_declined":"rifiutata","call_disconnected":"disconnessa","label_use_secure_connection":"Usa una connessione sicura","cred_confirmed_successfully":"Confermato con successo","menu_item_edit":"Modifica","editing_message":"Edita","message_edited_marker":", editando","icon_title_add_image":"Aggiungi immagine","icon_title_attach_file":"Allega un file","icon_title_delete":"Eliminare la registrazione","icon_title_pause":"Riproduzione in pausa","icon_title_play":"Riproduci la registrazione","icon_title_record_voice":"Registra un messaggio vocale","icon_title_resume":"Riprendi la riproduzione","icon_title_send":"Inviare il messaggio","drag_file":"Trascina il file qui","drafty_video":"Registrazione video","call_in_progress":"avanzamento","menu_item_audio_call":"Chiamata","unrecognized_video_format":"Il formato di questo video non è riconosciuto","loading_note":"Caricando...","password_i_have_code":"Ho un codice","label_reset_password_tel":"Invia un SMS per resettare la password","mobile_phone_number":"Numero di telefono cellulare","password_reset_sms_sent":"Un SMS con il codice di sicurezza è stato inviato.","mobile_number_required":"E\' richiesto il numero di telefono cellulare","current_email":"Email attuale","current_phone":"Numero di telefono attuale","new_email":"Nuova email","new_phone_number":"Nuovo numero di telefono","change_email":"Cambiare l\'indirizzo di posta elettronica","change_phone":"Cambiare numero di telefono","call_busy":"occupato","pin_message":"Fissare","unpin_message":"Rimuovere","failed_to_init_audio":"Non è possibile cominciare la registrazione audio","password_reset_success":"Il reset della password è avvenuto con successo","scan_qr_code":"Scansionare il codice QR","self_topic_comment":"Note, messaggi, links e archivi, sono salvati per i posteri","self_topic_name":"Messaggi salvati","message_not_found":"Messaggi non trovati","message_deleted":"Messaggi eliminati","alias_editing_placeholder":"Alias (opzionale)","label_alias":"Alias:","alias_already_taken":"(già utilizzato)","alias_invalid":"(invalido)","label_alias_edit":"Alias","select_country":"Seleziona la nazione","text_copied":"Copia nella clipboard","incognito_mode_description":"Nascondi il tuo stato online e gli indicatori di digitazione.","send_command":"Invia con {key}","send_command_explained":"Premi Invio per una nuova riga","send_plain":"Invia con Invio","send_plain_explained":"Premi Shift + Invio per una nuova riga","sidepanel_title_acc_general":"Generale","label_keyboard":"Tastiera:","color_schema_dark":"Scuro","color_schema_light":"Chiaro","color_schema_system":"Predefinito del sistema","label_color_schema":"Tema:","label_text_size":"Dimensione testo:","pin_chat":"Fissa","unpin_chat":"Sblocca","subscriber_count":"{count, plural, one {{count, number} iscritto} other {{count, number} iscritti}}","label_member_count":"Membri:","label_subscriber_count":"Iscritti:","member_count":"{count, plural, one {{count, number} membro} other {{count, number} membri}}"}')}}]); \ No newline at end of file