Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import/Export #8

Merged
merged 51 commits into from
Oct 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
5abeac7
allow registering settings for plugins
powerpaul17 Oct 4, 2024
c827ce1
add changelog for import/export plugin
powerpaul17 Oct 4, 2024
b74f874
allow setting name for a test store
powerpaul17 Oct 4, 2024
d044665
add tests for storage manager
powerpaul17 Oct 4, 2024
28f44f0
add test for data export of stores
powerpaul17 Oct 4, 2024
d2bb9ab
add method for exporting data of all stores
powerpaul17 Oct 4, 2024
a25b61c
add settings view & route
powerpaul17 Oct 4, 2024
6c35188
use input group setting type instead of button group
powerpaul17 Oct 4, 2024
0a4f447
add setting input component
powerpaul17 Oct 4, 2024
f434857
add settings section component
powerpaul17 Oct 4, 2024
f60c578
show plugin settings in settings view
powerpaul17 Oct 4, 2024
a9b624a
implement button setting input component
powerpaul17 Oct 4, 2024
3e72d2f
add button for exporting data
powerpaul17 Oct 4, 2024
229a7c5
add zod package
powerpaul17 Oct 4, 2024
f81560f
create zod schema for export format
powerpaul17 Oct 5, 2024
e999ab5
give better name for export file
powerpaul17 Oct 5, 2024
7ff664b
add setting input component for file
powerpaul17 Oct 5, 2024
d604392
add accept parameter to file settings input
powerpaul17 Oct 5, 2024
bb07048
save storage manager as member variable
powerpaul17 Oct 5, 2024
3321a31
implement importing data into stores
powerpaul17 Oct 5, 2024
6c41095
add button for importing data
powerpaul17 Oct 5, 2024
cba2999
add toast service
powerpaul17 Oct 5, 2024
116b24b
add toast for import error
powerpaul17 Oct 5, 2024
1bcbbce
show toast if import was successful
powerpaul17 Oct 5, 2024
be32eb9
fix pinning settings navigation item to bottom
powerpaul17 Oct 5, 2024
73e442d
make label of setting input optional
powerpaul17 Oct 5, 2024
56e1c26
improve layout of settings sections
powerpaul17 Oct 5, 2024
e0bc0f8
always use a new instance of todo filterer
powerpaul17 Oct 5, 2024
be3ee7a
fix test for exporting stores
powerpaul17 Oct 5, 2024
236e0f8
add test for importing stores
powerpaul17 Oct 5, 2024
207c605
add test for registering plugin settings
powerpaul17 Oct 5, 2024
2b32926
update to capacitor 6
powerpaul17 Oct 5, 2024
50d2cd1
add capacitor device plugin
powerpaul17 Oct 5, 2024
ecb31c9
add capacitor filesystem plugin
powerpaul17 Oct 5, 2024
97870b3
set default values for environment variables in gradle file
powerpaul17 Oct 5, 2024
abb44da
add toast handler as member variable in import/export plugin
powerpaul17 Oct 5, 2024
46b4053
save export file to documents folder in app
powerpaul17 Oct 5, 2024
83ef23a
add last updated timestamps to export data
powerpaul17 Oct 5, 2024
52ab829
add method to get store version
powerpaul17 Oct 5, 2024
21fc624
add store version to export data
powerpaul17 Oct 5, 2024
a28f9bd
add confirmation service + component
powerpaul17 Oct 6, 2024
404c8e7
show confirmation dialog before overwriting newer store data
powerpaul17 Oct 6, 2024
e2621f4
add android permissions for accessing external storage
powerpaul17 Oct 6, 2024
72c439c
log if trying to import a store which does not exist
powerpaul17 Oct 6, 2024
39ef709
add debug message when importing data into store
powerpaul17 Oct 6, 2024
85a7d55
add todo note for validating data before import
powerpaul17 Oct 6, 2024
c276443
add dayjs package
powerpaul17 Oct 6, 2024
91c5a8f
load localized format dayjs plugin
powerpaul17 Oct 6, 2024
7c17352
show data update dates in localized format
powerpaul17 Oct 6, 2024
fce9fe6
remove unused hook function of component
powerpaul17 Oct 6, 2024
e632d7d
correct import/export test expectations
powerpaul17 Oct 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## [Unreleased]

