mirror of
https://github.com/Myzel394/NumberHub.git
synced 2025-06-18 16:25:27 +02:00
Added time zone module
This commit is contained in:
parent
84020de8f9
commit
85c3f6abcc
@ -113,6 +113,7 @@ dependencies {
|
||||
implementation(project(mapOf("path" to ":feature:settings")))
|
||||
implementation(project(mapOf("path" to ":feature:unitslist")))
|
||||
implementation(project(mapOf("path" to ":feature:epoch")))
|
||||
implementation(project(mapOf("path" to ":feature:timezone")))
|
||||
implementation(project(mapOf("path" to ":data:units")))
|
||||
implementation(project(mapOf("path" to ":data:model")))
|
||||
implementation(project(mapOf("path" to ":data:userprefs")))
|
||||
|
@ -39,6 +39,7 @@ import com.sadellie.unitto.feature.unitslist.navigation.leftScreen
|
||||
import com.sadellie.unitto.feature.unitslist.navigation.navigateToLeftSide
|
||||
import com.sadellie.unitto.feature.unitslist.navigation.navigateToRightSide
|
||||
import com.sadellie.unitto.feature.unitslist.navigation.rightScreen
|
||||
import com.sadellie.unitto.timezone.navigation.timeZoneScreen
|
||||
import io.github.sadellie.themmo.ThemmoController
|
||||
|
||||
@Composable
|
||||
@ -102,5 +103,10 @@ internal fun UnittoNavigation(
|
||||
)
|
||||
|
||||
epochScreen(navigateToMenu = openDrawer)
|
||||
|
||||
timeZoneScreen(
|
||||
navigateToMenu = openDrawer,
|
||||
navigateToSettings = ::navigateToSettings
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -39,6 +39,11 @@ sealed class TopLevelDestinations(
|
||||
name = R.string.epoch_converter
|
||||
)
|
||||
|
||||
object TimeZone : TopLevelDestinations(
|
||||
route = "time_zone_route",
|
||||
name = R.string.time_zone
|
||||
)
|
||||
|
||||
object Settings : TopLevelDestinations(
|
||||
route = "settings_graph",
|
||||
name = R.string.settings_screen
|
||||
|
@ -1271,6 +1271,9 @@
|
||||
<string name="calculator_clear_history_support">All expressions from history will be deleted forever. This action can\'t be undone!</string>
|
||||
<string name="calculator_no_history">No history</string>
|
||||
|
||||
<!--Time zone-->
|
||||
<string name="time_zone">Time zone</string>
|
||||
|
||||
<!--Precision-->
|
||||
<string name="precision_setting_support">Number of decimal places</string>
|
||||
<string name="precision_setting_info">Converted values may have a precision higher than the preferred one.</string>
|
||||
|
1
feature/timezone/.gitignore
vendored
Normal file
1
feature/timezone/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/build
|
38
feature/timezone/build.gradle.kts
Normal file
38
feature/timezone/build.gradle.kts
Normal file
@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Unitto is a unit converter for Android
|
||||
* Copyright (c) 2023 Elshan Agaev
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
plugins {
|
||||
id("unitto.library")
|
||||
id("unitto.library.compose")
|
||||
id("unitto.library.feature")
|
||||
id("unitto.android.hilt")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.sadellie.unitto.feature.timezone"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation(libs.junit)
|
||||
implementation(libs.com.github.sadellie.themmo)
|
||||
|
||||
implementation(project(mapOf("path" to ":data:common")))
|
||||
implementation(project(mapOf("path" to ":data:userprefs")))
|
||||
implementation(project(mapOf("path" to ":data:database")))
|
||||
implementation(project(mapOf("path" to ":data:model")))
|
||||
}
|
0
feature/timezone/consumer-rules.pro
Normal file
0
feature/timezone/consumer-rules.pro
Normal file
22
feature/timezone/src/main/AndroidManifest.xml
Normal file
22
feature/timezone/src/main/AndroidManifest.xml
Normal file
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Unitto is a unit converter for Android
|
||||
~ Copyright (c) 2023 Elshan Agaev
|
||||
~
|
||||
~ This program is free software: you can redistribute it and/or modify
|
||||
~ it under the terms of the GNU General Public License as published by
|
||||
~ the Free Software Foundation, either version 3 of the License, or
|
||||
~ (at your option) any later version.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful,
|
||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
~ GNU General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License
|
||||
~ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<manifest>
|
||||
|
||||
</manifest>
|
@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Unitto is a unit converter for Android
|
||||
* Copyright (c) 2023 Elshan Agaev
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.sadellie.unitto.timezone
|
||||
|
||||
import androidx.compose.runtime.Composable
|
||||
|
||||
@Composable
|
||||
internal fun TimeZoneRoute() {}
|
||||
|
||||
@Composable
|
||||
private fun TimeZoneScreen() {}
|
@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Unitto is a unit converter for Android
|
||||
* Copyright (c) 2023 Elshan Agaev
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.sadellie.unitto.timezone.navigation
|
||||
|
||||
import androidx.navigation.NavGraphBuilder
|
||||
import androidx.navigation.compose.composable
|
||||
import androidx.navigation.navDeepLink
|
||||
import com.sadellie.unitto.core.base.TopLevelDestinations
|
||||
import com.sadellie.unitto.timezone.TimeZoneRoute
|
||||
|
||||
private val timeZoneRoute: String by lazy { TopLevelDestinations.TimeZone.route }
|
||||
|
||||
fun NavGraphBuilder.timeZoneScreen(
|
||||
navigateToMenu: () -> Unit,
|
||||
navigateToSettings: () -> Unit
|
||||
) {
|
||||
composable(
|
||||
route = timeZoneRoute,
|
||||
deepLinks = listOf(
|
||||
navDeepLink { uriPattern = "app://com.sadellie.unitto/$timeZoneRoute" }
|
||||
)
|
||||
) {
|
||||
TimeZoneRoute()
|
||||
}
|
||||
}
|
@ -25,6 +25,7 @@ include(":feature:unitslist")
|
||||
include(":feature:calculator")
|
||||
include(":feature:settings")
|
||||
include(":feature:epoch")
|
||||
include(":feature:timezone")
|
||||
include(":data:userprefs")
|
||||
include(":data:unitgroups")
|
||||
include(":data:licenses")
|
||||
|
Loading…
x
Reference in New Issue
Block a user