Skip to content

Commit

Permalink
Merge pull request #240 from ioriayane/Release/v0.33.0
Browse files Browse the repository at this point in the history
Release/v0.33.0
  • Loading branch information
ioriayane authored Jul 1, 2024
2 parents b33e3d5 + 25a5514 commit 2fb92a8
Show file tree
Hide file tree
Showing 95 changed files with 5,051 additions and 556 deletions.
2 changes: 1 addition & 1 deletion 1stparty/atproto
Submodule atproto updated 926 files
5 changes: 5 additions & 0 deletions app/app.pro
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ QML_FILES = \
qml/compat/GlowC.qml \
qml/compat/OpacityMaskC.qml \
qml/compat/SettingsC.qml \
qml/controls/CalendarPicker.qml \
qml/controls/ClickableFrame.qml \
qml/controls/ComboBoxEx.qml \
qml/controls/ProgressCircle.qml \
Expand Down Expand Up @@ -81,6 +82,7 @@ QML_FILES = \
qml/parts/PostInformation.qml \
qml/parts/ProfileTabBar.qml \
qml/parts/ProfileTabButton.qml \
qml/parts/QuoteRecord.qml \
qml/parts/ReactionAuthor.qml \
qml/parts/SelfLabelPopup.qml \
qml/parts/SideBar.qml \
Expand Down Expand Up @@ -115,6 +117,8 @@ IMAGE_FILES += \
qml/images/arrow_forward.png \
qml/images/arrow_left_double.png \
qml/images/arrow_left_single.png \
qml/images/arrow_right_double.png \
qml/images/arrow_right_single.png \
qml/images/auto.png \
qml/images/database.png \
qml/images/block.png \
Expand Down Expand Up @@ -153,6 +157,7 @@ IMAGE_FILES += \
qml/images/search.png \
qml/images/send.png \
qml/images/settings.png \
qml/images/starterpack.png \
qml/images/tag.png \
qml/images/terminal.png \
qml/images/thread.png \
Expand Down
Binary file modified app/i18n/app_ja.qm
Binary file not shown.
293 changes: 164 additions & 129 deletions app/i18n/app_ja.ts

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include "qtquick/thumbnailprovider.h"
#include "qtquick/encryption.h"
#include "qtquick/userprofile.h"
#include "qtquick/userpost.h"
#include "qtquick/systemtool.h"
#include "qtquick/externallink.h"
#include "qtquick/reporter.h"
Expand All @@ -55,6 +56,7 @@
#include "qtquick/chat/chatmessagelistmodel.h"
#include "qtquick/moderation/labelerlistmodel.h"
#include "qtquick/blog/blogentrylistmodel.h"
#include "qtquick/controls/calendartablemodel.h"

#include "tools/translatorchanger.h"

Expand Down Expand Up @@ -87,7 +89,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.32.0"));
app.setApplicationVersion(QStringLiteral("0.33.0"));
#ifndef HAGOROMO_RELEASE_BUILD
app.setApplicationVersion(app.applicationVersion() + "d");
#endif
Expand Down Expand Up @@ -149,6 +151,7 @@ int main(int argc, char *argv[])
"ListMutesListModel");
qmlRegisterType<Encryption>("tech.relog.hagoromo.encryption", 1, 0, "Encryption");
qmlRegisterType<UserProfile>("tech.relog.hagoromo.userprofile", 1, 0, "UserProfile");
qmlRegisterType<UserPost>("tech.relog.hagoromo.userpost", 1, 0, "UserPost");
qmlRegisterType<SystemTool>("tech.relog.hagoromo.systemtool", 1, 0, "SystemTool");
qmlRegisterType<ExternalLink>("tech.relog.hagoromo.externallink", 1, 0, "ExternalLink");
qmlRegisterType<Reporter>("tech.relog.hagoromo.reporter", 1, 0, "Reporter");
Expand Down Expand Up @@ -180,6 +183,9 @@ int main(int argc, char *argv[])
qmlRegisterType<BlogEntryListModel>("tech.relog.hagoromo.blog.blogentrylistmodel", 1, 0,
"BlogEntryListModel");