- add import/export plugin

## [0.9.0] - 2024-09-27

- allow creation of labels in selection dialog
Expand Down
8 changes: 4 additions & 4 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'com.android.application'

android {
namespace "com.paultirk.yatoo"
compileSdkVersion rootProject.ext.compileSdkVersion
compileSdk rootProject.ext.compileSdkVersion
defaultConfig {
applicationId "com.paultirk.yatoo"
minSdkVersion rootProject.ext.minSdkVersion
Expand All @@ -19,9 +19,9 @@ android {
signingConfigs {
release {
keyAlias "yatoo"
keyPassword System.env.ANDROID_KEYSTORE_PASSWORD
storeFile file(System.env.ANDROID_KEYSTORE_PATH)
storePassword System.env.ANDROID_KEYSTORE_PASSWORD
keyPassword System.env.ANDROID_KEYSTORE_PASSWORD ?: ''
storeFile file(System.env.ANDROID_KEYSTORE_PATH ?: '.')
storePassword System.env.ANDROID_KEYSTORE_PASSWORD ?: ''
}
}
buildTypes {
Expand Down
3 changes: 2 additions & 1 deletion android/app/capacitor.build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ android {

apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
dependencies {

implementation project(':capacitor-device')
implementation project(':capacitor-filesystem')

}

Expand Down
3 changes: 3 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,7 @@
<!-- Permissions -->

<!-- <uses-permission android:name="android.permission.INTERNET" /> -->

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
</manifest>
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.0.0'
classpath 'com.google.gms:google-services:4.3.15'
classpath 'com.android.tools.build:gradle:8.2.1'
classpath 'com.google.gms:google-services:4.4.0'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
6 changes: 6 additions & 0 deletions android/capacitor.settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
include ':capacitor-android'
project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor')

include ':capacitor-device'
project(':capacitor-device').projectDir = new File('../node_modules/@capacitor/device/android')

include ':capacitor-filesystem'
project(':capacitor-filesystem').projectDir = new File('../node_modules/@capacitor/filesystem/android')
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-all.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
14 changes: 7 additions & 7 deletions android/variables.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
ext {
minSdkVersion = 22
compileSdkVersion = 33
targetSdkVersion = 33
androidxActivityVersion = '1.7.0'
compileSdkVersion = 34
targetSdkVersion = 34
androidxActivityVersion = '1.8.0'
androidxAppCompatVersion = '1.6.1'
androidxCoordinatorLayoutVersion = '1.2.0'
androidxCoreVersion = '1.10.0'
androidxFragmentVersion = '1.5.6'
coreSplashScreenVersion = '1.0.0'
androidxWebkitVersion = '1.6.1'
androidxCoreVersion = '1.12.0'
androidxFragmentVersion = '1.6.2'
coreSplashScreenVersion = '1.0.1'
androidxWebkitVersion = '1.9.0'
junitVersion = '4.13.2'
androidxJunitVersion = '1.1.5'
androidxEspressoCoreVersion = '3.5.1'
Expand Down
21 changes: 21 additions & 0 deletions i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"NavigationBar": {
"labels": "Labels",
"noLabels": "no labels",
"settings": "Settings",
"todos": "Todos"
},
"todos": {
Expand All @@ -49,8 +50,28 @@
"name": "Name"
}
},
"errors": {
"wrongFileFormat": "Wrong file format"
},
"plugins": {
"importExportPlugin": {
"export": "Export",
"fileSaved": "File saved",
"import": "Import",
"importSuccessful": "Import successful",
"label": "Import / Export",
"overwrite": "Overwrite",
"storedDataNewerThanImportData": "Stored data is newer than import data"
}
},
"routes": {
"label": "Label",
"settings": "Settings",
"todos": "Todos"
},
"views": {
"settings": {
"plugins": "Plugins"
}
}
}
Loading
Loading