Skip to content

Commit

Permalink
lang
Browse files Browse the repository at this point in the history
  • Loading branch information
VirtualHotBar committed May 15, 2024
1 parent f97f45d commit 69caaeb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
12 changes: 8 additions & 4 deletions src/controller/update/notice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@ import { Notice } from "../../type/controller/update";


async function checkNotice() {
const notice: Notice = (await (await fetch(nmConfig.api.url + '/GetNotice/?lang=' + nmConfig.settings.language)).json())
if (notice.state === 'success') {
if (nmConfig.notice === undefined || (nmConfig.notice && notice.data.content !== nmConfig.notice.data.content)) {
nmConfig.notice = notice
try {
const notice: Notice = (await (await fetch(nmConfig.api.url + '/GetNotice/?lang=' + nmConfig.settings.language)).json())
if (notice.state === 'success') {
if (nmConfig.notice === undefined || (nmConfig.notice && notice.data.content !== nmConfig.notice.data.content)) {
nmConfig.notice = notice
}
}
} catch (e) {
console.log(e)
}
}

Expand Down
8 changes: 4 additions & 4 deletions src/page/storage/add.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { getProperties, getURLSearchParam, openUrlInBrowser } from "../../utils/
import { getStorageParams, searchStorage } from "../../controller/storage/storage";
import { rcloneInfo } from "../../services/rclone";
import { IconQuestionCircle } from "@arco-design/web-react/icon";
import { roConfig } from "../../services/config";
import { nmConfig, roConfig } from "../../services/config";
import { searchStorageInfo, storageInfoList } from "../../controller/storage/allList";
import { ParametersType } from "../../type/defaults";
import { StorageInfoType, StorageParamsType } from "../../type/controller/storage/info";
Expand Down Expand Up @@ -124,8 +124,8 @@ function AddStorage_page() {
</RadioGroup>
</Card>
{!showAdvanced &&
<div style={{width:'100%',textAlign:'right'}}><Button onClick={() => setShowAdvanced(true)} type='text'>{t('show_all')} </Button></div>
}
<div style={{ width: '100%', textAlign: 'right' }}><Button onClick={() => setShowAdvanced(true)} type='text'>{t('show_all')} </Button></div>
}

{/*<Select
placeholder={t('please_select')}
Expand Down Expand Up @@ -179,7 +179,7 @@ function AddStorage_page() {
<Col flex={'4rem'}>
<Button onClick={() => {
openUrlInBrowser(
roConfig.url.to('docs-storage', '/' + (storageInfo.displayType || storageInfo.type).toLocaleLowerCase().split(' ').join('-') + '&framework=' + storageInfo.framework)
roConfig.url.to('docs-storage', '/' + (storageInfo.displayType || storageInfo.type).toLocaleLowerCase().split(' ').join('-') + '&framework=' + storageInfo.framework + '&lang=' + nmConfig.settings.language)
)
}}
type='text' icon={<IconQuestionCircle />}>{t('help_for_this_storage')}({t(storageInfo.label)}) </Button>
Expand Down

0 comments on commit 69caaeb

Please sign in to comment.