Skip to content

Commit

Permalink
Merge branch 'master' into enhancementUiUx/readerCantEdit
Browse files Browse the repository at this point in the history
  • Loading branch information
VitorVieiraZ committed Jan 10, 2025
2 parents 193574d + 7892d92 commit 493bb18
Show file tree
Hide file tree
Showing 17 changed files with 11 additions and 114 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ jobs:
${{ github.workspace }}/merginmaps-${{ env.INPUT_VERSION_CODE }}.apk
- name: Upload APK to Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: ${{ github.workspace }}/merginmaps-${{ env.INPUT_VERSION_CODE }}.apk
name: Mergin Maps ${{ env.INPUT_VERSION_CODE }} APK [v7 + v8a]
Expand Down Expand Up @@ -294,7 +294,7 @@ jobs:
- name: Upload AAB to Artifacts
if: ${{ github.ref_name == 'master' || github.ref_type == 'tag' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: ${{ github.workspace }}/merginmaps-${{ env.INPUT_VERSION_CODE }}.aab
name: Mergin Maps ${{ env.INPUT_VERSION_CODE }} AAB
2 changes: 1 addition & 1 deletion .github/workflows/gallery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ jobs:
tar -czf ${{ github.workspace }}/merginmaps-gallery-${{ matrix.os }}.tar.gz .
- name: Upload APK to Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: ${{ github.workspace }}/merginmaps-gallery-${{ matrix.os }}.tar.gz
name: Mergin Maps Gallery ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,6 @@ jobs:
tar -c -z -f ${{ github.workspace }}/${INPUT_TAR} ./
- name: Upload Sdk in Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: ${{ github.workspace }}/${{ env.INPUT_TAR }}
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,6 @@ jobs:
tar -c -z -f ${{ github.workspace }}/${INPUT_TAR} "./Input.app"
- name: Upload Sdk in Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: ${{ github.workspace }}/${{ env.INPUT_TAR }}
2 changes: 1 addition & 1 deletion .github/workflows/macos_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,6 @@ jobs:
tar -c -z -f ${{ github.workspace }}/${INPUT_TAR} "./Input.app"
- name: Upload Sdk in Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: ${{ github.workspace }}/${{ env.INPUT_TAR }}
2 changes: 1 addition & 1 deletion .github/workflows/win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ jobs:
xcopy C:\input-package\inputapp-win-x86_64.exe mergin-maps-input-win64-${{ steps.time.outputs.formattedTime }}-${{ github.run_number }}.exe* /Y
- name: Upload Sdk in Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: mergin-maps-input-win64-${{ steps.time.outputs.formattedTime }}-${{ github.run_number }}.exe
if-no-files-found: error
Expand Down
24 changes: 0 additions & 24 deletions app/images/ReachedMonthlyContributorLimit.svg

This file was deleted.

1 change: 0 additions & 1 deletion app/images/images.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,5 @@
<file>SignIn.svg</file>
<file>NoWorkspace.svg</file>
<file>BlueInfo.svg</file>
<file>ReachedMonthlyContributorLimit.svg</file>
</qresource>
</RCC>
2 changes: 0 additions & 2 deletions app/mmstyle.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ class MMStyle: public QObject
Q_PROPERTY( QUrl acceptInvitationImage READ acceptInvitationImage CONSTANT )
Q_PROPERTY( QUrl acceptInvitationLogoImage READ acceptInvitationLogoImage CONSTANT )
Q_PROPERTY( QUrl reachedDataLimitImage READ reachedDataLimitImage CONSTANT )
Q_PROPERTY( QUrl reachedMonthlyContributorLimitImage READ reachedMonthlyContributorLimitImage CONSTANT )
Q_PROPERTY( QUrl uploadImage READ uploadImage CONSTANT )
Q_PROPERTY( QUrl noMapThemesImage READ noMapThemesImage CONSTANT )
Q_PROPERTY( QUrl syncFailedImage READ syncFailedImage CONSTANT )
Expand Down Expand Up @@ -497,7 +496,6 @@ class MMStyle: public QObject
QUrl noPermissionsImage() {return QUrl( "qrc:/images/NoPermissions.svg" );}
QUrl signInImage() {return QUrl( "qrc:/images/SignIn.svg" );}
QUrl reachedDataLimitImage() {return QUrl( "qrc:/images/ReachedDataLimit.svg" );}
QUrl reachedMonthlyContributorLimitImage() {return QUrl( "qrc:/images/ReachedMonthlyContributorLimit.svg" );}
QUrl warnLogoImage() {return QUrl( "qrc:/images/WarnLogoImage.svg" );}
QUrl mapPinImage() {return QUrl( "qrc:/images/MapPin.svg" );}
QUrl positionTrackingRunningImage() {return QUrl( "qrc:/images/PositionTrackingRunning.svg" );}
Expand Down
1 change: 0 additions & 1 deletion app/qml/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ set(MM_QML
dialogs/MMDownloadProjectDialog.qml
dialogs/MMMigrateToMerginDialog.qml
dialogs/MMMissingAuthDialog.qml
dialogs/MMMonthlyContributorsLimitDialog.qml
dialogs/MMNoPermissionsDialog.qml
dialogs/MMPositionTrackingDialog.qml
dialogs/MMProjectLimitDialog.qml
Expand Down
38 changes: 0 additions & 38 deletions app/qml/dialogs/MMMonthlyContributorsLimitDialog.qml

This file was deleted.

13 changes: 1 addition & 12 deletions app/qml/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -716,12 +716,6 @@ ApplicationWindow {
onManageAccountClicked: Qt.openUrlExternally(__inputHelp.merginSubscriptionLink)
}

MMMonthlyContributorsLimitDialog {
id: monthlyContributorsLimitDialog

onManageAccountClicked: Qt.openUrlExternally(__inputHelp.merginSubscriptionLink)
}

MMProjectLimitDialog {
id: projectLimitDialog

Expand Down Expand Up @@ -902,11 +896,6 @@ ApplicationWindow {
storageLimitDialog.open()
}

function onMonthlyContributorLimitReached( quota, serverMsg ) {
monthlyContributorsLimitDialog.contributorsQuota = quota
monthlyContributorsLimitDialog.open()
}

function onProjectLimitReached( maxProjects, errorMsg ) {
__merginApi.getUserInfo()
if (__merginApi.apiSupportsSubscriptions) {
Expand All @@ -926,7 +915,7 @@ ApplicationWindow {
}

function onMigrationRequested( version ) {
if ( __appSettings.ignoreMigrateVersion !== version ) {
if( __appSettings.ignoreMigrateVersion !== version ) {
migrationDialog.version = version
migrationDialog.open()
}
Expand Down
11 changes: 2 additions & 9 deletions core/merginapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2117,13 +2117,14 @@ void MerginApi::pushStartReplyFinished()
serverMsg = sSyncCanceledMessage;

QString code = extractServerErrorCode( data );
bool showLimitReachedDialog = EnumHelper::isEqual( code, ErrorCode::StorageLimitHit );

CoreUtils::log( "push " + projectFullName, QStringLiteral( "FAILED - %1. %2" ).arg( r->errorString(), serverMsg ) );

transaction.replyPushStart->deleteLater();
transaction.replyPushStart = nullptr;

if ( EnumHelper::isEqual( code, ErrorCode::StorageLimitHit ) )
if ( showLimitReachedDialog )
{
const QList<MerginFile> files = transaction.pushQueue;
qreal uploadSize = 0;
Expand All @@ -2143,14 +2144,6 @@ void MerginApi::pushStartReplyFinished()
deleteProject( projectNamespace, projectName, false );
}
}
else if ( EnumHelper::isEqual( code, ErrorCode::MonthlyContributorsLimitHit ) )
{
int quota = 0;
QVariant maximunMonthlyContributor = extractServerErrorValue( data, "projects_quota" );
if ( maximunMonthlyContributor.isValid() )
quota = maximunMonthlyContributor.toInt();
emit monthlyContributorLimitReached( quota, serverMsg );
}
else
{
int httpCode = r->attribute( QNetworkRequest::HttpStatusCodeAttribute ).toInt();
Expand Down
4 changes: 1 addition & 3 deletions core/merginapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,7 @@ class ErrorCode
{
Unknown = 0,
ProjectsLimitHit,
StorageLimitHit,
MonthlyContributorsLimitHit,
StorageLimitHit
};
Q_ENUM( Value );
};
Expand Down Expand Up @@ -603,7 +602,6 @@ class MerginApi: public QObject
);

void storageLimitReached( qreal uploadSize );
void monthlyContributorLimitReached( int contributorsQuota, const QString &message );
void projectLimitReached( int maxProjects, const QString &message );
void migrationRequested( const QString &version );
void notifySuccess( const QString &message );
Expand Down
1 change: 0 additions & 1 deletion gallery/qml.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
<file>../app/qml/dialogs/MMStreamingModeDialog.qml</file>
<file>../app/qml/dialogs/MMPositionTrackingDialog.qml</file>
<file>../app/qml/dialogs/MMStorageLimitDialog.qml</file>
<file>../app/qml/dialogs/MMMonthlyContributorsLimitDialog.qml</file>
<file>../app/qml/dialogs/MMCloseAccountDialog.qml</file>
<file>../app/qml/dialogs/MMRemoveProjectDialog.qml</file>
<file>../app/qml/dialogs/MMDownloadProjectDialog.qml</file>
Expand Down
15 changes: 0 additions & 15 deletions gallery/qml/pages/DrawerPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ Page {
onClicked: storageLimitDialog.open()
}

Button {
text: "MMMonthlyContributorsLimitDialog"
onClicked: monthlyContributorsLimitDialog.open()
}

Button {
text: "MMCloseAccountDialog"
onClicked: closeAccountDialog.open()
Expand Down Expand Up @@ -294,16 +289,6 @@ Page {
}
}

MMMonthlyContributorsLimitDialog {
id: monthlyContributorsLimitDialog

contributorsQuota: 15

onPrimaryButtonClicked: {
console.log("Manage workspace clicked")
}
}

MMSyncFailedDialog {
id: syncFailedDialog
}
Expand Down
1 change: 0 additions & 1 deletion gallery/qml/pages/ImagesPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ ScrollView {
Column { Image { source: __style.externalGpsGreenImage } Text { text: "externalGpsGreenImage" } }
Column { Image { source: __style.externalGpsRedImage } Text { text: "externalGpsRedImage" } }
Column { Image { source: __style.reachedDataLimitImage } Text { text: "reachedDataLimitImage" } }
Column { Image { source: __style.reachedMonthlyContributorLimitImage } Text { text: "reachedMonthlyContributorLimitImage" } }
Column { Image { source: __style.positiveMMSymbolImage } Text { text: "positiveMMSymbolImage" } }
Column { Image { source: __style.negativeMMSymbolImage } Text { text: "negativeMMSymbolImage" } }
Column { Image { source: __style.closeAccountImage } Text { text: "closeAccountImage" } }
Expand Down

0 comments on commit 493bb18

Please sign in to comment.