Skip to content

Commit 649163b

Browse files
committed
feat: Add in-app file explorer
- Introduce a hidden file explorer screen, accessible via a secret tap gesture in the settings. - Create a new `core:data:file-explorer` module to handle multiplatform file system interactions using `Okio`. - Define `FileRepo` and `AbstractFileRepo` for navigating directories and viewing file contents. - Implement platform-specific `FileRepo` for Android, iOS, JVM, and a no-op version for WasmJS. - Add `FilesViewModel` to manage file explorer state and user actions. - Integrate `accompanist-permissions` for handling storage permissions on Android. - Refactor the `SignInScreen` to use an `AdaptiveFrame` for better layout on different screen sizes. Dependency Updates: - `actions/checkout` to `v5` - `agp` to `8.13.1` - `sqlDelight` to `2.2.1` - `okio` to `3.16.2` - `accompanist-permissions` to `0.36.0`
1 parent 9a2eafe commit 649163b

File tree

49 files changed

+1148
-71
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1148
-71
lines changed

.github/workflows/android.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: macos-latest
1212
steps:
1313
- name: Check out
14-
uses: actions/checkout@v4
14+
uses: actions/checkout@v5
1515
- name: Set up JDK 17
1616
uses: actions/setup-java@v5
1717
with:

.github/workflows/desktop.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
os: [ ubuntu-latest, macos-latest, windows-latest ]
1616
steps:
1717
- name: Check out
18-
uses: actions/checkout@v4
18+
uses: actions/checkout@v5
1919
- name: Set up JDK 17
2020
uses: actions/setup-java@v5
2121
with:

.github/workflows/ios.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
steps:
1414
- name: Check out
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@v5
1616
- name: Set up JDK 17
1717
uses: actions/setup-java@v5
1818
with:

.github/workflows/kmp.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
continue-on-error: true
1616
steps:
1717
- name: Check out
18-
uses: actions/checkout@v4
18+
uses: actions/checkout@v5
1919
- name: Gradle Wrapper Validation
2020
uses: gradle/actions/wrapper-validation@v5
2121
- name: Set up JDK 17
@@ -52,7 +52,7 @@ jobs:
5252
target: [default]
5353
steps:
5454
- name: Check out
55-
uses: actions/checkout@v4
55+
uses: actions/checkout@v5
5656
- name: Set up JDK 17
5757
uses: actions/setup-java@v5
5858
with:

.github/workflows/web.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
runs-on: macos-latest
2525
steps:
2626
- name: Checkout
27-
uses: actions/checkout@v4
27+
uses: actions/checkout@v5
2828
- name: Set up JDK 17
2929
uses: actions/setup-java@v5
3030
with:

