master
!Root 2022-06-12 10:37:45 +04:30
parent 3c9abaa5de
commit db1bb97ff7
24 changed files with 81 additions and 58 deletions

View File

@ -1,10 +1,6 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M9,11.75c-0.69,0 -1.25,0.56 -1.25,1.25s0.56,1.25 1.25,1.25 1.25,-0.56 1.25,-1.25 -0.56,-1.25 -1.25,-1.25zM15,11.75c-0.69,0 -1.25,0.56 -1.25,1.25s0.56,1.25 1.25,1.25 1.25,-0.56 1.25,-1.25 -0.56,-1.25 -1.25,-1.25zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8 0,-0.29 0.02,-0.58 0.05,-0.86 2.36,-1.05 4.23,-2.98 5.21,-5.37C11.07,8.33 14.05,10 17.42,10c0.78,0 1.53,-0.09 2.25,-0.26 0.21,0.71 0.33,1.47 0.33,2.26 0,4.41 -3.59,8 -8,8z"/>
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M14.17,13.71l1.4,-2.42c0.09,-0.15 0.05,-0.34 -0.08,-0.45l-1.48,-1.16c0.03,-0.22 0.05,-0.45 0.05,-0.68s-0.02,-0.46 -0.05,-0.69l1.48,-1.16c0.13,-0.11 0.17,-0.3 0.08,-0.45l-1.4,-2.42c-0.09,-0.15 -0.27,-0.21 -0.43,-0.15L12,4.83c-0.36,-0.28 -0.75,-0.51 -1.18,-0.69l-0.26,-1.85C10.53,2.13 10.38,2 10.21,2h-2.8C7.24,2 7.09,2.13 7.06,2.3L6.8,4.15C6.38,4.33 5.98,4.56 5.62,4.84l-1.74,-0.7c-0.16,-0.06 -0.34,0 -0.43,0.15l-1.4,2.42C1.96,6.86 2,7.05 2.13,7.16l1.48,1.16C3.58,8.54 3.56,8.77 3.56,9s0.02,0.46 0.05,0.69l-1.48,1.16C2,10.96 1.96,11.15 2.05,11.3l1.4,2.42c0.09,0.15 0.27,0.21 0.43,0.15l1.74,-0.7c0.36,0.28 0.75,0.51 1.18,0.69l0.26,1.85C7.09,15.87 7.24,16 7.41,16h2.8c0.17,0 0.32,-0.13 0.35,-0.3l0.26,-1.85c0.42,-0.18 0.82,-0.41 1.18,-0.69l1.74,0.7C13.9,13.92 14.08,13.86 14.17,13.71zM8.81,11c-1.1,0 -2,-0.9 -2,-2c0,-1.1 0.9,-2 2,-2s2,0.9 2,2C10.81,10.1 9.91,11 8.81,11z"/>
<path android:fillColor="@android:color/white" android:pathData="M21.92,18.67l-0.96,-0.74c0.02,-0.14 0.04,-0.29 0.04,-0.44c0,-0.15 -0.01,-0.3 -0.04,-0.44l0.95,-0.74c0.08,-0.07 0.11,-0.19 0.05,-0.29l-0.9,-1.55c-0.05,-0.1 -0.17,-0.13 -0.28,-0.1l-1.11,0.45c-0.23,-0.18 -0.48,-0.33 -0.76,-0.44l-0.17,-1.18C18.73,13.08 18.63,13 18.53,13h-1.79c-0.11,0 -0.21,0.08 -0.22,0.19l-0.17,1.18c-0.27,0.12 -0.53,0.26 -0.76,0.44l-1.11,-0.45c-0.1,-0.04 -0.22,0 -0.28,0.1l-0.9,1.55c-0.05,0.1 -0.04,0.22 0.05,0.29l0.95,0.74c-0.02,0.14 -0.03,0.29 -0.03,0.44c0,0.15 0.01,0.3 0.03,0.44l-0.95,0.74c-0.08,0.07 -0.11,0.19 -0.05,0.29l0.9,1.55c0.05,0.1 0.17,0.13 0.28,0.1l1.11,-0.45c0.23,0.18 0.48,0.33 0.76,0.44l0.17,1.18c0.02,0.11 0.11,0.19 0.22,0.19h1.79c0.11,0 0.21,-0.08 0.22,-0.19l0.17,-1.18c0.27,-0.12 0.53,-0.26 0.75,-0.44l1.12,0.45c0.1,0.04 0.22,0 0.28,-0.1l0.9,-1.55C22.03,18.86 22,18.74 21.92,18.67zM17.63,18.83c-0.74,0 -1.35,-0.6 -1.35,-1.35s0.6,-1.35 1.35,-1.35s1.35,0.6 1.35,1.35S18.37,18.83 17.63,18.83z"/>
</vector>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/ic_launcher_adaptive_back"/>
<foreground android:drawable="@mipmap/ic_launcher_adaptive_fore"/>
</adaptive-icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 852 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 459 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View File

