@ -2,6 +2,7 @@
/ /
/ /
/ / S P D X - L i c e n s e - I d e n t i f i e r : G P L - 3 . 0 - o r - l a t e r
/ / S P D X - L i c e n s e - I d e n t i f i e r : G P L - 3 . 0 - o r - l a t e r
import QtQuick
import ".."
import ".."
import im . nheko
import im . nheko
@ -15,6 +16,7 @@ MatrixText {
property string copyText: selectedText ? getText ( selectionStart , selectionEnd ) : body
property string copyText: selectedText ? getText ( selectionStart , selectionEnd ) : body
property int metadataWidth: 100
property int metadataWidth: 100
property bool fitsMetadata: false / / p o s i t i o n A t ( w i d t h , h e i g h t - 4 ) = = p o s i t i o n A t ( w i d t h - m e t a d a t a W i d t h - 1 0 , h e i g h t - 4 )
property bool fitsMetadata: false / / p o s i t i o n A t ( w i d t h , h e i g h t - 4 ) = = p o s i t i o n A t ( w i d t h - m e t a d a t a W i d t h - 1 0 , h e i g h t - 4 )
property bool showSpoilers: false
/ / t a b l e b o r d e r - c o l l a p s e d o e s n ' t s e e m t o w o r k
/ / t a b l e b o r d e r - c o l l a p s e d o e s n ' t s e e m t o w o r k
text: `
text: `
@ -33,11 +35,12 @@ MatrixText {
padding: ` + Math . ceil ( fontMetrics . lineSpacing / 2 ) + ` px ;
padding: ` + Math . ceil ( fontMetrics . lineSpacing / 2 ) + ` px ;
}
}
blockquote { margin - left: 1 em ; }
blockquote { margin - left: 1 em ; }
` + ( ! Settings . mobileMode ? ` span [ data - mx - spoiler ] {
span [ data - mx - spoiler ] { ` + ( ! showSpoilers ? `
color: transparent ;
color: transparent ;
background - color: ` + palette . text + ` ;
background - color: ` + palette . text + ` ; ` : `
} ` : "" ) + / / T O D O ( N i c o ) : F i g u r e o u t h o w t o s u p p o r t m o b i l e
background - color: ` + palette . alternateBase + ';' ) + `
` < / s t y l e >
}
< / s t y l e >
` + formatted . replace ( /<del>/g , "<s>" ) . replace ( /<\/del>/g , "</s>" ) . replace ( /<strike>/g , "<s>" ) . replace ( /<\/strike>/g , "</s>" )
` + formatted . replace ( /<del>/g , "<s>" ) . replace ( /<\/del>/g , "</s>" ) . replace ( /<strike>/g , "<s>" ) . replace ( /<\/strike>/g , "</s>" )
enabled: ! isReply
enabled: ! isReply
@ -49,4 +52,7 @@ MatrixText {
cursorShape: Qt . PointingHandCursor
cursorShape: Qt . PointingHandCursor
}
}
TapHandler {
onTapped: showSpoilers = ! showSpoilers
}
}
}