Skip to content

Commit

Permalink
[ui] Update Select code, Update Release feedback, remove auth add button
Browse files Browse the repository at this point in the history
  • Loading branch information
lts-rad committed Jun 28, 2023
1 parent 86bf61d commit 5534520
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 23 deletions.
10 changes: 0 additions & 10 deletions frontend/src/components/Auth/AuthTokenList.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,16 +198,6 @@ const AuthTokenList = (props) => {
{tokens !== null && tokens.length === 0 ? (
<Text alignSelf="center">There are no API tokens added yet</Text>
) : null}
<Button
display={{ base: 'flex', md: tokens.length ? 'none' : 'flex' }}
variant={useColorModeValue('subtle', 'solid')}
colorScheme="muted"
leftIcon={<Icon icon={faCirclePlus} />}
onPress={() => setIsModalOpen(true)}
mt={4}
>
Add token
</Button>
</VStack>
</View>
)
Expand Down
19 changes: 8 additions & 11 deletions frontend/src/components/Select.web.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,18 @@ import React from 'react'

import { Select as NBSelect } from 'native-base'

/*
const Select = (...props) => {

const Select = (props) => {
const isSafari = () =>
/Safari/.test(navigator.userAgent) &&
/Apple Computer/.test(navigator.vendor)
/Apple Computer/.test(navigator.vendor);

//selectedValue={countryWifi}
//onValueChange={(value) => setCountryWifi(value)}
//accessibilityLabel={`Choose Country Code`}
return <NBSelect {...props} selection={isSafari() ? 1 : null} />
}
*/

const Select = NBSelect
//Select.Item = NBSelect.Item
return (
<NBSelect {...props} selection={isSafari() ? 1 : null}/>
);
};

Select.Item = NBSelect.Item
export default Select
export { Select }
13 changes: 11 additions & 2 deletions frontend/src/components/System/Release.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,17 @@ const ReleaseInfo = ({ showModal, ...props }) => {
}

const runUpdate = () => {

context.info(`Update started`)

api
.put('/update')
.then(() => {})
.then(() => {
//happens if already on the latest version, will return 200
context.success('Update complete')
})
.catch((err) => {
//otherwise times out.
//poll for the API coming back up
let interval = setInterval(() => {
api
Expand All @@ -254,7 +261,9 @@ const ReleaseInfo = ({ showModal, ...props }) => {
context.success('Update complete')
updateRelease()
})
.catch(() => {})
.catch(() => {
context.info(`Waiting for update`)
})
}, 1000)
})
}
Expand Down

0 comments on commit 5534520

Please sign in to comment.