Center align app version info
Center align the app version and description text in the settings page.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
|
||||
import React, { useCallback, useEffect, useState, useRef } from 'react';
|
||||
import { getAppVersionInfo, isAndroidPlatform } from '@/utils/platform';
|
||||
import { Label } from '@/components/ui/label';
|
||||
@@ -105,15 +106,15 @@ const AppVersionInfo: React.FC<AppVersionInfoProps> = ({
|
||||
return <div className={className}>
|
||||
<div className="space-y-3">
|
||||
<div>
|
||||
<Label htmlFor="versionName" className="text-gray-600">앱 버전</Label>
|
||||
<div className="p-2 text-base mt-1 py-0">
|
||||
<Label htmlFor="versionName" className="text-gray-600 text-center block">앱 버전</Label>
|
||||
<div className="p-2 text-base mt-1 py-0 text-center">
|
||||
{editableVersionName} (build {editableBuildNumber})
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<Label htmlFor="notes" className="text-gray-600">세부 설명</Label>
|
||||
<div className="p-2 text-base mt-1 py-0">The first build</div>
|
||||
<Label htmlFor="notes" className="text-gray-600 text-center block">세부 설명</Label>
|
||||
<div className="p-2 text-base mt-1 py-0 text-center">The first build</div>
|
||||
</div>
|
||||
|
||||
<div className="mt-[70px] text-center">
|
||||
@@ -136,4 +137,4 @@ const AppVersionInfo: React.FC<AppVersionInfoProps> = ({
|
||||
</div>}
|
||||
</div>;
|
||||
};
|
||||
export default AppVersionInfo;
|
||||
export default AppVersionInfo;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
import React from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import NavBar from '@/components/NavBar';
|
||||
@@ -104,10 +105,9 @@ const Settings = () => {
|
||||
<SettingsOption icon={LogOut} label={user ? "로그아웃" : "로그인"} color="text-neuro-expense" onClick={user ? handleLogout : () => navigate('/login')} />
|
||||
</div>
|
||||
|
||||
<div className="mt-10 border-t border-gray-200 pt-4">
|
||||
<div>
|
||||
|
||||
<AppVersionInfo showDevInfo={true} editable={true} />
|
||||
<div className="mt-10 border-t border-gray-200 pt-4 text-center">
|
||||
<div className="flex justify-center">
|
||||
<AppVersionInfo showDevInfo={true} editable={true} className="w-full" />
|
||||
</div>
|
||||
|
||||
{/* 앱 버전 카드 아래 추가 공간 */}
|
||||
@@ -118,4 +118,4 @@ const Settings = () => {
|
||||
<NavBar />
|
||||
</div>;
|
||||
};
|
||||
export default Settings;
|
||||
export default Settings;
|
||||
|
||||
@@ -42,7 +42,7 @@ export const getAppVersionInfo = async () => {
|
||||
if (Capacitor.isPluginAvailable('BuildInfo')) {
|
||||
// Capacitor.Plugins 대신에 직접 window 객체에서 접근
|
||||
// @ts-ignore - 플러그인이 런타임에 등록되므로 타입 체크를 무시
|
||||
const buildInfo = await Capacitor.Plugins.BuildInfo?.getBuildInfo();
|
||||
const buildInfo = await Capacitor.Plugins?.BuildInfo?.getBuildInfo();
|
||||
return {
|
||||
versionName: buildInfo?.versionName || '1.0.1',
|
||||
buildNumber: buildInfo?.buildNumber ? parseInt(buildInfo.buildNumber, 10) : 2,
|
||||
|
||||
Reference in New Issue
Block a user