Compare commits

..

No commits in common. "b76757bc192f3221bdd93640965193895569adaa" and "4b8ae4063d50e8de7481b6ad721e874f09358966" have entirely different histories.

8 changed files with 60 additions and 81 deletions

View File

@ -305,7 +305,7 @@ const resolveGeosite = () =>
const resolveGeoIP = () =>
resolveResource({
file: 'geoip.dat',
downloadURL: `https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip.dat`
downloadURL: `https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip-lite.dat`
})
const resolveASN = () =>
resolveResource({

View File

@ -141,7 +141,6 @@ export async function createProfile(item: Partial<IProfileItem>): Promise<IProfi
override: item.override || [],
useProxy: item.useProxy || false,
allowFixedInterval: item.allowFixedInterval || false,
autoUpdate: item.autoUpdate ?? false,
updated: new Date().getTime()
} as IProfileItem
switch (newItem.type) {

View File

@ -8,7 +8,7 @@ export async function initProfileUpdater(): Promise<void> {
const currentItem = await getCurrentProfileItem()
for (const item of items.filter((i) => i.id !== current)) {
if (item.type === 'remote' && item.autoUpdate && item.interval) {
if (item.type === 'remote' && item.interval) {
if (typeof item.interval === 'number') {
// 数字间隔使用setInterval
intervalPool[item.id] = setInterval(
@ -40,7 +40,7 @@ export async function initProfileUpdater(): Promise<void> {
}
}
if (currentItem?.type === 'remote' && currentItem.autoUpdate && currentItem.interval) {
if (currentItem?.type === 'remote' && currentItem.interval) {
if (typeof currentItem.interval === 'number') {
intervalPool[currentItem.id] = setInterval(
async () => {
@ -82,7 +82,7 @@ export async function initProfileUpdater(): Promise<void> {
}
export async function addProfileUpdater(item: IProfileItem): Promise<void> {
if (item.type === 'remote' && item.autoUpdate && item.interval) {
if (item.type === 'remote' && item.interval) {
if (intervalPool[item.id]) {
if (intervalPool[item.id] instanceof Cron) {
(intervalPool[item.id] as Cron).stop()

View File

@ -79,10 +79,6 @@
user-select: none;
}
.select-text {
user-select: text !important;
}
*:focus {
outline: none;
outline-color: transparent;

View File

@ -100,17 +100,6 @@ const EditInfoModal: React.FC<Props> = (props) => {
}}
/>
</SettingItem>
<SettingItem title={t('profiles.editInfo.autoUpdate')}>
<Switch
size="sm"
isSelected={values.autoUpdate ?? false}
onValueChange={(v) => {
setValues({ ...values, autoUpdate: v })
}}
/>
</SettingItem>
{values.autoUpdate && (
<>
<SettingItem title={t('profiles.editInfo.interval')}>
<div className="flex flex-col gap-2">
<Input
@ -175,8 +164,6 @@ const EditInfoModal: React.FC<Props> = (props) => {
</SettingItem>
</>
)}
</>
)}
<SettingItem title={t('profiles.editInfo.override.title')}>
<div>
{overrideItems

View File

@ -446,7 +446,6 @@
"profiles.editInfo.intervalCron": "Valid Cron expression",
"profiles.editInfo.intervalHint": "Please enter a number or a valid Cron expression (e.g.: 0 * * * *)",
"profiles.editInfo.fixedInterval": "Fixed Update Interval",
"profiles.editInfo.autoUpdate": "Auto Update",
"profiles.editInfo.override.title": "Override",
"profiles.editInfo.override.global": "Global",
"profiles.editInfo.override.noAvailable": "No available overrides",

View File

@ -451,7 +451,6 @@
"profiles.editInfo.intervalCron": "有效的Cron表达式",
"profiles.editInfo.intervalHint": "请输入数字或合法的Cron表达式0 * * * *",
"profiles.editInfo.fixedInterval": "固定更新间隔",
"profiles.editInfo.autoUpdate": "自动更新",
"profiles.editInfo.override.title": "覆写",
"profiles.editInfo.override.global": "全局",
"profiles.editInfo.override.noAvailable": "没有可用的覆写",

View File

@ -491,7 +491,6 @@ interface IProfileItem {
extra?: ISubscriptionUserInfo
substore?: boolean
allowFixedInterval?: boolean
autoUpdate?: boolean
}
interface ISubStoreSub {