Skip to content

Commit

Permalink
Merge pull request #288 from ioriayane/Release/v0.39.0
Browse files Browse the repository at this point in the history
Release/v0.39.0
  • Loading branch information
ioriayane authored Oct 12, 2024
2 parents f7a0d0b + 3efc9da commit 9e03627
Show file tree
Hide file tree
Showing 38 changed files with 725 additions and 398 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ openssl/bin
openssl/certs
openssl/include
openssl/lib
openssl/lib64
openssl/misc
openssl/private
openssl/share
Expand Down
3 changes: 2 additions & 1 deletion app/app.pro
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ win32:{
translations.path = $$install_dir/translations
mac:translations.path = \
$$install_dir/$${TARGET}.app/Contents/MacOS/translations
translations.files = $$PWD/i18n/*.qm
translations.files = $$PWD/i18n/*.qm \
$$PWD/../lib/i18n/*.qm
#qmファイルが存在しないとmakefileに追加されないので注意
INSTALLS += translations

Expand Down
Binary file modified app/i18n/app_ja.qm
Binary file not shown.
404 changes: 100 additions & 304 deletions app/i18n/app_ja.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ int main(int argc, char *argv[])
app.setOrganizationName(QStringLiteral("relog"));
app.setOrganizationDomain(QStringLiteral("hagoromo.relog.tech"));
app.setApplicationName(QStringLiteral("Hagoromo"));
app.setApplicationVersion(QStringLiteral("0.38.0"));
app.setApplicationVersion(QStringLiteral("0.39.0"));
#ifndef HAGOROMO_RELEASE_BUILD
app.setApplicationVersion(app.applicationVersion() + "d");
#endif
Expand Down
2 changes: 1 addition & 1 deletion app/qml/parts/ExternalLinkCard.qml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ ClickableFrame {
ImageWithIndicator {
id: thumbImage
Layout.preferredWidth: externalLinkFrame.width
Layout.preferredHeight: thumbImage.source !== "" ? externalLinkFrame.width * 0.5 : 5
Layout.preferredHeight: (thumbImage.source + "") !== "" ? externalLinkFrame.width * 0.5 : 5
fillMode: Image.PreserveAspectCrop
}
Label {
Expand Down
7 changes: 7 additions & 0 deletions app/qml/parts/HashTagMenu.qml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ MenuEx {

signal requestViewSearchPosts(string text)
signal requestAddMutedWord(string text)
signal requestCopyTagToClipboard(string text)

Action {
enabled: !logMode
Expand All @@ -25,6 +26,12 @@ MenuEx {
text: qsTr("Search %s posts by this user").replace("%s", tagMenu.tagText)
onTriggered: requestViewSearchPosts(tagMenu.tagText + " from:" + postAuthor.handle)
}
Action {
enabled: !logMode
icon.source: "../images/copy.png"
text: qsTr("Copy %s").replace("%s", tagMenu.tagText)
onTriggered: requestCopyTagToClipboard(tagMenu.tagText)
}
MenuSeparator {}
Action {
icon.source: "../images/mute.png"
Expand Down
14 changes: 9 additions & 5 deletions app/qml/parts/NotificationDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,14 @@ ClickableFrame {
signal requestViewProfile(string did)
signal requestViewSearchPosts(string text)
signal requestAddMutedWord(string text)
signal requestCopyTagToClipboard(string text)

function openLink(url){
function openLink(url, x, y){
if(url.indexOf("did:") === 0){
requestViewProfile(url)
}else if(url.indexOf("search://") === 0){
tagMenu.x = recrdTextMouseArea.mouseX
tagMenu.y = recrdTextMouseArea.mouseY
tagMenu.x = x
tagMenu.y = y
tagMenu.tagText = url.substring(9)
if(tagMenu.tagText.charAt(0) !== "#"){
tagMenu.tagText = "#" + tagMenu.tagText
Expand Down Expand Up @@ -275,13 +276,14 @@ ClickableFrame {
wrapMode: Text.WrapAnywhere
font.pointSize: AdjustedValues.f10
lineHeight: 1.3
onLinkActivated: (url) => openLink(url)
onLinkActivated: (url) => openLink(url, recrdTextMouseArea.mouseX, recrdTextMouseArea.mouseY)
onHoveredLinkChanged: displayLink(hoveredLink)

HashTagMenu {
id: tagMenu
onRequestViewSearchPosts: (text) => notificationFrame.requestViewSearchPosts(text)
onRequestAddMutedWord: (text) => notificationFrame.requestAddMutedWord(text)
onRequestCopyTagToClipboard: (text) => notificationFrame.requestCopyTagToClipboard(text)
}
}
}
Expand Down Expand Up @@ -359,7 +361,9 @@ ClickableFrame {
wrapMode: Text.WrapAnywhere
font.pointSize: AdjustedValues.f10
lineHeight: 1.3
onLinkActivated: (url) => openLink(url)
onLinkActivated: (url) => openLink(url,
quoteRecordRecordText.x + quoteRecordRecordText.width / 4,
quoteRecordRecordText.y + quoteRecordRecordText.height / 2)
onHoveredLinkChanged: displayLink(hoveredLink)
}
ImagePreview {
Expand Down
25 changes: 20 additions & 5 deletions app/qml/parts/PostDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ ClickableFrame {
property alias pinnedIndicatorLabel: pinnedIndicatorLabel
property alias postAvatarImage: postAvatarImage
property alias postAuthor: postAuthor
property alias authorLabels: authorLabels
property alias recordText: recordText
property alias contentFilterFrame: contentFilterFrame
property alias contentMediaFilterFrame: contentMediaFilterFrame
Expand All @@ -53,13 +54,14 @@ ClickableFrame {
signal requestViewProfile(string did)
signal requestViewSearchPosts(string text)
signal requestAddMutedWord(string text)
signal requestCopyTagToClipboard(string text)

function openLink(url){
function openLink(url, x, y){
if(url.indexOf("did:") === 0){
requestViewProfile(url)
}else if(url.indexOf("search://") === 0){
tagMenu.x = recrdTextMouseArea.mouseX
tagMenu.y = recrdTextMouseArea.mouseY
tagMenu.x = x
tagMenu.y = y
tagMenu.tagText = url.substring(9)
if(tagMenu.tagText.charAt(0) !== "#"){
tagMenu.tagText = "#" + tagMenu.tagText
Expand Down Expand Up @@ -166,6 +168,16 @@ ClickableFrame {
Layout.preferredWidth: parent.basisWidth
layoutWidth: parent.basisWidth
}
TagLabelLayout {
id: authorLabels
Layout.preferredWidth: parent.width
visible: count > 0
tagSpacing: 2
tagColor: "transparent"
tagBorderWidth: 1
fontPointSize: AdjustedValues.f8
}


CoverFrame {
id: contentFilterFrame
Expand Down Expand Up @@ -198,14 +210,15 @@ ClickableFrame {
wrapMode: Text.WrapAnywhere
font.pointSize: AdjustedValues.f10
lineHeight: 1.3
onLinkActivated: (url) => openLink(url)
onLinkActivated: (url) => openLink(url, recrdTextMouseArea.mouseX, recrdTextMouseArea.mouseY)
onHoveredLinkChanged: displayLink(hoveredLink)

HashTagMenu {
id: tagMenu
logMode: postFrame.logMode
onRequestViewSearchPosts: (text) => postFrame.requestViewSearchPosts(text)
onRequestAddMutedWord: (text) => postFrame.requestAddMutedWord(text)
onRequestCopyTagToClipboard: (text) => postFrame.requestCopyTagToClipboard(text)
}
}
}
Expand Down Expand Up @@ -267,7 +280,9 @@ ClickableFrame {
visible: postFrame.hasQuote &&
quoteFilterFrame.showContent
basisWidth: bodyLayout.basisWidth
onOpenLink: (url) => postFrame.openLink(url)
onOpenLink: (url) => postFrame.openLink(url,
quoteRecordFrame.x + quoteRecordFrame.width / 4,
quoteRecordFrame.y + quoteRecordFrame.height / 2)
onDisplayLink: (url) => postFrame.displayLink(url)
}
Frame {
Expand Down
5 changes: 5 additions & 0 deletions app/qml/parts/TagLabelLayout.qml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import QtQuick.Controls.Material 2.15

import tech.relog.hagoromo.singleton 1.0

Item {
id: tagLabelLayout
clip: true
implicitHeight: {
if(repeater.count === 0){
Expand All @@ -23,6 +26,7 @@ Item {
property alias model: repeater.model
property alias count: repeater.count
property string iconSource: "../images/label.png"
property real fontPointSize: AdjustedValues.f10

Repeater {
id: repeater
Expand Down Expand Up @@ -73,6 +77,7 @@ Item {
text: model.modelData
source: repeater.parent.iconSource
spacing: repeater.parent.tagSpacing
fontPointSize: tagLabelLayout.fontPointSize
}
}
}
2 changes: 1 addition & 1 deletion app/qml/parts/VideoFrame.qml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ ClickableFrame {
id: thumbImage
width: videoFrame.width
height: {
if(thumbImage.source !== "") {
if((thumbImage.source + "") !== "") {
if(sourceSize.width > sourceSize.height){
return (width / sourceSize.width) * sourceSize.height
}else{
Expand Down
1 change: 1 addition & 0 deletions app/qml/view/NotificationListView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ ScrollView {
onRequestViewProfile: (did) => notificationListView.requestViewProfile(did)
onRequestViewSearchPosts: (text) => notificationListView.requestViewSearchPosts(text)
onRequestAddMutedWord: (text) => notificationListView.requestAddMutedWord(text)
onRequestCopyTagToClipboard: (text) => systemTool.copyToClipboard(text)

moderationFrame.visible: model.muted
userFilterMatched: model.userFilterMatched
Expand Down
8 changes: 6 additions & 2 deletions app/qml/view/PostThreadView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ ColumnLayout {
delegate: PostDelegate {
Layout.preferredWidth: rootListView.width

property bool isBasisPost: (postThreadView.postUri === model.uri)

//自分から自分へは移動しない
onClicked: (mouse) => {
if(postThreadView.postUri !== model.uri){
Expand All @@ -111,6 +113,7 @@ ColumnLayout {
onRequestViewProfile: (did) => postThreadView.requestViewProfile(did)
onRequestViewSearchPosts: (text) => postThreadView.requestViewSearchPosts(text)
onRequestAddMutedWord: (text) => postThreadView.requestAddMutedWord(text)
onRequestCopyTagToClipboard: (text) => systemTool.copyToClipboard(text)

moderationFrame.visible: model.muted
userFilterMatched: model.userFilterMatched
Expand All @@ -128,7 +131,8 @@ ColumnLayout {
postAvatarImage.onClicked: requestViewProfile(model.did)
postAuthor.displayName: model.displayName
postAuthor.handle: model.handle
postAuthor.indexedAt: (postThreadView.postUri === model.uri) ? "" : model.indexedAt
postAuthor.indexedAt: isBasisPost ? "" : model.indexedAt
authorLabels.model: isBasisPost ? model.authorLabels : []
recordText.text: {
var text = model.recordText
if(model.recordTextTranslation.length > 0){
Expand Down Expand Up @@ -194,7 +198,7 @@ ColumnLayout {
listLinkCardFrame.creatorHandleLabel.text: model.listLinkCreatorHandle
listLinkCardFrame.descriptionLabel.text: model.listLinkDescription

postInformation.visible: (postThreadView.postUri === model.uri)
postInformation.visible: isBasisPost
postInformation.tagsLayout.model: postInformation.visible ? model.tags : []
postInformation.labelsLayout.model: postInformation.visible ? model.labels : []
postInformation.languagesLayout.model: postInformation.visible ? model.languages : []
Expand Down
19 changes: 9 additions & 10 deletions app/qml/view/ProfileView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,15 @@ ColumnLayout {
tagBorderWidth: 1
model: userProfile.belongingLists
}
TagLabelLayout {
Layout.preferredWidth: profileView.width - 10
Layout.maximumWidth: profileView.width
Layout.topMargin: 5
Layout.leftMargin: 5
Layout.rightMargin: 5
visible: count > 0
model: userProfile.labels
}
Label {
id: descriptionLabel
Layout.topMargin: 5
Expand Down Expand Up @@ -508,16 +517,6 @@ ColumnLayout {
}
]
}
IconLabelFrame {
id: moderationFrame3
Layout.topMargin: 2
Layout.preferredWidth: profileView.width
visible: userProfile.userFilterMatched
backgroundColor: Material.color(Material.Red)
borderWidth: 0
iconSource: "../images/labeling.png"
labelText: qsTr("This account has been flagged : ") + userProfile.userFilterTitle
}
IconLabelFrame {
id: moderationFrame2
Layout.topMargin: 2
Expand Down
1 change: 1 addition & 0 deletions app/qml/view/TimelineView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ ScrollView {
onRequestViewProfile: (did) => timelineView.requestViewProfile(did)
onRequestViewSearchPosts: (text) => timelineView.requestViewSearchPosts(text)
onRequestAddMutedWord: (text) => timelineView.requestAddMutedWord(text)
onRequestCopyTagToClipboard: (text) => systemTool.copyToClipboard(text)

moderationFrame.visible: model.muted
userFilterMatched: model.userFilterMatched
Expand Down
7 changes: 5 additions & 2 deletions app/qtquick/atpabstractlistmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,11 +400,14 @@ bool AtpAbstractListModel::getQuoteFilterMatched(
return false;
}

QStringList AtpAbstractListModel::getLabels(
const QList<AtProtocolType::ComAtprotoLabelDefs::Label> &labels) const
QStringList
AtpAbstractListModel::getLabels(const QList<AtProtocolType::ComAtprotoLabelDefs::Label> &labels,
bool exclude_no_unauth) const
{
QStringList ret;
for (const auto &label : labels) {
if (exclude_no_unauth && label.val == "!no-unauthenticated")
continue;
ret.append(label.val);
}
return ret;
Expand Down
3 changes: 2 additions & 1 deletion app/qtquick/atpabstractlistmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ public slots:
QString getContentFilterMessage(const QList<AtProtocolType::ComAtprotoLabelDefs::Label> &labels,
const bool for_media) const;
bool getQuoteFilterMatched(const AtProtocolType::AppBskyFeedDefs::PostView &post) const;
QStringList getLabels(const QList<AtProtocolType::ComAtprotoLabelDefs::Label> &labels) const;
QStringList getLabels(const QList<AtProtocolType::ComAtprotoLabelDefs::Label> &labels,
bool exclude_no_unauth = false) const;
QStringList getLaunguages(const QVariant &record) const;
QString getVia(const QVariant &record) const;

Expand Down
Loading

0 comments on commit 9e03627

Please sign in to comment.