Skip to content

Commit

Permalink
Merge pull request #141 from prgrms-web-devcourse-final-project/4-fea…
Browse files Browse the repository at this point in the history
…ture/pwa-options

[Feature] #4 PWA Options
  • Loading branch information
shlee9999 authored Dec 8, 2024
2 parents 5d3117b + 02fa392 commit 151a0bb
Show file tree
Hide file tree
Showing 11 changed files with 57 additions and 139 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"pwa": "pwa-assets-generator --preset minimal public/test.svg",
"format": "prettier --check --ignore-path .gitignore \"**/*.{ts,tsx}\"",
"format:fix": "prettier --write --ignore-path .gitignore \"**/*.{ts,tsx}\"",
"build-and-test": "npm run build && lhci autorun"
"build-and-test": "npm run build && lhci autorun",
"gen-pwa": "pwa-assets-generator --preset minimal public/favicon.svg"
},
"dependencies": {
"@emotion/react": "^11.13.5",
Expand Down Expand Up @@ -48,9 +49,7 @@
"@types/styled-components": "^5.1.34",
"@typescript-eslint/eslint-plugin": "^7.8.0",
"@typescript-eslint/parser": "^7.8.0",
"@types/ol": "^7.0.0",
"@types/react-textarea-autosize": "^8.0.0",
"@vite-pwa/assets-generator": "^0.2.4",
"@vite-pwa/assets-generator": "^0.2.6",
"@vitejs/plugin-react": "^4.2.1",
"@vitejs/plugin-react-swc": "^3.5.0",
"eslint": "^8.57.0",
Expand Down
Binary file added public/favicon.ico
Binary file not shown.
141 changes: 12 additions & 129 deletions public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/apple-touch-icon-180x180.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/maskable-icon-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/pwa-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/pwa-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/pwa-64x64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 5 additions & 3 deletions src/pages/SocialPage/components/ChatItem/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ export default function ChatItem({ lastMessage, members, name, unreadMessageCoun
</S.UserInfoWrapper>
{lastMessage}
</S.TypoWrapper>
<UnreadChatCount>
<Typo11>{unreadMessageCount}</Typo11>
</UnreadChatCount>
{unreadMessageCount ? (
<UnreadChatCount>
<Typo11>{unreadMessageCount}</Typo11>
</UnreadChatCount>
) : null}
</S.ChatItem>
)
}
38 changes: 36 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default defineConfig(({ mode }) => {
strategies: 'injectManifest',
srcDir: 'src',
filename: 'sw.ts',
registerType: 'prompt',
registerType: 'autoUpdate',
injectRegister: false,

pwaAssets: {
Expand All @@ -52,10 +52,44 @@ export default defineConfig(({ mode }) => {
manifest: {
name: 'DDang',
short_name: 'DDang',
start_url: '/',
description: '반려견 산책 서비스',
theme_color: '#ffffff',
theme_color: '#783D16', //?
background_color: '#783D16', //?
display: 'standalone',
categories: ['lifestyle', 'pets'],
icons: [
{
src: '/icons/pwa-192x192.png',
sizes: '192x192',
type: 'image/png',
},
{
src: '/icons/pwa-512x512.png',
sizes: '512x512',
type: 'image/png',
},
{
src: '/icons/maskable-icon-512x512.png',
sizes: '512x512',
type: 'image/png',
purpose: 'maskable',
},
{
src: '/icons/apple-touch-icon-180x180.png',
sizes: '180x180',
type: 'image/png',
purpose: 'apple touch icon',
},
{
src: '/icons/pwa-64x64.png',
sizes: '64x64',
type: 'image/png',
},
],
},

useCredentials: true,
injectManifest: {
globPatterns: ['**/*.{js,css,html,svg,png,ico}'],
},
Expand Down

0 comments on commit 151a0bb

Please sign in to comment.