File tree Expand file tree Collapse file tree
ui-composites/AppVersion/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " electron-gp" ,
33 "private" : true ,
4- "version" : " 0.2.9 " ,
4+ "version" : " 0.2.10 " ,
55 "type" : " module" ,
66 "main" : " dist-main/app.js" ,
77 "author" : " traeop" ,
Original file line number Diff line number Diff line change @@ -9,17 +9,17 @@ import { AuthService } from "../auth/service.js";
99import { ControlUpdateWindowsPlatformService } from "../updater/services/windows/control-update.js" ;
1010import { TrayService } from "../tray/service.js" ;
1111import { destroyWindows } from "../@core/control-window/destroy.js" ;
12- import { ipcWebContentsSend } from "../$shared/utils.js" ;
12+ import { ipcWebContentsSend , isDev } from "../$shared/utils.js" ;
1313import { menu } from "../config.js" ;
1414
1515@WindowManager < TWindows [ "main" ] > ( {
1616 hash : "window:main" ,
1717 isCache : true ,
1818 options : {
19- resizable : false ,
19+ resizable : isDev ( ) ,
2020 show : false ,
21- width : 600 ,
22- height : 600 ,
21+ width : 280 ,
22+ height : 500 ,
2323 } ,
2424} )
2525export class AppWindow implements TWindowManager {
Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ const theme = createTheme({
1313 MuiCssBaseline : {
1414 styleOverrides : {
1515 body : {
16+ overflowY : "auto" ,
17+ overflowX : "hidden" ,
1618 "& #root" : {
1719 width : "100%" ,
1820 } ,
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ export const AddButton = memo(({ ...other }: TPropsButtonProvider) => {
99
1010 return (
1111 < IconButton onClick = { handleAdd } { ...other } >
12- < AddCircleIcon fontSize = "large " />
12+ < AddCircleIcon fontSize = "medium " />
1313 </ IconButton >
1414 ) ;
1515} ) ;
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ export const Item = memo(
2020 const { isMasterKey, isDisabledActions } = useControlContext ( ) ;
2121
2222 return (
23- < Card sx = { { minWidth : 170 } } >
23+ < Card sx = { { width : "100%" } } >
2424 < CardContent >
2525 < Typography gutterBottom variant = "h5" >
2626 { name }
Original file line number Diff line number Diff line change 11import { memo } from "react" ;
2- import Stack from "@mui/material/Stack" ;
3- import Skeleton from "@mui/material/Skeleton" ;
4- import Typography from "@mui/material/Typography" ;
5- import CircularProgress from "@mui/material/CircularProgress" ;
6- import { useControlContext } from "../hooks/useControlContext" ;
2+ import { useControlContext } from "../hooks" ;
73import { useIpc } from "../hooks/useIpc" ;
84import { Item } from "./Item" ;
95
10- const countResources = localStorage . getItem ( "count-of-resources" ) ;
11-
126export const Items = memo ( ( ) => {
137 useIpc ( ) ;
148 const { list } = useControlContext ( ) ;
159
1610 if ( list === undefined ) {
17- return (
18- < Stack spacing = { 2 } direction = "row" sx = { { flexWrap : "wrap" } } useFlexGap >
19- { countResources !== null && Number ( countResources ) ? (
20- Array . from ( { length : Number ( countResources ) } , ( _ , i ) => i ) . map (
21- ( _ , i ) => (
22- < Skeleton key = { i } variant = "rounded" width = { 170 } height = { 110 } />
23- )
24- )
25- ) : (
26- < CircularProgress size = { 70 } />
27- ) }
28- </ Stack >
29- ) ;
30- }
31-
32- if ( list !== undefined && list . length === 0 ) {
33- return (
34- < Stack spacing = { 2 } direction = "row" sx = { { flexWrap : "wrap" } } useFlexGap >
35- < Typography gutterBottom variant = "h5" >
36- Empty
37- </ Typography >
38- </ Stack >
39- ) ;
11+ return null ;
4012 }
4113
4214 return list . map ( ( item ) => {
Original file line number Diff line number Diff line change 11export * from "./useIpc" ;
2+ export * from "./useControlContext" ;
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ export const useIpc = () => {
1111 useEffect ( ( ) => {
1212 window . electron . receive . subscribeResources ( ( { items } ) => {
1313 setItems ( items ) ;
14- localStorage . setItem ( "count-of-resources" , items . length + "" ) ;
1514 } ) ;
1615 } , [ ] ) ;
1716} ;
Original file line number Diff line number Diff line change 11import Typography from "@mui/material/Typography" ;
2+ import Avatar from "@mui/material/Avatar" ;
23import { useInvoke } from "../hooks" ;
34import { memo } from "react" ;
45import type { TPropsContainer } from "./types" ;
6+ import logo from "../../../../assets/72x72.png" ;
57
68export const Container = memo ( ( { ...other } : TPropsContainer ) => {
79 const { version } = useInvoke ( ) ;
@@ -10,5 +12,14 @@ export const Container = memo(({ ...other }: TPropsContainer) => {
1012 return null ;
1113 }
1214
13- return < Typography { ...other } > Current v{ version } </ Typography > ;
15+ return (
16+ < >
17+ < Avatar
18+ sx = { { width : 28 , height : 28 } }
19+ alt = "logo of electron-gp"
20+ src = { logo }
21+ />
22+ < Typography { ...other } > v{ version } </ Typography >
23+ </ >
24+ ) ;
1425} ) ;
Original file line number Diff line number Diff line change @@ -13,31 +13,15 @@ const ActionsKey = memo(({ isMasterKey }: TPropsHomeChildren) => {
1313
1414 if ( ! isMasterKey ) {
1515 return (
16- < IconButton
17- disabled = { ! isAuthenticated }
18- sx = { {
19- position : "fixed" ,
20- bottom : 10 ,
21- right : 10 ,
22- } }
23- onClick = { handleKey }
24- >
25- < HttpsIcon fontSize = "large" />
16+ < IconButton size = "small" disabled = { ! isAuthenticated } onClick = { handleKey } >
17+ < HttpsIcon fontSize = "medium" />
2618 </ IconButton >
2719 ) ;
2820 }
2921
3022 return (
31- < IconButton
32- disabled = { ! isAuthenticated }
33- sx = { {
34- position : "fixed" ,
35- bottom : 10 ,
36- right : 70 ,
37- } }
38- onClick = { handleKey }
39- >
40- < NoEncryptionGmailerrorredIcon fontSize = "large" />
23+ < IconButton size = "small" disabled = { ! isAuthenticated } onClick = { handleKey } >
24+ < NoEncryptionGmailerrorredIcon fontSize = "medium" />
4125 </ IconButton >
4226 ) ;
4327} ) ;
You can’t perform that action at this time.
0 commit comments