qmlRegisterType<CalendarTableModel>("tech.relog.hagoromo.controls.calendartablemodel", 1, 0,
"CalendarTableModel");

qmlRegisterSingletonType(QUrl("qrc:/Hagoromo/qml/data/AdjustedValues.qml"),
"tech.relog.hagoromo.singleton", 1, 0, "AdjustedValues");

Expand Down
118 changes: 118 additions & 0 deletions app/qml/controls/CalendarPicker.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import QtQuick.Controls.Material 2.15

import tech.relog.hagoromo.controls.calendartablemodel 1.0
import tech.relog.hagoromo.singleton 1.0

import "../controls"

Frame {
id: root

property string target: "" // since or until
property alias since: calendarTableModel.since
property alias until: calendarTableModel.until
property alias enableSince: calendarTableModel.enableSince
property alias enableUntil: calendarTableModel.enableUntil

signal dateChanged(int year, int month, int day)

function setSince(year, month, day) {
calendarTableModel.setSinceDate(year, month, day)
}
function setUntil(year, month, day) {
calendarTableModel.setUntilDate(year, month, day)
}
function sinceUtc() {
return calendarTableModel.sinceUtc()
}
function untilUtc() {
return calendarTableModel.untilUtc()
}
function clear() {
calendarTableModel.clear()
}
function forceLayout(){
calendarTable.forceLayout()
}
onTargetChanged: {
if(target === "since"){
calendarTableModel.setCurrentFromSince()
}else{
calendarTableModel.setCurrentFromUntil()
}
}

ColumnLayout {
RowLayout {
id: controlLayout
Layout.alignment: Qt.AlignHCenter
spacing: 0
property int buttonSize: yearMonthLabel.height * 1.5
IconButton {
Layout.preferredWidth: parent.buttonSize
Layout.preferredHeight: parent.buttonSize
iconSource: "../images/arrow_left_double.png"
onClicked: calendarTableModel.addYears(-1)
}
IconButton {
Layout.preferredWidth: parent.buttonSize
Layout.preferredHeight: parent.buttonSize
Layout.rightMargin: 5
iconSource: "../images/arrow_left_single.png"
onClicked: calendarTableModel.addMonths(-1)
}
Label {
id: yearMonthLabel
font.pointSize: AdjustedValues.f10
text: calendarTableModel.year + "/" + calendarTableModel.month
}
IconButton {
Layout.preferredWidth: parent.buttonSize
Layout.preferredHeight: parent.buttonSize
Layout.leftMargin: 5
iconSource: "../images/arrow_right_single.png"
onClicked: calendarTableModel.addMonths(1)
}
IconButton {
Layout.preferredWidth: parent.buttonSize
Layout.preferredHeight: parent.buttonSize
iconSource: "../images/arrow_right_double.png"
onClicked: calendarTableModel.addYears(1)
}
}
TableView {
id: calendarTable
Layout.preferredWidth: 200 * AdjustedValues.ratio
Layout.preferredHeight: 150 * AdjustedValues.ratio
clip: true
columnSpacing: 0
rowSpacing: 0
delegate: Button {
width: implicitWidth
height: implicitHeight
implicitWidth: calendarTable.width / 7
implicitHeight: calendarTable.height / 6
topInset: 0
bottomInset: 0
leftInset: 0
rightInset: 0
flat: true
visible: model.day.length > 0
Label {
anchors.centerIn: parent
font.pointSize: AdjustedValues.f10
text: model.day
color: !model.outOfRange ? Material.color(Material.Grey) :
(model.isCurrentMonth ? Material.foreground : Material.color(Material.BlueGrey))
}
onClicked: dateChanged(model.year, model.month, model.day)
}
model: CalendarTableModel {
id: calendarTableModel
}
}
}
}
Loading

0 comments on commit 2fb92a8

Please sign in to comment.