Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Lint Commit Messages
on: [pull_request, push]
on: [push]

jobs:
commitlint:
Expand Down
35 changes: 31 additions & 4 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,9 +1,36 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

StartString='-> PRE-COMMIT HOOK STARTING...'
FinishString='\n-> PRE-COMMIT HOOK CHECKS FINISHED\n'
startString='-> PRE-COMMIT HOOK STARTING...'
statusSuccessString='Status: success'
finishString='-> PRE-COMMIT HOOK CHECKS SUCCESSFULLY FINISHED\n'

echo "$StartString"
configParse() {
pathToConfig="./commitlint.config.js"

allLineCountInFile=$(wc -l < "$pathToConfig")
blockWithKeysFromEnd=$((allLineCountInFile - 6))
blockWithKeysPartWithoutTrash=$((blockWithKeysFromEnd - 3))

formattedKeysArray=$(cat "$pathToConfig" | tail -n "$blockWithKeysFromEnd" | head -n "$blockWithKeysPartWithoutTrash" | sed 's/^[ \t]*//' | tr -d '\r\n')

echo "$formattedKeysArray"
}

keys=$(configParse)

echo 'keys: $keys'

echo "$startString"

echo "\nКоммит должен соответствовать шаблону:\n$keys:␣<описание коммита>\n"

echo "Проверка именования коммита..."
npx --no -- commitlint --edit
echo "$FinishString"
echo "$statusSuccessString"

echo "Запуск prettier..."
npm run prettier:write
echo "$statusSuccessString"

echo "$finishString"
8 changes: 4 additions & 4 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

StartString='-> PRE-PUSH HOOK STARTING...'
FinishString='\n-> PRE-PUSH HOOK CHECKS FINISHED\n'
startString='-> PRE-PUSH HOOK STARTING...'
finishString='\n-> PRE-PUSH HOOK CHECKS SUCCESSFULLY FINISHED\n'

echo "$StartString"
echo "$startString"

echo "$FinishString"
echo "$finishString"
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
commitlint.config.js
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
"tabWidth": 4,
"semi": true,
"endOfLine": "auto"
}
}
38 changes: 30 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,44 @@
# Pose

