mirror of
https://gitea.redwind.top/Austin/subscription
synced 2024-11-16 02:32:21 +08:00
feat: order
This commit is contained in:
parent
b604e7c8ac
commit
dcd0623766
|
@ -1,5 +1,6 @@
|
|||
import apps from './rawApps';
|
||||
import type { RawGlobalGroup } from './types';
|
||||
import { OPEN_AD_ORDER } from './utils';
|
||||
|
||||
const diabledAppIds = [
|
||||
'com.android.systemui', // 通知栏界面
|
||||
|
@ -31,7 +32,7 @@ const globalGroups: RawGlobalGroup[] = [
|
|||
{
|
||||
key: 0,
|
||||
name: '开屏广告',
|
||||
order: -1,
|
||||
order: OPEN_AD_ORDER,
|
||||
actionMaximum: 2,
|
||||
matchTime: 10000,
|
||||
resetMatch: 'app',
|
||||
|
|
|
@ -5,6 +5,7 @@ import picocolors from 'picocolors';
|
|||
import { pinyin } from 'pinyin-pro';
|
||||
import { walk } from './file';
|
||||
import type { RawApp } from './types';
|
||||
import { OPEN_AD_ORDER } from './utils';
|
||||
|
||||
const rawApps: RawApp[] = [];
|
||||
for await (const tsFp of walk(process.cwd() + '/src/apps')) {
|
||||
|
@ -26,7 +27,7 @@ for await (const tsFp of walk(process.cwd() + '/src/apps')) {
|
|||
if (!g.name.startsWith('开屏广告')) {
|
||||
g.enable = false;
|
||||
} else {
|
||||
g.order = -1;
|
||||
g.order = OPEN_AD_ORDER;
|
||||
}
|
||||
});
|
||||
rawApps.push(appConfig);
|
||||
|
|
|
@ -5,3 +5,5 @@ export const tryRun = <T>(fc: () => T, fallbackFc: (e: unknown) => T) => {
|
|||
return fallbackFc(e);
|
||||
}
|
||||
};
|
||||
|
||||
export const OPEN_AD_ORDER = -10;
|
||||
|
|
Loading…
Reference in New Issue
Block a user