Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1310 from koedame/release/v2.3.0
Browse files Browse the repository at this point in the history
Release/v2.3.0
  • Loading branch information
unchidev authored Sep 22, 2022
2 parents 29e98c9 + e686903 commit 1b863fc
Show file tree
Hide file tree
Showing 7 changed files with 131 additions and 186 deletions.
14 changes: 14 additions & 0 deletions CHANGELOGS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# CHANGELOGS

## v2.3.0

### 変更

- カスタムアイコン機能を削除

### 依存パッケージ

- @swc/core from 1.3.1 to 1.3.2
- autoprefixer from 10.4.11 to 10.4.12
- i18next from 21.9.1 to 21.9.2
- ts-loader from 9.3.1 to 9.4.1
- webpack-dev-server from 4.11.0 to 4.11.1

## v2.2.2

### 変更
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
- 🔐 パスワード保存機能
- 🔍 メンバー検索機能
- 📝 プロフィール編集機能
- 📝 独自のプロフィール画像設定機能

## 対応ブラウザ

Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "syncroom-plus",
"version": "2.2.2",
"version": "2.3.0",
"description": "syncroom-plus",
"license": "MIT",
"private": true,
Expand All @@ -17,7 +17,7 @@
"dependencies": {
"@headlessui/react": "^1.7.2",
"@heroicons/react": "^2.0.11",
"i18next": "^21.9.1",
"i18next": "^21.9.2",
"luxon": "^3.0.3",
"react": "^17.0.2",
"react-dom": "^17.0.2",
Expand All @@ -36,7 +36,7 @@
"@hot-loader/react-dom": "^17.0.2",
"@jest/expect-utils": "^28.1.3",
"@jest/globals": "^29.0.3",
"@swc/core": "^1.3.1",
"@swc/core": "^1.3.2",
"@swc/jest": "^0.2.22",
"@tailwindcss/aspect-ratio": "^0.4.2",
"@tailwindcss/forms": "^0.5.3",
Expand All @@ -54,7 +54,7 @@
"@types/webextension-polyfill": "^0.9.0",
"@types/webpack-env": "^1.18.0",
"archiver": "^5.3.1",
"autoprefixer": "10.4.11",
"autoprefixer": "10.4.12",
"babel-loader": "^8.2.2",
"babel-preset-react-app": "^10.0.0",
"clean-webpack-plugin": "^4.0.0",
Expand All @@ -78,12 +78,12 @@
"tailwindcss": "^3.1.8",
"terser-webpack-plugin": "^5.3.6",
"ts-jest": "^28.0.8",
"ts-loader": "^9.3.1",
"ts-loader": "^9.4.1",
"ts-node": "^10.9.1",
"typescript": "^4.8.3",
"webextension-polyfill": "^0.9.0",
"webpack": "^5.74.0",
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.11.0"
"webpack-dev-server": "^4.11.1"
}
}
56 changes: 0 additions & 56 deletions src/components/MyProfile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import { FavoriteProductRepository } from '../../repositories/favoriteProductRep
import { SessionRepository } from '../../repositories/sessionRepository';
import type { SYNCROOM } from '../../types/syncroom';
import { PresetIconRepository } from '../../repositories/presetIconRepository';
import { customImageRepository } from '../../repositories/customImageRepository';
import ReactLoading from 'react-loading';

const myProfileModalState = atom<boolean>({
key: 'MyProfileModalState',
Expand Down Expand Up @@ -49,8 +47,6 @@ const Component: React.FC<Props> = ({}: Props) => {
const [formState, setFormState] = useState<SYNCROOM.MyProfileEditRequestType>();
const [isTwitterConnect, setIsTwitterConnect] = useState<boolean>(false);
const [iconTypeState, setIconTypeState] = useState<'twitter' | 'preset' | 'koedame'>('preset');
const [uploadImageState, setUploadImageState] = useState<File | null>(null);
const [isImageUploading, setIsImageUploading] = useState<boolean>(false);

const buildFormStateFromMyProfile = (myProfile: SYNCROOM.MyProfileType): SYNCROOM.MyProfileEditRequestType => {
return {
Expand Down Expand Up @@ -214,64 +210,12 @@ const Component: React.FC<Props> = ({}: Props) => {
</div>
)}
</div>
<hr />
<div>
<div>
{iconTypeState === 'koedame' && (
<img className="m-2 h-12 w-12 border border-gray-200 rounded-md overflow-hidden bg-gray-100" src={iconInfoToUrl(formState.iconInfo)} />
)}
</div>
{iconTypeState !== 'twitter' && (
<div>
{isImageUploading ? (
<ReactLoading className="h-20 w-20" type="spin" color="rgb(79 70 229)" />
) : (
<>
<input
type="file"
className="inline-flex items-center px-3 py-2 border border-gray-300 shadow-sm text-sm leading-4 font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"
accept=".png,.jpeg,.jpg,.gif"
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
if (e.target.files && e.target.files[0]) {
setUploadImageState(e.target.files[0]);
} else {
setUploadImageState(null);
}
}}
/>
<button
type="button"
className="flex shadow-sm items-center bg-indigo-600 hover:bg-indigo-700 text-white rounded py-2 px-4 text-base focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"
onClick={() => {
setIsImageUploading(true);
if (myProfile && uploadImageState) {
var data = new FormData();
data.append('file', uploadImageState);
customImageRepository.upload(myProfile?.userId, data).then((res) => {
setIsImageUploading(false);

setFormState({
...formState,
profileLinked: {
...formState.profileLinked,
linkImage: false,
},
iconInfo: {
...formState.iconInfo,
type: 'url',
url: res.url,
},
});
});
}
}}
>
{t('upload')}
</button>
</>
)}
</div>
)}
</div>

{isTwitterConnect && (
Expand Down
3 changes: 0 additions & 3 deletions src/lib/i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@
"login_title": "ログインしてより便利にしましょう",
"login_message_body": "ログインすることですべての機能が利用可能になります。ログインしていない状態では一部の機能がご利用いただけません。",
"logout": "ログアウト",
"upload": "アップロード",
"genres": {
"Classic": "Classic",
"Country / Folk": "Country / Folk",
Expand Down Expand Up @@ -261,7 +260,6 @@
"login_title": "Log in to make it more useful!",
"login_message_body": "All functions are available by logging in. Some functions are not available when you are not logged in.",
"logout": "Logout",
"upload": "Upload",
"genres": {
"Classic": "Classic",
"Country / Folk": "Country / Folk",
Expand Down Expand Up @@ -409,7 +407,6 @@
"login_title": "로그인하시면 더욱 유용합니다!",
"login_message_body": "로그인하면 모든 기능을 사용할 수 있습니다. 로그인하지 않은 상태에서는 일부 기능을 사용할 수 없습니다.",
"logout": "로그아웃",
"upload": "업로드",
"genres": {
"Classic": "Classic",
"Country / Folk": "Country / Folk",
Expand Down
9 changes: 0 additions & 9 deletions src/repositories/customImageRepository.ts

This file was deleted.

Loading

0 comments on commit 1b863fc

Please sign in to comment.