mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-07-20 17:51:38 +00:00
core, ui: split SimplexNameDomain out of SimplexNameInfo (#7024)
* core, ui: split SimplexNameDomain out of SimplexNameInfo * core: bump simplexmq to b3f28948 (SimplexNameDomain split) * core: bump simplexmq to 4e2c9fc3 (StrEncoding split) * core: bump simplexmq to ee2ff402 (#1788 squash merge) * update sha256map.nix
This commit is contained in:
@@ -5141,6 +5141,10 @@ public enum SimplexLinkType: String, Decodable, Hashable {
|
||||
|
||||
public struct SimplexNameInfo: Decodable, Equatable, Hashable {
|
||||
public var nameType: SimplexNameType
|
||||
public var nameDomain: SimplexNameDomain
|
||||
}
|
||||
|
||||
public struct SimplexNameDomain: Decodable, Equatable, Hashable {
|
||||
public var nameTLD: SimplexTLD
|
||||
public var domain: String
|
||||
public var subDomain: [String]
|
||||
|
||||
@@ -4733,6 +4733,11 @@ enum class SimplexLinkType(val linkType: String) {
|
||||
@Serializable
|
||||
data class SimplexNameInfo(
|
||||
val nameType: SimplexNameType,
|
||||
val nameDomain: SimplexNameDomain
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class SimplexNameDomain(
|
||||
val nameTLD: SimplexTLD,
|
||||
val domain: String,
|
||||
val subDomain: List<String>
|
||||
|
||||
+12
-3
@@ -165,6 +165,7 @@ This file is generated automatically.
|
||||
- [SecurityCode](#securitycode)
|
||||
- [SimplePreference](#simplepreference)
|
||||
- [SimplexLinkType](#simplexlinktype)
|
||||
- [SimplexNameDomain](#simplexnamedomain)
|
||||
- [SimplexNameInfo](#simplexnameinfo)
|
||||
- [SimplexNameType](#simplexnametype)
|
||||
- [SimplexTLD](#simplextld)
|
||||
@@ -3447,15 +3448,23 @@ A_QUEUE:
|
||||
- "relay"
|
||||
|
||||
|
||||
---
|
||||
|
||||
## SimplexNameDomain
|
||||
|
||||
**Record type**:
|
||||
- nameTLD: [SimplexTLD](#simplextld)
|
||||
- domain: string
|
||||
- subDomain: [string]
|
||||
|
||||
|
||||
---
|
||||
|
||||
## SimplexNameInfo
|
||||
|
||||
**Record type**:
|
||||
- nameType: [SimplexNameType](#simplexnametype)
|
||||
- nameTLD: [SimplexTLD](#simplextld)
|
||||
- domain: string
|
||||
- subDomain: [string]
|
||||
- nameDomain: [SimplexNameDomain](#simplexnamedomain)
|
||||
|
||||
|
||||
---
|
||||
|
||||
@@ -345,6 +345,7 @@ chatTypesDocsData =
|
||||
(sti @SecurityCode, STRecord, "", [], "", ""),
|
||||
(sti @SimplePreference, STRecord, "", [], "", ""),
|
||||
(sti @SimplexLinkType, STEnum, "XL", [], "", ""),
|
||||
(sti @SimplexNameDomain, STRecord, "", [], "", ""),
|
||||
(sti @SimplexNameInfo, STRecord, "", [], "", ""),
|
||||
(sti @SimplexNameType, STEnum, "NT", [], "", ""),
|
||||
(sti @SimplexTLD, STEnum, "TLD", [], "", ""),
|
||||
@@ -561,6 +562,7 @@ deriving instance Generic RelayStatus
|
||||
deriving instance Generic ReportReason
|
||||
deriving instance Generic SecurityCode
|
||||
deriving instance Generic SimplexLinkType
|
||||
deriving instance Generic SimplexNameDomain
|
||||
deriving instance Generic SimplexNameInfo
|
||||
deriving instance Generic SimplexNameType
|
||||
deriving instance Generic SimplexTLD
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ constraints: zip +disable-bzip2 +disable-zstd
|
||||
source-repository-package
|
||||
type: git
|
||||
location: https://github.com/simplex-chat/simplexmq.git
|
||||
tag: e9265a7f7cb723d70b03e1b67af01f2666872a44
|
||||
tag: ee2ff402fed4d27d31521570c910fe82e0cf116a
|
||||
|
||||
source-repository-package
|
||||
type: git
|
||||
|
||||
@@ -3855,13 +3855,17 @@ export enum SimplexLinkType {
|
||||
Relay = "relay",
|
||||
}
|
||||
|
||||
export interface SimplexNameInfo {
|
||||
nameType: SimplexNameType
|
||||
export interface SimplexNameDomain {
|
||||
nameTLD: SimplexTLD
|
||||
domain: string
|
||||
subDomain: string[]
|
||||
}
|
||||
|
||||
export interface SimplexNameInfo {
|
||||
nameType: SimplexNameType
|
||||
nameDomain: SimplexNameDomain
|
||||
}
|
||||
|
||||
export enum SimplexNameType {
|
||||
PublicGroup = "publicGroup",
|
||||
Contact = "contact",
|
||||
|
||||
@@ -2692,12 +2692,15 @@ class SimplePreference(TypedDict):
|
||||
|
||||
SimplexLinkType = Literal["contact", "invitation", "group", "channel", "relay"]
|
||||
|
||||
class SimplexNameInfo(TypedDict):
|
||||
nameType: "SimplexNameType"
|
||||
class SimplexNameDomain(TypedDict):
|
||||
nameTLD: "SimplexTLD"
|
||||
domain: str
|
||||
subDomain: list[str]
|
||||
|
||||
class SimplexNameInfo(TypedDict):
|
||||
nameType: "SimplexNameType"
|
||||
nameDomain: "SimplexNameDomain"
|
||||
|
||||
SimplexNameType = Literal["publicGroup", "contact"]
|
||||
|
||||
SimplexTLD = Literal["simplex", "testing", "web"]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"https://github.com/simplex-chat/simplexmq.git"."e9265a7f7cb723d70b03e1b67af01f2666872a44" = "00xyzc5advpka2d2mq11f02cmcr7fa7n6mjj53symspdpx1pgfa5";
|
||||
"https://github.com/simplex-chat/simplexmq.git"."ee2ff402fed4d27d31521570c910fe82e0cf116a" = "0vka1b2bbrjg4s8j3h6732kjqjbhji0l55pzggd89ginrdjln3fg";
|
||||
"https://github.com/simplex-chat/hs-socks.git"."a30cc7a79a08d8108316094f8f2f82a0c5e1ac51" = "0yasvnr7g91k76mjkamvzab2kvlb1g5pspjyjn2fr6v83swjhj38";
|
||||
"https://github.com/simplex-chat/direct-sqlcipher.git"."f814ee68b16a9447fbb467ccc8f29bdd3546bfd9" = "1ql13f4kfwkbaq7nygkxgw84213i0zm7c1a8hwvramayxl38dq5d";
|
||||
"https://github.com/simplex-chat/sqlcipher-simple.git"."a46bd361a19376c5211f1058908fc0ae6bf42446" = "1z0r78d8f0812kxbgsm735qf6xx8lvaz27k1a0b4a2m0sshpd5gl";
|
||||
|
||||
@@ -10,7 +10,7 @@ import Data.Text (Text)
|
||||
import qualified Data.Text as T
|
||||
import Data.Text.Encoding (encodeUtf8)
|
||||
import Simplex.Chat.Markdown
|
||||
import Simplex.Messaging.Agent.Protocol (SimplexNameInfo (..), SimplexNameType (..), SimplexTLD (..))
|
||||
import Simplex.Messaging.Agent.Protocol (SimplexNameDomain (..), SimplexNameInfo (..), SimplexNameType (..), SimplexTLD (..))
|
||||
import Simplex.Messaging.Encoding.String
|
||||
import Simplex.Messaging.Util ((<$$>))
|
||||
import System.Console.ANSI.Types
|
||||
@@ -381,7 +381,7 @@ command' :: Text -> Text -> FormattedText
|
||||
command' = FormattedText . Just . Command
|
||||
|
||||
sname :: SimplexNameType -> SimplexTLD -> Text -> [Text] -> Text -> Markdown
|
||||
sname nt ns dom sub txt = markdown (SimplexName $ SimplexNameInfo nt ns dom sub) (pfx <> txt)
|
||||
sname nt ns dom sub txt = markdown (SimplexName $ SimplexNameInfo nt (SimplexNameDomain ns dom sub)) (pfx <> txt)
|
||||
where
|
||||
pfx = case nt of NTPublicGroup -> "#"; NTContact -> "@"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user