app/android/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ android {
2424
applicationId = "com.softartdev.noteroom"
2525
minSdk = libs.versions.minSdk.get().toInt()
2626
targetSdk = libs.versions.targetSdk.get().toInt()
27-
versionCode = 844
28-
versionName = "8.4.4"
27+
versionCode = 845
28+
versionName = "8.4.5"
2929
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
3030
testInstrumentationRunnerArguments["clearPackageData"] = "true"
3131
vectorDrawables.useSupportLibrary = true
Lines changed: 27 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,48 @@
11
package com.softartdev.notedelight
22

3-
import android.content.res.Configuration.UI_MODE_NIGHT_YES
3+
import android.content.res.Configuration
44
import androidx.compose.runtime.Composable
55
import androidx.compose.ui.tooling.preview.Devices
66
import androidx.compose.ui.tooling.preview.Preview
7-
import com.softartdev.notedelight.ui.main.NoteDetailBody
8-
import com.softartdev.notedelight.ui.main.PreviewMainScreen
9-
import com.softartdev.notedelight.ui.SignInScreenBody
7+
import androidx.compose.ui.tooling.preview.PreviewLightDark
108
import com.softartdev.notedelight.ui.SplashScreenBody
9+
import com.softartdev.notedelight.ui.main.NoteDetailBody
1110
import com.softartdev.notedelight.ui.main.PreviewAdaptiveScreen
11+
import com.softartdev.notedelight.ui.main.PreviewMainScreen
12+
import com.softartdev.notedelight.ui.settings.PreviewAdaptiveSettingsScreen
13+
import com.softartdev.notedelight.ui.signin.SignInScreenBody
1214
import com.softartdev.theme.material3.PreferableMaterialTheme
1315

14-
@Preview(name = "Adaptive", group = "light", showSystemUi = true, showBackground = true, device = Devices.TABLET)
15-
@Composable
16-
fun PreviewAdaptiveScreenLight() = PreferableMaterialTheme { PreviewAdaptiveScreen() }
17-
18-
@Preview(name = "Note", group = "light", showSystemUi = true, showBackground = true)
19-
@Composable
20-
fun PreviewNoteDetailBodyLight() = PreferableMaterialTheme { NoteDetailBody() }
21-
22-
@Preview(name = "Main", group = "light", showSystemUi = true, showBackground = true)
23-
@Composable
24-
fun DefaultPreviewLight() = PreferableMaterialTheme { PreviewMainScreen() }
25-
26-
@Preview(name = "Sign In", group = "light", showSystemUi = true, showBackground = true)
27-
@Composable
28-
fun PreviewSignInScreenLight() = PreferableMaterialTheme { SignInScreenBody() }
16+
/**
17+
* A MultiPreview annotation for displaying a @[Composable] method using different device types
18+
* and UI modes.
19+
*/
20+
@Preview(name = "TabletLight", group = "Device & UI-mode", device = Devices.TABLET, uiMode = Configuration.UI_MODE_NIGHT_NO, showSystemUi = true)
21+
@Preview(name = "TabletDark", group = "Device & UI-mode", device = Devices.TABLET, uiMode = Configuration.UI_MODE_NIGHT_YES, showSystemUi = true)
22+
@Preview(name = "PhoneLight", group = "Device & UI-mode", device = Devices.PHONE, uiMode = Configuration.UI_MODE_NIGHT_NO, showSystemUi = true)
23+
@Preview(name = "PhoneDark", group = "Device & UI-mode", device = Devices.PHONE, uiMode = Configuration.UI_MODE_NIGHT_YES, showSystemUi = true)
24+
annotation class PreviewDeviceMode
2925

30-
@Preview(name = "Splash", group = "light", showSystemUi = true, showBackground = true)
26+
@PreviewDeviceMode
3127
@Composable
32-
fun PreviewSplashScreenLight() = PreferableMaterialTheme { SplashScreenBody(true) }
28+
fun SignInScreenPreview() = PreferableMaterialTheme { SignInScreenBody() }
3329

34-
@Preview(name = "Adaptive", group = "dark", showSystemUi = true, showBackground = true, device = Devices.TABLET, uiMode = UI_MODE_NIGHT_YES)
30+
@PreviewDeviceMode
3531
@Composable
36-
fun PreviewAdaptiveScreenDark() = PreferableMaterialTheme { PreviewAdaptiveScreen() }
32+
fun AdaptiveScreenPreview() = PreferableMaterialTheme { PreviewAdaptiveScreen() }
3733

38-
@Preview(name = "Note", group = "dark", showSystemUi = true, showBackground = true, uiMode = UI_MODE_NIGHT_YES)
34+
@PreviewDeviceMode
3935
@Composable
40-
fun PreviewNoteDetailBodyDark() = PreferableMaterialTheme { NoteDetailBody() }
36+
fun AdaptiveSettingsScreenPreview() = PreferableMaterialTheme { PreviewAdaptiveSettingsScreen() }
4137

42-
@Preview(name = "Main", group = "dark", showSystemUi = true, showBackground = true, uiMode = UI_MODE_NIGHT_YES)
38+
@PreviewLightDark
4339
@Composable
44-
fun DefaultPreviewDark() = PreferableMaterialTheme { PreviewMainScreen() }
40+
fun NoteDetailBodyPreview() = PreferableMaterialTheme { NoteDetailBody() }
4541

46-
@Preview(name = "Sign In", group = "dark", showSystemUi = true, showBackground = true, uiMode = UI_MODE_NIGHT_YES)
42+
@PreviewLightDark
4743
@Composable
48-
fun PreviewSignInScreenDark() = PreferableMaterialTheme { SignInScreenBody() }
44+
fun MainScreenPreview() = PreferableMaterialTheme { PreviewMainScreen() }
4945

50-
@Preview(name = "Splash", group = "dark", showSystemUi = true, showBackground = true, uiMode = UI_MODE_NIGHT_YES)
46+
@PreviewLightDark
5147
@Composable
52-
fun PreviewSplashScreenDark() = PreferableMaterialTheme { SplashScreenBody(true) }
48+
fun SplashScreenPreview() = PreferableMaterialTheme { SplashScreenBody(true) }
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<paths xmlns:tools="http://schemas.android.com/tools">
2+
<external-path
3+
name="external_files"
4+
path="."
5+
tools:ignore="SensitiveExternalPath" />
6+
</paths>

app/desktop/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ compose.desktop {
4949
nativeDistributions {
5050
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
5151
packageName = "Note Delight"
52-
packageVersion = "6.0.0"
52+
packageVersion = "7.0.0"
5353
description = "Note app with encryption"
5454
copyright = "© 2023 SoftArtDev"
5555
macOS.iconFile.set(project.file("src/jvmMain/resources/app_icon.icns"))

app/iosApp/iosApp.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@
473473
"$(inherited)",
474474
"@executable_path/Frameworks",
475475
);
476-
MARKETING_VERSION = 6.0;
476+
MARKETING_VERSION = 7.0;
477477
OTHER_LDFLAGS = (
478478
"$(inherited)",
479479
"-ObjC",
@@ -514,7 +514,7 @@
514514
"$(inherited)",
515515
"@executable_path/Frameworks",
516516
);
517-
MARKETING_VERSION = 6.0;
517+
MARKETING_VERSION = 7.0;
518518
OTHER_LDFLAGS = (
519519
"$(inherited)",
520520
"-ObjC",

0 commit comments

Comments
 (0)