Skip to content

Commit

Permalink
Merge pull request #208 from ioriayane/Release/v0.29.0
Browse files Browse the repository at this point in the history
Release/v0.29.0
  • Loading branch information
ioriayane authored May 2, 2024
2 parents bb7caa6 + f73b2b6 commit c38e851
Show file tree
Hide file tree
Showing 73 changed files with 3,852 additions and 157 deletions.
2 changes: 1 addition & 1 deletion 1stparty/atproto
Submodule atproto updated 96 files
+0 −5 .changeset/chilly-terms-add.md
+33 −0 lexicons/app/bsky/actor/defs.json
+0 −5 lexicons/app/bsky/actor/searchActorsTypeahead.json
+44 −0 lexicons/app/bsky/unspecced/getSuggestionsSkeleton.json
+8 −3 lexicons/com/atproto/server/createSession.json
+1 −0 lexicons/com/atproto/server/getSession.json
+1 −0 lexicons/com/atproto/server/updateEmail.json
+28 −0 packages/api/CHANGELOG.md
+1 −1 packages/api/package.json
+4 −0 packages/api/src/agent.ts
+222 −1 packages/api/src/bsky-agent.ts
+18 −0 packages/api/src/client/index.ts
+100 −6 packages/api/src/client/lexicons.ts
+38 −0 packages/api/src/client/types/app/bsky/actor/defs.ts
+0 −2 packages/api/src/client/types/app/bsky/actor/searchActorsTypeahead.ts
+40 −0 packages/api/src/client/types/app/bsky/unspecced/getSuggestionsSkeleton.ts
+10 −0 packages/api/src/client/types/com/atproto/server/createSession.ts
+1 −0 packages/api/src/client/types/com/atproto/server/getSession.ts
+1 −0 packages/api/src/client/types/com/atproto/server/updateEmail.ts
+6 −0 packages/api/src/types.ts
+72 −0 packages/api/src/util.ts
+1,021 −2 packages/api/tests/bsky-agent.test.ts
+4 −0 packages/api/tests/moderation-prefs.test.ts
+29 −9 packages/aws/src/s3.ts
+28 −0 packages/bsky/CHANGELOG.md
+1 −1 packages/bsky/package.json
+54 −18 packages/bsky/src/api/app/bsky/actor/getSuggestions.ts
+1 −0 packages/bsky/src/api/app/bsky/actor/searchActors.ts
+1 −0 packages/bsky/src/api/app/bsky/actor/searchActorsTypeahead.ts
+2 −1 packages/bsky/src/api/app/bsky/feed/getFeed.ts
+2 −1 packages/bsky/src/api/app/bsky/feed/getListFeed.ts
+2 −1 packages/bsky/src/api/app/bsky/feed/getTimeline.ts
+10 −0 packages/bsky/src/api/app/bsky/feed/searchPosts.ts
+14 −0 packages/bsky/src/config.ts
+5 −0 packages/bsky/src/context.ts
+7 −1 packages/bsky/src/hydration/hydrator.ts
+12 −0 packages/bsky/src/index.ts
+12 −0 packages/bsky/src/lexicon/index.ts
+100 −6 packages/bsky/src/lexicon/lexicons.ts
+38 −0 packages/bsky/src/lexicon/types/app/bsky/actor/defs.ts
+0 −2 packages/bsky/src/lexicon/types/app/bsky/actor/searchActorsTypeahead.ts
+50 −0 packages/bsky/src/lexicon/types/app/bsky/unspecced/getSuggestionsSkeleton.ts
+3 −1 packages/bsky/src/lexicon/types/com/atproto/server/createSession.ts
+1 −0 packages/bsky/src/lexicon/types/com/atproto/server/getSession.ts
+1 −0 packages/bsky/src/lexicon/types/com/atproto/server/updateEmail.ts
+7 −0 packages/bsky/src/views/index.ts
+2 −2 packages/bsky/tests/views/__snapshots__/actor-search.test.ts.snap
+3 −3 packages/bsky/tests/views/actor-search.test.ts
+12 −2 packages/bsky/tests/views/blocks.test.ts
+40 −0 packages/dev-env/CHANGELOG.md
+1 −1 packages/dev-env/package.json
+8 −1 packages/dev-env/src/seed/client.ts
+5 −5 packages/dev-env/src/seed/users-bulk.ts
+28 −0 packages/ozone/CHANGELOG.md
+1 −1 packages/ozone/jest.config.js
+2 −1 packages/ozone/package.json
+2 −2 packages/ozone/src/api/communication/createTemplate.ts
+2 −2 packages/ozone/src/api/communication/deleteTemplate.ts
+2 −2 packages/ozone/src/api/communication/updateTemplate.ts
+12 −0 packages/ozone/src/lexicon/index.ts
+100 −6 packages/ozone/src/lexicon/lexicons.ts
+38 −0 packages/ozone/src/lexicon/types/app/bsky/actor/defs.ts
+0 −2 packages/ozone/src/lexicon/types/app/bsky/actor/searchActorsTypeahead.ts
+50 −0 packages/ozone/src/lexicon/types/app/bsky/unspecced/getSuggestionsSkeleton.ts
+3 −1 packages/ozone/src/lexicon/types/com/atproto/server/createSession.ts
+1 −0 packages/ozone/src/lexicon/types/com/atproto/server/getSession.ts
+1 −0 packages/ozone/src/lexicon/types/com/atproto/server/updateEmail.ts
+6 −5 packages/ozone/src/mod-service/index.ts
+561 −0 packages/ozone/src/mod-service/lang-data.ts
+34 −0 packages/ozone/src/mod-service/lang.ts
+2 −2 packages/ozone/tests/__snapshots__/get-record.test.ts.snap
+1 −1 packages/ozone/tests/__snapshots__/moderation-events.test.ts.snap
+1 −1 packages/ozone/tests/__snapshots__/moderation-statuses.test.ts.snap
+5 −5 packages/ozone/tests/communication-templates.test.ts
+109 −0 packages/ozone/tests/lang.test.ts
+27 −0 packages/ozone/tests/moderation-statuses.test.ts
+1 −1 packages/ozone/tests/repo-search.test.ts
+30 −0 packages/pds/CHANGELOG.md
+1 −1 packages/pds/package.json
+17 −5 packages/pds/src/api/com/atproto/repo/uploadBlob.ts
+2 −0 packages/pds/src/config/config.ts
+2 −0 packages/pds/src/config/env.ts
+1 −0 packages/pds/src/context.ts
+1 −1 packages/pds/src/handle/index.ts
+12 −0 packages/pds/src/lexicon/index.ts
+100 −6 packages/pds/src/lexicon/lexicons.ts
+38 −0 packages/pds/src/lexicon/types/app/bsky/actor/defs.ts
+0 −2 packages/pds/src/lexicon/types/app/bsky/actor/searchActorsTypeahead.ts
+50 −0 packages/pds/src/lexicon/types/app/bsky/unspecced/getSuggestionsSkeleton.ts
+3 −1 packages/pds/src/lexicon/types/com/atproto/server/createSession.ts
+1 −0 packages/pds/src/lexicon/types/com/atproto/server/getSession.ts
+1 −0 packages/pds/src/lexicon/types/com/atproto/server/updateEmail.ts
+28 −0 packages/pds/tests/handle-validation.test.ts
+2 −2 packages/pds/tests/proxied/__snapshots__/admin.test.ts.snap
+5 −5 packages/pds/tests/seeds/users-bulk.ts
+13 −0 pnpm-lock.yaml
3 changes: 3 additions & 0 deletions app/app.pro
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ QML_FILES = \
qml/parts/ListLinkCard.qml \
qml/parts/MentionSuggestionView.qml \
qml/parts/NotificationDelegate.qml \
qml/parts/PinnedIndicator.qml \
qml/parts/PostControls.qml \
qml/parts/PostDelegate.qml \
qml/parts/PostInformation.qml \
Expand Down Expand Up @@ -92,6 +93,7 @@ IMAGE_FILES += \
qml/images/arrow_left_double.png \
qml/images/arrow_left_single.png \
qml/images/auto.png \
qml/images/database.png \
qml/images/block.png \
qml/images/bookmark_add.png \
qml/images/check.png \
Expand All @@ -117,6 +119,7 @@ IMAGE_FILES += \
qml/images/mute.png \
qml/images/notification.png \
qml/images/open_in_other.png \
qml/images/pin.png \
qml/images/quote.png \
qml/images/refresh.png \
qml/images/reply.png \
Expand Down
Binary file modified app/i18n/qt_ja_JP.qm
Binary file not shown.
330 changes: 242 additions & 88 deletions app/i18n/qt_ja_JP.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 @@ -76,7 +76,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.28.0"));
app.setApplicationVersion(QStringLiteral("0.29.0"));
#ifndef HAGOROMO_RELEASE_BUILD
app.setApplicationVersion(app.applicationVersion() + "d");
#endif
Expand Down
1 change: 1 addition & 0 deletions app/qml/data/AdjustedValues.qml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ QtObject {
property real i18: 18 * ratio
property real i16: 16 * ratio
property real i12: 12 * ratio
property real i10: 10 * ratio

// for Font
property real f14: 14 * ratio
Expand Down
35 changes: 33 additions & 2 deletions app/qml/dialogs/LoginDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,17 @@ Dialog {

signal errorOccured(string code, string message)

onClosed: {
mfaCodeTextInput.visible = false
mfaCodeTextInput.text = ""
}

CreateSession {
id: session
service: serviceTextInput.text
identifier: idTextInput.text
password: passwordTextInput.text
authFactorToken: mfaCodeTextInput.text

onFinished: (success) => {
if(success){
Expand All @@ -33,7 +39,14 @@ Dialog {
// NG
}
}
onErrorOccured: (code, message) => loginDialog.errorOccured(code, message)
onErrorOccured: (code, message) => {
if(code === "AuthFactorTokenRequired"){
mfaCodeTextInput.text = ""
mfaCodeTextInput.visible = true
}else{
loginDialog.errorOccured(code, message)
}
}
}

GridLayout {
Expand Down Expand Up @@ -75,6 +88,20 @@ Dialog {
placeholderText: "The use of App Password is recommended."
font.pointSize: AdjustedValues.f10
}
Label {
font.pointSize: AdjustedValues.f10
text: qsTr("2FA Confirmation")
visible: mfaCodeTextInput.visible
}
TextField {
id: mfaCodeTextInput
Layout.fillWidth: true
enabled: !session.running
visible: false
echoMode: TextInput.Password
placeholderText: "Confirmation code"
font.pointSize: AdjustedValues.f10
}

Button {
Layout.alignment: Qt.AlignLeft
Expand All @@ -85,7 +112,11 @@ Dialog {
}
Button {
Layout.alignment: Qt.AlignRight
enabled: !(session.running || serviceTextInput.text.length == 0 || idTextInput.text.length == 0 || passwordTextInput.text.length == 0)
enabled: !(session.running ||
serviceTextInput.text.length == 0 ||
idTextInput.text.length == 0 ||
passwordTextInput.text.length == 0 ||
(mfaCodeTextInput.visible && mfaCodeTextInput.text.length === 0))
font.pointSize: AdjustedValues.f10
text: qsTr("Login")
onClicked: session.create()
Expand Down
Binary file added app/qml/images/database.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/qml/images/pin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/qml/parts/Author.qml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RowLayout {

Label {
id: displayNameText
Layout.fillWidth: true
Layout.maximumWidth: layoutWidth / 2
Layout.alignment: Qt.AlignTop
font.pointSize: AdjustedValues.f10
elide: Text.ElideRight
Expand Down
33 changes: 33 additions & 0 deletions app/qml/parts/PinnedIndicator.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import QtQuick.Controls.Material 2.15
import QtGraphicalEffects 1.15

import tech.relog.hagoromo.singleton 1.0

Rectangle {
color: Material.color(Material.Indigo)
radius: height / 2
RowLayout {
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: parent.height / 2 + 2
spacing: 2
Image {
Layout.preferredWidth: AdjustedValues.i12
Layout.preferredHeight: AdjustedValues.i12
layer.enabled: true
layer.effect: ColorOverlay {
color: "white"
}
source: "../images/pin.png"
}
Label {
Layout.topMargin: 3
text: qsTr("Pinned post")
font.pointSize: AdjustedValues.f8
color: "white"
}
}
}
38 changes: 38 additions & 0 deletions app/qml/parts/PostControls.qml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import QtQuick.Controls.Material 2.15
import QtGraphicalEffects 1.15

import tech.relog.hagoromo.singleton 1.0

import "../controls"
Expand All @@ -11,6 +13,7 @@ RowLayout {

property bool isReposted: false
property bool isLiked: false
property bool pinned: false
property string postUri: ""
property string handle: ""
property bool mine: false
Expand All @@ -20,6 +23,7 @@ RowLayout {
property alias repostMenuItem: repostMenuItem
property alias quoteMenuItem: quoteMenuItem
property alias likeButton: likeButton
property alias pinnedImage: pinnedImage

signal triggeredTranslate()
signal triggeredCopyToClipboard()
Expand All @@ -29,6 +33,7 @@ RowLayout {
signal triggeredRequestViewLikedBy()
signal triggeredRequestViewRepostedBy()
signal triggeredRequestUpdateThreadGate()
signal triggeredRequestPin()


function openInOhters(uri, handle){
Expand Down Expand Up @@ -87,6 +92,28 @@ RowLayout {
visible: !parent.enabled
}
}
Item {
id: pinnedImage
Layout.preferredWidth: AdjustedValues.b24
Layout.preferredHeight: AdjustedValues.b24
Layout.leftMargin: 5
Layout.rightMargin: 5
Layout.alignment: Qt.AlignVCenter
Image {
width: AdjustedValues.i16
height: AdjustedValues.i16
anchors.centerIn: parent
source: pinned ? "../images/pin.png" : ""
layer.enabled: true
layer.effect: ColorOverlay {
color: Material.foreground
}
}
BusyIndicator {
anchors.fill: parent
visible: !parent.enabled
}
}
Item {
Layout.fillWidth: true
height: 1
Expand Down Expand Up @@ -143,6 +170,11 @@ RowLayout {
onTriggered: triggeredRequestViewLikedBy()
}
MenuSeparator {}
MenuItem {
text: pinned ? qsTr("Unpin this post") : qsTr("Pin this post")
icon.source: "../images/pin.png"
onTriggered: triggeredRequestPin()
}
MenuItem {
text: qsTr("Who can reply")
enabled: mine
Expand Down Expand Up @@ -200,6 +232,12 @@ RowLayout {
onTriggered: triggeredRequestViewLikedBy()
}
MenuSeparator {}
MenuItem {
text: pinned ? qsTr("Unpin this post") : qsTr("Pin this post")
icon.source: "../images/pin.png"
onTriggered: triggeredRequestPin()
}
MenuSeparator {}
MenuItem {
text: qsTr("Report post")
icon.source: "../images/report.png"
Expand Down
7 changes: 7 additions & 0 deletions app/qml/parts/PostDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ ClickableFrame {
property alias moderationFrame: moderationFrame
property alias repostReactionAuthor: repostReactionAuthor
property alias replyReactionAuthor: replyReactionAuthor
property alias pinnedIndicatorLabel: pinnedIndicatorLabel
property alias postAvatarImage: postAvatarImage
property alias postAuthor: postAuthor
property alias recordText: recordText
Expand Down Expand Up @@ -81,6 +82,7 @@ ClickableFrame {
when: moderationFrame.showContent === false
PropertyChanges { target: repostReactionAuthor; visible: false }
PropertyChanges { target: replyReactionAuthor; visible: false }
PropertyChanges { target: pinnedIndicatorLabel; visible: false }
PropertyChanges { target: postLayout; visible: false }
}

Expand All @@ -104,6 +106,11 @@ ClickableFrame {
]
}

PinnedIndicator {
id: pinnedIndicatorLabel
Layout.fillWidth: true
Layout.preferredHeight: AdjustedValues.i12 * 1.2
}
ReactionAuthor {
id: repostReactionAuthor
Layout.maximumWidth: postFrame.layoutWidth
Expand Down
3 changes: 3 additions & 0 deletions app/qml/view/PostThreadView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ ColumnLayout {
replyReactionAuthor.visible: model.hasReply
replyReactionAuthor.displayName: model.replyParentDisplayName
replyReactionAuthor.handle: model.replyParentHandle
pinnedIndicatorLabel.visible: false

postAvatarImage.source: model.avatar
postAvatarImage.onClicked: requestViewProfile(model.did)
Expand Down Expand Up @@ -214,6 +215,7 @@ ColumnLayout {
postControls.onTriggeredTranslate: postThreadListModel.translate(model.cid)
postControls.isReposted: model.isReposted
postControls.isLiked: model.isLiked
postControls.pinned: model.pinnedByMe
postControls.postUri: model.uri
postControls.handle: model.handle
postControls.mine: model.did === postThreadView.accountDid
Expand All @@ -224,6 +226,7 @@ ColumnLayout {
postControls.onTriggeredRequestViewLikedBy: postThreadView.requestViewLikedBy(model.uri)
postControls.onTriggeredRequestViewRepostedBy: postThreadView.requestViewRepostedBy(model.uri)
postControls.onTriggeredRequestUpdateThreadGate: postThreadView.requestUpdateThreadGate(model.uri, model.threadGateUri, model.threadGateType, model.threadGateRules, updatedThreadGate)
postControls.onTriggeredRequestPin: rootListView.model.pin(model.index)

threadConnected: model.threadConnected
threadConnectorTop.visible: model.threadConnectorTop
Expand Down
39 changes: 38 additions & 1 deletion app/qml/view/ProfileView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@ ColumnLayout {

UserProfile {
id: userProfile
onRunningChanged: {
if(running === false){
swipView.getLatest()
}
}
}

SystemTool {
Expand Down Expand Up @@ -236,6 +241,7 @@ ColumnLayout {
id: avatarImage
Layout.preferredWidth: AdjustedValues.i48
Layout.preferredHeight: AdjustedValues.i48
Layout.alignment: Qt.AlignTop
Layout.rowSpan: 2
source: userProfile.avatar
}
Expand Down Expand Up @@ -290,6 +296,27 @@ ColumnLayout {
}
}
}
RowLayout {
Layout.leftMargin: 5
Layout.rightMargin: 5
visible: userProfile.serviceEndpoint.length > 0
spacing: 1
Image {
Layout.preferredWidth: AdjustedValues.i12
Layout.preferredHeight: AdjustedValues.i12
source: "../images/database.png"
layer.enabled: true
layer.effect: ColorOverlay {
color: Material.color(Material.Grey)
}
}
Label {
Layout.topMargin: 2
font.pointSize: AdjustedValues.f8
color: Material.color(Material.Grey)
text: userProfile.serviceEndpoint
}
}
TagLabelLayout {
id: belongingListsLayout
Layout.preferredWidth: profileView.width - 10
Expand Down Expand Up @@ -477,13 +504,17 @@ ColumnLayout {
currentIndex: tabBar.currentIndex
interactive: false

onCurrentItemChanged: {
onCurrentItemChanged: getLatest()

function getLatest() {
if(currentItem == null)
return
if(currentItem.model === undefined)
return
if(currentItem.model.rowCount() > 0)
return
if(userProfile.handle.length === 0)
return
currentItem.model.getLatest()
}

Expand All @@ -495,7 +526,13 @@ ColumnLayout {
displayInterval: 0
authorDid: profileView.userDid
filter: AuthorFeedListModel.PostsWithReplies
pinnedPost: userProfile.pinnedPost
displayPinnedPost: true

onUpdatePin: (uri) => {
userProfile.pinnedPost = uri
getLatest()
}
onErrorOccured: (code, message) => profileView.errorOccured(code, message)
}
accountDid: profileView.accountDid
Expand Down
Loading

0 comments on commit c38e851

Please sign in to comment.