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

Feature/rnb #516

Merged
merged 10 commits into from
Jul 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ dependencies {
implementation project(":feature:setting")
implementation project(":feature:danggn")
implementation project(":feature:myPage")
implementation project(":feature:moreMenu")

// ml Kit
implementation "com.google.mlkit:barcode-scanning:$barcodeSacnnerVersion"
Expand Down
28 changes: 19 additions & 9 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>

<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
Expand All @@ -15,19 +16,21 @@
<queries>
<package android:name="com.android.vending" />
<intent>
<action android:name="android.intent.action.VIEW"/>
<data android:scheme="https" android:host="play.google.com" />
<action android:name="android.intent.action.VIEW" />
<data
android:host="play.google.com"
android:scheme="https" />
</intent>
</queries>

<application
android:name=".MashUpApplication"
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:label="${appName}"
android:roundIcon="@mipmap/ic_launcher_round"
android:resizeableActivity="false"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:allowBackup="false"
android:theme="@style/Theme.MashUp"
android:usesCleartextTraffic="true"
tools:ignore="DataExtractionRules">
Expand Down Expand Up @@ -62,8 +65,9 @@
android:name=".ui.login.LoginActivity"
android:exported="true"
android:screenOrientation="portrait"
tools:ignore="LockedOrientationActivity"/>
<activity android:name=".ui.splash.SplashActivity"
tools:ignore="LockedOrientationActivity" />
<activity
android:name=".ui.splash.SplashActivity"
android:exported="true"
android:screenOrientation="portrait"
android:theme="@style/SplashTheme"
Expand Down Expand Up @@ -125,13 +129,14 @@
android:name=".ui.setting.SettingActivity"
android:exported="false"
android:screenOrientation="portrait"
tools:ignore="LockedOrientationActivity"/>
tools:ignore="LockedOrientationActivity" />

<activity
android:name=".ui.setting.PushActivity"
android:exported="false"
android:screenOrientation="portrait"
tools:ignore="LockedOrientationActivity"/>
tools:ignore="LockedOrientationActivity" />


<activity
android:name=".ui.error.NetworkDisconnectActivity"
Expand All @@ -140,6 +145,11 @@
android:screenOrientation="portrait"
tools:ignore="LockedOrientationActivity" />

<activity
android:name="com.example.moremenu.MoreMenuActivity"
android:exported="false"
android:screenOrientation="portrait" />

<service
android:name=".service.MashUpFirebaseMessagingService"
android:exported="false">
Expand Down
9 changes: 9 additions & 0 deletions app/src/main/java/com/mashup/di/NetworkModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import com.facebook.flipper.plugins.network.NetworkFlipperPlugin
import com.mashup.BuildConfig.DEBUG_MODE
import com.mashup.core.model.Platform
import com.mashup.core.network.adapter.PlatformJsonAdapter
import com.mashup.core.network.dao.MetaDao
import com.mashup.core.network.dao.PopupDao
import com.mashup.core.network.dao.StorageDao
import com.mashup.data.network.API_HOST
Expand Down Expand Up @@ -145,4 +146,12 @@ class NetworkModule {
): MemberProfileDao {
return retrofit.create()
}

@Provides
@Singleton
fun provideMetaDao(
retrofit: Retrofit
): MetaDao {
return retrofit.create()
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package com.mashup.ui.schedule

import android.content.Intent
import android.os.Bundle
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.ui.Modifier
import androidx.fragment.app.activityViewModels
import androidx.fragment.app.viewModels
import com.example.moremenu.MoreMenuActivity
import com.mashup.R
import com.mashup.base.BaseFragment
import com.mashup.core.common.extensions.setStatusBarColorRes
Expand Down Expand Up @@ -35,7 +37,11 @@ class ScheduleFragment : BaseFragment<FragmentScheduleBinding>() {
ScheduleRoute(
modifier = Modifier.fillMaxSize(),
mainViewModel = mainViewModel,
viewModel = viewModel
viewModel = viewModel,
onClickMoreMenuIcon = {
val intent = Intent(requireActivity(), MoreMenuActivity::class.java)
requireActivity().startActivity(intent)
}
)
}
}
Expand Down
15 changes: 11 additions & 4 deletions app/src/main/java/com/mashup/ui/schedule/ScheduleRoute.kt
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ import com.mashup.core.common.R as CR
fun ScheduleRoute(
mainViewModel: MainViewModel,
viewModel: ScheduleViewModel,
modifier: Modifier = Modifier
modifier: Modifier = Modifier,
onClickMoreMenuIcon: () -> Unit = {}
) {
val context = LocalContext.current

Expand Down Expand Up @@ -115,7 +116,10 @@ fun ScheduleRoute(
) {
LazyColumn(modifier = modifier) {
item {
ScheduleTopbar(title)
ScheduleTopbar(
title,
onClickMoreMenuIcon = onClickMoreMenuIcon
)
Spacer(
modifier = Modifier
.height(26.dp)
Expand Down Expand Up @@ -198,7 +202,10 @@ fun Context.moveToAttendance(scheduleId: Int) {
}

@Composable
fun ScheduleTopbar(title: String) {
fun ScheduleTopbar(
title: String,
onClickMoreMenuIcon: () -> Unit = {}
) {
Row(
modifier = Modifier
.background(White)
Expand All @@ -219,7 +226,7 @@ fun ScheduleTopbar(title: String) {
modifier = Modifier
.size(20.dp)
.clickable {
// TODO: 메뉴 화면으로 이동, 당근 Popup Disable 처리
onClickMoreMenuIcon()
}
)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.mashup.core.data.repository

import com.mashup.core.network.Response
import com.mashup.core.network.dao.MetaDao
import com.mashup.core.network.dto.RnbResponse
import javax.inject.Inject
import javax.inject.Singleton

@Singleton
class MetaRepository @Inject constructor(
private val metaDao: MetaDao
) {
suspend fun getRnb(): Response<RnbResponse> = metaDao.getRnb()
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.mashup.core.network.dao

import com.mashup.core.network.Response
import com.mashup.core.network.dto.RnbResponse
import retrofit2.http.GET

interface MetaDao {
@GET("/api/v1/meta/rnb")
suspend fun getRnb(): Response<RnbResponse>
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.mashup.core.network.dto

import com.squareup.moshi.JsonClass

@JsonClass(generateAdapter = true)
data class RnbResponse(
val menus: List<String>
)
16 changes: 16 additions & 0 deletions core/ui/src/main/res/drawable/ic_alarm.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="26dp"
android:height="26dp"
android:viewportWidth="26"
android:viewportHeight="26">
<group>
<clip-path
android:pathData="M0,0h26v26h-26z"/>
<path
android:pathData="M12.924,14.351C8.973,13.326 5.395,16.963 6.483,20.897C6.988,22.723 8.429,24.141 10.263,24.616C14.214,25.64 17.792,22.003 16.704,18.069C16.198,16.244 14.757,14.826 12.924,14.351Z"
android:fillColor="#A16A00"/>
<path
android:pathData="M22.542,11.048C23.281,6.691 20.563,2.493 16.285,1.384C12.007,0.275 7.591,2.624 6.121,6.792L5.08,9.745C4.615,11.063 3.847,12.253 2.838,13.22L1.709,14.302C0.576,15.389 0.665,16.837 2.119,17.428C3.782,18.104 6.606,19.055 11.384,20.293C16.161,21.532 19.09,22.072 20.873,22.289C22.431,22.479 23.213,21.256 22.75,19.756L22.288,18.263C21.876,16.927 21.784,15.513 22.018,14.135L22.542,11.048Z"
android:fillColor="#FFA800"/>
</group>
</vector>
31 changes: 31 additions & 0 deletions core/ui/src/main/res/drawable/ic_birthday.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="26dp"
android:height="26dp"
android:viewportWidth="26"
android:viewportHeight="26">
<group>
<clip-path
android:pathData="M0,0h26v26h-26z"/>
<path
android:pathData="M13.583,7.167V11.833H12.417V7.167H13.583Z"
android:fillColor="#9FAECC"
android:fillType="evenOdd"/>
<path
android:pathData="M13,8.333C11.239,8.333 8.774,6.933 13,1.333C17.226,7.167 14.761,8.333 13,8.333Z"
android:fillColor="#FF4BA2"/>
<path
android:pathData="M3.667,12.417C3.667,11.45 4.264,10.667 5,10.667H21C21.736,10.667 22.333,11.45 22.333,12.417V24.667H3.667V12.417Z"
android:fillColor="#DCE4F2"/>
<group>
<clip-path
android:pathData="M3.667,12.417C3.667,11.45 4.264,10.667 5,10.667H21C21.736,10.667 22.333,11.45 22.333,12.417V24.667H3.667V12.417Z"/>
<path
android:pathData="M9.092,16.67C8.187,17.984 6.747,18.833 5.125,18.833C2.387,18.833 0.167,16.412 0.167,13.424C0.167,10.437 2.387,8.015 5.125,8.015C6.747,8.015 8.187,8.865 9.092,10.178C9.996,8.865 11.436,8.015 13.058,8.015C14.68,8.015 16.12,8.865 17.025,10.178C17.93,8.865 19.37,8.015 20.992,8.015C23.73,8.015 25.95,10.437 25.95,13.424C25.95,16.412 23.73,18.833 20.992,18.833C19.37,18.833 17.93,17.984 17.025,16.67C16.12,17.984 14.68,18.833 13.058,18.833C11.436,18.833 9.996,17.984 9.092,16.67Z"
android:fillColor="#C7D1E6"
android:fillType="evenOdd"/>
</group>
<path
android:pathData="M2.5,23.5H23.5V25.056H2.5V23.5Z"
android:fillColor="#AEBEDE"/>
</group>
</vector>
25 changes: 25 additions & 0 deletions core/ui/src/main/res/drawable/ic_carrot.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="26dp"
android:height="26dp"
android:viewportWidth="26"
android:viewportHeight="26">
<path
android:pathData="M12.772,5.117C16.229,2.242 19.123,4.502 20.138,5.992C22.888,7.741 23.448,11.044 21.808,12.89C16.111,19.302 5.799,26.589 2.656,23.091C-0.487,19.594 8.451,8.712 12.772,5.117Z"
android:fillColor="#FF8D4C"/>
<path
android:pathData="M9.383,9.988C9.698,9.69 10.196,9.703 10.494,10.018L13.441,13.127C13.739,13.442 13.726,13.939 13.411,14.238C13.096,14.536 12.599,14.523 12.3,14.208L9.354,11.099C9.055,10.784 9.068,10.287 9.383,9.988Z"
android:fillColor="#EB671D"
android:fillType="evenOdd"/>
<path
android:pathData="M16.274,12.111C16.597,11.821 17.093,11.848 17.383,12.171L18.955,13.92C19.245,14.242 19.218,14.739 18.896,15.029C18.573,15.319 18.076,15.293 17.786,14.97L16.215,13.221C15.924,12.898 15.951,12.401 16.274,12.111Z"
android:fillColor="#EB671D"
android:fillType="evenOdd"/>
<path
android:pathData="M8.187,16.807C8.492,16.498 8.989,16.496 9.298,16.801L12.048,19.521C12.356,19.826 12.359,20.324 12.054,20.632C11.749,20.941 11.251,20.943 10.943,20.638L8.193,17.918C7.884,17.613 7.882,17.115 8.187,16.807Z"
android:fillColor="#EB671D"
android:fillType="evenOdd"/>
<path
android:pathData="M20.79,2.071C21.185,2.25 21.359,2.716 21.18,3.111L20.686,4.196L22.448,2.882C22.796,2.623 23.288,2.694 23.547,3.042C23.806,3.389 23.734,3.882 23.386,4.141L21.464,5.574L23.1,5.328C23.53,5.264 23.929,5.559 23.992,5.987C24.055,6.415 23.757,6.815 23.327,6.88L18.81,7.559C18.38,7.624 17.98,7.329 17.917,6.9C17.909,6.839 17.907,6.779 17.912,6.719C17.911,6.707 17.911,6.695 17.911,6.682C17.907,6.533 17.945,6.383 18.024,6.254L19.749,2.461C19.929,2.066 20.395,1.891 20.79,2.071Z"
android:fillColor="#1AA964"
android:fillType="evenOdd"/>
</vector>
23 changes: 23 additions & 0 deletions core/ui/src/main/res/drawable/ic_mashong.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="26dp"
android:height="26dp"
android:viewportWidth="26"
android:viewportHeight="26">
<path
android:pathData="M5.967,12.937C4.464,11.944 3.171,10.625 2.172,9.064C0.751,6.748 0.603,4.151 1.835,3.289C3.067,2.426 5.236,3.579 6.658,5.93L6.929,6.405C7.121,6.095 7.414,5.872 7.75,5.78C8.236,5.739 8.719,5.9 9.098,6.229C9.475,6.564 9.714,7.045 9.763,7.567C9.917,8.402 10.029,9.246 10.1,10.094C12.018,9.724 13.982,9.724 15.9,10.094C15.967,9.245 16.08,8.402 16.237,7.567C16.261,7.309 16.332,7.059 16.446,6.831C16.56,6.603 16.715,6.401 16.903,6.238C17.279,5.902 17.762,5.738 18.25,5.78C18.589,5.867 18.883,6.091 19.072,6.405L19.343,5.93C20.772,3.614 22.925,2.408 24.165,3.289C25.406,4.169 25.241,6.748 23.82,9.064C22.857,10.572 21.622,11.859 20.189,12.849C20.337,13.043 20.476,13.245 20.616,13.448C23.623,17.929 26.121,23 20.041,23H5.967C0.767,22.498 3.018,17.471 5.852,13.069L5.967,12.937Z"
android:fillType="evenOdd">
<aapt:attr name="android:fillColor">
<gradient
android:startX="-0.167"
android:startY="2.542"
android:endX="25.628"
android:endY="15.511"
android:type="linear">
<item android:offset="0" android:color="#FFDB2482"/>
<item android:offset="0.616" android:color="#FFF7C6FF"/>
<item android:offset="1" android:color="#FF6140F2"/>
</gradient>
</aapt:attr>
</path>
</vector>
12 changes: 12 additions & 0 deletions core/ui/src/main/res/drawable/ic_new.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="18dp"
android:height="18dp"
android:viewportWidth="18"
android:viewportHeight="18">
<path
android:pathData="M9,9m-9,0a9,9 0,1 1,18 0a9,9 0,1 1,-18 0"
android:fillColor="#FF555B"/>
<path
android:pathData="M12.111,5.221V13H10.868L7.184,7.686H7.12V13H5.726V5.221H6.983L10.652,10.539H10.72V5.221H12.111Z"
android:fillColor="#ffffff"/>
</vector>
10 changes: 10 additions & 0 deletions core/ui/src/main/res/drawable/ic_setting.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="26dp"
android:height="26dp"
android:viewportWidth="26"
android:viewportHeight="26">
<path
android:pathData="M10.559,2.629C10.951,2.424 11.706,2.163 13,2.163C14.294,2.163 15.049,2.424 15.442,2.629C15.739,2.785 15.913,3.033 16.013,3.24C16.153,3.534 16.462,4.198 16.732,4.917C17.255,5.155 17.753,5.444 18.221,5.778C18.98,5.651 19.709,5.588 20.035,5.562C20.264,5.545 20.565,5.572 20.849,5.752C21.224,5.988 21.827,6.512 22.473,7.633C23.121,8.754 23.272,9.538 23.291,9.98C23.305,10.316 23.177,10.59 23.047,10.78C22.703,11.283 22.338,11.771 21.954,12.243C22.008,12.815 22.008,13.39 21.954,13.962C22.338,14.434 22.703,14.922 23.047,15.425C23.177,15.615 23.305,15.889 23.291,16.225C23.272,16.667 23.12,17.451 22.474,18.572C21.826,19.693 21.223,20.217 20.849,20.453C20.566,20.633 20.264,20.66 20.035,20.642C19.428,20.596 18.823,20.524 18.221,20.427C17.753,20.761 17.255,21.049 16.732,21.288C16.516,21.857 16.276,22.416 16.013,22.965C15.913,23.172 15.739,23.42 15.442,23.576C15.049,23.781 14.294,24.041 13,24.041C11.706,24.041 10.951,23.781 10.559,23.576C10.261,23.42 10.087,23.172 9.988,22.965C9.847,22.671 9.538,22.007 9.268,21.288C8.745,21.049 8.247,20.761 7.779,20.427C7.021,20.553 6.29,20.617 5.965,20.642C5.736,20.66 5.435,20.633 5.151,20.453C4.776,20.217 4.174,19.693 3.527,18.572C2.879,17.451 2.727,16.667 2.709,16.225C2.696,15.889 2.823,15.615 2.952,15.425C3.296,14.922 3.661,14.434 4.046,13.962C3.992,13.39 3.992,12.815 4.046,12.243C3.661,11.771 3.296,11.283 2.952,10.78C2.823,10.59 2.696,10.316 2.709,9.98C2.728,9.538 2.879,8.754 3.527,7.633C4.174,6.512 4.777,5.988 5.151,5.751C5.435,5.572 5.736,5.545 5.965,5.562C6.291,5.588 7.02,5.652 7.779,5.778C8.246,5.444 8.745,5.155 9.268,4.917C9.485,4.348 9.725,3.789 9.988,3.24C10.087,3.033 10.262,2.785 10.559,2.629ZM16.889,13.102C16.889,14.134 16.48,15.123 15.75,15.853C15.021,16.582 14.032,16.992 13,16.992C11.969,16.992 10.979,16.582 10.25,15.853C9.521,15.123 9.111,14.134 9.111,13.102C9.111,12.071 9.521,11.082 10.25,10.352C10.979,9.623 11.969,9.213 13,9.213C14.032,9.213 15.021,9.623 15.75,10.352C16.48,11.082 16.889,12.071 16.889,13.102Z"
android:fillColor="#959CAC"
android:fillType="evenOdd"/>
</vector>
1 change: 1 addition & 0 deletions feature/moreMenu/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
Loading
Loading