Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions packages/dashboard/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@
"settings_appearance_desc": "Select the theme you would like to use",
"settings_data_source_title": "Data Source",
"settings_data_source_desc": "Fetch trending data from different platformse",
"settings_ancient_post_compatibility_mode_title": "Ancient Post Compatibility Mode",
"settings_ancient_post_compatibility_mode_desc": "Enable if you need to decrypt ancient posts (created before Jan 2020)",
"settings_sync_with_mobile_title": "Sync With Mobile",
"settings_sync_with_mobile_desc": "You can sync your accounts and information with your mobile device. Open the Mask Network mobile app, go to Settings and tap on Sync With Plug-ins",
"settings_global_backup_title": "Global Backup",
Expand Down
2 changes: 0 additions & 2 deletions packages/dashboard/src/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@
"settings_appearance_desc": "Select the theme you would like to use",
"settings_data_source_title": "Data Source",
"settings_data_source_desc": "Fetch trending data from different platformse",
"settings_ancient_post_compatibility_mode_title": "Ancient Post Compatibility Mode",
"settings_ancient_post_compatibility_mode_desc": "Enable if you need to decrypt ancient posts (created before Jan 2020)",
"settings_sync_with_mobile_title": "Sync With Mobile",
"settings_sync_with_mobile_desc": "You can sync your accounts and information with your mobile device. Open the Mask Network mobile app, go to Settings and tap on Sync With Plug-ins",
"settings_global_backup_title": "Global Backup",
Expand Down
5 changes: 0 additions & 5 deletions packages/dashboard/src/pages/Settings/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,3 @@ export const [useLanguage] = createGlobalState(Services.Settings.getLanguage, (x
export const [useTrendingDataSource] = createGlobalState(Services.Settings.getTrendingDataSource, (x) =>
Messages.events.currentTrendingDataProviderSettings.on(x),
)

export const [useAncientPostsCompatibilityMode] = createGlobalState(
Services.Settings.getAncientPostsCompatibiltyMode,
(x) => Messages.events.disableOpenNewTabInBackgroundSettings.on(x),
)

This file was deleted.

8 changes: 0 additions & 8 deletions packages/dashboard/src/pages/Settings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import SettingItem from './components/SettingItem'
import LanguageIcon from '@material-ui/icons/Language'
import PaletteIcon from '@material-ui/icons/Palette'
import TrendingUpIcon from '@material-ui/icons/TrendingUp'
import DesktopWindowsIcon from '@material-ui/icons/DesktopWindows'
import SyncIcon from '@material-ui/icons/Sync'
import SaveIcon from '@material-ui/icons/Save'
import SaveAltIcon from '@material-ui/icons/SaveAlt'
Expand All @@ -18,7 +17,6 @@ import { useDashboardI18N } from '../../locales'

import LanguageSetting from './components/LanguageSetting'
import AppearanceSetting from './components/AppearanceSetting'
import AncientPostsSetting from './components/AncientPostsSetting'
import BackupSetting from './components/BackupSetting'
import RestoreSetting from './components/RestoreSetting'
import MobileSyncSetting from './components/MobileSyncSetting'
Expand Down Expand Up @@ -54,12 +52,6 @@ export default function Settings() {
desc={t.settings_data_source_desc()}>
<DataSourceSetting />
</SettingItem>
<SettingItem
icon={<DesktopWindowsIcon />}
title={t.settings_ancient_post_compatibility_mode_title()}
desc={t.settings_ancient_post_compatibility_mode_desc()}>
<AncientPostsSetting />
</SettingItem>
<SettingItem
icon={<SyncIcon />}
title={t.settings_sync_with_mobile_title()}
Expand Down
10 changes: 0 additions & 10 deletions packages/maskbook/src/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
"connect_to": "Connect to",
"connecting": "Connecting…",
"contacts": "Contacts",
"groups": "Groups",
"create": "Create",
"gas_fee": "Transaction fee",
"create_a_persona": "Create a Persona",
Expand Down Expand Up @@ -68,9 +67,6 @@
"dashboard_email_address": "info@dimension.im",
"dashboard_license": "GNU AGPL 3.0",
"dashboard_no_collectible_found": "No collectible found",
"database_group_followers_name": "Followers of {{owner}}",
"database_group_following_name": "Followed by {{owner}}",
"database_group_friends_default_name": "Friends of {{owner}}",
"decrypted_postbox_add_recipients": "Append recipients",
"decrypted_postbox_decrypting": "Mask decrypting…",
"decrypted_postbox_decoding": "Mask decoding…",
Expand Down Expand Up @@ -137,10 +133,6 @@
"payload_not_found": "Payload not found.",
"payload_throw_in_alpha41": "Support for Alpha41 is deprecated. Tell your friends to upgrade Mask!",
"people_in_database": "All people recorded in the Mask database.",
"person_or_group_in_chip": "{{name}} ({{count}} in the group)",
"person_or_group_in_list_0": "This is an empty group",
"person_or_group_in_list_many": "{{people}}… {{count}} in total",
"person_or_group_in_list_many_no_preview": "{{count}} in total",
"personas": "Personas",
"browser_action_request_permission": "Grant Permission",
"browser_action_notifications": "Notifications",
Expand Down Expand Up @@ -236,8 +228,6 @@
"set_up_qr_scanner_fail": "Fail to scan QR code",
"set_up_backup_fail": "Backup Failed",
"settings": "Settings",
"settings_ancient_post_compatibility_mode": "Ancient Post Compatibility Mode",
"settings_ancient_post_compatibility_mode_desc": "Enable if you need to decrypt ancient posts (created before Jan 2020).",
"settings_enable_debug": "Debug Mode",
"settings_enable_debug_desc": "See additional information for debugging.",
"settings_appearance": "Appearance",
Expand Down
10 changes: 0 additions & 10 deletions packages/maskbook/src/_locales/ja/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
"connect_to": "次に接続します:",
"connecting": "接続中…",
"contacts": "連絡先",
"groups": "グループ",
"create": "作成",
"gas_fee": "",
"create_a_persona": "ペルソナを作成",
Expand Down Expand Up @@ -68,9 +67,6 @@
"dashboard_email_address": "info@dimension.im",
"dashboard_license": "GNU AGPL 3.0",
"dashboard_no_collectible_found": "コレクションが見つかりません",
"database_group_followers_name": "{{owner}}のフォロワー",
"database_group_following_name": "{{owner}}にフォローされている人",
"database_group_friends_default_name": "{{owner}}の相互フォロー",
"decrypted_postbox_add_recipients": "受信者を追加",
"decrypted_postbox_decrypting": "Mask が復号しています。",
"decrypted_postbox_decoding": "Mask が解読しています。",
Expand Down Expand Up @@ -137,10 +133,6 @@
"payload_not_found": "ペイロードが見つかりませんでした。",
"payload_throw_in_alpha41": "Alpha41方式は使用できません。Mask をアップデートしてください。",
"people_in_database": "全ての人は Mask データベースに保存されます。",
"person_or_group_in_chip": "{{name}} (グループ {{count}}番目)",
"person_or_group_in_list_0": "空のグループです",
"person_or_group_in_list_many": "{{people}}… 全部で{{count}}",
"person_or_group_in_list_many_no_preview": "全部で{{count}}",
"personas": "ペルソナ",
"browser_action_request_permission": "権限を付与",
"browser_action_notifications": "通知",
Expand Down Expand Up @@ -236,8 +228,6 @@
"set_up_qr_scanner_fail": "QR コードのスキャンに失敗しました。",
"set_up_backup_fail": "バックアップに失敗しました。",
"settings": "設定",
"settings_ancient_post_compatibility_mode": "エンシェントポスト互換モード",
"settings_ancient_post_compatibility_mode_desc": "過去の投稿(2020年1月以前に作成)を復号する必要がある場合に有効にします。",
"settings_enable_debug": "デバッグモード",
"settings_enable_debug_desc": "デバッグのための追加情報を参照してください。",
"settings_appearance": "テーマ",
Expand Down
10 changes: 0 additions & 10 deletions packages/maskbook/src/_locales/ko/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
"connect_to": "연결",
"connecting": "연결 중",
"contacts": "연락처",
"groups": "그롭",
"create": "만들기",
"gas_fee": "",
"create_a_persona": "페르소나 만들기",
Expand Down Expand Up @@ -68,9 +67,6 @@
"dashboard_email_address": "info@dimension.im",
"dashboard_license": "GNU AGPL 3.0",
"dashboard_no_collectible_found": "수집품이 없습니다.",
"database_group_followers_name": "{{owner}}의 팔로워",
"database_group_following_name": "{{owner}}의 팔로잉",
"database_group_friends_default_name": "{{owner}}의 친구",
"decrypted_postbox_add_recipients": "받는사람 추가",
"decrypted_postbox_decrypting": "Mask 해독 중",
"decrypted_postbox_decoding": "Mask 디코딩 중",
Expand Down Expand Up @@ -137,10 +133,6 @@
"payload_not_found": "페이로드를 찾을 수 없습니다.",
"payload_throw_in_alpha41": "Alpha41 이미 지원하 않습니다. 상대방에게 Mask를 업그레이드하라고 하세요!",
"people_in_database": "모든 연락을 다 Mask의 데이터베이스에 기록되어 있습니다.",
"person_or_group_in_chip": "{{name}} ({{count}} 명",
"person_or_group_in_list_0": "비워 있는 그룹입니다",
"person_or_group_in_list_many": "{{people}}등 전체 {{count}} 명",
"person_or_group_in_list_many_no_preview": "전체 {{count}} 명",
"personas": "페르소나",
"browser_action_request_permission": "권한 받기",
"browser_action_notifications": "알림",
Expand Down Expand Up @@ -236,8 +228,6 @@
"set_up_qr_scanner_fail": "QR 코드 스캔 실패",
"set_up_backup_fail": "백업 실패",
"settings": "설정",
"settings_ancient_post_compatibility_mode": "오래된 게시물 호환성 모드",
"settings_ancient_post_compatibility_mode_desc": "오래된 게시물(2020 1월 전에 만든 것) 해독 가능",
"settings_enable_debug": "디버그 모드",
"settings_enable_debug_desc": "디버깅에 대한 추가 정보 보기",
"settings_appearance": "화면",
Expand Down
10 changes: 0 additions & 10 deletions packages/maskbook/src/_locales/zh/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
"connect_to": "連接到",
"connecting": "正在連接…",
"contacts": "聯絡人",
"groups": "群組",
"create": "建立",
"gas_fee": "",
"create_a_persona": "建立一個角色",
Expand Down Expand Up @@ -68,9 +67,6 @@
"dashboard_email_address": "info@dimension.im",
"dashboard_license": "GNU AGPL 3.0",
"dashboard_no_collectible_found": "找不到收藏品",
"database_group_followers_name": "{{owner} 的追隨者",
"database_group_following_name": "被 {{owner}} 追隨",
"database_group_friends_default_name": "{{owner}} 的朋友",
"decrypted_postbox_add_recipients": "新增收件人",
"decrypted_postbox_decrypting": "Mask 正在解密…",
"decrypted_postbox_decoding": "Mask 正在解碼…",
Expand Down Expand Up @@ -137,10 +133,6 @@
"payload_not_found": "找不到貼文。",
"payload_throw_in_alpha41": "不推薦使用 Alpha41。告訴你的朋友升級Mask!",
"people_in_database": "被記錄在 Mask 資料庫裡的所有人。",
"person_or_group_in_chip": "{{name}} ({{count}} 人在群組中)",
"person_or_group_in_list_0": "這是一個空群組",
"person_or_group_in_list_many": "{{people}}… 總共 {{count}}",
"person_or_group_in_list_many_no_preview": "總共 {{count}}",
"personas": "角色",
"browser_action_request_permission": "授權",
"browser_action_notifications": "通知",
Expand Down Expand Up @@ -236,8 +228,6 @@
"set_up_qr_scanner_fail": "掃描 QR Code 失敗",
"set_up_backup_fail": "備份失敗",
"settings": "設定",
"settings_ancient_post_compatibility_mode": "遠古貼文相容模式",
"settings_ancient_post_compatibility_mode_desc": "開啟這個選項如果你需要解密遠古貼文 (在 2020 年一月前建立)。",
"settings_enable_debug": "除錯模式",
"settings_enable_debug_desc": "請參考有關除錯的附加資訊",
"settings_appearance": "外觀",
Expand Down
22 changes: 10 additions & 12 deletions packages/maskbook/src/components/InjectedComponents/PostDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import {
import { useValueRef } from '@masknet/shared'
import { CompositionEvent, MaskMessage, useI18N, Flags } from '../../utils'
import { isMinds } from '../../social-network-adaptor/minds.com/base'
import { useStylesExtends, or } from '../custom-ui-helper'
import type { Profile, Group } from '../../database'
import { or } from '../custom-ui-helper'
import type { Profile } from '../../database'
import { useFriendsList, useCurrentIdentity, useMyIdentities } from '../DataSource/useActivatedUI'
import { currentImagePayloadStatus, debugModeSetting } from '../../settings/settings'
import { activatedSocialNetworkUI } from '../../social-network'
Expand Down Expand Up @@ -66,15 +66,15 @@ const useStyles = makeStyles({
},
})

export interface PostDialogUIProps extends withClasses<never> {
export interface PostDialogUIProps {
open: boolean
onlyMyself: boolean
shareToEveryone: boolean
imagePayload: boolean
imagePayloadUnchangeable: boolean
maxLength?: number
availableShareTarget: Array<Profile | Group>
currentShareTarget: Array<Profile | Group>
availableShareTarget: Array<Profile>
currentShareTarget: Array<Profile>
currentIdentity: Profile | null
postContent: TypedMessage
postBoxButtonDisabled: boolean
Expand All @@ -86,11 +86,10 @@ export interface PostDialogUIProps extends withClasses<never> {
onCloseButtonClicked: () => void
onSetSelected: SelectRecipientsUIProps['onSetSelected']
DialogProps?: Partial<DialogProps>
SelectRecipientsUIProps?: Partial<SelectRecipientsUIProps>
}

export function PostDialogUI(props: PostDialogUIProps) {
const classes = useStylesExtends(useStyles(), props)
const classes = useStyles()
const { t } = useI18N()
const isDebug = useValueRef(debugModeSetting)
const [showPostMetadata, setShowPostMetadata] = useState(false)
Expand Down Expand Up @@ -154,8 +153,7 @@ export function PostDialogUI(props: PostDialogUIProps) {
<SelectRecipientsUI
items={props.availableShareTarget}
selected={props.currentShareTarget}
onSetSelected={props.onSetSelected}
{...props.SelectRecipientsUIProps}>
onSetSelected={props.onSetSelected}>
<ClickableChip
checked={props.shareToEveryone}
label={t('post_dialog__select_recipients_share_to_everyone')}
Expand Down Expand Up @@ -228,7 +226,7 @@ export interface PostDialogProps extends Omit<Partial<PostDialogUIProps>, 'open'
open?: [boolean, (next: boolean) => void]
reason?: 'timeline' | 'popup'
identities?: Profile[]
onRequestPost?: (target: (Profile | Group)[], content: TypedMessage) => void
onRequestPost?: (target: Profile[], content: TypedMessage) => void
onRequestReset?: () => void
typedMessageMetadata?: ReadonlyMap<string, any>
}
Expand Down Expand Up @@ -258,7 +256,7 @@ export function PostDialog({ reason: props_reason = 'timeline', ...props }: Post
const people = useFriendsList()
const availableShareTarget = props.availableShareTarget || people
const currentIdentity = or(props.currentIdentity, useCurrentIdentity())
const [currentShareTarget, setCurrentShareTarget] = useState<(Profile | Group)[]>(() => [])
const [currentShareTarget, setCurrentShareTarget] = useState<Profile[]>(() => [])
//#endregion
//#region Image Based Payload Switch
const imagePayloadStatus = useValueRef(currentImagePayloadStatus[activatedSocialNetworkUI.networkIdentifier])
Expand All @@ -274,7 +272,7 @@ export function PostDialog({ reason: props_reason = 'timeline', ...props }: Post
const onRequestPost = or(
props.onRequestPost,
useCallback(
async (target: (Profile | Group)[], content: TypedMessage) => {
async (target: Profile[], content: TypedMessage) => {
const [encrypted, token] = await Services.Crypto.encryptTo(
content,
target.map((x) => x.identifier),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useCallback, useState } from 'react'
import { makeStyles } from '@material-ui/core/styles'
import { Button, CircularProgress, DialogActions, DialogContent } from '@material-ui/core'
import { useI18N } from '../../utils'
import { SelectProfileAndGroupsUI, SelectProfileAndGroupsUIProps } from '../shared/SelectPeopleAndGroups'
import { SelectProfileUI } from '../shared/SelectProfileUI'
import type { Profile } from '../../database'
import { useStylesExtends } from '../custom-ui-helper'
import { InjectedDialog } from '../shared/InjectedDialog'
Expand All @@ -13,7 +13,6 @@ export interface SelectProfileDialogProps extends withClasses<never> {
alreadySelectedPreviously: Profile[]
onClose: () => void
onSelect: (people: Profile[]) => Promise<void>
SelectPeopleAndGroupsUIProps?: SelectProfileAndGroupsUIProps<Profile>
}
const useStyles = makeStyles({
title: { paddingBottom: 0 },
Expand Down Expand Up @@ -41,13 +40,12 @@ export function SelectProfileDialog(props: SelectProfileDialogProps) {
return (
<InjectedDialog onClose={onClose} open={props.open} title={t('share_to')}>
<DialogContent>
<SelectProfileAndGroupsUI<Profile>
<SelectProfileUI
frozenSelected={props.alreadySelectedPreviously}
disabled={committed}
items={props.profiles}
selected={people}
onSetSelected={select}
{...props.SelectPeopleAndGroupsUIProps}
/>
</DialogContent>
{rejection && (
Expand Down
2 changes: 0 additions & 2 deletions packages/maskbook/src/components/Welcomes/Banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { Theme, IconButton } from '@material-ui/core'
import { useLastRecognizedIdentity, useMyIdentities } from '../DataSource/useActivatedUI'
import Services from '../../extension/service'
import { activatedSocialNetworkUI } from '../../social-network'
import { setStorage } from '../../utils/browser.storage'
import { useStylesExtends } from '../custom-ui-helper'
import { DashboardRoute } from '../../extension/options-page/Route'
import { MaskbookSharpIcon } from '../../resources/MaskbookIcon'
Expand Down Expand Up @@ -59,7 +58,6 @@ export function Banner(props: BannerProps) {
nextStep ?? console.warn('You must provide one of networkIdentifier or nextStep.onClick')
return
}
setStorage(networkIdentifier, { forceDisplayWelcome: false })
Services.Welcome.openOptionsPage(DashboardRoute.Setup)
}, [networkIdentifier, nextStep])
const defaultUserName = networkIdentifier
Expand Down
Loading