@ -1,3 +1,3 @@
<resources>
<string name="app_name">alarm</string>
<string name="app_name">KRA</string>
</resources>

View File

@ -32,7 +32,7 @@ export const AppBar = ({ loading, onRefresh }) => {
onPress={onPress}
onLongPress={onLongPress}
style={{ color: 'white', fontFamily: 'font-bold', fontSize: 20 }}>
آلارم هوشمند
کهکشان رایانه الوند
</Text>
<View style={{ flex: 1 }} />
<ActivityIndicator animating={loading} color={Colors.white} />

View File

@ -3,7 +3,7 @@ import { PermissionsAndroid } from 'react-native';
export const usePermissionReadSMS = async () => {
try {
const granted = await PermissionsAndroid.request(PermissionsAndroid.PERMISSIONS.READ_SMS, {
title: 'آلارم هوشمند',
title: 'کهکشان رایانه الوند',
message: 'ما نیازمند دسترسی به خواندن پیامک های شما هستیم.',
buttonNeutral: 'خروج',
buttonNegative: 'لغو',
@ -19,7 +19,7 @@ export const usePermissionReadSMS = async () => {
export const usePermissionSendSMS = async () => {
try {
const granted = await PermissionsAndroid.request(PermissionsAndroid.PERMISSIONS.SEND_SMS, {
title: 'آلارم هوشمند',
title: 'کهکشان رایانه الوند',
message: 'ما نیازمند دسترسی به ارسال پیامک هستیم.',
buttonNeutral: 'خروج',
buttonNegative: 'لغو',
@ -35,7 +35,7 @@ export const usePermissionSendSMS = async () => {
export const usePermissionReceiveSMS = async () => {
try {
const granted = await PermissionsAndroid.request(PermissionsAndroid.PERMISSIONS.RECEIVE_SMS, {
title: 'آلارم هوشمند',
title: 'کهکشان رایانه الوند',
message: 'ما نیازمند دسترسی به دریافت پیامک هستیم.',
buttonNeutral: 'خروج',
buttonNegative: 'لغو',

View File

@ -1,8 +1,9 @@
export const AboutUS = {
content:
'شرکت ایکس پردازان عصر ایگرگ در سال 1201 میلادی پا به عرصه وجود گذاشت تخصص این شرکت در ابتدا تولید دستگاه های معدن کاوی در زما پیش از رنسانس بود و بعد ز حدود 900 سال سابقه هم اکنون این شرکت در زمینه دستگاه های هوشمند فعال است',
address: 'تست',
phone: '090000000000',
website: 'https://www.google.com',
email: 'mail@google.com',
'در سال 1380 جمعی از متخصصان حوزه علوم کامپیوتری و IT گرد هم آمده و شرکت کهکشان رایانه الوند را در زمینه فناوری اطلاعات به ثبت رسانیدند و فعالیت خود را رسماً آغاز نمودند. این شرکت در همان ابتدای آغاز فعالیت خود با تکیه بر تخصص اعضاء، موفق به دریافت گواهینامه صلاحیت از شورای عالی انفورماتیک گردید و همچنین عضو نظام صنفی رایانه ای شد. تجارب گوناگون شرکت و سوابق درخشان در اجرای پروژه های متنوع موجبات پیشرفت های روز افزون شرکت طی دو دهه اخیر شده است ، بطوری که هم اکنون این شرکت در اقصی نقاط مختلف کشور در حال اجرای چندین پروژه بزرگ ملی با همکاری نیروهای خلاق، فعال و روشنفکر خود می باشد؛ که علاوه بر اشتغال زایی جوانان مستعد و متخصص کشورمان، گام مهمی در توسعه فناوریهای نو و کارآمد در سطوح مختلف سازمانی برداشته ایم.',
address: 'کهکشان رایانه الوند',
location: ['35.72431945800781', '51.40937042236328'],
phone: '02191004774',
website: 'https://www.kahkeshanco.com',
email: 'kranetco@gmail.com',
};

View File

@ -17,6 +17,7 @@ export const DialogReports = ({ visible, onClose, selected, reports }) => {
<List.Item
key={index}
title={item.date}
description={item.type}
left={() => (
<RadioButton
value={index}

View File

@ -1,44 +1,64 @@
import React from 'react';
import { View } from 'react-native';
import { Linking, ScrollView, View, TouchableOpacity } from 'react-native';
// material
import { Card, Avatar, Text } from 'react-native-paper';
// database
import { AboutUS } from '../../database/about';
export const About = () => (
<View style={{ padding: 20 }}>
<Card style={{ marginBottom: 20 }}>
<Card.Content>
<Text>{AboutUS.content}</Text>
</Card.Content>
</Card>
<Card style={{ marginBottom: 5 }}>
<Card.Title
title="آدرس"
subtitle={AboutUS.address}
left={(props) => <Avatar.Icon {...props} icon="map-marker-radius" />}
/>
</Card>
<Card style={{ marginBottom: 5 }}>
<Card.Title
title="شماره تماس"
subtitle={AboutUS.phone}
left={(props) => <Avatar.Icon {...props} icon="phone" />}
/>
</Card>
<Card style={{ marginBottom: 5 }}>
<Card.Title
title="وبسایت"
subtitle={AboutUS.website}
left={(props) => <Avatar.Icon {...props} icon="earth" />}
/>
</Card>
<Card style={{ marginBottom: 5 }}>
<Card.Title
title="آدرس ایمیل"
subtitle={AboutUS.email}
left={(props) => <Avatar.Icon {...props} icon="at" />}
/>
</Card>
</View>
);
export const About = () => {
const open = async (url) => {
try {
await Linking.openURL(url);
} catch (error) {
console.log(error);
}
};
return (
<ScrollView style={{ padding: 20 }}>
<Card style={{ marginBottom: 20 }}>
<Card.Content>
<Text>{AboutUS.content}</Text>
</Card.Content>
</Card>
<TouchableOpacity onPress={() => open(`geo:${AboutUS.location.join(',')}`)}>
<Card style={{ marginBottom: 5 }}>
<Card.Title
title="آدرس"
subtitle={AboutUS.address}
left={(props) => <Avatar.Icon {...props} icon="map-marker-radius" />}
/>
</Card>
</TouchableOpacity>
<TouchableOpacity onPress={() => open('tel://' + AboutUS.phone)}>
<Card style={{ marginBottom: 5 }}>
<Card.Title
title="شماره تماس"
subtitle={AboutUS.phone}
left={(props) => <Avatar.Icon {...props} icon="phone" />}
/>
</Card>
</TouchableOpacity>
<TouchableOpacity onPress={() => open(AboutUS.website)}>
<Card style={{ marginBottom: 5 }}>
<Card.Title
title="وبسایت"
subtitle={AboutUS.website}
left={(props) => <Avatar.Icon {...props} icon="earth" />}
/>
</Card>
</TouchableOpacity>
<TouchableOpacity onPress={() => open('mailto://' + AboutUS.email)}>
<Card style={{ marginBottom: 5 }}>
<Card.Title
title="آدرس ایمیل"
subtitle={AboutUS.email}
left={(props) => <Avatar.Icon {...props} icon="at" />}
/>
</Card>
</TouchableOpacity>
<View style={{ height: 100 }}></View>
</ScrollView>
);
};

View File

@ -67,7 +67,7 @@ export const More = () => {
if (item.key.startsWith('رک') || ['دما', 'رطوبت'].includes(item.key)) {
return <View />;
}
const value = item.value.length == 0 ? (item.status ? 'روشن' : 'خاموش') : item.value;
const value = item.value;
const label = item.key;
if (item.status == null) {