Skip to content

Commit

Permalink
removing client
Browse files Browse the repository at this point in the history
  • Loading branch information
jeryongchan committed Jan 26, 2024
2 parents 4221a07 + af7ff5c commit 543a00f
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 57 deletions.
19 changes: 10 additions & 9 deletions src/renderer/components/auth/RoleSelection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ const RoleSelection = () => {
window.electron.store.set('role', 'host');
actions.setRole('host');
}
if (selectedRole === 'client') {
window.electron.store.set('role', 'client');
actions.setRole('client');
} else if (selectedRole === 'provider') {
// if (selectedRole === 'client') {
// window.electron.store.set('role', 'client');
// actions.setRole('client');
// }
else if (selectedRole === 'provider') {
window.electron.store.set('role', 'provider');
actions.setRole('provider');
} else {
Expand Down Expand Up @@ -115,7 +116,7 @@ const RoleSelection = () => {
fontWeight: selectedRole === 'host' ? '600' : '500',
}}
>
HOST
HOST / CLIENT
</Typography>
}
/>
Expand All @@ -126,12 +127,12 @@ const RoleSelection = () => {
color: 'text.primary',
}}
>
Select this role if you are intending to use this application
as an edge device host which shares compute resources.
Select this role if you wish to share or utilize compute
resources.
</Typography>
</CardContent>
</Card>
<Card
{/* <Card
sx={{
backgroundColor:
selectedRole === 'provider'
Expand Down Expand Up @@ -178,7 +179,7 @@ const RoleSelection = () => {
Host.{' '}
</Typography>
</CardContent>
</Card>
</Card> */}
<Card
sx={{
backgroundColor:
Expand Down
48 changes: 1 addition & 47 deletions src/renderer/components/navigation/leftDrawer/ClientHostTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,53 +17,7 @@ const ClientHostTab = () => {
height: '100%',
}}
>
<Tabs
value={activeTab}
onChange={(event, newValue) => {
console.log('tab changed ', newValue);
if (newValue === 0) {
navigate('/clienttxndashboard');
} else if (newValue === 1) {
navigate('/hosttxndashboard');
} else {
console.error('uncaught error');
}
setActiveTab(newValue);
}}
variant="fullWidth"
sx={{
'& .MuiTabs-indicator': {
backgroundColor: 'transparent',
},
'& .MuiButtonBase-root.MuiTab-root': {
borderRadius: '15px 15px 0 0',
paddingTop: '1rem',
color: 'text.primary',
fontSize: '16px',
},
backgroundColor: isLightTheme
? 'customColor.lightGrey'
: 'primary.dark',
'& .Mui-selected': {
backgroundColor: isLightTheme
? 'background.default'
: 'primary.dark',
paddingTop: '1rem',
height: '3rem',
color: 'black',
fontWeight: '600',
},
}}
>
<Tab label="Client" />
<Tab label="Host" />
</Tabs>
<div role="tabpanel" hidden={activeTab !== 0}>
<ClientTab />
</div>
<div role="tabpanel" hidden={activeTab !== 1}>
<HostTab />
</div>
<HostTab />
</Box>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const PostSharingEnabledComponent = ({
const interval = setInterval(async () => {
const fetchResource = async () => {
const resources = await getResourceStats();
if (resources.success) {
if (Object.keys(resources).length === Object.keys(initialResourcesLog).length) {
setResourcesLog(resources);
}
};
Expand Down
51 changes: 51 additions & 0 deletions src/renderer/components/navigation/menu/MenuComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const MenuComponent = () => {
filter: 'brightness(120%)',
};


return (
<AppBar
position="fixed"
Expand All @@ -44,6 +45,56 @@ const MenuComponent = () => {
isOpen={isRightDrawerOpen}
onClose={toggleRightDrawer(false)}
/>
{/*
when casting a spell, i need to have spellstats.
These stats are originally loaded as SpellDefinition
from the SpellLoader.
var attribute_1: string
var attribute_2: string
var attribute_3: string
var is_magical: bool
var is_physical: bool
var damage: float
var mana_cost: float
var cast_range: float
var cast_speed: float
var shot_speed: float
var charge_time: float
var area: float
When do i compile castable?
> editing grimoire: adding spell, swapping order, attaching glyph
> buffs, grimoire resonance
> passive items pickup
What do i pass into Spell when i call cast?
> cast-params,
>
When I apply StatModifier, I need to
>
So there are two main types of Modifier:
SpellModifier
> Modifier which modifies character stats, non related to spell.
>> used for calculating damage: various resists, evade
>> used for calculating other stuff, like magic find, movement speed, crafting
CharacterModifier
> Modifier which modifies spells. include damage from base stats
so when i compile spell, i have already constructed spells that only need
castparams. (in the future might need to consider cases of grimoire resonance and buff, i.e. those
modifiers that will need to be applied consecutively and those might not be
recompiled in time using standard castable compiler.)
damage calc:
> Player.cast_primary(cast_params)
> DamageCalculator(DamageSource, Damageable):
*/}
<Toolbar
sx={{
display: 'flex',
Expand Down

0 comments on commit 543a00f

Please sign in to comment.