## Badges
# Kiru client
![Prettier/eslint](https://github.com/Mon-Keys/drssr/actions/workflows/pipeline.yml/badge.svg)

## Content
1. [Dependencies installing](#1)
2. [Starting app for expo](#2)
3. [Run on device via Expo Go](#2)
3. [Commit rules](#4)

### Install dependencies

### Dependencies installing <a name="1"></a>
```
npm ci
npm install
```

### Start app for expo
### Starting app for expo <a name="2"></a>
```
npx expo start --tunnel
```

### Запуск на устройстве через Expo Go
### Run on device via Expo Go <a name="3"></a>
```
необходимо отсканировать QR-код, появившийся в консоли
```

### Commit rules <a name="4"></a>

Все коммиты должны соответствовать шаблону:
```['fix'|'ci'|'refact'|'code']:␣<описание коммита>```

В случае если нужно указать несколько тегов дополнительный тег можно указать в скобках.
Например, если это рефакторинг CI (изменение шага создания билда) команда на коммит будет выглядеть следующим образом:
```git commit -m "ci(refact): rewrite build stage"```

При согласовании всей командой, список ключей можно изменить в файле в корне проекта - ```commitlint.config.js```

Проверка именования коммита производится как локально, так и при пуше на сервере (commitlint.yml)

Отключать локальные проверки не рекоммендуется, однако можно следующими командами:
```
git commit --no-verify -m "..."
```
```
git push --no-verify
```
90 changes: 43 additions & 47 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,49 +1,45 @@
{
"expo": {
"name": "drssr",
"slug": "kiru",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"scheme": "myapp",
"userInterfaceStyle": "automatic",
"splash": {
"image": "./assets/images/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0,
"url": "https://u.expo.dev/855a16af-9293-435f-a61b-4d8220a37e9d"
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.leonidperlin.drssr",
"infoPlist": {
"NSCameraUsageDescription": "$(PRODUCT_NAME) needs access to your Camera."
}
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/images/adaptive-icon.png",
"backgroundColor": "#ffffff"
},
"permissions": [
"android.permission.CAMERA"
],
"package": "com.leonidperlin.drssr"
},
"web": {
"favicon": "./assets/images/favicon.png"
},
"extra": {
"eas": {
"projectId": "855a16af-9293-435f-a61b-4d8220a37e9d"
}
},
"runtimeVersion": "1.0.0"
}
"expo": {
"name": "drssr",
"slug": "kiru",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"scheme": "myapp",
"userInterfaceStyle": "automatic",
"splash": {
"image": "./assets/images/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0,
"url": "https://u.expo.dev/855a16af-9293-435f-a61b-4d8220a37e9d"
},
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.leonidperlin.drssr",
"infoPlist": {
"NSCameraUsageDescription": "$(PRODUCT_NAME) needs access to your Camera."
}
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/images/adaptive-icon.png",
"backgroundColor": "#ffffff"
},
"permissions": ["android.permission.CAMERA"],
"package": "com.leonidperlin.drssr"
},
"web": {
"favicon": "./assets/images/favicon.png"
},
"extra": {
"eas": {
"projectId": "855a16af-9293-435f-a61b-4d8220a37e9d"
}
},
"runtimeVersion": "1.0.0"
}
}
21 changes: 14 additions & 7 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
module.exports = {
extends: [
"@commitlint/config-conventional"
],
rules: {
"type-enum": [2, "always", ["build", "ci", "docs", "fix", "perf", "refactor", "revert", "style", "test", "feature"]],
}
}
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [
2,
'always',
[
'fix',
'ci',
'refact',
'code'
]
]
}
};
4 changes: 2 additions & 2 deletions components/base/BecomeStylistCard.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { View } from './Themed';
import {Pressable, StyleSheet, Text, TouchableOpacity} from 'react-native';
import { Pressable, StyleSheet, Text, TouchableOpacity } from 'react-native';
import React from 'react';
import ProfileVerified from '../icons/profileVerified';
import Colors from '../../styles/Colors';
Expand All @@ -11,7 +11,7 @@ const styles = StyleSheet.create({
borderRadius: Layout.cornerRadius,
width: '100%',
height: 300,
marginTop: Layout.margins.default,
marginTop: Layout.margins.default
},
button: {
height: 40,
Expand Down
9 changes: 5 additions & 4 deletions components/base/InputFieldForEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import {
} from 'react-native';
import Colors from '../../styles/Colors';

interface InputFieldForEditProps extends Omit<TextInputProps, 'secureTextEntry'> {}
interface InputFieldForEditProps
extends Omit<TextInputProps, 'secureTextEntry'> {}

const styles = StyleSheet.create({
inputContainer: {
Expand All @@ -18,7 +19,7 @@ const styles = StyleSheet.create({
flexDirection: 'row',
alignItems: 'center',
paddingLeft: 9,
width: 300,
width: 300
},
input: {
color: Colors.base.black,
Expand All @@ -27,13 +28,13 @@ const styles = StyleSheet.create({
fontSize: 18,
width: 280,
paddingLeft: 10
},
}
});

const InputFieldForEdit = (props: InputFieldForEditProps) => {
return (
<SafeAreaView>
<View style={styles.inputContainer} >
<View style={styles.inputContainer}>
<TextInput
style={styles.input}
selectionColor={Colors.base.black}
Expand Down
18 changes: 12 additions & 6 deletions components/base/ProfileCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const styles = StyleSheet.create({
borderRadius: Layout.cornerRadius,
// width: Abstracts.profile.defaultWidth,
width: '100%',
alignItems: 'center',
alignItems: 'center'
},
image: {
width: Abstracts.profile.avatarSize,
Expand All @@ -42,7 +42,7 @@ const styles = StyleSheet.create({
alignItems: 'center'
},
statsContainer: {
marginVertical: Layout.margins.small,
marginVertical: Layout.margins.small
},
descriptionContainer: {
marginBottom: Layout.margins.default,
Expand Down Expand Up @@ -111,7 +111,10 @@ export const ProfileCard = (props: ProfileCardProps) => {
<Image
style={styles.image}
source={{
uri: props.avatarSrc !== './media/defaults/avatar.webp' ? getUri(props.avatarSrc) : 'https://as2.ftcdn.net/v2/jpg/03/49/49/79/1000_F_349497933_Ly4im8BDmHLaLzgyKg2f2yZOvJjBtlw5.jpg'
uri:
props.avatarSrc !== './media/defaults/avatar.webp'
? getUri(props.avatarSrc)
: 'https://as2.ftcdn.net/v2/jpg/03/49/49/79/1000_F_349497933_Ly4im8BDmHLaLzgyKg2f2yZOvJjBtlw5.jpg'
}}
/>
<Pressable
Expand All @@ -122,9 +125,12 @@ export const ProfileCard = (props: ProfileCardProps) => {
</Pressable>
<View style={styles.nameContainer}>
<Text style={styles.name}>{props.name}</Text>
{props.isVerified &&
<ProfileVerified style={{ marginLeft: 7 }} color="white" />
}
{props.isVerified && (
<ProfileVerified
style={{ marginLeft: 7 }}
color="white"
/>
)}
</View>
<View style={styles.statsContainer}>
<Pressable style={styles.edit} onPress={props.editAction}>
Expand Down
11 changes: 5 additions & 6 deletions components/base/RequestStylist.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { View } from './Themed';
import { StyleSheet, Text } from 'react-native';
import { StyleSheet, Text } from 'react-native';
import React from 'react';
import Exclamation from '../icons/exclamation';
import Colors from '../../styles/Colors';
Expand All @@ -13,7 +13,7 @@ const styles = StyleSheet.create({
height: 300,
marginTop: Layout.margins.default,
alignItems: 'center',
justifyContent: 'center',
justifyContent: 'center'
},
exclamation: {
width: 60,
Expand Down Expand Up @@ -45,18 +45,17 @@ const styles = StyleSheet.create({
}
});


export const RequestStylist = () => (
<View style={styles.mainContainer}>
<View style={styles.exclamation}>
< Exclamation />
<Exclamation />
</View>
<View style={styles.desc}>
<Text style={styles.descText}> Заявка рассматривается </Text>
<Text style={styles.subDescText}>
{' '}
Ваша заявка на статус стилиста рассматривается модерацией. Процесс
может занять от 1 до 24 часов.{' '}
Ваша заявка на статус стилиста рассматривается модерацией.
Процесс может занять от 1 до 24 часов.{' '}
</Text>
</View>
</View>
Expand Down
Loading